[ https://issues.apache.org/jira/browse/FLINK-14296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16947578#comment-16947578 ]
Jark Wu commented on FLINK-14296: --------------------------------- Hi [~wind_ljy], could you update the PR according to the discussion above? I assigned this issue to you. Besides, I noticed that you are using {{Optional<SqlCharStringLiteral>}} for comment, however, the community recommend not use Optional as class field [1]. You can use @Nullable annotation to indicate it is a nullable field. For the {{getComment()}}, we should update the return type to {{Optional<SqlCharStringLiteral>}}. [1]: https://flink.apache.org/contributing/code-style-and-quality-java.html#java-optional > SqlNodes in the parser module should use an Optional for optional parameters > ---------------------------------------------------------------------------- > > Key: FLINK-14296 > URL: https://issues.apache.org/jira/browse/FLINK-14296 > Project: Flink > Issue Type: Improvement > Components: Table SQL / API > Reporter: Dawid Wysakowicz > Priority: Major > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > > I want to suggest using Optional for optional parameters in classes such as > SqlCreateTable/SqlCreateView/SqlTableColumn etc. > Right now we must check against null at different locations e.g.: > {code} > SqlNodeList partitionKey = sqlCreateTable.getPartitionKeyList(); > if (partitionKey != null) { > partitionKeys = partitionKey > .getList() > .stream() > .map(p -> ((SqlIdentifier) p).getSimple()) > .collect(Collectors.toList()); > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)