Hi

I am in the process of migrating some logic in pig scripts to Spark-SQL. As
part of this process, I am creating a few "Select...Group By" query and
registering them as tables using the SchemaRDD.registerAsTable feature.
When using such a registered table in a subsequent "Select...Group By"
query, I get a "ClassCastException".
java.lang.ClassCastException: java.lang.String cannot be cast to
java.lang.Integer

This happens when I use the "Sum" function on one of the columns. Is there
anyway to specify the data type for the columns when the registerAsTable
function is called? Are there other approaches that I should be looking at?

Thanks for your help.



- Ranga

Reply via email to