Bug Report: Column Nullability Not Honored in FlightSqlProducer Schema

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
java
領域
databases

調査の方向性

Flight SQL ドライバー向けに Arrow Field オブジェクトを ColumnMetaData インスタンスへ変換する org.apache.arrow.driver.jdbc.utils.ConvertUtils.convertArrowFieldsToColumnMetaDataList() から始めます。ColumnMetaData.Builder がどのように設定されるかを確認し、生成されるメタデータが各フィールドの nullability を保持していることを検証します。nullable および non-nullable の Arrow フィールドが一致する ResultSetMetaData 値を公開すれば完了です。

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

説明

Type: bug
Describe the bug, including details regarding any error messages, version, and platform.

In the FlightSqlProducer class, the getFlightInfoPreparedStatement method is responsible for returning the Arrow Schema of the ResultSet for a given query. However, the returned schema does not accurately reflect the nullability of columns. Regardless of whether a column is defined as nullable or non-nullable, the schema always returns a fixed nullability value.

This leads to incorrect ResultSetMetaData when the schema is consumed via the Flight SQL driver.

Root Cause:

The issue originates in the method:

org.apache.arrow.driver.jdbc.utils.ConvertUtils.convertArrowFieldsToColumnMetaDataList()

Here, a list of org.apache.arrow.vector.types.pojo.Field objects is converted into org.apache.calcite.avatica.ColumnMetaData instances. However, the setNullable property of the ColumnMetaData.Builder is not being set based on the actual nullability of the Arrow field.

Expected Behavior:

The setNullable method of ColumnMetaData.Builder should be updated to reflect the value of field.isNullable() from the Arrow schema.

Impact:

This bug results in incorrect metadata being exposed to clients using the Flight SQL driver, potentially leading to misinterpretation of the data schema.

主要言語
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 を短くまとめたダイジェスト。