File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ function __init__()
20
20
isstringarray (:: WeakRefStrings.StringArray ) = true
21
21
default_array (:: Type{T} , d) where {T<: Union{AbstractString, Missing} } = WeakRefStrings. StringArray {T} (d)
22
22
end
23
+ Requires. @require DataValues= " e7dc6d0d-1eca-5fa6-8ad6-5aecde8b7ea5" begin
24
+ Base. @pure SkipConstructor (:: Type{<:DataValues.DataValue} ) = true
25
+ end
23
26
end
24
27
25
28
end # module
Original file line number Diff line number Diff line change 1
1
Tables
2
2
PooledArrays
3
3
WeakRefStrings
4
+ DataValues
Original file line number Diff line number Diff line change 1
1
using StructArrays
2
2
using StructArrays: LazyRow
3
3
import Tables, PooledArrays, WeakRefStrings
4
+ using DataValues: DataValue
4
5
using Test
5
6
6
7
# write your own tests here
408
409
@test v. a == [i for i in 1 : 3 , j in 1 : 4 ]
409
410
@test v. b == [j for i in 1 : 3 , j in 1 : 4 ]
410
411
end
412
+
413
+ @testset " datavalues" begin
414
+ a = DataValue (2 )
415
+ b = DataValue {Float64} ()
416
+ s = StructArray (i for i in (a, b))
417
+ @test propertynames (s) == (:hasvalue , :value )
418
+ @test s. hasvalue == [true , false ]
419
+ @test s. value isa Vector{Real}
420
+ @test s. value[1 ] == 2
421
+ end
You can’t perform that action at this time.
0 commit comments