alanhe opened a new issue, #2185:
URL: https://github.com/apache/arrow-rs/issues/2185
**Describe the bug**
Take the code snippet as an example,
```rust
fn main() {
let root_schema = Arc::new(Schema::new(vec![Field::new("a",
DataType::Int64, false)]));
let props = WriterProperties::builder()
.set_statistics_enabled(EnabledStatistics::None)
.build();
let file = File::create("test.parquet").unwrap();
let mut writer = ArrowWriter::try_new(
file.try_clone().unwrap(),
Arc::clone(&root_schema),
Some(props),
)
.unwrap();
let a = Int64Array::from(vec![1, 2, 3, 4, 5]);
let batch = RecordBatch::try_new(Arc::clone(&root_schema),
vec![Arc::new(a)]).unwrap();
writer.write(&batch);
writer.close();
}
```
When the default `statistics_enabled` is set to `EnabledStatistics::None`,
if I read the metadata of `test.parquet` with code,
```rust
let f = File::open("test.parquet").unwrap();
let r = ParquetFileArrowReader::try_new(f).unwrap();
let m = r.metadata();
println!("{:#?}", m);
```
I get:
```
...
statistics: Some(
Int64(
{min: Some(1), max: Some(5), distinct_count: None, null_count: 0,
min_max_deprecated: false},
),
),
...
```
**Expected behavior**
```
...
statistics: None
...
```
**Additional context**
Tested against arrow 19.0.0.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]