Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1199

Incorrect trimming of CHAR when performing cast to VARCHAR

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.0
    • Component/s: core
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julianhyde Julian Hyde
                Reporter:
                jcamachorodriguez Jesus Camacho Rodriguez
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: