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

Fix escaping of reserved words as column names in dialects of common sql provider #45640

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dabla
Copy link
Contributor

@dabla dabla commented Jan 14, 2025

Not only fixes escaping of reserved words as column names but also fixes un-escaping of column names or table names.

Unit tests have been added accordingly.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

davidblain-infrabel and others added 2 commits January 14, 2025 19:19
@dabla dabla changed the title Fixes escaping of reserved words as column names in MSSQLDialect Fixes escaping of reserved words as column names in dialects Jan 14, 2025
@dabla
Copy link
Contributor Author

dabla commented Jan 14, 2025

@eladkal Would it hurt if some methods in Dialects are being renamed? I don't think it's actually used yet by any released provider right?

I'm thinking of renaming following 2 methods:

escape_colmun_name -> escape_word
remove_quotes -> unescape_word

@dabla dabla changed the title Fixes escaping of reserved words as column names in dialects Fix escaping of reserved words as column names in dialects of common sql provider Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants