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
Problems with query SQL initiated when string is in single quotes
Reproducer:
use clickhouse::Row;use std::error::Error;#[derive(Row,Debug, serde::Deserialize)]structRes{result:String,}#[tokio::main]asyncfnmain() -> Result<(),Box<dynError>>{let client = clickhouse::Client::default().with_url("http://localhost:8123");let _:Vec<Res> = client
.query("SELECT query result FROM system.query_log where query like '%\'event_a\'%' limit 1",).fetch_all().await?;Ok(())}
Result:
> cargo run
warning: `query-tools` (example "test_con_ch") generated 1 warning
Finished dev [unoptimized + debuginfo] target(s) in 2.78s
Running `target/debug/examples/test_con_ch`
Error: BadResponse("Code: 62, e.displayText() = DB::Exception: Syntax error: failed at position 64 ('event_a'): event_a'%' limit 1 FORMAT RowBinary\n. Expected one of: UNION, LIMIT, WINDOW, DoubleColon, LIKE, GLOBAL NOT IN, end of query, HAVING, AS, DIV, IS, GROUP BY, INTO OUTFILE, OR, QuestionMark, BETWEEN, OFFSET, NOT LIKE, MOD, AND, alias, ORDER BY, SETTINGS, IN, ILIKE, FORMAT, NOT ILIKE, WITH, NOT, token, NOT IN, GLOBAL IN (version 21.8.15.7)")
The text was updated successfully, but these errors were encountered:
clickhouse.rs version 0.11.6
rustc version 1.74.0
Problems with query SQL initiated when string is in single quotes
Reproducer:
Result:
The text was updated successfully, but these errors were encountered: