-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
feat(plugin-chart-pivot-table): support series limit #17803
Conversation
Codecov Report
@@ Coverage Diff @@
## master #17803 +/- ##
==========================================
- Coverage 67.18% 66.97% -0.21%
==========================================
Files 1609 1608 -1
Lines 64796 64798 +2
Branches 6855 6851 -4
==========================================
- Hits 43530 43399 -131
- Misses 19410 19540 +130
- Partials 1856 1859 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay for this feature! A few nits/suggestions, LMKWYT
params = json.loads(slc.params) | ||
legacy_order_by = params.pop("legacy_order_by", None) | ||
if legacy_order_by: | ||
params["timeseries_limit_metric"] = legacy_order_by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also implement here
for slc in slices: | ||
try: | ||
params = json.loads(slc.params) | ||
timeseries_limit_metric = params.pop("timeseries_limit_metric", None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and same here
], | ||
[ | ||
{ | ||
name: 'timeseries_limit_metric', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's rather use series_limit_metric
, as timeseries_limit_metric
is now deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx
Show resolved
Hide resolved
@@ -90,15 +89,40 @@ const config: ControlPanelConfig = { | |||
], | |||
['adhoc_filters'], | |||
emitFilterControl, | |||
['limit'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, also prefer the use of series_limit
over limit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @zhaoyongjie, well spotted! Issue fixed. Can you retest? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* feat(plugin-chart-pivot-table): support series limit * Add a migration * Use non-legacy series limit controls * Add a todo comment * Bug fix
* feat(plugin-chart-pivot-table): support series limit * Add a migration * Use non-legacy series limit controls * Add a todo comment * Bug fix
SUMMARY
Support series limit along with row limit in Pivot Table v2.
Migration benchmark results:
10+: 0.38 s
100+: 0.25 s
1000+: 0.24 s
10000+: 0.36 s
100000+: 0.46 s
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
After:
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
CC @rusackas @graceguo-supercat