[
https://issues.apache.org/jira/browse/CALCITE-716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14533407#comment-14533407
]
Julian Hyde commented on CALCITE-716:
-------------------------------------
[~seanhychu] Can you investigate this? I would like to know ASAP whether this
worked before your patch for CALCITE-694. I want to know whether we should back
out your patch.
If you can fix this before 1.3 (we plan to stabilize tomorrow, freeze in a few
days) that would be even better.
> HAVING clause with subquery hits AssertionError
> -----------------------------------------------
>
> Key: CALCITE-716
> URL: https://issues.apache.org/jira/browse/CALCITE-716
> Project: Calcite
> Issue Type: Bug
> Affects Versions: 1.3.0-incubating
> Reporter: Aman Sinha
> Assignee: Julian Hyde
> Fix For: next
>
>
> This may be a regression caused by CALCITE-694. Following query hits an
> AssertionError:
> {code}
> SELECT emp.deptno FROM emp group by emp.deptno having max(emp.empno) >
> (select min(emp.empno) from emp);
> {code}
> Stack trace:
> {code}
> java.lang.AssertionError: null
> at
> org.apache.calcite.sql2rel.RelStructuredTypeFlattener.getNewForOldInput(RelStructuredTypeFlattener.java:291)
> at
> org.apache.calcite.sql2rel.RelStructuredTypeFlattener$RewriteRexShuttle.visitInputRef(RelStructuredTypeFlattener.java:725)
> at
> org.apache.calcite.sql2rel.RelStructuredTypeFlattener$RewriteRexShuttle.visitInputRef(RelStructuredTypeFlattener.java:722)
> at org.apache.calcite.rex.RexInputRef.accept(RexInputRef.java:112)
> at org.apache.calcite.rex.RexShuttle.visitList(RexShuttle.java:134)
> at org.apache.calcite.rex.RexShuttle.visitCall(RexShuttle.java:83)
> at
> org.apache.calcite.sql2rel.RelStructuredTypeFlattener$RewriteRexShuttle.visitCall(RelStructuredTypeFlattener.java:795)
> at
> org.apache.calcite.sql2rel.RelStructuredTypeFlattener$RewriteRexShuttle.visitCall(RelStructuredTypeFlattener.java:722)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)