-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
chore(sql_parse): Strip leading/trailing whitespace in Jinja macro extraction #27842
Merged
john-bodley
merged 1 commit into
apache:master
from
john-bodley:john-bodley--jinja-sql-strip
Apr 3, 2024
Merged
chore(sql_parse): Strip leading/trailing whitespace in Jinja macro extraction #27842
john-bodley
merged 1 commit into
apache:master
from
john-bodley:john-bodley--jinja-sql-strip
Apr 3, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #27842 +/- ##
=======================================
Coverage 69.83% 69.83%
=======================================
Files 1920 1920
Lines 75242 75242
Branches 8423 8423
=======================================
Hits 52545 52545
Misses 20636 20636
Partials 2061 2061
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
michael-s-molina
approved these changes
Apr 1, 2024
john-bodley
force-pushed
the
john-bodley--jinja-sql-strip
branch
from
April 2, 2024 23:32
907c2a1
to
0b9f187
Compare
john-bodley
changed the title
chore(sql_parse): Strip leading/trailing whitespace in Jinja macro extraction
fix(sql_parse): Strip leading/trailing whitespace in Jinja macro extraction
Apr 3, 2024
john-bodley
changed the title
fix(sql_parse): Strip leading/trailing whitespace in Jinja macro extraction
chore(sql_parse): Strip leading/trailing whitespace in Jinja macro extraction
Apr 3, 2024
michael-s-molina
added
v4.0
Label added by the release manager to track PRs to be included in the 4.0 branch
v3.1
Label added by the release manager to track PRs to be included in the 3.1 branch
labels
Apr 3, 2024
jzhao62
pushed a commit
to jzhao62/superset
that referenced
this pull request
Apr 4, 2024
EandrewJones
pushed a commit
to UMD-ARLIS/superset
that referenced
this pull request
Apr 5, 2024
EnxDev
pushed a commit
to EnxDev/superset
that referenced
this pull request
Apr 12, 2024
qleroy
pushed a commit
to qleroy/superset
that referenced
this pull request
Apr 28, 2024
mistercrunch
added
🍒 3.1.3
🍒 4.0.1
🍒 4.0.2
🏷️ bot
A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels
labels
Jul 2, 2024
irublev
pushed a commit
to HighviewPower/superset
that referenced
this pull request
Oct 29, 2024
…traction (apache#27842) (cherry picked from commit 73dbde9)
vinothkumar66
pushed a commit
to vinothkumar66/superset
that referenced
this pull request
Nov 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🏷️ bot
A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels
size/XS
v3.1
Label added by the release manager to track PRs to be included in the 3.1 branch
v4.0
Label added by the release manager to track PRs to be included in the 4.0 branch
🍒 3.1.3
🍒 4.0.1
🍒 4.0.2
🚢 4.1.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
It seems like it's not uncommon for users to use the
latest[_sub]_partition
Jinja macros wrongly in terms of including a leading or trailing whitespace, i.e.,latest_partition(' foo.bar ')
which actually works as this table name is extracted and injected into SQL where additional leading/trailing whitespace is allowed.This PR makes sure that when we extract the table name from the Jinja macro we strip any leading/trailing whitespace.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
CI.
ADDITIONAL INFORMATION