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

Allow implicit casts between numeric and string types when inserting into table

    XMLWordPrintableJSON

Details

    Description

      Impala is somewhat stricter than other engines such as Hive when it comes into implicit casts. This avoids a lot of ambiguity and edge cases with complex SQL, but we could consider loosening it for simple cases like inserting into a table where the meaning/intent is pretty straightforward.

      Repro

      CREATE TABLE iobt (   c0 FLOAT ) ;
      INSERT INTO iobt(c0) VALUES ('0'), (1562998803);
      

      Error

      AnalysisException: Incompatible return types 'STRING' and 'INT' of exprs ''0'' and '1562998803'.
      

      Attachments

        Issue Links

          Activity

            People

              prozsa Peter Rozsa
              tarmstrong Tim Armstrong
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: