Bug 1316503

Summary: OData - request is not traslated to valid SQL
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Juraj Duráni <jdurani>
Component: TeiidAssignee: Van Halbert <vhalbert>
Status: CLOSED CURRENTRELEASE QA Contact: Juraj Duráni <jdurani>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: aszczucz, blafond, jolee, mbaluch, thauser, vhalbert
Target Milestone: ER2   
Target Release: 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-24 11:47:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Juraj Duráni 2016-03-10 11:20:36 UTC
Description of problem:
*URL:* http://localhost:8080/odata4/olingo_basic/Source/Customers/?$filter=Orders_FK0/$count%20lt%202
*Result:* TEIID31118 Element "g30.customerid" is not defined by any relevant group.
*SQL:*
SELECT g30.idcust, g30.name FROM Source.Customers AS g30 WHERE (SELECT COUNT(*) FROM Source.Orders AS g31 WHERE g30.customerid = g31.idcust) < ? ORDER BY g30.idcust
*Correct SQL:*
SELECT g30.idcust, g30.name FROM Source.Customers AS g30 WHERE (SELECT COUNT(*) FROM Source.Orders AS g31 WHERE g30.idcust = g31.customerid) < ? ORDER BY g30.idcust

Comment 1 JBoss JIRA Server 2016-03-14 20:16:56 UTC
Ramesh Reddy <rareddy> updated the status of jira TEIID-4061 to Coding In Progress

Comment 2 JBoss JIRA Server 2016-03-17 15:48:02 UTC
Ramesh Reddy <rareddy> updated the status of jira TEIID-4061 to Resolved

Comment 3 Juraj Duráni 2016-06-15 07:31:00 UTC
Verified. Teiid returns correct result.

Comment 4 JBoss JIRA Server 2016-06-15 12:35:11 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-4061 to Closed