pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Pig Wiki] Update of "PigLatin" by Thatha
Date Mon, 23 Jun 2008 20:33:19 GMT
Dear Wiki user,

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

The following page has been changed by Thatha:
http://wiki.apache.org/pig/PigLatin

The comment on the change is:
Formatting

------------------------------------------------------------------------------
  || '''Field referred to by position''' || '''$0''' || Data Atom '1' || '''In Pig, positions
start at 0 and not 1''' ||
  || '''Field referred to by name''' || '''f2'''|| Bag {<2,3>,<4,6>,<5,7>}
|| ||
  || '''Projection''' of another data item || '''f2.$0''' || Bag {<2>,<4>,<5>}
- the bag f2 projected to the first field || ||
- || '''Map Lookup''' against another data item || '''f3#'apache'''' || Data Atom 'search'
||* User's responsibility to ensure that a lookup is written only against a  data map, otherwise
a runtime error is thrown <br>   * If the key being looked up does not exist, a Data
Atom with an empty string is returned||
+ || '''Map Lookup''' against another data item || '''f3#'apache'''' || Data Atom 'search'
||User's responsibility to ensure that a lookup is written only against a data map, otherwise
a runtime error is thrown. If the key being looked up does not exist, a Data Atom with an
empty string is returned.||
  || '''Function''' applied to another data item || '''SUM(f2.$0)''' || 2+4+5 = 11 || SUM
is a builtin Pig function. See PigFunctions for how to write your own functions ||
  || '''Infix Expression''' of other data items || '''COUNT(f2) + f1 / '2.0'''' || 3 + 1 /
2.0 = 3.5 ||  ||
  || '''Bincond''', i.e., the value of the data item is chosen according to some condition
|| '''(f1 = =  '1' ? '2' : COUNT(f2))''' || '2' since f1=='1' is true. If f1 were != '1',
then the value of this data item for t would be COUNT(f2)=3 || See [#Specifying_Conditions
Conditions] for what the format of the condition in the bincond can be ||

Mime
View raw message