Skip to content

Commit

Permalink
Update arrow requirement from 16 to 17 (#61)
Browse files Browse the repository at this point in the history
* Update arrow requirement from 16 to 17

Updates the requirements on [arrow](https://github.com/apache/arrow-rs) to permit the latest version.
- [Release notes](https://github.com/apache/arrow-rs/releases)
- [Changelog](https://github.com/apache/arrow-rs/blob/master/CHANGELOG.md)
- [Commits](apache/arrow-rs@16.0.0...17.0.0)

---
updated-dependencies:
- dependency-name: arrow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix i128 error

Change-Id: I5cede00b83e53187f86106a6a1049479bc14fb64

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: wangfenjin <[email protected]>
  • Loading branch information
dependabot[bot] and wangfenjin authored Jun 28, 2022
1 parent 54c326a commit 30d8e3e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ memchr = "2.3"
uuid = { version = "1.0", optional = true }
smallvec = "1.6.1"
cast = { version = "0.3", features = ["std"] }
arrow = { version = "16", default-features = false, features = ["prettyprint"] }
arrow = { version = "17", default-features = false, features = ["prettyprint"] }
rust_decimal = "1.14"
strum = { version = "0.24", features = ["derive"] }
r2d2 = { version = "0.8.9", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion libduckdb-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ cc = { version = "1.0", features = ["parallel"], optional = true }
vcpkg = { version = "0.2", optional = true }

[dev-dependencies]
arrow = { version = "16", default-features = false }
arrow = { version = "17", default-features = false }
7 changes: 5 additions & 2 deletions src/row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,12 @@ impl<'stmt> Row<'stmt> {
}
// hugeint: d:38,0
if array.scale() == 0 {
return ValueRef::HugeInt(array.value(row));
return ValueRef::HugeInt(array.value(row).into());
}
ValueRef::Decimal(Decimal::from_i128_with_scale(array.value(row), array.scale() as u32))
ValueRef::Decimal(Decimal::from_i128_with_scale(
array.value(row).into(),
array.scale() as u32,
))
}
DataType::Timestamp(unit, _) if *unit == TimeUnit::Second => {
let array = column.as_any().downcast_ref::<array::TimestampSecondArray>().unwrap();
Expand Down

0 comments on commit 30d8e3e

Please sign in to comment.