TimonKK / clickhouse

NodeJS client for ClickHouse
Apache License 2.0
221 stars 122 forks source link

Error: Scalar doesn't exist #147

Open vinay2897 opened 1 year ago

vinay2897 commented 1 year ago
create table test (id String, data AggregateFunction(quantilesBFloat16(0.5), Float32));

I am trying to insert like this

await clickhouseClient
    .insert(
      `insert into test (id, data) VALUES ('1', (
        select quantilesBFloat16State(0.5)(
          arrayJoin(
            [toFloat32(1)]
          )
        )
      ))`,
    )
    .toPromise();

I am not sure if this is the right way to insert to AggregateFunction, getting this error

Error: Scalar `5268235327744482548_13959738211676547465` doesn't exist (internal bug): While processing __getScalar('5268235327744482548_13959738211676547465') AS constant_expression: While executing ValuesBlockInputFormat. (BAD_ARGUMENTS) (version 
23.4.2.11 (official build))

Node version - 18.16.0 Clickhouse server version - 23.4.2.11