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

ESQL: Evaluator check function tests #117715

Merged
merged 8 commits into from
Dec 10, 2024

Conversation

ivancea
Copy link
Contributor

@ivancea ivancea commented Nov 28, 2024

Multiple scalar function tests were being ignored if they had any non-representable child (counters, durations, periods...).

Here, I'm making that "can have an evaluator" a bit more explicit in every test, as many of the ignored tests cases were actually "working".

Now, either the testcase is explicitly marked with .withoutEvaluator(), or the return type is non-representable (I kept this logic as to avoid adding .withoutEvaluator() to more tests, but could be changed too; only other 2-4 tests would need changes right now). ->Now .withoutEvaluator() must be explicit

# Conflicts:
#	x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/TestCaseSupplier.java
@ivancea ivancea added >test Issues or PRs that are addressing/adding tests Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) auto-backport Automatically create backport pull requests when merged :Analytics/ES|QL AKA ESQL v9.0.0 v8.18.0 labels Nov 28, 2024
@elasticsearchmachine
Copy link
Collaborator

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 6 changed files in this pull request and generated no suggestions.

Files not reviewed (1)
  • x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/TestCaseSupplier.java: Evaluated as low risk
Comments skipped due to low confidence (1)

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleTests.java:127

  • [nitpick] The evaluator name 'Int' is less descriptive than 'Integer'. It should be renamed back to 'Integer'.
evaluatorName.apply("Int")
Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it. It seems like a nicer improvement. About how many more changes would it take to make us have to specify this even if the result is not representable? If it's just a hand full then I think it's worth being explicit about it all here.

@ivancea ivancea force-pushed the evaluator-check-function-tests branch from e6f527a to d30cbac Compare December 9, 2024 11:24
# Conflicts:
#	x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubTests.java
@ivancea ivancea merged commit fc671cb into elastic:main Dec 10, 2024
16 checks passed
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.x

ivancea added a commit to ivancea/elasticsearch that referenced this pull request Dec 10, 2024
Multiple scalar function tests were being ignored if they had any non-representable child (counters, durations, periods...).

Here, I'm making that "can have an evaluator" a bit more explicit in every test, as many of the ignored tests cases were actually "working".
elasticsearchmachine pushed a commit that referenced this pull request Dec 10, 2024
Multiple scalar function tests were being ignored if they had any non-representable child (counters, durations, periods...).

Here, I'm making that "can have an evaluator" a bit more explicit in every test, as many of the ignored tests cases were actually "working".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >test Issues or PRs that are addressing/adding tests v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants