Impala appears to change my view definition without any warning. This results in different results if I run query vs view. Is this a bug ? It's creating lot of problems for us; Is there any workaround ?
create view test1 as select * from(
first_value(created_user ignore nulls) over (partition by request_id order by date_time desc rows between unbounded preceding and unbounded following) as created_user,
row_number() over (partition by request_id order by date_time desc) as rn from dwh.event_update
) t where rn=1
Run create show create view and it's missing 'ignore nulls' statements.
Query: show create view test1
CREATE VIEW dwh.test1 AS SELECT * FROM (SELECT request_id, date_time, first_value(created_user) OVER (PARTITION BY request_id ORDER BY date_time DESC ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) created_user, row_number() OVER (PARTITION BY request_id ORDER BY date_time DESC) rn FROM dwh.event_update) t WHERE rn = 1