lidavidm commented on code in PR #37088:
URL: https://github.com/apache/arrow/pull/37088#discussion_r1288960693


##########
java/adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/JdbcToArrowUtils.java:
##########
@@ -188,12 +188,9 @@ public static ArrowType getArrowTypeFromJdbcType(final 
JdbcFieldInfo fieldInfo,
       case Types.TIME:
         return new ArrowType.Time(TimeUnit.MILLISECOND, 32);
       case Types.TIMESTAMP:
-        final String timezone;
-        if (calendar != null) {
-          timezone = calendar.getTimeZone().getID();
-        } else {
-          timezone = null;
-        }
+        return new ArrowType.Timestamp(TimeUnit.MILLISECOND);
+      case Types.TIMESTAMP_WITH_TIMEZONE:
+        final String timezone = calendar == null ? null : 
calendar.getTimeZone().getID();

Review Comment:
   In Arrow, the underlying representation for a timestamp with timezone is 
always UTC. So if the driver is giving us UTC and converting it, we should 
always bypass their conversion and construct a `timestamp[ms, UTC]`.
   
   And yes, if there's no timezone, then it's a wall-clock time.



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

Reply via email to