Uh oh!
There was an error while loading. Please reload this page.
ARROW-15498: [C++][Compute] Implement Bloom filter pushdown between hash joins - #12289
ARROW-15498: [C++][Compute] Implement Bloom filter pushdown between hash joins#12289save-buffer wants to merge 42 commits into
Conversation
Thanks for opening a pull request! If this is not a minor PR. Could you open an issue for this pull request on JIRA? https://issues.apache.org/jira/browse/ARROW Opening JIRAs ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename pull request title in the following format? or See also: |
800a969 to
ed4d9dcCompareed4d9dc to
1ab0babComparec9b57e0 to
02a003aCompare
westonpace
left a comment
There was a problem hiding this comment.
Starting to review this. Still need to go through hash_join.cc but I have some initial comments from the periphery.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
It's weird if you Init the TempVectorStack with one size and then it segfaults if you try to alloc that much memory. That's because alloc bumps the stack by PaddedAllocationSize(size) + 2 * sizeof(uint64_t)
There was a problem hiding this comment.
Is this still needed after we fixed other TSAN related issues?
There was a problem hiding this comment.
Yes, I had to make blocks atomic to make TSAN go away, which we don't want to do
There was a problem hiding this comment.
Why ignore it? Return it if it isn't ok.
There was a problem hiding this comment.
The lambda expression needs to return void here. I can maybe DCHECK_OK it.
There was a problem hiding this comment.
So is the idea here to measure the overhead cost of building the bloom filter?
There was a problem hiding this comment.
Well we benchmark to see what kind of performance impact the Bloom filter has.
But since we currently only do early-elimination of rows, and only build on the build side, this disqualifies some types of joins, so we check that here.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Since we operate on these pairs everywhere why not create:
struct BloomFilterTarget {
HashJoinImpl* join_impl;
std::vector<int> column_map;
};
It's also takes a bit of reading to figure out what the purpose of column_map is so this could be a place to briefly describe that.
There was a problem hiding this comment.
I only use the pair in one spot as far as I can tell. I just use it so that I can use std::tie on whoever calls GetPushdownTarget. I did add a big comment though
7d4502d to
4b6ccf4Compare139dcae to
0575ddfCompare653f13b to
619f098Compare
westonpace
left a comment
There was a problem hiding this comment.
Some minor suggestions but overall I think this is pretty much ready to go once #13091 merges.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ad92449 to
15f3c37Compare
westonpace
left a comment
There was a problem hiding this comment.
Let's rebase on top of master now that the thread scheduler issue is in. Then, assuming CI passes, I think this is ready to go.
4e0621a to
ede7599Comparesave-buffer
commented
May 16, 2022
OK I think this is good now. The various failures seem to be because of : And The latter of which is being addressed in #13101 |
c8be4c8 to
1a4ae69Comparewestonpace
commented
May 18, 2022
I played around with this today and saw similar. Some bloom filter combinations were just very slow on my laptop. In general though I didn't see any true deadlock though I can never fully rule that out. |
save-buffer
commented
May 18, 2022
Just to be clear, it's not the Bloom filter that's slow (the slow parts tend to be full outer joins, where Bloom filter is disabled). It seems to be related to residual filters being slow, in particular KeyEncoder::DecodeNulls |
westonpace
commented
May 18, 2022
Yes. The slowdown happened in ProbeQueuedBatches which would make sense (I think) if it was related to residual filters. |
ursabot
commented
May 18, 2022
Benchmark runs are scheduled for baseline = 6faee47 and contender = 0742f78. 0742f78 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
ursabot
commented
May 18, 2022
['Python', 'R'] benchmarks have high level of regressions. |
This adds Bloom filter pushdown between hash join nodes.