Alexey Serbin has posted comments on this change.

Change subject: [Timestamp] use 'operator<' instead of ComesBefore
......................................................................


Patch Set 3:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/5096/3/src/kudu/common/timestamp.h
File src/kudu/common/timestamp.h:

Line 87: inline int Timestamp::CompareTo(const Timestamp& other) const {
> Do we still need this routine or is this leftover ?
The only usage of this now is in the template DeltaKey::CompareTo<>() method, 
which I found is not that easy to remove (yes, it would be possible to replace 
the call of this method with multiple comparisons down there, but I found it 
not elegant).  Speaking of properly modifying the DeltaKey::CompareTo<>-related 
stuff, I would do that in a separate changelist.

However, once that done we can obsolete this method.


Line 109:   return rhs < lhs;
> Should this be rhs.v < lhs.v ?
Nope, this is how you define '>' operator using '<': you just swap arguments :)


Line 113:   return !(lhs > rhs);
> same as above.
same as above, too, but now for '<=' and '>' operator pairs :)


Line 117:   return !(lhs < rhs);
> same as above.
same as above, too :)


-- 
To view, visit http://gerrit.cloudera.org:8080/5096
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4a5b0f90e92f6de40822cfe872b417cf0c53121a
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Dinesh Bhat <din...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-HasComments: Yes

Reply via email to