wuchong commented on a change in pull request #10096: [FLINK-14623][table-api] 
Add computed column information into TableSc…
URL: https://github.com/apache/flink/pull/10096#discussion_r343132333
 
 

 ##########
 File path: 
flink-table/flink-table-common/src/main/java/org/apache/flink/table/api/TableSchema.java
 ##########
 @@ -430,10 +535,10 @@ public Builder watermark(String rowtimeAttribute, String 
watermarkExpressionStri
                 * Returns a {@link TableSchema} instance.
                 */
                public TableSchema build() {
-                       return new TableSchema(
-                               fieldNames.toArray(new String[0]),
-                               fieldDataTypes.toArray(new DataType[0]),
-                               watermarkSpecs);
+                       
validateFields(this.columns.stream().map(TableColumn::getName).toArray(String[]::new),
 
 Review comment:
   +1

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