Skip to content

Commit

Permalink
Few cleanups for DataStreams (#1258)
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnj authored and ararslan committed Oct 15, 2017
1 parent 8cf2be9 commit 6224f0c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/abstractdataframe/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,10 @@ allocate(::Type{CategoricalValue{T, R}}, rows, ref) where {T, R} =
CategoricalArray{T, 1, R}(rows)
allocate(::Type{Union{Null, CategoricalValue{T, R}}}, rows, ref) where {T, R} =
CategoricalArray{Union{Null, T}, 1, R}(rows)
allocate(::Type{T}, rows, ref) where {T <: Union{WeakRefString, Null}} =
WeakRefStringArray(ref, T, rows)
allocate(::Type{WeakRefString{T}}, rows, ref) where {T} =
WeakRefStringArray(ref, WeakRefString{T}, rows)
allocate(::Type{Union{Null, WeakRefString{T}}}, rows, ref) where {T} =
WeakRefStringArray(ref, Union{Null, WeakRefString{T}}, rows)
allocate(::Type{Null}, rows, ref) = nulls(rows)

# Construct or modify a DataFrame to be ready to stream data from a source with `sch`
Expand Down Expand Up @@ -300,10 +302,7 @@ DataFrame(sink, sch::Data.Schema, ::Type{S}, append::Bool;
sink.columns[col][row] = val
@inline function Data.streamto!(sink::DataFrameStream, ::Type{Data.Column}, column,
row, col::Int, knownrows)
# @show sink.columns[col]
# @show column
append!(sink.columns[col], column)
# @show sink.columns[col]
end


Expand Down

0 comments on commit 6224f0c

Please sign in to comment.