From 88bbfd85cba02505d46ee104d9f6df6fe855119d Mon Sep 17 00:00:00 2001 From: David Anthoff Date: Mon, 14 Jan 2019 15:51:13 -0800 Subject: [PATCH] Force Vector{String} instead of StringVector --- NEWS.md | 3 +++ REQUIRE | 2 +- src/CSVFiles.jl | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/NEWS.md b/NEWS.md index 58ff18b..d71fc2a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +# CSVFiles.jl v0.13.0 +* Never use StringVector, always use Vector{String} instead + # CSVFiles.jl v0.12.0 * Export FileIO.File and FileIO.@format_str diff --git a/REQUIRE b/REQUIRE index ea25a2a..2a22d71 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,5 +1,5 @@ julia 0.7 -TextParse 0.6.0 +TextParse 0.7.0 IteratorInterfaceExtensions 0.1.1 TableTraits 0.4.0 TableTraitsUtils 0.2.1 diff --git a/src/CSVFiles.jl b/src/CSVFiles.jl index cac1a64..76eb3dc 100644 --- a/src/CSVFiles.jl +++ b/src/CSVFiles.jl @@ -66,9 +66,9 @@ function _loaddata(file) if startswith(file.filename, "https://") || startswith(file.filename, "http://") response = HTTP.get(file.filename) data = String(response.body) - return TextParse._csvread(data, file.delim; file.keywords...) + return TextParse._csvread(data, file.delim; stringarraytype=Array, file.keywords...) else - return csvread(file.filename, file.delim; file.keywords...) + return csvread(file.filename, file.delim; stringarraytype=Array, file.keywords...) end end @@ -86,7 +86,7 @@ function TableTraits.get_columns_copy_using_missing(file::CSVFile) end function TableTraits.getiterator(s::CSVStream) - res = TextParse.csvread(s.io, s.delim; s.keywords...) + res = TextParse.csvread(s.io, s.delim; stringarraytype=Array, s.keywords...) it = TableTraitsUtils.create_tableiterator([i for i in res[1]], [Symbol(i) for i in res[2]]) @@ -94,7 +94,7 @@ function TableTraits.getiterator(s::CSVStream) end function TableTraits.get_columns_copy_using_missing(s::CSVStream) - columns, colnames = TextParse.csvread(s.io, s.delim, s.keywords...) + columns, colnames = TextParse.csvread(s.io, s.delim; stringarraytype=Array, s.keywords...) return NamedTuple{(Symbol.(colnames)...,), Tuple{typeof.(columns)...}}((columns...,)) end