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
Copy file name to clipboardExpand all lines: fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/query/plan/plans/RecordQueryStreamingAggregationPlan.java
+2-1
Original file line number
Diff line number
Diff line change
@@ -370,7 +370,8 @@ public PRecordQueryStreamingAggregationPlan toProto(@Nonnull final PlanSerializa
- query: select min(col3) from T2 group by col1, col2;
164
+
- supported_version: !current_version
151
165
- 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)"
152
-
# 4.1 Triage: failed when running with forced continuations (result mismatch)
153
-
# - result: [{!l 1}, {!l 2}, {!l 3}]
166
+
- result: [{!l 1}, {!l 2}, {!l 3}]
167
+
-
168
+
- query: select min(col3) from T2 group by col1, col2;
169
+
# Cannot use FORCE_CONTINUATIONS with older versions due to: https://github.com/FoundationDB/fdb-record-layer/issues/3096
170
+
# (Extra values being produced after exhausting source of an aggregate cursor)
171
+
# Can remove once we do not care about backwards compatibility before !current_version
172
+
- maxRows: 1
173
+
- initialVersionLessThan: !current_version
174
+
- initialVersionAtLeast: !current_version
175
+
- result: [{!l 1}]
176
+
- result: [{!l 2}]
177
+
- result: [{!l 3}]
178
+
- result: []
154
179
-
155
180
# this should use the aggregate index in the future, for now, it is using streaming aggregate
156
181
# over base table scan.
157
182
- query: select max(col2) from t2;
183
+
- supported_version: !current_version
158
184
- explain: "ISCAN(MV3 <,>) | MAP (_ AS _0) | AGG (max_l(_._0.COL2) AS _0) | ON EMPTY NULL | MAP (_._0._0 AS _0)"
159
-
# 4.1 Triage: failed when running with forced continuations (result mismatch)
160
-
# - result: [{!l 2}]
185
+
- result: [{!l 2}]
186
+
-
187
+
- query: select max(col2) from t2;
188
+
# Cannot use FORCE_CONTINUATIONS with older versions due to: https://github.com/FoundationDB/fdb-record-layer/issues/3096
189
+
# (Extra values being produced after exhausting source of an aggregate cursor)
190
+
# Can remove once we do not care about backwards compatibility before !current_version
191
+
- supported_version: !current_version
192
+
- maxRows: 1
193
+
- initialVersionLessThan: !current_version
194
+
- result: [{!l 2}]
195
+
- result: [{!null _}]
196
+
- result: [{!l 2}] # ad infinitum
197
+
- initialVersionAtLeast: !current_version
198
+
- result: [{!l 2}]
199
+
- result: []
161
200
-
162
201
- query: select col1, sum(col2) from T1 USE INDEX (vi1) group by col1;
163
202
- 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)"
@@ -211,14 +250,28 @@ test_block:
211
250
-
212
251
# Permuted max index can also be used to evaluate other aggregate functions via aggregation and roll-up
213
252
- query: select col3, sum(col2) as s from t2 use index (mv9) where col1 = 1 group by col1, col3 order by col3 asc;
253
+
- supported_version: !current_version
214
254
- 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)"
215
-
# 4.1 Triage: failed when running with forced continuations (result mismatch)
- query: select col3, sum(col2) as s from t2 use index (mv9) where col1 = 1 group by col1, col3 order by col3 desc;
265
+
- supported_version: !current_version
219
266
- 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)"
220
-
# 4.1 Triage: failed when running with forced continuations (result mismatch)
0 commit comments