Skip to content

Commit

Permalink
Add test to verify BenchmarkInequalityJoin works
Browse files Browse the repository at this point in the history
  • Loading branch information
pettyjamesm authored and martint committed Nov 4, 2021
1 parent a716254 commit 6c20a1a
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.annotations.Warmup;
import org.openjdk.jmh.runner.RunnerException;
import org.testng.annotations.Test;

import java.util.List;

Expand Down Expand Up @@ -135,6 +136,22 @@ public List<Page> benchmarkBetweenPredicateJoin(Context context)
.execute("SELECT count(*) FROM t1 JOIN t2 on (t1.bucket = t2.bucket) AND t2.val2 BETWEEN t1.val1 + 1 AND t1.val1 + 5");
}

@Test
public void verifyJoinBenchmark()
{
Context context = new Context();
try {
// Contrive a cheap benchmark setup for use in testing
context.buckets = 10;
context.filterOutCoefficient = 10;
context.setUp();
benchmarkJoin(context);
}
finally {
context.tearDown();
}
}

public static void main(String[] args)
throws RunnerException
{
Expand Down

0 comments on commit 6c20a1a

Please sign in to comment.