Repository navigation
GH-1539: Read and bind TIME values at full precision as wall-clock time in Flight SQL JDBC - #52
Merged
xxlaykxx merged 1 commit intoDec 3, 2026
Conversation
…ock time in Flight SQL JDBC (apache#50) * apacheGH-1539: Read and bind TIME values at full precision as wall-clock time Read TIME columns in the Flight SQL JDBC driver as wall-clock time with the full fraction of the column unit, instead of truncating to milliseconds and shifting by the client JVM timezone. Accept LocalTime as a parameter and convert bound TIME values to the unit of the parameter vector. Closes apache#1539. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> (cherry picked from commit 185b595) * Address review feedback - Format the fraction of ArrowFlightJdbcTime with Locale.ROOT so that it does not depend on the JVM default locale - Add a regression test with an ar-EG default locale Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> (cherry picked from commit 2c3f97e) * Address review feedback Reject ArrowFlightJdbcTime values whose milliseconds and nanoseconds disagree, and cover the calendar conversion of getTime in a non-UTC default time zone. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> (cherry picked from commit e72b4de) --------- Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com> (cherry picked from commit f10dea1)
lriggs
approved these changes
Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's Changed
Cherry-pick of #50 (backport of apache#1541, the fix for apache#1539) onto
dremio_27.0_23_19. The upstream PR is still open, not merged. The pick applied without conflicts and includes the review fixes made upstream so far.TIMEcolumns read through the Flight SQL JDBC driver were truncated to milliseconds and shifted by the client JVM timezone, andTIMEparameters could not be bound correctly. With the client inEurope/Berlin,12:34:56.123456from aTime(MICROSECOND, 64)column was returned as13:34:56.123.All changes are in
flight/flight-sql-jdbc-core:ArrowFlightJdbcTimeVectorAccessorbuilds aLocalTimefrom the raw vector value.getTime,getObjectandgetStringreturn wall-clock time in any JVM default timezone, with the full fraction ingetString.getObject(i, LocalTime.class)keeps the fraction and returnsnullon a NULL row instead of throwingNullPointerException.ArrowFlightJdbcTimecarries the nanosecond fraction and prints 3, 6 or 9 fractional digits, independent of the default locale. Its(milliseconds, nanos)constructor rejects values whose millisecond parts disagree.TimeAvaticaParameterConverteracceptsLocalTimeand converts the value to the unit of the parameter vector.Behaviour change
getTimewith no calendar now returns wall-clock time, so code that compensates for the old timezone shift will see a different value. See the upstream PR for the full list of behaviour notes.Testing
mvn -pl flight/flight-sql-jdbc-core -am verify): 1221 tests, 0 failures, 3 errors. The 3 errors are TLS connection tests that needtesting/data/flight/cert0.pem; thetestingsubmodule was not checked out locally. The style and static checks pass.🤖 Generated with Claude Code