Observed
A call to PrepareBatch with queries that include a list of columns, splits columns on , but does not respect backticks. For example, if I have:
INSERT INTO my_table (col1, `my_weird,col2`, col3)
In https://github.com/ClickHouse/clickhouse-go/blob/main/batch.go#L29-L36, what happens is we get:
columns: {'col1', 'my_weird', 'col2', 'col3'}
And that causes:
requested column order is incorrect length to sort block - expected 3, got 4
Expected behaviour
Extracting column names in extractNormalizedInsertQueryAndColumns should respect backticks
Code example
package code
// your code snippet here
Error log
requested column order is incorrect length to sort block - expected 3, got 4
Details
Environment
Observed
A call to
PrepareBatchwith queries that include a list of columns, splits columns on,but does not respect backticks. For example, if I have:In https://github.com/ClickHouse/clickhouse-go/blob/main/batch.go#L29-L36, what happens is we get:
And that causes:
Expected behaviour
Extracting column names in
extractNormalizedInsertQueryAndColumnsshould respect backticksCode example
Error log
Details
Environment
clickhouse-goversion: v2.43.0database/sqlcompatible driverCREATE TABLEstatements for tables involved: