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: Show Totals error with sort and group by together #19072

Merged

Conversation

codemaster08240328
Copy link
Contributor

SUMMARY

Before this update, creating a chart with show total flag on, group by and sort by, we used to get error response from the server, because as you can see from the below screenshot, the second query was invalid.

So, I removed sort by and desc from the extra query (which is being created when we flag show total on).

image

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE
image

AFTER
image

TESTING INSTRUCTIONS

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

@codecov
Copy link

codecov bot commented Mar 8, 2022

Codecov Report

Merging #19072 (6687141) into master (c75f233) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #19072   +/-   ##
=======================================
  Coverage   66.50%   66.50%           
=======================================
  Files        1642     1642           
  Lines       63442    63442           
  Branches     6439     6439           
=======================================
+ Hits        42189    42191    +2     
+ Misses      19583    19582    -1     
+ Partials     1670     1669    -1     
Flag Coverage Δ
javascript 51.22% <ø> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...ntend/plugins/plugin-chart-table/src/buildQuery.ts 55.93% <ø> (ø)
superset-frontend/src/views/components/Menu.tsx 58.97% <0.00%> (+2.56%) ⬆️

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 c75f233...6687141. Read the comment docs.

@rusackas
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@rusackas Ephemeral environment spinning up at http://35.89.28.169:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@rusackas
Copy link
Member

The first two screenshots are super low resolution for some reason.

It'd also be helpful to put the repro steps in the Testing section of the PR description:

Repro steps

  1. Create a table chart with public.flights dataset
    • Group-by: Destination Airport
    • Metrics: SUM(Air_Time)
    • Sort-by: Destination Airport (input as custom SQL with no
      summation to actually sort by the letters)
    • Select ‘Show Totals’ - Hit Run
  2. Error is shown (without Sort-by being populated, it runs correctly)

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

Works well in testing! LGTM!

@rusackas rusackas merged commit bc6aad0 into apache:master Mar 10, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

villebro pushed a commit that referenced this pull request Apr 3, 2022
@mistercrunch mistercrunch added 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.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 lts-v1 size/XS 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants