| 1978 | } |
| 1979 | } |
| 1980 | |
| 1981 | void GroupingSet::extractSpillResult( |
| 1982 | const RowVectorPtr& result, |
| 1983 | bool excludeKey) { |
| 1984 | // distinct agg's result only has key, so skip if excludeKey |
| 1985 | std::vector<char*> rows(mergeRows_->numRows()); |
| 1986 | RowContainerIterator iter; |
| 1987 | if (!rows.empty()) { |
| 1988 | mergeRows_->listRows( |
| 1989 | &iter, rows.size(), RowContainer::kUnlimited, rows.data()); |
| 1990 | } |
| 1991 | extractGroups( |
| 1992 | folly::Range<char**>(rows.data(), rows.size()), result, excludeKey); |
| 1993 | mergeRows_->clear(); |
| 1994 | } |
| 1995 | |
| 1996 | void GroupingSet::extractSpillResultInRowFormat( |
| 1997 | const RowVectorPtr& result, |
| 1998 | const std::vector<std::pair<int32_t, int32_t>>& ranges) { |
| 1999 | auto numRows = mergeRows_->numRows(); |