[
https://issues.apache.org/jira/browse/CALCITE-3072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16841007#comment-16841007
]
Feng Zhu commented on CALCITE-3072:
-----------------------------------
I opened a PR(https://github.com/apache/calcite/pull/1216)
> Generate right SQL for FLOOR&SUBSTRING functions in SparkSqlDialect
> -------------------------------------------------------------------
>
> Key: CALCITE-3072
> URL: https://issues.apache.org/jira/browse/CALCITE-3072
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.20.0
> Reporter: Feng Zhu
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The FLOOR and SUBSTRING functions are currently broken when generating query
> for Spark SQL[1].
> {code:java}
> FLOOR -> DATE_TRUNC
> SUBSTRING('Hello World' FROM 5 FOR 1) -> SUBSTRING('Hello World', 5, 1)
> {code}
> [1] https://spark.apache.org/docs/latest/api/sql/index.html
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)