Handling output of greatest and least functions
To calculate the greatest (or least) value in a column, you need to work around a problem that occurs when the column has a NULL value.
Before Upgrade to CDP
The greatest function returned the highest value of the list of values. The least function returned the lowest value of the list of values.
After Upgrade to CDP
Returns NULL when one or more arguments are NULL.
Action Required
Use NULL filters or the nvl function on the columns you use as arguments to the greatest or least functions.
SELECT greatest(nvl(col1,default value incase of NULL),nvl(col2,default value incase of NULL));