ggangadharan commented on code in PR #5590:
URL: https://github.com/apache/hive/pull/5590#discussion_r1909042289
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/serde/objectinspector/IcebergTimestampObjectInspectorHive3.java:
##########
@@ -55,7 +56,13 @@ public Timestamp getPrimitiveJavaObject(Object o) {
if (o == null) {
return null;
}
- LocalDateTime time = (LocalDateTime) o;
+ LocalDateTime time;
+ if (o instanceof OffsetDateTime) {
+ OffsetDateTime odt = (OffsetDateTime) o;
+ time =
odt.atZoneSameInstant(TypeInfoFactory.timestampLocalTZTypeInfo.getTimeZone()).toLocalDateTime();
+ } else {
+ time = (LocalDateTime) o;
Review Comment:
@zratkai Thanks for taking a look into this.
Sure, I will make the necessary changes. Besides LocalDateTime and
OffsetDateTime, are there any other classes that might be expected here? Please
let me know so I can handle them appropriately.
--
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]