【发布时间】:2015-11-24 17:18:15
【问题描述】:
我试图在 where 子句中运行多个子查询,但出现以下错误。是否意味着 Hive 不支持它?如果没有,是否有不同的方式来编写下面的查询?
执行 hive 查询时出错:OK FAILED: SemanticException [Error 10249]: Line 14 Unsupported SubQuery Expression 'adh': 仅支持 1 个子查询表达式。
select
first_name,
last_name,
salary,
title,
department
from
employee_t1 emp
where
emp.salary <= 100000
and (
(emp.code in (select comp from history_t2 where code_hist <> 10))
or
(emp.adh in (select comp from sector_t3 where code_hist <> 50))
)
and department = 'Pediatrics';
【问题讨论】:
-
Docs say they are supported。不过,不确定是否有多个。