You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2015/01/14 12:20:32 UTC
jena git commit: JENA_803 : Bug fix for AVG DISTINCT
Repository: jena
Updated Branches:
refs/heads/master 72d29e631 -> 450e4e88c
JENA_803 : Bug fix for AVG DISTINCT
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/450e4e88
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/450e4e88
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/450e4e88
Branch: refs/heads/master
Commit: 450e4e88c66783fc1fd566fc47afa3c3fafec643
Parents: 72d29e6
Author: Andy Seaborne <an...@apache.org>
Authored: Wed Jan 14 11:20:24 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Wed Jan 14 11:20:24 2015 +0000
----------------------------------------------------------------------
.../hpl/jena/sparql/expr/aggregate/AggAvgDistinct.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/450e4e88/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggAvgDistinct.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggAvgDistinct.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggAvgDistinct.java
index deb2a48..6448a85 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggAvgDistinct.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggAvgDistinct.java
@@ -30,25 +30,25 @@ import com.hp.hpl.jena.sparql.function.FunctionEnv ;
public class AggAvgDistinct extends AggregatorBase
{
// ---- AVG(DISTINCT expr)
- private Expr expr ;
-
public AggAvgDistinct(Expr expr) { super("AVG", true, expr) ; }
@Override
- public Aggregator copy(ExprList expr) { return new AggAvg(expr.get(0)) ; }
+ public Aggregator copy(ExprList expr) { return new AggAvgDistinct(expr.get(0)) ; }
private static final NodeValue noValuesToAvg = NodeValue.nvZERO ;
@Override
public Accumulator createAccumulator()
{
- return new AccAvgDistinct(expr) ;
+ return new AccAvgDistinct(getExpr()) ;
}
@Override
public Node getValueEmpty() { return NodeValue.toNode(noValuesToAvg) ; }
@Override
- public int hashCode() { return HC_AggAvgDistinct ^ expr.hashCode() ; }
+ public int hashCode() {
+ return HC_AggAvgDistinct ^ getExprList().hashCode() ;
+ }
@Override
public boolean equals(Object other)
@@ -56,7 +56,7 @@ public class AggAvgDistinct extends AggregatorBase
if ( this == other ) return true ;
if ( ! ( other instanceof AggAvgDistinct ) ) return false ;
AggAvgDistinct a = (AggAvgDistinct)other ;
- return expr.equals(a.expr) ;
+ return exprList.equals(a.exprList) ;
}