Repository navigation
Require matching dtypes for extension comparisons - #11016
Conversation
Merging this PR will degrade performance by 15.67%1 warning
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing |
2c3048c to
deb59a4
Compare
b1e9533 to
5bed318
Compare
Signed-off-by: Connor Tsui <[email protected]>
Signed-off-by: Connor Tsui <[email protected]>
5bed318 to
2461528
Compare
Signed-off-by: Connor Tsui <[email protected]>
Signed-off-by: Connor Tsui <[email protected]>
Signed-off-by: Connor Tsui <[email protected]>
Signed-off-by: Connor Tsui <[email protected]>
myrrc
left a comment
There was a problem hiding this comment.
The general algorithm is fine, but I have two notes:
- Duckdb part should not add any new ifdefs, macros, tweaks, or features unless this is required for building (see static_extensions feature). We also shouldn't write a rust test if we can write an SLT.
- Roughly a third of the changes are comments generated by LLM which are very verbose and IMO don't give you any more information than you'd get reading just the code. I'd propose removing all of them .
| return reinterpret_cast<duckdb_value>(&(*vec)[idx]); | ||
| } | ||
|
|
||
| #ifdef VORTEX_DUCKDB_TEST_HARNESS |
There was a problem hiding this comment.
Please don't add ifdefs or macros changing how we run and test duckdb
There was a problem hiding this comment.
How should we test this instead?
There was a problem hiding this comment.
i added sqllogictests, I think this is fine now
|
@myrrc can you tell me which comments you think are not useful? At least for me, I should be able to look at the module docs and not have to read the whole file to understand what it is doing. Generally speaking, if I have to read any code, that is the failure of the docs and the type and function names. We also generally don't have great developer docs, so I try to update these as I make changes (which also helps in keeping them up to date). I'm happy to change docs if you have a better way of summarizing. Note that documentation is not just for the purpose of enhancing what you can understand by manually reading code. |
|
just to make progress, im going to pull the comments out into a separate PR |
Signed-off-by: Connor Tsui <[email protected]>
## Summary - Tracking Issue: #7683. Depends on #11016. DataFusion literals can hold an extension column's Arrow storage value without its extension metadata. Uses the other operand's field metadata to reconstruct Vortex extension scalars, so UUID and JSON filters can still be pushed down with matching dtypes. ## Changes Uses one binary operand conversion path, with field context for comparison literals. Comparison and `IN`-list literals use the registered Arrow importer, preserving explicit literal metadata and timestamp units. Inherited extension names and payloads come from the same field, including when the payload is absent, and import errors retain their original cause. Tests cover literal metadata, including stale payloads, static filters, and dynamic filter updates with residual evaluation. Formatting passes with CI's pinned `nightly-2026-09-10` for `vortex-datafusion`. Tests, Clippy, and benchmarks were not run locally for this layer. ## API Changes Exporting a non-temporal extension scalar as a bare DataFusion `ScalarValue` now returns an error instead of discarding its extension type. Scalar statistics that cannot preserve the extension type are omitted. --------- Signed-off-by: Connor Tsui <[email protected]>
## Summary Moves the module and helper documentation extracted from #11016 into a separate PR. ## Changes Explains temporal storage, binary function execution, encoded comparisons, and the DuckDB end-to-end tests. Descriptions match current `develop` behavior so this PR can merge independently of #11016. Documentation only. No tests, linting, or formatting commands were run for this PR. Signed-off-by: Connor Tsui <[email protected]>
U2, U3, U4, U6, U7 and U8 merged on 2026-11-02 in #11012, #11014 and #11016, and the DataFusion literal fix #11067 merged right after U2. So order constraint 1 holds, and phase 1 starts from develop. The graph shows these nodes as merged, and parts 2 and 4 name the PR that fixed each finding. #10953 now keeps i32 days and widens only the days part to i64 when a value does not fit. It has no review, and it conflicts with the DateTimeParts compare kernel that U2 changed. #11056 still waits on its request for changes. #10661 replaces the closed #10482 for file sort statistics. In the type roadmap, only the N1 sentence changes. Signed-off-by: Connor Tsui <[email protected]>
Summary
Extension comparisons could compare raw storage on the array path while scalar execution rejected the same operands. Applies one dtype requirement across comparison paths.
Changes
Checks logical dtypes at binding and before comparison fast paths or encoding kernels run. Regression tests cover batch, row, and constant execution, encoded timestamps, and DuckDB filter pushdown through SQL logic tests. Broader documentation is split into #11099. DataFusion literal conversion is handled separately in #11067.
Local pre-commit license and formatting checks passed. Tests and benchmarks were not run after the review fixes. Workspace-wide Clippy started through the pre-push hook and was stopped without a result.
API Changes
Comparison operands must have matching logical dtypes, ignoring nullability. Comparisons between an extension and its storage dtype, or between different extension dtypes, now return an error. This includes timestamps with different units or time zones.