Github user marmbrus commented on the pull request: https://github.com/apache/spark/pull/5475#issuecomment-92513734 I see, thanks for clarifying. It seems bad that we are creating accumulators per copy anyway then. Can we just pass in the accumulator with the buffers and statistics instead so that there is only ever one copy? Honestly, the best solution would probably be to make the `InMemoryRelation` a `BaseRelation` so that it does not have to handle `newInstance` calls at all. Unfortunately this API did not exist when that class was created. However, I'm not sure its worth refactoring at this point. This code was ported from Shark and I'd like to get rid of it completely in the next release or two. For the second part, it would be great if we could just get rid of the accumulators completely. It feels bad to have all this extra logic only for a test. Can you think of any other way that we could test this?
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org