twalthr commented on code in PR #27222:
URL: https://github.com/apache/flink/pull/27222#discussion_r2517916565


##########
flink-table/flink-sql-parser/src/main/java/org/apache/flink/sql/parser/ddl/SqlCreateMaterializedTable.java:
##########
@@ -142,28 +161,41 @@ public SqlIntervalLiteral getFreshness() {
     }
 
     @Nullable
-    public SqlLiteral getRefreshMode() {
+    public SqlRefreshMode getRefreshMode() {
         return refreshMode;
     }
 
     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()) {

Review Comment:
   Is this copied from regular tables?



##########
docs/content/docs/dev/table/materialized-table/statements.md:
##########
@@ -268,10 +287,24 @@ CREATE MATERIALIZED TABLE my_materialized_table_full
     GROUP BY
         p.ds, p.product_id, p.product_name
 ```
+And same materialized table with explicitly specified columns 
+
+```sql
+CREATE MATERIALIZED TABLE my_materialized_table_full (
+    ds, product_id, product_name, avg_sale_price, total_quantity)

Review Comment:
   include a data type here? I think specifying both the name and data type is 
a very common task.



-- 
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]

Reply via email to