Skip to content

Commit b0b7873

Browse files
committed
remove unneeded code
1 parent 1585e9b commit b0b7873

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

pyiceberg/catalog/hive.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,10 @@ def _init_thrift_transport(self) -> TTransport:
188188

189189
def _client(self) -> Client:
190190
protocol = TBinaryProtocol.TBinaryProtocol(self._transport)
191-
client: Client = self.hms_v4.Client(protocol)
192-
if self._hive_version and self._hive_version < 4:
191+
if self._hive_version < 4:
193192
client: Client = self.hms_v3.Client(protocol)
193+
else:
194+
client: Client = self.hms_v4.Client(protocol)
194195
if self._ugi:
195196
client.set_ugi(*self._ugi)
196197
return client
@@ -348,12 +349,6 @@ def _create_hive_client(properties: Dict[str, str]) -> _HiveClient:
348349
else:
349350
raise ValueError(f"Unable to connect to hive using uri: {properties[URI]}")
350351

351-
def _update_imported_metastore_modules(self, properties) -> None:
352-
breakpoint()
353-
v3 = importlib.import_module('hive_metastore.v3.ThriftHiveMetastore')
354-
Client = v3.Client
355-
self._client = self._create_hive_client(properties)
356-
357352
def _convert_hive_into_iceberg(self, table: HiveTable) -> Table:
358353
properties: Dict[str, str] = table.parameters
359354
if TABLE_TYPE not in properties:

0 commit comments

Comments
 (0)