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

Julian Hyde commented on CALCITE-1849:
--------------------------------------

If you think that {{rex instanceof RexSubQuery}} is always true -- or can't 
write a test where it's false -- how about changing {{if (rex instanceof 
RexSubQuery)}} to {{assert rex instanceof RexSubQuery}}?

I don't like code that is trying to handle an event that will never happen. By 
definition it is never tested.

> Support sub-queries (RexSubQuery) in RelToSqlConverter
> ------------------------------------------------------
>
>                 Key: CALCITE-1849
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1849
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.12.0
>            Reporter: Zhiqiang He
>            Assignee: Zhiqiang He
>
> RelToSqlConverter does not currently support sub-queries (RexSubQuery), but 
> it should.
> SqlToRelConverter, in the default configuration, converts sub-queries into 
> Join clause. But when SqlToRelConverter.Config.expand = false, it does not 
> convert them to Join. And that causes problems because RelToSqlConverter 
> cannot handle them.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to