From 11d70614cbce3cc4d8d113207b22b16a6d85001c Mon Sep 17 00:00:00 2001 From: Zoltan Haindrich Date: Mon, 15 Jan 2024 15:44:06 +0000 Subject: [PATCH] checkstyle fix+reduce test time --- .../apache/druid/benchmark/ExpressionSelectorBenchmark.java | 4 ++-- .../main/java/org/apache/druid/math/expr/ConstantExpr.java | 5 +++-- .../src/main/java/org/apache/druid/math/expr/Expr.java | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/benchmarks/src/test/java/org/apache/druid/benchmark/ExpressionSelectorBenchmark.java b/benchmarks/src/test/java/org/apache/druid/benchmark/ExpressionSelectorBenchmark.java index d8e1dfc76464..9bf9926767da 100644 --- a/benchmarks/src/test/java/org/apache/druid/benchmark/ExpressionSelectorBenchmark.java +++ b/benchmarks/src/test/java/org/apache/druid/benchmark/ExpressionSelectorBenchmark.java @@ -67,8 +67,8 @@ @State(Scope.Benchmark) @Fork(value = 1) -@Warmup(iterations = 3, time = 3) -@Measurement(iterations = 10, time = 3) +@Warmup(iterations = 3, time = 2) +@Measurement(iterations = 3, time = 2) @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MILLISECONDS) public class ExpressionSelectorBenchmark diff --git a/processing/src/main/java/org/apache/druid/math/expr/ConstantExpr.java b/processing/src/main/java/org/apache/druid/math/expr/ConstantExpr.java index 42693265d428..9a92e71142d9 100644 --- a/processing/src/main/java/org/apache/druid/math/expr/ConstantExpr.java +++ b/processing/src/main/java/org/apache/druid/math/expr/ConstantExpr.java @@ -126,7 +126,8 @@ public Expr singleThreaded() * FIXME: fill this in! */ @Immutable -abstract class CacheableConstantExpr extends ConstantExpr{ +abstract class CacheableConstantExpr extends ConstantExpr +{ protected CacheableConstantExpr(ExpressionType outputType, T value) { @@ -141,7 +142,7 @@ public final ConstantExpr singleThreaded() return new ConstantExpr(eval.type(), eval.value) { @Override - public final ExprEval realEval() + public ExprEval realEval() { return eval; } diff --git a/processing/src/main/java/org/apache/druid/math/expr/Expr.java b/processing/src/main/java/org/apache/druid/math/expr/Expr.java index 1e8260ab5a9d..91fab05f9690 100644 --- a/processing/src/main/java/org/apache/druid/math/expr/Expr.java +++ b/processing/src/main/java/org/apache/druid/math/expr/Expr.java @@ -763,7 +763,8 @@ private static Set map( * FIXME * @return */ - default Expr singleThreaded() { + default Expr singleThreaded() + { return this; } }