sunchao commented on a change in pull request #9253:
URL: https://github.com/apache/arrow/pull/9253#discussion_r559942620
##########
File path: rust/parquet/src/arrow/converter.rs
##########
@@ -168,19 +167,19 @@ impl Converter<Vec<Option<FixedLenByteArray>>,
IntervalDayTimeArray>
}
}
-pub struct Int96ArrayConverter {}
+pub struct Int96ArrayConverter {
+ pub timezone: Option<String>,
+}
impl Converter<Vec<Option<Int96>>, TimestampNanosecondArray> for
Int96ArrayConverter {
fn convert(&self, source: Vec<Option<Int96>>) ->
Result<TimestampNanosecondArray> {
- let mut builder = TimestampNanosecondBuilder::new(source.len());
- for v in source {
- match v {
- Some(array) => builder.append_value(array.to_i64() * 1000000),
- None => builder.append_null(),
- }?
- }
-
- Ok(builder.finish())
+ Ok(TimestampNanosecondArray::from_opt_vec(
Review comment:
Cool. Good to know. Thanks.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]