// group by
if(_groupByClause != null) {
GroupingSpec[] specs = _groupByClause.getGroupingKeysAsArray();
PreGroupingVariableExtractor extractor = new PreGroupingVariableExtractor(specs);
extractor.visit(_filteredReturnExpr, dynEnv);
List<BindingVariable> nonGroupingVariables = extractor.getNonGroupingVariables();
input = new GroupedSequence(input, specs, nonGroupingVariables, contextSeq, dynEnv, _groupByClause.isOrdering());
}
// where + return