[ES|QL] use getExpressionType in more places #197695
Labels
Feature:ES|QL
ES|QL related features in Kibana
impact:medium
Addressing this issue will have a medium level of impact on the quality/strength of our product.
Team:ESQL
ES|QL related features in Kibana
technical debt
Improvement of the software architecture and operational architecture
Describe the feature:
#195989 added a utility
getExpressionType
to determine the type of an expression. It has the potential to replace / be merged with similar routines in our validation/autocomplete code.extractTypeFromESNode
— looks like a 1:1 substitutioncheckFunctionArgMatchesDefinition
— pretty close to a 1:1 substitution: get the type from the AST usinggetExpressionType
and then check it against the parameter definition.validateFunction
— The function validation routine performs essentially the same traversal asgetExpressionType
while also generating error messages. Another difference is thatvalidateFunction
does checks on the way down, whilegetExpressionType
computes the types on the way back up. Combining them could be great, but it is a stretch goal and I'm not absolutely certain it is the right thing to do.The text was updated successfully, but these errors were encountered: