bmuraykhi opened a new issue, #45791:
URL: https://github.com/apache/superset/issues/45791

   ### Bug description
   
   ### Bug description
   
   On ClickHouse tables with `AggregateFunction(...)` columns (the usual 
AggregatingMergeTree rollup), Drill to detail, dataset samples and the SQL Lab 
table preview fail with:
   
   ```
   AggregateFunction(quantileTiming, UInt16) deserialization not supported
   ```
   
   These features select every column as-is, so the query returns raw aggregate 
states, which clickhouse-connect intentionally does not decode. 
`SimpleAggregateFunction` columns are not affected.
   
   **How to reproduce**
   
   ```sql
   CREATE TABLE t (k UInt8, rtt AggregateFunction(quantileTiming, UInt16), 
users AggregateFunction(uniq, UInt64))
   ENGINE = AggregatingMergeTree ORDER BY k;
   INSERT INTO t SELECT number % 5, quantileTimingState(toUInt16(number)), 
uniqState(toUInt64(number % 50))
   FROM numbers(1000) GROUP BY number % 5;
   ```
   
   1. Add `t` as a dataset, build a Table chart on it and add it to a dashboard.
   2. Right-click a cell, then Drill to detail: "Failed to load drill-to-detail 
rows".
   3. In SQL Lab, open `t` in the table preview: the generated `SELECT` fails 
with the same error.
   
   ### Screenshots/recordings
   
   <img width="1752" height="600" alt="Image" 
src="https://github.com/user-attachments/assets/23ea1beb-50b4-422d-aeb9-a0cd142d4656";
 />
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.11
   
   ### Node version
   
   Not applicable
   
   ### Browser
   
   Not applicable
   
   ### Additional context
   
   Reproduced on 6.1.0 and 7.0.0rc2 with clickhouse-connect 1.11.0 and 
ClickHouse 25.3, so it is not a regression.
   
   The driver does not decode aggregate states by design: they are ClickHouse's 
internal structures, meant to be finalized by ClickHouse in the query (see 
ClickHouse/clickhouse-connect#104).
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [x] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


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