Skip to content

ESQL: isNotNullAndFoldable should not perform a fold #119756

@alex-spies

Description

@alex-spies

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 and FoldNulls steps of the logical optimizer.

We may be able to use the Validatable (update: now PostOptimizationVerificationAware) 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 and Match.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions