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(sqla): allow series limit without subquery support #16896

Merged
merged 1 commit into from
Sep 29, 2021

Conversation

villebro
Copy link
Member

@villebro villebro commented Sep 29, 2021

SUMMARY

The recent PR #16660 broke series limiting for databases that don't support subqueries (Pinot and Solr). This moves the check for allows_subqueries down one level to the section where the subquery is constructed, thus allowing for a prequery to populate the series values to limit by if subqueries/joins aren't supported.

Note, however, that before #16660 we weren't checking for support for subqueries when constructing the limiting subquery. But since there are no db engine specs that allow joins but don't support subqueries, adding the check for subquery support shouldn't have any practical implications right now.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

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 29, 2021

Codecov Report

Merging #16896 (3e9e0b2) into master (3d8cc15) will decrease coverage by 0.16%.
The diff coverage is 100.00%.

❗ Current head 3e9e0b2 differs from pull request most recent head 143836d. Consider uploading reports for the commit 143836d to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16896      +/-   ##
==========================================
- Coverage   77.02%   76.85%   -0.17%     
==========================================
  Files        1021     1021              
  Lines       54754    54754              
  Branches     7470     7470              
==========================================
- Hits        42173    42080      -93     
- Misses      12335    12428      +93     
  Partials      246      246              
Flag Coverage Δ
hive ?
mysql ?
postgres 81.90% <100.00%> (ø)
presto 81.78% <100.00%> (-0.01%) ⬇️
python 82.08% <100.00%> (-0.33%) ⬇️
sqlite ?

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

Impacted Files Coverage Δ
superset/connectors/sqla/models.py 87.01% <100.00%> (-0.24%) ⬇️
superset/db_engines/hive.py 0.00% <0.00%> (-82.15%) ⬇️
superset/db_engine_specs/hive.py 69.76% <0.00%> (-17.06%) ⬇️
superset/db_engine_specs/sqlite.py 91.89% <0.00%> (-5.41%) ⬇️
superset/connectors/sqla/utils.py 88.23% <0.00%> (-3.93%) ⬇️
superset/db_engine_specs/mysql.py 94.04% <0.00%> (-3.58%) ⬇️
superset/utils/celery.py 86.20% <0.00%> (-3.45%) ⬇️
superset/result_set.py 96.77% <0.00%> (-1.62%) ⬇️
superset/utils/cache.py 73.58% <0.00%> (-0.95%) ⬇️
superset/models/core.py 89.26% <0.00%> (-0.74%) ⬇️
... and 5 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 3d8cc15...143836d. Read the comment docs.

Copy link
Member

@etr2460 etr2460 left a comment

Choose a reason for hiding this comment

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

lgtm, let's merge to fix the regression and add tests in a follow up?

@villebro
Copy link
Member Author

lgtm, let's merge to fix the regression and add tests in a follow up?

SGTM - I'll add a follow-up test soon 👍

@villebro villebro merged commit 3272d1c into apache:master Sep 29, 2021
@villebro villebro deleted the villebro/fix-subquery-limit branch September 30, 2021 08:16
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 preset-io size/XS 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants