elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
1.08k stars 24.84k forks source link

ES|QL: properly handle fold-time errors as VerificationExceptions #112672

Open astefan opened 2 months ago

astefan commented 2 months ago

Description

A recent PR surfaced an inconsistency issue regarding functions that act on foldable values that are incorrect. For those functions the fold() method is called by the EvaluatorMapper and there are few aspects that can be improved:

elasticsearchmachine commented 2 months ago

Pinging @elastic/es-analytical-engine (Team:Analytics)

alex-spies commented 2 months ago

Heya, there's already a bit of discussion on https://github.com/elastic/elasticsearch/issues/99758, which I think this is a duplicate of.

astefan commented 2 months ago

@alex-spies thank you for chiming in, I didn't search for an already existent issue, there are some of them around indeed. I've reworded a bit and extended the description of this one, hopefully this acts as a meta issue for all the rest. ES|QL needs a wide swipe of all functions and operators so that we have a consistent handling of this scenario.

fang-xing-esql commented 2 days ago

108519 is also a variation of this issue.