lidavidm commented on code in PR #37088:
URL: https://github.com/apache/arrow/pull/37088#discussion_r1290558064
##########
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:
I ran into the same issue: https://github.com/apache/arrow/issues/35916
So agreed, we need more info than what JdbcFieldInfo has. (ADBC's Java
adapter already has a workaround to add the extra fields.) And yeah, I think
trying to get OffsetDateTime or similar would be better.
That's part of why I want to vendor this into the ADBC driver, iterate on it
+ test it against actual databases, and then maybe send the changes back...
--
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]