This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git
The following commit(s) were added to refs/heads/main by this push:
new 84493c65d chore(rust): bump edition to 2024, MSRV to 1.85, and update
dependencies (#4043)
84493c65d is described below
commit 84493c65ddffc837704d54055bbee6c8f7b2245d
Author: Pavel Agafonov <[email protected]>
AuthorDate: Wed Jun 10 04:59:16 2026 +0300
chore(rust): bump edition to 2024, MSRV to 1.85, and update dependencies
(#4043)
**Changes**
* Rust edition 2021 -> 2024 with corresponding source code fixes for new
edition requirements
* MSRV 1.81 -> 1.85 across the Rust workspace
* Arrow crates 57.x -> 58.x (lower bound tightened from `>=53.1.0` to
`>=58`)
---------
Signed-off-by: if0ne <[email protected]>
Co-authored-by: David Li <[email protected]>
---
.pre-commit-config.yaml | 2 +
rust/Cargo.lock | 315 ++++++++++-----------
rust/Cargo.toml | 12 +-
rust/core/src/schemas.rs | 12 +-
rust/core/src/sync.rs | 2 +-
rust/driver/datafusion/Cargo.toml | 8 +-
rust/driver/datafusion/src/lib.rs | 3 +-
rust/driver/datafusion/tests/test_datafusion.rs | 20 +-
rust/driver/dummy/src/lib.rs | 18 +-
rust/driver/dummy/tests/driver_exporter_dummy.rs | 4 +-
rust/driver_manager/src/lib.rs | 8 +-
rust/driver_manager/src/profile.rs | 22 +-
rust/driver_manager/src/search.rs | 20 +-
rust/driver_manager/tests/common/mod.rs | 40 ++-
rust/driver_manager/tests/connection_profile.rs | 16 +-
rust/driver_manager/tests/driver_manager_sqlite.rs | 4 +-
rust/driver_manager/tests/test_env_var_profiles.rs | 6 +-
rust/ffi/src/driver_exporter.rs | 27 +-
rust/ffi/src/lib.rs | 2 +
rust/ffi/src/options.rs | 2 +-
rust/ffi/src/types.rs | 3 +-
21 files changed, 288 insertions(+), 258 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 05c1bd261..b1e431512 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -145,10 +145,12 @@ repos:
name: rustfmt
files: ^rust/
args: ["--all", "--manifest-path", "rust/Cargo.toml", "--"]
+ pass_filenames: false
- id: fmt
name: rustfmt-node
files: ^javascript/
args: ["--all", "--manifest-path", "javascript/Cargo.toml", "--"]
+ pass_filenames: false
- repo: https://github.com/codespell-project/codespell
rev: 63c8f8312b7559622c0d82815639671ae42132ac # v2.4.1
hooks:
diff --git a/rust/Cargo.lock b/rust/Cargo.lock
index 1c065643b..bc7199772 100644
--- a/rust/Cargo.lock
+++ b/rust/Cargo.lock
@@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
-version = 3
+version = 4
[[package]]
name = "adbc_core"
@@ -114,9 +114,9 @@ checksum =
"7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
[[package]]
name = "arrow"
-version = "58.1.0"
+version = "58.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d441fdda254b65f3e9025910eb2c2066b6295d9c8ed409522b8d2ace1ff8574c"
+checksum = "378530e55cd479eda3c14eb345310799717e6f76d0c332041e8487022166b471"
dependencies = [
"arrow-arith",
"arrow-array",
@@ -135,9 +135,9 @@ dependencies = [
[[package]]
name = "arrow-arith"
-version = "58.1.0"
+version = "58.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ced5406f8b720cc0bc3aa9cf5758f93e8593cda5490677aa194e4b4b383f9a59"
+checksum = "a0ab212d2c1886e802f51c5212d78ebbcbb0bec980fff9dadc1eb8d45cd0b738"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -180,9 +180,9 @@ dependencies = [
[[package]]
name = "arrow-cast"
-version = "58.1.0"
+version = "58.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b0127816c96533d20fc938729f48c52d3e48f99717e7a0b5ade77d742510736d"
+checksum = "4c5aefb56a2c02e9e2b30746241058b85f8983f0fcff2ba0c6d09006e1cded7f"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -202,9 +202,9 @@ dependencies = [
[[package]]
name = "arrow-csv"
-version = "58.1.0"
+version = "58.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca025bd0f38eeecb57c2153c0123b960494138e6a957bbda10da2b25415209fe"
+checksum = "e94e8cf7e517657a52b91ea1263acf38c4ca62a84655d72458a3359b12ab97de"
dependencies = [
"arrow-array",
"arrow-cast",
@@ -230,9 +230,9 @@ dependencies = [
[[package]]
name = "arrow-ipc"
-version = "58.1.0"
+version = "58.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "609a441080e338147a84e8e6904b6da482cefb957c5cdc0f3398872f69a315d0"
+checksum = "238438f0834483703d88896db6fe5a7138b2230debc31b34c0336c2996e3c64f"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -245,15 +245,16 @@ dependencies = [
[[package]]
name = "arrow-json"
-version = "58.1.0"
+version = "58.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ead0914e4861a531be48fe05858265cf854a4880b9ed12618b1d08cba9bebc8"
+checksum = "205ca2119e6d679d5c133c6f30e68f027738d95ed948cf77677ea69c7800036b"
dependencies = [
"arrow-array",
"arrow-buffer",
"arrow-cast",
- "arrow-data",
+ "arrow-ord",
"arrow-schema",
+ "arrow-select",
"chrono",
"half",
"indexmap",
@@ -269,9 +270,9 @@ dependencies = [
[[package]]
name = "arrow-ord"
-version = "58.1.0"
+version = "58.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "763a7ba279b20b52dad300e68cfc37c17efa65e68623169076855b3a9e941ca5"
+checksum = "1bffd8fd2579286a5d63bac898159873e5094a79009940bcb42bbfce4f19f1d0"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -282,9 +283,9 @@ dependencies = [
[[package]]
name = "arrow-row"
-version = "58.1.0"
+version = "58.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e14fe367802f16d7668163ff647830258e6e0aeea9a4d79aaedf273af3bdcd3e"
+checksum = "bab5994731204603c73ba69267616c50f80780774c6bb0476f1f830625115e0c"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -320,9 +321,9 @@ dependencies = [
[[package]]
name = "arrow-string"
-version = "58.1.0"
+version = "58.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61e04a01f8bb73ce54437514c5fd3ee2aa3e8abe4c777ee5cc55853b1652f79e"
+checksum = "29dd7cda3ab9692f43a2e4acc444d760cc17b12bb6d8232ddf64e9bab7c06b42"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -368,9 +369,9 @@ dependencies = [
[[package]]
name = "autocfg"
-version = "1.5.0"
+version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
+checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
[[package]]
name = "base64"
@@ -393,15 +394,15 @@ dependencies = [
[[package]]
name = "bitflags"
-version = "2.11.0"
+version = "2.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
+checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8"
[[package]]
name = "bumpalo"
-version = "3.20.2"
+version = "3.20.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
+checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
[[package]]
name = "bytes"
@@ -411,9 +412,9 @@ checksum =
"1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
[[package]]
name = "cc"
-version = "1.2.57"
+version = "1.2.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423"
+checksum = "556e016178bb5662a08681bbe0f00f8e17631781a4dfc8c45e466e4b185ec27f"
dependencies = [
"find-msvc-tools",
"shlex",
@@ -427,9 +428,9 @@ checksum =
"9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
[[package]]
name = "chrono"
-version = "0.4.44"
+version = "0.4.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0"
+checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327"
dependencies = [
"iana-time-zone",
"num-traits",
@@ -517,9 +518,9 @@ dependencies = [
[[package]]
name = "dashmap"
-version = "6.1.0"
+version = "6.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf"
+checksum = "e6361d5c062261c78a176addb82d4c821ae42bed6089de0e12603cd25de2059c"
dependencies = [
"cfg-if",
"crossbeam-utils",
@@ -1162,9 +1163,9 @@ dependencies = [
[[package]]
name = "displaydoc"
-version = "0.2.5"
+version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
+checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f"
dependencies = [
"proc-macro2",
"quote",
@@ -1179,9 +1180,9 @@ checksum =
"d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"
[[package]]
name = "either"
-version = "1.15.0"
+version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
+checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e"
[[package]]
name = "equivalent"
@@ -1201,9 +1202,9 @@ dependencies = [
[[package]]
name = "fastrand"
-version = "2.3.0"
+version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
+checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
[[package]]
name = "find-msvc-tools"
@@ -1436,9 +1437,9 @@ checksum =
"7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
[[package]]
name = "http"
-version = "1.4.0"
+version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a"
+checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425"
dependencies = [
"bytes",
"itoa",
@@ -1476,12 +1477,13 @@ dependencies = [
[[package]]
name = "icu_collections"
-version = "2.1.1"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43"
+checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c"
dependencies = [
"displaydoc",
"potential_utf",
+ "utf8_iter",
"yoke",
"zerofrom",
"zerovec",
@@ -1489,9 +1491,9 @@ dependencies = [
[[package]]
name = "icu_locale_core"
-version = "2.1.1"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6"
+checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29"
dependencies = [
"displaydoc",
"litemap",
@@ -1502,9 +1504,9 @@ dependencies = [
[[package]]
name = "icu_normalizer"
-version = "2.1.1"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599"
+checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4"
dependencies = [
"icu_collections",
"icu_normalizer_data",
@@ -1516,15 +1518,15 @@ dependencies = [
[[package]]
name = "icu_normalizer_data"
-version = "2.1.1"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a"
+checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38"
[[package]]
name = "icu_properties"
-version = "2.1.2"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec"
+checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de"
dependencies = [
"icu_collections",
"icu_locale_core",
@@ -1536,15 +1538,15 @@ dependencies = [
[[package]]
name = "icu_properties_data"
-version = "2.1.2"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af"
+checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14"
[[package]]
name = "icu_provider"
-version = "2.1.1"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614"
+checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421"
dependencies = [
"displaydoc",
"icu_locale_core",
@@ -1574,9 +1576,9 @@ dependencies = [
[[package]]
name = "idna_adapter"
-version = "1.2.1"
+version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344"
+checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714"
dependencies = [
"icu_normalizer",
"icu_properties",
@@ -1584,12 +1586,12 @@ dependencies = [
[[package]]
name = "indexmap"
-version = "2.13.0"
+version = "2.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017"
+checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
dependencies = [
"equivalent",
- "hashbrown 0.16.1",
+ "hashbrown 0.17.1",
"serde",
"serde_core",
]
@@ -1611,11 +1613,12 @@ checksum =
"8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
[[package]]
name = "js-sys"
-version = "0.3.91"
+version = "0.3.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c"
+checksum = "f2025f20d7a4fa7785846e7b63d10a76d3f1cee98ee5cb79ea59703f95e42162"
dependencies = [
- "once_cell",
+ "cfg-if",
+ "futures-util",
"wasm-bindgen",
]
@@ -1684,9 +1687,9 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.183"
+version = "0.2.186"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
+checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
[[package]]
name = "libloading"
@@ -1712,9 +1715,9 @@ checksum =
"32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
[[package]]
name = "litemap"
-version = "0.8.1"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77"
+checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0"
[[package]]
name = "lock_api"
@@ -1727,24 +1730,24 @@ dependencies = [
[[package]]
name = "log"
-version = "0.4.29"
+version = "0.4.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
+checksum = "953f07c43838f8e6f9758cab68bf5bed85465e7587ebe0b823f1bcd81978ad3a"
[[package]]
name = "lz4_flex"
-version = "0.13.0"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db9a0d582c2874f68138a16ce1867e0ffde6c0bb0a0df85e1f36d04146db488a"
+checksum = "7ef0d4ed8669f8f8826eb00dc878084aa8f253506c4fd5e8f58f5bce72ddb97e"
dependencies = [
"twox-hash",
]
[[package]]
name = "memchr"
-version = "2.8.0"
+version = "2.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
+checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8"
[[package]]
name = "multimap"
@@ -1938,9 +1941,9 @@ checksum =
"a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
[[package]]
name = "potential_utf"
-version = "0.1.4"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77"
+checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564"
dependencies = [
"zerovec",
]
@@ -1975,9 +1978,9 @@ dependencies = [
[[package]]
name = "prost"
-version = "0.14.3"
+version = "0.14.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d2ea70524a2f82d518bce41317d0fae74151505651af45faf1ffbd6fd33f0568"
+checksum = "528ac67416ff8646872a3c02cad9cc4ee5dc9f9540c9b10771855c95cb2e5ae1"
dependencies = [
"bytes",
"prost-derive",
@@ -1985,9 +1988,9 @@ dependencies = [
[[package]]
name = "prost-build"
-version = "0.14.3"
+version = "0.14.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "343d3bd7056eda839b03204e68deff7d1b13aba7af2b2fd16890697274262ee7"
+checksum = "03da047801ff44bb6a4d407d4860c05fd70bb81714e6b2f3812603d5b145b042"
dependencies = [
"heck",
"itertools",
@@ -2004,9 +2007,9 @@ dependencies = [
[[package]]
name = "prost-derive"
-version = "0.14.3"
+version = "0.14.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b"
+checksum = "b570b25f7617e43d59005d0990ccb79e950a423952cea19671b7a876da390adf"
dependencies = [
"anyhow",
"itertools",
@@ -2017,9 +2020,9 @@ dependencies = [
[[package]]
name = "prost-types"
-version = "0.14.3"
+version = "0.14.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8991c4cbdb8bc5b11f0b074ffe286c30e523de90fee5ba8132f1399f23cb3dd7"
+checksum = "f94967dc7688f3054c7fac87473ffae4cc4c3904800e2d9f5b857246d8963b0a"
dependencies = [
"prost",
]
@@ -2085,9 +2088,9 @@ dependencies = [
[[package]]
name = "regex"
-version = "1.12.3"
+version = "1.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276"
+checksum = "f1292b7759ae1cb9ec195452d1390a074f0cd8541ab7a5a8c31cd6db45d4a6ba"
dependencies = [
"aho-corasick",
"memchr",
@@ -2108,9 +2111,9 @@ dependencies = [
[[package]]
name = "regex-syntax"
-version = "0.8.10"
+version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a"
+checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
[[package]]
name = "regress"
@@ -2197,9 +2200,9 @@ checksum =
"94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "semver"
-version = "1.0.27"
+version = "1.0.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
+checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
dependencies = [
"serde",
"serde_core",
@@ -2248,9 +2251,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.149"
+version = "1.0.150"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
+checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9"
dependencies = [
"itoa",
"memchr",
@@ -2261,9 +2264,9 @@ dependencies = [
[[package]]
name = "serde_spanned"
-version = "1.1.0"
+version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "876ac351060d4f882bb1032b6369eb0aef79ad9df1ea8bc404874d8cc3d0cd98"
+checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26"
dependencies = [
"serde_core",
]
@@ -2320,9 +2323,9 @@ dependencies = [
[[package]]
name = "shlex"
-version = "1.3.0"
+version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
[[package]]
name = "simdutf8"
@@ -2332,9 +2335,9 @@ checksum =
"e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"
[[package]]
name = "siphasher"
-version = "1.0.2"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e"
+checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649"
[[package]]
name = "slab"
@@ -2475,9 +2478,9 @@ dependencies = [
[[package]]
name = "tinystr"
-version = "0.8.2"
+version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869"
+checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d"
dependencies = [
"displaydoc",
"zerovec",
@@ -2532,9 +2535,9 @@ dependencies = [
[[package]]
name = "toml"
-version = "1.1.0+spec-1.1.0"
+version = "1.1.2+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8195ca05e4eb728f4ba94f3e3291661320af739c4e43779cbdfae82ab239fcc"
+checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee"
dependencies = [
"serde_spanned",
"toml_datetime",
@@ -2545,27 +2548,27 @@ dependencies = [
[[package]]
name = "toml_datetime"
-version = "1.1.0+spec-1.1.0"
+version = "1.1.1+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97251a7c317e03ad83774a8752a7e81fb6067740609f75ea2b585b569a59198f"
+checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7"
dependencies = [
"serde_core",
]
[[package]]
name = "toml_parser"
-version = "1.1.0+spec-1.1.0"
+version = "1.1.2+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2334f11ee363607eb04df9b8fc8a13ca1715a72ba8662a26ac285c98aabb4011"
+checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526"
dependencies = [
"winnow",
]
[[package]]
name = "toml_writer"
-version = "1.1.0+spec-1.1.0"
+version = "1.1.1+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d282ade6016312faf3e41e57ebbba0c073e4056dab1232ab1cb624199648f8ed"
+checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db"
[[package]]
name = "tracing"
@@ -2659,9 +2662,9 @@ checksum =
"e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
[[package]]
name = "unicode-segmentation"
-version = "1.13.1"
+version = "1.13.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da36089a805484bcccfffe0739803392c8298778a2d2f09febf76fac5ad9025b"
+checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8"
[[package]]
name = "unicode-width"
@@ -2701,9 +2704,9 @@ checksum =
"b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
[[package]]
name = "uuid"
-version = "1.22.0"
+version = "1.23.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37"
+checksum = "144d6b123cef80b301b8f72a9e2ca4370ddec21950d0a103dd22c437006d2db7"
dependencies = [
"getrandom 0.4.2",
"js-sys",
@@ -2734,11 +2737,11 @@ checksum =
"ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
[[package]]
name = "wasip2"
-version = "1.0.2+wasi-0.2.9"
+version = "1.0.3+wasi-0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5"
+checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6"
dependencies = [
- "wit-bindgen",
+ "wit-bindgen 0.57.1",
]
[[package]]
@@ -2747,14 +2750,14 @@ version = "0.4.0+wasi-0.3.0-rc-2026-01-06"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5"
dependencies = [
- "wit-bindgen",
+ "wit-bindgen 0.51.0",
]
[[package]]
name = "wasm-bindgen"
-version = "0.2.114"
+version = "0.2.123"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e"
+checksum = "a254a4b10c19a76f09a27640e7ffbf9bc30bf67e16a3bf28aaefa4920fe81563"
dependencies = [
"cfg-if",
"once_cell",
@@ -2765,23 +2768,19 @@ dependencies = [
[[package]]
name = "wasm-bindgen-futures"
-version = "0.4.64"
+version = "0.4.73"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8"
+checksum = "54568702fabf5d4849ce2b90fadfa64168a097eaf4b351ce9df8b687a0086aaf"
dependencies = [
- "cfg-if",
- "futures-util",
"js-sys",
- "once_cell",
"wasm-bindgen",
- "web-sys",
]
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.114"
+version = "0.2.123"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6"
+checksum = "24a40fc75b0ec6f3746ceb10d36f53a93dcd68a93b11b6445983945d79eba0dc"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -2789,9 +2788,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.114"
+version = "0.2.123"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3"
+checksum = "908f34bd9b9ce3d4caf07b72dfab63d61504d156856c6bd3cd87fa350cf3985b"
dependencies = [
"bumpalo",
"proc-macro2",
@@ -2802,9 +2801,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.114"
+version = "0.2.123"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16"
+checksum = "7acbf7616c27b194bbb550bf77ed0c2c3e5b7fd1260a93082b95fb7f47959b92"
dependencies = [
"unicode-ident",
]
@@ -2843,16 +2842,6 @@ dependencies = [
"semver",
]
-[[package]]
-name = "web-sys"
-version = "0.3.91"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9"
-dependencies = [
- "js-sys",
- "wasm-bindgen",
-]
-
[[package]]
name = "web-time"
version = "1.1.0"
@@ -2953,9 +2942,9 @@ dependencies = [
[[package]]
name = "winnow"
-version = "1.0.0"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a90e88e4667264a994d34e6d1ab2d26d398dcdca8b7f52bec8668957517fc7d8"
+checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1"
[[package]]
name = "wit-bindgen"
@@ -2966,6 +2955,12 @@ dependencies = [
"wit-bindgen-rust-macro",
]
+[[package]]
+name = "wit-bindgen"
+version = "0.57.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
+
[[package]]
name = "wit-bindgen-core"
version = "0.51.0"
@@ -3047,15 +3042,15 @@ dependencies = [
[[package]]
name = "writeable"
-version = "0.6.2"
+version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9"
+checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4"
[[package]]
name = "yoke"
-version = "0.8.1"
+version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954"
+checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5"
dependencies = [
"stable_deref_trait",
"yoke-derive",
@@ -3064,9 +3059,9 @@ dependencies = [
[[package]]
name = "yoke-derive"
-version = "0.8.1"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d"
+checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e"
dependencies = [
"proc-macro2",
"quote",
@@ -3076,18 +3071,18 @@ dependencies = [
[[package]]
name = "zerocopy"
-version = "0.8.47"
+version = "0.8.52"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "efbb2a062be311f2ba113ce66f697a4dc589f85e78a4aea276200804cea0ed87"
+checksum = "ce1022995ff5ff5d841ad7d994facc23098cd40152f2c1d11cd607c6f530653f"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
-version = "0.8.47"
+version = "0.8.52"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e8bc7269b54418e7aeeef514aa68f8690b8c0489a06b0136e5f57c4c5ccab89"
+checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930"
dependencies = [
"proc-macro2",
"quote",
@@ -3096,18 +3091,18 @@ dependencies = [
[[package]]
name = "zerofrom"
-version = "0.1.6"
+version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5"
+checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272"
dependencies = [
"zerofrom-derive",
]
[[package]]
name = "zerofrom-derive"
-version = "0.1.6"
+version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"
+checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1"
dependencies = [
"proc-macro2",
"quote",
@@ -3117,9 +3112,9 @@ dependencies = [
[[package]]
name = "zerotrie"
-version = "0.2.3"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851"
+checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf"
dependencies = [
"displaydoc",
"yoke",
@@ -3128,9 +3123,9 @@ dependencies = [
[[package]]
name = "zerovec"
-version = "0.11.5"
+version = "0.11.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002"
+checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239"
dependencies = [
"yoke",
"zerofrom",
@@ -3139,9 +3134,9 @@ dependencies = [
[[package]]
name = "zerovec-derive"
-version = "0.11.2"
+version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3"
+checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555"
dependencies = [
"proc-macro2",
"quote",
diff --git a/rust/Cargo.toml b/rust/Cargo.toml
index 05921e5d7..c600c69be 100644
--- a/rust/Cargo.toml
+++ b/rust/Cargo.toml
@@ -22,8 +22,8 @@ resolver = "2"
[workspace.package]
version = "0.24.0"
description = "Rust implementation of Arrow Database Connectivity (ADBC)"
-edition = "2021"
-rust-version = "1.81"
+edition = "2024"
+rust-version = "1.85"
authors = ["Apache Arrow <[email protected]>"]
license = "Apache-2.0"
documentation = "https://docs.rs/adbc_core/"
@@ -37,9 +37,9 @@ categories = ["database"]
adbc_core = { path = "./core", version = "0.24.0" }
adbc_driver_manager = { path = "./driver_manager", version = "0.24.0" }
adbc_ffi = { path = "./ffi", version = "0.24.0" }
-arrow-array = { version = ">=53.1.0, <59", default-features = false, features
= [
+arrow-array = { version = ">=58.1, <59", default-features = false, features = [
"ffi",
] }
-arrow-buffer = { version = ">=53.1.0, <59", default-features = false }
-arrow-schema = { version = ">=53.1.0, <59", default-features = false }
-arrow-select = { version = ">=53.1.0, <59", default-features = false }
+arrow-buffer = { version = ">=58.1, <59", default-features = false }
+arrow-schema = { version = ">=58.1, <59", default-features = false }
+arrow-select = { version = ">=58.1, <59", default-features = false }
diff --git a/rust/core/src/schemas.rs b/rust/core/src/schemas.rs
index 5f6fb1460..03baf0739 100644
--- a/rust/core/src/schemas.rs
+++ b/rust/core/src/schemas.rs
@@ -33,8 +33,7 @@ pub static GET_TABLE_TYPES_SCHEMA: LazyLock<SchemaRef> =
LazyLock::new(|| {
/// Schema of the data returned by [get_info][crate::Connection::get_info].
pub static GET_INFO_SCHEMA: LazyLock<SchemaRef> = LazyLock::new(|| {
let info_schema = DataType::Union(
- #[allow(deprecated)] // TODO: remove this once update the minimum
arrow version to 57.2.0
- UnionFields::new(
+ UnionFields::try_new(
vec![0, 1, 2, 3, 4, 5],
vec![
Field::new("string_value", DataType::Utf8, true),
@@ -55,7 +54,8 @@ pub static GET_INFO_SCHEMA: LazyLock<SchemaRef> =
LazyLock::new(|| {
true,
),
],
- ),
+ )
+ .expect("must be valid"),
UnionMode::Dense,
);
@@ -75,8 +75,7 @@ pub static GET_STATISTIC_NAMES_SCHEMA: LazyLock<SchemaRef> =
LazyLock::new(|| {
pub static STATISTIC_VALUE_SCHEMA: LazyLock<DataType> = LazyLock::new(|| {
DataType::Union(
- #[allow(deprecated)] // TODO: remove this once update the minimum
arrow version to 57.2.0
- UnionFields::new(
+ UnionFields::try_new(
vec![0, 1, 2, 3],
vec![
Field::new("int64", DataType::Int64, true),
@@ -84,7 +83,8 @@ pub static STATISTIC_VALUE_SCHEMA: LazyLock<DataType> =
LazyLock::new(|| {
Field::new("float64", DataType::Float64, true),
Field::new("binary", DataType::Binary, true),
],
- ),
+ )
+ .expect("must be valid"),
UnionMode::Dense,
)
});
diff --git a/rust/core/src/sync.rs b/rust/core/src/sync.rs
index de26918b9..e14c6b224 100644
--- a/rust/core/src/sync.rs
+++ b/rust/core/src/sync.rs
@@ -20,9 +20,9 @@ use std::collections::HashSet;
use arrow_array::{RecordBatch, RecordBatchReader};
use arrow_schema::Schema;
+use crate::PartitionedResult;
use crate::error::Result;
use crate::options::{self, OptionConnection, OptionDatabase, OptionStatement,
OptionValue};
-use crate::PartitionedResult;
/// Ability to configure an object by setting/getting options.
pub trait Optionable {
diff --git a/rust/driver/datafusion/Cargo.toml
b/rust/driver/datafusion/Cargo.toml
index af9e09d66..6a694d78e 100644
--- a/rust/driver/datafusion/Cargo.toml
+++ b/rust/driver/datafusion/Cargo.toml
@@ -33,16 +33,16 @@ categories.workspace = true
[dependencies]
adbc_core.workspace = true
adbc_ffi = { workspace = true, optional = true }
-arrow-array = "58"
-arrow-buffer = "58"
-arrow-schema = "58"
+arrow-array = { version = ">=58.1, <59", default-features = false }
+arrow-buffer = { version = ">=58.1, <59", default-features = false }
+arrow-schema = { version = ">=58.1, <59", default-features = false }
datafusion = { version = "53.1.0", default-features = false }
datafusion-substrait = { version = "53.1.0", default-features = false }
tokio = { version = "1.52", features = ["rt-multi-thread"] }
prost = "0.14.3"
[dev-dependencies]
-arrow-select = "58"
+arrow-select = ">=58.1, <59"
[lib]
crate-type = ["lib", "cdylib"]
diff --git a/rust/driver/datafusion/src/lib.rs
b/rust/driver/datafusion/src/lib.rs
index 0db317a72..62afa36b6 100644
--- a/rust/driver/datafusion/src/lib.rs
+++ b/rust/driver/datafusion/src/lib.rs
@@ -41,11 +41,12 @@ use arrow_buffer::{OffsetBuffer, ScalarBuffer};
use arrow_schema::{ArrowError, DataType, Field, SchemaRef};
use adbc_core::{
+ Connection, Database, Driver, Optionable, Statement,
error::{Error, Result, Status},
options::{
InfoCode, ObjectDepth, OptionConnection, OptionDatabase,
OptionStatement, OptionValue,
},
- schemas, Connection, Database, Driver, Optionable, Statement,
+ schemas,
};
pub enum Runtime {
diff --git a/rust/driver/datafusion/tests/test_datafusion.rs
b/rust/driver/datafusion/tests/test_datafusion.rs
index 9123a480a..0d2767ede 100644
--- a/rust/driver/datafusion/tests/test_datafusion.rs
+++ b/rust/driver/datafusion/tests/test_datafusion.rs
@@ -136,7 +136,10 @@ fn test_get_objects_database() {
fn test_execute_sql() {
let mut connection = get_connection(None);
- execute_update(&mut connection, "CREATE TABLE IF NOT EXISTS
datafusion.public.example (c1 INT, c2 VARCHAR) AS
VALUES(1,'HELLO'),(2,'DATAFUSION'),(3,'!')");
+ execute_update(
+ &mut connection,
+ "CREATE TABLE IF NOT EXISTS datafusion.public.example (c1 INT, c2
VARCHAR) AS VALUES(1,'HELLO'),(2,'DATAFUSION'),(3,'!')",
+ );
let batch = execute_sql_query(&mut connection, "SELECT * FROM
datafusion.public.example");
@@ -148,7 +151,10 @@ fn test_execute_sql() {
fn test_ingest() {
let mut connection = get_connection(None);
- execute_update(&mut connection, "CREATE TABLE IF NOT EXISTS
datafusion.public.example (c1 INT, c2 VARCHAR) AS
VALUES(1,'HELLO'),(2,'DATAFUSION'),(3,'!')");
+ execute_update(
+ &mut connection,
+ "CREATE TABLE IF NOT EXISTS datafusion.public.example (c1 INT, c2
VARCHAR) AS VALUES(1,'HELLO'),(2,'DATAFUSION'),(3,'!')",
+ );
let batch = execute_sql_query(&mut connection, "SELECT * FROM
datafusion.public.example");
@@ -174,7 +180,10 @@ fn test_ingest() {
fn test_execute_substrait() {
let mut connection = get_connection(None);
- execute_update(&mut connection, "CREATE TABLE IF NOT EXISTS
datafusion.public.example (c1 INT, c2 VARCHAR) AS
VALUES(1,'HELLO'),(2,'DATAFUSION'),(3,'!')");
+ execute_update(
+ &mut connection,
+ "CREATE TABLE IF NOT EXISTS datafusion.public.example (c1 INT, c2
VARCHAR) AS VALUES(1,'HELLO'),(2,'DATAFUSION'),(3,'!')",
+ );
let ctx = SessionContext::new();
@@ -203,7 +212,10 @@ fn test_execute_substrait() {
async fn test_running_in_async() {
let mut connection =
get_connection(Some(tokio::runtime::Handle::current()));
- execute_update(&mut connection, "CREATE TABLE IF NOT EXISTS
datafusion.public.example (c1 INT, c2 VARCHAR) AS
VALUES(1,'HELLO'),(2,'DATAFUSION'),(3,'!')");
+ execute_update(
+ &mut connection,
+ "CREATE TABLE IF NOT EXISTS datafusion.public.example (c1 INT, c2
VARCHAR) AS VALUES(1,'HELLO'),(2,'DATAFUSION'),(3,'!')",
+ );
let batch = execute_sql_query(&mut connection, "SELECT * FROM
datafusion.public.example");
diff --git a/rust/driver/dummy/src/lib.rs b/rust/driver/dummy/src/lib.rs
index 72c81f178..7879873ca 100644
--- a/rust/driver/dummy/src/lib.rs
+++ b/rust/driver/dummy/src/lib.rs
@@ -29,12 +29,12 @@ use arrow_buffer::{OffsetBuffer, ScalarBuffer};
use arrow_schema::{ArrowError, DataType, Field, Schema, SchemaRef,
UnionFields};
use adbc_core::{
- constants,
+ Connection, Database, Driver, Optionable, PartitionedResult, Statement,
constants,
error::{Error, Result, Status},
options::{
InfoCode, ObjectDepth, OptionConnection, OptionDatabase,
OptionStatement, OptionValue,
},
- schemas, Connection, Database, Driver, Optionable, PartitionedResult,
Statement,
+ schemas,
};
#[derive(Debug)]
@@ -372,9 +372,7 @@ impl Connection for DummyConnection {
.collect::<ScalarBuffer<i32>>();
let value_array = UnionArray::try_new(
- #[allow(deprecated)]
- // TODO: remove this once update the minimum arrow version to
57.2.0
- UnionFields::new(
+ UnionFields::try_new(
[0, 1, 2, 3, 4, 5],
[
Field::new("string_value",
string_value_array.data_type().clone(), true),
@@ -392,7 +390,8 @@ impl Connection for DummyConnection {
true,
),
],
- ),
+ )
+ .expect("must be valid"),
type_id_buffer,
Some(value_offsets_buffer),
vec![
@@ -665,9 +664,7 @@ impl Connection for DummyConnection {
let type_id_buffer = [1_i8].into_iter().collect::<ScalarBuffer<i8>>();
let value_offsets_buffer =
[0_i32].into_iter().collect::<ScalarBuffer<i32>>();
let statistic_value_array = UnionArray::try_new(
- #[allow(deprecated)]
- // TODO: remove this once update the minimum arrow version to
57.2.0
- UnionFields::new(
+ UnionFields::try_new(
[0, 1, 2, 3],
[
Field::new("int64", DataType::Int64, true),
@@ -675,7 +672,8 @@ impl Connection for DummyConnection {
Field::new("float64", DataType::Float64, true),
Field::new("binary", DataType::Binary, true),
],
- ),
+ )
+ .expect("must be valid"),
type_id_buffer,
Some(value_offsets_buffer),
vec![
diff --git a/rust/driver/dummy/tests/driver_exporter_dummy.rs
b/rust/driver/dummy/tests/driver_exporter_dummy.rs
index 6d1445a45..b64d2016c 100644
--- a/rust/driver/dummy/tests/driver_exporter_dummy.rs
+++ b/rust/driver/dummy/tests/driver_exporter_dummy.rs
@@ -26,12 +26,12 @@ use arrow_array::{Array, Float64Array, Int64Array,
RecordBatch, RecordBatchReade
use arrow_schema::{DataType, Field, Schema};
use arrow_select::concat::concat_batches;
+use adbc_core::Statement;
use adbc_core::options::{
AdbcVersion, InfoCode, IngestMode, IsolationLevel, ObjectDepth,
OptionConnection,
OptionDatabase, OptionStatement,
};
-use adbc_core::Statement;
-use adbc_core::{schemas, Connection, Database, Driver, Optionable};
+use adbc_core::{Connection, Database, Driver, Optionable, schemas};
use adbc_driver_manager::{ManagedConnection, ManagedDatabase, ManagedDriver,
ManagedStatement};
use adbc_dummy::{DummyConnection, DummyDatabase, DummyDriver, DummyStatement,
SingleBatchReader};
diff --git a/rust/driver_manager/src/lib.rs b/rust/driver_manager/src/lib.rs
index 47970de48..bb2cc700d 100644
--- a/rust/driver_manager/src/lib.rs
+++ b/rust/driver_manager/src/lib.rs
@@ -117,20 +117,20 @@ use adbc_ffi::options::{
check_status, get_option_bytes, get_option_string, set_option_connection,
set_option_database,
set_option_statement,
};
-use arrow_array::ffi::{to_ffi, FFI_ArrowSchema};
+use arrow_array::ffi::{FFI_ArrowSchema, to_ffi};
use arrow_array::ffi_stream::{ArrowArrayStreamReader, FFI_ArrowArrayStream};
use arrow_array::{Array, RecordBatch, RecordBatchReader, StructArray};
use adbc_core::{
+ Connection, Database, Driver, LoadFlags, Optionable, PartitionedResult,
Statement,
error::{Error, Result, Status},
options::{self, AdbcVersion, InfoCode, OptionDatabase, OptionValue},
- Connection, Database, Driver, LoadFlags, Optionable, PartitionedResult,
Statement,
};
use adbc_ffi::driver_method;
-use self::search::{parse_driver_uri, DriverLibrary, DriverLocator};
+use self::search::{DriverLibrary, DriverLocator, parse_driver_uri};
use crate::profile::{
- process_profile_value, ConnectionProfile, ConnectionProfileProvider,
FilesystemProfileProvider,
+ ConnectionProfile, ConnectionProfileProvider, FilesystemProfileProvider,
process_profile_value,
};
const ERR_CANCEL_UNSUPPORTED: &str =
diff --git a/rust/driver_manager/src/profile.rs
b/rust/driver_manager/src/profile.rs
index 6697383f0..6c96cef10 100644
--- a/rust/driver_manager/src/profile.rs
+++ b/rust/driver_manager/src/profile.rs
@@ -15,12 +15,12 @@
// specific language governing permissions and limitations
// under the License.
-use crate::search::find_filesystem_profile;
use crate::ManagedDatabase;
+use crate::search::find_filesystem_profile;
use adbc_core::{
+ Optionable,
error::{Error, Result, Status},
options::{OptionDatabase, OptionValue},
- Optionable,
};
use adbc_ffi::FFI_AdbcDriverInitFunc;
use regex::{Captures, Regex};
@@ -374,7 +374,10 @@ pub fn process_profile_value(value: &str) ->
Result<OptionValue> {
let env_var_name = content[8..content.len() - 1].trim();
if env_var_name.is_empty() {
return Err(Error::with_message_and_status(
- format!("empty environment variable name in profile
replacement expression '{{{{ {} }}}}'", content),
+ format!(
+ "empty environment variable name in profile replacement
expression '{{{{ {} }}}}'",
+ content
+ ),
Status::InvalidArguments,
));
}
@@ -383,7 +386,10 @@ pub fn process_profile_value(value: &str) ->
Result<OptionValue> {
Ok(val) => Ok(val),
Err(env::VarError::NotPresent) => Ok("".to_string()),
Err(e) => Err(Error::with_message_and_status(
- format!("error retrieving environment variable '{}' for
profile replacement expression '{{{{ {} }}}}': {}", env_var_name, content, e),
+ format!(
+ "error retrieving environment variable '{}' for profile
replacement expression '{{{{ {} }}}}': {}",
+ env_var_name, content, e
+ ),
Status::InvalidArguments,
)),
}
@@ -842,7 +848,9 @@ key = "value"
for TestCase(name, env_vars, input, expected) in test_cases {
for (k, v) in &env_vars {
- std::env::set_var(k, v);
+ unsafe {
+ std::env::set_var(k, v);
+ }
}
let result = process_profile_value(input);
@@ -883,7 +891,9 @@ key = "value"
}
for (k, _) in &env_vars {
- std::env::remove_var(k);
+ unsafe {
+ std::env::remove_var(k);
+ }
}
}
}
diff --git a/rust/driver_manager/src/search.rs
b/rust/driver_manager/src/search.rs
index a8d35fcb2..5ee80354c 100644
--- a/rust/driver_manager/src/search.rs
+++ b/rust/driver_manager/src/search.rs
@@ -17,7 +17,7 @@
use path_slash::PathBufExt;
use std::borrow::Cow;
-use std::ffi::{c_void, OsStr};
+use std::ffi::{OsStr, c_void};
use std::fmt::Write;
use std::fs;
use std::path::{Path, PathBuf};
@@ -27,10 +27,10 @@ use libloading::Symbol;
use toml::de::{DeTable, DeValue};
use adbc_core::{
+ LOAD_FLAG_ALLOW_RELATIVE_PATHS, LOAD_FLAG_SEARCH_ENV,
LOAD_FLAG_SEARCH_SYSTEM,
+ LOAD_FLAG_SEARCH_USER, LoadFlags,
error::{Error, Result, Status},
options::AdbcVersion,
- LoadFlags, LOAD_FLAG_ALLOW_RELATIVE_PATHS, LOAD_FLAG_SEARCH_ENV,
LOAD_FLAG_SEARCH_SYSTEM,
- LOAD_FLAG_SEARCH_USER,
};
use adbc_ffi::{
options::check_status,
@@ -226,7 +226,7 @@ enum DriverInitFunc<'a> {
}
/// Allow using [DriverInitFunc] as a function pointer.
-impl<'a> ops::Deref for DriverInitFunc<'a> {
+impl ops::Deref for DriverInitFunc<'_> {
type Target = FFI_AdbcDriverInitFunc;
fn deref(&self) -> &Self::Target {
@@ -346,10 +346,10 @@ impl<'a> DriverLibrary<'a> {
Ok(SearchHit::new(info.lib_path, library, info.entrypoint))
}
- pub(crate) fn derive_entrypoint<'b>(
- entrypoint: Option<&'b [u8]>,
+ pub(crate) fn derive_entrypoint(
+ entrypoint: Option<&[u8]>,
driver_path: impl AsRef<OsStr>,
- ) -> Cow<'b, [u8]> {
+ ) -> Cow<'_, [u8]> {
if let Some(entrypoint) = entrypoint {
Cow::Borrowed(entrypoint)
} else {
@@ -712,8 +712,8 @@ const fn arch_triplet() -> (&'static str, &'static str,
&'static str) {
mod target_windows {
use windows_sys as windows;
- use std::ffi::c_void;
use std::ffi::OsString;
+ use std::ffi::c_void;
use std::os::windows::ffi::OsStringExt;
use std::path::PathBuf;
use std::slice;
@@ -997,7 +997,7 @@ pub(crate) enum DriverLocator<'a> {
/// Returns `Status::InvalidArguments` if:
/// - The URI has no colon separator
/// - The URI format is invalid
-pub(crate) fn parse_driver_uri<'a>(uri: &'a str) -> Result<DriverLocator<'a>> {
+pub(crate) fn parse_driver_uri(uri: &'_ str) -> Result<DriverLocator<'_>> {
let idx = uri.find(":").ok_or(Error::with_message_and_status(
format!("Invalid URI: {uri}"),
Status::InvalidArguments,
@@ -1034,7 +1034,7 @@ pub(crate) fn parse_driver_uri<'a>(uri: &'a str) ->
Result<DriverLocator<'a>> {
mod tests {
use std::env;
- use adbc_core::{options::AdbcVersion, LOAD_FLAG_ALLOW_RELATIVE_PATHS};
+ use adbc_core::{LOAD_FLAG_ALLOW_RELATIVE_PATHS, options::AdbcVersion};
use temp_env::{with_var, with_var_unset};
use crate::ManagedDriver;
diff --git a/rust/driver_manager/tests/common/mod.rs
b/rust/driver_manager/tests/common/mod.rs
index 408398c0a..f0b60d208 100644
--- a/rust/driver_manager/tests/common/mod.rs
+++ b/rust/driver_manager/tests/common/mod.rs
@@ -29,8 +29,8 @@ use adbc_core::{Connection, Database, Driver, Optionable,
Statement};
use adbc_driver_manager::{ManagedConnection, ManagedDatabase, ManagedDriver,
ManagedStatement};
use arrow_array::{
- cast::as_string_array, Array, Float64Array, Int64Array, RecordBatch,
RecordBatchReader,
- StringArray,
+ Array, Float64Array, Int64Array, RecordBatch, RecordBatchReader,
StringArray,
+ cast::as_string_array,
};
use arrow_schema::{ArrowError, DataType, Field, Schema, SchemaRef};
use arrow_select::concat::concat_batches;
@@ -106,14 +106,18 @@ pub fn test_database(database: &ManagedDatabase) {
}
pub fn test_connection(connection: &mut ManagedConnection) {
- assert!(connection
- .set_option(OptionConnection::AutoCommit, "true".into())
- .is_ok());
+ assert!(
+ connection
+ .set_option(OptionConnection::AutoCommit, "true".into())
+ .is_ok()
+ );
// Unknown connection option
- assert!(connection
- .set_option(OptionConnection::Other("unknown".into()), "".into())
- .is_err());
+ assert!(
+ connection
+ .set_option(OptionConnection::Other("unknown".into()), "".into())
+ .is_err()
+ );
assert!(connection.new_statement().is_ok());
}
@@ -239,9 +243,11 @@ pub fn test_connection_get_table_schema(connection: &mut
ManagedConnection) {
connection.rollback().unwrap();
- assert!(connection
- .get_table_schema(None, None, "nonexistent_table")
- .is_err());
+ assert!(
+ connection
+ .get_table_schema(None, None, "nonexistent_table")
+ .is_err()
+ );
}
pub fn test_statement(statement: &mut ManagedStatement) {
@@ -350,7 +356,9 @@ pub struct SetEnv {
impl SetEnv {
pub fn new(env_var: &'static str, new_value: impl AsRef<OsStr>) -> Self {
let original_value = std::env::var_os(env_var);
- std::env::set_var(env_var, new_value);
+ unsafe {
+ std::env::set_var(env_var, new_value);
+ }
Self {
env_var,
original_value,
@@ -361,9 +369,13 @@ impl SetEnv {
impl Drop for SetEnv {
fn drop(&mut self) {
if let Some(original_value) = &self.original_value {
- std::env::set_var(self.env_var, original_value);
+ unsafe {
+ std::env::set_var(self.env_var, original_value);
+ }
} else {
- std::env::remove_var(self.env_var);
+ unsafe {
+ std::env::remove_var(self.env_var);
+ }
}
}
}
diff --git a/rust/driver_manager/tests/connection_profile.rs
b/rust/driver_manager/tests/connection_profile.rs
index 57207d25e..41e3e82d1 100644
--- a/rust/driver_manager/tests/connection_profile.rs
+++ b/rust/driver_manager/tests/connection_profile.rs
@@ -18,11 +18,11 @@
use std::path::PathBuf;
use adbc_core::options::{AdbcVersion, OptionDatabase, OptionValue};
-use adbc_core::{error::Status, LOAD_FLAG_DEFAULT};
+use adbc_core::{LOAD_FLAG_DEFAULT, error::Status};
+use adbc_driver_manager::ManagedDatabase;
use adbc_driver_manager::profile::{
ConnectionProfile, ConnectionProfileProvider, FilesystemProfileProvider,
};
-use adbc_driver_manager::ManagedDatabase;
use serial_test::serial;
use std::env;
@@ -320,9 +320,9 @@ driver = "foo"
for (name, profile_content, expected_status, expected_msg_fragment) in
test_cases {
let (tmp_dir, profile_path) = write_profile_to_tempfile(name,
&profile_content);
- let provider =
FilesystemProfileProvider::new_with_search_paths(Some(vec![tmp_dir
- .path()
- .to_path_buf()]));
+ let provider =
FilesystemProfileProvider::new_with_search_paths(Some(vec![
+ tmp_dir.path().to_path_buf(),
+ ]));
let result = provider.get_profile(profile_path.to_str().unwrap());
assert!(result.is_err(), "Test case '{}': expected error", name);
@@ -692,9 +692,9 @@ uri = ":memory:"
let profile_path = manifest_dir.path().join("sqliteprof.toml");
std::fs::write(&profile_path, profile_contents).unwrap();
- let provider =
FilesystemProfileProvider::new_with_search_paths(Some(vec![profile_dir
- .path()
- .to_path_buf()]));
+ let provider = FilesystemProfileProvider::new_with_search_paths(Some(vec![
+ profile_dir.path().to_path_buf(),
+ ]));
let database = ManagedDatabase::from_uri_with_profile_provider(
"profile://sqlitedev",
None,
diff --git a/rust/driver_manager/tests/driver_manager_sqlite.rs
b/rust/driver_manager/tests/driver_manager_sqlite.rs
index ed462d385..0f6d89fa2 100644
--- a/rust/driver_manager/tests/driver_manager_sqlite.rs
+++ b/rust/driver_manager/tests/driver_manager_sqlite.rs
@@ -18,8 +18,8 @@
use arrow_schema::{Field, Schema};
use adbc_core::options::{AdbcVersion, OptionConnection, OptionDatabase};
-use adbc_core::{error::Status, Driver, Optionable};
-use adbc_core::{Connection, Database, Statement, LOAD_FLAG_DEFAULT};
+use adbc_core::{Connection, Database, LOAD_FLAG_DEFAULT, Statement};
+use adbc_core::{Driver, Optionable, error::Status};
use adbc_driver_manager::{ManagedDatabase, ManagedDriver};
mod common;
diff --git a/rust/driver_manager/tests/test_env_var_profiles.rs
b/rust/driver_manager/tests/test_env_var_profiles.rs
index d04610267..5c75f2bae 100644
--- a/rust/driver_manager/tests/test_env_var_profiles.rs
+++ b/rust/driver_manager/tests/test_env_var_profiles.rs
@@ -21,7 +21,7 @@ use std::path::PathBuf;
mod common;
use adbc_core::options::AdbcVersion;
-use adbc_core::{error::Status, LOAD_FLAG_DEFAULT};
+use adbc_core::{LOAD_FLAG_DEFAULT, error::Status};
use adbc_driver_manager::ManagedDatabase;
fn write_profile_to_tempfile(tmp_dir: &tempfile::TempDir, name: &str, content:
&str) -> PathBuf {
@@ -80,7 +80,9 @@ fn test_env_var_replacement_empty() {
.expect("Failed to create temporary directory");
// Make sure the env var doesn't exist
- env::remove_var("ADBC_NONEXISTENT_VAR_12345");
+ unsafe {
+ env::remove_var("ADBC_NONEXISTENT_VAR_12345");
+ }
let profile_content = r#"
profile_version = 1
diff --git a/rust/ffi/src/driver_exporter.rs b/rust/ffi/src/driver_exporter.rs
index 634263970..1a41d100b 100644
--- a/rust/ffi/src/driver_exporter.rs
+++ b/rust/ffi/src/driver_exporter.rs
@@ -20,14 +20,14 @@ use std::ffi::{CStr, CString};
use std::hash::Hash;
use std::os::raw::{c_char, c_int, c_void};
-use arrow_array::ffi::{from_ffi, FFI_ArrowArray, FFI_ArrowSchema};
-use arrow_array::ffi_stream::{ArrowArrayStreamReader, FFI_ArrowArrayStream};
use arrow_array::StructArray;
+use arrow_array::ffi::{FFI_ArrowArray, FFI_ArrowSchema, from_ffi};
+use arrow_array::ffi_stream::{ArrowArrayStreamReader, FFI_ArrowArrayStream};
use arrow_schema::DataType;
use super::{
- options::get_opt_name, types::ErrorPrivateData, FFI_AdbcConnection,
FFI_AdbcDatabase,
- FFI_AdbcDriver, FFI_AdbcError, FFI_AdbcErrorDetail, FFI_AdbcPartitions,
FFI_AdbcStatement,
+ FFI_AdbcConnection, FFI_AdbcDatabase, FFI_AdbcDriver, FFI_AdbcError,
FFI_AdbcErrorDetail,
+ FFI_AdbcPartitions, FFI_AdbcStatement, options::get_opt_name,
types::ErrorPrivateData,
};
use adbc_core::constants::ADBC_STATUS_OK;
use adbc_core::error::{AdbcStatusCode, Error, Result, Status};
@@ -181,7 +181,7 @@ impl<DriverType: Driver + Default + 'static> FFIDriver for
DriverType {
macro_rules! export_driver {
($func_name:ident, $driver_type:ty) => {
#[allow(non_snake_case)]
- #[no_mangle]
+ #[unsafe(no_mangle)]
pub unsafe extern "C" fn $func_name(
version: std::os::raw::c_int,
driver: *mut std::os::raw::c_void,
@@ -211,7 +211,7 @@ macro_rules! export_driver {
// Fallback symbol, if the driver manager does not find the init above
#[allow(non_snake_case)]
- #[no_mangle]
+ #[unsafe(no_mangle)]
pub unsafe extern "C" fn AdbcDriverInit(
version: std::os::raw::c_int,
driver: *mut std::os::raw::c_void,
@@ -545,11 +545,10 @@ unsafe fn database_private_data<'a, DriverType: Driver>(
database: &mut FFI_AdbcDatabase,
) -> Result<&'a mut ExportedDatabase<DriverType>> {
let exported = database.private_data as *mut ExportedDatabase<DriverType>;
- let exported = exported.as_mut().ok_or(Error::with_message_and_status(
+ exported.as_mut().ok_or(Error::with_message_and_status(
"Uninitialized database",
Status::InvalidState,
- ));
- exported
+ ))
}
// SAFETY: Will panic if `key` is null.
@@ -819,11 +818,10 @@ unsafe fn connection_private_data<'a, DriverType: Driver>(
connection: &mut FFI_AdbcConnection,
) -> Result<&'a mut ExportedConnection<DriverType>> {
let exported = connection.private_data as *mut
ExportedConnection<DriverType>;
- let exported = exported.as_mut().ok_or(Error::with_message_and_status(
+ exported.as_mut().ok_or(Error::with_message_and_status(
"Uninitialized connection",
Status::InvalidState,
- ));
- exported
+ ))
}
// SAFETY: Will panic if `connection` or `key` is null.
@@ -1400,11 +1398,10 @@ unsafe fn statement_private_data<'a, DriverType:
Driver>(
) -> Result<&'a mut ExportedStatement<DriverType>> {
assert!(!statement.is_null());
let exported = (*statement).private_data as *mut
ExportedStatement<DriverType>;
- let exported = exported.as_mut().ok_or(Error::with_message_and_status(
+ exported.as_mut().ok_or(Error::with_message_and_status(
"Uninitialized statement",
Status::InvalidState,
- ));
- exported
+ ))
}
// SAFETY: Will panic if `statement` or `key` is null.
diff --git a/rust/ffi/src/lib.rs b/rust/ffi/src/lib.rs
index d4a29410b..0805d2f0e 100644
--- a/rust/ffi/src/lib.rs
+++ b/rust/ffi/src/lib.rs
@@ -15,6 +15,8 @@
// specific language governing permissions and limitations
// under the License.
+#![allow(unsafe_op_in_unsafe_fn)]
+
//! ADBC: Arrow Database Connectivity
//!
//! ADBC is a set of APIs and libraries for
[Arrow](https://arrow.apache.org/)-native
diff --git a/rust/ffi/src/options.rs b/rust/ffi/src/options.rs
index 5a9717eb6..8266af252 100644
--- a/rust/ffi/src/options.rs
+++ b/rust/ffi/src/options.rs
@@ -22,7 +22,7 @@ use adbc_core::constants;
use adbc_core::error::{AdbcStatusCode, Error, Result, Status};
use adbc_core::options::{AdbcVersion, OptionValue};
-use crate::{driver_method, FFI_AdbcConnection, FFI_AdbcStatement};
+use crate::{FFI_AdbcConnection, FFI_AdbcStatement, driver_method};
use crate::{FFI_AdbcDatabase, FFI_AdbcDriver, FFI_AdbcError};
const ERR_ONLY_STRING_OPT: &str = "Only string option value are supported with
ADBC 1.0.0";
diff --git a/rust/ffi/src/types.rs b/rust/ffi/src/types.rs
index 7e0e6a2e8..033eb7c21 100644
--- a/rust/ffi/src/types.rs
+++ b/rust/ffi/src/types.rs
@@ -24,9 +24,8 @@ use std::ptr::{null, null_mut};
use super::methods;
use adbc_core::{
- constants,
+ Partitions, constants,
error::{AdbcStatusCode, Error, Status},
- Partitions,
};
/// A driver initialization function.