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

Impala does not return NULL for case where table has extra string column and data does not (it returns an empty string)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 1.1
    • Impala 1.1.1
    • None
    • None

    Description

      Impala does not return NULL for case where table has extra string column and data does not (it returns an empty string).

      Repro:

      use functional;
      create external table jointbl_test like jointbl;
      alter table jointbl_test set location '/test-warehouse/jointbl';
      select * from jointbl_test;
      alter table jointbl_test add columns(s string);
      +---------+-----------+----------+-------------+---+
      | test_id | test_name | test_zip | alltypes_id | s |
      +---------+-----------+----------+-------------+---+
      | 1001    | Name1     | 94611    | 5000        |   |
      | 1002    | Name2     | 94611    | 5000        |   |
      | 1003    | Name3     | 94611    | 5000        |   |
      +---------+-----------+----------+-------------+---+
      
      -- Change to an INT col, result is NULL
      alter table jointbl_test replace columns(s i int);
      
      +---------+-----------+----------+-------------+------+
      | test_id | test_name | test_zip | alltypes_id | i    |
      +---------+-----------+----------+-------------+------+
      | 1001    | Name1     | 94611    | 5000        | NULL |
      | 1002    | Name2     | 94611    | 5000        | NULL |
      | 1003    | Name3     | 94611    | 5000        | NULL |
      +---------+-----------+----------+-------------+------+
      
      

      Attachments

        Activity

          People

            skye Skye Wanderman-Milne
            lskuff Lenni Kuff
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: