Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ include = ["/src", "/themes", "build.rs", "LICENSE", "README.md"]
[dependencies]
adbc_core = "0.23.0"
adbc_driver_manager = "0.23.0"
arrow = "58.1.0"
arrow = { version = "58.1.0", features = ["chrono-tz"] }
arrow-array = "58.1.0"
arrow-cast = "58.1.0"
arrow-schema = "58.1.0"
Expand Down
28 changes: 28 additions & 0 deletions tests/integration_test.rs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh. I wonder if a higher level harness for this kind of test would be worth considering (e.g. how SQLite/DuckDB have test files which are basically, "run these commands and this is the output to match")

Original file line number Diff line number Diff line change
Expand Up @@ -325,3 +325,31 @@ uri = ":memory:"
let stdout = String::from_utf8_lossy(&output.stdout);
assert!(stdout.contains("profile_options_test"));
}

#[test]
fn test_timestamp_with_time_zone() {
let output = Command::new("cargo")
.args([
"run",
"--",
"--driver",
"duckdb",
"--query",
"SET TimeZone = 'America/Los_Angeles'; SELECT TIMESTAMPTZ '1992-09-20 12:30:00.123456789+01:00'",
])
.output()
.expect("Failed to execute command");

let stderr = String::from_utf8_lossy(&output.stderr);
assert!(
output.status.success(),
"TIMESTAMPTZ query should succeed. stderr: {}",
stderr
);
let stdout = String::from_utf8_lossy(&output.stdout);
assert!(
stdout.contains("1992-09-20T04:30:00.123456-07:00"),
"expected session-zone-rendered TIMESTAMPTZ in output. stdout: {}",
stdout
);
}
Loading