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

Missing implicit casts between char/varchar/string.

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: Impala 2.0, Impala 2.2, Impala 2.3.0
    • Fix Version/s: None
    • Component/s: Frontend

      Description

      The following scenario needs to work:

      create table vc (v varchar(10));
      insert into vc select 'a';
      ERROR: AnalysisException: Possible loss of precision for target table 'default.vc'.
      Expression ''a'' (type: STRING) would need to be cast to VARCHAR(10) for column 'v'
      

      Workaround
      Use explicit casts.

      Query: insert into vc select cast('a' as varchar(10))
      Inserted 1 row(s) in 0.32s
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                lskuff Lenni Kuff
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated: