[
https://issues.apache.org/jira/browse/CALCITE-6523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17872671#comment-17872671
]
suibianwanwan commented on CALCITE-6523:
----------------------------------------
I noticed that in
[CALCITE-4427|https://issues.apache.org/jira/browse/CALCITE-4427], the substr
is handled in sqlToRel, should we also do some conversion in reltosqlConverter?
[~julianhyde] hi, I noticed that you have discussed many issues related to
Oracle substr. WDYT
> 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)