Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Handling the NULL data in impala

Handling the NULL data in impala

New Contributor

I am trying understand the behavior of arithmetic operation in impala

i am using the following table

║ id     name   salary 
║ 1       cde      5636 
║ 2       asd      148    
║ 3       pwe      null    
║ 4       lmn       959    

when i execute the following query


select salary+20 as sum1 from table where id=3;
it returns me



when i run sum on the column with


select sum(salary) as sum1 from table;


1 |6743


I am unable to understand how same arithmetic operations are behaving differently




Don't have an account?
Coming from Hortonworks? Activate your account here