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

SNOW-857216: fix compatibility issue with sqlalchemy 1.4.49 #423

Merged

Conversation

sfc-gh-aling
Copy link
Collaborator

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes SNOW-857216

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am adding new credentials
    • I am adding a new dependency
  3. Please describe how your code solves the related issue.

    Please write a short description of how your code change solves the related issue.

Comment on lines +379 to +385
try:
replacement = self.process(binary.modifiers["replacement"], **kw)
except KeyError:
# in sqlalchemy 1.4.49, the internal structure of the expression is changed
# that binary.modifiers doesn't have "replacement":
# https://docs.sqlalchemy.org/en/20/changelog/changelog_14.html#change-1.4.49
return f"REGEXP_REPLACE({string}, {pattern}{'' if flags is None else f', {flags}'})"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we don't need extra test as it is covered by the sqlalchemy_test_suites

Copy link
Collaborator

@sfc-gh-mkeller sfc-gh-mkeller left a comment

Choose a reason for hiding this comment

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

🚢 🚢

@sfc-gh-aling sfc-gh-aling merged commit a72fa39 into main Jul 6, 2023
15 of 16 checks passed
@sfc-gh-aling sfc-gh-aling deleted the SNOW-857216-sql-alchemy-compatibility-issue-with-1-4-49 branch July 6, 2023 22:10
@github-actions github-actions bot locked and limited conversation to collaborators Jul 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants