Visitar URL original
feat: fold IS NULL/NOT NULL predicates on unknown type by ggyuchive · Pull Request #983 · apache/iceberg-cpp · GitHub
Skip to content

feat: fold IS NULL/NOT NULL predicates on unknown type - #983

Merged
wgtmac merged 1 commit into
apache:mainfrom
ggyuchive:feat/unknown-type-null-predicates
Oct 10, 2026
Merged

wgtmac merged 1 commit into
apache:mainfrom
ggyuchive:feat/unknown-type-null-predicates

Conversation

@ggyuchive

Copy link
Copy Markdown
Contributor
  • Previously the predicate stayed a BoundUnaryPredicate, and since unknown columns have no metrics, NOT NULL could not prune any data files.
  • Values of the v3 unknown type are always null, so IS NULL on an unknown column now binds to AlwaysTrue and NOT NULL binds to AlwaysFalse.
  • This resolves the TODO(gangwu): deal with UnknownType in BindUnaryOperation and matches Java's UnboundPredicate#bindUnaryOperation.

Values of the v3 unknown type are always null.
Binding IS NULL on an unknown column now returns AlwaysTrue
and NOT NULL returns AlwaysFalse.
Comment thread src/iceberg/expression/predicate.cc

@wgtmac wgtmac left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ggyuchive for adding this and @kamcheungting-db @advancedxy for the review!

@wgtmac
wgtmac merged commit a88f88a into apache:main Oct 10, 2026
15 checks passed
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.

4 participants