Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom metadata for schema and columns #20

Merged
merged 1 commit into from
Sep 15, 2020
Merged

Commits on Sep 15, 2020

  1. Support custom metadata for schema and columns

    Closes #13. This PR adds two new functions: `Arrow.getmetadata(x)` and
    `Arrow.setmetadata!(x, ::Dict{String, String})`, which allows, rather
    obviously, setting metadata for an arbitrary object and then retrieving
    that metadata. By utilizing these functions, users can get/set custom
    metadata that is serialized in the arrow format at the schema level and
    field (column) level. More specifically, to set arrow schema custom
    metadata, a user would call `Arrow.setmetadata!(tbl, meta)` on their
    table object `tbl`. To retrive arrow schema custom metadata, one can
    call `tbl = Arrow.Table(...); meta = Arrow.getmetadata(tbl)`. Similarly
    for column/field-level metadata, one can call `Arrow.setmetadata!(col,
    colmeta)` to cause custom metadata to be serialized in the arrow
    message, and call `Arrow.getmetadata(tbl.colX)` to retrive custom
    metadata for a specific column in an `Arrow.Table`.
    
    Note that technically the arrow `Message` and `Footer` objects also
    allow setting custom metadata, but those are not addressed at all in
    this PR since they seem to be less useful/urgent.
    quinnj committed Sep 15, 2020
    Configuration menu
    Copy the full SHA
    814880e View commit details
    Browse the repository at this point in the history