Skip to content

Commit

Permalink
Use sch.names to get schema names instead of relying on type parameter (
Browse files Browse the repository at this point in the history
#849)

Along with Tables.jl and DataFrames.jl fixes, this provides the CSV.jl
part of fixing #635. I was pleasantly surprised to find this was all
that was needed to support extremely wide tables when writing (reading
already works fine).
  • Loading branch information
quinnj authored Jun 23, 2021
1 parent 0eaacb4 commit 52663d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/write.jl
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,12 @@ function write(file, itr;
end
end

function write(sch::Tables.Schema{names}, rows, file, opts;
function write(sch::Tables.Schema, rows, file, opts;
append::Bool=false,
header::Union{Bool, Vector}=String[],
bufsize::Int=2^22
) where {names}
colnames = !(header isa Vector) || isempty(header) ? names : header
)
colnames = !(header isa Vector) || isempty(header) ? sch.names : header
cols = length(colnames)
len = bufsize
buf = Vector{UInt8}(undef, len)
Expand Down

0 comments on commit 52663d4

Please sign in to comment.