- Summary:
CheckIn:Fix
bugzilla bug 146967,149654
- Bugzilla Bug(s) Resolved:
Bugzilla
bug 146967 Total function with result of aggregate on group-level should be
enhanced.
Bugzilla
bug 149654 Can’t set Highlight/Map on group level
- Description:
The
nested total expressions are now completely supported, as far as the following
rules are followed:
1.
Each nested aggregation in an _expression_ only have one aggregate in it, or all
direct children of it has same group level. Meanwhile the group level of
aggregations being contained does not lower than the group level of its host
aggregation.
Example:
a)
Total.sum( Total.sum(row["aColumn"],null,1),null,0)
b)Total.sum(Total.sum(Total.sum(row[“aColumn”],null,2),null,1))
c)
Total.sum(Total.sum(row[“aColumn”],null,1)+Total.sum(row[“bColumn”],null,1))
This
is the most simple and straightforward scenario we can meet. In these
expressions all the parent aggregations will calculate against the group level
of their direct child’s group level. I have changed our codes so that can
fully support the calculation of these expressions.
2.
Each nested aggregation in an _expression_ has more than on aggregations in it,
and not all of those direct child aggregations have same group level. However,
all the child aggregations will be calculate on the groups lower or equal to
their hosts.
Example:
a)
Total.sum(Total.sum(row[“aColumn”],null,1)+Total.sum(row[“bColumn”],null,2),
null, 0)
3. All
the filters in aggregations should in an equal level as its host aggregations.
4. A
complex _expression_, serve as first argument of total _expression_, if contains reference
to “dataSetRow” object (which is not part of an aggregation), its
group-level is equal to 0.
- Tests Description:
Unit
test
- Notes to Build Team:
- Notes to Developers:
- Notes to QA:
- Notes to Documentation:
- Files Added:
"/org.eclipse.birt.data/test/org/eclipse/birt/data/engine/binding/golden/MultiplePassTest.testNestedTotal.txt"
"/org.eclipse.birt.data/test/org/eclipse/birt/data/engine/binding/golden/MultiplePassTest.testNestedTotal1.txt"
"/org.eclipse.birt.data/test/org/eclipse/birt/data/engine/binding/golden/MultiplePassTest.testNestedTotal2.txt"
"/org.eclipse.birt.data/test/org/eclipse/birt/data/engine/binding/golden/MultiplePassTest.testNestedTotal3.txt"
"/org.eclipse.birt.data/test/org/eclipse/birt/data/engine/executor/cache/golden/CachedMultiplePassTest.testNestedTotal.txt"
"/org.eclipse.birt.data/test/org/eclipse/birt/data/engine/executor/cache/golden/CachedMultiplePassTest.testNestedTotal1.txt"
"/org.eclipse.birt.data/test/org/eclipse/birt/data/engine/executor/cache/golden/CachedMultiplePassTest.testNestedTotal2.txt"
"/org.eclipse.birt.data/test/org/eclipse/birt/data/engine/executor/cache/golden/CachedMultiplePassTest.testNestedTotal3.txt"
- Files Edited:
"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/i18n/Messages.properties"
"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/aggregation/JSAggrValueObject.java"
"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/_expression_/ComplexExpression.java"
"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/_expression_/ExpressionCompiler.java"
"/org.eclipse.birt.data/test/org/eclipse/birt/data/engine/binding/MultiplePassTest.java"
"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/_expression_/AggregationTablePopulator.java"
"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/aggregation/AggrRegistry.java"
"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/_expression_/BytecodeExpression.java"
"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/aggregation/AggregateCalculator.java"
"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/QueryExecutor.java"
"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/_expression_/AggregateExpression.java"
"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/_expression_/MultiPassExpressionCompiler.java"
"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedQuery.java"
"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/aggregation/AggrExprInfo.java"
"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/_expression_/AbstractExpressionCompiler.java"
"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/aggregation/AggregateTable.java"
"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/i18n/ResourceConstants.java"
"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/_expression_/AggregateObject.java"
- Files Deleted: