我不是SQL专家,所以我试图理解为什么两个查询的执行时间有很大的不同。select distinct cs.basesalary_idLEFT JOIN basesalary AS b ON b.id= cs.basesalary_id
WHERE (b.employee_id= 100 AND cs
我用foreach尝试了同样的查询,它正确地显示了结果,但如果我使用show或在sql中,这很奇怪,它没有显示任何内容。sqlContext.sql("select distinct device from TestTable1 where id = 23233").collect.foreach(println)"select distinct device from TestTable1 where id = 23233").show()
%sql</