[ https://issues.apache.org/jira/browse/CALCITE-1268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15336478#comment-15336478 ]
Julian Hyde commented on CALCITE-1268: -------------------------------------- The problem is with a CHAR(5) and CHAR(7) that temporarily become a CHAR(7) and ultimately become a VARCHAR(7). The CHAR(5) value must not have two trailing spaces added. There is a test case that demonstrates this issue -- you can figure out whether you have the right solution when you hit it! > 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: Julian Hyde > > 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)