wuchong commented on a change in pull request #9843: [FLINK-14296] [Table SQL] 
Use Optional for optional parameters in parser module
URL: https://github.com/apache/flink/pull/9843#discussion_r335296059
 
 

 ##########
 File path: 
flink-table/flink-sql-parser/src/main/java/org/apache/flink/sql/parser/ddl/SqlCreateTable.java
 ##########
 @@ -76,11 +80,11 @@ public SqlCreateTable(
                        SqlCharStringLiteral comment) {
                super(OPERATOR, pos, false, false);
                this.tableName = requireNonNull(tableName, "Table name is 
missing");
-               this.columnList = requireNonNull(columnList, "Column list 
should not be null");
-               this.primaryKeyList = primaryKeyList;
-               this.uniqueKeysList = uniqueKeysList;
-               this.propertyList = propertyList;
-               this.partitionKeyList = partitionKeyList;
+               this.columnList = requireNonNull(columnList, "ColumnList should 
not be null");
+               this.primaryKeyList = requireNonNull(primaryKeyList, 
"PrimayKeyList should not be null");
 
 Review comment:
   If you want to refer a field name, just use the field name withouth 
uppercase, i.e. `columnList`, `primaryKeyList`. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to