Fokko commented on code in PR #5447:
URL: https://github.com/apache/iceberg/pull/5447#discussion_r940160023


##########
python/pyiceberg/catalog/hive.py:
##########
@@ -197,17 +234,41 @@ def __init__(self, name: str, properties: Properties, 
uri: str):
         super().__init__(name, properties)
         self._client = _HiveClient(uri)
 
-    def _convert_hive_into_iceberg(self, table: HiveTable) -> Table:
-        # Requires reading the manifest, will implement this in another PR
-        # Check the table type
-        return Table(identifier=(table.dbName, table.tableName))
+    def _convert_hive_into_iceberg(self, table: HiveTable, metadata_location: 
Optional[str] = None) -> Table:
+        properties: Dict[str, str] = table.parameters
+        if TABLE_TYPE not in properties or properties[TABLE_TYPE] != ICEBERG:
+            raise NoSuchTableError(f"Table is not an Iceberg table: 
{table.dbName}.{table.tableName}")

Review Comment:
   Sure thing. I've also split the exception into two parts; when the property 
`table_type` is missing, and when it is not equal to `iceberg`.



-- 
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]

Reply via email to