spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikhil Goyal <nownik...@gmail.com>
Subject Class cast exception while using Data Frames
Date Mon, 26 Mar 2018 20:39:21 GMT
Hi guys,

I have a Map[(String, String), Double] as one of my columns. Using

input.getAs[Map[(String, String), Double]](0)

 throws exception: Caused by: java.lang.ClassCastException:
org.apache.spark.sql.catalyst.expressions.GenericRowWithSchema cannot
be cast to scala.Tuple2

Even the schema says that key is of type struct of (string, string).

Any idea why this is happening?


Thanks

Nikhil

Mime
View raw message