GH-51114: [FlightSQL][C++] Expose is_update field of PreparedStatement - #51133
GH-51114: [FlightSQL][C++] Expose is_update field of PreparedStatement#51133SHIVANSH-ux-ys wants to merge 6 commits into
Conversation
|
|
|
|
|
Thanks @lidavidm! Updated the PR title and description. Also added support to populate |
|
|
|
|
There was a problem hiding this comment.
I will do a deeper review tomorrow as I'm still familiarizing myself with the C++ codebase.
However, I don't see the same semantics as other PRs here. We need more than is_update being true/false, we need a presence check to know if the field was ever sent. This is important for backward compatibility (I assume most servers will not send this field).
The updates done to the tests also seem to not leave any test that doesn't set the field. IMO this is the most important test (again for backward compatibility).
@SHIVANSH-ux-ys I would like to preserve the true/false/unset semantics if possible.
|
Thanks for the cc @lidavidm |
There was a problem hiding this comment.
@SHIVANSH-ux-ys I don't understand how the Doxygen comment is related to the requested changes.
is_update is an optional field, I don't see this represented in the code.
Let me know if you need extra guidance.
|
Thanks for the feedback @ennuite! Updated |
ennuite
left a comment
There was a problem hiding this comment.
Thanks for the changes @SHIVANSH-ux-ys, it's looking better!
A few things that still weren't addressed from my initial review:
- There is no test that covers the case where the server doesn't set the new field. As I mentioned, this is the most critical test for backwards compatibility, as most servers won't implement the protocol change once it is released.
- On the server side, the current implementation always sets the flag. I'm not sure that this is the intended behavior: given that the field is optional, servers should be allowed to not set it.
…atement Signed-off-by: SHIVANSH-ux-ys <singaser78@gmail.com>
326db49 to
8f4de17
Compare
|
Thanks for the thorough review @ennuite! Addressed both items from your review:
Ready for re-review! |
ennuite
left a comment
There was a problem hiding this comment.
@SHIVANSH-ux-ys the commit you made does not contain the changes you said it had.
…sult::is_update optional and add unit test for unset case Signed-off-by: SHIVANSH-ux-ys <singaser78@gmail.com>
|
Apologies @ennuite! The local commit with |
ennuite
left a comment
There was a problem hiding this comment.
Hi @SHIVANSH-ux-ys
The direction taken with the implementation LGTM, but the test has serious problems. It doesn't even seem to compile.
I strongly encourage you to take a look at
https://arrow.apache.org/docs/developers/overview.html#ai-generated-code and ensure that you are following the guidelines if you are using AI for contributing.
Given that this is your first PR in the Arrow community, I understand this might be a lot to take in.
Can you describe in your own words what we are trying to accomplish with these tests, and how they fit in with the protocol change? Were you able to take a look at the Arrow-Go PR before starting your own?
…ult unset test compilation Signed-off-by: SHIVANSH-ux-ys <singaser78@gmail.com>
|
Hi @ennuite! Thanks for the feedback and guidance! To answer your questions directly:
Appreciate your guidance on my first C++ Flight SQL contribution! Ready for re-review whenever convenient. |
Fixes #51114.
Exposes the
is_updateboolean field in the C++ Flight SQL layer:is_updatefield toActionCreatePreparedStatementResultinserver.hand updatedPackActionResultinserver.cc.bool is_update = falseparameter andis_update() constaccessor toPreparedStatementinclient.h/client.cc.PreparedStatement::ParseResponseto extractis_update.sqlite_server.cc) to populateis_updateviasqlite3_stmt_readonly.server_test.ccfor both query (ASSERT_FALSE) and update (ASSERT_TRUE) prepared statements.