You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by premdass <pr...@yahoo.co.in> on 2014/06/14 14:03:48 UTC
SparkSQL registerAsTable - No TypeTag available Error
Hi,
I am trying to run the spark sql example provided on the example
https://spark.apache.org/docs/latest/sql-programming-guide.html as a
standalone program.
When i try to run the compile the program, i am getting the below error
Done updating.
Compiling 1 Scala source to
C:\Work\Dev\scala\workspace\SmartDataSBT\smartdata\target\scala-2.10\classes...
]
C:\Work\Dev\scala\workspace\SmartDataSBT\smartdata\src\main\scala\com\test\WordCount.scala:21:
No TypeTag available for Person
] people.registerAsTable("people")
] ^
] one error found
] (smartdata/compile:compile) Compilation failed
] Total time: 3 s, completed 14-Jun-2014 12:49:41
Since i am just running the example provided, i am not sure what is the
mistake i made. Any advice would be appreciated.
Thanks,
Prem
--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/SparkSQL-registerAsTable-No-TypeTag-available-Error-tp7623.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.
Re: SparkSQL registerAsTable - No TypeTag available Error
Posted by premdass <pr...@yahoo.co.in>.
Michael,
Thanks for the response. Yes, Moving the Case class solved the issue.
Thanks,
Prem
--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/SparkSQL-registerAsTable-No-TypeTag-available-Error-tp7623p9183.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.
Re: SparkSQL registerAsTable - No TypeTag available Error
Posted by Michael Armbrust <mi...@databricks.com>.
Actually, are you defining Person as an inner class?
You might be running into this:
http://stackoverflow.com/questions/18866866/why-there-is-no-typetag-available-in-nested-instantiations-when-interpreted-by
On Sat, Jun 14, 2014 at 1:51 PM, Michael Armbrust <mi...@databricks.com>
wrote:
> Can you maybe attach the full scala file?
>
>
> On Sat, Jun 14, 2014 at 5:03 AM, premdass <pr...@yahoo.co.in> wrote:
>
>> Hi,
>>
>> I am trying to run the spark sql example provided on the example
>> https://spark.apache.org/docs/latest/sql-programming-guide.html as a
>> standalone program.
>>
>> When i try to run the compile the program, i am getting the below error
>>
>> Done updating.
>> Compiling 1 Scala source to
>>
>> C:\Work\Dev\scala\workspace\SmartDataSBT\smartdata\target\scala-2.10\classes...
>> ]
>>
>> C:\Work\Dev\scala\workspace\SmartDataSBT\smartdata\src\main\scala\com\test\WordCount.scala:21:
>> No TypeTag available for Person
>> ] people.registerAsTable("people")
>> ] ^
>> ] one error found
>> ] (smartdata/compile:compile) Compilation failed
>> ] Total time: 3 s, completed 14-Jun-2014 12:49:41
>>
>>
>>
>> Since i am just running the example provided, i am not sure what is the
>> mistake i made. Any advice would be appreciated.
>>
>> Thanks,
>> Prem
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-spark-user-list.1001560.n3.nabble.com/SparkSQL-registerAsTable-No-TypeTag-available-Error-tp7623.html
>> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>>
>
>
Re: SparkSQL registerAsTable - No TypeTag available Error
Posted by Michael Armbrust <mi...@databricks.com>.
Can you maybe attach the full scala file?
On Sat, Jun 14, 2014 at 5:03 AM, premdass <pr...@yahoo.co.in> wrote:
> Hi,
>
> I am trying to run the spark sql example provided on the example
> https://spark.apache.org/docs/latest/sql-programming-guide.html as a
> standalone program.
>
> When i try to run the compile the program, i am getting the below error
>
> Done updating.
> Compiling 1 Scala source to
>
> C:\Work\Dev\scala\workspace\SmartDataSBT\smartdata\target\scala-2.10\classes...
> ]
>
> C:\Work\Dev\scala\workspace\SmartDataSBT\smartdata\src\main\scala\com\test\WordCount.scala:21:
> No TypeTag available for Person
> ] people.registerAsTable("people")
> ] ^
> ] one error found
> ] (smartdata/compile:compile) Compilation failed
> ] Total time: 3 s, completed 14-Jun-2014 12:49:41
>
>
>
> Since i am just running the example provided, i am not sure what is the
> mistake i made. Any advice would be appreciated.
>
> Thanks,
> Prem
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/SparkSQL-registerAsTable-No-TypeTag-available-Error-tp7623.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>