jiwen624 commented on code in PR #19099:
URL: https://github.com/apache/iceberg/pull/19099#discussion_r4712051787
##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/source/enumerator/ContinuousSplitPlannerImpl.java:
##########
@@ -220,13 +221,23 @@ private ContinuousEnumerationResult
discoverInitialSplits() {
*/
@VisibleForTesting
static Optional<Snapshot> startSnapshot(Table table, ScanContext
scanContext) {
+ String branch = scanContext.branch();
+ if (branch != null
+ && !SnapshotRef.MAIN_BRANCH.equals(branch)
+ && table.snapshot(branch) == null) {
+ branch = null;
Review Comment:
Thanks for the review @timothyw553! This is pre-existing behavior on main as
mentioned in the PR desc, and throwing would break a case that works today: on
an empty table, a stream started before the branch exists just waits and picks
the branch up once it's created. I also tried making it wait when main already
has data, but then TABLE_SCAN_THEN_INCREMENTAL skips its initial scan once the
branch shows up. I'll open a follow-up issue for the missing-branch case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]