Skip to content

Conversation

@emilk
Copy link
Contributor

@emilk emilk commented Jun 13, 2025

Which issue does this PR close?

Rationale for this change

Allows for fast and convenient mutating of the metadata of record batches and fields.

What changes are included in this PR?

Added:

  • RecordBatch::schema_metadata_mut
  • Field::metadata_mut

Why call it schema_metadata_mut and not just metadata_mut?

See #7628 (comment) for motivation

@github-actions github-actions bot added the arrow Changes to the arrow crate label Jun 13, 2025
@emilk emilk changed the title Add RecordBatch::metadata_mut and Field::metadata_mut Add RecordBatch::schema_metadata_mut and Field::metadata_mut Jun 13, 2025
@mbrobbel
Copy link
Member

Failing integration test: apache/arrow-js#15

@alamb
Copy link
Contributor

alamb commented Jun 16, 2025

Failing integration test: apache/arrow-js#15

Seems is has passed now

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a nice improvement to me -- thank you @emilk and @mbrobbel

I left some suggestions, but I also think we can do them as follow on PRs as well.

Co-authored-by: Andrew Lamb <[email protected]>
@alamb alamb merged commit e6c93c0 into apache:main Jun 17, 2025
26 checks passed
@alamb
Copy link
Contributor

alamb commented Jun 17, 2025

Thanks @emilk

@emilk
Copy link
Contributor Author

emilk commented Jun 17, 2025

This is a good candidate for adding to the next minor release btw

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fast and ergonomic method to add metadata to a RecordBatch

3 participants