Skip to content

Commit 7929e31

Browse files
committed
Remove some redundant null checks
1 parent bacb81d commit 7929e31

File tree

1 file changed

+2
-6
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/score

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,10 @@ protected TypeResolution resolveType() {
222222

223223
if (isGeoPoint) {
224224
// Geo points: scale should be a distance unit string (e.g. "100km")
225-
scaleResolution = isNotNull(scale, sourceText(), THIRD).and(
226-
isType(scale, DataType::isString, sourceText(), THIRD, "keyword or text")
227-
);
225+
scaleResolution = isType(scale, DataType::isString, sourceText(), THIRD, "keyword or text");
228226
} else {
229227
// Cartesian points: scale should be numeric (e.g. 100.0)
230-
scaleResolution = isNotNull(scale, sourceText(), THIRD).and(
231-
isType(scale, DataType::isNumeric, sourceText(), THIRD, "numeric")
232-
);
228+
scaleResolution = isType(scale, DataType::isNumeric, sourceText(), THIRD, "numeric");
233229
}
234230

235231
if (scaleResolution.unresolved()) {

0 commit comments

Comments
 (0)