jecsand838 opened a new pull request, #7451:
URL: https://github.com/apache/arrow-rs/pull/7451

   # Which issue does this PR close?
   
   Part of https://github.com/apache/arrow-rs/issues/4886
   
   Related to https://github.com/apache/arrow-rs/pull/6965
   
   # Rationale for this change
    
   Avro supports maps as a core data type, but previously arrow-avro lacked any 
decoding logic to handle them. As a result, any Avro file containing map fields 
would fail to parse correctly within the Arrow ecosystem. This PR addresses 
this gap by:
   
   1. Adding explicit Map decoding: It introduces a new` Codec::Map` variant 
and corresponding `Decoder::Map` logic that reads map blocks in Avro format and 
constructs an Arrow MapArray. This preserves both the keys and values in a 
schema-compatible manner, enabling accurate ingestion of map-encoded data.
   
   Overall, these changes expand Arrow’s Avro reader capabilities, allowing 
users to work with map-encoded data in a standardized Arrow format.
   
   # What changes are included in this PR?
   
   This PR adds full Map support in the arrow-avro crate. Key changes include:
   
   **1. arrow-avro/src/codec.rs:**
   
   * Added a `Codec::Map(Arc<AvroDataType>)` variant
   * Logic to construct an Arrow MapArray, including a struct of { key, value } 
with typed value decoding.
   * Added a new function to `AvroDataType`.
   
   **2. arrow-avro/src/reader/record.rs:**
   
   * Introduced the Map decoding path which leverages blockwise reads of Avro 
map data.
   * Created helpers read_map_blocks and `read_blockwise_items` to handle block 
sequences of key value pairs until a terminating block count of zero.
   * Implemented decoder unit tests for Map types.
   
   # Are there any user-facing changes?
   
   N/A
   


-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to