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

Upgrade to duckdb 1.1.3 #399

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
name: Download duckdb
with:
repository: "duckdb/duckdb"
tag: "v1.1.1"
tag: "v1.1.3"
fileName: ${{ matrix.duckdb }}
out-file-path: .

Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ members = [
]

[workspace.package]
version = "1.1.1"
version = "1.1.3"
authors = ["wangfenjin <wangfenj@gmail.com>"]
edition = "2021"
repository = "https://github.com/duckdb/duckdb-rs"
Expand All @@ -19,8 +19,8 @@ license = "MIT"
categories = ["database"]

[workspace.dependencies]
duckdb = { version = "1.1.1", path = "crates/duckdb" }
libduckdb-sys = { version = "1.1.1", path = "crates/libduckdb-sys" }
duckdb = { version = "1.1.3", path = "crates/duckdb" }
libduckdb-sys = { version = "1.1.3", path = "crates/libduckdb-sys" }
duckdb-loadable-macros = { version = "0.1.3", path = "crates/duckdb-loadable-macros" }
autocfg = "1.0"
bindgen = { version = "0.69", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion crates/duckdb/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "duckdb"
version = "1.1.1"
version = "1.1.3"
authors.workspace = true
edition.workspace = true
repository.workspace = true
Expand Down
17 changes: 9 additions & 8 deletions crates/duckdb/src/appender/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,22 +287,23 @@ mod test {
}

#[test]
fn test_appender_error() -> Result<(), crate::Error> {
fn test_appender_computed_columns() -> Result<(), crate::Error> {
let conn = Connection::open_in_memory()?;
conn.execute(
r"CREATE TABLE foo (
foobar TEXT,
foobar_split TEXT[] AS (split(trim(foobar), ','))
foobar_twice TEXT AS (foobar || foobar)
Copy link
Author

@andrewhamon andrewhamon Nov 27, 2024

Choose a reason for hiding this comment

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

Scalar type makes testing using query_row a bit easier (i couldn't figure out how to use query_row for a (String, Vec<String>), got some odd type errors).

);",
[],
)?;
let mut appender = conn.appender("foo")?;
match appender.append_row(["foo"]) {
Err(crate::Error::DuckDBFailure(.., Some(msg))) => {
assert_eq!(msg, "Call to EndRow before all columns have been appended to!")
}
_ => panic!("expected error"),
}
appender.append_row(["foo"])?;
appender.flush()?;
let val = conn.query_row("SELECT foobar, foobar_twice FROM foo", [], |row| {
<(String, String)>::try_from(row)
})?;
assert_eq!(val, ("foo".to_string(), "foofoo".to_string()));

Ok(())
}
}
2 changes: 1 addition & 1 deletion crates/libduckdb-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libduckdb-sys"
version = "1.1.1"
version = "1.1.3"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/libduckdb-sys/duckdb-sources
Submodule duckdb-sources updated 480 files
Binary file modified crates/libduckdb-sys/duckdb.tar.gz
Binary file not shown.
Loading
Loading