From 956a1581c34685bcce49536465e309c1b1fd1da9 Mon Sep 17 00:00:00 2001 From: xiaoxmeng Date: Thu, 14 Sep 2023 17:47:17 -0700 Subject: [PATCH] Reduce table write test execution time by half (#6582) Summary: All test time on clion drops from 2min10s to 55s: - commitStrategy from 47s to 14s - directReadWrite from 30s to 8s - scanFilterProjectWrite from 26s to 11s - renameAndReorderColumns 9s to Pull Request resolved: https://github.com/facebookincubator/velox/pull/6582 Reviewed By: Yuhta, spershin, kewang1024 Differential Revision: D49295476 Pulled By: xiaoxmeng fbshipit-source-id: 92eec13b79cfa7898b151f0d18c63e078e7cd55e --- velox/exec/tests/TableWriteTest.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/velox/exec/tests/TableWriteTest.cpp b/velox/exec/tests/TableWriteTest.cpp index bec39df0465c..4112af984c26 100644 --- a/velox/exec/tests/TableWriteTest.cpp +++ b/velox/exec/tests/TableWriteTest.cpp @@ -1247,8 +1247,8 @@ class AllTableWriterTest : public TableWriteTest, // Runs a pipeline with read + filter + project (with substr) + write. TEST_P(AllTableWriterTest, scanFilterProjectWrite) { - auto filePaths = makeFilePaths(10); - auto vectors = makeVectors(filePaths.size(), 1000); + auto filePaths = makeFilePaths(5); + auto vectors = makeVectors(filePaths.size(), 500); for (int i = 0; i < filePaths.size(); i++) { writeToFile(filePaths[i]->path, vectors[i]); } @@ -1293,8 +1293,8 @@ TEST_P(AllTableWriterTest, scanFilterProjectWrite) { } TEST_P(AllTableWriterTest, renameAndReorderColumns) { - auto filePaths = makeFilePaths(10); - auto vectors = makeVectors(filePaths.size(), 1'000); + auto filePaths = makeFilePaths(5); + auto vectors = makeVectors(filePaths.size(), 500); for (int i = 0; i < filePaths.size(); ++i) { writeToFile(filePaths[i]->path, vectors[i]); } @@ -1348,8 +1348,8 @@ TEST_P(AllTableWriterTest, renameAndReorderColumns) { // Runs a pipeline with read + write. TEST_P(AllTableWriterTest, directReadWrite) { - auto filePaths = makeFilePaths(10); - auto vectors = makeVectors(filePaths.size(), 1000); + auto filePaths = makeFilePaths(5); + auto vectors = makeVectors(filePaths.size(), 200); for (int i = 0; i < filePaths.size(); i++) { writeToFile(filePaths[i]->path, vectors[i]); } @@ -1431,8 +1431,8 @@ TEST_P(AllTableWriterTest, emptyInput) { } TEST_P(AllTableWriterTest, commitStrategies) { - auto filePaths = makeFilePaths(10); - auto vectors = makeVectors(filePaths.size(), 1000); + auto filePaths = makeFilePaths(5); + auto vectors = makeVectors(filePaths.size(), 100); createDuckDbTable(vectors);