Skip to content

test(c/validation): assert typed option set/get coherence for autocommit - #22

Open
fornwall wants to merge 1 commit into
mainfrom
validation/autocommit-int-roundtrip
Open

test(c/validation): assert typed option set/get coherence for autocommit#22
fornwall wants to merge 1 commit into
mainfrom
validation/autocommit-int-roundtrip

Conversation

@fornwall

Copy link
Copy Markdown
Owner

Split out from #21 (1/5).

Adds ConnectionTest.AutocommitIntRoundTrip to the generic C++ validation suite: when a driver accepts AdbcConnectionSetOptionInt for a standard option (autocommit), the value must be retrievable via AdbcConnectionGetOptionInt.

  • adbc-spanner finding: COR-4 (set-as-int succeeds, get-as-int fails)
  • Spec reference: adbc.h doc for AdbcConnectionGetOptionInt (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 reject SetOptionInt (like SQLite) skip.
  • Expected on current adbc-spanner: FAIL — SetOptionInt(autocommit, 1) returns OK, then GetOptionInt fails INVALID_ARGUMENT: option adbc.connection.autocommit value "true" is not an integer (verified by actual run on the Spanner emulator).
  • On SQLite: skips via the intended skip path (the SQLite option framework rejects integer values for the boolean autocommit option).

The test is written against the generic DriverQuirks fixtures, so it auto-enrolls for every driver using ADBCV_TEST_CONNECTION; candidate for later upstream submission to apache/arrow-adbc.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EGHTnNywAfCfbe4DoNcfuz

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant