zertyuiop opened a new issue, #21658:
URL: https://github.com/apache/superset/issues/21658

   The metric label cannot match the name of the field used in the metric (for 
metrics created using the graph editor, if this field is subsequently used for 
filtering with the aggregation function (for the BigQuery engine, it gives an 
error 400 Aggregations of aggregations are not allowed)).
   
   #### How to reproduce the bug
   
   1. Create table chart with metric SUM(visits) (for example)
   2. Filter it with metric SUM(visits)>100
   3. Try to remame label of SUM(visits) to Visits (or visits)
   4. See error 400 Aggregations of aggregations are not allowed (for BigQuery)
   
   ### Expected results
   
   Metric labels (and, accordingly, for example, the names of columns in a 
table chart) must have any form (they can match the names of the table fields, 
be written in non-English language).
   
   ### Actual results
   
   Metric labels are used in SQL statements that return a table for plotting. 
However, many database engines have restrictions on the use of non-English 
field names or other similar issues that lead to bugs.
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version: Any
   - superset version: `2.0.0`, `0dda5fe`
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [ ] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [ ] I have reproduced the issue with at least the latest released version 
of superset.
   - [ ] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   
   ### Additional context
   
   Metric labels should be stored separately and not used in SQL statements 
(neutral labels of the "label_1f" type should be used there, and metric labels 
(and the metrics themselves) should already be attached to these labels in 
order to eliminate compatibility problems with various database engines as much 
as possible). Connected issue: #16108 
   


-- 
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]

Reply via email to