]
Gustavo Fernandes updated ISPN-5685:
------------------------------------
Fix Version/s: 8.0.0.Final
(was: 8.0.0.CR1)
Filtering doesn't work with sum aggregation
-------------------------------------------
Key: ISPN-5685
URL:
https://issues.jboss.org/browse/ISPN-5685
Project: Infinispan
Issue Type: Bug
Affects Versions: 8.0.0.Beta3
Reporter: Jakub Markos
Assignee: Adrian Nistor
Fix For: 8.0.0.Final
The following query
{code}
public void testGroupBy() {
QueryFactory qf = getQueryFactory();
Query q = qf.from(getModelFactory().getTransactionImplClass())
.select(Expression.property("accountId"),
Expression.sum("amount"))
.groupBy("accountId")
.having(Expression.sum("amount")).gt(3324)
.toBuilder().build();
}
{code}
in the context of QueryDslConditionsTest test class fails with:
{code}
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double
at java.lang.Double.compareTo(Double.java:49)
at org.infinispan.objectfilter.impl.util.Interval.contains(Interval.java:92)
at
org.infinispan.objectfilter.impl.predicateindex.IntervalCondition.match(IntervalCondition.java:19)
at
org.infinispan.objectfilter.impl.predicateindex.IntervalCondition.match(IntervalCondition.java:9)
at org.infinispan.objectfilter.impl.predicateindex.Predicate.match(Predicate.java:37)
at
org.infinispan.objectfilter.impl.predicateindex.Predicates.notifyMatchingSubscribers(Predicates.java:118)
at
org.infinispan.objectfilter.impl.predicateindex.AttributeNode.processValue(AttributeNode.java:112)
at
org.infinispan.objectfilter.impl.predicateindex.RowMatcherEvalContext.processAttributes(RowMatcherEvalContext.java:30)
at
org.infinispan.objectfilter.impl.predicateindex.MatcherEvalContext.process(MatcherEvalContext.java:120)
at org.infinispan.objectfilter.impl.ObjectFilterImpl.filter(ObjectFilterImpl.java:73)
at org.infinispan.query.dsl.embedded.impl.HybridQuery$1.update(HybridQuery.java:75)
at org.infinispan.query.dsl.embedded.impl.HybridQuery$1.hasNext(HybridQuery.java:56)
at
org.infinispan.query.dsl.embedded.impl.BaseEmbeddedQuery.listInternal(BaseEmbeddedQuery.java:72)
at
org.infinispan.query.dsl.embedded.impl.BaseEmbeddedQuery.list(BaseEmbeddedQuery.java:63)
at
org.infinispan.query.dsl.embedded.QueryDslConditionsTest.testGroupBy(QueryDslConditionsTest.java:1811)
...
{code}