Open craigtaverner opened 2 days ago
Pinging @elastic/es-analytical-engine (Team:Analytics)
This may also apply to REVERSE
I think we should assert
in the tests that no function ever spits out text
. At some point we'll make an ANALYZE function that does and we can hack around the assertion for that one function. Otherwise they never should.
In ES|QL, many functions can take both KEYWORD and TEXT as input parameters, and change their values to strings. This change destroys the meaning of any analyzer associated with the original TEXT, and so the output should always be KEYWORD. But several functions mistakenly return TEXT (ie. return their input data type).
Functions known to have this issue:
field.dataType
UnaryScalarFunction
:Other functions that take TEXT but already are fixed to only return KEYWORD: