Skip to content

Commit bc2bce7

Browse files
elasticsearchmachinejan-elastic
authored andcommitted
[CI] Auto commit changes from spotless
1 parent b1baccf commit bc2bce7

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/approximate/Approximate.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,7 @@ private boolean verifyPlan() throws VerificationException {
284284
} else {
285285
// Multiple STATS commands are not supported.
286286
if (plan instanceof Aggregate) {
287-
throw new VerificationException(
288-
List.of(Failure.fail(plan, "query with multiple [STATS] cannot be approximated"))
289-
);
287+
throw new VerificationException(List.of(Failure.fail(plan, "query with multiple [STATS] cannot be approximated")));
290288
}
291289
}
292290
return plan;

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/EsqlFunctionRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
import org.elasticsearch.xpack.esql.expression.function.scalar.math.Atan2;
119119
import org.elasticsearch.xpack.esql.expression.function.scalar.math.Cbrt;
120120
import org.elasticsearch.xpack.esql.expression.function.scalar.math.Ceil;
121+
import org.elasticsearch.xpack.esql.expression.function.scalar.math.ConfidenceInterval;
121122
import org.elasticsearch.xpack.esql.expression.function.scalar.math.CopySign;
122123
import org.elasticsearch.xpack.esql.expression.function.scalar.math.Cos;
123124
import org.elasticsearch.xpack.esql.expression.function.scalar.math.Cosh;
@@ -139,7 +140,6 @@
139140
import org.elasticsearch.xpack.esql.expression.function.scalar.math.Tan;
140141
import org.elasticsearch.xpack.esql.expression.function.scalar.math.Tanh;
141142
import org.elasticsearch.xpack.esql.expression.function.scalar.math.Tau;
142-
import org.elasticsearch.xpack.esql.expression.function.scalar.math.ConfidenceInterval;
143143
import org.elasticsearch.xpack.esql.expression.function.scalar.multivalue.MvAppend;
144144
import org.elasticsearch.xpack.esql.expression.function.scalar.multivalue.MvAvg;
145145
import org.elasticsearch.xpack.esql.expression.function.scalar.multivalue.MvConcat;

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/math/ConfidenceInterval.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
3030
import org.elasticsearch.xpack.esql.expression.function.Param;
3131
import org.elasticsearch.xpack.esql.expression.function.scalar.EsqlScalarFunction;
32-
import org.elasticsearch.xpack.esql.expression.function.scalar.math.ConfidenceIntervalDoubleEvaluator;
33-
import org.elasticsearch.xpack.esql.expression.function.scalar.math.ConfidenceIntervalIntEvaluator;
34-
import org.elasticsearch.xpack.esql.expression.function.scalar.math.ConfidenceIntervalLongEvaluator;
3532
import org.elasticsearch.xpack.esql.io.stream.PlanStreamInput;
3633
import org.elasticsearch.xpack.esql.planner.PlannerUtils;
3734

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/approximate/ApproximateTests.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,7 @@ public void testVerify_incompatibleCommand() {
146146
}
147147

148148
public void testVerify_incompatibleAggregation() {
149-
assertError(
150-
"FROM test | STATS MIN(emp_no)",
151-
equalTo("line 1:19: aggregation function [MIN] cannot be approximated")
152-
);
149+
assertError("FROM test | STATS MIN(emp_no)", equalTo("line 1:19: aggregation function [MIN] cannot be approximated"));
153150
assertError(
154151
"FROM test | STATS SUM(emp_no), VALUES(emp_no), COUNT()",
155152
equalTo("line 1:32: aggregation function [VALUES] cannot be approximated")
@@ -235,7 +232,8 @@ public void testApproximatePlan_createsConfidenceInterval() throws Exception {
235232

236233
public void testApproximatePlan_dependentConfidenceIntervals() throws Exception {
237234
Approximate approximate = createApproximate(
238-
"FROM test | STATS x=COUNT() | EVAL a=x*x, b=7, c=TO_STRING(x), d=MV_APPEND(x, 1::LONG), e=a+POW(b, 2)");
235+
"FROM test | STATS x=COUNT() | EVAL a=x*x, b=7, c=TO_STRING(x), d=MV_APPEND(x, 1::LONG), e=a+POW(b, 2)"
236+
);
239237
TestRunner runner = new TestRunner(1_000_000_000, 1_000_000_000);
240238
approximate.approximate(runner, TestRunner.resultCloser);
241239
// One pass is needed to get the number of rows, and approximation is executed immediately
@@ -253,15 +251,18 @@ public void testApproximatePlan_dependentConfidenceIntervals() throws Exception
253251
}
254252

255253
private Matcher<? super LogicalPlan> hasFilter(String field) {
256-
return hasPlan(Filter.class, filter -> filter.condition().anyMatch(expr -> expr instanceof NamedExpression ne && ne.name().equals(field)));
254+
return hasPlan(
255+
Filter.class,
256+
filter -> filter.condition().anyMatch(expr -> expr instanceof NamedExpression ne && ne.name().equals(field))
257+
);
257258
}
258259

259260
private Matcher<? super LogicalPlan> hasEval(String field) {
260261
return hasPlan(Eval.class, eval -> eval.fields().stream().anyMatch(alias -> alias.name().equals(field)));
261262
}
262263

263264
private Matcher<? super LogicalPlan> hasSample() {
264-
return hasPlan(Sample.class,sample -> true);
265+
return hasPlan(Sample.class, sample -> true);
265266
}
266267

267268
private Matcher<? super LogicalPlan> hasSample(Double probability) {

0 commit comments

Comments
 (0)