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

ParseException involving "as" keyword

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.2.0
    • None
    • None
    • None

    Description

      The enclosed Pig script, throws the following error:
      =====================================================================================================================
      org.apache.pig.tools.pigscript.parser.ParseException: Encountered "as" at line 13, column 11.
      Was expecting one of:
      <EOF>
      "cat" ...
      "cd" ...
      "cp" ...
      "copyFromLocal" ...
      "copyToLocal" ...
      "dump" ...
      "describe" ...
      "explain" ...
      "help" ...
      "kill" ...
      "ls" ...
      "mv" ...
      "mkdir" ...
      "pwd" ...
      "quit" ...
      "register" ...
      "rm" ...
      "rmf" ...
      "set" ...
      "illustrate" ...
      "scriptDone" ...
      "" ...
      <EOL> ...
      ";" ...

      at org.apache.pig.tools.pigscript.parser.PigScriptParser.generateParseException(PigScriptParser.java:688)
      at org.apache.pig.tools.pigscript.parser.PigScriptParser.handle_invalid_command(PigScriptParser.java:515)
      at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:356)
      at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:84)
      at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:64)
      at org.apache.pig.Main.main(Main.java:306)
      =====================================================================================================================
      But the error seems to disappear if a few lines are moved around the "foreach" and "as" keywords.

      Attachments

        1. assyntax.pig
          0.5 kB
          Viraj Bhat

        Issue Links

          Activity

            People

              xuefuz Xuefu Zhang
              viraj Viraj Bhat
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: