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

Register the Interval structs with Arrow.jl via Requires.jl #156

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rofinn
Copy link
Member

@rofinn rofinn commented Feb 21, 2021

One thing to consider with this addition is that Arrow.jl doesn't handle type changes very well.

Options:

  1. Accept that changing the types will count as a breaking change and it'll be impossible to load old arrow files with the new release.
  2. Consider a workflow where we support multiple structs (e.g., Intervalv1, Intervalv2) and appropriate upgrade conversions.

apache/arrow-julia#133

@rofinn rofinn requested a review from omus as a code owner February 21, 2021 03:33
@codecov
Copy link

codecov bot commented Feb 21, 2021

Codecov Report

Merging #156 (3e9726d) into master (9e6ce76) will decrease coverage by 0.29%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #156      +/-   ##
==========================================
- Coverage   76.55%   76.25%   -0.30%     
==========================================
  Files          11       11              
  Lines         516      518       +2     
==========================================
  Hits          395      395              
- Misses        121      123       +2     
Impacted Files Coverage Δ
src/endpoint.jl 94.73% <ø> (+0.14%) ⬆️
src/Intervals.jl 83.33% <100.00%> (+3.33%) ⬆️
src/interval.jl 92.98% <0.00%> (-1.17%) ⬇️

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 9e6ce76...5280c18. Read the comment docs.

@rofinn
Copy link
Member Author

rofinn commented Feb 21, 2021

I guess this would require us to drop testing on Julia 1.0 since Arrow requires 1.3.

.github/workflows/CI.yml Show resolved Hide resolved
test/arrow.jl Show resolved Hide resolved
test/arrow.jl Outdated Show resolved Hide resolved
test/runtests.jl Outdated Show resolved Hide resolved
test/runtests.jl Outdated Show resolved Hide resolved
Copy link
Collaborator

@omus omus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be good with the last correction

test/runtests.jl Outdated Show resolved Hide resolved
Co-authored-by: Curtis Vogt <curtis.vogt@gmail.com>
@omus
Copy link
Collaborator

omus commented Feb 23, 2021

One thing to consider with this addition is that Arrow.jl doesn't handle type changes very well.

I'm going to run a couple experiments with this today and either merge as-is or make some changes.

@omus
Copy link
Collaborator

omus commented Feb 23, 2021

Looks like the parametric information isn't being stored which is problematic:

julia> using Arrow

julia> using Dates, Intervals, TimeZones

julia> table = (interval = [
           Interval{Closed,Closed}(1,2),
           Interval{Open,Closed}(1,2),
           Interval{Closed,Unbounded}(1,nothing),
       ],)
(interval = Interval{Int64,L,R} where R<:Bound where L<:Bound[Interval{Int64,Closed,Closed}(1, 2), Interval{Int64,Open,Closed}(1, 2), Interval{Int64,Closed,Unbounded}(1, nothing)],)

julia> Arrow.write("data.arrow", table)

julia> loaded = Arrow.Table("data.arrow");

julia> loaded.interval
3-element Arrow.Struct{Interval{Int64,L,R} where R<:Bound where L<:Bound,Tuple{Arrow.Primitive{Int64,Array{Int64,1}},Arrow.Primitive{Int64,Array{Int64,1}}}}:
 Interval{Int64,Closed,Closed}(1, 2)
 Interval{Int64,Closed,Closed}(1, 2)
 Interval{Int64,Closed,Closed}(1, 1)

@omus
Copy link
Collaborator

omus commented Feb 23, 2021

I've made issues with Arrow for the two problems I've discovered:

Copy link
Collaborator

@omus omus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to address Arrow issues

@omus omus mentioned this pull request Jul 8, 2021
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.

None yet

2 participants