Skip to content

fix: leave predicates Iceberg cannot bind to DataFusion instead of failing the scan - #105

Open
debugmiller wants to merge 1 commit into
apache:mainfrom
debugmiller:fix/nested-null-pushdown
Open

debugmiller wants to merge 1 commit into
apache:mainfrom
debugmiller:fix/nested-null-pushdown

Conversation

@debugmiller

@debugmiller debugmiller commented Nov 11, 2026 •

Copy link
Copy Markdown

Closes #104

IS NULL / IS NOT NULL on a struct, list or map column fails the scan, because iceberg-rust can only bind
predicates on primitive fields. Filters are pushed down as Inexact, so the predicate never needed to reach Iceberg.

In this change, IcebergDataSourceBuilder::build splits the predicate into its top-level conjuncts and keeps those that bind to the scanned snapshot's schema. In WHERE id = 1 AND s IS NOT NULL, id = 1 is still pushed. An OR with a side that does not bind is dropped whole. No public API changes.

Tests:

  • A SQL test (nested_null_predicate_pushdown.slt) creates a table with a struct column and checks that IS NULL and IS NOT NULL on it return the right rows (both fail on main), and that a null test on a field inside the struct still works.
  • A unit test (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 an OR with an unbindable side is dropped whole.

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IS NULL / IS NOT NULL on a struct column fails the scan with "Accessor for Field … not found"

1 participant