pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Viraj Bhat (JIRA)" <j...@apache.org>
Subject [jira] Created: (PIG-740) Incorrect line number is generated when a string with double quotes is used instead of single quotes and is passed to UDF
Date Tue, 31 Mar 2009 01:39:50 GMT
Incorrect line number is generated when a string  with double quotes is used instead of single
quotes and is passed to UDF
--------------------------------------------------------------------------------------------------------------------------

                 Key: PIG-740
                 URL: https://issues.apache.org/jira/browse/PIG-740
             Project: Pig
          Issue Type: Bug
          Components: grunt
    Affects Versions: 0.1.0
            Reporter: Viraj Bhat
            Priority: Minor
             Fix For: 0.1.0


Consider the Pig script with the error that a String with double quotes "www\\." is used instead
of a single quote 'www\\.' in the UDF string.REPLACEALL()

{code}
register string-2.0.jar;
A = load 'inputdata' using PigStorage() as ( curr_searchQuery );

B = foreach A {
        domain = string.REPLACEALL(curr_searchQuery,"^www\\.",'');
        generate
        domain;
        };

dump B;
{code}

I get the following error message where "Line 11" points to the end of file. The error message
should point to "Line 5".
===================================================================================================================================
2009-03-31 01:33:38,403 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine
- Connecting to hadoop file system at: hdfs://localhost:9000
2009-03-31 01:33:39,168 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine
- Connecting to map-reduce job tracker at: localhost:9001
2009-03-31 01:33:39,589 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error
during parsing. Lexical error at line 11, column 0.  Encountered: <EOF> after : ""
Details at logfile: /home/viraj/pig-svn/trunk/pig_1238463218046.log
===================================================================================================================================


The log file contains the following contents
===================================================================================================================================
ERROR 1000: Error during parsing. Lexical error at line 11, column 0.  Encountered: <EOF>
after : ""
org.apache.pig.tools.pigscript.parser.TokenMgrError: Lexical error at line 11, column 0. 
Encountered: <EOF> after : ""
        at org.apache.pig.tools.pigscript.parser.PigScriptParserTokenManager.getNextToken(PigScriptParserTokenManager.java:2739)
        at org.apache.pig.tools.pigscript.parser.PigScriptParser.jj_ntk(PigScriptParser.java:778)
        at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:89)
        at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:99)
        at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:88)
        at org.apache.pig.Main.main(Main.java:352)
===================================================================================================================================

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message