Re: Hive on Tez CTAS query breaks

2016-11-12 Thread Premal Shah
Sergey and Gopal, Tried it will the alias. Still breaks. CREATE TABLE unique_ip_tmp AS SELECT DISTINCT new.ip FROM ( SELECT COUNT(0) as count , ip as ip FROM t1 WHERE dt BETWEEN '2016-11-08' AND '2016-11-08' GROUP BY ip UNION

Re: Hive on Tez CTAS query breaks

2016-11-11 Thread Gopal Vijayaraghavan
> Thanx for the suggestion. It works with the setting you suggested. > > What does this mean? Do I need to special case this query. You need to report a bug on https://issues.apache.org/jira/browse/HIVE Because, this needs to get fixed. > Turning off CBO cluster-wide won't be the right thing to

Re: Hive on Tez CTAS query breaks

2016-11-10 Thread Sergey Shelukhin
"user@hive.apache.org<mailto:user@hive.apache.org>" mailto:user@hive.apache.org>> Date: Wednesday, November 9, 2016 at 23:16 To: "user@hive.apache.org<mailto:user@hive.apache.org>" mailto:user@hive.apache.org>> Subject: Re: Hive on Tez CTAS query breaks

Re: Hive on Tez CTAS query breaks

2016-11-09 Thread Premal Shah
Hi Gopal, Thanx for the suggestion. It works with the setting you suggested. What does this mean? Do I need to special case this query. Also, I am trying different things to see what is breaking. Looks like I have a UNION ALL and both sides have a query with a GROUP BY. This breaks. CREATE TABL

Re: Hive on Tez CTAS query breaks

2016-11-09 Thread Gopal Vijayaraghavan
> If I run a query with CREATE TABLE AS, it breaks with the error below. > However, just running the query works if I don't try to create a table from > the results. It does not happen to all CTAS queries.  Not sure if that's related to Tez at all. Can try running it with set hive.cbo.enable

Hive on Tez CTAS query breaks

2016-11-09 Thread Premal Shah
Hi, If I run a query with CREATE TABLE AS, it breaks with the error below. However, just running the query works if I don't try to create a table from the results. It does not happen to all CTAS queries. 2016-11-10T04:52:27,531 ERROR [cb5f35ff-f404-41ce-aa9b-87708d80b078 main]: ql.Driver (Session