Skip to content

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

@kentkwu

Description

@kentkwu

Describe the enhancement requested

Manipulating field and schema metadata in the JS bindings currently requires manually constructing Map<string, string> instances and re-instantiating Field/Objects objects.

Other Arrow implementations:

expose a helper that replaces a field/schema’s metadata map (and accepts null/None to clear it).

Request

Add a Field.withMetadata(), and Schema.withMetadata() method that:

  • Accepts a Map<string, string>, a plain object Record<string, string>, or null (to clear metadata).
  • Returns a new Field with the supplied metadata (replacement semantics, not merging).

This brings the JavaScript bindings in line with the existing C++/PyArrow/Rust APIs and makes metadata updates more ergonomic (and less error-prone).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions