keep track of queried fields

This commit is contained in:
xvrl 2013-03-05 11:45:51 -08:00
parent ae682d2cbb
commit 035986b3bc
1 changed files with 5 additions and 1 deletions

View File

@ -20,6 +20,7 @@ import java.util.*;
public List<PostAggregator> postAggregators = new LinkedList<PostAggregator>();
public DimFilter filter;
public List<org.joda.time.Interval> intervals;
public List<String> fields = new LinkedList<String>();
public QueryGranularity granularity = QueryGranularity.ALL;
public Map<String, DimensionSpec> groupByDimensions = new LinkedHashMap<String, DimensionSpec>();
@ -116,7 +117,10 @@ query
select_stmt
: 'select' e+=aliasedExpression (',' e+=aliasedExpression)* 'from' datasource {
for(AliasedExpressionContext a : $e) { postAggregators.add(a.p); }
for(AliasedExpressionContext a : $e) {
postAggregators.add(a.p);
fields.add(a.p.getName());
}
this.dataSourceName = $datasource.text;
}
;