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: handle CTEs with comments on is_select #16769

Merged
merged 1 commit into from
Sep 21, 2021

Conversation

betodealmeida
Copy link
Member

SUMMARY

CTEs with comments on them were not correctly identified as a SELECT, eg:

WITH blah AS 
/*blahblahbalh*/
  (SELECT * FROM core_dev.manager_team), 
--blahblahbalh

blah2 AS 
  (SELECT * FROM core_dev.manager_workspace)

SELECT * FROM blah 
INNER JOIN blah2 ON blah2.team_id = blah.team_id 

Removing the comments before running is_select() fixes it.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Sep 21, 2021

Codecov Report

Merging #16769 (6b3bb43) into master (d375538) will decrease coverage by 0.19%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16769      +/-   ##
==========================================
- Coverage   76.96%   76.76%   -0.20%     
==========================================
  Files        1007     1007              
  Lines       54182    54186       +4     
  Branches     7464     7464              
==========================================
- Hits        41700    41595     -105     
- Misses      12242    12351     +109     
  Partials      240      240              
Flag Coverage Δ
hive ?
mysql 81.74% <100.00%> (?)
postgres 81.80% <100.00%> (-0.01%) ⬇️
presto ?
python 81.89% <100.00%> (-0.39%) ⬇️
sqlite 81.41% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/sql_parse.py 99.39% <100.00%> (+0.01%) ⬆️
superset/db_engines/hive.py 0.00% <0.00%> (-82.15%) ⬇️
superset/db_engine_specs/hive.py 69.80% <0.00%> (-16.87%) ⬇️
superset/db_engine_specs/presto.py 83.47% <0.00%> (-6.91%) ⬇️
superset/views/database/mixins.py 81.03% <0.00%> (-1.73%) ⬇️
superset/connectors/sqla/models.py 86.31% <0.00%> (-1.64%) ⬇️
superset/datasets/commands/importers/v1/utils.py 59.25% <0.00%> (-0.75%) ⬇️
superset/db_engine_specs/base.py 88.20% <0.00%> (-0.39%) ⬇️
superset/utils/core.py 89.84% <0.00%> (-0.13%) ⬇️
superset/models/core.py 89.08% <0.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d375538...6b3bb43. Read the comment docs.

@betodealmeida betodealmeida merged commit 48a61ba into apache:master Sep 21, 2021
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.0 labels Mar 13, 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/M 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants