From 7f9d4070b7c3a534ebfc9bd2444d0864592604b9 Mon Sep 17 00:00:00 2001 From: Liang-Chi Hsieh Date: Thu, 16 Jun 2022 21:06:39 -0700 Subject: [PATCH 1/2] Correct nullable --- arrow/src/ipc/reader.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arrow/src/ipc/reader.rs b/arrow/src/ipc/reader.rs index 1ac51938219..ac509f2581f 100644 --- a/arrow/src/ipc/reader.rs +++ b/arrow/src/ipc/reader.rs @@ -702,7 +702,11 @@ pub fn read_dictionary( DataType::Dictionary(_, ref value_type) => { // Make a fake schema for the dictionary batch. let schema = Schema { - fields: vec![Field::new("", value_type.as_ref().clone(), false)], + fields: vec![Field::new( + "", + value_type.as_ref().clone(), + first_field.is_nullable(), + )], metadata: HashMap::new(), }; // Read a single column From d2d488220d66e07e77b6457effe6236b441cbcf0 Mon Sep 17 00:00:00 2001 From: Liang-Chi Hsieh Date: Fri, 17 Jun 2022 09:12:32 -0700 Subject: [PATCH 2/2] For review --- arrow/src/ipc/reader.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arrow/src/ipc/reader.rs b/arrow/src/ipc/reader.rs index ac509f2581f..da5098a5e9d 100644 --- a/arrow/src/ipc/reader.rs +++ b/arrow/src/ipc/reader.rs @@ -702,11 +702,7 @@ pub fn read_dictionary( DataType::Dictionary(_, ref value_type) => { // Make a fake schema for the dictionary batch. let schema = Schema { - fields: vec![Field::new( - "", - value_type.as_ref().clone(), - first_field.is_nullable(), - )], + fields: vec![Field::new("", value_type.as_ref().clone(), true)], metadata: HashMap::new(), }; // Read a single column