villebro commented on code in PR #25147:
URL: https://github.com/apache/superset/pull/25147#discussion_r1337510852


##########
superset/common/query_context_processor.py:
##########
@@ -284,6 +284,7 @@ def _get_timestamp_format(
             label
             for label in [
                 *get_base_axis_labels(query_object.columns),
+                *[col for col in query_object.columns or [] if isinstance(col, 
str)],

Review Comment:
   Is there risk that `labels` will contain duplicated columns? If so, maybe we 
should put a `set(...)` inside the `tuple(...)` to dedupe them?



##########
superset/common/query_object_factory.py:
##########
@@ -66,6 +73,14 @@ def create(  # pylint: disable=too-many-arguments
         )
         kwargs["from_dttm"] = from_dttm
         kwargs["to_dttm"] = to_dttm
+        if (
+            datasource_model_instance
+            and kwargs.get("filters")
+            and len(kwargs["filters"])

Review Comment:
   could we simplify to
   ```suggestion
               and kwargs.get("filters", []))
   ```



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