Consume COLUMN_DEF in JDBC Flight Driver

Open
#1,134 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
java
Domain
api, database

Research direction

Start with ArrowDatabaseMetadata's COLUMN_DEF vector and FlightSQLColumnMetadata, then trace how column metadata reaches DatabaseMetaData.getColumns(). Confirm completion by ensuring column default values are carried through and visible to clients such as DBeaver.

Written by the indexing model from the issue text.

Description

Type: enhancement
Describe the enhancement requested

ArrowDatabaseMetadata's schema currently defines a vector for COLUMN_DEF, yet never writes any value to it. FlightSQLColumnMetadata also does not have a constant/getter/setter for this value.

Due to this, database connections through java's arrow-flight cannot and will not show underlying default value metadata per column. DESCRIBE TABLE or similar calls (engine depending) can still be used to get a column's default value, but it can be at odds with what the client shows.

I confirmed this behavior using Dremio as the query engine, dBeaver as the client, and iceberg as the table containing a column with a default value.

DBeaver and other DB clients should accurately show column default values when calling DatabaseMetaData.getColumns() public method. Clients will need to send this information, and the arrow driver needs to consume this information.

Dominant language
Java
Stars
95
Forks
154
Avg merge
2d 10h
Merged PRs (30d)
11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/arrow-java

All issues in apache/arrow-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.