[JBoss JIRA] (ISPN-5704) Enhancements for Functional Map API
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-5704?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-5704:
-----------------------------------
Description:
List of enhancements that didn't make it into 8.0:
* Transaction support.
* Complete persistence support (remove many returning previous, put many returning previous, remove many)
* Replication of per-invocation parameters.
* Port mode *Becoming*Test to functional APIs, and expand on testing other functional APIs.
was:
List of enhancements that didn't make it into 8.0:
* Transaction support.
* Complete persistence support (remove many returning previous, put many returning previous, remove many)
* Replication of per-invocation parameters.
> Enhancements for Functional Map API
> -----------------------------------
>
> Key: ISPN-5704
> URL: https://issues.jboss.org/browse/ISPN-5704
> Project: Infinispan
> Issue Type: Enhancement
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Fix For: 8.1.0.Final
>
>
> List of enhancements that didn't make it into 8.0:
> * Transaction support.
> * Complete persistence support (remove many returning previous, put many returning previous, remove many)
> * Replication of per-invocation parameters.
> * Port mode *Becoming*Test to functional APIs, and expand on testing other functional APIs.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5704) Enhancements for Functional Map API
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-5704?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-5704:
-----------------------------------
Description:
List of enhancements that didn't make it into 8.0:
* Transaction support.
* Complete persistence support (remove many returning previous, put many returning previous, remove many)
* Replication of per-invocation parameters.
was:
List of enhancements that didn't make it into 8.0:
* Transaction support.
* Complete persistence support (remove many returning previous, put many returning previous, remove many)
> Enhancements for Functional Map API
> -----------------------------------
>
> Key: ISPN-5704
> URL: https://issues.jboss.org/browse/ISPN-5704
> Project: Infinispan
> Issue Type: Enhancement
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Fix For: 8.1.0.Final
>
>
> List of enhancements that didn't make it into 8.0:
> * Transaction support.
> * Complete persistence support (remove many returning previous, put many returning previous, remove many)
> * Replication of per-invocation parameters.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5704) Enhancements for Functional Map API
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-5704?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-5704:
-----------------------------------
Description:
List of enhancements that didn't make it into 8.0:
* Transaction support.
* Complete persistence support (remove many returning previous, put many returning previous, remove many)
was:
List of enhancements that didn't make it into 8.0:
* Transaction support.
> Enhancements for Functional Map API
> -----------------------------------
>
> Key: ISPN-5704
> URL: https://issues.jboss.org/browse/ISPN-5704
> Project: Infinispan
> Issue Type: Enhancement
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Fix For: 8.1.0.Final
>
>
> List of enhancements that didn't make it into 8.0:
> * Transaction support.
> * Complete persistence support (remove many returning previous, put many returning previous, remove many)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5705) Execution of a Hibrid Query that involves certain specific 'OR' conditions returns incorrect results
by Prashanth Reddy (JIRA)
[ https://issues.jboss.org/browse/ISPN-5705?page=com.atlassian.jira.plugin.... ]
Prashanth Reddy updated ISPN-5705:
----------------------------------
Security: (was: Red Hat Internal)
> Execution of a Hibrid Query that involves certain specific 'OR' conditions returns incorrect results
> ----------------------------------------------------------------------------------------------------
>
> Key: ISPN-5705
> URL: https://issues.jboss.org/browse/ISPN-5705
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying
> Affects Versions: 8.0.0.Beta3
> Environment: Hibrid Query that includes 'OR' condition fails in certain specific cases
> Reporter: Prashanth Reddy
> Priority: Critical
> Attachments: BooleShannonExpansion.diff
>
>
> The hibrid query, mentioned below produces wrong results, upon execution.
> SELECT p.ID, p.NAME FROM com.testapp.Person p WHERE p.IS_ACTIVE=1 AND (p.CITY='city1' OR p.CITY='city2') AND p.ID>1000
> for the Data:
> ID | NAME | CITY | IS_ACTIVE
> -------------------
> 2001 person1 city1 1
> 2002 person1 city1 1
> 2003 person1 city1 1
> 2004 person1 city1 0
> 2005 person1 city2 1
> 2006 person1 city2 1
> 2007 person1 city3 0
> 2008 person1 city3 1
> Indexed fields: ID, NAME, CITY
> Non-indexed fields: IS_ACTIVE
> Query execution returned 0 number of rows, whereas expected result count is 5.
> After some analysis root cause for the problem has been found, and the details are as follows,
> As a part of separating the query that depends on indexed fields, using boole shannon algorithm, it has first extraced out the condition 'IS_ACTIVE=1' (as it deals with non-indexed fields).
> Assuming four boolean conditions as c1, c2, c3, c4, where c1 represents the condition 'IS_ACTIVE=1'
> f(c1,c2,c3,c4) = c1.f(1, c2, c3, c4) + c1`.f`(0, c2, c3, c4)
> consider
> e1=f(1, c2, c3, c4)
> e2=f`(0, c2, c3, c4)
> which have to be used for constructing the lucene query, for further transformation.
> After splitting as per the above logic, it is trying to optimize the resultant subconditions(e1, e2), so as to reduce the number of conditions to be evaluated. One such optimization that has been found is that when there is a conjuction operation between two comparison predicates dealing with same lvalues(here, same fields), but with the different rvalues(here, constants), it has been optimized to replace it with a contradiction(constant false boolean expression). As we know, this optimization is applicable only for conjuction. But, the same is applied even for the disjuction, which is causing the above mentioned problem.
> For example,
> condition p.CITY='city1' AND p.CITY='city2'
> can be replaced with CONTRADICTION(BooleanConst.FALSE)
> But, the same cannot be done, for
> condition p.CITY='city1' OR p.CITY='city2'
> Following change may correct the problem.
> File: infinispan-8.0.0.Beta3/object-filter/src/main/java/org/infinispan/objectfilter/impl/syntax/BooleShannonExpansion.java:155
> diff:
> @@ -152,7 +152,7 @@
> }
> }
> }
> - PredicateOptimisations.optimizePredicates(newChildren, true);
> + PredicateOptimisations.optimizePredicates(newChildren, false);
> if (newChildren.size() == 1) {
> return newChildren.get(0);
> }
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5685) Filtering doesn't work with sum aggregation
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-5685?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-5685:
-----------------------------------------------
Adrian Nistor <anistor(a)redhat.com> changed the Status of [bug 1257325|https://bugzilla.redhat.com/show_bug.cgi?id=1257325] from NEW to POST
> 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}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5685) Filtering doesn't work with sum aggregation
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-5685?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration updated ISPN-5685:
------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1257325
> 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}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5706) Execution of a Hibrid Query returns incorrect results, when the filter condition fails(match() returns false) for at least some of the results returned by the lucene query execution, before reaching any other successful results(which satisfies the filter)
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-5706?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-5706:
--------------------------------
Status: Open (was: New)
> Execution of a Hibrid Query returns incorrect results, when the filter condition fails(match() returns false) for at least some of the results returned by the lucene query execution, before reaching any other successful results(which satisfies the filter)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-5706
> URL: https://issues.jboss.org/browse/ISPN-5706
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying
> Affects Versions: 8.0.0.Beta3
> Reporter: Prashanth Reddy
> Assignee: Adrian Nistor
> Priority: Critical
> Fix For: 8.0.0.Final
>
> Attachments: HybridQuery.diff
>
>
> The hibrid query, mentioned below produces partial or zero results(depending on the data), upon execution.
> SELECT p.ID, p.NAME FROM com.testapp.Person p WHERE p.IS_ACTIVE=1 AND p.ID>1000 and p.ID<10000
> For the data,
> ID | NAME | CITY | IS_ACTIVE
> -------------------
> 2001 person1 city1 0
> 2002 person1 city1 1
> 2003 person1 city1 1
> 2004 person1 city1 0
> 2005 person1 city2 1
> 2006 person1 city2 1
> 2007 person1 city3 0
> 2008 person1 city3 1
> Indexed fields: ID, NAME, CITY
> Non-indexed fields: IS_ACTIVE
> Query execution returned 0 number of rows, whereas expected result count is 8.
> Root cause for the problem is very trivial, and the details are as follows,
> As we know, hibrid query execution involves,
> * Execution of lucene query that is constructed based on boole shannon expansion
> * Applying filter on the results obtained from above operation, in order to cover the conditions that deals with non-indexed fields
> In the second step, there is a mismatch between the representation of filter operation return status and the way end of the result list is detected at the outer layer.
> As per the current implementation, filter operation returns null, if the filter condition is not satisfied. But, the same is also used for determining whether there are any further results to be retrieved, which is causing the actual problem.
> Following changes can resolve the problem,
> file: infinispan-8.0.0.Beta3/query/src/main/java/org/infinispan/query/dsl/embedded/impl/HybridQuery.java
> diff:
> Index: infinispan-8.0.0.Beta3/query/src/main/java/org/infinispan/query/dsl/embedded/impl/HybridQuery.java
> ===================================================================
> --- infinispan-8.0.0.Beta3/query/src/main/java/org/infinispan/query/dsl/embedded/impl/HybridQuery.java (revision -----)
> +++ infinispan-8.0.0.Beta3/query/src/main/java/org/infinispan/query/dsl/embedded/impl/HybridQuery.java (working copy)
> @@ -70,12 +70,15 @@
>
> private void update() {
> if (!isReady) {
> - if (it.hasNext()) {
> - Object next = it.next();
> - nextResult = objectFilter.filter(next);
> - } else {
> - nextResult = null;
> - }
> + do {
> + if (it.hasNext()) {
> + Object next = it.next();
> + nextResult = objectFilter.filter(next);
> + } else {
> + nextResult = null;
> + break;
> + }
> + } while (nextResult == null);
> isReady = true;
> }
> }
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5706) Execution of a Hibrid Query returns incorrect results, when the filter condition fails(match() returns false) for at least some of the results returned by the lucene query execution, before reaching any other successful results(which satisfies the filter)
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-5706?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-5706:
--------------------------------
Fix Version/s: 8.0.0.Final
> Execution of a Hibrid Query returns incorrect results, when the filter condition fails(match() returns false) for at least some of the results returned by the lucene query execution, before reaching any other successful results(which satisfies the filter)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-5706
> URL: https://issues.jboss.org/browse/ISPN-5706
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying
> Affects Versions: 8.0.0.Beta3
> Reporter: Prashanth Reddy
> Assignee: Adrian Nistor
> Priority: Critical
> Fix For: 8.0.0.Final
>
> Attachments: HybridQuery.diff
>
>
> The hibrid query, mentioned below produces partial or zero results(depending on the data), upon execution.
> SELECT p.ID, p.NAME FROM com.testapp.Person p WHERE p.IS_ACTIVE=1 AND p.ID>1000 and p.ID<10000
> For the data,
> ID | NAME | CITY | IS_ACTIVE
> -------------------
> 2001 person1 city1 0
> 2002 person1 city1 1
> 2003 person1 city1 1
> 2004 person1 city1 0
> 2005 person1 city2 1
> 2006 person1 city2 1
> 2007 person1 city3 0
> 2008 person1 city3 1
> Indexed fields: ID, NAME, CITY
> Non-indexed fields: IS_ACTIVE
> Query execution returned 0 number of rows, whereas expected result count is 8.
> Root cause for the problem is very trivial, and the details are as follows,
> As we know, hibrid query execution involves,
> * Execution of lucene query that is constructed based on boole shannon expansion
> * Applying filter on the results obtained from above operation, in order to cover the conditions that deals with non-indexed fields
> In the second step, there is a mismatch between the representation of filter operation return status and the way end of the result list is detected at the outer layer.
> As per the current implementation, filter operation returns null, if the filter condition is not satisfied. But, the same is also used for determining whether there are any further results to be retrieved, which is causing the actual problem.
> Following changes can resolve the problem,
> file: infinispan-8.0.0.Beta3/query/src/main/java/org/infinispan/query/dsl/embedded/impl/HybridQuery.java
> diff:
> Index: infinispan-8.0.0.Beta3/query/src/main/java/org/infinispan/query/dsl/embedded/impl/HybridQuery.java
> ===================================================================
> --- infinispan-8.0.0.Beta3/query/src/main/java/org/infinispan/query/dsl/embedded/impl/HybridQuery.java (revision -----)
> +++ infinispan-8.0.0.Beta3/query/src/main/java/org/infinispan/query/dsl/embedded/impl/HybridQuery.java (working copy)
> @@ -70,12 +70,15 @@
>
> private void update() {
> if (!isReady) {
> - if (it.hasNext()) {
> - Object next = it.next();
> - nextResult = objectFilter.filter(next);
> - } else {
> - nextResult = null;
> - }
> + do {
> + if (it.hasNext()) {
> + Object next = it.next();
> + nextResult = objectFilter.filter(next);
> + } else {
> + nextResult = null;
> + break;
> + }
> + } while (nextResult == null);
> isReady = true;
> }
> }
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5706) Execution of a Hibrid Query returns incorrect results, when the filter condition fails(match() returns false) for at least some of the results returned by the lucene query execution, before reaching any other successful results(which satisfies the filter)
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-5706?page=com.atlassian.jira.plugin.... ]
Work on ISPN-5706 started by Adrian Nistor.
-------------------------------------------
> Execution of a Hibrid Query returns incorrect results, when the filter condition fails(match() returns false) for at least some of the results returned by the lucene query execution, before reaching any other successful results(which satisfies the filter)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-5706
> URL: https://issues.jboss.org/browse/ISPN-5706
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying
> Affects Versions: 8.0.0.Beta3
> Reporter: Prashanth Reddy
> Assignee: Adrian Nistor
> Priority: Critical
> Fix For: 8.0.0.Final
>
> Attachments: HybridQuery.diff
>
>
> The hibrid query, mentioned below produces partial or zero results(depending on the data), upon execution.
> SELECT p.ID, p.NAME FROM com.testapp.Person p WHERE p.IS_ACTIVE=1 AND p.ID>1000 and p.ID<10000
> For the data,
> ID | NAME | CITY | IS_ACTIVE
> -------------------
> 2001 person1 city1 0
> 2002 person1 city1 1
> 2003 person1 city1 1
> 2004 person1 city1 0
> 2005 person1 city2 1
> 2006 person1 city2 1
> 2007 person1 city3 0
> 2008 person1 city3 1
> Indexed fields: ID, NAME, CITY
> Non-indexed fields: IS_ACTIVE
> Query execution returned 0 number of rows, whereas expected result count is 8.
> Root cause for the problem is very trivial, and the details are as follows,
> As we know, hibrid query execution involves,
> * Execution of lucene query that is constructed based on boole shannon expansion
> * Applying filter on the results obtained from above operation, in order to cover the conditions that deals with non-indexed fields
> In the second step, there is a mismatch between the representation of filter operation return status and the way end of the result list is detected at the outer layer.
> As per the current implementation, filter operation returns null, if the filter condition is not satisfied. But, the same is also used for determining whether there are any further results to be retrieved, which is causing the actual problem.
> Following changes can resolve the problem,
> file: infinispan-8.0.0.Beta3/query/src/main/java/org/infinispan/query/dsl/embedded/impl/HybridQuery.java
> diff:
> Index: infinispan-8.0.0.Beta3/query/src/main/java/org/infinispan/query/dsl/embedded/impl/HybridQuery.java
> ===================================================================
> --- infinispan-8.0.0.Beta3/query/src/main/java/org/infinispan/query/dsl/embedded/impl/HybridQuery.java (revision -----)
> +++ infinispan-8.0.0.Beta3/query/src/main/java/org/infinispan/query/dsl/embedded/impl/HybridQuery.java (working copy)
> @@ -70,12 +70,15 @@
>
> private void update() {
> if (!isReady) {
> - if (it.hasNext()) {
> - Object next = it.next();
> - nextResult = objectFilter.filter(next);
> - } else {
> - nextResult = null;
> - }
> + do {
> + if (it.hasNext()) {
> + Object next = it.next();
> + nextResult = objectFilter.filter(next);
> + } else {
> + nextResult = null;
> + break;
> + }
> + } while (nextResult == null);
> isReady = true;
> }
> }
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months