Tim Armstrong has uploaded a new patch set (#15). Change subject: IMPALA-3567: Part 1: groundwork to make Join build sides DataSinks ......................................................................
IMPALA-3567: Part 1: groundwork to make Join build sides DataSinks Refactor DataSink interface to be more generic. We need more flexibility in setting up MemTrackers, so that memory is accounted against the right ExecNode. Also removes some redundancy between DataSink subclasses in setting up RuntimeProfiles, etc. Remove the redundancy in the DataSink between passing eos to GetNext() and FlushFinal(). This simplifies HdfsTableSink quite a bit and makes handling empty batches simpler. Partially refactor join nodes that so control flow between BlockingJoinNode::Open() and its subclasses is easier to follow. BlockingJoinNode now only calls one virtual function on its subclasses: ConstructBuildSide(). Once we convert all join nodes to use the DataSink interface, we will also be able to remove that as well. As a minor optimisation, avoid updating a timer that is ignored for non-async builds. As a proof of concept, this patch separates out the build side of NestedLoopJoinNode into a class that implements the DataSink interface. The main challenge here is that NestedLoopJoinNode recycles row batches to avoid reallocations and copies of row batches in subplans. The solution to this is: - Retain the special-case optimisation for SingularRowSrc - Use the row batch cache and std::swap() to efficiently recycle and copy the state of row batches passed to Send() Refactoring the partitioned hash join is left for Part 2. Change-Id: I9d7608181eeacfe706a09c1e153d0a3e1ee9b475 --- M be/src/exec/CMakeLists.txt M be/src/exec/blocking-join-node.cc M be/src/exec/blocking-join-node.h M be/src/exec/data-sink.cc M be/src/exec/data-sink.h M be/src/exec/hash-join-node.cc M be/src/exec/hash-join-node.h M be/src/exec/hbase-table-sink.cc M be/src/exec/hbase-table-sink.h M be/src/exec/hdfs-table-sink.cc M be/src/exec/hdfs-table-sink.h M be/src/exec/kudu-table-sink-test.cc M be/src/exec/kudu-table-sink.cc M be/src/exec/kudu-table-sink.h A be/src/exec/nested-loop-join-builder.cc A be/src/exec/nested-loop-join-builder.h M be/src/exec/nested-loop-join-node.cc M be/src/exec/nested-loop-join-node.h M be/src/exec/partitioned-hash-join-node.cc M be/src/exec/partitioned-hash-join-node.h M be/src/exec/row-batch-cache.h M be/src/runtime/data-stream-sender.cc M be/src/runtime/data-stream-sender.h M be/src/runtime/data-stream-test.cc M be/src/runtime/plan-fragment-executor.cc M be/src/runtime/plan-fragment-executor.h M be/src/runtime/row-batch.cc M be/src/runtime/row-batch.h M be/src/util/stopwatch.h 29 files changed, 701 insertions(+), 459 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/82/3282/15 -- To view, visit http://gerrit.cloudera.org:8080/3282 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9d7608181eeacfe706a09c1e153d0a3e1ee9b475 Gerrit-PatchSet: 15 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Tim Armstrong <[email protected]> Gerrit-Reviewer: Alex Behm <[email protected]> Gerrit-Reviewer: Marcel Kornacker <[email protected]> Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]>
