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

Tuomas Kiviaho commented on CALCITE-6350:
-----------------------------------------



Here's the plan from the query which might explain things a bit. 

{code}
EnumerableCalc(expr#0=[{inputs}], expr#1=['w   '], expr#2=[=($t0, $t1)], 
i=[$t0], $condition=[$t2])
  EnumerableUnion(all=[true])
    EnumerableValues(tuples=[[{ 'word' }]])
    EnumerableValues(tuples=[[{ 'w' }]])
{code}

> Unexpected result from UNION with literals expression
> -----------------------------------------------------
>
>                 Key: CALCITE-6350
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6350
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.36.0
>            Reporter: Evgeny Stanilovsky
>            Priority: Major
>
> Near expression need to return 'w' but empty result found.
> {noformat}
> select * from (select 'word' i union all select 'w' i) t1 where i='w'
> {noformat}



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

Reply via email to