mchades commented on code in PR #10998:
URL: https://github.com/apache/gravitino/pull/10998#discussion_r3245414989
##########
catalogs/hive-metastore-common/src/main/java/org/apache/gravitino/hive/converter/HiveTableConverter.java:
##########
@@ -106,6 +108,14 @@ private static Map<String, String> buildTableProperties(
Optional.ofNullable(table.getTableType()).ifPresent(t ->
properties.put(TABLE_TYPE, t));
+ // VIRTUAL_VIEW tables may have a minimal or absent StorageDescriptor —
skip SD fields.
+ if (TableType.VIRTUAL_VIEW.name().equalsIgnoreCase(table.getTableType())) {
+ // Remove the HMS-internal "tableType" key added by Gravitino; the
canonical TABLE_TYPE
+ // property (key "table-type") is set above via table.getTableType().
+ properties.remove("tableType");
+ return properties;
+ }
Review Comment:
Addressed. fromHiveTable helper path is now null-safe for absent
StorageDescriptor: getDistribution/getSortOrders/getColumns all guard against
null sd/cols.
--
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]