[teiid-issues] [JBoss JIRA] (TEIID-5281) Issue with concatenating null strings with OData translator

Jan Martiska (JIRA) issues at jboss.org
Tue Mar 13 03:50:00 EDT 2018


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

Jan Martiska commented on TEIID-5281:
-------------------------------------

Well my quite contrived testing scenario is that I'm exposing a CSV file-backed VDB over OData and then I consume that OData to construct a different VDB (on the same Teiid instance) which I'm then accessing using JDBC.

You're right, I can't find anything in the OData spec that mandates this behavior of the concat function. In that case should we consider changing the implementation in Olingo? Other option is to work around this somehow in Teiid.

> Issue with concatenating null strings with OData translator
> -----------------------------------------------------------
>
>                 Key: TEIID-5281
>                 URL: https://issues.jboss.org/browse/TEIID-5281
>             Project: Teiid
>          Issue Type: Bug
>          Components: OData
>    Affects Versions: 8.12.11.6_4
>            Reporter: Jan Martiska
>            Assignee: Steven Hawkins
>            Priority: Minor
>
> There is a difference in behavior of {{CONCAT(x,y)}} function in Teiid SQL and the {{concat(x,y)}} filtering function in OData - the SQL function will return null if one of the arguments is null, but the OData function will return the non-null argument in this case.
> This leads to some peculiar behavior that for rows where A='10' and B=null, the query
> {noformat}
> SELECT concat(A, B) = '10' 
> FROM BQT1.SmallA 
> WHERE concat(A, B) = '10';
> {noformat}
> will return a row containing {{false}}, because the expression in the SELECT clause will be evaluated by Teiid, whereas the one in the WHERE clause will be evaluated by the OData {{concat}} function.
> This is against the documented behavior of Teiid's {{CONCAT}} function, because such row should not be returned at all.



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


More information about the teiid-issues mailing list