| 204 | }; |
| 205 | |
| 206 | TEST_F(HashJoinReplayerTest, basic) { |
| 207 | const auto planWithSplits = createPlan( |
| 208 | tableDir_, |
| 209 | core::JoinType::kInner, |
| 210 | probeKeys_, |
| 211 | buildKeys_, |
| 212 | probeInput_, |
| 213 | buildInput_); |
| 214 | AssertQueryBuilder builder(planWithSplits.plan); |
| 215 | for (const auto& [planNodeId, nodeSplits] : planWithSplits.splits) { |
| 216 | builder.splits(planNodeId, nodeSplits); |
| 217 | } |
| 218 | const auto result = builder.copyResults(pool()); |
| 219 | |
| 220 | const auto traceRoot = |
| 221 | fmt::format("{}/{}/traceRoot/", testDir_->getPath(), "basic"); |
| 222 | std::shared_ptr<Task> task; |
| 223 | auto tracePlanWithSplits = createPlan( |
| 224 | tableDir_, |
| 225 | core::JoinType::kInner, |
| 226 | probeKeys_, |
| 227 | buildKeys_, |
| 228 | probeInput_, |
| 229 | buildInput_); |
| 230 | AssertQueryBuilder traceBuilder(tracePlanWithSplits.plan); |
| 231 | traceBuilder.maxDrivers(4) |
| 232 | .config(core::QueryConfig::kQueryTraceEnabled, true) |
| 233 | .config(core::QueryConfig::kQueryTraceDir, traceRoot) |
| 234 | .config(core::QueryConfig::kQueryTraceMaxBytes, 100UL << 30) |
| 235 | .config(core::QueryConfig::kQueryTraceTaskRegExp, ".*") |
| 236 | .config(core::QueryConfig::kQueryTraceNodeIds, traceNodeId_); |
| 237 | for (const auto& [planNodeId, nodeSplits] : tracePlanWithSplits.splits) { |
| 238 | traceBuilder.splits(planNodeId, nodeSplits); |
| 239 | } |
| 240 | auto traceResult = traceBuilder.copyResults(pool(), task); |
| 241 | |
| 242 | assertEqualResults({result}, {traceResult}); |
| 243 | |
| 244 | const auto taskId = task->taskId(); |
| 245 | const auto replayingResult = HashJoinReplayer( |
| 246 | traceRoot, |
| 247 | task->queryCtx()->queryId(), |
| 248 | task->taskId(), |
| 249 | traceNodeId_, |
| 250 | "HashJoin", |
| 251 | "", |
| 252 | 0, |
| 253 | executor_.get()) |
| 254 | .run(); |
| 255 | assertEqualResults({result}, {replayingResult}); |
| 256 | } |
| 257 | |
| 258 | TEST_F(HashJoinReplayerTest, partialDriverIds) { |
| 259 | const std::shared_ptr<TempDirectoryPath> testDir = |
nothing calls this directly
no test coverage detected