【发布时间】:2014-09-11 15:54:48
【问题描述】:
我想在 Coherence 中执行以下查询
Select AVG(Salary)
, Count(*)
from Employees
group by Company
Having AVG(Salary)> 1000
我试图使用 GroupAggregators,但我在引用平均工资时遇到了问题,因为它不是在 Employee 类中定义的,而是在 Aggregator 中定义的:
GroupAggregator high_salary = GroupAggregator.createInstance("getDepartment"
, new DoubleAverage("getSalary")
, new GreaterFilter("DoubleAverage", 1000));
我该怎么做?
【问题讨论】: