HonahX commented on code in PR #585:
URL: https://github.com/apache/iceberg-python/pull/585#discussion_r1554524560


##########
pyiceberg/catalog/hive.py:
##########
@@ -199,6 +184,7 @@ def _annotate_namespace(database: HiveDatabase, properties: 
Properties) -> HiveD
     DateType: "date",
     TimeType: "string",
     TimestampType: "timestamp",
+    TimestamptzType: "timestamp",

Review Comment:
   In Java, we map `TimestamptzType` to `"timestamp with local time zone"` for 
Hive version >= 3 `TimestamptzType`. 
   ```java
   case TIMESTAMP:
           Types.TimestampType timestampType = (Types.TimestampType) type;
           if (HiveVersion.min(HiveVersion.HIVE_3) && 
timestampType.shouldAdjustToUTC()) {
             return "timestamp with local time zone";
           }
           return "timestamp";
   ```
   But in python it seems we do not have a way to check the version. So I put 
the "timestamp" here to ensure compatibility. Please correct me if I am wrong 
here. Thanks!
   
   
   ref: 
https://github.com/apache/iceberg/blob/main/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveSchemaUtil.java#L143



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