Better optional parameter support in testing #120002
Labels
:Analytics/ES|QL
AKA ESQL
Team:Analytics
Meta label for analytical engine team (ESQL/Aggs/Geo)
>test
Issues or PRs that are addressing/adding tests
The
testFunctionInfo
method in the ES|QL parameterized testing gets confused when there are optional parameters in the function signature. See for exampleDateFormat
, which has two forms:DATE_FORMAT(format_string, date)
andDATE_FORMAT(date)
. The first positional argument can be a string or a date. In #120000, I worked around it by addingdatetime
to the acceptable types for the first parameter, but we could be more clever intestFunctionInfo
. We can detect if the parameter is optional, and adjust behavior accordingly.The text was updated successfully, but these errors were encountered: