-
Notifications
You must be signed in to change notification settings - Fork 16.2k
fix: Do no aggregate results when metrics=[]
#36247
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
base: master
Are you sure you want to change the base?
fix: Do no aggregate results when metrics=[]
#36247
Conversation
Code Review Agent Run #3286b4Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
Hey @alexandrusoare it would be good to get your thoughts on this one since you worked on the original PR. Thanks! |
superset-frontend/plugins/plugin-chart-ag-grid-table/test/buildQuery.test.ts
Outdated
Show resolved
Hide resolved
alexandrusoare
left a comment
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
b434be4 to
87820c2
Compare
|
After talking with @betodealmeida and doing some more testing here, I noticed that this is actually a lot easier to reproduce. Since the AG Grid table is always adding a We've agreed to actually take a first pass on fixing this at the backend: the backend should be capable of receiving |
metrics=[]
betodealmeida
left a comment
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.
Yeah!
|
@betodealmeida will have to revert to fixing this at the AG Grid level. Dashboard native filters intentionally set We used to have both |
SUMMARY
The AG Grid un-aggregated table is sending
metrics=[]to the backend when a CSV download is triggered from the dashboard, which makes sense (the un-aggregated chart doesn't have any metrics). In the backend, we validateif metrics is not Noneto decide if aGROUP BYshould be added, in this case incorrectly evaluating toTrue.As a consequence, the CSV file would only include distinct rows.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before

After

TESTING INSTRUCTIONS
cleaned_sales_datadataset.deal_sizeas a column.ADDITIONAL INFORMATION