-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LowCardinality support? #139
Comments
Hi, no yet. |
@kshvakov It seems most of the bugs with Have you started working on this ? |
@agaurav Yes, at the moment |
@kshvakov It seems to be working fine for both sample code to test package main
import (
"github.com/jmoiron/sqlx"
_ "github.com/kshvakov/clickhouse"
"log"
"time"
)
func main() {
connect, err := sqlx.Open("clickhouse", "tcp://127.0.0.1:9000?debug=true")
if err != nil {
log.Fatal(err)
}
_, err = connect.Exec(`
CREATE TABLE IF NOT EXISTS test.low_cardinality (
d Date,
x UInt32,
s LowCardinality(String)
) ENGINE = MergeTree
ORDER BY (d,x,s)
`)
var (
tx, errtx = connect.Begin()
stmt, errst = tx.Prepare("INSERT INTO test.low_cardinality (d,x,s) VALUES (?, ?, ?)")
)
if errtx != nil {
log.Fatal(errtx)
}
if errst != nil {
log.Fatal(errst)
}
defer stmt.Close()
for i := 0; i < 100; i++ {
if _, err := stmt.Exec(
time.Now(),
i,
"s",
); err != nil {
log.Fatal(err)
}
}
if err := tx.Commit(); err != nil {
log.Fatal(err)
}
rows, err := connect.Query("SELECT d,x,s FROM test.low_cardinality")
if err != nil {
log.Fatal(err)
}
defer rows.Close()
for rows.Next() {
var (
d time.Time
x uint32
s string
)
if err := rows.Scan(&d, &x, &s); err != nil {
log.Fatal(err)
}
log.Println(d, x, s)
}
} |
@agaurav It's a compatibility mode, ClickHouse server convert |
+1 |
Hi this seems like a wonderful feature to have on the driver. Is it available yet?? |
@kshvakov So does it work atleast as good as before without low cardinality?? We were thinking on adding lowCardinality to our schema, so if it is giving at aleast same performance for read/write as before, we can add it to the schema and wait till this is fully supported by the driver. |
I think this issue could be closed. The compatibility mode is by default. |
Hi, will this awesome driver support LowCardinality ?
The text was updated successfully, but these errors were encountered: