-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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: Revert "fix: don't strip SQL comments in Explore (#28363)" #28567
Conversation
This reverts commit c618767.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #28567 +/- ##
==========================================
+ Coverage 60.48% 64.54% +4.05%
==========================================
Files 1931 521 -1410
Lines 76236 37484 -38752
Branches 8568 0 -8568
==========================================
- Hits 46114 24194 -21920
+ Misses 28017 13290 -14727
+ 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. |
Mmmmh. Seems we'll need to start over and write some unit tests with trailing comments (?) Did we save some of that SQL that was demonstrated to fail? Were they dash-dash comments or dash-star comments? I'm thinking we can write a failing unit test against #28363, and proceed to fix the issue. Hopefully that would provide enough confidence to move forward. |
@mistercrunch this seems easy enough to fix this by adding a newline at the end if the query contains |
@mistercrunch We had problems with dash-dash comments. We can definitely test a future PR using our production data as multiple dashboards failed. |
A problem with dash-star is they don't embed into one-another well. My use case was around looking for a user hint (in the form of a dash-dash comment) and based on that altering the SQL. Now I wanted for the "view query" panel to show them the before and after transformation, but the dash-dash turns slash-star, and the end of their hint closes the opening /*. Solution is either to keep dash-dash as is, or have the whole SQL_QUERY_MUTATOR feature have a way to keep track of the before and after and surface both (as opposed to doing this as a comment) |
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 ->
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 ->
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 ->
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 ->
SUMMARY
This reverts commit c618767.
After deploying Superset 4.0 to production a number of users reported issues where the rendered SQL statements were invalid if the underlying virtual dataset contained comments—likely trailing comments. Specifically the subquery lacked the trailing
)
.We were able to determine that #28363 was the problematic PR and reverting it remedied the issue.
TESTING INSTRUCTIONS
CI and confirmed that the issue was mitigated after reverting.
ADDITIONAL INFORMATION