Skip to content

Conversation

@not-napoleon
Copy link
Member

Backports the following commits to 8.x:

In preparation for adding nanosecond date support to date diff, this PR expands the test coverage and better integrates with the test generation framework. Using random data for date diff is extremely difficult, due to the vast range of units and the constraints of the integer return type. For example, nanosecond resolution differences of more than a couple of seconds will overflow the return value. So, instead of using a fully randomized dataset, I took the existing data set we were running against just the processing function, and formalized that to run against the whole test suite. It should be easy from here to add in cases for the same values as nanoseconds.

I was able to integrate the overflow error case into the normal test framework, but the incorrect unit error doesn't play nicely with the framework (I believe this is because it fails in toEvaluator rather than in process, but I didn't dig in much). I've moved it to another test file so we don't run it for every case in the parameterized test file.

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
@not-napoleon not-napoleon added :Analytics/ES|QL AKA ESQL >test Issues or PRs that are addressing/adding tests auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) labels Jan 17, 2025
@elasticsearchmachine elasticsearchmachine merged commit 4b96c73 into elastic:8.x Jan 21, 2025
15 checks passed
@not-napoleon not-napoleon deleted the backport/8.x/pr-120328 branch January 21, 2025 15:07
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-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >test Issues or PRs that are addressing/adding tests v8.18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants