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

[BUGFIX] Update conditional for TextClause isinstance check in SQLAlchemyExecutionEngine #3844

Merged

Conversation

cdkini
Copy link
Member

@cdkini cdkini commented Dec 13, 2021

Changes proposed in this pull request:

Definition of Done

Please delete options that are not relevant.

  • My code follows the Great Expectations style guide
  • I have performed a self-review of my own code
  • I have run any local integration tests and made sure that nothing is broken.

Thank you for submitting!

@netlify
Copy link

netlify bot commented Dec 13, 2021

✔️ Deploy Preview for niobium-lead-7998 ready!

🔨 Explore the source changes: 38ff2f1

🔍 Inspect the deploy log: https://app.netlify.com/sites/niobium-lead-7998/deploys/61b79b69d737ce0007200800

😎 Browse the preview: https://deploy-preview-3844--niobium-lead-7998.netlify.app

@github-actions
Copy link
Contributor

HOWDY! This is your friendly 🤖 CHANGELOG bot 🤖

Please don't forget to add a clear and succinct description of your change under the Develop header in docs_rtd/changelog.rst, if applicable. This will help us with the release process. See the Contribution checklist in the Great Expectations documentation for the type of labels to use!

Thank you!

@cdkini cdkini self-assigned this Dec 13, 2021
Comment on lines +799 to 802
if TextClause and isinstance(selectable, TextClause):
res = self.engine.execute(
sa.select(query["select"]).select_from(
selectable.columns().subquery()
Copy link
Member Author

Choose a reason for hiding this comment

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

Very simple but if TextClause is not imported properly, it is set to None. isinstance(selectable, None) causes an error because the second arg of isinstance needs to be a type class (i.e. type(None))

Copy link
Contributor

@talagluck talagluck left a comment

Choose a reason for hiding this comment

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

LGTM - nice work! Always love the type hinting.

@cdkini cdkini enabled auto-merge (squash) December 13, 2021 19:14
@cdkini cdkini merged commit f0e23de into develop Dec 13, 2021
@cdkini cdkini deleted the bugfix/devrel-826/fix-isinstance-check-for-text-clause branch December 13, 2021 19:53
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