// return holder
ValueReference[] ps = params.toArray(new ValueReference[params.size()]);
WorkspaceReference[] works = workspaceFields.toArray(new WorkspaceReference[workspaceFields.size()]);
String[] registeredNames = ((template.name().isEmpty()) ? template.names() : new String[] {template.name()} );
switch (template.scope()) {
case POINT_AGGREGATE:
return new DrillAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
template.isRandom(), registeredNames, ps, outputField, works, methods, imports, template.costCategory());
case DECIMAL_AGGREGATE: