[jira] [Commented] (CALCITE-1849) Support sub-queries (RexSubQuery) in RelToSqlConverter

2017-08-07 Thread Zhiqiang He (JIRA)

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

Zhiqiang He commented on CALCITE-1849:
--

[~julianhyde] if expression is already changed to assert. please reivew it. 
thanks.

> 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)


[jira] [Commented] (CALCITE-1849) Support sub-queries (RexSubQuery) in RelToSqlConverter

2017-08-06 Thread Julian Hyde (JIRA)

[ 
https://issues.apache.org/jira/browse/CALCITE-1849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)


[jira] [Commented] (CALCITE-1849) Support sub-queries (RexSubQuery) in RelToSqlConverter

2017-08-06 Thread Zhiqiang He (JIRA)

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

Zhiqiang He commented on CALCITE-1849:
--

I'm already add instance for RexSubQuery and RexCall.
but the rexnode of exists and scalar_query is always RexSubQuery . and the 
rexnode of NOT expression is always RexCall instance.
so I can not test for the else branch. they will in default branch of 
switch-case expression.

> 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)