MCPcopy Create free account
hub / github.com/apache/arrow / HashJoinWithExecPlan

Function HashJoinWithExecPlan

cpp/src/arrow/acero/hash_join_node_test.cc:912–932  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

910}
911
912Result<std::vector<ExecBatch>> HashJoinWithExecPlan(
913 Random64Bit& rng, bool parallel, const HashJoinNodeOptions& join_options,
914 const std::shared_ptr<Schema>& output_schema,
915 const std::vector<std::shared_ptr<Array>>& l,
916 const std::vector<std::shared_ptr<Array>>& r, int num_batches_l, int num_batches_r) {
917 // add left source
918 BatchesWithSchema l_batches = TableToBatches(rng, num_batches_l, l, "l_");
919 Declaration left{"source",
920 SourceNodeOptions{l_batches.schema, l_batches.gen(parallel,
921 /*slow=*/false)}};
922 // add right source
923 BatchesWithSchema r_batches = TableToBatches(rng, num_batches_r, r, "r_");
924 Declaration right{"source",
925 SourceNodeOptions{r_batches.schema, r_batches.gen(parallel,
926 /*slow=*/false)}};
927 Declaration join{"hashjoin", {std::move(left), std::move(right)}, join_options};
928
929 ARROW_ASSIGN_OR_RAISE(BatchesWithCommonSchema batches_and_schema,
930 DeclarationToExecBatches(std::move(join), parallel));
931 return batches_and_schema.batches;
932}
933
934TEST(HashJoin, Suffix) {
935 BatchesWithSchema input_left;

Callers

nothing calls this directly

Calls 2

TableToBatchesFunction · 0.85
genMethod · 0.45

Tested by

no test coverage detected