Grunt parser doesn't handle escape codes correctly
--------------------------------------------------
Key: PIG-377
URL: https://issues.apache.org/jira/browse/PIG-377
Project: Pig
Issue Type: Bug
Components: grunt
Environment: Pig Trunk 01-Aug-2008
Hadoop 17.1
Linux Ubuntu
Reporter: Rafael Turk
Priority: Critical
Grunt parser doesn't handle escape codes correctly such as \s \n \\..
Exemple, using:
raw_filtered = FILTER raw BY ngram matches '^[a-zA-Z0-9\s]$';
OR
raw_filtered = FILTER raw BY ngram matches "^[a-zA-Z0-9\s]$";
I get the following error:
org.apache.pig.impl.logicalLayer.parser.TokenMgrError: Lexical error at line 1,
column 57. Encountered: "s" (115), after : "\'^[a-zA-Z0-9\\"
at
org.apache.pig.impl.logicalLayer.parser.QueryParserTokenManager.getNextToken(QueryParserTokenManager.java:1623)
at
org.apache.pig.impl.logicalLayer.parser.QueryParser.jj_consume_token(QueryParser.java:4744)
at
org.apache.pig.impl.logicalLayer.parser.QueryParser.PUnaryCond(QueryParser.java:1117)
at
org.apache.pig.impl.logicalLayer.parser.QueryParser.PAndCond(QueryParser.java:1055)
at
org.apache.pig.impl.logicalLayer.parser.QueryParser.POrCond(QueryParser.java:1005)
at
org.apache.pig.impl.logicalLayer.parser.QueryParser.PCond(QueryParser.java:973)
at
org.apache.pig.impl.logicalLayer.parser.QueryParser.FilterClause(QueryParser.java:941)
at
org.apache.pig.impl.logicalLayer.parser.QueryParser.BaseExpr(QueryParser.java:686)
at
org.apache.pig.impl.logicalLayer.parser.QueryParser.Expr(QueryParser.java:512)
at
org.apache.pig.impl.logicalLayer.parser.QueryParser.Parse(QueryParser.java:362)
at
org.apache.pig.impl.logicalLayer.LogicalPlanBuilder.parse(LogicalPlanBuilder.java:47)
at org.apache.pig.PigServer.registerQuery(PigServer.java:275)
at
org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:475)
at
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:233)
at
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:81)
at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:60)
at org.apache.pig.Main.main(Main.java:294)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.