Skip to content

Commit 60ebb6b

Browse files
committed
Remove null checks for str and substr in CONTAINS function logic
1 parent 85a442f commit 60ebb6b

File tree

1 file changed

+1
-1
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public boolean foldable() {
100100

101101
@Evaluator
102102
static boolean process(BytesRef str, BytesRef substr) {
103-
if (str == null || substr == null || str.length < substr.length) {
103+
if (str.length < substr.length) {
104104
return false;
105105
}
106106
return str.utf8ToString().contains(substr.utf8ToString());

0 commit comments

Comments
 (0)