You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by 草莓 <w7...@163.com> on 2022/04/21 09:07:59 UTC

flink添加表的comment信息无效




Java代码如下:
@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.printSchema();
}
Flink 版本:1.14.0
运行结果:
(
  `user_name` STRING
)


理论上,结果不应该是:
(
  `user_name ` STRING COMMENT 'this is a comment’
)
这样的吗,请问为什么丢失了comment信息