Apache spark apachesql中的交叉应用等价
我使用下面的SQL server查询来验证SQL记录并显示不适当的记录Apache spark apachesql中的交叉应用等价,apache-spark,apache-spark-sql,Apache Spark,Apache Spark Sql,我使用下面的SQL server查询来验证SQL记录并显示不适当的记录 select t.*, x.* from sallutest t cross apply (values (1, case when t.age = 25 then 'Age is 25' end), (2, case when t.age > 29 then 'Age is not in 20s' end), (3, case when t.department <
select t.*, x.*
from sallutest t
cross apply (values
(1, case when t.age = 25 then 'Age is 25' end),
(2, case when t.age > 29 then 'Age is not in 20s' end),
(3, case when t.department <> 'IT' then 'Dept not IT' end)
) x(FailedValidationId, FailedValidation)
where x.FailedValidation is not null
选择t.*x*
来自萨卢斯特t
交叉应用(值)
(1,当t.age=25时,则“age为25”结束),
(2,当t.age>29时,则“年龄不在20秒”结束),
(3,当t.部门“IT”和“部门非IT”结束时的情况)
)x(FailedValidationId,FailedValidation)
其中x.FailedValidation不为null
但是,此查询在Apache SQL中失败
我哪里出错了?您在spark中启用了它吗?我刚刚检查了配置。它未启用。如果启用,它应该可以工作;)启用后,它显示“应用”错误处的“缺少“连接”Cross apply在spark sql中似乎不可用