davidradl commented on code in PR #27222:
URL: https://github.com/apache/flink/pull/27222#discussion_r2513554980
##########
flink-table/flink-sql-parser/src/main/java/org/apache/flink/sql/parser/ddl/SqlCreateMaterializedTable.java:
##########
@@ -150,20 +170,33 @@ public SqlNode getAsQuery() {
return asQuery;
}
+ /** Returns the column constraints plus the table constraints. */
+ public List<SqlTableConstraint> getFullConstraints() {
+ return SqlConstraintValidator.getFullConstraints(tableConstraints,
columnList);
+ }
+
+ @Override
+ public void validate() throws SqlValidateException {
+ if (!isSchemaWithColumnsIdentifiersOnly()) {
+
SqlConstraintValidator.validateAndChangeColumnNullability(tableConstraints,
columnList);
+ }
+ }
+
+ public boolean isSchemaWithColumnsIdentifiersOnly() {
+ // CREATE MATERIALIZED TABLE supports passing only column identifiers
in the column list. If
+ // the first column in the list is an identifier, then we assume the
rest of the
Review Comment:
As this as called from validate, would it make sense to validate that all
the columns are identifiers rather than assume?
--
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]