[ES|QL] Append the casting only when necessary in Discover filtering#234748
[ES|QL] Append the casting only when necessary in Discover filtering#234748stratoula merged 4 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/kibana-esql (Team:ESQL) |
| fieldType !== 'string' && | ||
| fieldType !== 'number' && | ||
| (fieldType === undefined || | ||
| !PARAM_TYPES_THAT_SUPPORT_IMPLICIT_STRING_CASTING.includes( |
There was a problem hiding this comment.
Does this work?
I meant PARAM_TYPES_THAT_SUPPORT_IMPLICIT_STRING_CASTING to denote types that could be implicitly casted from strings, but it seems like here it is being interpreted the opposite way. 🤔
There was a problem hiding this comment.
Yes it does. I think this variable name is wrong because these fields can be used without casting to string. OR they needed implicit casting but now they dont. I asked ES and I tested them.
There was a problem hiding this comment.
I saved them in another variable to help with the confusion but it would be good to test where you are using the other variable and if you need to do changes.
There was a problem hiding this comment.
I built this list for my use case. Glad it works for this one, too!
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
|
…lastic#234748) ## Summary We are casting things we don't need to. This is checking the list. The problem with casting is that it is very slow. This is why we prefer to not cast when possible ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
…234748) ## Summary We are casting things we don't need to. This is checking the list. The problem with casting is that it is very slow. This is why we prefer to not cast when possible ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
Summary
We are casting things we don't need to. This is checking the list. The problem with casting is that it is very slow. This is why we prefer to not cast when possible
Checklist