Skip to content
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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aiguofer
Copy link
Contributor

Starting a draft PR to address #463. Looking for feedback here, and we can either merge individual pieces or the whole thing at once.

@aiguofer aiguofer marked this pull request as draft December 24, 2024 00:56
@lidavidm lidavidm requested a review from jduo January 13, 2025 02:02
@@ -58,6 +71,7 @@ public ArrowFlightJdbcTimeStampVectorAccessor(
this.holder = new Holder();
this.getter = createGetter(vector);

this.isZoned = getVectorIsZoned(vector);
this.timeZone = getTimeZoneForVector(vector);
Copy link
Member

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.

Copy link
Contributor Author

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){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants