Skip to content

Commit 21c168d

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent b3a9ae6 commit 21c168d

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/inference/XContentRowEncoder.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import org.elasticsearch.compute.data.BytesRefBlock;
1515
import org.elasticsearch.compute.data.Page;
1616
import org.elasticsearch.compute.operator.DriverContext;
17-
import org.elasticsearch.compute.operator.EvalOperator;
1817
import org.elasticsearch.compute.operator.EvalOperator.ExpressionEvaluator;
1918
import org.elasticsearch.core.Releasables;
2019
import org.elasticsearch.xcontent.ToXContent;
@@ -31,7 +30,6 @@
3130
import java.util.Map;
3231
import java.util.stream.Collectors;
3332

34-
3533
/**
3634
* Encodes rows into an XContent format (JSON,YAML,...) for further processing.
3735
* Extracted columns can be specified using {@link ExpressionEvaluator}
@@ -141,10 +139,7 @@ private ColumnInfoImpl[] columnsInfo() {
141139
}
142140

143141
private ExpressionEvaluator[] fieldsValueEvaluators(DriverContext context) {
144-
return fieldsEvaluatorFactories.values()
145-
.stream()
146-
.map(factory -> factory.get(context))
147-
.toArray(ExpressionEvaluator[]::new);
142+
return fieldsEvaluatorFactories.values().stream().map(factory -> factory.get(context)).toArray(ExpressionEvaluator[]::new);
148143
}
149144
}
150145
}

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/inference/RerankOperatorTests.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -237,17 +237,15 @@ private XContentRowEncoder.Factory mockRowEncoderFactory() {
237237
doAnswer(factoryInvocation -> {
238238
DriverContext driverContext = factoryInvocation.getArgument(0, DriverContext.class);
239239
XContentRowEncoder rowEncoder = mock(XContentRowEncoder.class);
240-
doAnswer(
241-
encoderInvocation -> {
242-
Page inputPage = encoderInvocation.getArgument(0, Page.class);
243-
return driverContext.blockFactory().newConstantBytesRefBlockWith(new BytesRef(randomRealisticUnicodeOfCodepointLength(4)), inputPage.getPositionCount());
244-
}
245-
).when(rowEncoder).eval(any(Page.class));
240+
doAnswer(encoderInvocation -> {
241+
Page inputPage = encoderInvocation.getArgument(0, Page.class);
242+
return driverContext.blockFactory()
243+
.newConstantBytesRefBlockWith(new BytesRef(randomRealisticUnicodeOfCodepointLength(4)), inputPage.getPositionCount());
244+
}).when(rowEncoder).eval(any(Page.class));
246245

247246
return rowEncoder;
248247
}).when(factory).get(any(DriverContext.class));
249248

250-
251249
return factory;
252250
}
253251

0 commit comments

Comments
 (0)