Skip to content

Commit 8d126bc

Browse files
committed
Revert "fix: respect inexact flags in row group metadata (apache#16412)"
This reverts commit afc90f7.
1 parent 6c11afe commit 8d126bc

File tree

3 files changed

+4
-29
lines changed

3 files changed

+4
-29
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datafusion/core/src/datasource/file_format/parquet.rs

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -523,23 +523,11 @@ mod tests {
523523
let dic_array = DictionaryArray::<Int32Type>::try_new(keys, Arc::new(values))?;
524524
let c_dic: ArrayRef = Arc::new(dic_array);
525525

526-
// Data for column string_truncation: ["a".repeat(128), null, "b".repeat(128), null]
527-
let string_truncation: ArrayRef = Arc::new(StringArray::from(vec![
528-
Some("a".repeat(128)),
529-
None,
530-
Some("b".repeat(128)),
531-
None,
532-
]));
533-
534-
let batch1 = RecordBatch::try_from_iter(vec![
535-
("c_dic", c_dic),
536-
("string_truncation", string_truncation),
537-
])?;
526+
let batch1 = RecordBatch::try_from_iter(vec![("c_dic", c_dic)])?;
538527

539528
// Use store_parquet to write each batch to its own file
540529
// . batch1 written into first file and includes:
541530
// - column c_dic that has 4 rows with no null. Stats min and max of dictionary column is available.
542-
// - column string_truncation that has 4 rows with 2 nulls. Stats min and max of string column is available but not exact.
543531
let store = Arc::new(RequestCountingObjectStore::new(Arc::new(
544532
LocalFileSystem::new(),
545533
)));
@@ -575,19 +563,6 @@ mod tests {
575563
Precision::Exact(Utf8(Some("a".into())))
576564
);
577565

578-
// column string_truncation
579-
let string_truncation_stats = &stats.column_statistics[1];
580-
581-
assert_eq!(string_truncation_stats.null_count, Precision::Exact(2));
582-
assert_eq!(
583-
string_truncation_stats.max_value,
584-
Precision::Inexact(ScalarValue::Utf8View(Some("b".repeat(63) + "c")))
585-
);
586-
assert_eq!(
587-
string_truncation_stats.min_value,
588-
Precision::Inexact(ScalarValue::Utf8View(Some("a".repeat(64))))
589-
);
590-
591566
Ok(())
592567
}
593568

datafusion/datasource-parquet/src/file_format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
2020
use std::any::Any;
2121
use std::cell::RefCell;
22+
use std::fmt;
2223
use std::fmt::Debug;
2324
use std::ops::Range;
2425
use std::rc::Rc;
2526
use std::sync::Arc;
26-
use std::{fmt, vec};
2727

2828
use arrow::array::RecordBatch;
2929
use arrow::datatypes::{Fields, Schema, SchemaRef, TimeUnit};

0 commit comments

Comments
 (0)