snuyanzin commented on code in PR #28287:
URL: https://github.com/apache/flink/pull/28287#discussion_r3396376713


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/operations/converters/materializedtable/SqlCreateOrAlterMaterializedTableConverter.java:
##########
@@ -117,6 +126,84 @@ private Operation handleAlter(
                 currentTable -> buildNewTable(currentTable, mergeContext, 
schemaResolver));
     }
 
+    private Operation handleConvert(
+            final SqlCreateOrAlterMaterializedTable 
sqlCreateOrAlterMaterializedTable,
+            final ConvertContext context,
+            final ObjectIdentifier identifier,
+            final ResolvedCatalogTable oldBaseTable) {
+        final boolean conversionEnabled =
+                context.getTableConfig()
+                        .getRootConfiguration()
+                        
.get(TableConfigOptions.MATERIALIZED_TABLE_CONVERSION_FROM_TABLE_ENABLED);
+        if (!conversionEnabled) {
+            throw new ValidationException(
+                    String.format(
+                            "Table %s is not a materialized table. Only 
materialized table support create or alter operation.",
+                            identifier.asSummaryString()));
+        }

Review Comment:
   I can 100% tell that here it is always not a `MATERIALIZED TABLE` because 
this method is invoked only for `TableKind.TABLE` 



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