[
https://issues.apache.org/jira/browse/CALCITE-1199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15261143#comment-15261143
]
Julian Hyde commented on CALCITE-1199:
--------------------------------------
[~jcamachorodriguez], I reviewed and added some tests. I concluded that your
changes are OK, but we should be padding when converting to CHAR. You can see
the tests and fixes in my branch
https://github.com/julianhyde/calcite/tree/1199-padding. Can you review, and if
it looks OK rebase, squash my commit into yours and push.
> Incorrect trimming of CHAR when performing cast to VARCHAR
> ----------------------------------------------------------
>
> Key: CALCITE-1199
> URL: https://issues.apache.org/jira/browse/CALCITE-1199
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: Jesus Camacho Rodriguez
> Assignee: Jesus Camacho Rodriguez
>
> Assume the value ' ' with type CHAR(1) that needs to be cast to VARCHAR(10).
> The method {{makeCast}} (line 488 in RexBuilder.java) trims spaces on the
> right hand side of the CHAR value, but this seems incorrect as it could lead
> to incorrect results.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)