@@ -28,7 +28,7 @@ use crate::basic::{LogicalType, Repetition, Type as PhysicalType};
2828use crate :: errors:: { ParquetError :: ArrowError , Result } ;
2929use crate :: schema:: types:: { SchemaDescPtr , Type , TypePtr } ;
3030
31- use arrow:: datatypes:: { DataType , Field , Schema } ;
31+ use arrow:: datatypes:: { DataType , DateUnit , Field , Schema } ;
3232
3333/// Convert parquet schema to arrow schema.
3434pub fn parquet_to_arrow_schema ( parquet_schema : SchemaDescPtr ) -> Result < Schema > {
@@ -197,6 +197,7 @@ impl ParquetTypeConverter {
197197 LogicalType :: INT_8 => Ok ( DataType :: Int8 ) ,
198198 LogicalType :: INT_16 => Ok ( DataType :: Int16 ) ,
199199 LogicalType :: INT_32 => Ok ( DataType :: Int32 ) ,
200+ LogicalType :: DATE => Ok ( DataType :: Date32 ( DateUnit :: Millisecond ) ) ,
200201 other => Err ( ArrowError ( format ! (
201202 "Unable to convert parquet logical type {}" ,
202203 other
@@ -209,6 +210,7 @@ impl ParquetTypeConverter {
209210 LogicalType :: NONE => Ok ( DataType :: Int64 ) ,
210211 LogicalType :: INT_64 => Ok ( DataType :: Int64 ) ,
211212 LogicalType :: UINT_64 => Ok ( DataType :: UInt64 ) ,
213+ LogicalType :: DATE => Ok ( DataType :: Date64 ( DateUnit :: Millisecond ) ) ,
212214 other => Err ( ArrowError ( format ! (
213215 "Unable to convert parquet logical type {}" ,
214216 other
0 commit comments