You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "asiunov (via GitHub)" <gi...@apache.org> on 2023/06/09 08:45:52 UTC

[GitHub] [spark] asiunov commented on a diff in pull request #35768: [SPARK-38432][SQL] Refactor framework so as JDBC dialect could compile filter by self way

asiunov commented on code in PR #35768:
URL: https://github.com/apache/spark/pull/35768#discussion_r1224024860


##########
sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/GeneralScalarExpression.java:
##########
@@ -190,6 +113,19 @@ public GeneralScalarExpression(String name, Expression[] children) {
   public String name() { return name; }
   public Expression[] children() { return children; }
 
+  @Override
+  public boolean equals(Object o) {
+    if (this == o) return true;
+    if (o == null || getClass() != o.getClass()) return false;
+    GeneralScalarExpression that = (GeneralScalarExpression) o;
+    return Objects.equals(name, that.name) && Arrays.equals(children, that.children);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(name, children);

Review Comment:
   @beliefer , should it be `Arrays.hashCode(children)`?



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org