You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Feng Zhu (JIRA)" <ji...@apache.org> on 2019/05/16 05:34:00 UTC

[jira] [Created] (CALCITE-3072) Generate right SQL for FLOOR&SUBSTRING functions in SparkSqlDialect

Feng Zhu created CALCITE-3072:
---------------------------------

             Summary: 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


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)