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

Pig should check schema alias duplication at any levels.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.0
    • None
    • None

    Description

      The following script appears valid to Pig but it shouldn't:

      A = load 'file' as (a:tuple( u:int, u:bytearray, w:long), b:int, c:chararray);
      dump A;

      Pig tries to launch map/reduce jobs for this.

      However, for the following script, Pig correctly reports error message:

      A = load 'file' as (a:int, a:long, c:bytearray);
      dump A;

      Error message is:
      2010-09-28 15:53:37,390 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1108: Duplicate schema alias: b in "A"

      Thus, Pig only checks alias duplication at the top level, which is confirmed by looking at the code. The right behavior is that the same check should be applied at all levels.

      This should be addressed in the new parser.

      Attachments

        Issue Links

          Activity

            People

              xuefuz Xuefu Zhang
              xuefuz Xuefu Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: