[teiid-issues] [JBoss JIRA] (TEIID-4417) Issues with OData query generation logic

Steven Hawkins (JIRA) issues at jboss.org
Tue Aug 30 07:54:00 EDT 2016


     [ https://issues.jboss.org/browse/TEIID-4417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Hawkins updated TEIID-4417:
----------------------------------
    Description: 
When the ODataExpressionToSQLBuilder changes the ctxExpression, ctxQuery and other state it needs to revert back, but currently does not.

For example reordering the predicate:

/odata4/vdb/PM1/G1?$filter=e1 eq $root/G1(1)/e1

to

/odata4/vdb/PM1/G1?$filter=$root/G1(1)/e1 eq e1

results in a source query:

SELECT g0.e1, g0.e2, g0.e3 FROM PM1.G1 AS g0 WHERE (SELECT g1.e1 FROM PM1.G1 AS g1 WHERE g1.e2 = 1) = (SELECT g1.e1 FROM PM1.G1 AS g1 WHERE g1.e2 = 1) ORDER BY g0.e2

That has both sides of the predicate as subqueries.

  was:
When the ODataExpressionToSQLBuilder changes the ctxExpression in most instances it needs to revert back to the ctxQuery, but currently does not.

For example reordering the predicate:

/odata4/vdb/PM1/G1?$filter=e1 eq $root/G1(1)/e1

to

/odata4/vdb/PM1/G1?$filter=$root/G1(1)/e1 eq e1

results in a source query:

SELECT g0.e1, g0.e2, g0.e3 FROM PM1.G1 AS g0 WHERE (SELECT g1.e1 FROM PM1.G1 AS g1 WHERE g1.e2 = 1) = (SELECT g1.e1 FROM PM1.G1 AS g1 WHERE g1.e2 = 1) ORDER BY g0.e2

That has both sides of the predicate as subqueries.

        Summary: Issues with OData query generation logic  (was: ctxExpression logic doesn't reset the context)


> Issues with OData query generation logic
> ----------------------------------------
>
>                 Key: TEIID-4417
>                 URL: https://issues.jboss.org/browse/TEIID-4417
>             Project: Teiid
>          Issue Type: Bug
>          Components: OData
>    Affects Versions: 8.12
>            Reporter: Steven Hawkins
>            Assignee: Steven Hawkins
>            Priority: Critical
>             Fix For: 9.1
>
>
> When the ODataExpressionToSQLBuilder changes the ctxExpression, ctxQuery and other state it needs to revert back, but currently does not.
> For example reordering the predicate:
> /odata4/vdb/PM1/G1?$filter=e1 eq $root/G1(1)/e1
> to
> /odata4/vdb/PM1/G1?$filter=$root/G1(1)/e1 eq e1
> results in a source query:
> SELECT g0.e1, g0.e2, g0.e3 FROM PM1.G1 AS g0 WHERE (SELECT g1.e1 FROM PM1.G1 AS g1 WHERE g1.e2 = 1) = (SELECT g1.e1 FROM PM1.G1 AS g1 WHERE g1.e2 = 1) ORDER BY g0.e2
> That has both sides of the predicate as subqueries.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the teiid-issues mailing list