Skip to content
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

Do not support select * from table FORMAT JSON #979

Closed
muzi939375821 opened this issue Apr 25, 2023 · 4 comments
Closed

Do not support select * from table FORMAT JSON #979

muzi939375821 opened this issue Apr 25, 2023 · 4 comments
Labels

Comments

@muzi939375821
Copy link

Describe the bug

Steps to reproduce

Expected behaviour

Code example

Error log

Configuration

Environment

  • Client version:2.9.1
  • Language version:1.20.2
  • OS:
  • Interface: ClickHouse API / database/sql compatible driver

ClickHouse server

  • ClickHouse Server version:22.7.1.2484
  • ClickHouse Server non-default settings, if any:
  • CREATE TABLE statements for tables involved:
  • Sample data for all these tables, use clickhouse-obfuscator if necessary
@muzi939375821
Copy link
Author

Code example
func New() *sql.DB {
db := clickhouse.OpenDB(&clickhouse.Options{
Addr: []string{"192.168.xx.xx:9000"},
Auth: clickhouse.Auth{
Username: "xxx",
Password: "xxx",
},
Settings: clickhouse.Settings{
"max_execution_time": 60,
"allow_experimental_object_type": 1,
"format": "JSON",
},
DialTimeout: 5 * time.Second,
Compression: &clickhouse.Compression{
Method: clickhouse.CompressionLZ4,
},
Debug: true,
})
err := db.Ping()
if err != nil {
println(err.Error())
return nil
}
return db
}

rows, err := db.Query("select * from table FORMAT JSON")

@muzi939375821
Copy link
Author

When to support?

@jkaflik
Copy link
Contributor

jkaflik commented May 10, 2023

@muzi939375821 I overlooked this issue since it was closed after creation.

Currently, only the native format is supported in clickhouse-go. Please see #638

@muzi939375821
Copy link
Author

muzi939375821 commented May 10, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants