Thank you for your reporting.

I created a ticket in JIRA. You can track this problem in this link: 
https://issues.apache.org/jira/browse/FLINK-27449 
<https://issues.apache.org/jira/browse/FLINK-27449>.



> On 22 Apr 2022, at 10:44 AM, 草莓 <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'
> )
> 
> 

Reply via email to