diqiu50 commented on code in PR #11189:
URL: https://github.com/apache/gravitino/pull/11189#discussion_r3302523332
##########
flink-connector/flink-common/src/main/java/org/apache/gravitino/flink/connector/hive/GravitinoHiveCatalog.java:
##########
@@ -145,20 +157,31 @@ public CatalogBaseTable getTable(ObjectPath tablePath)
catalog()
.asTableCatalog()
.loadTable(NameIdentifier.of(tablePath.getDatabaseName(),
tablePath.getObjectName()));
+ if
(HIVE_VIRTUAL_VIEW_TYPE.equalsIgnoreCase(table.properties().get(HIVE_TABLE_TYPE_KEY)))
{
+ // Hive HMS stores VIRTUAL_VIEW entries as table entries also returned
by loadTable.
+ return loadViewOrThrow(tablePath);
Review Comment:
loadTable does not retunre views, so the check is redundant.
##########
flink-connector/flink-common/src/main/java/org/apache/gravitino/flink/connector/hive/GravitinoHiveCatalog.java:
##########
@@ -145,20 +157,31 @@ public CatalogBaseTable getTable(ObjectPath tablePath)
catalog()
.asTableCatalog()
.loadTable(NameIdentifier.of(tablePath.getDatabaseName(),
tablePath.getObjectName()));
+ if
(HIVE_VIRTUAL_VIEW_TYPE.equalsIgnoreCase(table.properties().get(HIVE_TABLE_TYPE_KEY)))
{
+ // Hive HMS stores VIRTUAL_VIEW entries as table entries also returned
by loadTable.
+ return loadViewOrThrow(tablePath);
Review Comment:
loadTable does not return views, so the check is redundant.
--
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]