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

Error message from range projection completely misleading

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.18.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      A = load 'input.txt' as (a0,a1,a2,a3);
      B = FOREACH A GENERATE a0, a1, a2, a3;
      store B into '/tmp/deleteme';
      
      C = FOREACH A GENERATE a0, b1, a2, a3;
      D = FOREACH C GENERATE a0..a2;
      (end of script, no store, nothing)
      

      Error message

      2018-04-10 10:22:33,360 [main] ERROR org.apache.pig.PigServer - exception during parsing: Error during parsing. Invalid field projection. Projected field [a0] does not exist in schema: a0:bytearray,a0:bytearray,a2:bytearray,a3:bytearray.

      At least two issues.

      1. Error should be about FOREACH for C referencing non-existing field 'b1'. But the error message is saying something about 'a0'.
      2. Script itself is not using relation C and D at all. It's confusing to see errors coming out of unused relations.

        Attachments

        1. pig-5335-v02.patch
          4 kB
          Koji Noguchi
        2. pig-5335-v01.patch
          4 kB
          Koji Noguchi

          Activity

            People

            • Assignee:
              knoguchi Koji Noguchi
              Reporter:
              knoguchi Koji Noguchi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: