GH-1134: add COLUMN_DEF support to JDBC getColumnns() by Verest · Pull Request #1139 · apache/arrow-java · GitHub
Skip to content

GH-1134: add COLUMN_DEF support to JDBC getColumnns()#1139

Open
Verest wants to merge 2 commits into
apache:mainfrom
Verest:GH-1134
Open

GH-1134: add COLUMN_DEF support to JDBC getColumnns()#1139
Verest wants to merge 2 commits into
apache:mainfrom
Verest:GH-1134

Conversation

@Verest

@Verest Verest commented May 6, 2026

Copy link
Copy Markdown

What's Changed

Updates the FlightSqlColumnMetadata to contain the JDBC COLUMN_DEF field alongside getters/setters. Following exiting naming format.

Updates ArrowDatabaseMetadata to write to the pre-existing COLUMN_DEF vector as part of the getColumns() code paths.

Updates test(s) in ArrowDatabaseMetadataTest to test default value behavior.

Closes #1134.

@github-actions

This comment has been minimized.

@Verest

Verest commented May 6, 2026

Copy link
Copy Markdown
Author

@Verest Verest marked this pull request as ready for review May 6, 2026 19:48
@xborder

xborder commented May 6, 2026

Copy link
Copy Markdown
Contributor

Should this be discussed and voted like it was done for is_update? Maybe it is overkill but I think at least apache/arrow/FlightSql.proto should be in sync.

There are other places in FlightSql.proto that also mention metadata returned that probably would need to be updated

@xborder

xborder commented May 6, 2026

Copy link
Copy Markdown
Contributor

Have you thought if it would make sense in CommandGetXdbcTypeInfo?

@ennuite

ennuite commented May 7, 2026

Copy link
Copy Markdown
Contributor

Should this be discussed and voted like it was done for is_update? Maybe it is overkill but I think at least apache/arrow/FlightSql.proto should be in sync.

There are other places in FlightSql.proto that also mention metadata returned that probably would need to be updated

Yes, the proto files in this repo should mirror the main one.

@jbonofre jbonofre added this to the 20.0.0 milestone May 7, 2026
* - ARROW:FLIGHT:SQL:IS_READ_ONLY - "1" indicates if the column is read only, "0" otherwise.
* - ARROW:FLIGHT:SQL:IS_SEARCHABLE - "1" indicates if the column is searchable via WHERE clause, "0" otherwise.
* - ARROW:FLIGHT:SQL:REMARKS - A comment describing the column.
* - ARROW:FLIGHT:SQL:COLUMN_DEF - The default value for the column.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks to have update the javadoc here.

I think it's worth to document COLUMN_DEF in the javadoc of CommandStatementQuery, CommandStatementSubstraitPlan, CommandPreparedStatementQuery. As we have REMARKS in these messages, we should have COLUMN_DEF.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I was uncertain about that - I can add them.

I did not add them originally as I do not think the COLUMN_DEF will be used in those code paths, but I don't think it hurts having it there either.

@jbonofre jbonofre added the enhancement PRs that add or improve features. label May 7, 2026
@jbonofre

jbonofre commented May 7, 2026

Copy link
Copy Markdown
Member

By the way, as this PR touches .proto, worth to at discuss on the mailing list.

@Verest

Verest commented May 7, 2026

Copy link
Copy Markdown
Author

@lidavidm lidavidm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems reasonable to me. We should proceed with a vote on ML

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement PRs that add or improve features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consume COLUMN_DEF in JDBC Flight Driver

5 participants