GitHub user maropu opened a pull request:
https://github.com/apache/spark/pull/20433
[SPARK-23264][SQL] Support interval values without INTERVAL clauses
## What changes were proposed in this pull request?
This pr updated parsing rules in `SqlBase.g4` to support a SQL query below;
```
SELECT CAST('2017-08-04' AS DATE) + 1 days;
```
The current master cannot parse it though, other dbms-like systems support
the syntax (e.g., hive and mysql). Also, the syntax is frequently used in the
official TPC-DS queries.
## How was this patch tested?
Added tests in `SQLQuerySuite`.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/maropu/spark SPARK-23264
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/20433.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #20433
----
commit 830cf8d014ae17ade5fccccd771ca98c8c846c93
Author: Takeshi Yamamuro <yamamuro@...>
Date: 2018-01-30T06:15:35Z
Fix
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]