Repository navigation
Conversation
Perseus
commented
Nov 13, 2026
| predicate: Option<Predicate>, | ||
| /// Physical filters pushed down by DataFusion. The scan ANDs the parts that convert | ||
| /// to an Iceberg predicate onto `predicate`. | ||
| filters: Vec<Arc<dyn PhysicalExpr>>, |
Contributor
Author
There was a problem hiding this comment.
filters stores both static and dynamic filters
Static filters are already converted and stored in the predicate field when the datasource is being built, but dynamic filters can't be converted that way; so we need to store the raw filters here, even though it has redundant copies of the static filters.
|
|
||
| let ctx = SessionContext::new(); | ||
| let catalog = IcebergCatalogProvider::try_new(Arc::new(iceberg_catalog)).await?; | ||
| ctx.register_catalog("catalog", Arc::new(catalog)); |
Contributor
There was a problem hiding this comment.
Could you use the taxi dataset instead of doing an insert?
Add a public function that turns a DataFusion physical filter into an Iceberg predicate. The predicate matches every row the filter matches. It can match more rows, so callers still apply the filter. It converts the expressions DataFusion's dynamic filters use: comparisons with a literal, IN lists, IS NULL, IS NOT NULL, AND, OR and CASE, including the `struct(a, b) IN (...)` lists that multi-column hash joins build. Floats and times aren't converted. It returns None when no part of the filter converts.
Perseus
force-pushed
the
anirudh.singh/physical-predicate-converter
branch
from
November 21, 2026 12:34
55f6b7c to
1ce5e24
Compare
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.
Adds
iceberg_datafusion::read::convert_physical_filter_to_predicate, which turns a DataFusion physical filter into an Iceberg predicate.IcebergDataSourceuses it for the filters DataFusion pushes into the scan.The data source:
try_pushdown_filters, and reports each as not pushed down, so DataFusion still applies itANDs the result onto its predicateIcebergDataSource::filtersThis is a first step toward #68.