-
Notifications
You must be signed in to change notification settings - Fork 15.6k
fix: handle undefined template variables safely in query rendering. #35009
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
base: master
Are you sure you want to change the base?
Conversation
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.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
Category | Issue | Status |
---|---|---|
Redundant Template Parsing ▹ view | 🧠 Not in standard |
Files scanned
File Path | Reviewed |
---|---|
superset/sqllab/query_render.py | ✅ |
superset/jinja_context.py | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
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.
Code Review Agent Run #117a57
Actionable Suggestions - 1
-
superset/jinja_context.py - 1
- Unreliable exception handling with string matching · Line 701-701
Review Details
-
Files reviewed - 2 · Commit Range:
0702ac1..f112db5
- superset/jinja_context.py
- superset/sqllab/query_render.py
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review
- Manually triggers a full AI review. -
/pause
- Pauses automatic reviews on this pull request. -
/resume
- Resumes automatic reviews. -
/resolve
- Marks all Bito-posted review comments as resolved. -
/abort
- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Default Agent
You can customize the agent settings here or contact your Bito workspace admin at [email protected].
Documentation & Help
9d016aa
to
a366d29
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #35009 +/- ##
===========================================
+ Coverage 60.48% 72.23% +11.74%
===========================================
Files 1931 586 -1345
Lines 76236 42848 -33388
Branches 8568 4531 -4037
===========================================
- Hits 46114 30951 -15163
+ Misses 28017 10694 -17323
+ Partials 2105 1203 -902
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Bito Automatic Review Failed - Technical Failure |
Bito Automatic Review Failed - Technical Failure |
SUMMARY
This PR fixes a bug in SQL template processing when the
ENABLE_TEMPLATE_PROCESSING
feature flag is enabled.It handles undefined template variables gracefully by falling back to the original SQL.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
AFTER

TESTING INSTRUCTIONS
Go to SQL Lab
Use the following query:
with ws1 as (
select 1 as one
)
select * from ws1 --{{ ref('value_date_delinquent_dates')|length }}
Run query
It should run successfully with no errors
ADDITIONAL INFORMATION