You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Pengcheng Xiong (JIRA)" <ji...@apache.org> on 2017/06/02 01:21:04 UTC
[jira] [Commented] (HIVE-15758) Allow correlated scalar subqueries
with aggregates which has non-equi join predicates
[ https://issues.apache.org/jira/browse/HIVE-15758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16033999#comment-16033999 ]
Pengcheng Xiong commented on HIVE-15758:
----------------------------------------
[~vgarg] and [~ashutoshc], could u talk a little bit more about this? I could not understand why "when there is zero row, we can not rewrite the query. " In the example that you gave, it will always return one row for the inner query, right?
> 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)