test(c/validation): assert typed option set/get coherence for autocommit - #22
Open
fornwall wants to merge 1 commit into
Open
test(c/validation): assert typed option set/get coherence for autocommit#22fornwall wants to merge 1 commit into
fornwall wants to merge 1 commit into
Conversation
If a driver accepts AdbcConnectionSetOptionInt for the standard autocommit option, AdbcConnectionGetOptionInt on the same key must return the value that was set: per adbc.h, drivers must support getting an option value via the type it was set with. Drivers that reject the integer set (like the SQLite driver, whose option framework only parses "true"/"false" strings for booleans) skip cleanly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LGf8PVEe2tYkw8Q6Pd95tq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out from #21 (1/5).
Adds
ConnectionTest.AutocommitIntRoundTripto the generic C++ validation suite: when a driver acceptsAdbcConnectionSetOptionIntfor a standard option (autocommit), the value must be retrievable viaAdbcConnectionGetOptionInt.adbc.hdoc forAdbcConnectionGetOptionInt(c/include/arrow-adbc/adbc.h:1745-1752): "For standard options, drivers must always support getting the option value (if they support getting option values at all) via the type specified in the option." The test only asserts the typed get when the driver accepted the typed set; drivers that rejectSetOptionInt(like SQLite) skip.SetOptionInt(autocommit, 1)returns OK, thenGetOptionIntfailsINVALID_ARGUMENT: option adbc.connection.autocommit value "true" is not an integer(verified by actual run on the Spanner emulator).The test is written against the generic
DriverQuirksfixtures, so it auto-enrolls for every driver usingADBCV_TEST_CONNECTION; candidate for later upstream submission to apache/arrow-adbc.🤖 Generated with Claude Code
https://claude.ai/code/session_01EGHTnNywAfCfbe4DoNcfuz