[ https://issues.apache.org/jira/browse/HIVE-15758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16035672#comment-16035672 ]
Ashutosh Chauhan commented on HIVE-15758: ----------------------------------------- Classic paper in this area is : https://pdfs.semanticscholar.org/0bfa/e505ad588d00d4b204acf8ba4b5646eac244.pdf You may verify if your rewrite is consistent with it. > Allow correlated scalar subqueries with aggregates which has non-equi join > predicates > ------------------------------------------------------------------------------------- > > Key: HIVE-15758 > URL: https://issues.apache.org/jira/browse/HIVE-15758 > Project: Hive > Issue Type: Sub-task > Components: Logical Optimizer > Reporter: Vineet Garg > Assignee: Vineet Garg > Labels: sub-query > > Queries such as > {code} select * from part where p_size <> (select count(p_size) from part pp > where part.p_type <> pp.p_type); {code} are currently not allowed since HIVE > doesn't know how to rewrite such queries to preserve the correctness for > cases when there is zero row -- This message was sent by Atlassian JIRA (v6.3.15#6346)