3636#include " velox/exec/tests/utils/OperatorTestBase.h"
3737#include " velox/exec/tests/utils/PlanBuilder.h"
3838#include " velox/exec/tests/utils/QueryAssertions.h"
39- #include " velox/exec/tests/utils /TempDirectoryPath.h"
39+ #include " velox/common/testutil /TempDirectoryPath.h"
4040#include " velox/type/Type.h"
4141
4242DECLARE_int32 (old_task_ms);
@@ -45,6 +45,7 @@ DECLARE_bool(velox_memory_leak_check_enabled);
4545static const std::string kHiveConnectorId = " test-hive" ;
4646
4747using namespace facebook ::velox;
48+ using namespace facebook ::velox::common::testutil;
4849using namespace facebook ::velox::exec;
4950using namespace facebook ::velox::exec::test;
5051
@@ -609,8 +610,8 @@ class TaskManagerTest : public exec::test::OperatorTestBase,
609610 // Setup the temporary spilling directory and initialize the system config
610611 // file (in the same temporary directory) to contain the spilling path
611612 // setting.
612- static std::shared_ptr<exec::test:: TempDirectoryPath> setupSpillPath () {
613- auto spillDirectory = exec::test:: TempDirectoryPath::create ();
613+ static std::shared_ptr<TempDirectoryPath> setupSpillPath () {
614+ auto spillDirectory = TempDirectoryPath::create ();
614615 auto sysConfigFilePath =
615616 fmt::format (" {}/config.properties" , spillDirectory->getPath ());
616617 auto fileSystem = filesystems::getFileSystem (sysConfigFilePath, nullptr );
@@ -692,7 +693,7 @@ class TaskManagerTest : public exec::test::OperatorTestBase,
692693// Runs "select * from t where c0 % 5 = 0" query.
693694// Creates one task and provides all splits at once.
694695TEST_P (TaskManagerTest, tableScanAllSplitsAtOnce) {
695- const auto tableDir = exec::test:: TempDirectoryPath::create ();
696+ const auto tableDir = TempDirectoryPath::create ();
696697 auto filePaths = makeFilePaths (tableDir, 5 );
697698 auto vectors = makeVectors (filePaths.size (), 1'000 );
698699 for (int i = 0 ; i < filePaths.size (); i++) {
@@ -720,7 +721,7 @@ TEST_P(TaskManagerTest, tableScanAllSplitsAtOnce) {
720721}
721722
722723TEST_P (TaskManagerTest, addSplitsWithSameSourceNode) {
723- const auto tableDir = exec::test:: TempDirectoryPath::create ();
724+ const auto tableDir = TempDirectoryPath::create ();
724725 auto filePaths = makeFilePaths (tableDir, 5 );
725726 auto vectors = makeVectors (filePaths.size (), 1'000 );
726727 for (int i = 0 ; i < filePaths.size (); i++) {
@@ -755,7 +756,7 @@ TEST_P(TaskManagerTest, addSplitsWithSameSourceNode) {
755756}
756757
757758TEST_P (TaskManagerTest, fecthFromFinishedTask) {
758- const auto tableDir = exec::test:: TempDirectoryPath::create ();
759+ const auto tableDir = TempDirectoryPath::create ();
759760 auto filePaths = makeFilePaths (tableDir, 5 );
760761 auto vectors = makeVectors (filePaths.size (), 1'000 );
761762 for (int i = 0 ; i < filePaths.size (); i++) {
@@ -872,7 +873,7 @@ TEST_P(TaskManagerTest, taskCleanupWithPendingResultData) {
872873 // Trigger old task cleanup immediately.
873874 taskManager_->setOldTaskCleanUpMs (0 );
874875
875- const auto tableDir = exec::test:: TempDirectoryPath::create ();
876+ const auto tableDir = TempDirectoryPath::create ();
876877 auto filePaths = makeFilePaths (tableDir, 5 );
877878 auto vectors = makeVectors (filePaths.size (), 1'000 );
878879 for (int i = 0 ; i < filePaths.size (); i++) {
@@ -977,7 +978,7 @@ TEST_P(TaskManagerTest, queuedEmptyGroupedExecutionTask) {
977978// Runs "select * from t where c0 % 5 = 1" query.
978979// Creates one task and provides splits one at a time.
979980TEST_P (TaskManagerTest, tableScanOneSplitAtATime) {
980- const auto tableDir = exec::test:: TempDirectoryPath::create ();
981+ const auto tableDir = TempDirectoryPath::create ();
981982 auto filePaths = makeFilePaths (tableDir, 5 );
982983 auto vectors = makeVectors (filePaths.size (), 1'000 );
983984 for (int i = 0 ; i < filePaths.size (); i++) {
@@ -1013,7 +1014,7 @@ TEST_P(TaskManagerTest, tableScanOneSplitAtATime) {
10131014
10141015// Runs 2-stage tableScan: (1) multiple table scan tasks; (2) single output task
10151016TEST_P (TaskManagerTest, tableScanMultipleTasks) {
1016- const auto tableDir = exec::test:: TempDirectoryPath::create ();
1017+ const auto tableDir = TempDirectoryPath::create ();
10171018 auto filePaths = makeFilePaths (tableDir, 5 );
10181019 auto vectors = makeVectors (filePaths.size (), 1'000 );
10191020 for (int i = 0 ; i < filePaths.size (); i++) {
@@ -1047,7 +1048,7 @@ TEST_P(TaskManagerTest, tableScanMultipleTasks) {
10471048}
10481049
10491050TEST_P (TaskManagerTest, countAggregation) {
1050- const auto tableDir = exec::test:: TempDirectoryPath::create ();
1051+ const auto tableDir = TempDirectoryPath::create ();
10511052 auto filePaths = makeFilePaths (tableDir, 5 );
10521053 auto vectors = makeVectors (filePaths.size (), 1'000 );
10531054 for (int i = 0 ; i < filePaths.size (); i++) {
@@ -1061,7 +1062,7 @@ TEST_P(TaskManagerTest, countAggregation) {
10611062// Run distributed sort query that has 2 stages. First stage runs multiple
10621063// tasks with partial sort. Second stage runs single task with merge exchange.
10631064TEST_P (TaskManagerTest, distributedSort) {
1064- const auto tableDir = exec::test:: TempDirectoryPath::create ();
1065+ const auto tableDir = TempDirectoryPath::create ();
10651066 auto filePaths = makeFilePaths (tableDir, 5 );
10661067 auto vectors = makeVectors (filePaths.size (), 1'000 );
10671068 for (int i = 0 ; i < filePaths.size (); i++) {
@@ -1136,7 +1137,7 @@ TEST_P(TaskManagerTest, distributedSort) {
11361137}
11371138
11381139TEST_P (TaskManagerTest, outOfQueryUserMemory) {
1139- const auto tableDir = exec::test:: TempDirectoryPath::create ();
1140+ const auto tableDir = TempDirectoryPath::create ();
11401141 auto filePaths = makeFilePaths (tableDir, 5 );
11411142 auto vectors = makeVectors (filePaths.size (), 1'000 );
11421143 for (auto i = 0 ; i < filePaths.size (); i++) {
@@ -1175,7 +1176,7 @@ TEST_P(TaskManagerTest, outOfOrderRequests) {
11751176 auto longWait = protocol::Duration (" 300s" );
11761177 auto shortWait = std::chrono::seconds (1 );
11771178
1178- const auto tableDir = exec::test:: TempDirectoryPath::create ();
1179+ const auto tableDir = TempDirectoryPath::create ();
11791180 auto filePaths = makeFilePaths (tableDir, 5 );
11801181 auto vectors = makeVectors (filePaths.size (), 1000 );
11811182 duckDbQueryRunner_.createTable (" tmp" , vectors);
@@ -1261,7 +1262,7 @@ TEST_P(TaskManagerTest, aggregationSpill) {
12611262 // trigger spill.
12621263 const int numBatchesPerFile = 5 ;
12631264 const int numFiles = 5 ;
1264- const auto tableDir = exec::test:: TempDirectoryPath::create ();
1265+ const auto tableDir = TempDirectoryPath::create ();
12651266 auto filePaths = makeFilePaths (tableDir, numFiles);
12661267 std::vector<std::vector<RowVectorPtr>> batches (numFiles);
12671268 for (int i = 0 ; i < numFiles; ++i) {
@@ -1279,7 +1280,7 @@ TEST_P(TaskManagerTest, aggregationSpill) {
12791280 int queryId = 0 ;
12801281 for (const bool doSpill : {false , true }) {
12811282 SCOPED_TRACE (fmt::format (" doSpill: {}" , doSpill));
1282- std::shared_ptr<exec::test:: TempDirectoryPath> spillDirectory;
1283+ std::shared_ptr<TempDirectoryPath> spillDirectory;
12831284 std::map<std::string, std::string> queryConfigs;
12841285
12851286 int32_t spillPct{0 };
@@ -1655,7 +1656,7 @@ TEST_P(TaskManagerTest, buildSpillDirectoryFailure) {
16551656}
16561657
16571658TEST_P (TaskManagerTest, summarize) {
1658- const auto tableDir = exec::test:: TempDirectoryPath::create ();
1659+ const auto tableDir = TempDirectoryPath::create ();
16591660 auto filePaths = makeFilePaths (tableDir, 5 );
16601661 auto vectors = makeVectors (filePaths.size (), 1'000 );
16611662 for (int i = 0 ; i < filePaths.size (); i++) {
0 commit comments