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

Update arrow requirement from 44 to 47 #212

Merged
merged 3 commits into from
Sep 30, 2023
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
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ memchr = "2.3"
uuid = { version = "1.0", optional = true }
smallvec = "1.6.1"
cast = { version = "0.3", features = ["std"] }
arrow = { version = "44", default-features = false, features = ["prettyprint", "ffi"] }
arrow = { version = "47", default-features = false, features = ["prettyprint", "ffi"] }
rust_decimal = "1.14"
strum = { version = "0.25", features = ["derive"] }
r2d2 = { version = "0.8.9", optional = true }
calamine = { version = "0.21.0", optional = true }
calamine = { version = "0.22.0", optional = true }
num = { version = "0.4", optional = true, default-features = false, features = ["std"] }
duckdb-loadable-macros = { version = "0.1.0", path="./duckdb-loadable-macros", optional = true }
polars = { version = "0.31.1", features = ["dtype-full"], optional = true}
polars = { version = "0.33.2", features = ["dtype-full"], optional = true}

[dev-dependencies]
doc-comment = "0.3"
Expand All @@ -70,7 +70,7 @@ uuid = { version = "1.0", features = ["v4"] }
unicase = "2.6.0"
rand = "0.8.3"
tempdir = "0.3.7"
polars-core = "*"
polars-core = "0.33.2"
# criterion = "0.3"

# [[bench]]
Expand Down
4 changes: 2 additions & 2 deletions libduckdb-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ extensions-full = ["httpfs", "json", "parquet"]

[build-dependencies]
autocfg = "1.0"
bindgen = { version = "0.66", optional = true, default-features = false, features = ["runtime"] }
bindgen = { version = "0.68", optional = true, default-features = false, features = ["runtime"] }
flate2 = "1.0"
pkg-config = { version = "0.3.24", optional = true }
cc = { version = "1.0", features = ["parallel"], optional = true }
Expand All @@ -39,4 +39,4 @@ serde_json = { version = "1.0" }
tar = "0.4.38"

[dev-dependencies]
arrow = { version = "44", default-features = false, features = ["ffi"] }
arrow = { version = "47", default-features = false, features = ["ffi"] }
8 changes: 4 additions & 4 deletions src/raw_statement.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{convert::TryFrom, ffi::CStr, ptr, sync::Arc};
use std::{convert::TryFrom, ffi::CStr, ptr, rc::Rc, sync::Arc};

use arrow::{
array::StructArray,
Expand Down Expand Up @@ -228,14 +228,14 @@ impl RawStatement {
result_from_duckdb_arrow(rc, out)?;

let rows_changed = ffi::duckdb_arrow_rows_changed(out);
let mut c_schema = Arc::into_raw(Arc::new(FFI_ArrowSchema::empty()));
let mut c_schema = Rc::into_raw(Rc::new(FFI_ArrowSchema::empty()));
let rc = ffi::duckdb_query_arrow_schema(out, &mut c_schema as *mut _ as *mut ffi::duckdb_arrow_schema);
if rc != ffi::DuckDBSuccess {
Arc::from_raw(c_schema);
Rc::from_raw(c_schema);
result_from_duckdb_arrow(rc, out)?;
}
self.schema = Some(Arc::new(Schema::try_from(&*c_schema).unwrap()));
Arc::from_raw(c_schema);
Rc::from_raw(c_schema);

self.result = Some(out);
Ok(rows_changed as usize)
Expand Down
4 changes: 2 additions & 2 deletions src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ mod test {
fn test_option() -> Result<()> {
let db = checked_memory_handle()?;

let s = Some("hello, world!");
let s = "hello, world!";
let b = Some(vec![1u8, 2, 3, 4]);

db.execute("INSERT INTO foo(t) VALUES (?)", [&s])?;
Expand All @@ -268,7 +268,7 @@ mod test {
let row1 = rows.next()?.unwrap();
let s1: Option<String> = row1.get_unwrap(0);
let b1: Option<Vec<u8>> = row1.get_unwrap(1);
assert_eq!(s.unwrap(), s1.unwrap());
assert_eq!(s, s1.unwrap());
assert!(b1.is_none());
}

Expand Down
Loading