Skip to content

GH-477: Fix Flight JDBC DATE(MILLISECOND) parameter binding - #40

Open
g-zemlianyi wants to merge 1 commit into
dremio:dremio_27.0_23_19from
g-zemlianyi:GH-477-date-milli-dremio_27.0_23_19
Open

g-zemlianyi wants to merge 1 commit into
dremio:dremio_27.0_23_19from
g-zemlianyi:GH-477-date-milli-dremio_27.0_23_19

Conversation

@g-zemlianyi

@g-zemlianyi g-zemlianyi commented Oct 29, 2026 •

Copy link
Copy Markdown

What's Changed

This fixes Flight JDBC prepared statement binding for Arrow DATE(MILLISECOND) parameters.

Avatica represents JDBC DATE values as days since the Unix epoch. The Flight JDBC parameter binder already writes that value correctly for DateDayVector, but it was also writing the same day value directly into DateMilliVector, which expects milliseconds since the Unix epoch.

This now converts epoch days to epoch milliseconds before writing to DateMilliVector.

Tested with ArrowFlightPreparedStatementTest.

Closes #477.

…ache#1219)

## What's Changed

This fixes Flight JDBC prepared statement binding for Arrow
`DATE(MILLISECOND)` parameters.

Avatica represents JDBC `DATE` values as days since the Unix
epoch.  The Flight JDBC parameter binder already writes that
value correctly for `DateDayVector`, but it was also writing
the same day value directly into `DateMilliVector`, which
expects milliseconds since the Unix epoch.

This now converts epoch days to epoch milliseconds before
writing to `DateMilliVector`.

Tested with `ArrowFlightPreparedStatementTest`.

Closes apache#477.

(cherry picked from commit ec6eb67)
@github-actions

This comment has been minimized.

@g-zemlianyi g-zemlianyi changed the title GH-477: Fix Flight JDBC DATE(MILLISECOND) parameter binding (#1219) GH-477: Fix Flight JDBC DATE(MILLISECOND) parameter binding Oct 29, 2026
@g-zemlianyi

Copy link
Copy Markdown
Author

The pre-commit and Ensure PR format failures are known issues and are not caused by this change. This PR only touches DateAvaticaParameterConverter.java and ArrowFlightPreparedStatementTest.java.

pre-commit

  • The cmake-format hook crashes with ValueError: Cannot use capturing groups in re.Scanner while processing adapter/orc/CMakeLists.txt and gandiva/CMakeLists.txt.
  • The runner now picks up Python 3.15.1, which cmakelang does not support.
  • This PR touches no CMake files. All the other hooks pass.

Ensure PR format

This is a cherry-pick of upstream apache/arrow-java#1219 (commit ec6eb67500223f951448c113c2dad4b32855ca17), which closes apache/arrow-java#477. The build and test jobs (Ubuntu JDK 11/17/21/23, macOS, Windows) pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants