diff --git a/datafusion/core/src/datasource/physical_plan/parquet/row_groups.rs b/datafusion/core/src/datasource/physical_plan/parquet/row_groups.rs index af872c1c71d12..fa9523a76380b 100644 --- a/datafusion/core/src/datasource/physical_plan/parquet/row_groups.rs +++ b/datafusion/core/src/datasource/physical_plan/parquet/row_groups.rs @@ -236,6 +236,7 @@ impl PruningStatistics for BloomFilterStatistics { return true; } let b = (*v as i32).to_le_bytes(); + // Use Decimal constructor after https://github.com/apache/arrow-rs/issues/5325 let decimal = Decimal::Int32 { value: b, precision: *p as i32, @@ -258,6 +259,7 @@ impl PruningStatistics for BloomFilterStatistics { Type::FIXED_LEN_BYTE_ARRAY => { // keep with from_bytes_to_i128 let b = v.to_be_bytes().to_vec(); + // Use Decimal constructor after https://github.com/apache/arrow-rs/issues/5325 let decimal = Decimal::Bytes { value: b.into(), precision: *p as i32, diff --git a/datafusion/core/tests/parquet/mod.rs b/datafusion/core/tests/parquet/mod.rs index 7d879cebe1e15..776477310f7fa 100644 --- a/datafusion/core/tests/parquet/mod.rs +++ b/datafusion/core/tests/parquet/mod.rs @@ -563,7 +563,7 @@ fn create_data_batch(scenario: Scenario) -> Vec { Scenario::DecimalBloomFilterInt64 => { // decimal record batch vec![ - make_decimal_batch(vec![100, 200, 300, 400, 500], 9, 2), + make_decimal_batch(vec![100000, 200000, 300000, 400000, 500000], 12, 5), make_decimal_batch(vec![100, 200, 300, 400, 600], 9, 2), make_decimal_batch(vec![100, 200, 300, 400, 600], 9, 2), ]