You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "TisNotT (Jira)" <ji...@apache.org> on 2019/10/31 06:37:00 UTC

[jira] [Commented] (CALCITE-3461) SqlToRelConverter substituteSubQuery problem

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

TisNotT commented on CALCITE-3461:
----------------------------------

I commit again,but the pr is not open. I donnot know why.I think fix this bug need change not a little codes. I fix like my method in my product code firstly. Bzc,it can help fix in some scenes.And we are usually use sql from screen to query,relNode to sql not often.

> SqlToRelConverter substituteSubQuery problem
> --------------------------------------------
>
>                 Key: CALCITE-3461
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3461
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: TisNotT
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
>   final String sql = "select \n" + "  case \n"
>         + "      when deptno in (1)   then '1'\n"
>         + "when deptno in (220)  then '220' \n"
>         + "else null end as deptno,\n"
>         + "name,\n"
>         + "count(distinct name)as num\n"
>         + "from dept\n" + "\n"
>         + "where \n"
>         + "deptno in(1)\n"
>         + "        group by name,deptno ";
> Sql like that ,SqlToRelConverter cannot convert from sql to node.
> Bzc,substituteSubQuery handle wrong.



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