Stamatis Zampetakis created HIVE-26755:
------------------------------------------

             Summary: Wrong results after renaming Parquet column
                 Key: HIVE-26755
                 URL: https://issues.apache.org/jira/browse/HIVE-26755
             Project: Hive
          Issue Type: Bug
          Components: HiveServer2, Parquet
    Affects Versions: 4.0.0-alpha-2
            Reporter: Stamatis Zampetakis


Renaming the column of a Parquet table leads to wrong results when the query 
uses the renamed column.
{code:sql}
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;
{code}
||Correct results||
|Alex|
|Marco|
{code:sql}
alter table person change column age years_from_birth int;
select fname from person where years_from_birth >=25;
{code}
After renaming the column the query above returns an empty result set.
{code:sql}
select years_from_birth from person;
{code}
||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).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to