Conversation
Report explicit scan.parallelism through ParallelismProvider while retaining producer side parallelism assignment for older Flink versions Signed-off-by: Akash Reddy Jammula <akashreddyjammula@gmail.com>
Verify configured parallelism is exposed by the scan provider and applies only to the source while inferred and downstream parallelism behaviour remains unchanged Signed-off-by: Akash Reddy Jammula <akashreddyjammula@gmail.com>
Akash3121
force-pushed
the
fix/7905-flink-scan-parallelism
branch
from
September 14, 2026 05:15
cee9599 to
81670c8
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.
Purpose
Fixes the behavior reported in issue #7905.
Paimon currently applies
scan.parallelismdirectly to theDataStreamproduced byPaimonDataStreamScanProvider. However, on Flink 1.19 and later, the Table planner usesParallelismProvider#getParallelism()to distinguish connector-defined source parallelism from the parallelism of downstream operators.Because
PaimonDataStreamScanProviderdid not expose the configured parallelism through this contract, the source parallelism propagated through the forward chain. For example:This change reports the explicitly configured scan parallelism to the Flink planner so that it is scoped to the source operator.
Tests
Added and updated coverage to verify:
Validated with:
mvn -pl paimon-flink/paimon-flink-common -am -Pfast-build -Pflink1
-DwildcardSuites=none -DfailIfNoTests=false
-Dtest=DataTableSourceTest,ReadWriteTableITCase#testSourceParallelism+testInferParallelism test
mvn -pl paimon-flink/paimon-flink-common -am -Pfast-build -Pflink2
-DwildcardSuites=none -DfailIfNoTests=false
-Dtest=DataTableSourceTest,ReadWriteTableITCase#testSourceParallelism+testInferParallelism test
Also validated checked compilation for the Flink 1 and Flink 2 profiles and packaged the Flink 1.16, 1.17, and 1.18 adapters.
Extra info
####Changes
####Compatibility
Flink 1.19+ consumes ParallelismProvider#getParallelism() for table sources and can isolate the configured source parallelism from downstream operators.
Flink 1.16–1.18 do not consume this metadata for sources. The existing direct DataStream#setParallelism() behavior is intentionally retained as a compatibility fallback.
Only an explicitly configured scan.parallelism is reported to the planner. Inferred parallelism depends on the runtime StreamExecutionEnvironment and split discovery, which are unavailable when the planner queries the provider, so inference behavior remains unchanged.
Changelog
Notes for reviewers