spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evan Chan <velvia.git...@gmail.com>
Subject Re: type issue: found RDD[T] expected RDD[A]
Date Wed, 20 Aug 2014 04:13:50 GMT
That might not be enough.  Reflection is used to determine what the
fields are, thus your class might actually need to have members
corresponding to the fields in the table.

I heard that a more generic method of inputting stuff is coming.

On Tue, Aug 19, 2014 at 6:43 PM, Tobias Pfeiffer <tgp@preferred.jp> wrote:
> 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
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message