This is an automated email from the ASF dual-hosted git repository. stigahuang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit 37edc15dd678b071a253245f73dae305097f26c6 Author: Zoltan Borok-Nagy <[email protected]> AuthorDate: Thu Jul 3 18:12:22 2025 +0200 IMPALA-14197: Fix NestedLoopJoin to increment ProbeRows counter Prior this patch, NestedLoopJoin didn't increment probe rows counter, so we saw invalid values in the query profile. This patch fixes it. Testing * e2e tests added Change-Id: I98d56d010ee1367f8e96a368cbc64c02a4e390f0 Reviewed-on: http://gerrit.cloudera.org:8080/23120 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- be/src/exec/nested-loop-join-node.cc | 1 + .../functional-query/queries/QueryTest/joins.test | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/be/src/exec/nested-loop-join-node.cc b/be/src/exec/nested-loop-join-node.cc index b73ebbaf3..564b4524e 100644 --- a/be/src/exec/nested-loop-join-node.cc +++ b/be/src/exec/nested-loop-join-node.cc @@ -701,6 +701,7 @@ Status NestedLoopJoinNode::NextProbeRow(RuntimeState* state, RowBatch* output_ba return Status::OK(); } else { RETURN_IF_ERROR(child(0)->GetNext(state, probe_batch_.get(), &probe_side_eos_)); + COUNTER_ADD(probe_row_counter_, probe_batch_->num_rows()); } } current_probe_row_ = probe_batch_->GetRow(probe_batch_pos_++); diff --git a/testdata/workloads/functional-query/queries/QueryTest/joins.test b/testdata/workloads/functional-query/queries/QueryTest/joins.test index 19b1b483b..b05eca73e 100644 --- a/testdata/workloads/functional-query/queries/QueryTest/joins.test +++ b/testdata/workloads/functional-query/queries/QueryTest/joins.test @@ -859,3 +859,22 @@ select * from alltypestiny a join alltypestiny b on a.id = b.id; ---- CATCH Debug Action: PHJ_BUILDER_PREPARE:[email protected] ==== +---- QUERY +# Regression test for IMPALA-14197, to verify NestedLoopJoin sets 'ProbeRows' counter. +select count(*) from alltypes a, alltypestiny b +where a.id + b.id < 2000; +---- RESULTS +15972 +---- RUNTIME_PROFILE +aggregation(SUM, ProbeRows): 7300 +==== +---- QUERY +# Regression test for IMPALA-14197, to verify NestedLoopJoin sets 'ProbeRows' counter. +select count(*) from alltypes a, alltypestiny b +where a.id + b.id < 2000 and + a.id < 3000 +---- RESULTS +15972 +---- RUNTIME_PROFILE +aggregation(SUM, ProbeRows): 3000 +====
