-
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
support source watermark for flink sql windows #12191
base: main
Are you sure you want to change the base?
Conversation
@@ -86,7 +86,7 @@ protected void dropDatabase(String database, boolean ifExists) { | |||
sql("DROP DATABASE %s %s", ifExists ? "IF EXISTS" : "", database); | |||
} | |||
|
|||
protected static String toWithClause(Map<String, String> props) { | |||
public static String toWithClause(Map<String, String> props) { |
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.
Why is this change? Did this become a utility method which is shared between tests? Can we find a better place for it then?
.isInstanceOf(NullPointerException.class) | ||
.hasMessage("watermark-column needs to be configured to use source watermark."); | ||
} finally { | ||
SqlHelpers.sql(getStreamingTableEnv(), "DROP TABLE IF EXISTS %s", flinkTable); |
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.
Why is this try finally? Can we just do a cleanup in an after method? That would make the tests easier to read
} | ||
|
||
@NotNull | ||
private static Map<String, String> getConnectorOptions() { |
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.
If we do the PRs in a different order (first merging the optionless part), could we get rid of this method?
Iceberg Source to support Source Watermark, so it can be used in Flink WINDOW functions. https://github.com/apache/flink/blob/release-1.18/flink-table/flink-table-common/src/main/java/org/apache/flink/table/connector/source/abilities/SupportsSourceWatermark.java enables Flink to rely on the watermark strategy provided by the ScanTableSource itself.
Reference:
#10219
#9346
Previous discussion in PR, #12116 . Split into separate PR for easy review.