Skip to content

[fix](regression) Materialize JDBC array results#65084

Open
shuke987 wants to merge 1 commit into
apache:masterfrom
shuke987:fix-arrow-flight-array-materialize
Open

[fix](regression) Materialize JDBC array results#65084
shuke987 wants to merge 1 commit into
apache:masterfrom
shuke987:fix-arrow-flight-array-materialize

Conversation

@shuke987

@shuke987 shuke987 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

What

Materialize JDBC array objects while regression-test reads rows from ResultSet.

Why

Arrow Flight JDBC array objects keep references to Arrow vectors owned by the live result set. The regression-test framework stores row objects first, closes the ResultSet/Statement, and later calls OutputUtils.toCsvString(). At that point the vector inside ArrowFlightJdbcArray has already been cleared, so Array.toString() / Array.getArray() can throw IndexOutOfBoundsException.

This change converts java.sql.Array values to plain Java list values while the result set is still alive. It also recursively handles nested Java arrays and preserves existing binary-column hex formatting.

Tests

  • git diff --check
  • Groovy parse check for JdbcUtils.groovy with local Guava/slf4j classpath

Full regression verification will run in CI.

@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@shuke987

shuke987 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

run buildall

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