Skip to content

Commit 8b84045

Browse files
committed
add compare to warmup
1 parent c400290 commit 8b84045

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

src/precompile/warmup.jl

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,21 @@ function warmup()
119119
inn_r1 = innerjoin(view(store, :, :), roster, on = [:store => :store, :date => (:end_date, :start_date)], stable = true, method = :hash)
120120
inn_r1_a = innerjoin(view(store, :, :), roster, on = [:store => :store, :date => (:end_date, :start_date)], stable = true, accelerate = true, method = :hash)
121121

122-
122+
old = Dataset(Insurance_Id=[1,2,3,5],Business_Id=[10,20,30,50],
123+
Amount=[100,200,300,missing],
124+
Account_Id=["x1","x10","x5","x5"])
125+
new = Dataset(Ins_Id=[1,3,2,4,3,2],
126+
B_Id=[10,40,30,40,30,20],
127+
AMT=[100,200,missing,-500,350,700],
128+
Ac_Id=["x1","x1","x10","x10","x7","x5"])
129+
eq_fun(x::Number, y::Number) = abs(x - y) <= 50
130+
eq_fun(x::AbstractString, y::AbstractString) = isequal(x,y)
131+
eq_fun(x,y) = missing
132+
compare(old, new,
133+
on = [1=>1,2=>2],
134+
cols = [:Amount=>:AMT, :Account_Id=>:Ac_Id],
135+
eq = eq_fun)
136+
123137
ds = Dataset(foo = ["one", "one", "one", "two", "two","two"],
124138
bar = ['A', 'B', 'C', 'A', 'B', 'C'],
125139
baz = [1, 2, 3, 4, 5, 6],

0 commit comments

Comments
 (0)