Skip to content

Revert "chore: formalize the default map field names to match default arrow spec (#10297)" - #10506

Merged
Jefffrey merged 1 commit into
apache:mainfrom
alamb:revert-10297-map-field-names
Aug 2, 2026
Merged

Revert "chore: formalize the default map field names to match default arrow spec (#10297)"#10506
Jefffrey merged 1 commit into
apache:mainfrom
alamb:revert-10297-map-field-names

Conversation

@alamb

@alamb alamb commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

N/A

cc @Jefffrey and @rluvaton

Rationale for this change

#10297 changed the default map field names from keys/values to key/value to match the Arrow spec. This is a good change to align with the spec, but it is a breaking change: it broke the DataFusion upgrade (apache/datafusion#24030) because data produced elsewhere (e.g. by other Arrow implementations) uses the old keys/values field names, causing schema mismatches such as:

InvalidArgumentError("Incorrect datatype for StructArray field \"metadata\", expected Map(\"entries\": non-null Struct(\"keys\": non-null Utf8, \"values\": Utf8), unsorted) got Map(\"entries\": non-null Struct(\"key\": non-null Utf8, \"value\": Utf8), unsorted)")

See discussion on #10297: #10297 (comment)

We should hold the field name change for the next breaking release to minimize downstream churn on a minor release, rather than ship it in a minor release.

What changes are included in this PR?

Are these changes tested?

Existing tests.

Are there any user-facing changes?

Yes: this reverts the default MapFieldNames back to keys/values (as it was prior to #10297), rather than key/value. The intent is to reapply #10297 as part of the next breaking release.

@Jefffrey
Jefffrey merged commit ed92960 into apache:main Aug 2, 2026
37 checks passed
@Jefffrey

Jefffrey commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

thanks @alamb

ive added a note to #9880 to include this again for 60.0.0

@alamb

alamb commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @Jefffrey

I made a PR to reapply the changes while it is fresh in my mind

@alamb
alamb deleted the revert-10297-map-field-names branch August 2, 2026 09:12
Jefffrey added a commit that referenced this pull request Aug 4, 2026
…0517)

This reverts commit ed92960.

# Which issue does this PR close?

- related to #10506
- related to #10297

# Rationale for this change

As part of the 59.2.0 release, I found that the changes in
#10297 from @rluvaton required
downstream modifications and thus were not appropriate for a point
release.

Thus I reverted the changes in
#10506 until the next breaking
release (60.0.0)

# What changes are included in this PR?

- Reapplies the changes from
#10297
- (by reverting the revert from
#10506 🤯 )

# Are these changes tested?
Yes

# Are there any user-facing changes?

Yes, the names of fields in MapArrays are now consistent ("key" and
"value" always, rather than sometimes "keys" and "values")

Co-authored-by: Jeffrey Vo <jeffrey.vo.australia@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate arrow-array arrow-avro arrow-avro crate arrow-cast arrow-data arrow-flight Changes to the arrow-flight crate arrow-integration-test arrow-ipc arrow-json arrow-row arrow-schema parquet Changes to the parquet crate parquet-variant parquet-variant* crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants