wuchong commented on a change in pull request #10098: 
[FLINK-14326][FLINK-14324][table] Support to apply watermark assigner in planner
URL: https://github.com/apache/flink/pull/10098#discussion_r343511776
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/sources/TableSourceUtil.scala
 ##########
 @@ -173,16 +174,30 @@ object TableSourceUtil {
         fieldTypes = fieldTypes.patch(idx, Seq(proctimeType), 1)
       }
     }
-    val (selectedFieldNames, selectedFieldTypes) =
+    var (selectedFieldNames, selectedFieldTypes) =
       if (selectedFields.isDefined) {
         // filter field names and types by selected fields
-        (
-          selectedFields.get.map(fieldNames(_)),
-          selectedFields.get.map(fieldTypes(_))
-        )
+        (selectedFields.get.map(fieldNames(_)), 
selectedFields.get.map(fieldTypes(_)))
       } else {
         (fieldNames, fieldTypes)
       }
+
+    // patch rowtime field according to WatermarkSpec
+    if (streaming && watermarkSpec.isDefined) {
+      // TODO: [FLINK-14473] we only support top-level rowtime attribute right 
now
 
 Review comment:
   This is the earliest place to throw this exception, otherwise, we should 
throw exception in `TableSchema`.  

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to