-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-463: Improve TZ support for JDBC driver #464
base: main
Are you sure you want to change the base?
Conversation
@@ -58,6 +71,7 @@ public ArrowFlightJdbcTimeStampVectorAccessor( | |||
this.holder = new Holder(); | |||
this.getter = createGetter(vector); | |||
|
|||
this.isZoned = getVectorIsZoned(vector); | |||
this.timeZone = getTimeZoneForVector(vector); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit strange that both the timeZone and isZoned field exist and would be good to clarify why/how they are used and are different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, originally I thought about setting tz to null if not available but there's some expectations about timeZone
not being null and having some default value in a few places where it felt like untangling would make this too big. I'll add some comments.
@@ -120,7 +120,12 @@ public static int getSqlTypeIdFromArrowType(ArrowType arrowType) { | |||
case Time: | |||
return Types.TIME; | |||
case Timestamp: | |||
return Types.TIMESTAMP; | |||
String tz = ((ArrowType.Timestamp) arrowType).getTimezone(); | |||
if (tz != null){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense.
Starting a draft PR to address #463. Looking for feedback here, and we can either merge individual pieces or the whole thing at once.