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:
Lukas Wegmann 2021-08-31 17:30:49 +02:00 committed by GitHub
parent 37516daa56
commit 627c0ee9c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 258 additions and 95 deletions

View file

@ -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: