Re: Union all with a field 'hard coded'

2015-02-21 Thread Lefty Leverenz
Yay! Thanks Pengcheng. -- Lefty On Sat, Feb 21, 2015 at 6:02 PM, kelphet wrote: > Hi Lefty and Xuefu, > > Thanks for the rigorous discussion. I confirm that this will apply to > UNION (DISTINCT) too according to HIVE-9039. That is to say, It is safe to > remove "ALL". Thanks. > > Best > P

Re: Union all with a field 'hard coded'

2015-02-21 Thread kelphet
Hi Lefty and Xuefu, Thanks for the rigorous discussion. I confirm that this will apply to UNION (DISTINCT) too according to HIVE-9039. That is to say, It is safe to remove "ALL". Thanks. Best Pengcheng On 2/21/15, 4:09 PM, Xuefu Zhang wrote: Tech writing assumes true unless proven fals

Re: Union all with a field 'hard coded'

2015-02-21 Thread Xuefu Zhang
Tech writing assumes true unless proven false. :) On Sat, Feb 21, 2015 at 1:13 PM, Lefty Leverenz wrote: > I haven't tried union distinct, but I assume the same rule applies. >> > > Reasonable assumption, so I'll remove "ALL" and see if anyone contradicts > it. (Tech writing by successive appro

Re: Union all with a field 'hard coded'

2015-02-21 Thread Lefty Leverenz
> > I haven't tried union distinct, but I assume the same rule applies. > Reasonable assumption, so I'll remove "ALL" and see if anyone contradicts it. (Tech writing by successive approximation.) Thanks again. -- Lefty On Sat, Feb 21, 2015 at 6:27 AM, Xuefu Zhang wrote: > I haven't tried uni

Re: Union all with a field 'hard coded'

2015-02-21 Thread Xuefu Zhang
I haven't tried union distinct, but I assume the same rule applies. Thanks for putting it together. It looks good to me. --Xuefu On Fri, Feb 20, 2015 at 11:44 PM, Lefty Leverenz wrote: > Great, thanks Xuefu. So this only applies to UNION ALL, not UNION > DISTINCT? I had wondered about that.

Re: Union all with a field 'hard coded'

2015-02-20 Thread Lefty Leverenz
Great, thanks Xuefu. So this only applies to UNION ALL, not UNION DISTINCT? I had wondered about that. I made the changes and added some subheadings: Union wikidoc -- Column Aliases for UNION ALL

Re: Union all with a field 'hard coded'

2015-02-20 Thread Xuefu Zhang
Hi Lefty, The description seems good to me. I just slightly modified it so that it sounds more "technical", for your consideration. Thanks, Xuefu UNION ALL expected the same schema on both sides of the expression list. As a result, the following query may fail with an error message such as "FAIL

Re: Union all with a field 'hard coded'

2015-02-19 Thread Lefty Leverenz
Xuefu, I've taken a stab at documenting this in the Union wikidoc (near the end). Would you please review it and make any necessary corrections or additions? Thanks. -- Lefty On Mon, Feb 2, 2015 at 2:02 PM, DU DU wrote: >

Re: Union all with a field 'hard coded'

2015-02-02 Thread DU DU
This is a part of standard SQL syntax, isn't it? On Mon, Feb 2, 2015 at 2:22 PM, Xuefu Zhang wrote: > Yes, I think it would be great if this can be documented. > > --Xuefu > > On Sun, Feb 1, 2015 at 6:34 PM, Lefty Leverenz > wrote: > >> Xuefu, should this be documented in the Union wikidoc >> <

Re: Union all with a field 'hard coded'

2015-02-02 Thread Xuefu Zhang
Yes, I think it would be great if this can be documented. --Xuefu On Sun, Feb 1, 2015 at 6:34 PM, Lefty Leverenz wrote: > Xuefu, should this be documented in the Union wikidoc > ? > > Is it relevant for other query clauses?

Re: Union all with a field 'hard coded'

2015-02-01 Thread Lefty Leverenz
Xuefu, should this be documented in the Union wikidoc ? Is it relevant for other query clauses? -- Lefty On Sun, Feb 1, 2015 at 11:27 AM, Philippe Kernévez wrote: > Perfect. > > Thank you Xuefu. > > Philippe > > On Fri, Jan

Re: Union all with a field 'hard coded'

2015-02-01 Thread Philippe Kernévez
Perfect. Thank you Xuefu. Philippe On Fri, Jan 30, 2015 at 11:32 PM, Xuefu Zhang wrote: > Use column alias: > > INSERT OVERWRITE TABLE all_dictionaries_ext > SELECT name, id, category FROM dictionary > UNION ALL SELECT NAME, ID, "CAMPAIGN" as category FROM md_campaigns > > > On Fri,

Re: Union all with a field 'hard coded'

2015-01-30 Thread Xuefu Zhang
Use column alias: INSERT OVERWRITE TABLE all_dictionaries_ext SELECT name, id, category FROM dictionary UNION ALL SELECT NAME, ID, "CAMPAIGN" as category FROM md_campaigns On Fri, Jan 30, 2015 at 1:41 PM, Philippe Kernévez wrote: > Hi all, > > I would like to do union all with a fiel

Union all with a field 'hard coded'

2015-01-30 Thread Philippe Kernévez
Hi all, I would like to do union all with a field that is hardcoded in the request. INSERT OVERWRITE TABLE all_dictionaries_ext SELECT name, id, category FROM dictionary UNION ALL SELECT NAME, ID, "CAMPAIGN" FROM md_campaigns Name type is String Id type is int Category type is strin