Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-4126

No syntax to create single-column tuples

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      There is currently no syntax to create a single-column tuple. For example, none of these work:

      x = LOAD 'data.json' USING JsonLoader('a:chararray, b:chararray') AS (a:chararray, b:chararray);

      1. The goal is to create a relation containing a tuple with a single column
      2. For example: tpl: (value: chararray)
      3. Creates a relation with a single column "a" that is a chararray
        a = foreach x generate (a) as (a: chararray);
        b = foreach x generate a as (a: chararray);
        c = foreach x generate a as a: chararray;
      1. Python-style tuple syntax is a syntax error
        d = foreach x generate (a,) as (a: chararray);
      1. Types are incompatible
        e = foreach x generate (a) as tuple(a: chararray)

      Attachments

        Activity

          People

            Unassigned Unassigned
            sigpwned Andy Boothe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: