@@ -28,7 +28,7 @@ use crate::basic::{LogicalType, Repetition, Type as PhysicalType};
28
28
use crate :: errors:: { ParquetError :: ArrowError , Result } ;
29
29
use crate :: schema:: types:: { SchemaDescPtr , Type , TypePtr } ;
30
30
31
- use arrow:: datatypes:: { DataType , Field , Schema } ;
31
+ use arrow:: datatypes:: { DataType , DateUnit , Field , Schema } ;
32
32
33
33
/// Convert parquet schema to arrow schema.
34
34
pub fn parquet_to_arrow_schema ( parquet_schema : SchemaDescPtr ) -> Result < Schema > {
@@ -197,6 +197,7 @@ impl ParquetTypeConverter {
197
197
LogicalType :: INT_8 => Ok ( DataType :: Int8 ) ,
198
198
LogicalType :: INT_16 => Ok ( DataType :: Int16 ) ,
199
199
LogicalType :: INT_32 => Ok ( DataType :: Int32 ) ,
200
+ LogicalType :: DATE => Ok ( DataType :: Date32 ( DateUnit :: Millisecond ) ) ,
200
201
other => Err ( ArrowError ( format ! (
201
202
"Unable to convert parquet logical type {}" ,
202
203
other
@@ -209,6 +210,7 @@ impl ParquetTypeConverter {
209
210
LogicalType :: NONE => Ok ( DataType :: Int64 ) ,
210
211
LogicalType :: INT_64 => Ok ( DataType :: Int64 ) ,
211
212
LogicalType :: UINT_64 => Ok ( DataType :: UInt64 ) ,
213
+ LogicalType :: DATE => Ok ( DataType :: Date64 ( DateUnit :: Millisecond ) ) ,
212
214
other => Err ( ArrowError ( format ! (
213
215
"Unable to convert parquet logical type {}" ,
214
216
other
0 commit comments