mihaibudiu commented on code in PR #5264:
URL: https://github.com/apache/calcite/pull/5264#discussion_r4029111197
##########
core/src/main/java/org/apache/calcite/rel/core/SetOp.java:
##########
@@ -113,6 +117,42 @@ public abstract SetOp copy(
return pw.item("all", all);
}
+ @API(since = "1.43", status = API.Status.INTERNAL)
+ @EnsuresNonNullIf(expression = "#1", result = true)
+ protected boolean deepEquals0(@Nullable Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+ SetOp o = (SetOp) obj;
+ if (all != o.all
+ || !traitSet.equals(o.traitSet)
+ || !hints.equals(o.hints)
+ || inputs.size() != o.inputs.size()) {
+ return false;
+ }
+ for (int i = 0; i < inputs.size(); i++) {
+ if (!inputs.get(i).deepEquals(o.inputs.get(i))) {
+ return false;
+ }
+ }
+ // A SetOp's row type is derived solely from its inputs' row types, so
equal inputs
+ // imply equal row types; there is no need to compare them here.
Review Comment:
I would replace "them" with "rowType".
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]