Github user aarondav commented on the pull request:
https://github.com/apache/incubator-spark/pull/600#issuecomment-35207151
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
[email protected] or file a JIRA ticket with INFRA.