>     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