fsk119 commented on code in PR #21592:
URL: https://github.com/apache/flink/pull/21592#discussion_r1061102346


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/expressions/ColumnReferenceFinder.java:
##########
@@ -81,7 +82,11 @@ public static Set<String> findReferencedColumn(String 
columnName, ResolvedSchema
     public static Set<String> findWatermarkReferencedColumn(ResolvedSchema 
schema) {
         ColumnReferenceVisitor visitor = new 
ColumnReferenceVisitor(schema.getColumnNames());
         return schema.getWatermarkSpecs().stream()
-                .flatMap(spec -> 
visitor.visit(spec.getWatermarkExpression()).stream())
+                .flatMap(
+                        spec ->
+                                Stream.concat(
+                                        
visitor.visit(spec.getWatermarkExpression()).stream(),
+                                        Stream.of(spec.getRowtimeAttribute())))

Review Comment:
   For example, you can specify `WATERMARK FOR rowtime AS col - INTERVAL 5 
SECOND`. I add a case in the `ColumnReferencesFinderTest`.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to