bmuraykhi commented on code in PR #45793:
URL: https://github.com/apache/superset/pull/45793#discussion_r4391691432


##########
superset/db_engine_specs/clickhouse.py:
##########
@@ -154,6 +165,11 @@ def is_read_limit_error(cls, ex: Exception) -> bool:
     }
 
     column_type_mappings = (
+        (
+            re.compile(r"^AggregateFunction\b", re.IGNORECASE),
+            AggregateFunctionState(),
+            GenericDataType.NUMERIC,
+        ),

Review Comment:
   Partly right: a non-numeric state such as `groupArray` now gets the numeric 
type. The impact is limited to the column icon and Superset's list of numeric 
columns:
   - A dataset stores these columns' type as the bare `AGGREGATEFUNCTION`, 
without the function or argument, so the finalized type can't be derived from 
it. NUMERIC matches what the usual rollup states (uniq, quantile, sum, avg, 
count) finalize to.
   - Filters don't change: `finalizeAggregation` applies only in the SELECT 
list, and ClickHouse rejects a WHERE on a raw state 
(`ILLEGAL_TYPE_OF_ARGUMENT`) whatever the generic type, before and after this 
PR.



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