docete commented on a change in pull request #11493: 
[FLINK-16160][table-common] Support computed column, proctime and watermark in 
Schema descriptor
URL: https://github.com/apache/flink/pull/11493#discussion_r400634261
 
 

 ##########
 File path: 
flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/Schema.java
 ##########
 @@ -183,11 +250,26 @@ public Schema proctime() {
                return this;
        }
 
+       /**
+        * Specifies the computed column as a processing-time attribute.
+        *
+        * <p>E.g. proctime("pt")
+        */
+       public Schema proctime(String proctimeAttribute) {
+               addField(proctimeAttribute, "TIMESTAMP(3)", "PROCTIME()");
+               tableSchema.get(proctimeAttribute).put(SCHEMA_PROCTIME, "true");
 
 Review comment:
   The old `field(...).proctime()` api use this to identify a proctime field. 
We add this for back-compatibility. And we also use this property to 
deserialize/serialize TableSchema in DescriptorProperties. 

----------------------------------------------------------------
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