Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Bug Report: Column Nullability Not Honored in FlightSqlProducer Schema

Aperta
#782 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
java
Ambito
databases

Direzione di ricerca

Inizia da org.apache.arrow.driver.jdbc.utils.ConvertUtils.convertArrowFieldsToColumnMetaDataList(), che converte gli oggetti Arrow Field in istanze di ColumnMetaData per il driver Flight SQL. Verifica come viene popolato ColumnMetaData.Builder e assicurati che i metadati risultanti preservino la nullability di ogni campo. Il lavoro è completato quando i campi Arrow nullable e non-nullable espongono valori ResultSetMetaData corrispondenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Java
Stelle
95
Fork
154
Merge medio
2g 10h
PR unite (30g)
11

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/arrow-java

Tutte le issue di apache/arrow-java

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.