| 96 | } |
| 97 | |
| 98 | void runTest( |
| 99 | const std::vector<RowVectorPtr>& probeVectors, |
| 100 | const std::vector<RowVectorPtr>& buildVectors, |
| 101 | int32_t numDrivers, |
| 102 | size_t preferredOutputBatchSize = 1024) { |
| 103 | createDuckDbTable("t", probeVectors); |
| 104 | createDuckDbTable("u", buildVectors); |
| 105 | auto queryCtx = core::QueryCtx::create(executor_.get()); |
| 106 | |
| 107 | CursorParameters params; |
| 108 | params.queryCtx = queryCtx; |
| 109 | params.queryCtx->testingOverrideConfigUnsafe( |
| 110 | {{core::QueryConfig::kPreferredOutputBatchRows, |
| 111 | std::to_string(preferredOutputBatchSize)}}); |
| 112 | params.maxDrivers = numDrivers; |
| 113 | auto planNodeIdGenerator = std::make_shared<core::PlanNodeIdGenerator>(); |
| 114 | |
| 115 | for (const auto joinType : joinTypes_) { |
| 116 | for (const auto& comparison : comparisons_) { |
| 117 | SCOPED_TRACE(fmt::format( |
| 118 | "maxDrivers:{} joinType:{} comparison:{}", |
| 119 | std::to_string(numDrivers), |
| 120 | joinTypeName(joinType), |
| 121 | comparison)); |
| 122 | |
| 123 | params.planNode = |
| 124 | PlanBuilder(planNodeIdGenerator) |
| 125 | .values(probeVectors) |
| 126 | .localPartition({probeKeyName_}) |
| 127 | .nestedLoopJoin( |
| 128 | PlanBuilder(planNodeIdGenerator) |
| 129 | .values(buildVectors) |
| 130 | .localPartition({buildKeyName_}) |
| 131 | .planNode(), |
| 132 | fmt::format(fmt::runtime(joinConditionStr_), comparison), |
| 133 | outputLayout_, |
| 134 | joinType) |
| 135 | .planNode(); |
| 136 | |
| 137 | assertQuery( |
| 138 | params, |
| 139 | fmt::format( |
| 140 | fmt::runtime(queryStr_), joinTypeName(joinType), comparison)); |
| 141 | } |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | protected: |
| 146 | const std::string probeKeyName_{"t0"}; |
nothing calls this directly
no test coverage detected