Skip to content

Better optional parameter support in testing #120002

@not-napoleon

Description

@not-napoleon

The testFunctionInfo method in the ES|QL parameterized testing gets confused when there are optional parameters in the function signature. See for example DateFormat, which has two forms: DATE_FORMAT(format_string, date) and DATE_FORMAT(date). The first positional argument can be a string or a date. In #120000, I worked around it by adding datetime to the acceptable types for the first parameter, but we could be more clever in testFunctionInfo. We can detect if the parameter is optional, and adjust behavior accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Analytics/ES|QLAKA ESQL>testIssues or PRs that are addressing/adding testsTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions