It appeas that certain SQL on Spark temporary tables do not support Hive SQL even when they are using HiveContext
example scala> HiveContext.sql("select count(1) from tmp where ID in (select max(id) from tmp)") org.apache.spark.sql.AnalysisException: Unsupported language features in query: select count(1) from tmp where ID in (select max(id) from tmp) that tmp table is from d.registerTempTable("tmp") The same Query in Hive on the same underlying table works fine. Dr Mich Talebzadeh LinkedIn * https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw <https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>* http://talebzadehmich.wordpress.com