cxzl25 commented on PR #4616: URL: https://github.com/apache/hive/pull/4616#issuecomment-1697377875
Now iceberg checks the table list of HMS and calls `getTableObjectsByName` But `viewOriginalText` and `viewExpandedText` are lazy loaded, so when `convertToTable` calls `getViewOriginalText` and `getViewExpandedText`, two SQL queries will be triggered. ### HMS org.apache.hadoop.hive.metastore.ObjectStore#getTableObjectsByName https://github.com/apache/hive/blob/26ed33a274df242228bda5313e72a14db0e7c9ae/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java#L2234-L2236 ``` <field name="viewOriginalText" default-fetch-group="false"> <column name="VIEW_ORIGINAL_TEXT" jdbc-type="LONGVARCHAR"/> </field> <field name="viewExpandedText" default-fetch-group="false"> <column name="VIEW_EXPANDED_TEXT" jdbc-type="LONGVARCHAR"/> </field> ``` ### iceberg org.apache.iceberg.hive.HiveCatalog#listTables ```java List<Table> tableObjects = clients.run(client -> client.getTableObjectsByName(database, tableNames)); ``` https://github.com/apache/iceberg/blob/2b6c84fb3df0a6e0ae052c69df3a0129f83c21b6/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java#L132-L133 -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
