spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Pfeiffer <...@preferred.jp>
Subject Re: type issue: found RDD[T] expected RDD[A]
Date Wed, 20 Aug 2014 01:43:01 GMT
Hi,

On Tue, Aug 19, 2014 at 7:01 PM, Patrick McGloin <mcgloin.patrick@gmail.com>
wrote:
>
> I think the type of the data contained in your RDD needs to be a known
> case class and not abstract for createSchemaRDD.  This makes sense when
> you think it needs to know about the fields in the object to create the
> schema.
>

Exactly this. The actual message pointing to that is:

    "inferred type arguments [T] do not conform to method createSchemaRDD's
type parameter bounds [A <: Product]"

All case classes are automatically subclasses of Product, but otherwise you
will have to extend Product and add the required methods yourself.

Tobias

Mime
View raw message