Repository navigation
Commit 756662d
committed
fix: bin coarse date_bin timestamps in i128 and restore ordering
date_bin scaled every source to i64 nanoseconds and mapped overflow to
NULL, so second, millisecond and microsecond values outside 1677-2262
became NULL. apache#25692 therefore stopped propagating ordering for these
types, which forced extra sorts and hash aggregation for common queries.
Keep the i64 computation as the fast path, and recompute in i128 only
when it overflows. A non-null input now becomes NULL only when its bin
cannot be represented, so date_bin propagates the ordering of its
source for every precision again.
Closes apache#25812.1 parent 871058c commit 756662d
3 files changed
Lines changed: 305 additions & 123 deletions
File tree
- datafusion
- functions/src/datetime
- sqllogictest/test_files
- datetime
0 commit comments