mirror of https://github.com/apache/druid.git
support aliasing
This commit is contained in:
parent
f8a118dd98
commit
5d1af7d884
|
@ -148,7 +148,13 @@ datasource
|
|||
;
|
||||
|
||||
aliasedExpression returns [PostAggregator p]
|
||||
: expression ( AS^ name=IDENT )? { $p = $expression.p; }
|
||||
: expression ( AS^ name=IDENT )? {
|
||||
if($name != null) {
|
||||
postAggregators.add($expression.p);
|
||||
$p = new FieldAccessPostAggregator($name.text, $expression.p.getName());
|
||||
}
|
||||
else $p = $expression.p;
|
||||
}
|
||||
;
|
||||
|
||||
expression returns [PostAggregator p]
|
||||
|
|
Loading…
Reference in New Issue