Repository navigation
Reenable float aggregation pushdown for duckdb except for min() - #9094
Conversation
050828b to
38b78d6
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
38b78d6 to
47e6d5e
Compare
47e6d5e to
4aba56f
Compare
| // vortex's min() either ignores or counts nans. | ||
| // See slt/duckdb/nan_aggregates.slt. | ||
| if aggregate == PushedAggregate::Min && dtype.is_float() { |
There was a problem hiding this comment.
fwiw the default is to skip nans so I think we can push it down?
There was a problem hiding this comment.
If we include nans, min([nan,1,2]) = NaN, and duckdb says 1, because -NaN is treated same as NaN.
If we skip nan, min([nan,nan]) = NULL, and we need NaN.
There was a problem hiding this comment.
thanks for spelling this out. I missed some of the detail. DuckDB semantics are truly... special.
Float aggregate pushdown was disabled in #9069 because of nan handling. For max,avg,sum,count, and first Vortex's behaviour
with include_nans() matches duckdb's so we can enable it.
Duckdb's min() NaN ordering, however, is incompatible so we still forbid
pushdown.
Forbid i64/u64 sum pushdown since an overflow/underflow in Vortex returns NULLs but in Duckdb it returns i128/u128.
Change vortex benchmark to use i32 on columns to measure sum pushdown.
Resolves: #9085