You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/06/17 06:19:16 UTC

[GitHub] [arrow-rs] viirya commented on a diff in pull request #1893: Correct nullable in read_dictionary

viirya commented on code in PR #1893:
URL: https://github.com/apache/arrow-rs/pull/1893#discussion_r899797600


##########
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(),

Review Comment:
   This is actually for #1890. As #1890 adds a validation for non-nullable field containing null values at RecordBatch. When we read the dictionary value as record batch by `read_record_batch`. It will fail the validation.  Dictionaries are encoded as a sequence of record batches, each having a single field, in IPC messages.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org