Skip to content

Commit 91f76d6

Browse files
Remove isNotNullAndFoldable function completely
1 parent 910c1d0 commit 91f76d6

File tree

1 file changed

+0
-30
lines changed
  • x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/expression

1 file changed

+0
-30
lines changed

x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/expression/TypeResolutions.java

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -133,36 +133,6 @@ public static TypeResolution isFoldable(Expression e, String operationName, Para
133133
return TypeResolution.TYPE_RESOLVED;
134134
}
135135

136-
/**
137-
* Is this {@link Expression#foldable()} and not {@code null}.
138-
*
139-
* @deprecated instead of calling this, check for a {@link Literal} containing
140-
* {@code null}. Foldable expressions will be folded by other rules,
141-
* eventually, to a {@link Literal}.
142-
*/
143-
@Deprecated
144-
public static TypeResolution isNotNullAndFoldable(Expression e, String operationName, ParamOrdinal paramOrd) {
145-
TypeResolution resolution = isFoldable(e, operationName, paramOrd);
146-
147-
if (resolution.unresolved()) {
148-
return resolution;
149-
}
150-
151-
if (e.dataType() == DataType.NULL || e.fold(FoldContext.small()) == null) {
152-
resolution = new TypeResolution(
153-
format(
154-
null,
155-
"{}argument of [{}] cannot be null, received [{}]",
156-
paramOrd == null || paramOrd == DEFAULT ? "" : paramOrd.name().toLowerCase(Locale.ROOT) + " ",
157-
operationName,
158-
Expressions.name(e)
159-
)
160-
);
161-
}
162-
163-
return resolution;
164-
}
165-
166136
public static TypeResolution isNotNull(Expression e, String operationName, ParamOrdinal paramOrd) {
167137
if (e.dataType() == DataType.NULL) {
168138
return new TypeResolution(

0 commit comments

Comments
 (0)