Reputation: 61
As we all know ,we can use ifnull function in mysql,but there is no ifnull function in hive ,so how can we use some other function to substitute it
Upvotes: 3
Views: 12361
Reputation: 2045
You can use the COALESCE or nvl function.
Source -> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF.
Search for "Conditional Functions" and you will find all of the function definitions in that section.
Upvotes: 5
Reputation: 630
NULLIF
is available in Hive(2.3.0) version on wards.
Search NULLIF
in https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF link.
Upvotes: -2