Repository navigation
Commit e8974d6
authored
fix(datetime-parts): keep constant nullability in comparison pushdown (#10512)
Fixes #10481.
`DTPComparisonPushDownRule` replaces a midnight timestamp constant with
a days constant. It cast that constant to the dtype of `days`. When the
column is non-nullable and the constant is nullable, the rewritten
comparison returned `bool`, but the original comparison returned
`bool?`. The reduce then failed with `Reduced array dtype mismatch`.
vortex-datafusion makes all literals nullable. Thus a midnight literal
(for example `ts >= TIMESTAMP '2026-10-05T00:00:00Z'`) against a
non-nullable, midnight-only timestamp column failed the read.
The rule now casts the days constant with the nullability of the
constant that it replaces.
---------
Signed-off-by: Robert Kruszewski <[email protected]>1 parent 52a1d15 commit e8974d6
1 file changed
Lines changed: 38 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
131 | 133 | | |
132 | | - | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
| |||
329 | 331 | | |
330 | 332 | | |
331 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
332 | 368 | | |
333 | 369 | | |
334 | 370 | | |
| |||
0 commit comments