Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#1,089 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
75/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
java, sql
領域
api, database

調査の方向性

ArrowFlightJdbcFlightStreamResultSet と既存の getAppMetadata() メソッドから始め、currentEndpointData と FlightStream.getLatestMetadata() を追跡します。完了の条件は、JDBC の呼び出し元が unwrap() を使用してバッチごとの最新メタデータ(最後のバッチの末尾メタデータを含む)を取得でき、raw の FlightClient にアクセスする必要がないことです。

索引モデルが issue の本文から書いたものです。

説明

Type: enhancement
Summary

The Flight SQL JDBC driver (flight-sql-jdbc-driver) currently exposes FlightInfo.app_metadata via ArrowFlightJdbcFlightStreamResultSet.getAppMetadata() (added in ~15.0), but per-batch app_metadata from FlightStream.getLatestMetadata() is received internally and silently discarded — it is never surfaced to JDBC callers.

Motivation

Servers use per-batch app_metadata on FlightData messages to communicate execution statistics (rows scanned, elapsed time, query state, etc.) — similar to what Trino exposes via QueryStats. This is particularly valuable for the final batch, which servers commonly use as a "trailing metadata" pattern to report post-execution stats.
Currently there is no way to access this information through the JDBC layer without dropping down to the raw FlightClient, which defeats the purpose of the JDBC driver abstraction.

Current behavior

FlightInfo.app_metadata → accessible via rs.unwrap(ArrowFlightJdbcFlightStreamResultSet.class).getAppMetadata() ✅
Per-batch FlightData.app_metadata → received by FlightStream.getLatestMetadata() internally, but never stored or exposed ❌

Also worth noting: getAppMetadata() returns a snapshot from query submission time only. For long-running queries using PollFlightInfo, updated app_metadata from subsequent poll cycles is never surfaced. This limits its usefulness for engines that progressively update stats during execution.

Requested change

Add a method to ArrowFlightJdbcFlightStreamResultSet (accessible via unwrap()) such as:

public ArrowBuf getLatestBatchMetadata() {
    if (currentEndpointData == null || currentEndpointData.getStream() == null) {
        return null;
    }
    return currentEndpointData.getStream().getLatestMetadata();
}

This would follow the same unwrap() pattern already established for getAppMetadata() and give callers access to per-batch metadata, including trailing stats on the final batch.

Component(s)

FlightRPC, Java

主要言語
Java
スター
95
フォーク
154
平均マージ
2日 10時間
マージ済み PR(30日)
11

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/arrow-java のほかの issue

apache/arrow-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。