Skip to content

Commit

Permalink
fix go mTOn filter bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nevermore3 committed Oct 19, 2021
1 parent 32db50a commit 36aab70
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/graph/planner/ngql/GoPlanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ SubPlan GoPlanner::mToNStepsPlan(SubPlan& startVidPlan) {
}

const auto& projectInput =
(joinInput || joinDst) ? loopBody->outputVar() : sampleLimit->outputVar();
(loopBody != getDst) ? loopBody->outputVar() : sampleLimit->outputVar();
loopBody = Project::make(qctx, loopBody, goCtx_->yieldExpr);
loopBody->setInputVar(projectInput);
loopBody->setColNames(std::move(goCtx_->colNames));
Expand Down
16 changes: 16 additions & 0 deletions tests/tck/features/go/GO.IntVid.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,22 @@ Feature: IntegerVid Go Sentence
| EMPTY | "Russell Westbrook" |
| EMPTY | "Luka Doncic" |
| EMPTY | "Russell Westbrook" |
When executing query:
"""
go 1 to 4 steps from hash("Tim Duncan") over like where like.likeness > 90 yield like.likeness, edge as e
"""
Then the result should be, in any order, with relax comparison:
| like.likeness | e |
| 95 | [:like "Tim Duncan"->"Manu Ginobili" @0 {likeness: 95}] |
| 95 | [:like "Tim Duncan"->"Tony Parker" @0 {likeness: 95}] |
| 95 | [:like "Tony Parker"->"Manu Ginobili" @0 {likeness: 95}] |
| 95 | [:like "Tony Parker"->"Tim Duncan" @0 {likeness: 95}] |
| 95 | [:like "Tim Duncan"->"Manu Ginobili" @0 {likeness: 95}] |
| 95 | [:like "Tim Duncan"->"Tony Parker" @0 {likeness: 95}] |
| 95 | [:like "Tony Parker"->"Manu Ginobili" @0 {likeness: 95}] |
| 95 | [:like "Tony Parker"->"Tim Duncan" @0 {likeness: 95}] |
| 95 | [:like "Tim Duncan"->"Manu Ginobili" @0 {likeness: 95}] |
| 95 | [:like "Tim Duncan"->"Tony Parker" @0 {likeness: 95}] |

Scenario: Integer Vid error message
When executing query:
Expand Down
17 changes: 17 additions & 0 deletions tests/tck/features/go/GO.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# This source code is licensed under Apache 2.0 License,
# attached with Common Clause Condition 1.0, found in the LICENSES directory.
@jmq
Feature: Go Sentence

Background:
Expand Down Expand Up @@ -1490,6 +1491,22 @@ Feature: Go Sentence
| EMPTY | "Russell Westbrook" |
| EMPTY | "Luka Doncic" |
| EMPTY | "Russell Westbrook" |
When executing query:
"""
go 1 to 4 steps from "Tim Duncan" over like where like.likeness > 90 yield like.likeness, edge as e
"""
Then the result should be, in any order, with relax comparison:
| like.likeness | e |
| 95 | [:like "Tim Duncan"->"Manu Ginobili" @0 {likeness: 95}] |
| 95 | [:like "Tim Duncan"->"Tony Parker" @0 {likeness: 95}] |
| 95 | [:like "Tony Parker"->"Manu Ginobili" @0 {likeness: 95}] |
| 95 | [:like "Tony Parker"->"Tim Duncan" @0 {likeness: 95}] |
| 95 | [:like "Tim Duncan"->"Manu Ginobili" @0 {likeness: 95}] |
| 95 | [:like "Tim Duncan"->"Tony Parker" @0 {likeness: 95}] |
| 95 | [:like "Tony Parker"->"Manu Ginobili" @0 {likeness: 95}] |
| 95 | [:like "Tony Parker"->"Tim Duncan" @0 {likeness: 95}] |
| 95 | [:like "Tim Duncan"->"Manu Ginobili" @0 {likeness: 95}] |
| 95 | [:like "Tim Duncan"->"Tony Parker" @0 {likeness: 95}] |

Scenario: error message
When executing query:
Expand Down

0 comments on commit 36aab70

Please sign in to comment.