Dear Wiki user,

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

The "Hive/LanguageManual/LateralView" page has been changed by PaulYang.
http://wiki.apache.org/hadoop/Hive/LanguageManual/LateralView?action=diff&rev1=1&rev2=2

--------------------------------------------------

  
  == Description ==
  
- Lateral view is used in conjunction with user-defined table generating 
functions such as explode(). As mentioned in 
[wiki:Self:Hive/LanguageManual/UDF#UDTF], a UDTF generates one or more rows for 
each input row. A lateral view constructs a virtual table by applying the UDTF 
to each row of base table and using the resulting output rows to form a virtual 
table having the supplied table alias. In addition, each input row from the 
base table is joined with the respective output rows in the virtual table.
+ Lateral view is used in conjunction with user-defined table generating 
functions such as explode(). As mentioned in 
[wiki:Self:Hive/LanguageManual/UDF#UDTF], a UDTF generates one or more output 
rows for each input row. A lateral view constructs a virtual table by applying 
the UDTF to each row of base table and using the resulting output rows to form 
a virtual table having the supplied table alias. In addition, each input row 
from the base table is joined with the respective output rows in the virtual 
table.
  
  == Example ==
  
@@ -27, +27 @@

  
  and the user would like to count the total number of times an ad appears 
across all pages.
  
- A lateral view with explode() can be used to convert adid_list into separate 
rows using the query:
+ A lateral view with explode() [wiki:Self:Hive/LanguageManual/UDF#explode] can 
be used to convert adid_list into separate rows using the query:
  {{{
  SELECT pageid, adid FROM pageAds LATERAL VIEW explode(adid_list) adTable AS 
adid;
  }}}

Reply via email to