Skip to content

Commit b0e942a

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent 254fc59 commit b0e942a

File tree

2 files changed

+11
-9
lines changed
  • x-pack/plugin/esql/src

2 files changed

+11
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public ExpressionEvaluator.Factory toEvaluator(ToEvaluator toEvaluator) {
174174
right()
175175
);
176176
}
177-
if(supersetType == ElementType.NULL || subsetType == ElementType.NULL) {
177+
if (supersetType == ElementType.NULL || subsetType == ElementType.NULL) {
178178
return new MvContainsAllNullEvaluator(toEvaluator.apply(right()));
179179
}
180180
return switch (supersetType) {

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvContainsAllTests.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,15 @@ public static Iterable<Object[]> parameters() {
4949
doubles(suppliers);
5050
bytesRefs(suppliers);
5151

52-
return parameterSuppliersFromTypedData(anyNullIsNull(
53-
suppliers,
54-
(nullPosition, nullValueDataType, original) -> false
55-
&& nullValueDataType == DataType.NULL
56-
&& original.getData().size() == 1 ? DataType.NULL : original.expectedType(),
57-
(nullPosition, nullData, original) -> original
58-
));
52+
return parameterSuppliersFromTypedData(
53+
anyNullIsNull(
54+
suppliers,
55+
(nullPosition, nullValueDataType, original) -> false && nullValueDataType == DataType.NULL && original.getData().size() == 1
56+
? DataType.NULL
57+
: original.expectedType(),
58+
(nullPosition, nullData, original) -> original
59+
)
60+
);
5961
}
6062

6163
@Override
@@ -347,6 +349,6 @@ protected static List<TestCaseSupplier> anyNullIsNull(
347349
// We always return a boolean.
348350
@Override
349351
protected Matcher<Object> allNullsMatcher() {
350-
return anyOf(equalTo(false),equalTo(true));
352+
return anyOf(equalTo(false), equalTo(true));
351353
}
352354
}

0 commit comments

Comments
 (0)