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


##########
python/pyiceberg/catalog/hive.py:
##########
@@ -159,16 +156,56 @@ def _construct_parameters(metadata_location: str, 
previous_metadata_location: Op
 def _annotate_namespace(database: HiveDatabase, properties: Properties) -> 
HiveDatabase:
     params = {}
     for key, value in properties.items():
-        if key == "comment":
+        if key == COMMENT:
             database.description = value
-        elif key == "location":
+        elif key == LOCATION:
             database.locationUri = value
         else:
             params[key] = value
     database.parameters = params
     return database
 
 
+hive_primitive_types = {
+    BooleanType: "boolean",
+    IntegerType: "int",
+    LongType: "bigint",
+    FloatType: "float",
+    DoubleType: "double",
+    DateType: "date",
+    TimeType: "string",
+    TimestampType: "timestamp",
+    StringType: "string",
+    UUIDType: "string",
+    BinaryType: "binary",
+    FixedType: "binary",
+}
+
+
+class HiveSchemaConstructor(SchemaVisitor[str]):

Review Comment:
   What about naming this `HiveSchemaConverter` or `SchemaToHiveConverter`? I 
think "converter" describes what is happening here more closely than 
"constructor" because the schema is based on an Iceberg schema.



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