Steve Carlin created HIVE-24926:
-----------------------------------
Summary: Correlated fields not detected if subquery has where and
group clauses.
Key: HIVE-24926
URL: https://issues.apache.org/jira/browse/HIVE-24926
Project: Hive
Issue Type: Bug
Components: HiveServer2
Reporter: Steve Carlin
The following query is failing to compile:
{code:java}
SELECT id
FROM alltypestiny t1
WHERE EXISTS
(SELECT 1
FROM alltypestiny t2
WHERE t1.id = t2.id
GROUP BY t2.id
HAVING count(1) = 1);
{code}
The reason it fails is because there is a group by clause and because t1.id is
used in the where clause.
The failure can be traced to code within HiveFilter.traverseFilter, which
doesn't find the filter because it returns when it sees the HiveAggregate.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)