You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Guillaume Massé (Jira)" <ji...@apache.org> on 2023/06/13 21:46:00 UTC
[jira] [Updated] (CALCITE-5776) Support for alternative Interval syntax
[ https://issues.apache.org/jira/browse/CALCITE-5776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Massé updated CALCITE-5776:
-------------------------------------
Description:
{code:java}
spark.sql("select (CURRENT_DATE - INTERVAL '7 DAYS') ").show
+-----------------------------------------------------------------------+
|date_add(current_date(), (- extractansiintervaldays(INTERVAL '7' DAY)))|
+-----------------------------------------------------------------------+
| 2023-06-06|
+-----------------------------------------------------------------------+ {code}
currently the parser does not allows:
{code:java}
INTERVAL '7 DAYS' {code}
it only accepts:
{code:java}
INTERVAL '7' DAYS {code}
was:
{code:java}
spark.sql("select (CURRENT_DATE - INTERVAL '7 DAYS') ").show
+-----------------------------------------------------------------------+
|date_add(current_date(), (- extractansiintervaldays(INTERVAL '7' DAY)))|
+-----------------------------------------------------------------------+
| 2023-06-06|
+-----------------------------------------------------------------------+ {code}
currently the parser does not allows:
`- INTERVAL '7 DAYS'`
> Support for alternative Interval syntax
> ---------------------------------------
>
> Key: CALCITE-5776
> URL: https://issues.apache.org/jira/browse/CALCITE-5776
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: Guillaume Massé
> Priority: Minor
>
> {code:java}
> spark.sql("select (CURRENT_DATE - INTERVAL '7 DAYS') ").show
> +-----------------------------------------------------------------------+
> |date_add(current_date(), (- extractansiintervaldays(INTERVAL '7' DAY)))|
> +-----------------------------------------------------------------------+
> | 2023-06-06|
> +-----------------------------------------------------------------------+ {code}
> currently the parser does not allows:
> {code:java}
> INTERVAL '7 DAYS' {code}
> it only accepts:
> {code:java}
> INTERVAL '7' DAYS {code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)