squirreling 0.12.12 → 0.12.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/execute/aggregates.js +8 -13
package/package.json
CHANGED
|
@@ -102,7 +102,7 @@ export function executeHashAggregate(plan, context) {
|
|
|
102
102
|
group.push(row)
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
/** @type {{ row: AsyncRow,
|
|
105
|
+
/** @type {{ row: AsyncRow, rows: AsyncRow[], outputRow: AsyncRow }[]} */
|
|
106
106
|
const aggregateRows = []
|
|
107
107
|
|
|
108
108
|
for (const group of groups.values()) {
|
|
@@ -120,24 +120,19 @@ export function executeHashAggregate(plan, context) {
|
|
|
120
120
|
if (!passes) continue
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
aggregateRows.push({ row:
|
|
123
|
+
aggregateRows.push({ row: contextRow, rows: group, outputRow: asyncRow })
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
entries: aggregateRows
|
|
129
|
-
row: aggregateRow.contextRow,
|
|
130
|
-
rows: aggregateRow.group,
|
|
131
|
-
idx,
|
|
132
|
-
})),
|
|
126
|
+
const outputRows = plan.orderBy?.length
|
|
127
|
+
? await sortEntriesByTerms({
|
|
128
|
+
entries: aggregateRows,
|
|
133
129
|
orderBy: plan.orderBy,
|
|
134
130
|
context,
|
|
135
131
|
})
|
|
136
|
-
|
|
137
|
-
}
|
|
132
|
+
: aggregateRows
|
|
138
133
|
|
|
139
|
-
for (const {
|
|
140
|
-
yield
|
|
134
|
+
for (const { outputRow } of outputRows) {
|
|
135
|
+
yield outputRow
|
|
141
136
|
}
|
|
142
137
|
},
|
|
143
138
|
}
|