You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Morgan279 (via GitHub)" <gi...@apache.org> on 2024/11/29 09:20:29 UTC

[PR] change map field default names to follow the parquet format spec [arrow-rs]

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: github-unsubscribe@arrow.apache.org

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


Re: [PR] change map field default names to follow the parquet format spec [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on PR #6814:
URL: https://github.com/apache/arrow-rs/pull/6814#issuecomment-2507642080

   Can you confirm pyarrow does follow this convention, the arrow spec has different guidance
   
   https://github.com/apache/arrow-rs/blob/main/format%2FSchema.fbs#L133
   
   I'm also rather wary of making this change as it will be highly disruptive, and for relatively limited benefit


-- 
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: [PR] change map field default names to follow the parquet format spec [arrow-rs]

Posted by "Morgan279 (via GitHub)" <gi...@apache.org>.
Morgan279 closed pull request #6814: change map field default names to follow the parquet format spec
URL: https://github.com/apache/arrow-rs/pull/6814


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