Flink: Support aggregate push down for Iceberg table source in batch - #17946
Open
Guosmilesmile wants to merge 1 commit into
Open
Flink: Support aggregate push down for Iceberg table source in batch#17946Guosmilesmile wants to merge 1 commit into
Guosmilesmile wants to merge 1 commit into
Conversation
Guosmilesmile
force-pushed
the
flink_agg_pushdown
branch
2 times, most recently
from
September 4, 2026 14:26
8d7d496 to
0cf326f
Compare
Guosmilesmile
force-pushed
the
flink_agg_pushdown
branch
from
September 4, 2026 14:47
0cf326f to
2c67c2b
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.
Summary
Adds aggregate push down to the Flink Iceberg source (
IcebergTableSource). For batch queries that aggregate the whole table withoutGROUP BYorLIMIT,COUNT(*),COUNT(col),MAX(col)andMIN(col)can now be answered from file-level metrics alone, without reading any data files.The feature is opt-in and disabled by default via a new Flink configuration:
Supported scenarios
GROUP BYorLIMIT.COUNT(*),COUNT(col),MAX(col),MIN(col).When push down is skipped (falls back to a regular scan)
GROUP BYorLIMITpresent.TRUEresidual).MIN/MAX, or truncated bounds on string/binary columns).Alignment with Spark
Spark already supports aggregate push down via
spark.sql.iceberg.aggregate-push-down.enabled. This change mirrors that design:AggregatePushDownUtil.metricsModeSupportsAggregatePushDown), now used by both Spark 4.1 and Flink to avoid duplicated logic.AggregateEvaluator.update) follows the same pattern as Spark'spushAggregation.