twalthr commented on a change in pull request #17624:
URL: https://github.com/apache/flink/pull/17624#discussion_r740854369
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/CatalogManager.java
##########
@@ -874,7 +876,24 @@ public ResolvedCatalogTable
resolveCatalogTable(CatalogTable table) {
if (table instanceof ResolvedCatalogTable) {
return (ResolvedCatalogTable) table;
}
+
final ResolvedSchema resolvedSchema =
table.getUnresolvedSchema().resolve(schemaResolver);
+
+ final List<String> physicalColumns =
+ DataType.getFieldNames(resolvedSchema.toPhysicalRowDataType());
Review comment:
This check is about semantics. It should not be allowed to define
partition columns on metadata column. This would mess up the handling in the
sources. This behavior is similar to primary keys which are also only supported
on physical columns.
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/CatalogManager.java
##########
@@ -874,7 +876,24 @@ public ResolvedCatalogTable
resolveCatalogTable(CatalogTable table) {
if (table instanceof ResolvedCatalogTable) {
return (ResolvedCatalogTable) table;
}
+
final ResolvedSchema resolvedSchema =
table.getUnresolvedSchema().resolve(schemaResolver);
+
+ final List<String> physicalColumns =
+ DataType.getFieldNames(resolvedSchema.toPhysicalRowDataType());
Review comment:
This check is about semantics. It should not be allowed to define
partition columns on metadata columns or computed columns. This would mess up
the handling in the sources. This behavior is similar to primary keys which are
also only supported on physical columns.
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/CatalogManager.java
##########
@@ -874,7 +876,24 @@ public ResolvedCatalogTable
resolveCatalogTable(CatalogTable table) {
if (table instanceof ResolvedCatalogTable) {
return (ResolvedCatalogTable) table;
}
+
final ResolvedSchema resolvedSchema =
table.getUnresolvedSchema().resolve(schemaResolver);
+
+ final List<String> physicalColumns =
+ DataType.getFieldNames(resolvedSchema.toPhysicalRowDataType());
Review comment:
I hope I could address your feedback by accessing the schema columns
directly.
--
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]