@@ -255,6 +255,9 @@ pub fn rows_to_arrow(rows: &[Row], projected_schema: &Option<SchemaRef>) -> Resu
255255 Type :: INT8 => {
256256 handle_primitive_type ! ( builder, Type :: INT8 , Int64Builder , i64 , row, i) ;
257257 }
258+ Type :: OID => {
259+ handle_primitive_type ! ( builder, Type :: OID , UInt32Builder , u32 , row, i) ;
260+ }
258261 Type :: FLOAT4 => {
259262 handle_primitive_type ! ( builder, Type :: FLOAT4 , Float32Builder , f32 , row, i) ;
260263 }
@@ -267,6 +270,9 @@ pub fn rows_to_arrow(rows: &[Row], projected_schema: &Option<SchemaRef>) -> Resu
267270 Type :: VARCHAR => {
268271 handle_primitive_type ! ( builder, Type :: VARCHAR , StringBuilder , & str , row, i) ;
269272 }
273+ Type :: NAME => {
274+ handle_primitive_type ! ( builder, Type :: NAME , StringBuilder , & str , row, i) ;
275+ }
270276 Type :: BYTEA => {
271277 handle_primitive_type ! ( builder, Type :: BYTEA , BinaryBuilder , Vec <u8 >, row, i) ;
272278 }
@@ -835,9 +841,10 @@ fn map_column_type_to_data_type(column_type: &Type) -> Option<DataType> {
835841 Type :: INT2 => Some ( DataType :: Int16 ) ,
836842 Type :: INT4 => Some ( DataType :: Int32 ) ,
837843 Type :: INT8 | Type :: MONEY => Some ( DataType :: Int64 ) ,
844+ Type :: OID => Some ( DataType :: UInt32 ) ,
838845 Type :: FLOAT4 => Some ( DataType :: Float32 ) ,
839846 Type :: FLOAT8 => Some ( DataType :: Float64 ) ,
840- Type :: TEXT | Type :: VARCHAR | Type :: BPCHAR | Type :: UUID => Some ( DataType :: Utf8 ) ,
847+ Type :: TEXT | Type :: VARCHAR | Type :: BPCHAR | Type :: UUID | Type :: NAME => Some ( DataType :: Utf8 ) ,
841848 Type :: BYTEA => Some ( DataType :: Binary ) ,
842849 Type :: BOOL => Some ( DataType :: Boolean ) ,
843850 Type :: JSON => Some ( DataType :: LargeUtf8 ) ,
0 commit comments