You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by Jinfeng Ni <jn...@maprtech.com> on 2014/03/27 01:04:01 UTC
Review Request 19706: DRILL-449 : Throw exception when ANTLR expression
parser detects a parsing error. Stop execution immediately.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/19706/
-----------------------------------------------------------
Review request for drill.
Repository: drill-git
Description
-------
This patch fixes the issue in the ANTLR expression parser used by Drill. When the parser sees parsing error in the expression in serialized logical plan/physical plan, it only will display the error message in the console, and continue the execution. The result logical expression will be either invalid or incomplete, which eventually hit error in Drill's run-time phase. This makes debuggging the error more difficulty.
Modify the ANTLR parser, such that it will catch the RecognitionException thrown by parser, and stop the execution.
Diffs
-----
common/src/main/antlr3/org/apache/drill/common/expression/parser/ExprParser.g edb8507
exec/java-exec/src/test/java/org/apache/drill/exec/expr/ExpressionTest.java 3491e7a
pom.xml c4bc9c9
Diff: https://reviews.apache.org/r/19706/diff/
Testing
-------
Add two unit tests in ExpressionTest.java. One will raise the exception. The other one is a valid expression.
Thanks,
Jinfeng Ni
Re: Review Request 19706: DRILL-449 : Throw exception when ANTLR expression
parser detects a parsing error. Stop execution immediately.
Posted by Aditya Kishore <ad...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/19706/#review38700
-----------------------------------------------------------
Ship it!
Ship It!
- Aditya Kishore
On March 26, 2014, 9:01 p.m., Jinfeng Ni wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19706/
> -----------------------------------------------------------
>
> (Updated March 26, 2014, 9:01 p.m.)
>
>
> Review request for drill.
>
>
> Repository: drill-git
>
>
> Description
> -------
>
> This patch fixes the issue in the ANTLR expression parser used by Drill. When the parser sees parsing error in the expression in serialized logical plan/physical plan, it only will display the error message in the console, and continue the execution. The result logical expression will be either invalid or incomplete, which eventually hit error in Drill's run-time phase. This makes debuggging the error more difficulty.
>
> Modify the ANTLR parser, such that it will catch the RecognitionException thrown by parser, and stop the execution.
>
> For expr "less than (1,2)", Drill now will throw the following exception.
>
> error_type: 0
> message: "Failure while setting up Foreman. < ExpressionParsingException:[ Expression has syntax error! line 1:0:no viable alternative at input \'less\' ]"
> ]
>
>
> Diffs
> -----
>
> common/src/main/antlr3/org/apache/drill/common/expression/parser/ExprParser.g edb8507
> exec/java-exec/src/test/java/org/apache/drill/exec/expr/ExpressionTest.java 3491e7a
> pom.xml c4bc9c9
>
> Diff: https://reviews.apache.org/r/19706/diff/
>
>
> Testing
> -------
>
> Add two unit tests in ExpressionTest.java. One will raise the exception. The other one is a valid expression.
>
>
> Thanks,
>
> Jinfeng Ni
>
>
Re: Review Request 19706: DRILL-449 : Throw exception when ANTLR expression
parser detects a parsing error. Stop execution immediately.
Posted by Timothy Chen <tn...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/19706/#review38703
-----------------------------------------------------------
Ship it!
Ship It!
- Timothy Chen
On March 27, 2014, 4:01 a.m., Jinfeng Ni wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19706/
> -----------------------------------------------------------
>
> (Updated March 27, 2014, 4:01 a.m.)
>
>
> Review request for drill.
>
>
> Repository: drill-git
>
>
> Description
> -------
>
> This patch fixes the issue in the ANTLR expression parser used by Drill. When the parser sees parsing error in the expression in serialized logical plan/physical plan, it only will display the error message in the console, and continue the execution. The result logical expression will be either invalid or incomplete, which eventually hit error in Drill's run-time phase. This makes debuggging the error more difficulty.
>
> Modify the ANTLR parser, such that it will catch the RecognitionException thrown by parser, and stop the execution.
>
> For expr "less than (1,2)", Drill now will throw the following exception.
>
> error_type: 0
> message: "Failure while setting up Foreman. < ExpressionParsingException:[ Expression has syntax error! line 1:0:no viable alternative at input \'less\' ]"
> ]
>
>
> Diffs
> -----
>
> common/src/main/antlr3/org/apache/drill/common/expression/parser/ExprParser.g edb8507
> exec/java-exec/src/test/java/org/apache/drill/exec/expr/ExpressionTest.java 3491e7a
> pom.xml c4bc9c9
>
> Diff: https://reviews.apache.org/r/19706/diff/
>
>
> Testing
> -------
>
> Add two unit tests in ExpressionTest.java. One will raise the exception. The other one is a valid expression.
>
>
> Thanks,
>
> Jinfeng Ni
>
>
Re: Review Request 19706: DRILL-449 : Throw exception when ANTLR expression
parser detects a parsing error. Stop execution immediately.
Posted by Jinfeng Ni <jn...@maprtech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/19706/
-----------------------------------------------------------
(Updated March 26, 2014, 9:01 p.m.)
Review request for drill.
Repository: drill-git
Description (updated)
-------
This patch fixes the issue in the ANTLR expression parser used by Drill. When the parser sees parsing error in the expression in serialized logical plan/physical plan, it only will display the error message in the console, and continue the execution. The result logical expression will be either invalid or incomplete, which eventually hit error in Drill's run-time phase. This makes debuggging the error more difficulty.
Modify the ANTLR parser, such that it will catch the RecognitionException thrown by parser, and stop the execution.
For expr "less than (1,2)", Drill now will throw the following exception.
error_type: 0
message: "Failure while setting up Foreman. < ExpressionParsingException:[ Expression has syntax error! line 1:0:no viable alternative at input \'less\' ]"
]
Diffs
-----
common/src/main/antlr3/org/apache/drill/common/expression/parser/ExprParser.g edb8507
exec/java-exec/src/test/java/org/apache/drill/exec/expr/ExpressionTest.java 3491e7a
pom.xml c4bc9c9
Diff: https://reviews.apache.org/r/19706/diff/
Testing
-------
Add two unit tests in ExpressionTest.java. One will raise the exception. The other one is a valid expression.
Thanks,
Jinfeng Ni