villebro opened a new pull request #18579: URL: https://github.com/apache/superset/pull/18579
### SUMMARY When requesting samples from a dataset, a `GROUP BY` was incorrectly added to the query due to the `metrics` parameter in the `QueryObject` being set to an empty list. This PR fixes the bug, adds assertions to existing tests to ensure the sample query is executed without a `GROUP BY` clause and adds instructions to the API spec on what the difference is between a `null` vs empty array for the `metrics` parameter. ### TESTING INSTRUCTIONS 1. Go to explore and open the Network tab in the Chrome debugger 2. Click on "Samples" 3. Notice that the query in the chart data request previously included a `GROUP BY` clause. ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] 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 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
