[ 
https://issues.apache.org/jira/browse/FLINK-22936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17385988#comment-17385988
 ] 

jinfeng commented on FLINK-22936:
---------------------------------

[~jark] [~twalthr]  The final solution is  add a  withComment method which will 
apply comment to the previous column  ?   And we need to add the setComment 
method to the Column class .     I can help implement this . 

> 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
>            Priority: Major
>             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)

Reply via email to