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

document guarantee that getmetadata returns alias not copy #169

Merged
merged 1 commit into from
Apr 7, 2021

Conversation

jrevels
Copy link
Contributor

@jrevels jrevels commented Apr 6, 2021

ref #90 (comment)

I'm relying on this currently undocumented behavior in downstream code that looks like:

function assign_to_table_metadata!(table, pairs)
    m = Arrow.getmetadata(table)
    if !(m isa Dict)
        m = Dict{String,String}()
        Arrow.setmetadata!(table, m)
    end
    for (k, v) in pairs
        m[k] = v
    end
    return m
end

Seems like there's not much harm in explicitly documenting this assumption so that I can say the above code is "generic" 😁

@codecov
Copy link

codecov bot commented Apr 6, 2021

Codecov Report

Merging #169 (143a27c) into main (295416d) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #169   +/-   ##
=======================================
  Coverage   81.32%   81.32%           
=======================================
  Files          25       25           
  Lines        3014     3014           
=======================================
  Hits         2451     2451           
  Misses        563      563           
Impacted Files Coverage Δ
src/write.jl 95.69% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 295416d...143a27c. Read the comment docs.

@quinnj quinnj merged commit 000d89f into main Apr 7, 2021
@quinnj quinnj deleted the jrevels-patch-1 branch April 7, 2021 05:54
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.

2 participants