PHOENIX-2888 Aggregations for similar IN list expressions doesn't work correctly (Sergey Soldatov)
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/7cad42cb Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/7cad42cb Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/7cad42cb Branch: refs/heads/4.x-HBase-1.1 Commit: 7cad42cb1916cd963d923416aaeab94c666a90dc Parents: 8ec0bac Author: James Taylor <[email protected]> Authored: Thu May 12 14:34:47 2016 -0700 Committer: James Taylor <[email protected]> Committed: Thu May 12 17:11:51 2016 -0700 ---------------------------------------------------------------------- .../java/org/apache/phoenix/expression/InListExpression.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/7cad42cb/phoenix-core/src/main/java/org/apache/phoenix/expression/InListExpression.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/expression/InListExpression.java b/phoenix-core/src/main/java/org/apache/phoenix/expression/InListExpression.java index a4a9353..a977f1f 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/expression/InListExpression.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/expression/InListExpression.java @@ -175,7 +175,7 @@ public class InListExpression extends BaseSingleExpression { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + values.hashCode(); + result = prime * result + children.hashCode() + values.hashCode(); return result; } @@ -185,7 +185,7 @@ public class InListExpression extends BaseSingleExpression { if (obj == null) return false; if (getClass() != obj.getClass()) return false; InListExpression other = (InListExpression)obj; - if (!values.equals(other.values)) return false; + if (!children.equals(other.children) || !values.equals(other.values)) return false; return true; }
