[flink] Push down lake filters for non-partitioned scans#3169
Merged
luoyuxia merged 6 commits intoapache:mainfrom Apr 23, 2026
Merged
[flink] Push down lake filters for non-partitioned scans#3169luoyuxia merged 6 commits intoapache:mainfrom
luoyuxia merged 6 commits intoapache:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Enables LakeSource filter pushdown for non-partitioned lake-backed scans by moving lake predicate handling out of the isPartitioned() branch while keeping Fluss-side pushdowns (partition pruning / record-batch filtering) authoritative and leaving Flink as a correctness backstop (FLINK-38635).
Changes:
- Move lake filter pushdown to run regardless of table partitioning, after Fluss-side pushdowns are computed.
- Add
pushdownLakeFilters(...)helper that records accepted lake predicates as accepted Flink expressions without rewriting remaining filters. - Add in-code documentation clarifying why lake pushdown only updates
acceptedFilters.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+661
to
+667
| List<Predicate> acceptedLakePredicates = filterPushDownResult.acceptedPredicates(); | ||
| for (int i = 0; i < lakePredicates.size(); i++) { | ||
| if (acceptedLakePredicates.contains(lakePredicates.get(i)) | ||
| && !acceptedFilters.contains(convertedFilters.get(i))) { | ||
| acceptedFilters.add(convertedFilters.get(i)); | ||
| } | ||
| } |
Contributor
|
LGTM! |
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: close #3168
Allow
FlinkTableSourceto push filters intoLakeSourcefor non-partitioned table scans. Before this change, lake filter pushdown was nested underisPartitioned(), so non-partitioned scans in lake-backedFULLreads always fell back to Flink-side filtering for historical data.Brief change log
pushdownLakeFilters(...)updatesacceptedFiltersbut intentionally does not rewriteremainingFiltersFlinkUnionReadLogTableITCase#testReadLogTableFullType(boolean isPartitioned)in both Iceberg and Paimon modulesTests
./mvnw -pl fluss-flink/fluss-flink-common -DskipITs test./mvnw -pl fluss-flink/fluss-flink-common spotless:check -Dspotless.check.skip=falseFlinkUnionReadLogTableITCase#testReadLogTableFullTyperuns withisPartitioned = falseandtrue; the partitioned branch additionally asserts partition filter pushdown in the planAPI and Format
No API or storage format changes.
Documentation
No documentation changes.