-
Notifications
You must be signed in to change notification settings - Fork 615
Open
Labels
Description
Description
When creating a materialized view, specify the Select statement as follows:
SELECT
toDate(timestamp) AS date,
countState(*) AS count,
quantileState(0.9)(duration) AS tp90_duration_ms,
quantileState(0.99)(duration) AS tp99_duration_ms,
avgState(duration) AS avg_duration_ms,
maxState(duration) AS max_duration_ms,
minState(duration) AS min_duration_ms
FROM test.test_table_local
GROUP BY
dateThis statement is queried directly with JDBC, and the final error is:
java.sql.SQLException: Failed to read value for column count
final debug result:
-
BinaryStreamReader.java -> readValue method
case AggregateFunction: return (T)this.readBitmap(actualColumn); -
readBitmap method
private ClickHouseBitmap readBitmap(ClickHouseColumn column) throws IOException { return ClickHouseBitmap.deserialize(this.input, ((ClickHouseColumn)column.getNestedColumns().get(0)).getDataType()); }
column.getNestedColumns() is empty
Error Log or Exception StackTrace
This statement is queried directly with JDBC, and the final error is:
java.sql.SQLException: Failed to read value for column count
Expected Behaviour
Code Example
Configuration
Client Configuration
Environment
- Cloud
- Client version: 0.9.4
- Language version: 1.8
- OS: mac
ClickHouse Server
- ClickHouse Server version: 25.5.1