Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-10086

SqlCastException when comparing char with varchar

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Frontend
    • Labels:
    • Epic Color:
      ghx-label-10

      Description

      [localhost:21000] default> select 'expected 2',count(*) from ax where cast(t as string) = cast('a         ' as varchar(10));
      +--------------+----------+
      | 'expected 2' | count(*) |
      +--------------+----------+
      | expected 2   | 2        |
      +--------------+----------+
      Fetched 1 row(s) in 0.44s
      [localhost:21000] default> create table chartbl (c char(10));
      +-------------------------+
      | summary                 |
      +-------------------------+
      | Table has been created. |
      +-------------------------+
      Fetched 1 row(s) in 0.23s
      [localhost:21000] default> select * from chartbl where c = cast('test' as varchar(10));
      ERROR: SqlCastException: targetType=VARCHAR(*) type=VARCHAR(10)
      

      Also using the functional dataset:

      [localhost:21000] functional> select * from chars_tiny where cs = vc;
      ERROR: SqlCastException: targetType=VARCHAR(*) type=VARCHAR(5)
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tarmstrong Tim Armstrong

              Dates

              • Created:
                Updated:

                Issue deployment