pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pi Song (JIRA)" <j...@apache.org>
Subject [jira] Commented: (PIG-159) Make changes to the parser to support new types functionality
Date Wed, 04 Jun 2008 14:19:45 GMT

    [ https://issues.apache.org/jira/browse/PIG-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602297#action_12602297
] 

Pi Song commented on PIG-159:
-----------------------------

For the question before regarding:-

a = load 'a' as (group: tuple(field1:int, field2:double) , a: bag{tuple1:tuple(field1: int,field2:
long)}, b: bag{tuple1:tuple(field1: bytearray,field2: double)} ) ;

>From the main trunk, we don't really impose the concept of reserved words in aliases.
Therefore I think we shouldn't impose in schema definition either.  I think one clean way
to do it is to move the schema parsing bit to a different lexical state. If you are too busy,
make sure the parser is latest on Friday and I will refactor on the weekend.

> Make changes to the parser to support new types functionality
> -------------------------------------------------------------
>
>                 Key: PIG-159
>                 URL: https://issues.apache.org/jira/browse/PIG-159
>             Project: Pig
>          Issue Type: Sub-task
>          Components: impl
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>         Attachments: parser_chages_v10.patch, parser_chages_v11.patch, parser_chages_v12.patch,
parser_chages_v13.patch, parser_chages_v5.patch, parser_chages_v6.patch, parser_chages_v7.patch,
parser_chages_v8.patch, parser_chages_v9.patch
>
>
> In order to support the new types functionality described in http://wiki.apache.org/pig/PigTypesFunctionalSpec,
the parse needs to change in the following ways:
> 1) AS needs to support types in addition to aliases.  So where previously it was legal
to say:
> a = load 'myfile' as a, b, c;
> it will now also be legal to say
> a = load 'myfile' as a integer, b float, c chararray;
> 2) Non string constants need to be supported.  This includes non-string atomic types
(integer, long, float, double) and the non-atomic types bags, tuples, and maps.
> 3) A cast operator needs to be added so that fields can be explicitly casted.
> 4) Changes to DEFINE, to allow users to declare arguments and return types for UDFs

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message