You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The #2022 hasn't brought full support for simple aggregate functions. When using ClickHouseBinaryFormatReader to read query response. If the table contains a column with SimpleAggregateFunctions using functions like getLong returns an error message saying that
Column counter SimpleAggregateFunction cannot be converted to long
This error seems to be also present for jdbc:
Caused by: com.clickhouse.client.api.ClientException: Column counter SimpleAggregateFunction cannot be converted to long
at com.clickhouse.client.api.data_formats.internal.AbstractBinaryFormatReader.readNumberValue(AbstractBinaryFormatReader.java:312) ~[jdbc-v2-0.8.0.jar:jdbc-v2 0.8.0 (revision: 5b5ac2e)]
at com.clickhouse.client.api.data_formats.internal.AbstractBinaryFormatReader.getLong(AbstractBinaryFormatReader.java:333) ~[jdbc-v2-0.8.0.jar:jdbc-v2 0.8.0 (revision: 5b5ac2e)]
at com.clickhouse.jdbc.ResultSetImpl.getLong(ResultSetImpl.java:293) ~[jdbc-v2-0.8.0.jar:clickhouse-jdbc 0.8.0 (revision: 5b5ac2e)]
Code example
This test is just adapted from the test case added in the #2022
The issue seems to be in the AbstractBinaryFormatReader.java class. A lots of functions are using column.getDataType() to determine what type of object is being read. But the implementation make that for a simpleAggregateFunction the column.getDataType always returns SimpleAggregateFunction, which makes that all functions using this are ending up in the default case.
Describe the bug
The #2022 hasn't brought full support for simple aggregate functions. When using ClickHouseBinaryFormatReader to read query response. If the table contains a column with SimpleAggregateFunctions using functions like getLong returns an error message saying that
This error seems to be also present for jdbc:
Code example
This test is just adapted from the test case added in the #2022
Error log
The text was updated successfully, but these errors were encountered: