|
20 | 20 | import org.elasticsearch.compute.aggregation.GroupingAggregatorFunction; |
21 | 21 | import org.elasticsearch.compute.aggregation.blockhash.BlockHash; |
22 | 22 | import org.elasticsearch.compute.data.Block; |
| 23 | +import org.elasticsearch.compute.data.IntArrayBlock; |
| 24 | +import org.elasticsearch.compute.data.IntBigArrayBlock; |
23 | 25 | import org.elasticsearch.compute.data.IntBlock; |
24 | 26 | import org.elasticsearch.compute.data.IntVector; |
| 27 | +import org.elasticsearch.compute.data.IntVectorBlock; |
25 | 28 | import org.elasticsearch.compute.data.Page; |
26 | 29 | import org.elasticsearch.core.Releasables; |
27 | 30 | import org.elasticsearch.core.TimeValue; |
@@ -158,6 +161,30 @@ public void add(int positionOffset, IntBlock groupIds) { |
158 | 161 | } |
159 | 162 | } |
160 | 163 |
|
| 164 | + @Override |
| 165 | + public void add(int positionOffset, IntVectorBlock groupIds) { |
| 166 | + IntVector groupIdsVector = groupIds.asVector(); |
| 167 | + add(positionOffset, groupIdsVector); |
| 168 | + } |
| 169 | + |
| 170 | + @Override |
| 171 | + public void add(int positionOffset, IntArrayBlock groupIds) { |
| 172 | + startAggEndHash(); |
| 173 | + for (GroupingAggregatorFunction.AddInput p : prepared) { |
| 174 | + p.add(positionOffset, groupIds); |
| 175 | + } |
| 176 | + end(); |
| 177 | + } |
| 178 | + |
| 179 | + @Override |
| 180 | + public void add(int positionOffset, IntBigArrayBlock groupIds) { |
| 181 | + startAggEndHash(); |
| 182 | + for (GroupingAggregatorFunction.AddInput p : prepared) { |
| 183 | + p.add(positionOffset, groupIds); |
| 184 | + } |
| 185 | + end(); |
| 186 | + } |
| 187 | + |
161 | 188 | @Override |
162 | 189 | public void add(int positionOffset, IntVector groupIds) { |
163 | 190 | startAggEndHash(); |
|
0 commit comments