You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2024/10/08 15:52:00 UTC

[jira] [Updated] (CALCITE-6612) Add DATE_SUB function (enabled in Spark library)

     [ https://issues.apache.org/jira/browse/CALCITE-6612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated CALCITE-6612:
------------------------------------
    Labels: pull-request-available  (was: )

> Add DATE_SUB function (enabled in Spark library)
> ------------------------------------------------
>
>                 Key: CALCITE-6612
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6612
>             Project: Calcite
>          Issue Type: New Feature
>          Components: core
>            Reporter: Caican Cai
>            Priority: Minor
>              Labels: pull-request-available
>
> https://spark.apache.org/docs/3.5.2/sql-ref-functions-builtin.html#date-and-timestamp-functions
> {code:java}
> scala> val df = spark.sql("select date_sub('2016-07-30', 1)")
> df: org.apache.spark.sql.DataFrame = [date_sub(2016-07-30, 1): date]
> scala> df.show()
> +-----------------------+
> |date_sub(2016-07-30, 1)|
> +-----------------------+
> |             2016-07-29|
> +-----------------------+
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)