Pig
  1. Pig
  2. PIG-1618 Switch to new parser generator technology
  3. PIG-1765

as_clause in foreach statement should differentiate between simple type and type within tuple

    Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      In new parser changes, the following statements are treated as same -

      f = foreach l generate a as aa :int; – here the column is now called aa and has type int

      f = foreach l generate a as (aa :int); – this should mean that the column has type "tuple with column aa of type int"

      With old parser the 2nd statement results in syntax error, which is fine, because it requires name part .

      The parenthesis represent tuple in pig. We should deprecate support for load statement that takes schema without the parenthesis part , such as following example -
      l = load 'x' as a:int – It should be as (a :int) , it is treated as such but this is inconsistent syntax.

        Activity

        Thejas M Nair created issue -
        Olga Natkovich made changes -
        Field Original Value New Value
        Assignee Xuefu Zhang [ xuefuz ]
        Olga Natkovich made changes -
        Fix Version/s 0.9.0 [ 12315191 ]
        Xuefu Zhang made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Xuefu Zhang
            Reporter:
            Thejas M Nair
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development