GPSnoopy commented on issue #8042:
URL: https://github.com/apache/arrow-rs/issues/8042#issuecomment-3183898274

   FYI: this is currently how I work around the issue:
   
   ```rust
   fn fix_run_end_encoded_array_data_type(run_array: RunArray<Int32Type>, 
data_type: &DataType) -> RunArray<Int32Type> {
       match data_type {
           DataType::Timestamp(TimeUnit::Nanosecond, _) => {
               let run_ends = run_array.run_ends();
   
               assert_eq!(run_ends.offset(), 0);
               assert_eq!(run_ends.len(), run_array.len());
   
               let end_array = Int32Array::new(run_ends.inner().clone(), None);
               let value_array = 
as_primitive_array::<TimestampNanosecondType>(run_array.values())
                   .clone()
                   .with_data_type(data_type.clone());
   
               RunArray::try_new(&end_array, &value_array).unwrap()
           }
           _ => run_array,
       }
   }
   ```


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