Skip to content

feat: Add Schema and Field withMetadata methods for metadata replacement#334

Open
kentkwu wants to merge 1 commit intoapache:mainfrom
kentkwu:feat/add-schema-and-field-with-metadata-helpers
Open

feat: Add Schema and Field withMetadata methods for metadata replacement#334
kentkwu wants to merge 1 commit intoapache:mainfrom
kentkwu:feat/add-schema-and-field-with-metadata-helpers

Conversation

@kentkwu
Copy link

@kentkwu kentkwu commented Nov 16, 2025

What's Changed

Summary:

  • Added Field.withMetadata() and Schema.withMetadata() so callers can replace or clear metadata maps without manually juggling Map<string,string> instances. Both helpers accept either a Map, a plain object, or null (to clear), and always return a new instance, matching the C++/PyArrow/Rust behavior.
  • Added test/unit/schema-tests.ts with coverage for the new helpers. I couldn't find a better place to put these but let me know if I missed something.

Closes #333

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add (Field|Schema).withMetadata() helper to match other Arrow bindings

1 participant