Package com.arcadedb.query.sql.parser
Class AggregateProjectionSplit
- java.lang.Object
-
- com.arcadedb.query.sql.parser.AggregateProjectionSplit
-
public class AggregateProjectionSplit extends Object
This class is used by the query planner to split projections in three parts:- pre-aggregate projections
- aggregate projections
- post-aggregate projections
An example: select max(a + b) + (max(b + c * 2) + 1 + 2) * 3 as foo, max(d) + max(e), f from " + className will become <p> a + b AS _$$$OALIAS$$_1, b + c * 2 AS _$$$OALIAS$$_3, d AS _$$$OALIAS$$_5, e AS _$$$OALIAS$$_7, f <p> max(_$$$OALIAS$$_1) AS _$$$OALIAS$$_0, max(_$$$OALIAS$$_3) AS _$$$OALIAS$$_2, max(_$$$OALIAS$$_5) AS _$$$OALIAS$$_4, max(_$$$OALIAS$$_7) AS _$$$OALIAS$$_6, f <p> _$$$OALIAS$$_0 + (_$$$OALIAS$$_2 + 1 + 2) * 3 AS `foo`, _$$$OALIAS$$_4 + _$$$OALIAS$$_6 AS `max(d) + max(e)`, f
- Author:
- Luigi Dell'Aquila (luigi.dellaquila-(at)-gmail.com)
-
-
Field Summary
Fields Modifier and Type Field Description protected List<ProjectionItem>
aggregate
protected static String
GENERATED_ALIAS_PREFIX
protected int
nextAliasId
protected List<ProjectionItem>
preAggregate
-
Constructor Summary
Constructors Constructor Description AggregateProjectionSplit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ProjectionItem>
getAggregate()
Identifier
getNextAlias()
List<ProjectionItem>
getPreAggregate()
void
reset()
clean the content, but NOT the counter!void
setAggregate(List<ProjectionItem> aggregate)
void
setPreAggregate(List<ProjectionItem> preAggregate)
-
-
-
Field Detail
-
GENERATED_ALIAS_PREFIX
protected static final String GENERATED_ALIAS_PREFIX
- See Also:
- Constant Field Values
-
nextAliasId
protected int nextAliasId
-
preAggregate
protected List<ProjectionItem> preAggregate
-
aggregate
protected List<ProjectionItem> aggregate
-
-
Method Detail
-
getNextAlias
public Identifier getNextAlias()
-
getPreAggregate
public List<ProjectionItem> getPreAggregate()
-
setPreAggregate
public void setPreAggregate(List<ProjectionItem> preAggregate)
-
getAggregate
public List<ProjectionItem> getAggregate()
-
setAggregate
public void setAggregate(List<ProjectionItem> aggregate)
-
reset
public void reset()
clean the content, but NOT the counter!
-
-