villebro opened a new pull request #9366: [WIP] deprecate groupby controls in query_obj (SIP-38) URL: https://github.com/apache/incubator-superset/pull/9366 ### CATEGORY Choose one - [ ] Bug Fix - [ ] Enhancement (new features, refinement) - [x] Refactor - [ ] Add tests - [ ] Build / Development Environment - [ ] Documentation ### SUMMARY Currently `query_obj` includes both `groupby` and `columns` which are mutually exclusive in a `SELECT` statement: if a metric is present, you have to use `GROUP BY`, and if you are grouping ,you can't have ungrouped columns/expressions. To simplify the query object and viz controls, it makes sense to group these together and always perform grouping if at least one metric is present. In addition, viz-specific selectable fields such as `series`, `entity`, `all_columns` are deprecated, and are expected to be passed to the query API in a single array `columns`. Making this change will make it easier to decouple the backend from the viz plugins, as the backend won't need to have a translation layer that understands the context in which a control is being used, e.g. that `entity` should be used as a grouping column. This change will not require a migration of viz metadata, as control ids will stay unchanged. However, to get rid of the deprecation warnings, viz plugins will need to perform grouping of column controls prior to submitting a request. For example, the values contained in `series` and `entities` will be added to the array `columns` in the request payload. ### TEST PLAN <!--- What steps should be taken to verify the changes --> ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Changes UI - [ ] Requires DB Migration. - [ ] Confirm DB Migration upgrade and downgrade tested. - [ ] Introduces new feature or API - [x] Removes existing feature or API ### REVIEWERS
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
