zephyring commented on code in PR #25126: URL: https://github.com/apache/superset/pull/25126#discussion_r1327601647
########## superset/common/query_context_factory.py: ########## @@ -128,6 +128,8 @@ def _apply_granularity( if granularity := query_object.granularity: filter_to_remove = None + if is_adhoc_column(x_axis): # type: ignore Review Comment: the x_axis is from form_data and it's ANY ########## superset/common/query_context_factory.py: ########## @@ -128,7 +128,9 @@ def _apply_granularity( if granularity := query_object.granularity: filter_to_remove = None - if x_axis and x_axis in temporal_columns: + # for custom sql, the x-axis is a dict + x_axis = x_axis.get("sqlExpression") if isinstance(x_axis, dict) else x_axis Review Comment: updated -- 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-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org