Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-26755

Wrong results after renaming Parquet column

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.0.0-alpha-2
    • None
    • HiveServer2, Parquet
    • None

    Description

      Renaming the column of a Parquet table leads to wrong results when the query uses the renamed column.

      create table person (id int, fname string, lname string, age int) stored as parquet;
      
      insert into person values (1, 'Victor', 'Hugo', 23);
      insert into person values (2, 'Alex', 'Dumas', 38);
      insert into person values (3, 'Marco', 'Pollo', 25);
      
      select fname from person where age >=25;
      
      Correct results
      Alex
      Marco
      alter table person change column age years_from_birth int;
      select fname from person where years_from_birth >=25;
      

      After renaming the column the query above returns an empty result set.

      select years_from_birth from person;
      
      Wrong results
      NULL
      NULL
      NULL

      After renaming the column the query returns the correct number of rows but all filled with nulls.

      The problem is reproducible on current master (commit ae0cabffeaf284a6d2ec13a6993c87770818fbb9).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              zabetak Stamatis Zampetakis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: