Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions yaml-tests/src/test/resources/aggregate-empty-table.yamsql
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,6 @@ test_block:
- error: "0AF00"
-
- query: select count(*) from T2;
# Cannot support FORCE_CONTINUATIONS due to non-empty aggregate scan returning a begin continuation.
# See: https://github.com/FoundationDB/fdb-record-layer/issues/3206
- maxRows: 0
- explain: "AISCAN(T2_I1 <,> BY_GROUP -> [_0: VALUE:[0]]) | MAP (_ AS _0) | ON EMPTY NULL | MAP (coalesce_long(_._0._0, promote(0l AS LONG)) AS _0)"
- result: [{0}]
-
Expand Down Expand Up @@ -405,9 +402,6 @@ test_block:
-
- query: select count(col2) from T2;
- explain: "AISCAN(T2_I3 <,> BY_GROUP -> [_0: VALUE:[0]]) | MAP (_ AS _0) | ON EMPTY NULL | MAP (coalesce_long(_._0._0, promote(0l AS LONG)) AS _0)"
# Cannot support FORCE_CONTINUATIONS due to non-empty aggregate scan returning a begin continuation.
# See: https://github.com/FoundationDB/fdb-record-layer/issues/3206
- maxRows: 0
- result: [{0}]
-
- query: select count(col2) from T2 where col1 = 0;
Expand Down Expand Up @@ -479,10 +473,7 @@ test_block:
# - subtract the indexed value when the corresponding tuple is removed from the base table.
# - if the sum reaches zero, it keeps it in the sum index and does not remove the entry from there.
- query: select sum(col1) from T2;
# Cannot support FORCE_CONTINUATIONS due to non-empty aggregate scan returning a begin continuation.
# See: https://github.com/FoundationDB/fdb-record-layer/issues/3206
- explain: "AISCAN(T2_I5 <,> BY_GROUP -> [_0: VALUE:[0]]) | MAP (_ AS _0) | ON EMPTY NULL | MAP (_._0._0 AS _0)"
- maxRows: 0
- result: [{0}]
-
- query: select sum(col1) from T2 where col1 = 0;
Expand Down
26 changes: 0 additions & 26 deletions yaml-tests/src/test/resources/aggregate-index-tests-count.yamsql
Original file line number Diff line number Diff line change
Expand Up @@ -47,37 +47,15 @@ test_block:
-
- query: select count(*) from t1
- explain: "AISCAN(MV1 <,> BY_GROUP -> [_0: VALUE:[0]]) | MAP (_ AS _0) | ON EMPTY NULL | MAP (coalesce_long(_._0._0, promote(0l AS LONG)) AS _0)"
# Cannot run with FORCE_CONTINUATIONS due to: https://github.com/FoundationDB/fdb-record-layer/issues/3206
- maxRows: 0
- result: [{4}]
-
- query: select count(*) from t1
- explain: "AISCAN(MV1 <,> BY_GROUP -> [_0: VALUE:[0]]) | MAP (_ AS _0) | ON EMPTY NULL | MAP (coalesce_long(_._0._0, promote(0l AS LONG)) AS _0)"
# https://github.com/FoundationDB/fdb-record-layer/issues/3206 is fixed since 4.8.1.0
- maxRows: 1
- initialVersionAtLeast: 4.8.1.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, but I believe that this change will result in mixed mode failures when run with versions prior to 4.8.1.0. Which should be okay at some point, but we may want to hold off until we no longer care about checking for compatibility with versions older than that, which may mean another two weeks

- result: [{4}]
- result: []
- initialVersionLessThan: 4.8.1.0
-
- query: select count(*) from t1 group by col2
- explain: "AISCAN(MV2 <,> BY_GROUP -> [_0: KEY:[0], _1: VALUE:[0]]) | MAP (_._1 AS _0)"
- result: [{1}, {3}]
-
- query: select count(col1) from t1
- explain: "AISCAN(MV3 <,> BY_GROUP -> [_0: VALUE:[0]]) | MAP (_ AS _0) | ON EMPTY NULL | MAP (coalesce_long(_._0._0, promote(0l AS LONG)) AS _0)"
# Cannot run with FORCE_CONTINUATIONS due to: https://github.com/FoundationDB/fdb-record-layer/issues/3206
- maxRows: 0
- result: [{2}]
-
- query: select count(col1) from t1
- explain: "AISCAN(MV3 <,> BY_GROUP -> [_0: VALUE:[0]]) | MAP (_ AS _0) | ON EMPTY NULL | MAP (coalesce_long(_._0._0, promote(0l AS LONG)) AS _0)"
# https://github.com/FoundationDB/fdb-record-layer/issues/3206 is fixed since 4.8.1.0
- maxRows: 1
- initialVersionAtLeast: 4.8.1.0
- result: [{2}]
- result: []
- initialVersionLessThan: 4.8.1.0
-
- query: select count(col1) from t1 group by col2
- explain: "AISCAN(MV4 <,> BY_GROUP -> [_0: KEY:[0], _1: VALUE:[0]]) | MAP (_._1 AS _0)"
Expand All @@ -103,8 +81,6 @@ test_block:
-
- query: select count(*) from t2
- explain: "ISCAN(MV5 <,>) | MAP (_ AS _0) | AGG (count_star(*) AS _0) | ON EMPTY NULL | MAP (coalesce_long(_._0._0, promote(0l AS LONG)) AS _0)"
# Cannot run with FORCE_CONTINUATIONS due to: https://github.com/FoundationDB/fdb-record-layer/issues/3206
- maxRows: 0
- result: [{4}]
-
- query: select count(*) from t2 group by col2
Expand All @@ -113,8 +89,6 @@ test_block:
-
- query: select count(col1) from t2
- explain: "ISCAN(MV5 <,>) | MAP (_ AS _0) | AGG (count(_._0.COL1) AS _0) | ON EMPTY NULL | MAP (coalesce_long(_._0._0, promote(0l AS LONG)) AS _0)"
# Cannot run with FORCE_CONTINUATIONS due to: https://github.com/FoundationDB/fdb-record-layer/issues/3206
- maxRows: 0
- result: [{2}]
-
- query: select count(col1) from t2 group by col2
Expand Down
2 changes: 0 additions & 2 deletions yaml-tests/src/test/resources/aggregate-index-tests.yamsql
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,6 @@ test_block:
- result: [{!l 100}, {!l 200}, {!l 400}]
-
- query: select min_ever(col3) from t2
# Cannot enable FORCE_CONTINUATIONS with ungrouped aggregate scan because of: https://github.com/FoundationDB/fdb-record-layer/issues/3206
- maxRows: 0
- explain: "AISCAN(MV7 <,> BY_GROUP -> [_0: VALUE:[0]]) | MAP (_ AS _0) | ON EMPTY NULL | MAP (_._0._0 AS _0)"
- result: [{!l 1}]
-
Expand Down
1 change: 0 additions & 1 deletion yaml-tests/src/test/resources/catalog.yamsql
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ test_block:
- query: select sum(cnt) from (select count(*) as cnt, template_name, template_version from schemas
group by template_name, template_version having template_name = 'TEST_TEMPLATE_1' and template_version = 1) as t;
- explain: "AISCAN(TEMPLATES_COUNT_INDEX [EQUALS promote(@c29 AS STRING), EQUALS promote(@c33 AS INT)] BY_GROUP -> [_0: KEY:[0], _1: KEY:[1], _2: VALUE:[0]]) | MAP ((_._2 AS CNT, _._0 AS TEMPLATE_NAME, _._1 AS TEMPLATE_VERSION) AS _0) | AGG (sum_l(_._0.CNT) AS _0) | ON EMPTY NULL | MAP (_._0._0 AS _0)"
- maxRows: 0 # Disable force continuations because of empty continuation due to: https://github.com/FoundationDB/fdb-record-layer/issues/3206
- result: [{4}]
-
# how many unique templates in a cluster?
Expand Down
6 changes: 0 additions & 6 deletions yaml-tests/src/test/resources/distinct-from.yamsql
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,10 @@ test_block:
- result: [{ID: 6, 20, !null }, {ID: 7, 20, !null }, {ID: 8, 20, !null }, {ID: 9, 20, 9}, {ID: 10, 20, 10}]
-
- query: select count(*) from t1 WHERE null is not distinct from null
# Cannot support FORCE_CONTINUATIONS due to non-empty aggregate scan returning a begin continuation.
# See: https://github.com/FoundationDB/fdb-record-layer/issues/3206
- maxRows: 0
- explain: "AISCAN(CNT <,> BY_GROUP -> [_0: VALUE:[0]]) | FILTER NULL NOT_DISTINCT_FROM NULL | MAP (_ AS _0) | ON EMPTY NULL | MAP (coalesce_long(_._0._0, promote(0l AS LONG)) AS _0)"
- result: [{10}]
-
- query: select count(*) from t1 WHERE 10 is not distinct from 10
# Cannot support FORCE_CONTINUATIONS due to non-empty aggregate scan returning a begin continuation.
# See: https://github.com/FoundationDB/fdb-record-layer/issues/3206
- maxRows: 0
- explain: "AISCAN(CNT <,> BY_GROUP -> [_0: VALUE:[0]]) | FILTER @c9 NOT_DISTINCT_FROM @c9 | MAP (_ AS _0) | ON EMPTY NULL | MAP (coalesce_long(_._0._0, promote(0l AS LONG)) AS _0)"
- result: [{10}]
...
Loading