MCPcopy Create free account
hub / github.com/bytedance/bolt / runQueryWithWriterConfigs

Method runQueryWithWriterConfigs

bolt/exec/tests/TableWriteTest.cpp:367–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

365 }
366
367 RowVectorPtr runQueryWithWriterConfigs(
368 const core::PlanNodePtr& plan,
369 bool spillEnabled = false) {
370 if (!spillEnabled) {
371 return AssertQueryBuilder(plan, duckDbQueryRunner_)
372 .maxDrivers(
373 2 *
374 std::max(kNumTableWriterCount, kNumPartitionedTableWriterCount))
375 .config(
376 QueryConfig::kTaskWriterCount,
377 std::to_string(numTableWriterCount_))
378 .config(
379 QueryConfig::kTaskPartitionedWriterCount,
380 std::to_string(numPartitionedTableWriterCount_))
381 .copyResults(pool());
382 }
383
384 const auto spillDirectory = exec::test::TempDirectoryPath::create();
385 return AssertQueryBuilder(plan, duckDbQueryRunner_)
386 .spillDirectory(spillDirectory->path)
387 .maxDrivers(
388 2 * std::max(kNumTableWriterCount, kNumPartitionedTableWriterCount))
389 .config(
390 QueryConfig::kTaskWriterCount, std::to_string(numTableWriterCount_))
391 .config(
392 QueryConfig::kTaskPartitionedWriterCount,
393 std::to_string(numPartitionedTableWriterCount_))
394 .config(core::QueryConfig::kSpillEnabled, "true")
395 .config(QueryConfig::kWriterSpillEnabled, "true")
396 .config(QueryConfig::kTestingSpillPct, "100")
397 .copyResults(pool());
398 }
399
400 void setCommitStrategy(CommitStrategy commitStrategy) {
401 commitStrategy_ = commitStrategy;

Callers

nothing calls this directly

Calls 8

configMethod · 0.80
AssertQueryBuilderClass · 0.50
maxFunction · 0.50
to_stringFunction · 0.50
poolFunction · 0.50
createFunction · 0.50
copyResultsMethod · 0.45
maxDriversMethod · 0.45

Tested by

no test coverage detected