[ES|QL] better inline casting validation with ES metadata #186409
Labels
Feature:ES|QL
impact:low
Addressing this issue will have a low level of impact on the quality/strength of our product.
Team:ESQL
ES|QL related features in Kibana
What isn't currently validated
In #185904, we added basic support for validating inline casts (
::
).There are a couple things we couldn't validate at the time
Type list
We don't know what types and abbreviations are valid. For example,
integer
is acceptable, but so isint
. We took the approach of not validating the type.Value types
Another thing we aren't able to validate is the type of the value being casted against the cast type.
For example,
stringField::cartesian_point
is valid butnumberField::cartesian_point
is not.The reason for this is that
field::cartesian_point
is actually syntactic sugar forto_cartesianpoint(field)
. So, the inline cast value is subject to the constraints ofto_cartesianpoint
's call signature.Plan
With elastic/elasticsearch#109713, Elasticsearch is providing us a cast-type-to-cast-function map which will allow us to reliably validate both of the above.
The text was updated successfully, but these errors were encountered: