You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "villebro (via GitHub)" <gi...@apache.org> on 2023/09/26 16:44:16 UTC
[GitHub] [superset] villebro commented on a diff in pull request #25147: fix: Apply normalization to all dttm columns
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org