Apache DataFusion SQL Query Engine
chore(deps): bump apache-avro from 0.17.0 to 0.20.0 (#16092)
dependabot[bot]95c7c69ad96e
diff --git a/Cargo.lock b/Cargo.lockindex 8d0981cb98..bda2f5648f 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -65,12 +65,6 @@ version = "2.0.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"-[[package]]-name = "adler32"-version = "1.2.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234"-[[package]]name = "ahash"version = "0.7.8"@@ -205,19 +199,20 @@ checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100"[[package]]name = "apache-avro"-version = "0.17.0"+version = "0.20.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "1aef82843a0ec9f8b19567445ad2421ceeb1d711514384bdd3d49fe37102ee13"+checksum = "3a033b4ced7c585199fb78ef50fca7fe2f444369ec48080c5fd072efa1a03cc7"dependencies = ["bigdecimal",- "bzip2 0.4.4",+ "bon",+ "bzip2 0.6.0","crc32fast","digest",- "libflate","log",+ "miniz_oxide","num-bigint","quad-rand",- "rand 0.8.5",+ "rand 0.9.2","regex-lite","serde","serde_bytes",@@ -225,8 +220,7 @@ dependencies = ["snap","strum","strum_macros",- "thiserror 1.0.69",- "typed-builder",+ "thiserror","uuid","xz2","zstd",@@ -1152,7 +1146,7 @@ dependencies = ["serde_json","serde_repr","serde_urlencoded",- "thiserror 2.0.16",+ "thiserror","tokio","tokio-util","tower-service",@@ -1171,6 +1165,31 @@ dependencies = ["serde_with",]+[[package]]+name = "bon"+version = "3.7.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "537c317ddf588aab15c695bf92cf55dec159b93221c074180ca3e0e5a94da415"+dependencies = [+ "bon-macros",+ "rustversion",+]++[[package]]+name = "bon-macros"+version = "3.7.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ca5abbf2d4a4c6896197c9de13d6d7cb7eff438c63dacde1dde980569cb00248"+dependencies = [+ "darling 0.21.3",+ "ident_case",+ "prettyplease",+ "proc-macro2",+ "quote",+ "rustversion",+ "syn 2.0.106",+]+[[package]]name = "borsh"version = "1.5.7"@@ -1276,16 +1295,6 @@ dependencies = ["either",]-[[package]]-name = "bzip2"-version = "0.4.4"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8"-dependencies = [- "bzip2-sys",- "libc",-]-[[package]]name = "bzip2"version = "0.5.2"@@ -1586,15 +1595,6 @@ version = "0.8.7"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"-[[package]]-name = "core2"-version = "0.4.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505"-dependencies = [- "memchr",-]-[[package]]name = "core_extensions"version = "1.5.3"@@ -1765,8 +1765,18 @@ version = "0.20.11"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee"dependencies = [- "darling_core",- "darling_macro",+ "darling_core 0.20.11",+ "darling_macro 0.20.11",+]++[[package]]+name = "darling"+version = "0.21.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0"+dependencies = [+ "darling_core 0.21.3",+ "darling_macro 0.21.3",][[package]]@@ -1783,22 +1793,41 @@ dependencies = ["syn 2.0.106",]+[[package]]+name = "darling_core"+version = "0.21.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4"+dependencies = [+ "fnv",+ "ident_case",+ "proc-macro2",+ "quote",+ "strsim",+ "syn 2.0.106",+]+[[package]]name = "darling_macro"version = "0.20.11"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead"dependencies = [- "darling_core",+ "darling_core 0.20.11","quote","syn 2.0.106",][[package]]-name = "dary_heap"-version = "0.3.7"+name = "darling_macro"+version = "0.21.3"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "04d2cd9c18b9f454ed67da600630b021a8a80bf33f8c95896ab33aaf1c26b728"+checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81"+dependencies = [+ "darling_core 0.21.3",+ "quote",+ "syn 2.0.106",+][[package]]name = "dashmap"@@ -2701,7 +2730,7 @@ dependencies = ["tempfile","testcontainers","testcontainers-modules",- "thiserror 2.0.16",+ "thiserror","tokio","tokio-postgres",]@@ -4006,30 +4035,6 @@ version = "0.2.175"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543"-[[package]]-name = "libflate"-version = "2.1.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "45d9dfdc14ea4ef0900c1cddbc8dcd553fbaacd8a4a282cf4018ae9dd04fb21e"-dependencies = [- "adler32",- "core2",- "crc32fast",- "dary_heap",- "libflate_lz77",-]--[[package]]-name = "libflate_lz77"-version = "2.1.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "e6e0d73b369f386f1c44abd9c570d5318f55ccde816ff4b562fa452e5182863d"-dependencies = [- "core2",- "hashbrown 0.14.5",- "rle-decode-fast",-]-[[package]]name = "libloading"version = "0.7.4"@@ -4439,7 +4444,7 @@ dependencies = ["serde","serde_json","serde_urlencoded",- "thiserror 2.0.16",+ "thiserror","tokio","tracing","url",@@ -5113,7 +5118,7 @@ dependencies = ["rustc-hash 2.1.1","rustls","socket2 0.5.10",- "thiserror 2.0.16",+ "thiserror","tokio","tracing","web-time",@@ -5134,7 +5139,7 @@ dependencies = ["rustls","rustls-pki-types","slab",- "thiserror 2.0.16",+ "thiserror","tinyvec","tracing","web-time",@@ -5320,7 +5325,7 @@ checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"dependencies = ["getrandom 0.2.16","libredox",- "thiserror 2.0.16",+ "thiserror",][[package]]@@ -5497,12 +5502,6 @@ dependencies = ["syn 1.0.109",]-[[package]]-name = "rle-decode-fast"-version = "1.0.3"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422"-[[package]]name = "rstest"version = "0.25.0"@@ -5935,7 +5934,7 @@ version = "3.14.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "de90945e6565ce0d9a25098082ed4ee4002e047cb59892c318d66821e14bb30f"dependencies = [- "darling",+ "darling 0.20.11","proc-macro2","quote","syn 2.0.106",@@ -6095,7 +6094,7 @@ dependencies = ["similar","subst","tempfile",- "thiserror 2.0.16",+ "thiserror","tracing",]@@ -6212,20 +6211,19 @@ dependencies = [[[package]]name = "strum"-version = "0.26.3"+version = "0.27.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"+checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf"[[package]]name = "strum_macros"-version = "0.26.4"+version = "0.27.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"+checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7"dependencies = ["heck 0.5.0","proc-macro2","quote",- "rustversion","syn 2.0.106",]@@ -6390,7 +6388,7 @@ dependencies = ["serde","serde_json","serde_with",- "thiserror 2.0.16",+ "thiserror","tokio","tokio-stream","tokio-tar",@@ -6416,33 +6414,13 @@ dependencies = ["unicode-width 0.1.14",]-[[package]]-name = "thiserror"-version = "1.0.69"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"-dependencies = [- "thiserror-impl 1.0.69",-]-[[package]]name = "thiserror"version = "2.0.16"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0"dependencies = [- "thiserror-impl 2.0.16",-]--[[package]]-name = "thiserror-impl"-version = "1.0.69"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"-dependencies = [- "proc-macro2",- "quote",- "syn 2.0.106",+ "thiserror-impl",][[package]]@@ -6842,26 +6820,6 @@ version = "2.0.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a"-[[package]]-name = "typed-builder"-version = "0.19.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "a06fbd5b8de54c5f7c91f6fe4cebb949be2125d7758e630bb58b1d831dbce600"-dependencies = [- "typed-builder-macro",-]--[[package]]-name = "typed-builder-macro"-version = "0.19.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "f9534daa9fd3ed0bd911d462a37f172228077e7abf18c18a5f67199d959205f8"-dependencies = [- "proc-macro2",- "quote",- "syn 2.0.106",-]-[[package]]name = "typenum"version = "1.18.0"@@ -6900,7 +6858,7 @@ dependencies = ["serde","serde_json","syn 2.0.106",- "thiserror 2.0.16",+ "thiserror","unicode-ident",]diff --git a/Cargo.toml b/Cargo.tomlindex da15be6e4e..31f98cd108 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -89,7 +89,7 @@ version = "49.0.2"ahash = { version = "0.8", default-features = false, features = ["runtime-rng",] }-apache-avro = { version = "0.17", default-features = false }+apache-avro = { version = "0.20", default-features = false }arrow = { version = "56.0.0", features = ["prettyprint","chrono-tz",diff --git a/datafusion/common/Cargo.toml b/datafusion/common/Cargo.tomlindex afd74c7be6..aea5e51bef 100644--- a/datafusion/common/Cargo.toml+++ b/datafusion/common/Cargo.toml@@ -52,7 +52,7 @@ parquet = ["dep:parquet"][dependencies]ahash = { workspace = true }-apache-avro = { version = "0.17", default-features = false, features = [+apache-avro = { version = "0.20", default-features = false, features = ["bzip","snappy","xz",diff --git a/datafusion/datasource-avro/src/avro_to_arrow/arrow_array_reader.rs b/datafusion/datasource-avro/src/avro_to_arrow/arrow_array_reader.rsindex 2753c44bf6..598484d215 100644--- a/datafusion/datasource-avro/src/avro_to_arrow/arrow_array_reader.rs+++ b/datafusion/datasource-avro/src/avro_to_arrow/arrow_array_reader.rs@@ -19,6 +19,7 @@use apache_avro::schema::RecordSchema;use apache_avro::{+ error::Details as AvroErrorDetails,schema::{Schema as AvroSchema, SchemaKind},types::Value,Error as AvroError, Reader as AvroReader,@@ -929,11 +930,11 @@ fn resolve_string(v: &Value) -> ArrowResult<Option<String>> {match v {Value::String(s) => Ok(Some(s.clone())),Value::Bytes(bytes) => String::from_utf8(bytes.to_vec())- .map_err(AvroError::ConvertToUtf8)+ .map_err(|e| AvroError::new(AvroErrorDetails::ConvertToUtf8(e))).map(Some),Value::Enum(_, s) => Ok(Some(s.clone())),Value::Null => Ok(None),- other => Err(AvroError::GetString(other.into())),+ other => Err(AvroError::new(AvroErrorDetails::GetString(other.clone()))),}.map_err(|e| SchemaError(format!("expected resolvable string : {e:?}")))}diff --git a/datafusion/datasource-avro/src/avro_to_arrow/schema.rs b/datafusion/datasource-avro/src/avro_to_arrow/schema.rsindex cc87d3c1ce..3fce0d4826 100644--- a/datafusion/datasource-avro/src/avro_to_arrow/schema.rs+++ b/datafusion/datasource-avro/src/avro_to_arrow/schema.rs@@ -107,7 +107,10 @@ fn schema_to_field_with_props(.data_type().clone()} else {- return Err(apache_avro::Error::GetUnionDuplicate.into());+ return Err(apache_avro::Error::new(+ apache_avro::error::Details::GetUnionDuplicate,+ )+ .into());}} else {let fields = sub_schemas