Description
Repro:
create table tesnit (a int) partitioned by (p int);
insert into table tesnit partition (p = 1) values (1);
insert into table tesnit partition (p = 2) values (1);
create view test_view partitioned on (p) as select * from tesnit where p =1;
alter view test_view add partition (p = 2);
Error: Error while compiling statement: FAILED: SemanticException [Error 10056]: The query does not reference any valid partition. To run this query, set hive.mapred.mode=nonstrict (state=42000,code=10056)
The error is because hive fail to compile internal query generated for the alter operation:
SELECT * FROM `default.test_view` WHERE (`p` = '2'); caused NPE when
sentry enabled:
The NPE is because of null userName for the newly created Driver object for the query.
The patch fix the issue by adding username information. Also fix the NPE when some user applicate call get partition path information from a view. The NPE like: