godfreyhe commented on a change in pull request #12335:
URL: https://github.com/apache/flink/pull/12335#discussion_r436334572



##########
File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java
##########
@@ -490,8 +490,11 @@ private void insertIntoInternal(UnresolvedIdentifier 
unresolvedIdentifier, Table
        private Optional<CatalogQueryOperation> 
scanInternal(UnresolvedIdentifier identifier) {
                ObjectIdentifier tableIdentifier = 
catalogManager.qualifyIdentifier(identifier);
 
-               return catalogManager.getTable(tableIdentifier)
-                       .map(t -> new CatalogQueryOperation(tableIdentifier, 
t.getTable().getSchema()));
+               return catalogManager.getTable(tableIdentifier).map(t -> {
+                       CatalogTableSchemaResolver resolver = new 
CatalogTableSchemaResolver(parser);

Review comment:
       Thanks for the suggestion. I'm also agree we move the resolution logic 
into `CatalogManager#getTable` as a unified place for Table API and SQL. 




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to