You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/27 10:23:49 UTC

[GitHub] [arrow-rs] alanhe opened a new issue, #2185: EnabledStatistics::None not working

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: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] tustvold commented on issue #2185: EnabledStatistics::None not working

Posted by GitBox <gi...@apache.org>.
tustvold commented on issue #2185:
URL: https://github.com/apache/arrow-rs/issues/2185#issuecomment-1196578281

   Oops, can confirm this was introduced by #2045 


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] alamb closed issue #2185: EnabledStatistics::None not working

Posted by GitBox <gi...@apache.org>.
alamb closed issue #2185: EnabledStatistics::None not working
URL: https://github.com/apache/arrow-rs/issues/2185


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org