zanmato1984 commented on code in PR #39487:
URL: https://github.com/apache/arrow/pull/39487#discussion_r1462853221


##########
cpp/src/arrow/acero/hash_join_node_test.cc:
##########
@@ -1893,58 +1893,146 @@ TEST(HashJoin, CheckHashJoinNodeOptionsValidation) {
   }
 }
 
-TEST(HashJoin, ResidualFilter) {
-  for (bool parallel : {false, true}) {
-    SCOPED_TRACE(parallel ? "parallel/merged" : "serial");
-
-    BatchesWithSchema input_left;
-    input_left.batches = {ExecBatchFromJSON({int32(), int32(), utf8()}, R"([
-                   [1, 6, "alpha"],
-                   [2, 5, "beta"],
-                   [3, 4, "alpha"]
-                 ])")};
-    input_left.schema =
-        schema({field("l1", int32()), field("l2", int32()), field("l_str", 
utf8())});
-
-    BatchesWithSchema input_right;
-    input_right.batches = {ExecBatchFromJSON({int32(), int32(), utf8()}, R"([
-                   [5, 11, "alpha"],
-                   [2, 12, "beta"],
-                   [4, 16, "alpha"]
-                 ])")};
-    input_right.schema =
-        schema({field("r1", int32()), field("r2", int32()), field("r_str", 
utf8())});
+class ResidualFilterCaseRunner {
+ public:
+  ResidualFilterCaseRunner(BatchesWithSchema left_input, BatchesWithSchema 
right_input)
+      : left_input_(std::move(left_input)), 
right_input_(std::move(right_input)) {}
+
+  void Run(JoinType join_type, const std::vector<FieldRef>& left_keys,
+           const std::vector<FieldRef>& right_keys, Expression filter,
+           const std::vector<ExecBatch>& expected) const {
+    RunInternal(HashJoinNodeOptions{join_type, std::move(left_keys),
+                                    std::move(right_keys), std::move(filter)},
+                expected);
+  }
+
+  void Run(JoinType join_type, std::vector<FieldRef> left_keys,

Review Comment:
   My bad. I forgot double-checking these function signatures. I meant to use 
pass by (right) value then move. I've updated the PR. Truly sorry about that.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to