From cb1e44f63191fcaa9067979e7a6d1c3e75fb40d5 Mon Sep 17 00:00:00 2001 From: Shahzad Lone Date: Thu, 14 Sep 2023 10:37:02 -0400 Subject: [PATCH] PR: Shrink the tests furthur as we only care about the pattern showing typeIndexJoin with or without parallelNode. --- .../explain/default/with_average_join_test.go | 81 --------- .../explain/default/with_count_join_test.go | 171 ------------------ 2 files changed, 252 deletions(-) diff --git a/tests/integration/explain/default/with_average_join_test.go b/tests/integration/explain/default/with_average_join_test.go index 1612455e57..265ca932ce 100644 --- a/tests/integration/explain/default/with_average_join_test.go +++ b/tests/integration/explain/default/with_average_join_test.go @@ -387,87 +387,6 @@ func TestDefaultExplainRequestOneToManyWithAverageAndChildNeNilFilterSharesJoinF }, }, }, - - ExpectedFullGraph: []dataMap{ - { - "explain": dataMap{ - "selectTopNode": dataMap{ - "averageNode": dataMap{ - "countNode": dataMap{ - "sources": []dataMap{ - { - "filter": dataMap{ - "rating": dataMap{ - "_ne": nil, - }, - }, - "fieldName": "books", - }, - }, - "sumNode": dataMap{ - "sources": []dataMap{ - { - "filter": dataMap{ - "rating": dataMap{ - "_ne": nil, - }, - }, - "fieldName": "books", - "childFieldName": "rating", - }, - }, - "selectNode": dataMap{ - "_keys": nil, - "filter": nil, - "typeIndexJoin": dataMap{ - "joinType": "typeJoinMany", - "rootName": "author", - "root": dataMap{ - "scanNode": dataMap{ - "filter": nil, - "collectionID": "3", - "collectionName": "Author", - "spans": []dataMap{ - { - "start": "/3", - "end": "/4", - }, - }, - }, - }, - "subTypeName": "books", - "subType": dataMap{ - "selectTopNode": dataMap{ - "selectNode": dataMap{ - "_keys": nil, - "filter": nil, - "scanNode": dataMap{ - "filter": dataMap{ - "rating": dataMap{ - "_ne": nil, - }, - }, - "collectionID": "2", - "collectionName": "Book", - "spans": []dataMap{ - { - "start": "/2", - "end": "/3", - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, }, }, } diff --git a/tests/integration/explain/default/with_count_join_test.go b/tests/integration/explain/default/with_count_join_test.go index 30ec8011fb..3f7802820d 100644 --- a/tests/integration/explain/default/with_count_join_test.go +++ b/tests/integration/explain/default/with_count_join_test.go @@ -296,72 +296,6 @@ func TestDefaultExplainRequestOneToManyWithCountWithFilterAndChildFilterSharesJo }, }, }, - - ExpectedFullGraph: []dataMap{ - { - "explain": dataMap{ - "selectTopNode": dataMap{ - "countNode": dataMap{ - "sources": []dataMap{ - { - "filter": dataMap{ - "rating": dataMap{ - "_ne": nil, - }, - }, - "fieldName": "books", - }, - }, - "selectNode": dataMap{ - "_keys": nil, - "filter": nil, - "typeIndexJoin": dataMap{ - "joinType": "typeJoinMany", - "rootName": "author", - "root": dataMap{ - "scanNode": dataMap{ - "filter": nil, - "collectionID": "3", - "collectionName": "Author", - "spans": []dataMap{ - { - "start": "/3", - "end": "/4", - }, - }, - }, - }, - "subTypeName": "books", - "subType": dataMap{ - "selectTopNode": dataMap{ - "selectNode": dataMap{ - "_keys": nil, - "filter": nil, - "scanNode": dataMap{ - "filter": dataMap{ - "rating": dataMap{ - "_ne": nil, - }, - }, - "collectionID": "2", - "collectionName": "Book", - "spans": []dataMap{ - { - "start": "/2", - "end": "/3", - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, }, }, } @@ -411,111 +345,6 @@ func TestDefaultExplainRequestOneToManyWithCountAndChildFilterDoesNotShareJoinFi }, }, }, - - ExpectedFullGraph: []dataMap{ - { - "explain": dataMap{ - "selectTopNode": dataMap{ - "countNode": dataMap{ - "sources": []dataMap{ - { - "fieldName": "books", - "filter": nil, - }, - }, - "selectNode": dataMap{ - "_keys": nil, - "filter": nil, - "parallelNode": []dataMap{ - { - "typeIndexJoin": dataMap{ - "joinType": "typeJoinMany", - "rootName": "author", - "root": dataMap{ - "scanNode": dataMap{ - "collectionID": "3", - "collectionName": "Author", - "filter": nil, - "spans": []dataMap{ - { - "start": "/3", - "end": "/4", - }, - }, - }, - }, - "subTypeName": "books", - "subType": dataMap{ - "selectTopNode": dataMap{ - "selectNode": dataMap{ - "_keys": nil, - "filter": nil, - "scanNode": dataMap{ - "collectionID": "2", - "collectionName": "Book", - "filter": dataMap{ - "rating": dataMap{ - "_ne": nil, - }, - }, - "spans": []dataMap{ - { - "start": "/2", - "end": "/3", - }, - }, - }, - }, - }, - }, - }, - }, - { - "typeIndexJoin": dataMap{ - "joinType": "typeJoinMany", - "rootName": "author", - "root": dataMap{ - "scanNode": dataMap{ - "collectionID": "3", - "collectionName": "Author", - "filter": nil, - "spans": []dataMap{ - { - "start": "/3", - "end": "/4", - }, - }, - }, - }, - "subTypeName": "books", - "subType": dataMap{ - "selectTopNode": dataMap{ - "selectNode": dataMap{ - "_keys": nil, - "filter": nil, - "scanNode": dataMap{ - "collectionID": "2", - "collectionName": "Book", - "filter": nil, - "spans": []dataMap{ - { - "start": "/2", - "end": "/3", - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, }, }, }