Thanks a lot for replying, Gopal.

Based on the explanation in the ticket, I am expecting it to not skip
running jobs for the inner queries which has limit / always false where
conditions.
As suggested, I will try it out on a standard schema like tpc-ds so that
its easier to re-produce.

Yes we are using CTAS as of now. And in certain cases, union also is part
of the query.

The view approach seems promising and logical for the use case, will try
that and get back regarding that.

Thanks again.


Regards,
Abhilash

On Sat, Aug 20, 2016 at 3:38 AM, Gopal Vijayaraghavan <gop...@apache.org>
wrote:

>
> >     CREATE TABLE T .....  AS
>
> The limit clause in the outermost query should prevent the entire query
> from executing.
>
> However, the CREATE TABLE expression and the UNION ALL are rather
> challenging in this matter.
>
> If you have queries which don't hit the NULL-scan fully, a BUG report
> would be helpful, provided you have a chopped down scenario of the problem
> (ideally on TPC-DS or TPC-H schemas).
>
> If it's broken, it can be fixed, but not without a bug report.
>
> >     To extract the types for the create table, we just added LIMIT 0
> >assuming it would skip running MR/Tez jobs and return fast.
> ...
> >     Is there any workaround which works when execution engine is either
> >mr or tez.
>
>
> Before the limit-0 optimization, I used "CREATE VIEW" for this.
>
> VIEWS do everything but run the query - I'd really like a "CREATE
> TEMPORARY VIEW", but that's just to avoid leaving junk behind.
>
> Cheers,
> Gopal
>
>
>

Reply via email to