Skip to content

Commit

Permalink
feat: Add PartitionBy Benchmarks (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
stanbrub authored Nov 6, 2024
1 parent 90d6ba0 commit 7e77700
Showing 1 changed file with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Standard tests for the partitionBy table operation. Divides a single table into subtables.
*/
@Disabled
public class PartitionByTest {
final StandardTestRunner runner = new StandardTestRunner(this);

Expand All @@ -17,21 +16,24 @@ void setup() {
}

@Test
void partitionBy1Group2Cols() {
var q = "source.partition_by(['key1']).get_constituent(['string1val'])";
runner.test("PartitionBy- 1 Group 100 Unique Vals", 1, q, "key1", "num1");
void partitionBy1Group() {
runner.setScaleFactors(44, 9);
var q = "source.partition_by(by=['key1']).table";
runner.test("PartitionBy- 1 Group 100 Unique Vals", 100, q, "key1", "num1");
}

// @Test
// void partitionBy1Group2ColsLarge() {
// var q = "source.partition_by(['str3']).get_constituent(['val1string'])";
// runner.test("PartitionBy- 1 Group 1M Unique Vals", 1000000, q, "str3", "int1M");
// }
//
// @Test
// public void partitionBy2Group3Cols() {
// var q = "source.partition_by(by=['str1', 'str2'])";
// runner.test("PartitionBy- 2 Group 160K Unique Combos", 160000, q, "str1", "str2", "int250");
// }
@Test
void partitionBy2Groups() {
runner.setScaleFactors(8, 4);
var q = "source.partition_by(by=['key1', 'key2']).table";
runner.test("PartitionBy- 2 Groups 10K Unique Combos", 10100, q, "key1", "key2", "num1");
}

@Test
void partitionBy3Groups() {
runner.setScaleFactors(4, 2);
var q = "source.partition_by(by=['key1', 'key2', 'key3']).table";
runner.test("PartitionBy- 3 Groups 100K Unique Combos", 90900, q, "key1", "key2", "key3", "num1");
}

}

0 comments on commit 7e77700

Please sign in to comment.