return null;
}
// on-demand query allow window access type
if (ondemandQuery && accessType == AggregationAccessType.WINDOW) {
return new AggregationSpec(streamNum);
}
// no remove stream, use first-ever and last-ever functions
if (istreamOnly || ondemandQuery) {
return null;
}
return new AggregationSpec(streamNum);
}