[
https://issues.apache.org/jira/browse/CALCITE-6612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mihai Budiu resolved CALCITE-6612.
----------------------------------
Resolution: Fixed
Fixed in
https://github.com/apache/calcite/commit/659ea980b077ed6721debc27f19eedaa9616e0ab
Thank you for the contribution [~caicancai]
> 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
> Affects Versions: 1.38.0
> Reporter: Caican Cai
> Assignee: Caican Cai
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.39.0
>
>
> 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)