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/04/20 00:23:20 UTC

[GitHub] [arrow-rs] viirya commented on issue #1587: test_read_maps fails when force_validate is active

viirya commented on issue #1587:
URL: https://github.com/apache/arrow-rs/issues/1587#issuecomment-1103291817

   The inner map has data type in which the `key_value` field is nullable as false according to schema:
   
   Map(Field { name: "key_value", data_type: Struct([Field { name: "key", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: None }, Field { name: "value", data_type: Map(Field { name: "key_value", data_type: Struct([Field { name: "key", data_type: Int32, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: None }, Field { name: "value", data_type: Boolean, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: None }]), **_nullable: false_**, dict_id: 0, dict_is_ordered: false, metadata: None }, false), **_nullable: true_**, dict_id: 0, dict_is_ordered: false, metadata: None }]), nullable: false, dict_id: 0, dict_is_ordered: false, metadata: None }, false)
   
   But in `visit_map`, as it uses `Type.is_optional` as nullable flag for inner map, it takes optional value of the wrapping field of the map (i.e., the `value` field in top map) and that is true.
   
   That is why child array data's map type is not the same as the schema in the nullable flag.


-- 
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