ESQL: Send language version in spec tests#107268
Merged
alex-spies merged 2 commits intoelastic:mainfrom Apr 11, 2024
Merged
Conversation
For now this just sends a random version; later, we will want to specify applicable versions in the csv tests themselves.
alex-spies
commented
Apr 10, 2024
| this.testCase = testCase; | ||
| this.mode = mode; | ||
| // TODO: Read applicable versions from csv-spec files/make it part of testCase. | ||
| this.versions = Build.current().isSnapshot() ? Set.of(EsqlVersion.values()) : Set.of(EsqlVersion.releasedAscending()); |
Contributor
Author
There was a problem hiding this comment.
Once we introduce the first change that requires a new lang version, I think our csv tests will look roughly like this:
mvMedian
// Until version 2024.04.01, inclusive
versions:-=2024.04.01
row i = [1,2,3,4] | eval mv_median(i) | drop i;
mv_median(i):i
2
;
mvMedianNew
// From the next version
versions:2024.04.01+
row i = [1,2,3,4] | eval mv_median(i) | drop i;
mv_median(i):d
2.5
;
The old mvMedian test will be tested with a random version up to 2024.04.01, while mvMedianNew will be tested with a random later version, including snapshot.
I think we'll also want a mechanism to specify the version to run the spec/csv tests at; when making a breaking change (like having mv_median return a different data type), it's important to run as many tests against snapshot as possible to see what breaks.
Contributor
Author
|
buildkite run elasticsearch-ci/bwc-snapshots |
Collaborator
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
6 tasks
nik9000
approved these changes
Apr 10, 2024
craigtaverner
pushed a commit
to craigtaverner/elasticsearch
that referenced
this pull request
Apr 11, 2024
For now this just sends a random version; later, we will want to specify applicable versions in the csv tests themselves.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates #104890
For now this just send a random version; later, we will want to specify applicable versions in the csv tests themselves.