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

Bug 1104758

Summary: MongoDB: Usage of function "mod()" in SQL query throws an exception
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, felias, 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:
Usage of "mod()" function in an SQL query on Mongo DB would throw an exception. Support for the mod function has now been removed.
Story Points: ---
Clone Of: Environment:
DV 6.0 + rollup
Last Closed: 2016-02-10 08:52:56 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:
Attachments:
Description Flags
Server log with the exception none

Description Filip Elias 2014-06-04 15:27:02 UTC
Exception[1] is thrown when function modulo(mod) is used in SQL query. 

Sample query:
SELECT LongNum, 11, MOD(LongNum, 11) FROM BQT1.SmallA ORDER BY LONGNUM 

Server log is in the attachment.

[1] 16:36:59,645 ERROR [org.teiid.CONNECTOR] (Worker10_QueryProcessorQueue71) Connector worker process failed for atomic-request=hRCP8hHjrmZb.25.0.13: com.mongodb.CommandFailureException: { "serverUsed" : "localhost/127.0.0.1:27017" , "errmsg" : "exception: disallowed field type Array in object expression (at 'mod')" , "code" : 15992 , "ok" : 0.0}
	at com.mongodb.CommandResult.getException(CommandResult.java:71)
	at com.mongodb.CommandResult.throwOnError(CommandResult.java:110)
	at com.mongodb.DBCollection.aggregate(DBCollection.java:1308)

Comment 1 Filip Elias 2014-06-04 15:27:47 UTC
Created attachment 902218 [details]
Server log with the exception

Comment 3 Filip Elias 2014-06-04 15:45:18 UTC
Van,

I am testing mongodb as a post GA task for DV 6.0.

Comment 4 JBoss JIRA Server 2014-06-04 21:10:14 UTC
Ramesh Reddy <rareddy> updated the status of jira TEIID-2984 to Resolved

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