aiguofer commented on issue #732: URL: https://github.com/apache/arrow-java/issues/732#issuecomment-3387106048
So one of the interesting things I found while exploring this is that Avatica supports a `timezone` property: https://calcite.apache.org/avatica/docs/client_reference.html#timeZone We implicitly use it in some places due to the Avatica code base. For example, `ResultSet.getObject` calls the `AvaticaSite.get` which, for timestamps, passes in the `localCalendar`. I started PR https://github.com/apache/arrow-java/pull/878 to pass this in to the Timestamp vector accessor, and this could be a good place to finish solving this once and for all. One of the difficult things here is figuring out what exactly the desired `Calendar` is supposed to mean, especially taking into account both the `timezone` property for the driver and the default JVM option. - The description for `timezone` in Avatica isn't particularly helpful: `The timezone that will be used for dates and times`, but it does seem to imply that this setting is meant to just override the system default. My guess is this is supposed to mean the same as explicitly passing in a `calendar` into the method, and is the default when none is passed. This value is also sent back to the server, which the server could interpret in a variety of ways. - Intuitively, I would expect the calendar to mean: "return the values in this desired timezone", (convert the value into the desired calendar). - The JDBC spec for `getTimestamp` says `the given calendar to construct an appropriate millisecond value for the timestamp if the underlying database does not store timezone information`, which seems to imply it should only apply to timestamps without timezone. Additionally, it still doesn't specify if this means "convert timestamp value to the given calendar" or "assume the timestamp is in the given calendar" -- 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]
