Skip to content

GH-1382: Implement JDBC type discovery with GetXdbcTypeInfo - #1391

Open
hutiefang76 wants to merge 1 commit into
apache:mainfrom
hutiefang76:frank/arrow1382-type-info-20261024
Open

hutiefang76 wants to merge 1 commit into
apache:mainfrom
hutiefang76:frank/arrow1382-type-info-20261024

Conversation

@hutiefang76

@hutiefang76 hutiefang76 commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

What's Changed

DatabaseMetaData.getTypeInfo() currently inherits an empty result, even when the Flight SQL server exposes type metadata. Forward it to GetXdbcTypeInfo and map the response to the 18 JDBC columns. Preserve server row order and SQL NULLs, convert parameter lists to strings and the JDBC short-valued fields to SMALLINT, and retain the standard column schema for an empty stream.

Real in-process Flight client/server tests cover multiple batches, unknown precision, NULL versus empty parameter lists, empty results, server failures and allocator cleanup after normal or early close. The change stays in the JDBC metadata bridge and its fixtures.

Validation on macOS arm64, JDK 21.0.10, using the repository-pinned Arrow test data:

  • Nine focused tests: eight fail on unchanged production; all nine pass with this patch, with no skips.
  • mvn -B -ntp -Dmaven.gitcommitid.nativegit=true -pl flight/flight-sql,flight/flight-sql-jdbc-core,flight/flight-sql-jdbc-driver -am verify passed, including Spotless, Checkstyle and the dependency reactor. Flight SQL: 97 tests; JDBC Core: 1253 tests, 44 existing skips; packaged driver validation: 2 integration tests. Dependency modules retain their existing conditional skips.
  • The first full attempt failed the unchanged ResultSetTest.testFallbackUnresolvableFlightServer timing assertion (second attempt took 5015 ms). One complete rerun passed without changing source, configuration or thresholds.

Closes #1382.

Maintainer note: please add the enhancement label; the format job currently fails for that missing label, and my account cannot add it. The Test, Integration, Dev and RC workflows show action_required; could you approve those runs when appropriate? Upstream test execution and review remain pending.

AI-generated patch and PR description using Codex and DeepSeek, with automated review by DeepSeek. The builds and test results above were executed locally.

Expose server type information through the existing Flight SQL JDBC metadata
bridge. Convert the protocol fields to the standard JDBC columns, preserve
nullable values and server order, and retain the empty-result schema.

Cover real client/server round trips across batches, parameter list conversion,
unknown precision, errors and allocator cleanup.

Generated-by: Codex
Generated-by: DeepSeek V4 Flash
@github-actions

Copy link
Copy Markdown

Thank you for opening a pull request!

Please label the PR with one or more of:

  • bug-fix
  • chore
  • dependencies
  • documentation
  • enhancement

Also, add the 'breaking-change' label if appropriate.

See CONTRIBUTING.md for details.

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.

[Flight SQL][JDBC] Implement DatabaseMetaData.getTypeInfo via GetXdbcTypeInfo

1 participant