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


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/TruncateTableOperation.java:
##########
@@ -54,10 +53,6 @@ public TableResultInternal execute(Context ctx) {
 
         CatalogManager catalogManager = ctx.getCatalogManager();
         ContextResolvedTable contextResolvedTable = 
catalogManager.getTableOrError(tableIdentifier);
-        CatalogBaseTable catalogBaseTable = contextResolvedTable.getTable();
-        if (catalogBaseTable.getTableKind() == 
CatalogBaseTable.TableKind.VIEW) {
-            throw new TableException("TRUNCATE TABLE statement is not 
supported for view.");
-        }

Review Comment:
   no, validation was moved to converter 
https://github.com/apache/flink/blob/82a273db40406c975510f274b0ff3991b476ac5c/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/operations/converters/SqlTruncateTableConverter.java#L44
   
   since it throws ValidationException



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