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

Maryann Xue commented on CALCITE-1268:
--------------------------------------

Hi [~julianhyde], I have some WIP commits on 
https://github.com/maryannxue/calcite/tree/calcite-1268, which still has 1 test 
failure:
HepPlannerTest.testRuleClass().
Found out that there had already been a CoerceInputsRule that did exactly the 
same thing we talk about here. Shall we remove this rule at all and make this 
test use another rule?
Another question is:
I had to make some changes in RelOptRuleTest.testReduceConstantsCalc() in order 
for it to pass. And I realized that coercing the inputs of a SetOp actually 
changed the semantics for this case. {{select 'TABLE'}} would in fact be 
{{select 'TABLE        '}} since it appears under this Union rel. Still I think 
this is OK, and probably right. What do you think, Julian?

> Union should apply explicit Project over its children if they have different 
> but coercible types
> ------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-1268
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1268
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.7.0
>            Reporter: Maryann Xue
>            Assignee: Maryann Xue
>
> Test case in SqlToRelConverterTest:
> {code}
>   @Test public void testUnionExprTypes() {
>     check(
>         "select empno, sal from emp "
>             + "union all "
>             + "select deptno, deptno from dept",
>         "${plan}");
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to