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

fix: don't strip SQL comments in Explore #28363

Merged
merged 12 commits into from
May 7, 2024
Merged

fix: don't strip SQL comments in Explore #28363

merged 12 commits into from
May 7, 2024

Conversation

mistercrunch
Copy link
Member

Following up in the footsteps of #27725 as comments can be used as a way to pass the database engine hints, or for logging purposes.

Following up in the footsteps of #27725 as comments can be used as a way to pass the database engine hints, or for logging purposes.
@pull-request-size pull-request-size bot added size/M and removed size/XS labels May 7, 2024
@pull-request-size pull-request-size bot added size/S and removed size/M labels May 7, 2024
@mistercrunch mistercrunch marked this pull request as ready for review May 7, 2024 17:12
@mistercrunch mistercrunch changed the title fix: don't strip SQL comments fix: don't strip SQL comments in Explore May 7, 2024
Copy link
Member

@john-bodley john-bodley left a comment

Choose a reason for hiding this comment

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

@mistercrunch I agree with this approach. I think historically we did this to aid with traversing the sqlparse AST, but as we migrate to SQLGlot I suspect this requirement can likely be relaxed.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 7, 2024
@mistercrunch
Copy link
Member Author

Found some comments in the code around stripping comments prior to checkit is_select() and other similar assertions and leaving those untouched.

@mistercrunch mistercrunch merged commit c618767 into master May 7, 2024
28 checks passed
@michael-s-molina michael-s-molina added the v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch label May 8, 2024
imancrsrk pushed a commit to imancrsrk/superset that referenced this pull request May 10, 2024
jzhao62 pushed a commit to jzhao62/superset that referenced this pull request May 16, 2024
michael-s-molina added a commit to michael-s-molina/superset that referenced this pull request May 17, 2024
mistercrunch added a commit that referenced this pull request May 29, 2024
Here I'm trying to recreate the issue that led to revert #28363 in #28567, likely some sort of trailing comment of some kind. This is DRAFT for now until I can reproduce the issue, write a covering test for it, and address it.

First attempt at creating a problematic virtual dataset was the following ->
EnxDev pushed a commit to EnxDev/superset that referenced this pull request May 31, 2024
mistercrunch added a commit that referenced this pull request Jun 3, 2024
Here I'm trying to recreate the issue that led to revert #28363 in #28567, likely some sort of trailing comment of some kind. This is DRAFT for now until I can reproduce the issue, write a covering test for it, and address it.

First attempt at creating a problematic virtual dataset was the following ->
mistercrunch added a commit that referenced this pull request Jun 7, 2024
Here I'm trying to recreate the issue that led to revert #28363 in #28567, likely some sort of trailing comment of some kind. This is DRAFT for now until I can reproduce the issue, write a covering test for it, and address it.

First attempt at creating a problematic virtual dataset was the following ->
mistercrunch added a commit that referenced this pull request Jun 18, 2024
Here I'm trying to recreate the issue that led to revert #28363 in #28567, likely some sort of trailing comment of some kind. This is DRAFT for now until I can reproduce the issue, write a covering test for it, and address it.

First attempt at creating a problematic virtual dataset was the following ->
@mistercrunch mistercrunch added 🍒 4.0.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Jul 24, 2024
@rusackas rusackas deleted the strip_comments branch September 27, 2024 21:04
irublev pushed a commit to HighviewPower/superset that referenced this pull request Oct 29, 2024
irublev pushed a commit to HighviewPower/superset that referenced this pull request Oct 29, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
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 lgtm This PR has been approved by a maintainer preset-io size/S v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch 🍒 4.0.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants