I have a table in HIVE that when I sum the columns for Value1, it gives me an incorrect value.
ID, VALUE1
1 10
1 -100
1 10
1 20
1 -60
1 110
1 10
When you sum all these values, you should get '0'. However, the query in HIVE when I use sum(value1) is giving me '-20', which is what you get if you were to add them all in order.
VALUE1 is INT.
Does anyone know how to fix this issue?