Skip to content

Commit a9f2db6

Browse files
author
Shashi Gowda
committed
remove reliance on non-empty affinity
1 parent f094113 commit a9f2db6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/join.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function rechunk_together(left, right, lkey, rkey,
2323
r = rechunk(r, rkey, rselect,
2424
splitters=splitters[1:end-1],
2525
chunks_presorted=true,
26-
affinities=map(x->first(Dagger.affinity(x))[1].pid, l.chunks),
26+
#affinities=map(x->first(Dagger.affinity(x))[1].pid, l.chunks),
2727
)
2828
l, r
2929
end
@@ -51,10 +51,13 @@ function Base.join(f, left::DDataset, right::DDataset;
5151
else
5252
right_ser = collect(cr)
5353
end
54-
ps = map(x->first(Dagger.affinity(x))[1], cl.chunks)
54+
ps = map(cl.chunks) do c
55+
a = Dagger.affinity(c)
56+
first.(a[1:min(length(a), 1)])
57+
end
5558
tasks = [delayed(identity)(right_ser) for p in ps]
5659
for (t, p) in zip(tasks, ps)
57-
t.affinity = Nullable([p=>1])
60+
t.affinity = Nullable(Pair.(p, 1))
5861
end
5962
r = fromchunks(tasks)
6063
l = cl

0 commit comments

Comments
 (0)