Skip to content

test(c/validation): assert the incremental option is accepted at its spec default - #26

Open
fornwall wants to merge 2 commits into
mainfrom
validation/incremental-default
Open

test(c/validation): assert the incremental option is accepted at its spec default#26
fornwall wants to merge 2 commits into
mainfrom
validation/incremental-default

Conversation

@fornwall

@fornwall fornwall commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Split out from #21 (5/5).

Adds StatementTest.SqlQueryIncrementalDefault to the generic C++ validation suite: setting adbc.statement.exec.incremental to its documented default (ADBC_OPTION_VALUE_DISABLED) must not fail, even for drivers that don't implement incremental execution (actually enabling it may still return NOT_IMPLEMENTED, which is asserted). Also carries the driver fixes the test exposed: fix(c/driver/sqlite,c/driver/postgresql): accept adbc.statement.exec.incremental at its spec default — the SQLite driver's option framework and the PostgreSQL driver's hand-written SetOption both rejected even the documented default with NOT_IMPLEMENTED.

  • adbc-spanner finding: SPEC-2 (adbc.statement.exec.incremental rejected even at its spec default)
  • Spec reference: adbc.h doc for ADBC_STATEMENT_OPTION_INCREMENTAL (adbc.h:650-665): "The default is ADBC_OPTION_VALUE_DISABLED." The header documents the default rather than literally mandating a set-to-default no-op; the test encodes the practical consequence that a generic client writing back defaults must not break.
  • Expected on current adbc-spanner: FAIL — NOT_IMPLEMENTED: statement option adbc.statement.exec.incremental is not supported by the Spanner ADBC driver for value "false" (verified by actual run on the Spanner emulator).
  • On SQLite: fails without the included fix (same bug), passes with it.
  • On PostgreSQL: same bug ([libpq] Unknown statement option), fixed here too; passes against a live server with the fix.
  • On DuckDB (third-party driver, not fixable here): rejects the option entirely, so a new DriverQuirks::supports_incremental_option_default() quirk (default true) lets its integration suite skip the test; SQLite and PostgreSQL keep the strict default.

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

🤖 Generated with Claude Code

https://claude.ai/code/session_01EGHTnNywAfCfbe4DoNcfuz

fornwall and others added 2 commits July 13, 2026 19:49
…incremental at its spec default

ADBC_STATEMENT_OPTION_INCREMENTAL defaults to disabled (adbc.h), so a
generic client that writes back option defaults must be able to set it
to ADBC_OPTION_VALUE_DISABLED as a no-op. Both the SQLite and PostgreSQL
drivers rejected the option outright; accept an explicit "disabled" and
keep returning NOT_IMPLEMENTED when a caller actually tries to enable
incremental execution.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LGf8PVEe2tYkw8Q6Pd95tq
…spec default

ADBC_STATEMENT_OPTION_INCREMENTAL has a documented default of
ADBC_OPTION_VALUE_DISABLED (adbc.h), so setting it to that value must
succeed as a no-op even in drivers without incremental execution;
generic clients (which may write back defaults unconditionally) break
otherwise. Enabling it may still return NOT_IMPLEMENTED, and a plain
query must keep working afterwards. Requires the preceding SQLite and
PostgreSQL option fixes to pass there.

Add a supports_incremental_option_default quirk (default true) so that
third-party drivers that reject the option entirely can opt out; DuckDB
does, so its integration suite skips the test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LGf8PVEe2tYkw8Q6Pd95tq
@fornwall
fornwall force-pushed the validation/incremental-default branch from dcb7631 to 7ff0d5a Compare July 13, 2026 17:52
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