Reply
Highlighted
Explorer
Posts: 23
Registered: ‎09-25-2016
Accepted Solution

View statement removes ignore nulls statement ?

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(
  select request_id,
        date_time,
        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

Cloudera Employee
Posts: 19
Registered: ‎02-20-2015

Re: View statement removes ignore nulls statement ?

This is a known bug [1] fixed in the upcoming 2.10.0 release.

 

[1] https://issues.apache.org/jira/browse/IMPALA-5657

Announcements