Re: Union in Multi Insert

2013-02-12 Thread John Omernik
You are correct on the what I am hoping to do, basically emit two records for every row. What was interesting was when I just did the union in the from, it didn't see to do a double table scan. I ended up doing: INSERT OVERWRITE TABLE table_summary select col1, unioned_col, count(distinct col4) f

Re: Union in Multi Insert

2013-02-11 Thread Mark Grover
John, Please correct me if I didn't understand the problem correctly. I think in this scenario, it's best to think about the query in terms of MapReduce. In this case, you would want for each record sent as input to your mapper, two records to be emitted, one with col2's value and one with col3's