Skip to content

Commit

Permalink
fix <>, <=, >= for id() comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
queryproc committed May 2, 2021
1 parent 1efbfc1 commit 4d4b1f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/common/include/operations/comparison_operations.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ inline uint8_t Equals::operation(const nodeID_t& left, const nodeID_t& right) {

template<>
inline uint8_t NotEquals::operation(const nodeID_t& left, const nodeID_t& right) {
return left.label != right.label && left.offset != right.offset;
return left.label != right.label || left.offset != right.offset;
};

/*******************************************************
Expand Down Expand Up @@ -324,7 +324,7 @@ inline uint8_t GreaterThan::operation(const nodeID_t& left, const nodeID_t& righ

template<>
inline uint8_t GreaterThanEquals::operation(const nodeID_t& left, const nodeID_t& right) {
return left.label >= right.label || (left.label == right.label && left.offset >= right.offset);
return left.label > right.label || (left.label == right.label && left.offset >= right.offset);
};

template<>
Expand All @@ -334,7 +334,7 @@ inline uint8_t LessThan::operation(const nodeID_t& left, const nodeID_t& right)

template<>
inline uint8_t LessThanEquals::operation(const nodeID_t& left, const nodeID_t& right) {
return left.label <= right.label || (left.label == right.label && left.offset <= right.offset);
return left.label < right.label || (left.label == right.label && left.offset <= right.offset);
};

/********************************************
Expand Down

0 comments on commit 4d4b1f4

Please sign in to comment.