Skip to content

Commit

Permalink
fix path equal
Browse files Browse the repository at this point in the history
  • Loading branch information
xtcyclist committed Mar 28, 2023
1 parent 18a95a8 commit f3aaf7f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/datatypes/Path.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ struct Step {
}

bool operator==(const Step& rhs) const {
return dst == rhs.dst && type == rhs.type && name == rhs.name && ranking == rhs.ranking &&
props == rhs.props;
return dst == rhs.dst && (type == rhs.type || type == -rhs.type) && name == rhs.name &&
ranking == rhs.ranking && props == rhs.props;
}

bool operator<(const Step& rhs) const {
Expand Down
14 changes: 14 additions & 0 deletions tests/tck/features/match/Path.feature
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ Feature: Matching paths
Then the result should be, in any order:
| count(p) | count(p2) |
| 966 | 966 |
When executing query:
"""
match p = (v:Label_5)-[e:Rel_0]->(v1:Label_1),
p2 = (v)<-[e1:Rel_0]-(v1)
where id(v) == 47
and p != p2
and e == e1
and v == v
and v1 == v1
return count(*)
"""
Then the result should be, in any order:
| count(*) |
| 0 |

# The correctness of the following test cases needs to be verified, mark it @skip for now
@skip
Expand Down

0 comments on commit f3aaf7f

Please sign in to comment.