Skip to content

Fix Snowflake resync failure due to case mismatch in _resync table suffix#4185

Open
kang8 wants to merge 1 commit intoPeerDB-io:mainfrom
kang8:bugfix/snowflake-resync-case-mismatch
Open

Fix Snowflake resync failure due to case mismatch in _resync table suffix#4185
kang8 wants to merge 1 commit intoPeerDB-io:mainfrom
kang8:bugfix/snowflake-resync-case-mismatch

Conversation

@kang8
Copy link
Copy Markdown

@kang8 kang8 commented Apr 16, 2026

Summary

Fixes #4184

  • The _resync suffix was appended in lowercase, producing mixed-case identifiers like ACCOUNTS_resync
  • getColsFromTable() in qrep.go:187 unconditionally applies strings.ToUpper(), converting it to ACCOUNTS_RESYNC
  • Snowflake treats quoted identifiers as case-sensitive, so the table lookup fails with "does not exist"
  • Changed the suffix to uppercase _RESYNC to ensure consistent identifiers across creation and query paths

Test plan

  • Verified Snowflake resync creates tables with _RESYNC suffix
  • Verified getColsFromTable() can find the resync tables
  • Verified table swap (TrimSuffix) correctly strips _RESYNC after resync completes
  • Confirm no regression for BigQuery, ClickHouse, or PostgreSQL destinations (they don't use getColsFromTable with ToUpper)

…ffix (PeerDB-io#4184)

The resync suffix was appended in lowercase ("_resync"), producing
mixed-case identifiers like "ACCOUNTS_resync". However, getColsFromTable()
in qrep.go unconditionally applies strings.ToUpper(), converting it to
"ACCOUNTS_RESYNC". Since Snowflake treats quoted identifiers as
case-sensitive, the table lookup fails with "does not exist".

Uppercase the suffix to "_RESYNC" so both creation and query paths
produce consistent identifiers.
@kang8 kang8 requested a deployment to external-contributor April 16, 2026 08:17 — with GitHub Actions Waiting
@kang8 kang8 requested a deployment to external-contributor April 16, 2026 08:17 — with GitHub Actions Waiting
@kang8 kang8 requested a deployment to external-contributor April 16, 2026 08:17 — with GitHub Actions Waiting
@kang8 kang8 requested a deployment to external-contributor April 16, 2026 08:17 — with GitHub Actions Waiting
@kang8 kang8 requested a deployment to external-contributor April 16, 2026 08:17 — with GitHub Actions Waiting
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 16, 2026

CLA assistant check
All committers have signed the CLA.

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.

[BUG] Snowflake resync fails due to case mismatch in _resync table suffix

2 participants