-----------------------------------------------------------
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
> 
>

Reply via email to