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

Julian Hyde commented on CALCITE-1895:
--------------------------------------

A couple of comments:
* Can you rename {{notOk}} to {{throws_}} (just for consistency with methods 
elsewhere)
* I think you should throw {{IllegalArgumentException}} rather than 
{{AssertionError}}. {{AssertionError}} is (in my opinion) only for internal 
errors, therefore it is impossible for user code to cause it, and it should 
only occur in tests for private APIs.
* Would it be straightforward to add a test that executes a query with 
substring on MSSQL? It's OK if not. But we're only testing SQL generation at 
present, and we'd get better coverage if we actually executed the SQL.

> 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)

Reply via email to