Products | Versions |
---|---|
TIBCO Live Datamart | - |
Null-value handling in aggregate functions is different from null handling in simple equations, for example making sum(a+b) functionally different from sum(a)+sum(b). This may result in complex expressions involving aggregation which are incorrect for the target use-case.
lv-client "select * from datatable" +----+------+------+ | id | a | b | +----+------+------+ | 1 | null | 2.0 | | 2 | 4.0 | null | | 3 | 1.0 | 5.0 | +----+------+------+ Rows = 3
lv-client "select sum(a) as sum_a, sum(b) as sum_b from datatable" +-------+-------+ | sum_a | sum_b | +-------+-------+ | 5.0 | 7.0 | +-------+-------+ Rows = 1
lv-client "select sum(a+b) as sum_ab from datatable" +--------+ | sum_ab | +--------+ | 6.0 | +--------+ Rows = 1
lv-client "select sum(a)+sum(b) as ab_sum from datatable" +--------+ | ab_sum | +--------+ | 12.0 | +--------+ Rows = 1