-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flink: Prevent setting endTag/endSnapshotId for streaming source #10207
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9b906aa
Flink: Prevent setting endTag/endSnapshotId for streaming source
c2815f6
More concrete error message test
6d03fa6
Skip validation for ScanContexts created by the monitor functions, an…
e247e82
Validate only at source creation
789191a
Fixed validation for FlinkSource too, and added tests for bounded sou…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Skip validation for ScanContexts created by the monitor functions, an…
…d add timeout to the previously failing test
- Loading branch information
There are no files selected for viewing
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this only for the endSnapshotId? if yes, should we remove the validation on endSnapshotId?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
TestStreamScanSql
was stuck because we setsnapshotId
too.So this is for
snapshotId
and forendSnapshotId
.On the philosophical level, the question is:
ScanContext
is always valid?If yes, then we change the
copyWithAppendsBetween
and thecopyWithSnapshotId
to remove thestreaming
flag, as those are not a streaming scans anymore.If no, then we accept that the programmatically creates
ScanContext
objects don't need validation.I opted for the first solution as I'm not sure where we depend on the streaming settings, and it was the least disruptive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is also not correct, because
copy
should meantcopy
. The main problem is thatScanContext
is used for both user intention (via source builder) and internal incremental scan. I agree that internal incremental scan shouldn't have the streaming setting.note that
ScanContext
is not a public class. Users can't construct this object directly. Maybe thevalidate()
method shouldn't be called by the constructor and only be called by theScanContext#Builder#build()
method? or move some more intrinsic validation toIcebergSource
builder?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went with your suggestion, and removed the generic validation, and called the validation explicitly from the source.