Skip to content

Commit e48499b

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent 07170d8 commit e48499b

File tree

2 files changed

+10
-19
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function

2 files changed

+10
-19
lines changed

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

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ public static void populateMap(
6565
for (EntryExpression entry : options.entryExpressions()) {
6666
Expression optionExpr = entry.key();
6767
Expression valueExpr = entry.value();
68-
Expression.TypeResolution resolution =
69-
isFoldable(optionExpr, source.text(), paramOrdinal).and(isFoldable(valueExpr, source.text(), paramOrdinal));
68+
Expression.TypeResolution resolution = isFoldable(optionExpr, source.text(), paramOrdinal).and(
69+
isFoldable(valueExpr, source.text(), paramOrdinal)
70+
);
7071
if (resolution.unresolved()) {
7172
throw new InvalidArgumentException(resolution.message());
7273
}
@@ -77,24 +78,16 @@ public static void populateMap(
7778
// validate the optionExpr is supported
7879
DataType dataType = allowedOptions.get(optionName);
7980
if (dataType == null) {
80-
throw new InvalidArgumentException(format(
81-
null,
82-
"Invalid option [{}] in [{}], expected one of {}",
83-
optionName,
84-
source.text(),
85-
allowedOptions.keySet()
86-
));
81+
throw new InvalidArgumentException(
82+
format(null, "Invalid option [{}] in [{}], expected one of {}", optionName, source.text(), allowedOptions.keySet())
83+
);
8784
}
8885
try {
8986
optionsMap.put(optionName, DataTypeConverter.convert(optionValue, dataType));
9087
} catch (InvalidArgumentException e) {
91-
throw new InvalidArgumentException(format(
92-
null,
93-
"Invalid option [{}] in [{}], {}",
94-
optionName,
95-
source.text(),
96-
e.getMessage()
97-
));
88+
throw new InvalidArgumentException(
89+
format(null, "Invalid option [{}] in [{}], {}", optionName, source.text(), e.getMessage())
90+
);
9891
}
9992
}
10093
}

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,7 @@ public final void writeTo(StreamOutput out) throws IOException {
298298

299299
@Override
300300
protected TypeResolution resolveParams() {
301-
return resolveField()
302-
.and(resolveQuery())
301+
return resolveField().and(resolveQuery())
303302
.and(Options.resolve(options(), source(), THIRD, ALLOWED_OPTIONS))
304303
.and(checkParamCompatibility());
305304
}
@@ -354,7 +353,6 @@ private Map<String, Object> matchQueryOptions() throws InvalidArgumentException
354353
// Match is lenient by default to avoid failing on incompatible types
355354
matchOptions.put(LENIENT_FIELD.getPreferredName(), true);
356355

357-
358356
Options.populateMap((MapExpression) options(), matchOptions, source(), SECOND, ALLOWED_OPTIONS);
359357
return matchOptions;
360358
}

0 commit comments

Comments
 (0)