Skip to content

Inconsistencies in Schema #331

Open
Open
@simsurace

Description

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions