<@U07B9PD9W7J> I am working on implementing cross ...
# daft-dev
k
@Colin Ho I am working on implementing cross joins for the native executor and the implementation is essentially to make a streaming sink that collects all of the morsels from one side and then cross join that with each of the morsels on the other side. I'm wondering how to determine when the morsels from one child are exhausted and the dispatcher has moved onto the next child. I feel like you had something for that at some point but I don't see it anymore.
c
Yeah the operators used to have info on the
child_idx
of the input morsel, that was in order to support identifying input from the hash join build side vs hash join probe side, but I refactored it such that the probe table is transferred via a separate mechanism. We should be able to reintroduce this for streaming sinks to support cross joins, I can help with that.
k
ah gotcha, I'll try to add that in then
c
1 question though, is it possible to use the schema of the input table to determine whether it is left side or right side?
k
Hm, yeah that could be possible. It feels a little jank but might be a decent workaround for now
The schemas are guaranteed to be distinct
c
Ah nice, then you could even get away with just checking the schema length, or just the first column
k
sounds good then