Problem with select query in Crate 3.2.2

This is in regards to the following issue. https://github.com/crate/crate/issues/8112
It is closed but I am having a similar issue and also it is very intermittent.

Query: select count(city), city from test group by city
Error Stacktrace:
SQLActionException: 500 Internal Server Error 5000 IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:657) at java.util.ArrayList.get(ArrayList.java:433) at io.crate.expression.InputRow.get(InputRow.java:47) at io.crate.execution.engine.collect.InputCollectExpression.setNextRow(InputCollectExpression.java:38) at io.crate.execution.engine.collect.InputCollectExpression.setNextRow(InputCollectExpression.java:26) at io.crate.execution.engine.collect.GroupByOptimizedIterator.applyAggregatesGroupedByKey(GroupByOptimizedIterator.java:290) at io.crate.execution.engine.collect.GroupByOptimizedIterator.lambda$tryOptimizeSingleStringKey$3(GroupByOptimizedIterator.java:183) at io.crate.data.CollectingBatchIterator.loadNextBatch(CollectingBatchIterator.java:135) at io.crate.data.CloseAssertingBatchIterator.loadNextBatch(CloseAssertingBatchIterator.java:69) at io.crate.data.AsyncCompositeBatchIterator.lambda$loadNextBatch$1(AsyncCompositeBatchIterator.java:131) at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:624) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

After hours of research, I am still unable to get the exact solution. Any help would be much appreciated.

1 Like

I have had the same issue on crate 3.2.2