@@ -674,6 +674,7 @@ impl<'a> TypedElements<'a> {
674674 TypedElements :: Float64 ( arr) => bulk_copy_range ! ( arr, 8 ) ,
675675 TypedElements :: Date32 ( arr) => bulk_copy_range ! ( arr, 4 ) ,
676676 TypedElements :: TimestampMicro ( arr) => bulk_copy_range ! ( arr, 8 ) ,
677+ TypedElements :: Time64Nano ( arr) => bulk_copy_range ! ( arr, 8 ) ,
677678 _ => { } // Should not reach here due to supports_bulk_copy check
678679 }
679680 }
@@ -846,7 +847,8 @@ fn is_fixed_width(data_type: &DataType) -> bool {
846847 | DataType :: Float32
847848 | DataType :: Float64
848849 | DataType :: Date32
849- | DataType :: Timestamp ( TimeUnit :: Microsecond , _) => true ,
850+ | DataType :: Timestamp ( TimeUnit :: Microsecond , _)
851+ | DataType :: Time64 ( TimeUnit :: Nanosecond ) => true ,
850852 DataType :: Decimal128 ( p, _) => * p <= MAX_LONG_DIGITS ,
851853 _ => false ,
852854 }
@@ -1254,6 +1256,15 @@ impl ColumnarToRowContext {
12541256 TimestampMicrosecondArray ,
12551257 |v: i64 | v
12561258 ) ,
1259+ DataType :: Time64 ( TimeUnit :: Nanosecond ) => write_fixed_column_primitive ! (
1260+ self ,
1261+ array,
1262+ row_size,
1263+ field_offset_in_row,
1264+ num_rows,
1265+ Time64NanosecondArray ,
1266+ |v: i64 | v
1267+ ) ,
12571268 DataType :: Decimal128 ( precision, _) if * precision <= MAX_LONG_DIGITS => {
12581269 write_fixed_column_primitive ! (
12591270 self ,
@@ -1379,6 +1390,9 @@ fn get_field_value(data_type: &DataType, array: &ArrayRef, row_idx: usize) -> Co
13791390 DataType :: Timestamp ( TimeUnit :: Microsecond , _) => {
13801391 get_field_value_primitive ! ( array, row_idx, TimestampMicrosecondArray , |v: i64 | v)
13811392 }
1393+ DataType :: Time64 ( TimeUnit :: Nanosecond ) => {
1394+ get_field_value_primitive ! ( array, row_idx, Time64NanosecondArray , |v: i64 | v)
1395+ }
13821396 DataType :: Decimal128 ( precision, _) if * precision <= MAX_LONG_DIGITS => {
13831397 get_field_value_primitive ! ( array, row_idx, Decimal128Array , |v: i128 | v as i64 )
13841398 }
0 commit comments