You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2019/11/12 18:09:00 UTC

[jira] [Commented] (CALCITE-3456) AssertionError throws for aggregation with same digest IN subqueries in same scope

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

Julian Hyde commented on CALCITE-3456:
--------------------------------------

There's still no description of where the AssertionError was thrown, or call stack. Which component was in error?

> AssertionError throws for aggregation with same digest IN subqueries in same scope
> ----------------------------------------------------------------------------------
>
>                 Key: CALCITE-3456
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3456
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.21.0
>            Reporter: Danny Chen
>            Assignee: Danny Chen
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.22.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Check this sql in SqlToRelConverterTest:
> {code:java}
> @Test public void testAggregateWithCaseWhen() {
>     final String sql = "select\n"
>         + "  CASE WHEN job IN ('810000', '820000') THEN job\n"
>         + "   ELSE 'error'\n"
>         + "  END AS id,\n"
>         + "  count(empno)\n"
>         + "FROM emp\n"
>         + "where job <> '' or job in ('810000', '820000')\n"
>         + "GROUP by deptno, job";
>     sql(sql).ok();
>   }
> {code}
> I tested PostgreSQL 9.6 and MySQL 5.6, this is a valid SQL and they both outputs the right result.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)