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

suibianwanwan commented on CALCITE-6651:
----------------------------------------

[~nobigo] I've updated it. The problem previously mentioned by JIRA has been 
fixed in CALCITE-6350

> Use RelBuilder in SqlToRelConverter to construct Union
> ------------------------------------------------------
>
>                 Key: CALCITE-6651
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6651
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: suibianwanwan
>            Assignee: suibianwanwan
>            Priority: Major
>              Labels: pull-request-available
>
> In RelToSqlConverter, some unions are created using LogicalUnion.create() and 
> some are relBuilder.union(). In RelBuilder.union we configure simplifyValues 
> to control whether or not the {_}Union(Project(Values))} to{_}{*}_{@code_{*} 
> _Values}._
> {code:java}
> /** Whether to simplify {@code Union(Values, Values)} or
>  * {@code Union(Project(Values))} to {@code Values}; default true. */
> @Value.Default default boolean simplifyValues() {
>   return true;
> }{code}
> This will cause the configuration to not take effect where 
> LogicalUnion.create() is called.
> For example:
> {code:java}
> select * from (select 'word' i union all select 'w' i) 
> {code}
> Result:
> {code:java}
> LogicalUnion(all=[true])
>    LogicalValues(tuples=[[{ 'word' }]])
>    LogicalValues(tuples=[[{ 'w   ' }]])
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to