Hi, 

I guess the following confirms that Spark does bot support sub-queries 

val d = HiveContext.table("test.dummy") 

d.registerTempTable("tmp") 

HiveContext.sql("select * from tmp where id IN (select max(id) from
tmp)") 

It crashes 

The SQL works OK in Hive itself on the underlying table! 

select * from dummy where id IN (select max(id) from dummy); 

Thanks 

-- 

Dr Mich Talebzadeh

LinkedIn
https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw

http://talebzadehmich.wordpress.com

NOTE: The information in this email is proprietary and confidential.
This message is for the designated recipient only, if you are not the
intended recipient, you should destroy it immediately. Any information
in this message shall not be understood as given or endorsed by Cloud
Technology Partners Ltd, its subsidiaries or their employees, unless
expressly so stated. It is the responsibility of the recipient to ensure
that this email is virus free, therefore neither Cloud Technology
partners Ltd, its subsidiaries nor their employees accept any
responsibility.

 

Reply via email to