feat: add conservative ORC predicate pushdown#388
Open
liujiwen-up wants to merge 1 commit into
Open
Conversation
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.
Purpose
Linked issue: none
This PR adds conservative predicate pushdown support for ORC reads.
Before this change, ORC reads ignored file predicates completely. This meant ORC files could not benefit from reader-level row-group pruning, and filtering on non-projected columns could fail once the ORC reader needed those columns for predicate evaluation.
This change enables safe ORC row-group pruning for a first set of scalar predicates while preserving Paimon's existing residual-filter semantics. ORC predicate pushdown is treated as a conservative optimization only, not as exact filtering.
Brief change log
orc-rustpredicates for ORC row-group pruning.INpredicatesIS NOT NULLon supported scalar typesUnsupported in this PR
The following predicate pushdown cases are intentionally not enabled yet:
FLOAT = literalandDOUBLE = literalorc-rustfloat/double bloom hashing is compatible with ORC files produced by Spark/Java ORC writers before enabling this safely. A false negative bloom match could incorrectly skip a row group.NOT,NOT IN,!=, and partially supported predicates underORThese unsupported cases fail open and remain residual filters. They can be added incrementally in follow-up PRs after dedicated compatibility tests are available.
Tests
cargo fmt --check: passedcargo test -p paimon arrow::format::orc::tests --lib: passedcargo test -p paimon-integration-tests test_read_orc --no-run: passedNote: the ORC integration tests require the provisioned integration-test warehouse to run fully. In this local environment, full execution was not run because
default.full_types_tablewas not present.API and Format
No public API changes.
No table format, snapshot, manifest, or persisted metadata format changes.
Documentation
Inline reader documentation was updated to clarify that ORC predicate pushdown is conservative row-group pruning, not exact row-level filtering.