Skip to content

fix: match configured snapshot keys and cursors to quoted columns - #1273

Merged
kvlonge merged 1 commit into
mainfrom
fix/quoted-column-config
Oct 29, 2026
Merged

kvlonge merged 1 commit into
mainfrom
fix/quoted-column-config

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Why

Release 0.186.0 matched declared column names to warehouse columns with a shared key that ignores identifier quotes. A few runtime checks still used a plain lower-case comparison. A snapshot keyed on a quoted camelCase column such as '"listingId"', or a microbatch cursor like '"eventAt"', failed on DuckDB with a misleading "missing required columns" or "cursor not produced" error. On Snowflake, an unquoted name for a case-sensitive column failed the same way, or produced SQL that addressed the upper-cased name.

Changes

  • Snapshot required and generated columns, snapshot key exclusion for check_columns [*], the microbatch cursor check, and merge immutable columns (base, DuckDB-backed and Snowflake adapters) use the shared column-name key.
  • A snapshot or microbatch build stops with a clear error when an unquoted setting names a column the warehouse lists only as a quoted, case-sensitive identifier. The error tells the user to write the quoted name. Quoted names already render with their quotes. Plain incremental merges and deletes are left as they are, because sessions with QUOTED_IDENTIFIERS_IGNORE_CASE already accept unquoted names there.
  • The Snowflake adapter page documents case-sensitive column names.
  • DuckShop gains an edge-case snapshot keyed and compared on quoted camelCase columns, with a unit test. It is checked by compile only.

Verification

  • New unit tests for the spelling check and a quoted merge key; an offline Snowflake build test covering quoted and unquoted snapshot keys and microbatch cursors; a DuckDB E2E test building a quoted snapshot key and cursor twice.
  • The build E2E directory at -n 4 (392 passed), make test (12,194 passed) and make check-ci.
  • Compiled a large private project with 0.186.0 and this branch: the compiled SQL is byte-identical and there are no new diagnostics.

Snapshot required and generated columns, snapshot key exclusion, the
microbatch cursor check and merge immutable columns now compare names
with the shared column-name key, so a quoted mixed-case name such as
'"listingId"' matches its warehouse column on every adapter.

A snapshot or microbatch build now stops with a clear error when an
unquoted setting names a column the warehouse lists only as a quoted,
case-sensitive identifier, instead of failing with a misleading
missing-column error or generating SQL for the wrong column.
@kvlonge
kvlonge enabled auto-merge (squash) October 29, 2026 22:18
@kvlonge
kvlonge merged commit 2116208 into main Oct 29, 2026
39 checks passed
@kvlonge
kvlonge deleted the fix/quoted-column-config branch October 29, 2026 22:43
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