Skip to content

Commit 4d029e2

Browse files
committed
Minor fixes
1 parent 65b2b15 commit 4d029e2

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/RequestXContent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ private static void checkMultiValuedParamValidity(
419419
);
420420
return;
421421
}
422-
// Multivalued field
422+
423423
DataType arrayType = null;
424424
for (Object currentValue : valueList) {
425425
checkParamValueValidity(entry, classification, currentValue, loc, errors);

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/evaluator/EvalMapper.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -273,18 +273,7 @@ private static Block block(Literal lit, BlockFactory blockFactory, int positions
273273
if (multiValue.isEmpty()) {
274274
return blockFactory.newConstantNullBlock(positions);
275275
}
276-
ElementType type = ElementType.NULL;
277-
for (Object elem : multiValue) {
278-
if (elem != null) {
279-
type = ElementType.fromJava(elem.getClass());
280-
break;
281-
}
282-
}
283-
if (type == ElementType.NULL) {
284-
// all values are null
285-
return blockFactory.newConstantNullBlock(positions);
286-
}
287-
var wrapper = BlockUtils.wrapperFor(blockFactory, type, positions);
276+
var wrapper = BlockUtils.wrapperFor(blockFactory, ElementType.fromJava(multiValue.get(0).getClass()), positions);
288277
for (int i = 0; i < positions; i++) {
289278
wrapper.accept(multiValue);
290279
}

0 commit comments

Comments
 (0)