This is an automated email from the ASF dual-hosted git repository. ccwilliams pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
commit 5f7817a6a3a532f4f9b9a72aabc1d9755715137d Merge: 5261d8a e06f873 Author: Chris Williams <[email protected]> AuthorDate: Thu Nov 29 20:57:55 2018 -0800 [SIP-5] Build metrics in query_object in the client (#6423) * [SIP-5] Build metrics in query_object in the client - Unify the metric interface (absorb the current plain string metric for built-in metric keys into the format used by adhoc metric) - Port the logic in adhocMetric on the client and process_metrics in the backend to the new typed Metrics class - Omit hasCustomLabel and formFromData properties from the new metric interface as their value can be inferred from label and optionName - Expose from the Metrics class both metrics and their labels as public methods to match the all_metrics and metric_labels fields in the backend code - Provide defaut values for filters, metrics and groupby in the backend * addressing PR comments * Adding a comment for metrictype values superset/assets/package.json | 4 +- .../spec/javascripts/superset-ui/Metric.test.ts | 95 ++++++++++++++++++++ .../superset-ui/buildQueryObject.test.ts | 19 +++- superset/assets/src/query/Column.ts | 24 +++++ superset/assets/src/query/FormData.ts | 21 +++-- superset/assets/src/query/Metric.ts | 100 +++++++++++++++++++++ superset/assets/src/query/buildQueryObject.ts | 3 + superset/common/query_object.py | 16 ++-- 8 files changed, 262 insertions(+), 20 deletions(-)
