[teiid-issues] [JBoss JIRA] (TEIID-5275) OData4 translator doesn't handle IS NOT NULL condition properly

Steven Hawkins (JIRA) issues at jboss.org
Fri Mar 9 08:46:00 EST 2018


    [ https://issues.jboss.org/browse/TEIID-5275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13543998#comment-13543998 ] 

Steven Hawkins commented on TEIID-5275:
---------------------------------------

The olingo parser is restrictive about the usage of parens.  It will not accept not(any boolean expression) - so it's not just is not null that can be an issue.

And you cannot just use "not any boolean expression" without parens as not has highest precedence and will swallow the next expression.

> OData4 translator doesn't handle IS NOT NULL condition properly
> ---------------------------------------------------------------
>
>                 Key: TEIID-5275
>                 URL: https://issues.jboss.org/browse/TEIID-5275
>             Project: Teiid
>          Issue Type: Bug
>          Components: OData
>    Affects Versions: 8.12.11.6_4
>            Reporter: Jan Martiska
>            Assignee: Steven Hawkins
>
> Given that {{BQT1.SmallA}} is a view backed by Odata4 translator, both of these queries fail:
> {noformat}
> SELECT intnum FROM BQT1.SmallA WHERE intnum IS NOT NULL
> SELECT intnum FROM BQT1.SmallA WHERE NOT(intnum IS NULL)
> {noformat}
> The problem is that this is translated to a OData request like this:
> {noformat}
> http://localhost:8080/odata4/csv/bqt1/SmallA?%24select=intnum&%24filter=not(intnum%20eq%20null)
> {noformat}
> This request fails with:
> {noformat}
> The property 'not', used in a query expression, is not defined in type 'csv.1.bqt1.SmallA'.
> {noformat}
> A working URL which would return the correct rows would be:
> {noformat}
> http://localhost:8080/odata4/csv/bqt1/SmallA?%24select=intnum&%24filter=intnum%20ne%20null
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the teiid-issues mailing list