Thanks to visit codestin.com
Credit goes to github.com

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
2 changes: 1 addition & 1 deletion .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
name: Download duckdb
with:
repository: "duckdb/duckdb"
tag: "v1.2.2"
tag: "v1.3.0"
fileName: ${{ matrix.duckdb }}
out-file-path: .

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

[workspace.package]
version = "1.2.2"
version = "1.3.0"
authors = ["wangfenjin <[email protected]>"]
edition = "2021"
repository = "https://github.com/duckdb/duckdb-rs"
Expand All @@ -19,9 +19,9 @@ license = "MIT"
categories = ["database"]

[workspace.dependencies]
duckdb = { version = "=1.2.2", path = "crates/duckdb" }
libduckdb-sys = { version = "=1.2.2", path = "crates/libduckdb-sys" }
duckdb-loadable-macros = { version = "=0.1.6", path = "crates/duckdb-loadable-macros" }
duckdb = { version = "=1.3.0", path = "crates/duckdb" }
libduckdb-sys = { version = "=1.3.0", path = "crates/libduckdb-sys" }
duckdb-loadable-macros = { version = "=0.1.7", path = "crates/duckdb-loadable-macros" }
autocfg = "1.0"
bindgen = { version = "0.71.1", default-features = false }
byteorder = "1.3"
Expand Down
2 changes: 1 addition & 1 deletion crates/duckdb-loadable-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "duckdb-loadable-macros"
version = "0.1.6"
version = "0.1.7"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions crates/duckdb-loadable-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ pub fn duckdb_entrypoint(_attr: TokenStream, item: TokenStream) -> TokenStream {
/// # Safety
///
/// Will be called by duckdb
#[no_mangle]
#[unsafe(no_mangle)]
pub unsafe extern "C" fn #c_entrypoint(db: *mut std::ffi::c_void) {
unsafe {
let connection = Connection::open_from_raw(db.cast()).expect("can't open db connection");
Expand All @@ -153,7 +153,7 @@ pub fn duckdb_entrypoint(_attr: TokenStream, item: TokenStream) -> TokenStream {
/// # Safety
///
/// Predefined function, don't need to change unless you are sure
#[no_mangle]
#[unsafe(no_mangle)]
pub unsafe extern "C" fn #c_entrypoint_version() -> *const std::ffi::c_char {
unsafe {
ffi::duckdb_library_version()
Expand Down
4 changes: 2 additions & 2 deletions crates/duckdb/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "duckdb"
version = "1.2.2"
version = "1.3.0"
authors.workspace = true
edition.workspace = true
repository.workspace = true
Expand All @@ -18,7 +18,7 @@ description = "Ergonomic wrapper for DuckDB"
name = "duckdb"

[features]
default = []
default = [ ]
bundled = ["libduckdb-sys/bundled"]
json = ["libduckdb-sys/json", "bundled"]
parquet = ["libduckdb-sys/parquet", "bundled"]
Expand Down
1 change: 1 addition & 0 deletions crates/duckdb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ impl Connection {
///
/// Will return `Err` if the underlying DuckDB call fails.
#[inline]
#[allow(clippy::result_large_err)]
pub fn close(self) -> Result<(), (Connection, Error)> {
let r = self.db.borrow_mut().close();
r.map_err(move |err| (self, err))
Expand Down
4 changes: 3 additions & 1 deletion crates/duckdb/src/test_all_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ fn test_large_arrow_types() -> crate::Result<()> {
fn test_with_database(database: &Connection) -> crate::Result<()> {
// uhugeint, time_tz, and dec38_10 aren't supported in the duckdb arrow layer
// union is currently blocked by https://github.com/duckdb/duckdb/pull/11326
let excluded = ["uhugeint", "time_tz", "dec38_10", "union", "varint"];
let excluded = [
"uhugeint", "time_tz", "dec38_10", "union", "varint", "dec_4_1", "dec_9_4", "dec_18_6",
];

let mut binding = database.prepare(&format!(
"SELECT * EXCLUDE ({}) FROM test_all_types()",
Expand Down
8 changes: 4 additions & 4 deletions crates/duckdb/src/vtab/arrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ mod test {
db.register_table_function::<ArrowVTab>("arrow")?;

let rbs: Vec<RecordBatch> = db
.prepare("SELECT * FROM read_parquet('./examples/int32_decimal.parquet');")?
.prepare("SELECT value::DECIMAL(38,0) as value FROM read_parquet('./examples/int32_decimal.parquet');")?
.query_arrow([])?
.collect();
let param = arrow_recordbatch_to_query_params(rbs.into_iter().next().unwrap());
Expand All @@ -1193,7 +1193,7 @@ mod test {
assert_eq!(rb.num_columns(), 1);
let column = rb.column(0).as_any().downcast_ref::<Decimal128Array>().unwrap();
assert_eq!(column.len(), 1);
assert_eq!(column.value(0), i128::from(30000));
assert_eq!(column.value(0), i128::from(300));
Ok(())
}

Expand Down Expand Up @@ -1621,12 +1621,12 @@ mod test {

// With custom width and scale
let array: PrimitiveArray<arrow::datatypes::Decimal128Type> =
Decimal128Array::from(vec![i128::from(12345)]).with_data_type(DataType::Decimal128(5, 2));
Decimal128Array::from(vec![i128::from(12345)]).with_data_type(DataType::Decimal128(38, 10));
check_rust_primitive_array_roundtrip(array.clone(), array)?;

// With width and zero scale
let array: PrimitiveArray<arrow::datatypes::Decimal128Type> =
Decimal128Array::from(vec![i128::from(12345)]).with_data_type(DataType::Decimal128(5, 0));
Decimal128Array::from(vec![i128::from(12345)]).with_data_type(DataType::Decimal128(38, 0));
check_rust_primitive_array_roundtrip(array.clone(), array)?;

Ok(())
Expand Down
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.2.2"
version = "1.3.0"
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 2380 files
Binary file modified crates/libduckdb-sys/duckdb.tar.gz
Binary file not shown.
Loading
Loading