Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

partial mixed case support for SF #919

Merged
merged 6 commits into from
Dec 28, 2023
Merged

Conversation

heavycrystal
Copy link
Contributor

@heavycrystal heavycrystal commented Dec 28, 2023

Still some edge cases, but should work for basic mixed case tables.
Will revisit this later, need to spend some time with cases.

Some outstanding issues:

  1. Destination tables with the same name but different cases can break our COPY statement generation.
  2. Proper refactor of the QRep code in general.
  3. Some issues with columns specified in pure upper case (like "INFINITE") which is the default casing for Snowflake but the opposite for Postgres.

@@ -296,10 +301,10 @@ func (c *SnowflakeConnector) getColsFromTable(tableName string) (*model.ColumnIn
}
defer rows.Close()

var colName pgtype.Text
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why were these moved outside the loop?

Copy link
Contributor

@serprex serprex Dec 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd guess the goal is to avoid clearing an empty stack slot each loop, which may also be boxed depending how go analyzes Scan. This refactor has been appearing in a few previous PRs

@serprex
Copy link
Contributor

serprex commented Dec 28, 2023

Could use test cases demonstrating what now works. PR is pretty large so splitting refactoring to another PR would be nice, but lgtm

@iskakaushik iskakaushik merged commit 81ae7ce into main Dec 28, 2023
7 checks passed
@serprex serprex deleted the sf-mixed-case-v2-partial branch July 19, 2024 15:25
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.

3 participants