zhaoyongjie commented on code in PR #21378:
URL: https://github.com/apache/superset/pull/21378#discussion_r971093757
##########
superset/common/query_context_processor.py:
##########
@@ -245,11 +246,21 @@ def normalize_df(self, df: pd.DataFrame, query_object:
QueryObject) -> pd.DataFr
if dttm_col:
timestamp_format = dttm_col.python_date_format
+ base_axis_label = None
+ if (
+ (label := get_base_axis_label(query_object.columns))
+ and query_object.datasource is not None
+ and (base_column := query_object.datasource.get_column(label))
+ and base_column.is_dttm
+ ):
+ base_axis_label = label
+
normalize_dttm_col(
df=df,
timestamp_format=timestamp_format,
offset=datasource.offset,
time_shift=query_object.time_shift,
+ dttm_alias=base_axis_label,
Review Comment:
nice! it's also treating multiple DateTime columns. I have addressed this.
--
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]