Skip to content

GH-1089: Expose batch metadata from Flight SQL JDBC results - #1547

Open
yucheng-du wants to merge 1 commit into
apache:mainfrom
yucheng-du:flight-jdbc-batch-metadata
Open

yucheng-du wants to merge 1 commit into
apache:mainfrom
yucheng-du:flight-jdbc-batch-metadata

Conversation

@yucheng-du

Copy link
Copy Markdown

Closes #1089.

Expose the latest Flight data message's metadata through ResultSet.unwrap(ArrowFlightJdbcFlightStreamResultSet.class).getLatestBatchMetadata(). The driver copies the bytes before advancing the stream, so callers can read trailing query statistics after the last row, including for a query that returns no rows.

The JDBC tests cover consecutive rows, a batch without metadata, and a metadata-only trailer. The full Flight SQL JDBC core Maven reactor passed. I also checked 1,989 rows over three endpoints with 65,537-byte metadata payloads.

AI assistance: GPT-6.2 Astra, ultra effort, for the implementation and tests.

@github-actions

github-actions Bot commented Dec 2, 2026

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.

@lidavidm lidavidm added the enhancement PRs that add or improve features. label Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement PRs that add or improve features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Java][FlightRPC] Flight SQL JDBC driver does not expose per-batch app_metadata from FlightStream

2 participants