Skip to content
Permalink
Browse files
Merge pull request #40 from ExpandingMan/fix-dictencoding
added missing DictEncoding constructor method
  • Loading branch information
ExpandingMan committed Mar 8, 2019
2 parents a61b37d + 60255e4 commit 94b335e209485b15163af974e6cb58bd34632e76
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 23 deletions.
@@ -1,4 +1,3 @@
## Documentation: http://docs.travis-ci.com/user/languages/julia/
language: julia
os:
- linux
@@ -9,28 +8,11 @@ julia:
- nightly
notifications:
email: false
git:
depth: 99999999

## uncomment the following lines to allow failures on nightly julia
## (tests will run but not make your overall status red)
matrix:
allow_failures:
- julia: nightly

## uncomment and modify the following lines to manually install system packages
#addons:
# apt: # apt-get for linux
# packages:
# - gfortran
#before_script: # homebrew for mac
# - if [ $TRAVIS_OS_NAME = osx ]; then brew install gcc; fi

## uncomment the following lines to override the default test script
#script:
# - julia -e 'Pkg.clone(pwd()); Pkg.build("Arrow"); Pkg.test("Arrow"; coverage=true)'
after_success:
# push coverage results to Coveralls
- julia --project -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
# push coverage results to Codecov
- julia --project -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
- julia -e 'using Pkg; cd(Pkg.dir("DataFrames")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'

@@ -71,7 +71,7 @@ end

DictEncoding(v::AbstractVector) = DictEncoding(CategoricalArray(v))


DictEncoding{J,R,P}(d::DictEncoding{J,R,P}) where {J,R,P} = DictEncoding{J,R,P}(d.refs, d.pool)
DictEncoding{J,P}(d::DictEncoding{J,P}) where {J,P} = DictEncoding{J,P}(d.refs, d.pool)
DictEncoding{J}(d::DictEncoding{J}) where J = DictEncoding{J}(d.refs, d.pool)
DictEncoding{J}(d::DictEncoding{T}) where {J,T} = DictEncoding{J}(convert(AbstractVector{J}, d[:]))
@@ -113,7 +113,7 @@ function List{J,K}(::Type{C}, v::AbstractVector) where {K<:Integer,J,C}
end
List(v::AbstractVector{<:AbstractString}) = List{String,DefaultOffset}(UInt8, v)


List{J,K,P}(l::List{J,K,P}) where {J,K,P} = List{J,K,P}(l.length, l.offsets, l.values)
List{J}(l::List{J}) where J = List{J}(l.length, l.offsets, l.values)
List{J}(l::List{T}) where {J,T} = List{J}(convert(AbstractVector{J}, l[:]))
List(l::List{J}) where J = List{J}(l)
@@ -250,7 +250,10 @@ function NullableList(::Type{C}, v::AbstractVector{Union{J,Missing}}) where {C,J
end
NullableList(v::AbstractVector) = NullableList{String,DefaultOffset}(UInt8, v)

NullableList{J}(l::NullableList{J}) where J = NullableList{J}(p.length, p.bitmask, p.offsets, p.values)
function NullableList{J,K,P}(l::NullableList{J,K,P}) where {J,K,P}
NullableList{J,K,P}(l.length, l.bitmask, l.offsets, l.values)
end
NullableList{J}(l::NullableList{J}) where J = NullableList{J}(l.length, l.bitmask, l.offsets, l.values)
NullableList{J}(l::NullableList{T}) where {J,T} = NullableList{J}(convert(AbstractVector{J}, p[:]))
NullableList(l::NullableList{J}) where J = NullableList{J}(l)

0 comments on commit 94b335e

Please sign in to comment.