Github user marmbrus commented on the pull request:

    https://github.com/apache/spark/pull/1151#issuecomment-46881013
  
    So the problem where everything becomes the same row is due to a 
performance optimization that we make in Spark SQL.  Most operators actually 
only allocate a single row object and reuse that for each tuple that is 
produced.  Spark does not understand this.  There are two possible solutions:
     - call `.map(_.copy())` on the child RDDs before using spark's subtract
     - write our own, optimized version of subtract.  The code will probably be 
somewhat similar to left semi join.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to