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

Improve error message and add test for creating table with NULL column

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Impala 2.12.0
    • Fix Version/s: Impala 3.2.0
    • Component/s: Frontend
    • Labels:

      Description

      Alan Jackoway reports that the error message was a little confusing here:

      [localhost:21000] default> create table test_null_field as select null as null_field;
      Query: create table test_null_field as select null as null_field
      Query submitted at: 2018-10-08 12:18:40 (Coordinator: http://tarmstrong-box:25000)
      ERROR: AnalysisException: Unsupported type 'null_type' in column 'null_field' of table 'test_null_field'
      CAUSED BY: TableLoadingException: Unsupported type 'null_type' in column 'null_field' of table 'test_null_field'
      

      The error message should be a little clearer about what the problem is (we can't infer the type for a NULL column without a cast) and maybe suggest a solution.

      I grepped the code and it doesn't look like we actually have a targeted test, so we should add the coverage too.

        Attachments

          Activity

            People

            • Assignee:
              fredyw Fredy Wijaya
              Reporter:
              tarmstrong Tim Armstrong
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: