mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
SQL: Fix disjunctions (and IN
) with multiple date math expressions (#76424)
* SQL: Fix disjunctions with multiple date math expressions * review comments * remove redundant FieldAttribute parameter * address comments and add more specs * fix typo
This commit is contained in:
parent
37516daa56
commit
627c0ee9c6
10 changed files with 258 additions and 95 deletions
|
@ -53,6 +53,20 @@ s|Description
|
|||
| `INTERVAL '45:01.23' MINUTES TO SECONDS` | 45 minutes, 1 second and 230000000 nanoseconds
|
||||
|===
|
||||
|
||||
==== Comparison
|
||||
|
||||
Date/time fields can be compared to <<date-math, date math>> expressions with the equality (`=`) and `IN` operators:
|
||||
|
||||
[source, sql]
|
||||
--------------------------------------------------
|
||||
include-tagged::{sql-specs}/docs/docs.csv-spec[dtDateMathEquals]
|
||||
--------------------------------------------------
|
||||
|
||||
[source, sql]
|
||||
--------------------------------------------------
|
||||
include-tagged::{sql-specs}/docs/docs.csv-spec[dtDateMathIn]
|
||||
--------------------------------------------------
|
||||
|
||||
==== Operators
|
||||
|
||||
Basic arithmetic operators (`+`, `-`, `*`) support date/time parameters as indicated below:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue