arrow-julia icon indicating copy to clipboard operation
arrow-julia copied to clipboard

WIP - C Data Interface

Open sa- opened this issue 3 years ago • 2 comments

Building off of this PR https://github.com/JuliaData/Arrow.jl/pull/178

sa- avatar Apr 17 '21 23:04 sa-

using Arrow, PyCall
pd = pyimport("pandas")
pa = pyimport("pyarrow")
df = pd.DataFrame(py"""{'a': [1, 2, 3, 4, 5], 'b': ['a', 'b', 'c', 'd', 'e']}"""o)
rb = pa.record_batch(df)
sch = Arrow.CDataInterface.get_schema() do ptr
    rb.schema._export_to_c(Int(ptr))
end
arr = Arrow.CDataInterface.get_array() do ptr
    rb._export_to_c(Int(ptr))
end

sa- avatar Apr 17 '21 23:04 sa-

And in general, how does one new-up an ArrowVector? I was hoping to find a constructor that looks vaguely like this

ArrowVector{T}(buffers ::Vector{ArrowBuffer{T}})

sa- avatar Apr 24 '21 17:04 sa-