spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cloud-fan <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-8899][SQL] remove duplicated equals met...
Date Thu, 09 Jul 2015 02:42:36 GMT
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7291#discussion_r34219607
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/Row.scala ---
    @@ -363,6 +364,70 @@ trait Row extends Serializable {
         false
       }
     
    +  protected def canEqual(other: Any) =
    +    other.isInstanceOf[Row] && !other.isInstanceOf[InternalRow]
    --- End diff --
    
    cc @chenghao-intel , I think `other` won't be null as we won't compare row and null in
our code, right?
    And it does't make sense to compare a external row and a internal row, but we should allow
compare different kind of internal rows, so `other.getClass == this.getClass` may not be a
good idea?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message