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

Type error message does not include complex type

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.7.0
    • 0.9.0
    • impl
    • None
    • Hadoop 0.20.104.3.1007030707
      Apache Pig version 0.7.0.20.100.1.1006041903 (r951530)

    Description

      When loading data as a bag, if the schema specification is not correct, error message does not include useful information about bag.

      For example, input file as "input.txt", working script as "working.pig", non working as "not_working.pig" as following:
      input.txt

      {(2, 3)} {(4, 6)} {(5, 7)}
      not_working.pig
      A = LOAD 'input.txt' AS (f1:bag[T:tuple(t1, t2)]);
      describe A;
      dump A;
      working .pig
      A = LOAD 'input.txt' AS (f1:bag{T:tuple(t1, t2)});
      describe A;
      dump A;

      if run: " pig -latest -x local working.pig", we get result:
      ({(2, 3)}

      )
      (

      {(4, 6)}

      )
      (

      {(5, 7)}

      )
      if run " pig -latest -x local not_working.pig", we get:
      ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Encountered " "bag" "bag "" at line 1, column 29.
      Was expecting one of:
      "int" ...
      "long" ...
      "float" ...
      "double" ...
      "chararray" ...
      "bytearray" ...
      "int" ...
      "long" ...
      "float" ...
      "double" ...
      "chararray" ...
      "bytearray" ...

      Please include bag{} map[] tuple() in Error message for better addressing the error.

      Attachments

        Issue Links

          Activity

            People

              xuefuz Xuefu Zhang
              sherri_chen Sherry Chen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: