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

Allow implicit casts from numerics to STRING when inserting into table

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

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Frontend

      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

            • Assignee:
              Unassigned
              Reporter:
              tarmstrong Tim Armstrong

              Dates

              • Created:
                Updated:

                Issue deployment