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 SanthoshSrinivasan:
http://wiki.apache.org/pig/PigTypesFunctionalSpec

------------------------------------------------------------------------------
  possible to define column names via AS.  This will be extended to allow
  defining a type for the column.  The syntax will be:
  {{{
- LOAD 'myfile' AS (colname [type], ...)
+ LOAD 'myfile' AS (colname [: type], ...)
  }}}
  
  This wil be legal anywhere AS is legal.  Note that in many instances, using
@@ -74, +74 @@

  or a bag of tuples of unknown.
  
  The complete syntax for describing types will be:
- || '''type declaration''' || '''comments'''                                   
                                    ||
+ || '''type declaration''' || '''comments'''                                   
                                     ||
- || bag(type | unknown)   ||                                                   
                                    ||
+ || bag{<identifier> [:tuple](<identifier> [:type] [, <identifier> [:type]])}  
  ||                                 ||
+ || bag{ }                 || indicates contents of bag are not known          
                                     ||
- || tuple(...)            || indicates contents of tuple are not known         
                                    ||
+ || tuple( )               || indicates contents of tuple are not known        
                                     ||
- || tuple(type [, type])  ||                                                   
                                    ||
- || map(type)             || type indicates key type, value types default to 
bytearray but can be cast to any type ||
+ || tuple(<identifier> [:type] [, <identifier> [:type]])   ||                  
                                      ||
+ || map[ ]                 || key type can be of any basic type, value types 
default to bytearray but can be cast to any type. here [ and ] are type 
specifiers and not the regular expression to denote one or more instance of ||
- || int                   ||                                                   
                                    ||
+ || int                    ||                                                  
                                     ||
- || long                  ||                                                   
                                    ||
+ || long                   ||                                                  
                                     ||
- || float                 ||                                                   
                                    ||
+ || float                  ||                                                  
                                     ||
- || double                ||                                                   
                                    ||
+ || double                 ||                                                  
                                     ||
- || chararray             ||                                                   
                                    ||
+ || chararray              ||                                                  
                                     ||
- || bytearray             ||                                                   
                                    ||
+ || bytearray              ||                                                  
                                     ||
  
  For example:
  {{{

Reply via email to