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

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   Closes [#6213 ](https://github.com/apache/arrow-rs/issues/6213) .
   
   # Rationale for this change
   The MapBuilder uses the nonstandardized default names, which results in 
[#6213 ](https://github.com/apache/arrow-rs/issues/6213). Changing to parquet 
spec helps reduce confusion and provides users with a more standardized naming 
guide.
   
   [According to the parquet-format 
spec](https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#backward-compatibility-rules-1),
 the outer-most level should be a group that contains a single field named 
**key_value** for Map type:
   > The outer-most level must be a group annotated with MAP that contains a 
single field named **key_value**. The repetition of this level must be either 
optional or required and determines whether the map is nullable.
   The middle level, named key_value, must be a repeated group with a **key** 
field for map keys and, optionally, a **value** field for map values. It must 
not contain any other values.
   
   
   Changing the default map field names to match it not only complies with the 
parquet spec, but also aligns with pyarrow.
    
   <!--
   Why are you proposing this change? If this is already explained clearly in 
the issue then this section is not needed.
   Explaining clearly why changes are proposed helps reviewers understand your 
changes and offer better suggestions for fixes.
   -->
   
   # What changes are included in this PR?
   Default value of the MapFieldNames
   
   <!--
   There is no need to duplicate the description in the issue here but it is 
sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   No(I think)
   
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   
   <!---
   If there are any breaking changes to public APIs, please call them out.
   -->
   


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