Repository navigation
fix: leave predicates Iceberg cannot bind to DataFusion instead of failing the scan - #105
Open
debugmiller wants to merge 1 commit into
Open
debugmiller wants to merge 1 commit into
debugmiller wants to merge 1 commit into
Conversation
…iling the scan IS NULL / IS NOT NULL on a struct, list or map column failed the scan with "Accessor for Field ... not found": iceberg-rust binds references to primitive fields only. IcebergDataSourceBuilder::build now keeps the top-level conjuncts of the predicate that bind to the scanned snapshot's schema. The filters are Inexact, so DataFusion still applies the ones dropped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #104
IS NULL/IS NOT NULLon a struct, list or map column fails the scan, because iceberg-rust can only bindpredicates on primitive fields. Filters are pushed down as
Inexact, so the predicate never needed to reach Iceberg.In this change,
IcebergDataSourceBuilder::buildsplits the predicate into its top-level conjuncts and keeps those that bind to the scanned snapshot's schema. InWHERE id = 1 AND s IS NOT NULL,id = 1is still pushed. AnORwith a side that does not bind is dropped whole. No public API changes.Tests:
nested_null_predicate_pushdown.slt) creates a table with a struct column and checks thatIS NULLandIS NOT NULLon it return the right rows (both fail onmain), and that a null test on a field inside the struct still works.test_scan_drops_conjuncts_that_do_not_bind) builds scans with predicates that partly bind and checks that the binding conjuncts are kept, that a predicate with nothing that binds becomes no predicate, and that anORwith an unbindable side is dropped whole.