You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Dawid Wysakowicz (Jira)" <ji...@apache.org> on 2019/09/30 13:05:00 UTC
[jira] [Created] (FLINK-14296) SqlNodes in the parser module should
use an Optional for optional parameters
Dawid Wysakowicz created FLINK-14296:
----------------------------------------
Summary: 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
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)