EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

When performing LN on negative numbers, it returned invalid value for Redshift


Jinlei Cai

Quality Engineer, Senior • MicroStrategy


Symptom 

When performing LN on negative numbers, it returned invalid value for Redshift. 
 

ka04W000001485jQAA_0EM4W000005aYDF.png

 

Cause 

log(x) is undefined for x ≤ 0, If we pass a static number, Redshift can also directly display the error, however when we pass a column, that column can have multiple values which could be either >0 or <=0, so instead Redshift will show NaN for the values which are <=0.  
 
There are no plans to change or modify this behavior from Redshift side. 
 

Action 

No action required. MSTR uses the return value "-1.#IND" to indicate invalid value. 
 
 


Comment

0 comments

Details

Knowledge Article

Published:

July 10, 2023

Last Updated:

July 10, 2023