spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aarondav <>
Subject [GitHub] incubator-spark pull request: Add subtractByKey to the JavaPairRDD...
Date Sun, 16 Feb 2014 19:07:06 GMT
Github user aarondav commented on the pull request:
    CC @pwendell and @JoshRosen 
    This looks good to me in that it should work in the style elsewhere in this file, but
I have a question for someone more knowledgeable with this area of the code than I. This line
of code (used analogously throughout this file):
    `implicit val cmw: ClassTag[W] = implicitly[ClassTag[AnyRef]].asInstanceOf[ClassTag[W]]`
    doesn't actually get a ClassTag[W], it just gets ClassTag.AnyRef and dresses it up like
one. If any of the Scala APIs really needed W's ClassTag, they would fail. But AnyRef can
make a poor approximation of W for creating stuff like Arrays, which can certainly hold W's,
but also anything else. Are we just lucky that this works right now, or is there a deeper
reason for why this is 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. To do so, please top-post your response.
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 or file a JIRA ticket with INFRA.

View raw message