davidradl commented on code in PR #27199:
URL: https://github.com/apache/flink/pull/27199#discussion_r2498447217
##########
flink-table/flink-sql-parser/src/main/java/org/apache/flink/sql/parser/ddl/SqlCreateOrAlterMaterializedTable.java:
##########
@@ -77,23 +82,25 @@ public SqlCreateMaterializedTable(
SqlNodeList propertyList,
SqlIntervalLiteral freshness,
@Nullable SqlLiteral refreshMode,
- SqlNode asQuery) {
- super(OPERATOR, pos, false, false);
+ SqlNode asQuery,
+ boolean isOrAlter) {
+ super(isOrAlter ? CREATE_OR_ALTER_OPERATOR : CREATE_OPERATOR, pos,
false, false);
this.tableName = requireNonNull(tableName, "tableName should not be
null");
- this.tableConstraint = tableConstraint;
this.comment = comment;
+ this.tableConstraint = tableConstraint;
this.distribution = distribution;
this.partitionKeyList =
requireNonNull(partitionKeyList, "partitionKeyList should not
be null");
this.propertyList = requireNonNull(propertyList, "propertyList should
not be null");
this.freshness = requireNonNull(freshness, "freshness should not be
null");
this.refreshMode = refreshMode;
this.asQuery = requireNonNull(asQuery, "asQuery should not be null");
Review Comment:
If an `create or alter ` is an alter that just changes the refreshMode, or
freshness, why does the asQuery need to be supplied? Could we delay validating
this and only insist on asQuery being supplied if this really is a CREATE.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]