[ https://issues.apache.org/jira/browse/FLINK-22936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated FLINK-22936: ----------------------------------- Labels: pull-request-available (was: ) > Support column comment in Schema and ResolvedSchema > --------------------------------------------------- > > Key: FLINK-22936 > URL: https://issues.apache.org/jira/browse/FLINK-22936 > Project: Flink > Issue Type: New Feature > Components: Table SQL / API > Reporter: Jark Wu > Assignee: jinfeng > Priority: Major > Labels: pull-request-available > Fix For: 1.14.0 > > > In order to support column comment in catalog (FLINK-18958), we should first > support column comment in Schema and ResolvedSchema. > The API is up to discuss. Currently, we already have 10 methods for adding a > column in {{Schema}}. If we want to support column comment for each kind of > column, the number of column methods may double. It's not easy to maintain in > the long term, and make the API complex. > Another alternative is adding a new method {{comment(String)}} which will > apply comment to the previous column. This is not a good builder style, but > can make the building concise. > For example, > {code} > Schema.newBuilder() > .column("ts", DataTypes.TIMESTAMP(3)).comment("log > timestamp") > .columnByExpression("proctime", > "PROCTIME()").comment("processing time") > .watermark("ts", "ts - INTERVAL '5' SECOND") > .build() > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)