raminqaf commented on code in PR #29968:
URL: https://github.com/apache/flink/pull/29968#discussion_r4597283499
##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/materializedtable/MaterializedTableOperationFactory.java:
##########
@@ -150,12 +150,16 @@ private Operation handleConvert(
"Regular table does not support create or alter
operation.");
}
- final CatalogMaterializedTable newMaterializedTable =
- newTableBuilder(declaration, declaration.getMergedSchema())
- .refreshStatus(RefreshStatus.INITIALIZING)
- .build();
+ if (!oldBaseTable.getPartitionKeys().isEmpty()
+ &&
!oldBaseTable.getPartitionKeys().equals(declaration.getPartitionKeys())) {
+ throw new ValidationException(
+ String.format(
+ "The table %s is partitioned, so the conversion
statement must declare its partition keys in the same order: PARTITIONED BY
(%s).",
Review Comment:
```suggestion
"The table '%s' is partitioned, so the
conversion statement must declare its partition keys in the same order:
PARTITIONED BY (%s).",
```
--
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]