You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Chris Baynes (JIRA)" <ji...@apache.org> on 2017/07/28 09:00:00 UTC

[jira] [Commented] (CALCITE-1895) Substring operator broken for MSSQL

    [ https://issues.apache.org/jira/browse/CALCITE-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16104682#comment-16104682 ] 

Chris Baynes commented on CALCITE-1895:
---------------------------------------

I've created a PR for this: https://github.com/apache/calcite/pull/504

I added a notOk method to the RelToSqlConverterTest, as I wanted to be able to write negative tests. 
In this case Mssql only allows the 3 argument substring, so if the query uses the 2 argument version I want to check the dialect handler will throw an exception.

> Substring operator broken for MSSQL
> -----------------------------------
>
>                 Key: CALCITE-1895
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1895
>             Project: Calcite
>          Issue Type: Bug
>          Components: jdbc-adapter
>            Reporter: Chris Baynes
>            Assignee: Julian Hyde
>
> The format mssql uses looks like:
> SUBSTRING(input, start, length)
> but the default is currently to unparse to SUBSTRING(input FROM start FOR length)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)