KurtYoung commented on a change in pull request #8339: [FLINK-12240][hive] 
Support view related operations in GenericHiveMetastoreCatalog
URL: https://github.com/apache/flink/pull/8339#discussion_r281483556
 
 

 ##########
 File path: 
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/util/GenericHiveMetastoreCatalogUtil.java
 ##########
 @@ -118,18 +123,26 @@ public static Table createHiveTable(ObjectPath 
tablePath, CatalogBaseTable table
                                hiveTable.setPartitionKeys(new ArrayList<>());
                        }
 
-                       hiveTable.setSd(sd);
+                       hiveTable.setTableType(TableType.EXTERNAL_TABLE.name());
                } else {
 
 Review comment:
   I would suggest to write `else if (table instanceof CatalogView) {` here, 
and throw an exception in another `else`, to avoid we further add some more 
table type and the condition will be mis-matched here.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to