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

   **Describe the bug**
   
   The parquet specification states that the values for a MapArray are optional 
- https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#maps.
   
   However, the currently logic in `ArrayReaderBuilder` requires a values 
array, along with the current definition of `DataType::Map`
   
   ```
   /// A Map is a logical nested type that is represented as
   ///
   /// `List<entries: Struct<key: K, value: V>>`
   ///
   /// The keys and values are each respectively contiguous.
   /// The key and value types are not constrained, but keys should be
   /// hashable and unique.
   /// Whether the keys are sorted can be set in the `bool` after the `Field`.
   ///
   /// In a field with Map type, the field has a child Struct field, which then
   /// has two children: key type and the second the value type. The names of 
the
   /// child fields may be respectively "entries", "key", and "value", but this 
is
   /// not enforced.
   ```
   
   **To Reproduce**
   
   Try to read a MapArray without a values array, you will receive an error
   
   **Expected behavior**
   
   I'm not actually entirely sure, the arrow specification doesn't seem to 
describe the semantics of Map Arrays, however, our code seems to assume that 
the values array is required. I'm creating this to track the fact something 
isn't right here, but I don't actually know what.
   
   **Additional context**
   
   Map Arrays were added by @nevi-me as part of 
https://github.com/apache/arrow-rs/issues/395
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to