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

[jira] [Updated] (CALCITE-6523) Oracle SUBSTR semantics different from Calcite

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

suibianwanwan updated CALCITE-6523:
-----------------------------------
    Description: 
Oracle's `SUBSTR` has very different semantics. For example, if the length of the character is less than the second argument, null is returned. 
{code:java}
select substr('a', 2, 1);{code}
I tested Spark sql, presto, mysql all return empty string, same in calcite. Should we do something about this in RelToSqlConverter?

  was:
Oracle's `SUBSTR` has very different semantics. For example, if the length of the character is less than the second argument, null is returned. 

I tested Spark sql, presto, mysql all return empty string, same in calcite. Should we do something about this in RelToSqlConverter?


> Oracle SUBSTR semantics different from Calcite
> ----------------------------------------------
>
>                 Key: CALCITE-6523
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6523
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: suibianwanwan
>            Priority: Minor
>
> Oracle's `SUBSTR` has very different semantics. For example, if the length of the character is less than the second argument, null is returned. 
> {code:java}
> select substr('a', 2, 1);{code}
> I tested Spark sql, presto, mysql all return empty string, same in calcite. Should we do something about this in RelToSqlConverter?



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