-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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: KeyError 'sql' when opening a Trino virtual dataset #30339
fix: KeyError 'sql' when opening a Trino virtual dataset #30339
Conversation
@@ -90,7 +90,6 @@ def execute( | |||
rendered_query: str, | |||
log_params: dict[str, Any] | None, | |||
) -> SqlJsonExecutionStatus: | |||
print(">>> execute <<<") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftovers from the original PR.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #30339 +/- ##
===========================================
+ Coverage 60.48% 83.89% +23.41%
===========================================
Files 1931 533 -1398
Lines 76236 38489 -37747
Branches 8568 0 -8568
===========================================
- Hits 46114 32292 -13822
+ Misses 28017 6197 -21820
+ Partials 2105 0 -2105
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
1ebd222
to
2bded1e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the cleanup (seems the original PR was slightly rushed 😬)
(cherry picked from commit ef9e5e5)
SUMMARY
#27470 modified the logic to validate a SQL Lab query by checking the access permission before any Jinja rendering occurs as some Jinja macros execute statements upon rendering. Those changes left an unused shallow copy statement that was interfering with SQL Alchemy internal state provoking key errors. This PR removes the unused statements.
Fixes #30338
TESTING INSTRUCTIONS
Follow the instructions described in the original issue.
ADDITIONAL INFORMATION