Skip to content

Commit

Permalink
chore(driver): test format_null_as_str with set (#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
everpcpc authored Aug 28, 2024
1 parent 0e13616 commit 5c922c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions driver/tests/driver/select_simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ async fn select_null() {
let dsn = option_env!("TEST_DATABEND_DSN").unwrap_or(DEFAULT_DSN);
// ignore null to str test for flightsql
if !dsn.starts_with("databend+flight://") {
let client = Client::new(format!("{dsn}&format_null_as_str=1"));
let client = Client::new(dsn.to_string());
let conn = client.get_conn().await.unwrap();
conn.exec("SET format_null_as_str=1").await.unwrap();
let row = conn.query_row("select * from select_null").await.unwrap();
assert!(row.is_some());
let row = row.unwrap();
Expand All @@ -62,8 +63,9 @@ async fn select_null() {
}
{
let dsn = option_env!("TEST_DATABEND_DSN").unwrap_or(DEFAULT_DSN);
let client = Client::new(format!("{dsn}&format_null_as_str=0"));
let client = Client::new(dsn.to_string());
let conn = client.get_conn().await.unwrap();
conn.exec("SET format_null_as_str=0").await.unwrap();
let row = conn.query_row("select * from select_null").await.unwrap();
assert!(row.is_some());
let row = row.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion tests/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
volumes:
- ./data:/data
databend:
image: docker.io/datafuselabs/databend:nightly
image: docker.io/datafuselabs/databend
environment:
- QUERY_STORAGE_TYPE=s3
- QUERY_DATABEND_ENTERPRISE_LICENSE
Expand Down

0 comments on commit 5c922c3

Please sign in to comment.