Author: shawkins
Date: 2012-03-06 12:49:15 -0500 (Tue, 06 Mar 2012)
New Revision: 3917
Modified:
trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
Log:
TEIID-1560 adding a user defined aggregate function implementation class, a metadata
holder for user defined aggregates, and some cleanup of aggregate logic
Modified: trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
===================================================================
--- trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2012-03-06 15:54:08
UTC (rev 3916)
+++ trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2012-03-06 17:49:15
UTC (rev 3917)
@@ -1820,7 +1820,7 @@
condition = filterClause(info)
{
String aggName = t.image.toUpperCase();
- AggregateSymbol agg = new AggregateSymbol(aggName, aggName, false, expression);
+ AggregateSymbol agg = new AggregateSymbol(aggName, false, expression);
agg.setOrderBy(orderBy);
agg.setCondition(condition);
return agg;
@@ -1878,7 +1878,7 @@
tf.setIncludeHeader(header);
tf.setExpressions(expressions);
tf.setEncoding(encoding);
- AggregateSymbol agg = new AggregateSymbol("TEXTAGG", "TEXTAGG",
false, tf);
+ AggregateSymbol agg = new AggregateSymbol("TEXTAGG", false, tf);
agg.setOrderBy(orderBy);
agg.setCondition(condition);
return agg;
@@ -1922,10 +1922,10 @@
func = func.toUpperCase();
if(starToken == null) {
// Aggregate
- agg = new AggregateSymbol(func, func, isDistinct, expression);
+ agg = new AggregateSymbol(func, isDistinct, expression);
} else {
// COUNT(*)
- agg = new AggregateSymbol(func, func, false, null);
+ agg = new AggregateSymbol(func, false, null);
}
agg.setCondition(condition);
return agg;