Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better optional parameter support in testing #120002

Open
not-napoleon opened this issue Jan 10, 2025 · 1 comment
Open

Better optional parameter support in testing #120002

not-napoleon opened this issue Jan 10, 2025 · 1 comment
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

Comments

@not-napoleon
Copy link
Member

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.

@not-napoleon not-napoleon added :Analytics/ES|QL AKA ESQL >test Issues or PRs that are addressing/adding tests labels Jan 10, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Jan 10, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants