Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

refactor: migrate timeseries_limit_metric to legacy_order_by #1364

Merged
merged 2 commits into from
Sep 27, 2021

Conversation

zhaoyongjie
Copy link
Contributor

@zhaoyongjie zhaoyongjie commented Sep 17, 2021

🏆 Enhancements
backend changes at: apache/superset#16849

currently, Superset use timeseries_limit_metric control for main query orderby. While this is actually prepared for the inner query when viz is timeseries-like.

To fix the original incorrect use, so this PR introduce a legacy_order_by control.

This PR only migrate pivot table v2.

@zhaoyongjie zhaoyongjie requested a review from a team as a code owner September 17, 2021 03:57
@vercel
Copy link

vercel bot commented Sep 17, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/superset/superset-ui/B533s6CjW8hxaHryshpXw2CYzndd
✅ Preview: https://superset-ui-git-fork-zhaoyongjie-addlegacyordery-superset.vercel.app

@codecov
Copy link

codecov bot commented Sep 17, 2021

Codecov Report

Merging #1364 (f655aac) into master (90463d2) will increase coverage by 0.03%.
The diff coverage is 77.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1364      +/-   ##
==========================================
+ Coverage   30.31%   30.34%   +0.03%     
==========================================
  Files         496      497       +1     
  Lines        9974     9977       +3     
  Branches     1678     1679       +1     
==========================================
+ Hits         3024     3028       +4     
+ Misses       6706     6704       -2     
- Partials      244      245       +1     
Impacted Files Coverage Δ
packages/superset-ui-chart-controls/src/index.ts 100.00% <ø> (ø)
...et-ui-chart-controls/src/shared-controls/index.tsx 36.00% <0.00%> (-0.37%) ⬇️
...lugin-chart-pivot-table/src/plugin/controlPanel.ts 12.50% <ø> (ø)
.../plugin-chart-pivot-table/src/plugin/buildQuery.ts 81.81% <66.66%> (+10.38%) ⬆️
...hart-controls/src/shared-controls/legacySortBy.tsx 100.00% <100.00%> (ø)
...ges/superset-ui-core/src/query/normalizeOrderBy.ts 100.00% <100.00%> (ø)

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 90463d2...f655aac. Read the comment docs.

@@ -53,6 +54,19 @@ export default function normalizeOrderBy(queryObject: QueryObject): QueryObject
};
}

// todo: Removed `legacy_ordery_by` after refactoring
Copy link
Contributor Author

@zhaoyongjie zhaoyongjie Sep 17, 2021

Choose a reason for hiding this comment

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

will be refactored in separate PR .

Copy link
Contributor

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM - only comment is should we perform a db migration to avoid breaking existing charts that are leveraging the old sorting control?

@rusackas
Copy link
Member

rusackas commented Oct 1, 2021

@zhaoyongjie is the migration that @villebro mentioned being tackled? I hope to avoid any reports of broken charts from users.

Nevermind! Found it! Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants