Skip to content
Browse files
document guarantee that getmetadata returns alias not copy (#169)
  • Loading branch information
jrevels committed Apr 7, 2021
1 parent 295416d commit 000d89f78070c0a41afc8505fb537d8b3370719c
Showing 1 changed file with 6 additions and 1 deletion.
@@ -31,11 +31,16 @@ end
Arrow.getmetadata(x) => Dict{String, String}
Retrieve any metadata (as a `Dict{String, String}`) attached to an object.
Retrieve any metadata (as a `Dict{String, String}`) attached to `x`.
Metadata may be attached to any object via [`Arrow.setmetadata!`](@ref),
or deserialized via the arrow format directly (the format allows attaching metadata
to table, column, and other objects).
Note that this function's return value directly aliases `x`'s attached metadata
(i.e. is not a copy of the underlying storage). Any method author that overloads
this function should preserve this behavior so that downstream callers can rely
on this behavior in generic code.
getmetadata(x, default=nothing) = get(OBJ_METADATA, x, default)

0 comments on commit 000d89f

Please sign in to comment.