You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Koji Noguchi (JIRA)" <ji...@apache.org> on 2016/05/05 22:28:12 UTC
[jira] [Created] (PIG-4888) Line number off when reporting syntax
error inside a macro
Koji Noguchi created PIG-4888:
---------------------------------
Summary: Line number off when reporting syntax error inside a macro
Key: PIG-4888
URL: https://issues.apache.org/jira/browse/PIG-4888
Project: Pig
Issue Type: Bug
Components: parser
Reporter: Koji Noguchi
Priority: Trivial
{panel}
1 /*
2 * extra lines to offset the line number for the macro
3 *
4 *
5 */
6
7
8 define mymacro() returns void {
9 A = load 'x' as ( u:int, v:long, w:bytearray);
10 B = limit A 100;
11 C = {color:red}filter_typo{color} B by 2 > 1;
12 D = load 'y' as (d1, d2);
13 E = join C by ( $0, $1 ), D by ( d1, d2 ) using 'replicated' parallel 16;
14 F = store E into 'output';
15 };
16 mymacro();
{panel}
This fails with
{panel}
"2016-05-05 22:25:28,390 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: <file test.pig, line 16> Failed to parse macro 'mymacro'. Reason: <file /homes/knoguchi/test.pig, line 4, column 0> Syntax error, unexpected symbol at or near 'C'"
{panel}
{{test.pig, line 4,}} should have been line 11.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)