[jira] [Updated] (HIVE-15721) Allow IN/NOT IN correlated subquery with aggregates

2017-01-26 Thread Lefty Leverenz (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-15721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lefty Leverenz updated HIVE-15721:
--
Labels: TODOC2.2 sub-query  (was: sub-query)

> Allow  IN/NOT IN correlated subquery with aggregates
> 
>
> Key: HIVE-15721
> URL: https://issues.apache.org/jira/browse/HIVE-15721
> Project: Hive
>  Issue Type: Sub-task
>  Components: Query Planning
>Reporter: Vineet Garg
>Assignee: Vineet Garg
>  Labels: TODOC2.2, sub-query
> Fix For: 2.2.0
>
> Attachments: HIVE-15721.1.patch, HIVE-15721.2.patch
>
>
> With HIVE-15544 IN/NOT IN correlated subqueries with aggregates were disabled 
> since re-writting them into JOIN could have produced wrong result.
> Wrong results would occur if subquery produces zero row, since aggregate 
> always produce result lower such query into LEFT JOIN or SEMI JOIN would not 
> take these case into consideration.
> We propose to allow such queries with an added run time check which will 
> throw an error/exception if subquery produces zero row.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-15721) Allow IN/NOT IN correlated subquery with aggregates

2017-01-25 Thread Ashutosh Chauhan (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-15721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ashutosh Chauhan updated HIVE-15721:

   Resolution: Fixed
Fix Version/s: 2.2.0
   Status: Resolved  (was: Patch Available)

Pushed to master. Thanks, Vineet!

> Allow  IN/NOT IN correlated subquery with aggregates
> 
>
> Key: HIVE-15721
> URL: https://issues.apache.org/jira/browse/HIVE-15721
> Project: Hive
>  Issue Type: Sub-task
>  Components: Query Planning
>Reporter: Vineet Garg
>Assignee: Vineet Garg
>  Labels: sub-query
> Fix For: 2.2.0
>
> Attachments: HIVE-15721.1.patch, HIVE-15721.2.patch
>
>
> With HIVE-15544 IN/NOT IN correlated subqueries with aggregates were disabled 
> since re-writting them into JOIN could have produced wrong result.
> Wrong results would occur if subquery produces zero row, since aggregate 
> always produce result lower such query into LEFT JOIN or SEMI JOIN would not 
> take these case into consideration.
> We propose to allow such queries with an added run time check which will 
> throw an error/exception if subquery produces zero row.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-15721) Allow IN/NOT IN correlated subquery with aggregates

2017-01-25 Thread Vineet Garg (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-15721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vineet Garg updated HIVE-15721:
---
Status: Patch Available  (was: Open)

> Allow  IN/NOT IN correlated subquery with aggregates
> 
>
> Key: HIVE-15721
> URL: https://issues.apache.org/jira/browse/HIVE-15721
> Project: Hive
>  Issue Type: Sub-task
>  Components: Query Planning
>Reporter: Vineet Garg
>Assignee: Vineet Garg
>  Labels: sub-query
> Attachments: HIVE-15721.1.patch, HIVE-15721.2.patch
>
>
> With HIVE-15544 IN/NOT IN correlated subqueries with aggregates were disabled 
> since re-writting them into JOIN could have produced wrong result.
> Wrong results would occur if subquery produces zero row, since aggregate 
> always produce result lower such query into LEFT JOIN or SEMI JOIN would not 
> take these case into consideration.
> We propose to allow such queries with an added run time check which will 
> throw an error/exception if subquery produces zero row.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-15721) Allow IN/NOT IN correlated subquery with aggregates

2017-01-25 Thread Vineet Garg (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-15721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vineet Garg updated HIVE-15721:
---
Status: Open  (was: Patch Available)

> Allow  IN/NOT IN correlated subquery with aggregates
> 
>
> Key: HIVE-15721
> URL: https://issues.apache.org/jira/browse/HIVE-15721
> Project: Hive
>  Issue Type: Sub-task
>  Components: Query Planning
>Reporter: Vineet Garg
>Assignee: Vineet Garg
>  Labels: sub-query
> Attachments: HIVE-15721.1.patch, HIVE-15721.2.patch
>
>
> With HIVE-15544 IN/NOT IN correlated subqueries with aggregates were disabled 
> since re-writting them into JOIN could have produced wrong result.
> Wrong results would occur if subquery produces zero row, since aggregate 
> always produce result lower such query into LEFT JOIN or SEMI JOIN would not 
> take these case into consideration.
> We propose to allow such queries with an added run time check which will 
> throw an error/exception if subquery produces zero row.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-15721) Allow IN/NOT IN correlated subquery with aggregates

2017-01-25 Thread Vineet Garg (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-15721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vineet Garg updated HIVE-15721:
---
Attachment: HIVE-15721.2.patch

> Allow  IN/NOT IN correlated subquery with aggregates
> 
>
> Key: HIVE-15721
> URL: https://issues.apache.org/jira/browse/HIVE-15721
> Project: Hive
>  Issue Type: Sub-task
>  Components: Query Planning
>Reporter: Vineet Garg
>Assignee: Vineet Garg
>  Labels: sub-query
> Attachments: HIVE-15721.1.patch, HIVE-15721.2.patch
>
>
> With HIVE-15544 IN/NOT IN correlated subqueries with aggregates were disabled 
> since re-writting them into JOIN could have produced wrong result.
> Wrong results would occur if subquery produces zero row, since aggregate 
> always produce result lower such query into LEFT JOIN or SEMI JOIN would not 
> take these case into consideration.
> We propose to allow such queries with an added run time check which will 
> throw an error/exception if subquery produces zero row.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-15721) Allow IN/NOT IN correlated subquery with aggregates

2017-01-24 Thread Vineet Garg (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-15721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vineet Garg updated HIVE-15721:
---
Attachment: HIVE-15721.1.patch

> Allow  IN/NOT IN correlated subquery with aggregates
> 
>
> Key: HIVE-15721
> URL: https://issues.apache.org/jira/browse/HIVE-15721
> Project: Hive
>  Issue Type: Sub-task
>  Components: Query Planning
>Reporter: Vineet Garg
>Assignee: Vineet Garg
>  Labels: sub-query
> Attachments: HIVE-15721.1.patch
>
>
> With HIVE-15544 IN/NOT IN correlated subqueries with aggregates were disabled 
> since re-writting them into JOIN could have produced wrong result.
> Wrong results would occur if subquery produces zero row, since aggregate 
> always produce result lower such query into LEFT JOIN or SEMI JOIN would not 
> take these case into consideration.
> We propose to allow such queries with an added run time check which will 
> throw an error/exception if subquery produces zero row.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-15721) Allow IN/NOT IN correlated subquery with aggregates

2017-01-24 Thread Vineet Garg (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-15721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vineet Garg updated HIVE-15721:
---
Status: Patch Available  (was: Open)

> Allow  IN/NOT IN correlated subquery with aggregates
> 
>
> Key: HIVE-15721
> URL: https://issues.apache.org/jira/browse/HIVE-15721
> Project: Hive
>  Issue Type: Sub-task
>  Components: Query Planning
>Reporter: Vineet Garg
>Assignee: Vineet Garg
>  Labels: sub-query
> Attachments: HIVE-15721.1.patch
>
>
> With HIVE-15544 IN/NOT IN correlated subqueries with aggregates were disabled 
> since re-writting them into JOIN could have produced wrong result.
> Wrong results would occur if subquery produces zero row, since aggregate 
> always produce result lower such query into LEFT JOIN or SEMI JOIN would not 
> take these case into consideration.
> We propose to allow such queries with an added run time check which will 
> throw an error/exception if subquery produces zero row.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-15721) Allow IN/NOT IN correlated subquery with aggregates

2017-01-24 Thread Vineet Garg (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-15721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vineet Garg updated HIVE-15721:
---
Labels: sub-query  (was: )

> Allow  IN/NOT IN correlated subquery with aggregates
> 
>
> Key: HIVE-15721
> URL: https://issues.apache.org/jira/browse/HIVE-15721
> Project: Hive
>  Issue Type: Sub-task
>  Components: Query Planning
>Reporter: Vineet Garg
>Assignee: Vineet Garg
>  Labels: sub-query
>
> With HIVE-15544 IN/NOT IN correlated subqueries with aggregates were disabled 
> since re-writting them into JOIN could have produced wrong result.
> Wrong results would occur if subquery produces zero row, since aggregate 
> always produce result lower such query into LEFT JOIN or SEMI JOIN would not 
> take these case into consideration.
> We propose to allow such queries with an added run time check which will 
> throw an error/exception if subquery produces zero row.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)