You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by ja...@apache.org on 2014/05/13 02:56:29 UTC

[06/11] git commit: DRILL-529: 'atom' rule in Antlr grammar uses wrong token for calculating ExpressionPosition

DRILL-529: 'atom' rule in Antlr grammar uses wrong token for calculating ExpressionPosition


Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/fb973c66
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/fb973c66
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/fb973c66

Branch: refs/heads/master
Commit: fb973c66eb538ba5e780fe1f6369f13fa242f1de
Parents: fafb576
Author: Aditya Kishore <ad...@maprtech.com>
Authored: Tue Apr 15 16:59:47 2014 -0700
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Mon May 12 11:47:57 2014 -0700

----------------------------------------------------------------------
 .../org/apache/drill/common/expression/parser/ExprParser.g     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/fb973c66/common/src/main/antlr3/org/apache/drill/common/expression/parser/ExprParser.g
----------------------------------------------------------------------
diff --git a/common/src/main/antlr3/org/apache/drill/common/expression/parser/ExprParser.g b/common/src/main/antlr3/org/apache/drill/common/expression/parser/ExprParser.g
index 5ad7099..9737e5d 100644
--- a/common/src/main/antlr3/org/apache/drill/common/expression/parser/ExprParser.g
+++ b/common/src/main/antlr3/org/apache/drill/common/expression/parser/ExprParser.g
@@ -278,13 +278,13 @@ xorExpr returns [LogicalExpression e]
   
 unaryExpr returns [LogicalExpression e]
   :  sign=(Plus|Minus)? Number {$e = ValueExpressions.getNumericExpression($sign.text, $Number.text, pos(($sign != null) ? $sign : $Number)); }
-  |  Minus atom {$e = FunctionCallFactory.createExpression("u-", pos($atom.start), $atom.e); }
-  |  Excl atom {$e= FunctionCallFactory.createExpression("!", pos($atom.start), $atom.e); }
+  |  Minus atom {$e = FunctionCallFactory.createExpression("u-", pos($Minus), $atom.e); }
+  |  Excl atom {$e= FunctionCallFactory.createExpression("!", pos($Excl), $atom.e); }
   |  atom {$e = $atom.e; }
   ;
 
 atom returns [LogicalExpression e]
-  :  Bool {$e = new ValueExpressions.BooleanExpression($Bool.text, pos($atom.start)); }
+  :  Bool {$e = new ValueExpressions.BooleanExpression($Bool.text, pos($Bool)); }
   |  lookup {$e = $lookup.e; }
   ;