Skip to content
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

Add CommandGetXdbcTypeInfo to Flight SQL Server #4055

Merged
merged 4 commits into from
Apr 12, 2023
Merged

Conversation

c-thiel
Copy link
Contributor

@c-thiel c-thiel commented Apr 11, 2023

Which issue does this PR close?

Closes #4054

@github-actions github-actions bot added arrow Changes to the arrow crate arrow-flight Changes to the arrow-flight crate labels Apr 11, 2023
@tustvold tustvold added the api-change Changes to the arrow API label Apr 11, 2023
Copy link
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

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

This looks sensible to me, but I'm not very familiar with this area of the codebase. Perhaps @alamb or @avantgardnerio might be able to take look

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @c-thiel

CI is not passing on this PR due to a few more places needing an update. Here is a PR to your branch that should get them working: c-thiel#1

Add CommandGetXdbcTypeInfo in a few moer places
@c-thiel
Copy link
Contributor Author

c-thiel commented Apr 12, 2023

Before we merge, I noticed that the same method is also missing for the client. I am adding it as well.

@c-thiel
Copy link
Contributor Author

c-thiel commented Apr 12, 2023

@alamb / @avantgardnerio :
I am missing another quite similar function - currently a do_get with cmd arrow.flight.protocol.sql.CommandStatementQuery executes the do_get_fallback method of the server. This is not caught in the match.

Should I add a new PR or do you prefer to extend this?

Edit: NVM, I had a buggy ODBC driver. CommandStatementQuery should never be in a do_get.

@c-thiel
Copy link
Contributor Author

c-thiel commented Apr 12, 2023

Actually, this deserves a separate issue.

@avantgardnerio
Copy link
Contributor

NVM, I had a buggy ODBC driver

This is why I think integration testing is almost as important as manually trying to interpret the spec. IMO we should try stuff with the JDBC / ODBC drivers, record what happens, then try to mimic those tests with the Rust client and add them to the test suite.

I wouldn't want to merge the change that breaks something about JDBC that others are actively using.

In the case of CommandStatementQuery specifically, I wouldn't be surprised if that isn't working properly, since I've only been testing with JDBC and that driver always seems to turn everything into a prepared statement, even if on the Java side the user asks for an un-prepared statement.

@alamb
Copy link
Contributor

alamb commented Apr 12, 2023

IMO we should try stuff with the JDBC / ODBC drivers, record what happens

I agree -- I think this testing is covered by #2409. I agree it would be a fantastic addition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-change Changes to the arrow API arrow Changes to the arrow crate arrow-flight Changes to the arrow-flight crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flight SQL Server missing command type.googleapis.com/arrow.flight.protocol.sql.CommandGetXdbcTypeInfo
4 participants