I tried this and found that the comment information will be lost forever when using "fromDataStream". I think you can create a issue to report this bug.
At 2022-04-22 10:44:47, "草莓" <w757227...@163.com> wrote: The following is the Java code @Test public void test(){ StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); StreamTableEnvironment tableEnv = StreamTableEnvironment.create(env); DataStream<String> dataStream = env.fromElements("Alice", "Bob", "John"); Schema.Builder builder = Schema.newBuilder(); builder.column("f0",DataTypes.of(String.class)).withComment("this is a comment"); Table table = tableEnv.fromDataStream(dataStream, builder.build()).as("user_name"); table.getResolvedSchema(); table.printSchema(); } Its output is: ( `user_name` STRING ) My question is, if the comment is lost, what should I do to display the comment information? What I need is that the result is ( `user_name` STRING COMMENT 'this is a comment' )