You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "KSPT-taylorjohn (via GitHub)" <gi...@apache.org> on 2023/08/30 02:13:49 UTC
[GitHub] [superset] KSPT-taylorjohn commented on issue #25073: Chart Series Limit doesn't work for Clickhouse datasets
KSPT-taylorjohn commented on issue #25073:
URL: https://github.com/apache/superset/issues/25073#issuecomment-1698388051
I've tried to debug this and have made some progress.
In models/helpers.py/get_sqla_query there is logic to try to generate a group by.
https://github.com/apache/superset/blob/29355577f148d1210c40043ef6028804469d2c30/superset/models/helpers.py#L1590-L1608
One thing it does is use convert_tbl_column_to_sqla_col if the groupby column is also in the select list. For clickhouse db spec using _mutate_label
https://github.com/apache/superset/blob/29355577f148d1210c40043ef6028804469d2c30/superset/db_engine_specs/clickhouse.py#L395-L401
So the sqla col that is created will have a name like ItemId_08ce3f for the original column name ItemId
![image](https://github.com/apache/superset/assets/52164843/d90a6448-db4a-47fb-aedb-44c0bbab97a1)
The problem is that the population of the groupby_series_columns dictionary is based on checking the name of the converted column with the mutated name against a list of series_column_names that is based on the original column names .
That means they will never match so groupby_all_columns will never be populated
https://github.com/apache/superset/blob/29355577f148d1210c40043ef6028804469d2c30/superset/models/helpers.py#L1622-L1626
--
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