ClickHouse / metabase-clickhouse-driver

ClickHouse database driver for the Metabase business intelligence front-end
Apache License 2.0
476 stars 92 forks source link

groupUniqArray() result true or false #209

Closed jack-reso closed 9 months ago

jack-reso commented 10 months ago

Describe the bug

Steps to reproduce

1.i use groupUniqArray(toHour(gettime)) to find out unique hour in gettime ,but in metabase it result [false,false]. However when i use dbeaver,it't show [12,14] ,which mean gettime's unique hour is 12 and 14.

Expected behaviour

true result show in dbeaver [12,14] error result show in metabase [false,false].

Error log

Configuration

Environment

ClickHouse server

slvrtrn commented 10 months ago

Thanks for the report.

i use groupUniqArray(toHour(gettime)) to find out unique hour in gettime ,but in metabase it result [false,false]. However when i use dbeaver,it't show [12,14] ,which mean gettime's unique hour is 12 and 14.

To simplify the debugging and test writing, I'd like to ask for a bit more details here.

jack-reso commented 9 months ago

colume: gettime uid type: Datetime64 String data 2023-10-10 01:01:01 12edada 2023-10-10 03:01:01 12edada 2023-10-10 06:01:01 12edada

sql: select groupUniqArray(gettime) as hour_a, uid from table group by uid

result in dbeaver: [1,3,4],12edada result in metabase: [false,false,false],12edada

jack-reso commented 9 months ago

i run this from the sql query editor?

slvrtrn commented 9 months ago

@jack-reso, fixed in 1.3.1

jack-reso commented 9 months ago

@slvrtrn thanks!