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

 ##########
 File path: 
flink-table/flink-table-common/src/main/java/org/apache/flink/table/api/TableSchema.java
 ##########
 @@ -249,8 +243,16 @@ public DataType toRowDataType() {
        public String toString() {
                final StringBuilder sb = new StringBuilder();
                sb.append("root\n");
-               for (int i = 0; i < fieldNames.length; i++) {
-                       sb.append(" |-- ").append(fieldNames[i]).append(": 
").append(fieldDataTypes[i]).append('\n');
+               for (int i = 0; i < columns.size(); i++) {
+                       sb.append(" |-- ")
+                               .append(getFieldName(i).get())
+                               .append(": ");
+                       if (columns.get(i).isGenerated()) {
+                               sb.append(columns.get(i).getExpr().get());
 
 Review comment:
   I agree to add the type, because we indeed passed the data type in the 
`Builder`.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to