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/07/21 11:38:37 UTC

[GitHub] [arrow-rs] alanhe opened a new issue, #2119: Please make the MapBuilder values_field nullable a configurable value

alanhe opened a new issue, #2119:
URL: https://github.com/apache/arrow-rs/issues/2119

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   With `MapBuilder`, it's not possible to build the sample schema described in the spec: https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#backward-compatibility-rules-1
   ```
   optional group my_map (MAP) {
     repeated group map {
       required binary str (UTF8);
       required int32 num;
     }
   }
   ```
   
   because in Line 141, nullable is hard-coded to `true`.
   
   https://github.com/apache/arrow-rs/blob/3096591520d303eb34a432c82733e86f34999232/arrow/src/array/builder/map_builder.rs#L138-L142
   
   So, it will also be `optional int32 num`.
   
   **Describe the solution you'd like**
   Can we make it configurable?
   


-- 
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.apache.org

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


[GitHub] [arrow-rs] Weijun-H commented on issue #2119: Please make the MapBuilder values_field nullable a configurable value

Posted by "Weijun-H (via GitHub)" <gi...@apache.org>.
Weijun-H commented on issue #2119:
URL: https://github.com/apache/arrow-rs/issues/2119#issuecomment-1445324883

   After reviewing the code, it appears that the bug has been resolved.
   
   ``` rust
   // optional group my_map (MAP_KEY_VALUE) {
   //   repeated group map {
   //     required binary key (UTF8);
   //     optional int32 value;
   //   }
   // }
   {
       arrow_fields.push(Field::new(
           "my_map3",
           DataType::Map(
               Box::new(Field::new(
                   "map",
                   DataType::Struct(vec![
                       Field::new("key", DataType::Utf8, false),
                       Field::new("value", DataType::Int32, true),
                   ]),
                   false, // (#1697)
               )),
               false,
           ),
           true,
       ));
   }
   ```
   


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


[GitHub] [arrow-rs] LiShiZhensPi commented on issue #2119: Please make the MapBuilder values_field nullable a configurable value

Posted by "LiShiZhensPi (via GitHub)" <gi...@apache.org>.
LiShiZhensPi commented on issue #2119:
URL: https://github.com/apache/arrow-rs/issues/2119#issuecomment-1408781103

   hi, I would like try to fix this :)


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


Re: [I] Please make the MapBuilder values_field nullable a configurable value [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold closed issue #2119: Please make the MapBuilder values_field nullable a configurable value
URL: https://github.com/apache/arrow-rs/issues/2119


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