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

Parser error while referring a map nested foreach

    XMLWordPrintableJSON

Details

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

    Description

      The below script is throwing parser errors

      register string.jar;
      A = load 'test1'  using MapLoader() as ( s, m, l );                       
      B = foreach A generate *, string.URLPARSE((chararray) s#'url') as parsedurl;
      C = foreach B {
        urlpath = (chararray) parsedurl#'path';
        lc_urlpath = string.TOLOWERCASE((chararray) urlpath);
        generate *;
      };
      

      Error message;

      Failed to generate logical plan.
      Nested exception: org.apache.pig.impl.logicalLayer.FrontendException: ERROR 2225: Projection with nothing to reference!

      PIG-2002 reports a similar issue, but when i tried with the patch of PIG-2002 i was getting the below exception;
      ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: <file repro.pig, line 11, column 33> mismatched input '(' expecting SEMI_COLON

      Attachments

        Activity

          People

            xuefuz Xuefu Zhang
            vivekp Vivek Padmanabhan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: