@@ -1111,15 +1111,15 @@ fn datatype_to_avro(
1111
1111
DataType :: Time32 ( unit) => match unit {
1112
1112
TimeUnit :: Millisecond => json ! ( { "type" : "int" , "logicalType" : "time-millis" } ) ,
1113
1113
TimeUnit :: Second => {
1114
- extras. insert ( "arrowDurationUnit " . into ( ) , Value :: String ( "second" . into ( ) ) ) ;
1114
+ extras. insert ( "arrowTimeUnit " . into ( ) , Value :: String ( "second" . into ( ) ) ) ;
1115
1115
Value :: String ( "int" . into ( ) )
1116
1116
}
1117
1117
_ => Value :: String ( "int" . into ( ) ) ,
1118
1118
} ,
1119
1119
DataType :: Time64 ( unit) => match unit {
1120
1120
TimeUnit :: Microsecond => json ! ( { "type" : "long" , "logicalType" : "time-micros" } ) ,
1121
1121
TimeUnit :: Nanosecond => {
1122
- extras. insert ( "arrowDurationUnit " . into ( ) , Value :: String ( "nanosecond" . into ( ) ) ) ;
1122
+ extras. insert ( "arrowTimeUnit " . into ( ) , Value :: String ( "nanosecond" . into ( ) ) ) ;
1123
1123
Value :: String ( "long" . into ( ) )
1124
1124
}
1125
1125
_ => Value :: String ( "long" . into ( ) ) ,
@@ -1131,11 +1131,11 @@ fn datatype_to_avro(
1131
1131
( TimeUnit :: Microsecond , true ) => "timestamp-micros" ,
1132
1132
( TimeUnit :: Microsecond , false ) => "local-timestamp-micros" ,
1133
1133
( TimeUnit :: Second , _) => {
1134
- extras. insert ( "arrowDurationUnit " . into ( ) , Value :: String ( "second" . into ( ) ) ) ;
1134
+ extras. insert ( "arrowTimeUnit " . into ( ) , Value :: String ( "second" . into ( ) ) ) ;
1135
1135
return Ok ( ( Value :: String ( "long" . into ( ) ) , extras) ) ;
1136
1136
}
1137
1137
( TimeUnit :: Nanosecond , _) => {
1138
- extras. insert ( "arrowDurationUnit " . into ( ) , Value :: String ( "nanosecond" . into ( ) ) ) ;
1138
+ extras. insert ( "arrowTimeUnit " . into ( ) , Value :: String ( "nanosecond" . into ( ) ) ) ;
1139
1139
return Ok ( ( Value :: String ( "long" . into ( ) ) , extras) ) ;
1140
1140
}
1141
1141
} ;
0 commit comments