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
Having the following insert statement: INSERT INTO "foo"."bar" ("id") VALUES (?), returns the following error block cannot be sorted - missing columns in requested order: [id], this error was introduced in the PR #790 to enforce sort order of columns.
If you want to use identifiers the same as keywords or you want to use other symbols in identifiers, quote it using double quotes or backticks, for example, "id", id.
Expected behaviour
Should accept column name identifiers with double quotes besides the backticks
Code example
package main
import (
"context""log""github.com/ClickHouse/clickhouse-go/v2"
)
funcmain() {
conn, err:=clickhouse.Open(&clickhouse.Options{
Addr: []string{"127.0.0.1:9000"},
})
iferr!=nil {
log.Fatal(err)
}
ctx:=context.Background()
err=conn.Exec(ctx, ` CREATE TABLE IF NOT EXISTS example ( id String ) Engine = Memory `)
iferr!=nil {
log.Fatal(err)
}
_, err=conn.PrepareBatch(ctx, "INSERT INTO example (`id`)")
iferr!=nil {
log.Fatal(err)
}
}
Error log
block cannot be sorted - missing columns in requested order: [id]
Configuration
Environment
Client version: 23.5.1.672 (official build).
Language version: clickhouse-go v2.12.0
OS: Darwin arm64
Interface: ClickHouse API / database/sql compatible driver
Describe the bug
Having the following insert statement:
INSERT INTO "foo"."bar" ("id") VALUES (?)
, returns the following errorblock cannot be sorted - missing columns in requested order: [id]
, this error was introduced in the PR #790 to enforce sort order of columns.Accordingly with the documentation https://clickhouse.com/docs/en/sql-reference/syntax#identifiers
Expected behaviour
Should accept column name identifiers with double quotes besides the backticks
Code example
Error log
block cannot be sorted - missing columns in requested order: [id]
Configuration
Environment
ClickHouse server
CREATE TABLE
statements for tables involved:The text was updated successfully, but these errors were encountered: