commit | c8187414a3396f286fcece155f4f11ce32a009c9 | [log] [tgz] |
---|---|---|
author | Ildar Absalyamov <ildar.absalyamov@gmail.com> | Fri Jul 11 20:12:29 2014 -0700 |
committer | Ian Maxon <imaxon@uci.edu> | Wed Jul 23 17:52:36 2014 -0800 |
tree | 3a42375cc6198972effeea3138a5de003b048495 | |
parent | 0b171752ca4e2607a394f3aa346fe8e8af72c931 [diff] |
Consider opaqueParameters in AbstractFunctionCallExpression equals&hashcode methods to make casting operators with the same argument distinguishable Change-Id: I7b8bf5979732eb22dff824e48a57fdd1b1da4dda Reviewed-on: http://fulliautomatix.ics.uci.edu:8443/100 Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Reviewed-by: Till Westmann <westmann@gmail.com> Reviewed-by: Inci Cetindil <icetindil@gmail.com>
diff --git a/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/expressions/AbstractFunctionCallExpression.java b/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/expressions/AbstractFunctionCallExpression.java index b8a9c87..1792641 100644 --- a/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/expressions/AbstractFunctionCallExpression.java +++ b/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/expressions/AbstractFunctionCallExpression.java
@@ -206,6 +206,16 @@ if (!argument.equals(fceArgument)) return false; } + if (opaqueParameters != null) { + if (opaqueParameters.length != fce.opaqueParameters.length) + return false; + for (int i = 0; i < opaqueParameters.length; i++) { + Object opaqueParameter = opaqueParameters[i]; + Object fceOpaqueParameter = fce.opaqueParameters[i]; + if (!opaqueParameter.equals(fceOpaqueParameter)) + return false; + } + } return true; } } @@ -216,6 +226,11 @@ for (Mutable<ILogicalExpression> e : arguments) { h = h * 41 + e.getValue().hashCode(); } + if (opaqueParameters != null) { + for (int i = 0; i < opaqueParameters.length; i++) { + h = h * 31 + opaqueParameters[i].hashCode(); + } + } return h; }