Skip to content

Commit

Permalink
Reduce table write test execution time by half (#6582)
Browse files Browse the repository at this point in the history
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: #6582

Reviewed By: Yuhta, spershin, kewang1024

Differential Revision: D49295476

Pulled By: xiaoxmeng

fbshipit-source-id: 92eec13b79cfa7898b151f0d18c63e078e7cd55e
  • Loading branch information
xiaoxmeng authored and facebook-github-bot committed Sep 15, 2023
1 parent 8d6c296 commit 956a158
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions velox/exec/tests/TableWriteTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand Down Expand Up @@ -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]);
}
Expand Down Expand Up @@ -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]);
}
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 956a158

Please sign in to comment.