You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "wuchong (via GitHub)" <gi...@apache.org> on 2023/03/11 15:29:56 UTC

[GitHub] [flink] wuchong commented on a diff in pull request #21521: [FLINK-30435][table] `SHOW CREATE TABLE` statement shows column comment

wuchong commented on code in PR #21521:
URL: https://github.com/apache/flink/pull/21521#discussion_r1133107037


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/ShowCreateUtil.java:
##########
@@ -82,7 +82,11 @@ static String getColumnString(Column column) {
                                 sb.append(e);
                             });
         }
-        // TODO: Print the column comment until FLINK-18958 is fixed
+        Optional<String> comment = column.getComment();
+        if (comment.isPresent()) {
+            sb.append(" ");
+            sb.append(String.format("comment '%s'", comment.get()));

Review Comment:
   Please use the upper-case of "comment" and the comment string should be escaped for `'` character (please add tests for it). 



-- 
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-unsubscribe@flink.apache.org

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