Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Lamb <[email protected]>
  • Loading branch information
Ted-Jiang and alamb authored Jan 24, 2024
1 parent f52f5e1 commit 010ceb4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion datafusion/core/tests/parquet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ fn create_data_batch(scenario: Scenario) -> Vec<RecordBatch> {
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),
]
Expand Down

0 comments on commit 010ceb4

Please sign in to comment.