Fix Snowflake resync failure due to case mismatch in _resync table suffix#4185
Conversation
f219dd7 to
0e5edf9
Compare
|
Hi @serprex @Amogh-Bharadwaj, friendly ping on this PR — it's a small 2-line fix for a Snowflake resync bug (#4184). CLA is signed and CI is waiting on a maintainer to approve the workflow run. Could one of you take a look when you have a moment? Thanks! |
|
cdc_flow.go is shared code between all connectors, this should be fixed in snowflake connector specifically |
…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 applied strings.ToUpper(), converting it to "ACCOUNTS_RESYNC". Since Snowflake treats quoted identifiers as case-sensitive, the table lookup failed with "does not exist". Fix in Snowflake's getColsFromTable: replace the unconditional strings.ToUpper with snowflakeSchemaTableNormalize so quoted mixed-case identifiers are looked up consistently with how they are created. The shared cdc_flow.go is left untouched since the suffix handling is a Snowflake-specific concern.
0e5edf9 to
95e208f
Compare
|
Thanks for the review! I've moved the fix to be Snowflake-specific in |
❌ 2 Tests Failed:
View the top 2 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
|
The Codecov failure Root cause: Prior occurrences of the same flake (different subtests, same error):
This PR only touches |
Summary
Fixes #4184
_resyncsuffix was appended in lowercase, producing mixed-case identifiers likeACCOUNTS_resyncgetColsFromTable()inqrep.go:187unconditionally appliesstrings.ToUpper(), converting it toACCOUNTS_RESYNC_RESYNCto ensure consistent identifiers across creation and query pathsTest plan
_RESYNCsuffixgetColsFromTable()can find the resync tables_RESYNCafter resync completesgetColsFromTablewithToUpper)