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

Type errors are attributed to wrong expression with insert

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • Impala 1.3
    • Impala 3.3.0
    • Frontend
    • None

    Description

      The type error below belongs to the second row to be inserted (sqrt() returns DOUBLE). But the obviously FLOAT first expression gets blamed for the error.

      [localhost:21000] > insert overwrite alltypesnopart_insert(float_col) values(CAST(1.0 AS FLOAT)), (sqrt(-1));
      Query: insert overwrite alltypesnopart_insert(float_col) values(CAST(1.0 AS FLOAT)), (sqrt(-1))
      ERROR: AnalysisException: Possible loss of precision for target table 'functional.alltypesnopart_insert'.
      Expression 'cast(1.0 as float)' (type: DOUBLE) would need to be cast to FLOAT for column 'float_col'
      

      Attachments

        Activity

          People

            afan Alice Fan
            henryr Henry Robinson
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: