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: sorting by saved metric #13059

Merged
merged 1 commit into from Feb 10, 2021

Conversation

villebro
Copy link
Member

@villebro villebro commented Feb 10, 2021

SUMMARY

Currently ordering by saved metrics will cause queries to fail on the SQLAlchemy model. This PR:

  • Add support for using saved metrics for sorting in SQLAlchemy model.
  • Use same sorting key for Girls and Boys example tables.

BEFORE

image

AFTER

image

TEST PLAN

Local testing

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@codecov-io
Copy link

Codecov Report

Merging #13059 (b4fc2d6) into master (2ce7982) will increase coverage by 13.95%.
The diff coverage is 76.31%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #13059       +/-   ##
===========================================
+ Coverage   53.06%   67.01%   +13.95%     
===========================================
  Files         489      489               
  Lines       17314    28782    +11468     
  Branches     4482        0     -4482     
===========================================
+ Hits         9187    19288    +10101     
- Misses       8127     9494     +1367     
Flag Coverage Δ
cypress ?
python 67.01% <76.31%> (?)

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

Impacted Files Coverage Δ
superset/config.py 90.64% <ø> (ø)
superset/examples/birth_names.py 73.19% <ø> (ø)
...s/260bf0649a77_migrate_x_dateunit_in_time_range.py 0.00% <0.00%> (ø)
superset/charts/commands/exceptions.py 92.85% <77.77%> (ø)
superset/db_engine_specs/elasticsearch.py 89.74% <93.75%> (ø)
superset/connectors/sqla/models.py 84.55% <100.00%> (ø)
superset/utils/date_parser.py 96.87% <100.00%> (ø)
superset-frontend/src/utils/parseCookie.ts
...rset-frontend/src/components/URLShortLinkModal.tsx
...ntend/src/dashboard/util/activeDashboardFilters.js
... and 966 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 3e0681b...b4fc2d6. Read the comment docs.

Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

LGTM

@villebro villebro merged commit c1e10c4 into apache:master Feb 10, 2021
@villebro villebro deleted the villebro/fix-metric-sort branch February 11, 2021 06:18
amitmiran137 pushed a commit to nielsen-oss/superset that referenced this pull request Feb 14, 2021
henryyeh pushed a commit to preset-io/superset that referenced this pull request Feb 15, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 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.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants