Skip to content

ES|QL: Handle omitted exception message in Math.exact* calls #135009

@GalLalouche

Description

@GalLalouche

As a follow up to #134910, we need to be more robust in the way we handle possibly null exception messages.

JDK 25 added optimizations that might cause the error message to be removed in some Math.exact* calls. See https://bugs.openjdk.org/browse/JDK-8367990.

Example of relevant (generated) code:

https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/esql/src/main/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubIntsEvaluator.java#L112

Simplest solution I can think of is to a add a new kind of annotation with an extra error message on null, so the generated code would recreate the exception on null (possibly only when actually creating the exception in https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/operator/Warnings.java#L116).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions