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

Cannot compare char to varchar

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • Impala 4.0.0
    • None
    • Frontend
    • None
    • ghx-label-3

    Description

      Running

      create table varchar_1 (s varchar(1));
      create table char_1 (c char(1));
      insert into varchar_1 values (cast('a' as varchar(1)));
      insert into char_1 values (cast('a' as char(1)));
      select * from varchar_1 vc, char_1 ch where vc.s=ch.c;
      

      results in

      ERROR: SqlCastException: targetType=VARCHAR(*) type=VARCHAR(10)
      

      Other SQL implementations allow this, and the comparison semantics seem clear.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              MikaelSmith Michael Smith
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: