use of com.actiontech.dble.plan.common.item.function.sumfunc.ItemSum in project dble by actiontech.
the class GroupByLocalResult method onFoundRow.
protected void onFoundRow(RowDataPacket oldRow, RowDataPacket row) {
// we need to calculate group by
initSumFunctions(this.sums, oldRow);
updateSumFunc(this.sums, row);
for (int i = 0; i < this.sums.size(); i++) {
ItemSum sum = this.sums.get(i);
Object b = sum.getTransAggObj();
int transSize = sum.getTransSize();
((DGRowPacket) oldRow).setSumTran(i, b, transSize);
}
}
use of com.actiontech.dble.plan.common.item.function.sumfunc.ItemSum in project dble by actiontech.
the class GroupByLocalResult method initSumFunctions.
protected void initSumFunctions(List<ItemSum> functions, RowDataPacket row) {
for (int i = 0; i < functions.size(); i++) {
ItemSum sum = functions.get(i);
Object transObj = ((DGRowPacket) row).getSumTran(i);
sum.resetAndAdd(row, transObj);
}
}
use of com.actiontech.dble.plan.common.item.function.sumfunc.ItemSum in project dble by actiontech.
the class GroupByLocalResult method updateSumFunc.
protected void updateSumFunc(List<ItemSum> functions, RowDataPacket row) {
for (int index = 0; index < functions.size(); index++) {
ItemSum sum = functions.get(index);
Object transObj = ((DGRowPacket) row).getSumTran(index);
sum.aggregatorAdd(row, transObj);
}
}
use of com.actiontech.dble.plan.common.item.function.sumfunc.ItemSum in project dble by actiontech.
the class GroupResultDiskBuffer method updateSumFunc.
protected void updateSumFunc(List<ItemSum> functions, RowDataPacket row) {
for (int index = 0; index < functions.size(); index++) {
ItemSum sum = functions.get(index);
Object transObj = ((DGRowPacket) row).getSumTran(index);
sum.aggregatorAdd(row, transObj);
}
}
use of com.actiontech.dble.plan.common.item.function.sumfunc.ItemSum in project dble by actiontech.
the class GroupResultDiskBuffer method initSumFunctions.
protected void initSumFunctions(List<ItemSum> functions, RowDataPacket row) {
for (int i = 0; i < functions.size(); i++) {
ItemSum sum = functions.get(i);
Object transObj = ((DGRowPacket) row).getSumTran(i);
sum.resetAndAdd(row, transObj);
}
}
Aggregations