Kyligence / ClickHouse

ClickHouse® is a free analytics DBMS for big data
https://clickhouse.com
Apache License 2.0
14 stars 17 forks source link

Support sum0 function #489

Closed lwz9103 closed 3 months ago

lwz9103 commented 3 months ago

Changelog category (leave one):

Documentation entry for user-facing changes

Difference between sum and sum0: If agg data is empty, sum(nullable_col) return \N, but sum0 return 0. which code take effect:

AggregateFunctionProperties properties = { .returns_default_when_only_null = true, .is_order_dependent = false }

ClickHouse plan difference: image