Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

View statement removes ignore nulls statement ?

avatar
Contributor

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

1 ACCEPTED SOLUTION

avatar
Contributor

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

 

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

View solution in original post

1 REPLY 1

avatar
Contributor

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

 

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