You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- query: select min(col3) from T2 group by col1, col2;
186
-
- supported_version: 4.1.9.0
187
174
- explain: "ISCAN(MV2 <,>) | MAP (_ AS _0) | AGG (min_l(_._0.COL3) AS _0) GROUP BY (_._0.COL1 AS _0, _._0.COL2 AS _1) | MAP (_._1._0 AS _0)"
188
175
- result: [{!l 1}, {!l 2}, {!l 3}]
189
-
-
190
-
- query: select min(col3) from T2 group by col1, col2;
191
-
# Cannot use FORCE_CONTINUATIONS with older versions due to: https://github.com/FoundationDB/fdb-record-layer/issues/3096
192
-
# (Extra values being produced after exhausting source of an aggregate cursor)
193
-
# Can remove once we do not care about backwards compatibility before 4.1.9.0
194
-
- maxRows: 1
195
-
- initialVersionLessThan: 4.1.9.0
196
-
# Different (incorrect) behavior for different past versions
197
-
- initialVersionAtLeast: 4.1.9.0
198
-
- result: [{!l 1}]
199
-
- result: [{!l 2}]
200
-
- result: [{!l 3}]
201
-
- result: []
202
176
-
203
177
# this should use the aggregate index in the future, for now, it is using streaming aggregate
204
178
# over base table scan.
205
179
- query: select max(col2) from t2;
206
-
- supported_version: 4.1.9.0
207
180
- explain: "ISCAN(MV3 <,>) | MAP (_ AS _0) | AGG (max_l(_._0.COL2) AS _0) | ON EMPTY NULL | MAP (_._0._0 AS _0)"
208
181
- result: [{!l 2}]
209
-
-
210
-
- query: select max(col2) from t2;
211
-
# Cannot use FORCE_CONTINUATIONS with older versions due to: https://github.com/FoundationDB/fdb-record-layer/issues/3096
212
-
# (Extra values being produced after exhausting source of an aggregate cursor)
213
-
# Can remove once we do not care about backwards compatibility before 4.1.9.0
214
-
- supported_version: 4.1.9.0
215
-
- maxRows: 1
216
-
- initialVersionLessThan: 4.1.9.0
217
-
- result: [{!l 2}]
218
-
- result: [{!null _}]
219
-
- result: [{!l 2}] # ad infinitum
220
-
- initialVersionAtLeast: 4.1.9.0
221
-
- result: [{!l 2}]
222
-
- result: []
223
182
-
224
183
- query: select col1, sum(col2) from T1 USE INDEX (vi1) group by col1;
225
184
- explain: "ISCAN(VI1 <,>) | MAP (_ AS _0) | AGG (sum_l(_._0.COL2) AS _0) GROUP BY (_._0.COL1 AS _0) | MAP (_._0._0 AS COL1, _._1._0 AS _1)"
@@ -273,28 +232,12 @@ test_block:
273
232
-
274
233
# Permuted max index can also be used to evaluate other aggregate functions via aggregation and roll-up
275
234
- query: select col3, sum(col2) as s from t2 use index (mv9) where col1 = 1 group by col1, col3 order by col3 asc;
276
-
- supported_version: 4.1.9.0
277
235
- explain: "ISCAN(MV9 [EQUALS promote(@c20 AS LONG)]) | MAP (_ AS _0) | AGG (sum_l(_._0.COL2) AS _0) GROUP BY (_._0.COL1 AS _0, _._0.COL3 AS _1) | MAP (_._0._1 AS COL3, _._1._0 AS S)"
- query: select col3, sum(col2) as s from t2 use index (mv9) where col1 = 1 group by col1, col3 order by col3 desc;
288
-
- supported_version: 4.1.9.0
289
239
- explain: "ISCAN(MV9 [EQUALS promote(@c20 AS LONG)] REVERSE) | MAP (_ AS _0) | AGG (sum_l(_._0.COL2) AS _0) GROUP BY (_._0.COL1 AS _0, _._0.COL3 AS _1) | MAP (_._0._1 AS COL3, _._1._0 AS S)"
0 commit comments