New Contributor
Posts: 2
Registered: ‎10-12-2017

Handling the NULL data in impala

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