Bug 1104758 - MongoDB: Usage of function "mod()" in SQL query throws an exception
Summary: MongoDB: Usage of function "mod()" in SQL query throws an exception
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: Teiid
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER1
: 6.1.0
Assignee: Van Halbert
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-04 15:27 UTC by Filip Elias
Modified: 2016-02-10 08:52 UTC (History)
4 users (show)

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.
Clone Of:
Environment:
DV 6.0 + rollup
Last Closed: 2016-02-10 08:52:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Server log with the exception (18.66 KB, text/x-log)
2014-06-04 15:27 UTC, Filip Elias
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker TEIID-2984 0 Major Closed MongoDB: Usage of function "mod()" in SQL query throws an exception 2015-04-07 13:35:14 UTC

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


Note You need to log in before you can comment on or make changes to this bug.