[ 
https://issues.apache.org/jira/browse/CALCITE-551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14265579#comment-14265579
 ] 

Julian Hyde commented on CALCITE-551:
-------------------------------------

As part of fixing this issue, add back the assert that was removed as part of 
fixing CALCITE-516. The assert was and is valid. I removed it out of 
pragmatism: I'd rather not wait til we have full sub-query support before we 
support scalar IN in aggregate functions.

> Sub-query inside aggregate function
> -----------------------------------
>
>                 Key: CALCITE-551
>                 URL: https://issues.apache.org/jira/browse/CALCITE-551
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>
> Calcite SQL-to-rel translator cannot handle a sub-query inside an aggregate 
> function. An example is SqlToRelConverterTest.testAggCaseInSubquery:
> {code}SELECT SUM(
>   CASE WHEN deptno IN (SELECT deptno FROM dept) THEN 1
>   ELSE 0 END)
> FROM emp{code}
> Similar issue CALCITE-516 involves IN with constant list inside an aggregate 
> function, which is treated similarly to a sub-query but is simpler.



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

Reply via email to