From 1ced132d2804119f367b97922247a2a7ff09b3bf Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Mon, 31 Jul 2023 16:14:57 +0200 Subject: [PATCH] Remove redundant cast when calculating integer power --- .../src/main/java/io/trino/benchmark/SqlTopNBenchmark.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTopNBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTopNBenchmark.java index 8982a90d7844..d4cb2b5f5b3c 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTopNBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlTopNBenchmark.java @@ -14,6 +14,7 @@ package io.trino.benchmark; import com.google.common.collect.ImmutableMap; +import com.google.common.math.IntMath; import io.trino.testing.LocalQueryRunner; import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; @@ -35,7 +36,7 @@ public static void main(String[] args) { LocalQueryRunner localQueryRunner = createLocalQueryRunner(ImmutableMap.of("resource_overcommit", "true")); for (int i = 0; i < 11; i++) { - new SqlTopNBenchmark(localQueryRunner, (int) Math.pow(4, i)).runBenchmark(new SimpleLineBenchmarkResultWriter(System.out)); + new SqlTopNBenchmark(localQueryRunner, IntMath.pow(4, i)).runBenchmark(new SimpleLineBenchmarkResultWriter(System.out)); } } }