villebro commented on a change in pull request #12998:
URL: https://github.com/apache/superset/pull/12998#discussion_r573727487
##########
File path: superset/viz.py
##########
@@ -177,6 +177,11 @@ def process_metrics(self) -> None:
self.all_metrics = list(self.metric_dict.values())
self.metric_labels = list(self.metric_dict.keys())
+ def construct_where(self, query_obj: QueryObjectDict, predicate_string:
str) -> str:
+ if query_obj:
+ predicate_string = "{} AND {}".format(query_obj, predicate_string)
Review comment:
We probably need to add parenthesis here, if either of these has an OR
it will break.
```suggestion
predicate_string = "({}) AND ({})".format(query_obj,
predicate_string)
```
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]