You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@impala.apache.org by Maurin Lenglart <ma...@getlore.io> on 2017/05/25 23:50:27 UTC
Smarter views
Hi,
I am working on some big data related technology.
And I am trying to get a sense on how hard will it be to enhance the views
in impala so whenever someone query a view, not all the columns of that
view are computed but only the necessary columns for that particular query.
A simple exemple will be:
create view test_view_a as
select coalesce(col1,col2) as testCol1, col3 from physical_table1
Then if I do a query like this:
select col3 from test_view_a;
The coalesce for testCol1 should not occur because not being used.
thanks
Re: Smarter views
Posted by Alexander Behm <al...@cloudera.com>.
Hi Maurin,
if I understand our correctly, then Impala already works the way you want
it to.
In your example, col1 and col2 will not be materialized and the coalesce()
function will not be executed at all.
Are you running into a specific issue with views that you want to fix?
Maybe I'm misunderstanding.
Alex
On Thu, May 25, 2017 at 4:50 PM, Maurin Lenglart <ma...@getlore.io> wrote:
> Hi,
> I am working on some big data related technology.
> And I am trying to get a sense on how hard will it be to enhance the views
> in impala so whenever someone query a view, not all the columns of that
> view are computed but only the necessary columns for that particular query.
>
> A simple exemple will be:
> create view test_view_a as
> select coalesce(col1,col2) as testCol1, col3 from physical_table1
>
> Then if I do a query like this:
> select col3 from test_view_a;
> The coalesce for testCol1 should not occur because not being used.
>
> thanks
>