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

chore(presto): Expose schema and indexes to _partition_query method #23674

Merged

Conversation

john-bodley
Copy link
Member

@john-bodley john-bodley commented Apr 13, 2023

SUMMARY

This PR exposes the schema and indexes to the internal (private) PrestoBaseEngineSpec._partition_query method as these could be useful for custom overrides of the partition query.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

CI.

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

@john-bodley john-bodley marked this pull request as ready for review April 13, 2023 10:17
cls,
schema: Optional[str],
Copy link
Member Author

Choose a reason for hiding this comment

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

Given this is a private method, changing the order of the function arguments is deemed non-breaking.

@codecov
Copy link

codecov bot commented Apr 13, 2023

Codecov Report

Merging #23674 (d466938) into master (b35b5a6) will increase coverage by 0.00%.
The diff coverage is 78.16%.

❗ Current head d466938 differs from pull request most recent head 13f186c. Consider uploading reports for the commit 13f186c to get more accurate results

@@           Coverage Diff           @@
##           master   #23674   +/-   ##
=======================================
  Coverage   68.08%   68.09%           
=======================================
  Files        1920     1922    +2     
  Lines       73990    74041   +51     
  Branches     8092     8101    +9     
=======================================
+ Hits        50379    50419   +40     
- Misses      21540    21551   +11     
  Partials     2071     2071           
Flag Coverage Δ
hive 53.18% <83.33%> (-0.01%) ⬇️
mysql 79.21% <100.00%> (+<0.01%) ⬆️
postgres 79.29% <100.00%> (+<0.01%) ⬆️
presto 53.09% <83.33%> (-0.01%) ⬇️
python 83.14% <100.00%> (+<0.01%) ⬆️
sqlite 77.79% <100.00%> (+<0.01%) ⬆️
unit 53.02% <66.66%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...ackages/superset-ui-core/src/utils/featureFlags.ts 100.00% <ø> (ø)
...nd/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js 0.00% <ø> (ø)
...frontend/src/SqlLab/components/SqlEditor/index.jsx 56.68% <0.00%> (-1.92%) ⬇️
...onents/Chart/ChartContextMenu/ChartContextMenu.tsx 76.19% <ø> (ø)
...end/src/dashboard/components/SliceHeader/index.tsx 90.56% <ø> (ø)
...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx 55.17% <0.00%> (ø)
...ontrols/DndColumnSelectControl/DndFilterSelect.tsx 42.27% <0.00%> (ø)
...ontrols/DndColumnSelectControl/DndMetricSelect.tsx 47.86% <0.00%> (+0.40%) ⬆️
superset/config.py 91.86% <ø> (ø)
superset/db_engine_specs/hive.py 87.79% <ø> (ø)
... and 9 more

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@john-bodley john-bodley force-pushed the john-bodley--presto-partition-query branch from 30c721e to 8d2d14e Compare April 13, 2023 22:09
@pull-request-size pull-request-size bot added size/M and removed size/S labels Apr 13, 2023

Note the unused arguments are exposed for sub-classing purposes where custom
Copy link
Member Author

Choose a reason for hiding this comment

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

@michael-s-molina per our offline discussion I added this comment as to why the unused arguments are included.

@john-bodley john-bodley force-pushed the john-bodley--presto-partition-query branch 2 times, most recently from f522aa8 to c590a88 Compare April 13, 2023 23:46
@john-bodley john-bodley force-pushed the john-bodley--presto-partition-query branch from c590a88 to 9cfc5ca Compare April 14, 2023 00:11
Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

LGTM

superset/db_engine_specs/presto.py Outdated Show resolved Hide resolved
@john-bodley john-bodley merged commit 100ccb7 into apache:master Apr 14, 2023
@john-bodley john-bodley deleted the john-bodley--presto-partition-query branch April 14, 2023 18:24
john-bodley added a commit to airbnb/superset-fork that referenced this pull request Apr 14, 2023
…pache#23674)

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
(cherry picked from commit 100ccb7)
john-bodley added a commit to airbnb/superset-fork that referenced this pull request Apr 26, 2023
…pache#23674)

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
(cherry picked from commit 100ccb7)
sebastianliebscher pushed a commit to sebastianliebscher/superset that referenced this pull request Apr 28, 2023
…pache#23674)

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.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 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants