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

Inconsistencies in Schema #331

Open
simsurace opened this issue Apr 6, 2023 · 0 comments
Open

Inconsistencies in Schema #331

simsurace opened this issue Apr 6, 2023 · 0 comments

Comments

@simsurace
Copy link

simsurace commented Apr 6, 2023

Generically, wide table schemas will bypass the type system:

Tables.jl/src/Tables.jl

Lines 477 to 483 in 2cb1399

function Schema(names, types; stored::Bool=false)
if stored || length(names) > SCHEMA_SPECIALIZATION_THRESHOLD
return Schema{nothing, nothing}([sym(x) for x in names], Type[T for T in types])
else
return Schema{Tuple(map(sym, names)), Tuple{types...}}()
end
end

But not for MatrixTables:

schema(m::MatrixTables{T}) where {T} = Schema(Tuple(names(m)), NTuple{size(getfield(m, :matrix), 2), eltype(T)})

Maybe the branch should be put in the constructor, such that it is done for any table type?

C.f. apache/arrow-julia#415

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

No branches or pull requests

1 participant