slinkydeveloper commented on a change in pull request #17624:
URL: https://github.com/apache/flink/pull/17624#discussion_r740795671
##########
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:
Just `ResolvedSchema#getColumnNames` more than
`toPhysicalRowDataType()`? You don't need to build a data type to destructure
it in the same statement. We also don't need to filter out metadata columns,
because we can't really have columns with duplicate names where one of them is
a partition column (because partition columns are matched all around the code
with names, including `table.getPartitionKeys()` itself.
--
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]