[Docs][Core] Add Javadoc to MultiTableSink#10639
Open
zooo-code wants to merge 1 commit intoapache:devfrom
Open
[Docs][Core] Add Javadoc to MultiTableSink#10639zooo-code wants to merge 1 commit intoapache:devfrom
zooo-code wants to merge 1 commit intoapache:devfrom
Conversation
dybyte
reviewed
Mar 25, 2026
Comment on lines
240
to
253
| public List<TablePath> getSinkTables() { | ||
|
|
||
| List<TablePath> tablePaths = new ArrayList<>(); | ||
| List<SeaTunnelSink> values = new ArrayList<>(sinks.values()); | ||
| for (int i = 0; i < values.size(); i++) { | ||
| if (values.get(i).getWriteCatalogTable().isPresent()) { | ||
| tablePaths.add( | ||
| ((CatalogTable) values.get(i).getWriteCatalogTable().get()).getTablePath()); | ||
| } else { | ||
| tablePaths.add(sinks.keySet().toArray(new TablePath[0])[i]); | ||
| } | ||
| } | ||
| return tablePaths; | ||
| } |
Contributor
There was a problem hiding this comment.
As a small improvement, it might be better to iterate over entrySet() instead of relying on index alignment.
This could be addressed in a follow-up PR if you’re interested.
Contributor
Author
There was a problem hiding this comment.
Thanks for the suggestion! @dybyte
Since this PR is scoped to Javadoc-only changes, I'll keep the existing code as-is.
Would it be okay if I open a new issue and submit a follow-up PR for this improvement?
Contributor
There was a problem hiding this comment.
I've created issue #10658 .
If you'd like to work on it, please leave a comment and I can assign it to you.
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 of this pull request
Add method-level Javadoc to
MultiTableSink.javaas described in #10536 (sub-issue of #10533)This class had 207 lines and zero method-level Javadoc. Added Javadoc to the class level and 8 key methods:
createWriter()— index formula and writer distributionrestoreWriter()— checkpoint state matching via SinkIdentifiercreateCommitter()— per-table committer aggregationcreateAggregatedCommitter()— per-table aggregated committer aggregationgetSinkTables()— fallback logic for table path resolutiongetWriteCatalogTable()— always empty in multi-table contextsupports()— schema evolution delegation to first sub-sinkCloses #10536
Does this PR introduce any user-facing change?
How was this patch tested?
./mvnw spotless:apply— formatting verified./mvnw -q -DskipTests verify— build verifiedCheck list
New License Guide
incompatible-changes.mdto describe the incompatibility caused by this PR.