Jefffrey commented on PR #5147:
URL: https://github.com/apache/arrow-rs/pull/5147#issuecomment-1832608022

   > What ColumnOrder are we currently writing for these columns?
   
   I'm not sure, actually. I tried running this test in arrow_writer/mod.rs on 
master branch:
   
   ```rust
       #[test]
       fn test_123() {
           let a = Int32Array::from(vec![1, 2, 3, 4, 5]);
           let b = IntervalDayTimeArray::from(vec![0; 5]);
           let batch = RecordBatch::try_from_iter(vec![
               ("a", Arc::new(a) as ArrayRef),
               ("b", Arc::new(b) as ArrayRef),
           ])
           .unwrap();
   
           let mut buf = Vec::with_capacity(1024);
           let mut writer = ArrowWriter::try_new(&mut buf, batch.schema(), 
None).unwrap();
           writer.write(&batch).unwrap();
           writer.close().unwrap();
   
           let bytes = Bytes::from(buf);
           let options = ReadOptionsBuilder::new().with_page_index().build();
           let reader = SerializedFileReader::new_with_options(bytes, 
options).unwrap();
           dbg!(reader.metadata().file_metadata().column_orders());
       }
   ```
   
   Running:
   
   ```shell
   arrow-rs$ cargo test -p parquet --lib arrow::arrow_writer::tests::test_123 
-- --nocapture --exact
       Blocking waiting for file lock on build directory
      Compiling parquet v49.0.0 (/home/jeffrey/Code/arrow-rs/parquet)
       Finished test [unoptimized + debuginfo] target(s) in 11.49s
        Running unittests src/lib.rs 
(/media/jeffrey/1tb_860evo_ssd/.cargo_target_cache/debug/deps/parquet-a4f7a499e85a325c)
   
   running 1 test
   [parquet/src/arrow/arrow_writer/mod.rs:2760] 
reader.metadata().file_metadata().column_orders() = None
   test arrow::arrow_writer::tests::test_123 ... ok
   
   test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 667 filtered 
out; finished in 0.00s
   ```
   
   Even when I change it to only write the Int32Array, it is still none.
   
   Not sure if I'm doing something wrong here?


-- 
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]

Reply via email to