diff --git a/tests/tck/features/optimizer/PushFilterDownInnerJoinRule.feature b/tests/tck/features/optimizer/PushFilterDownInnerJoinRule.feature new file mode 100644 index 00000000000..487a5fc6863 --- /dev/null +++ b/tests/tck/features/optimizer/PushFilterDownInnerJoinRule.feature @@ -0,0 +1,31 @@ +# Copyright (c) 2021 vesoft inc. All rights reserved. +# +# This source code is licensed under Apache 2.0 License. +Feature: Push Filter down InnerJoin rule + + Background: + Given a graph with space named "nba" + + Scenario: push filter down InnerJoin + When profiling query: + """ + LOOKUP ON player WHERE player.name == "Tony Parker" + YIELD id(vertex) as id | + GO FROM $-.id OVER like + WHERE (like.likeness - 1) >= 0 + YIELD like._src AS src_id, like._dst AS dst_id, like.likeness AS likeness + """ + Then the result should be, in any order: + | src_id | dst_id | likeness | + | "Tony Parker" | "LaMarcus Aldridge" | 90 | + | "Tony Parker" | "Manu Ginobili" | 95 | + | "Tony Parker" | "Tim Duncan" | 95 | + And the execution plan should be: + | id | name | dependencies | operator info | + | 10 | Project | 15 | | + | 15 | InnerJoin | 17 | | + | 17 | Project | 18 | | + | 18 | GetNeighbors | 3 | | + | 3 | Project | 11 | | + | 11 | TagIndexPrefixScan | 0 | | + | 0 | Start | | | diff --git a/tests/tck/features/optimizer/PushFilterDownLeftJoinRule.feature b/tests/tck/features/optimizer/PushFilterDownLeftJoinRule.feature index 0eb9994526b..74a4cdabb4c 100644 --- a/tests/tck/features/optimizer/PushFilterDownLeftJoinRule.feature +++ b/tests/tck/features/optimizer/PushFilterDownLeftJoinRule.feature @@ -22,23 +22,23 @@ Feature: Push Filter down LeftJoin rule | "Tim Duncan" | And the execution plan should be: | id | name | dependencies | operator info | - | 24 | Project | 23 | | - | 23 | Filter | 22 | | - | 22 | InnerJoin | 21 | | + | 24 | Project | 34 | | + | 34 | InnerJoin | 33 | | + | 33 | Filter | 21 | | | 21 | LeftJoin | 20 | | | 20 | Project | 19 | | | 19 | GetVertices | 18 | | - | 18 | Project | 31 | | - | 31 | GetNeighbors | 14 | | - | 14 | Project | 13 | | - | 13 | Filter | 12 | | - | 12 | InnerJoin | 11 | | + | 18 | Project | 30 | | + | 30 | GetNeighbors | 14 | | + | 14 | Project | 32 | | + | 32 | InnerJoin | 31 | | + | 31 | Filter | 11 | | | 11 | LeftJoin | 10 | | | 10 | Project | 9 | | | 9 | GetVertices | 8 | | - | 8 | Project | 30 | | - | 30 | GetNeighbors | 27 | | - | 27 | Project | 25 | | + | 8 | Project | 29 | | + | 29 | GetNeighbors | 26 | | + | 26 | Project | 25 | | | 25 | TagIndexPrefixScan | 0 | | | 0 | Start | | | When profiling query: