Pig
  1. Pig
  2. PIG-2593

Filter by a boolean value does not work

    Details

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

      Description

      The following script does not work:

      a = load 'allscalar10k' as (name, age, gpa, instate);
      b = filter a by instate;
      explain b;
      

      Exception:
      ERROR 1200: <file 18.pig, line 2, column 23> mismatched input ';' expecting IS

      org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during parsing. <file 18.pig, line 2, column 23> mismatched input ';' expecting IS
      at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1598)
      at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1541)
      at org.apache.pig.PigServer.registerQuery(PigServer.java:541)
      at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:945)
      at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:392)
      at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:190)
      at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:166)
      at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84)
      at org.apache.pig.Main.run(Main.java:599)
      at org.apache.pig.Main.main(Main.java:153)
      Caused by: Failed to parse: <file 18.pig, line 2, column 23> mismatched input ';' expecting IS
      at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:222)
      at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:164)
      at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1590)
      ... 9 more

      It works if we change the script into:

      a = load 'allscalar10k' as (name, age, gpa, instate);
      b = filter a by instate==TRUE;
      explain b;
      

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Jie Li
            Reporter:
            Daniel Dai
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development