MongoDB: group by doesn't work with MongoDB 2.6.3
--------------------------------------------------
Key: TEIID-3317
URL:
https://issues.jboss.org/browse/TEIID-3317
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 8.9.1
Environment: Teiid 8.9.1 with MongoDB version: 2.6.3 using MongoDB Driver
mongo-java-driver-2.12.3.jar
Reporter: Ivan Chan
Assignee: Ramesh Reddy
Labels: Teiid
Running group by sql through exception:
select "FirstName"
from "MongoDB_Array_263"."TeiidArray"
group by "FirstName"
order by "FirstName"
limit 1000
Exception:
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:604)
at java.util.ArrayList.get(ArrayList.java:382)
at
org.teiid.translator.mongodb.MongoDBQueryExecution.next(MongoDBQueryExecution.java:132)
at
org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:386)
at
org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:204)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:209)
at $Proxy182.more(Unknown Source)
at
org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:301)
at
org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:110)
at
org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:107)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:58)
at
org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274)
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)