Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change 
notification.

The following page has been changed by PeterSkomoroch:
http://wiki.apache.org/hadoop/Hive/Tutorial

The comment on the change is:
fix union example, small equi-join edit

------------------------------------------------------------------------------
      WHERE pv.date = '2008-03-03';  
  }}}
  
- Note that in Hive only support equi-joins. In order to do outer joins the 
user can qualify the join with LEFT OUTER, RIGHT OUTER or FULL OUTER keywords 
in order to indicate the kind of outer join (left preserved, right preserved or 
both sides preserved). e.g. in order to do a full outer join in the query 
above, the corresponding syntax would look like the following query: 
+ In order to do outer joins the user can qualify the join with LEFT OUTER, 
RIGHT OUTER or FULL OUTER keywords in order to indicate the kind of outer join 
(left preserved, right preserved or both sides preserved). e.g. in order to do 
a full outer join in the query above, the corresponding syntax would look like 
the following query: 
  {{{     
      INSERT OVERWRITE TABLE pv_users 
      SELECT pv.*, u.gender, u.age 
@@ -364, +364 @@

      WHERE pv.date = '2008-03-03'; 
  }}}
  
+ Note that Hive only supports 
[http://en.wikipedia.org/wiki/Join_(SQL)#Equi-join equi-joins]. 
+ 
  == Aggregations ==
  In order to count the number of distinct users by gender one could write the 
following query: 
  
@@ -450, +452 @@

  
  {{{    
      INSERT OVERWRITE TABLE actions_users 
-     SELECT u.id, actions.date; 
+     SELECT u.id, actions.date
      FROM (
          SELECT av.uid AS uid 
          FROM action_video av 
@@ -461, +463 @@

          SELECT ac.uid AS uid 
          FROM action_comment ac 
          WHERE ac.date = '2008-06-03' 
-         ) actions JOIN users u ON(u.id = actions.uid) 
+         ) actions JOIN users u ON(u.id = actions.uid);
  }}}
  
  == Array Operations ==

Reply via email to