elastic / elasticsearch

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

ESQL: Fix AttributeSet#add() returning the opposite expected value #117367

Closed ivancea closed 3 days ago

ivancea commented 6 days ago

Set/Collection#add() is supposed to return true if the collection changed (If it actually added something). In this case, it must return if the old value is null.

Extracted from https://github.com/elastic/elasticsearch/pull/114317 (Where it's being used)

elasticsearchmachine commented 6 days ago

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

ivancea commented 6 days ago

@alex-spies In CombineProjections we aren't using the return value (Until the Categorize PR), so all nice! Thanks for checking! If tests are ok (And in the other PR, they were), we should be fine then :blob:

nik9000 commented 6 days ago

Thanks for yanking it into it's own PR!

ivancea commented 3 days ago

Also updated the QL counterpart. I didn't find any usage of the add(), at all

elasticsearchmachine commented 3 days ago

💚 Backport successful

Status Branch Result
✅ 8.x