Just a guess but are you using HiveContext in one case vs SqlContext inanother? 
You dont show a stacktrace but this looks like parser error...Which would make 
me guess different  context or different spark versio on the cluster you are 
submitting to...


Sent on the new Sprint Network from my Samsung Galaxy S®4.

<div>-------- Original message --------</div><div>From: kiran mavatoor 
<kirankumar.m...@yahoo.com.INVALID> </div><div>Date:05/20/2015  5:57 AM  
(GMT-05:00) </div><div>To: User <user@spark.apache.org> </div><div>Subject: 
LATERAL VIEW explode issue </div><div>
</div>Hi,

When I use "LATERAL VIEW explode" on the registered temp table in spark shell, 
it works.  But when I use the same in spark-submit (as jar file) it is not 
working. its giving error -  "failure: ``union'' expected but identifier VIEW 
found"

sql statement i am using is

SELECT id,mapKey FROM locations LATERAL VIEW 
explode(map_keys(jsonStringToMapUdf(countries))) countries AS mapKey

I registered "jsonStringToMapUdf" as my sql function.

Thanks
Kiran
9008099770 
 

Reply via email to