ESQL: isNotNullAndFoldable should not perform a fold #119756
Labels
:Analytics/ES|QL
AKA ESQL
>bug
Team:Analytics
Meta label for analytical engine team (ESQL/Aggs/Geo)
>tech debt
This helper method is used in type checks/resolutions and checks whether a value is not null.
This check really shouldn't happen at the time when we perform type resolutions - type resolutions shouldn't depend on individual values.
More importantly, folding values can be expensive - we should only perform this in the
ConstantFolding
andFoldNulls
steps of the logical optimizer.We may be able to use the
Validatable
interface to perform the null-check after the logical optimizer step, when all foldables can be assumed to be already folded.This is currently used in
Top
,FullTextFunction
andMatch
.The text was updated successfully, but these errors were encountered: