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

Feat!(snowflake): normalize identifiers as uppercase #1697

Merged
merged 9 commits into from
May 29, 2023
Merged

Conversation

tobymao
Copy link
Owner

@tobymao tobymao commented May 26, 2023

No description provided.

@tobymao tobymao requested a review from barakalon May 27, 2023 06:19
@georgesittas georgesittas changed the title Snowflake Feat!(snowflake): normalize identifiers as uppercase May 27, 2023
Copy link
Collaborator

@georgesittas georgesittas left a comment

Choose a reason for hiding this comment

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

Very nice! Left a few comments.

sqlglot/optimizer/normalize_identifiers.py Outdated Show resolved Hide resolved
sqlglot/optimizer/normalize_identifiers.py Outdated Show resolved Hide resolved
sqlglot/optimizer/qualify.py Outdated Show resolved Hide resolved
sqlglot/optimizer/qualify.py Outdated Show resolved Hide resolved
sqlglot/optimizer/qualify_columns.py Outdated Show resolved Hide resolved
sqlglot/optimizer/qualify_columns.py Outdated Show resolved Hide resolved
sqlglot/optimizer/qualify_columns.py Outdated Show resolved Hide resolved
sqlglot/optimizer/qualify_columns.py Show resolved Hide resolved
tests/fixtures/optimizer/normalize_identifiers.sql Outdated Show resolved Hide resolved
@tobymao tobymao force-pushed the snowflake branch 7 times, most recently from d4a9936 to b0d6cc7 Compare May 28, 2023 05:58
expression: exp.Expression, dialect: DialectType = None
) -> exp.Expression:
"""
Normalize all unquoted identifiers to either lower or upper case, depending on
Copy link
Owner Author

Choose a reason for hiding this comment

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

cc @barakalon i've basically deleted this whole file

sqlglot/helper.py Outdated Show resolved Hide resolved
@tobymao tobymao merged commit dcfe67f into main May 29, 2023
@tobymao tobymao deleted the snowflake branch May 29, 2023 02:03
adrianisk pushed a commit to adrianisk/sqlglot that referenced this pull request Jun 21, 2023
* Feat!(snowflake): normalize identifiers as uppercase

* fixup

* fixup

* Fix\!: lower aliases as well

* Fix: maintain quotes in aliased names

* Apply suggestions from code review

Co-authored-by: Jo <[email protected]>

* Simplify normalize_identifiers.

* Update sqlglot/helper.py

Co-authored-by: Jo <[email protected]>

* default identify to true

---------

Co-authored-by: George Sittas <[email protected]>
Co-authored-by: Jo <[email protected]>
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