-
Notifications
You must be signed in to change notification settings - Fork 25.6k
ESQL: Make function tests with timezone or locale use random configurations #138107
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
Merged
+248
−161
Merged
Changes from all commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
f95c2a8
Add capability and YAML tests for request and SET time_zone parameters
ivancea 569d9e5
Add SET CSV tests, and adapted CsvTests to work with SET statements
ivancea cc15c9f
Escape ; in csv tests with backslash
ivancea 449abe6
Randomize configuration in function tests, and make it static for the…
ivancea 5dec7c3
[CI] Auto commit changes from spotless
fedbf4f
Merge branch 'main' into esql-time-zone-tests
ivancea b088abf
Moved custom config cases to another method
ivancea ee1316c
Add comment on function with config dserialization randomization
ivancea 13d8b4b
Fix multi cluster tests to accept SET statements
ivancea d794329
Merge branch 'main' into esql-time-zone-tests
ivancea 2713280
Fix configuration and source matching in random tests
ivancea f76f5ec
Added function tests for timezones
ivancea 9005c78
Fix typo
ivancea fad189f
Fixed capability requirement
ivancea 4f62f23
Fix ScalbTests
ivancea 4c5adc0
[CI] Auto commit changes from spotless
3f233bf
Add configuration to DATE_TRUNC and related functions
ivancea d81729b
Merge branch 'main' into esql-time-zone-tests
ivancea 8b8a115
Merge branch 'esql-time-zone-tests' into esql-datetrunc-timezone
ivancea a11d4b8
Merge branch 'main' into esql-datetrunc-timezone
ivancea ebd00dd
Added a ConfigurationFUnction interface and fixed tests with static c…
ivancea de30da7
WIP: Initial DateTrunc unit tests
ivancea dcce704
Reuse DateTrunc tests in Bucket and TBucket
ivancea 24e99c1
Added unit tests for timezones
ivancea dd523d5
Extracted matchers
ivancea ad32a98
Moved matchers to a common place
ivancea 539b7a7
Extracted date_trunc csv tests to date
ivancea 5053983
Update docs/changelog/137450.yaml
ivancea a75301c
Fix benchmark
ivancea 7e5c01d
Added CSV tests for timezones on affected functions
ivancea 544c4cf
Fixed Rounding builders being reused
ivancea e499df4
Use DateTrunc zoneId instead of configuration in rule
ivancea 205a15c
Undo roundings test
ivancea 46debec
Fix tests
ivancea 29707e5
Fixed tests and their testcase names
ivancea a40f913
Merge branch 'main' into esql-datetrunc-timezone
ivancea 00e2d67
Merge branch 'main' into esql-datetrunc-timezone
ivancea e3ae6ba
Added tests for locale and timezone
ivancea 096541f
Use TypeSafeMatcher on BytesRef matcher
ivancea b9100bd
Removed ESQL dependency from the matcher docs
ivancea f6d6d2c
Merge branch 'main' into esql-datetrunc-timezone
ivancea de3dd41
Moved matchers to server.test
ivancea ee0af20
Avoid renaming timestamp in TS functions
ivancea 44ad461
Format
ivancea 84b882e
Add extra cases to dateCases
ivancea 2f0b404
[CI] Auto commit changes from spotless
096d9b3
Add tests for every combination of cases
ivancea fdc0cf8
Merge branch 'main' into esql-datetrunc-timezone
ivancea 4dc641f
[CI] Auto commit changes from spotless
d46fc5b
Fixed date intervals with +1 units, and added negative years tests
ivancea bdd7138
Updated duration tests to cover all timezone kinds
ivancea 55c4efd
Reorganized tests
ivancea d25ab57
Remove redundant test cases
ivancea b7d63b9
Added midnight DST tests
ivancea a3e592c
[CI] Auto commit changes from spotless
3b34ef6
Fixed midnight DST test
ivancea e76d5b2
Merge branch 'esql-datetrunc-timezone' of github.com:ivancea/elastics…
ivancea 2194e83
Merge branch 'main' into esql-datetrunc-timezone
ivancea e26c61d
Merge branch 'esql-datetrunc-timezone' into esql-date-function-tests
ivancea f9886b1
Simplified timezones for tests
ivancea df8b7c6
Fixed signature generation failing because of nanos assumptions
ivancea 4723f43
Simplified timezones for tests
ivancea 561f99c
Fixed signature generation failing because of nanos assumptions
ivancea ba354eb
Merge branch 'esql-datetrunc-timezone' into esql-date-function-tests
ivancea 16bdcf9
Merge branch 'main' into esql-date-function-tests
ivancea 0c91474
Move string matcher to ReadableMatchers
ivancea f162409
Remove unused method
ivancea ff51e44
Merge branch 'main' into esql-date-function-tests
ivancea ca5be79
Merge branch 'main' into esql-date-function-tests
ivancea 5b5a330
Remove redundant qualifier
ivancea f5f65b4
Merge branch 'main' into esql-date-function-tests
ivancea File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this not do the same thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.toList()returned list is immutable, and I wanted to update it after the mapping in some tests (Keep adding test cases).The (current) usecase for this method was to update the config (or anything really) in TestCaseSuppliers provided by other utilities. Specifically the
unary()and similar methods we have that magically generate them. I didn't want to add a weird callback/extra configuration to each of those functions.