Expose Arrow `Struct` columns as JDBC `STRUCT` metadata in the Flight SQL JDBC driver.
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start in flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/utils/SqlTypes.java, where ArrowType.Struct is mapped to Types.JAVA_OBJECT, and review the related ArrowFlightJdbcStructVectorAccessor.java implementation. Update the metadata mapping so Struct columns report JDBC STRUCT and verify ResultSetMetaData returns STRUCT and "STRUCT" for those columns.
Written by the indexing model from the issue text.
Description
Describe the enhancement requested
Please expose Arrow Struct columns as JDBC STRUCT metadata in the Flight SQL JDBC driver.
Today, Arrow Struct is mapped to java.sql.Types.JAVA_OBJECT, which makes
ResultSetMetaData report:
getColumnType(...) == Types.JAVA_OBJECTgetColumnTypeName(...) == "JAVA_OBJECT"
This hides the fact that the column is structurally a JDBC STRUCT, even though the driver
already has struct-specific accessor support.
Why this matters
JDBC clients often rely on ResultSetMetaData to understand result schemas before reading
rows. When STRUCT columns are reported as JAVA_OBJECT, clients cannot distinguish:
- struct/object-like columns
- generic opaque objects
This makes schema inspection, BI tooling, ORM adapters, and generic JDBC consumers harder.
Current upstream evidence
In
flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/utils/SqlTypes.java:
ArrowType.Structmaps toTypes.JAVA_OBJECT
In flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/accessor/impl/comple x/ArrowFlightJdbcStructVectorAccessor.java:
getStruct()is already implemented- but
getObjectClass()returnsMap.class getObject()returns aMap
So the data path knows about structs, but metadata does not expose them as JDBC STRUCT.
Expected behavior
For Arrow Struct columns:
ResultSetMetaData.getColumnType(...)should returnjava.sql.Types.STRUCTResultSetMetaData.getColumnTypeName(...)should returnSTRUCT
Optionally, getObject() / object-class behavior could also be aligned with JDBC Struct, but
the most important gap is metadata.
Actual behavior
Arrow Struct columns are exposed as:
Types.JAVA_OBJECT"JAVA_OBJECT"
Version
Observed with:
- Arrow Flight SQL JDBC driver
18.2.0
Confirmed in current upstream code and latest published artifact line:
19.0.0
- Dominant language
- Java
- Stars
- 95
- Forks
- 154
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/arrow-java
-
Type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/arrow-java#1300 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
apache/arrow-java#1261 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/arrow-java#1236 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/arrow-java#1230 ·
-
Type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
apache/arrow-java#1205 ·
All issues in apache/arrow-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100