Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1105087

Summary: MongoDB: No rows are returned when a function is used in a where clause
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Filip Elias <felias>
Component: TeiidAssignee: Van Halbert <vhalbert>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: atangrin, dlesage, vhalbert
Target Milestone: ER1Keywords: QA-Closed
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Teiid would not return rows when a function which is pushed down is used in a where clause against MongoDB. This was because , the $match phase was being added correctly but it was not implicit adding the functions to $project. To rectify this, functions and agregate functions will not be supported in the $match phase in the MongoDB. They need to be pushed as projected columns, so that it can then do a $match on the computed value.
Story Points: ---
Clone Of: Environment:
Dv 6.0 + rollup
Last Closed: 2016-02-10 08:53:39 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 Filip Elias 2014-06-05 11:05:19 UTC
Description of problem:

Teiid will return no rows when a function which is pushed down is used in a where clause.

These queries should return few rows, but the result is empty:

Query:
SELECT intkey, stringnum FROM BQT1.SmallA WHERE concat(stringkey, stringnum) = '7-17' ORDER BY intkey

Generated mongo command:
{aggregate: "smalla", pipeline: [ { $match: { _m0: "7-17" } }, { $project: { c_0: "$INTKEY", c_1: "$STRINGNUM" } }, { $sort: { c_0: 1 } } ] }

Query:
select intKey from bqt1.smalla where intKey+intKey >20

Generated mongo command:
{aggregate: "smalla", pipeline: [ { $match: { _m0: { $gt: 20 } } }, { $project: { _m1: "$INTKEY" } } ] }

Comment 1 JBoss JIRA Server 2014-06-05 20:08:26 UTC
Ramesh Reddy <rareddy> updated the status of jira TEIID-2987 to Resolved

Comment 2 JBoss JIRA Server 2015-04-07 13:35:12 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-2987 to Closed