Skip to content

fix(c/validation): make SqlPrepareUpdate readback order-independent#4534

Merged
lidavidm merged 1 commit into
apache:mainfrom
fornwall:fix-sqlprepareupdate-row-order-assertion
Jul 19, 2026
Merged

fix(c/validation): make SqlPrepareUpdate readback order-independent#4534
lidavidm merged 1 commit into
apache:mainfrom
fornwall:fix-sqlprepareupdate-row-order-assertion

Conversation

@fornwall

Copy link
Copy Markdown
Contributor

Avoid depending on engine specific readbacks in insertion order.

@fornwall
fornwall requested a review from lidavidm as a code owner July 16, 2026 08:40
Avoid depending on engine specific readbacks in insertion order.
@fornwall
fornwall force-pushed the fix-sqlprepareupdate-row-order-assertion branch from 5a3aa89 to 4dc3be8 Compare July 16, 2026 08:56
fornwall added a commit to fornwall/adbc-spanner that referenced this pull request Jul 16, 2026
…-adbc#4534 (#343)

The two SqlPrepareUpdate cases were excluded because their readback asserted
rows in *insertion* order — unrecoverable from a Spanner table, whose rows come
back in primary-key order behind a random synthetic adbc_ingest_key UUID.

apache/arrow-adbc#4534 fixes that upstream: the readback now runs
`SELECT * FROM bulk_ingest ORDER BY <col> ASC NULLS FIRST` and asserts the
sorted expected vectors ({null,null,-42,-42,42,42} / {null,null,1,2,3,3})
instead of insertion order. With a deterministic ORDER BY the Spanner quirks can
finally make the cases pass:

- CMakeLists.txt: bump ARROW_ADBC_TAG onto the #4534 branch. That PR is still
  open, so this TEMPORARILY points GIT_REPOSITORY at the fornwall/arrow-adbc
  fork; revert to apache/arrow-adbc.git and re-bump onto a main rev containing
  #4534 once it merges (documented inline at both edit sites).
- spanner_validation.cc: the two `select-bulk-ingest` rewrites now match the new
  ORDER BY default and drop NULLS FIRST (implicit for GoogleSQL ASC) while
  projecting past the synthetic key — yielding the ingested column in the
  NULL-first ascending order the suite now expects. The insert-bulk-ingest
  column-list rewrites are unchanged.
- run-adbc-validation.sh: drop both cases from EXCLUDED so the gate enforces
  them; reframe the (now-empty) Bucket 1 comment.

Verified by construction against #4534's assertions; the adbc-validation CI job
is the authoritative gate. Do not merge until #4534 merges upstream.


Claude-Session: https://claude.ai/code/session_01TXzBG1e8nCAUsTarm8sruY

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lidavidm
lidavidm merged commit 65957bb into apache:main Jul 19, 2026
87 checks passed
@fornwall
fornwall deleted the fix-sqlprepareupdate-row-order-assertion branch July 19, 2026 23:23
fornwall added a commit to fornwall/adbc-spanner that referenced this pull request Jul 19, 2026
apache/arrow-adbc#4534 (make SqlPrepareUpdate readback order-independent)
is merged, so the fornwall/arrow-adbc fork branch that carried it is no
longer needed.

Revert GIT_REPOSITORY to apache/arrow-adbc.git and bump ARROW_ADBC_TAG
onto the current upstream main tip, 65957bbae31a70ad9ce07c2b9919c32d7ea62649
(which is itself the #4534 merge commit). The fork was the only reason
this pointed anywhere but apache/arrow-adbc.

No EXCLUDED changes: SqlPrepareUpdate was never excluded, since the fork
already carried the fix that made it pass.

Verified with scripts/run-adbc-validation.sh against a throwaway emulator
— gate 89 passed / 7 skipped / 0 failed, stale guard and expected-failure
guard both OK.


Claude-Session: https://claude.ai/code/session_01Dh4BaSStUFiLFGqq1H32oX

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

2 participants