kevinjqliu commented on code in PR #3924:
URL: https://github.com/apache/iceberg-python/pull/3924#discussion_r3976431354
##########
pyiceberg/catalog/hive.py:
##########
@@ -379,9 +382,21 @@ def _create_hive_table(self, open_client: Client,
hive_table: HiveTable) -> None
except AlreadyExistsException as e:
raise TableAlreadyExistsError(f"Table
{hive_table.dbName}.{hive_table.tableName} already exists") from e
+ def _fetch_hive_table(self, open_client: Client, database_name: str,
table_name: str) -> HiveTable:
+ # Hive 4.0.1 removed get_table, and Hive 2 does not have get_table_req
+ if self._hive2_compatible:
+ return open_client.get_table(dbname=database_name,
tbl_name=table_name)
+ return open_client.get_table_req(GetTableRequest(dbName=database_name,
tblName=table_name)).table
Review Comment:
was able to test with different versions of hive from 2 to 4, see #3927
--
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]