SQL: adds format parameter to range queries for constant date comparisons#45326
Merged
astefan merged 7 commits intoelastic:masterfrom Aug 13, 2019
Merged
SQL: adds format parameter to range queries for constant date comparisons#45326astefan merged 7 commits intoelastic:masterfrom
astefan merged 7 commits intoelastic:masterfrom
Conversation
used in comparison conditions
Collaborator
|
Pinging @elastic/es-search |
Contributor
Author
|
@elasticmachine run elasticsearch-ci/default-distro |
costin
approved these changes
Aug 12, 2019
| client().performRequest(request); | ||
| } | ||
|
|
||
| private ZonedDateTime nowWithMillisResolution(String zoneId) { |
Member
There was a problem hiding this comment.
Can't you use DateUtils.nowWithMillisResolution?
Contributor
Author
|
@elasticmachine run elasticsearch-ci/2 |
Contributor
Author
|
@elasticmachine run elasticsearch-ci/packaging-sample |
astefan
added a commit
to astefan/elasticsearch
that referenced
this pull request
Aug 13, 2019
…sons (elastic#45326) * Add format parameter to the range queries built for CURRENT_* functions used in comparison conditions * Use range queries for date fields equality/non-equality as well. (cherry picked from commit c1e81e9)
This was referenced Oct 15, 2019
Closed
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.
Whenever a date field is used in a <, >, <=, >= comparison, a
rangequery is built. This includes any output fromCURRENT_*/NOW/TODAYfunctions. This PR adds theformatparameter to these range queries and sets the value of the date constant as String.Also, it changes the = and != operators to use a
rangequery as well, to have the proper format for the literal used in the equality/non-equality condition.Fixes #45139.