-
Notifications
You must be signed in to change notification settings - Fork 3.7k
GH-46087: [FlightSQL] Allow returning column remarks in FlightSQL's CommandGetTables #46110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
macOS 13 and MinGW failures are unrelated and failing on other PRs. See: |
Looks like the integration tests have failed on the C++ vs Go/Java comparison:
I've reverted the changes to the integration test code here. |
81b10b6
to
4bd6cf8
Compare
Hey @lidavidm , any chance you can take a look at this PR? |
I believe if we want to add this to the spec we should have implementations in at least one other language (preferably both Go/Java if possible, though) and vote on it, as trivial as it is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proposal itself seems reasonable, though
format/FlightSql.proto
Outdated
@@ -1212,6 +1212,7 @@ message CommandGetDbSchemas { | |||
* - ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE - "1" indicates if the column is case-sensitive, "0" otherwise. | |||
* - 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 descripting column. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe "An explanatory comment" or something (following the JDBC documentation)? Or was this meant to say "A comment describing the column"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, sorry for the typo -- I changed that to "A comment describing the column"
4bd6cf8
to
94a85c8
Compare
Sure, makes sense 👍 . I'll work on the draft PRs and post links here. |
CC @zeroshade, I assume no objections :) |
@lidavidm here's the draft implementation for Java apache/arrow-java#727 |
And here's the Go PR: apache/arrow-go#361 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing that I was thinking about, though, should we note that this field was added after the others and clients should be prepared to find it missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Thanks for the PRs. They look reasonable to me. I'd like to let zeroshade take a look and then we can call a vote. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No objections from me here. I'll review the Go PR, but I'd say we can move forward with a vote.
Ah, should we restore the integration test as well? We've required that for votes before. It's OK if it's failing for now. As long as the test is present we can vote and then we can merge the PRs in order. |
Okay -- I'll add the changes needed to make the tests work to the Java/Go PRs as well |
…QL's CommandGetTables
This reverts commit cd3008b.
1188285
to
40fc2f7
Compare
Resolves #46087
Rationale for this change
FlightSQL allows returning various column metadata in
CommandGetTables
, but one thing that's missing is human-readable column description. This PR proposes adding a newARROW:FLIGHT:SQL:REMARKS
metadata property taht will contain a comment describing a column. This is inspired by JDBC'sDatabaseMetaData#getColumns()
method, and later on I'm planning on adding this change to arrow-java as well.What changes are included in this PR?
ARROW:FLIGHT:SQL:REMARKS
ColumnMetadata
implementationPlease tell me if there's anything else in the other languages that I should add.
Are these changes tested?
Covered by existing tests; no new test cases added.
Are there any user-facing changes?
Yes, a couple new constants/methods added to the
ColumnMetadata
class and its builderCommandGetTables
#46087