dongjoon-hyun commented on a change in pull request #543: URL: https://github.com/apache/orc/pull/543#discussion_r513174385
########## File path: c++/include/orc/sargs/Literal.hh ########## @@ -36,6 +36,33 @@ namespace orc { */ class Literal { public: + struct Timestamp { + Timestamp() = default; + Timestamp(const Timestamp&) = default; + Timestamp(Timestamp&&) = default; + ~Timestamp() = default; + Timestamp(int64_t second_, int32_t nano_): second(second_), nano(nano_) { + // PASS + } + Timestamp& operator=(const Timestamp&) = default; + Timestamp& operator=(Timestamp&&) = default; + bool operator==(const Timestamp& r) const { + return second == r.second && nano == r.nano; + } + bool operator<(const Timestamp& r) const { + return second < r.second || (second == r.second && nano < r.nano); + } + bool operator<=(const Timestamp& r) const { + return second < r.second || (second == r.second && nano <= r.nano); + } + bool operator!=(const Timestamp& r) const { return !(*this == r); } + bool operator>(const Timestamp& r) const { return r < *this; } + bool operator>=(const Timestamp& r) const { return r <= *this; } + int64_t getMillis() const { return second * 1000 + nano / 1000000; } Review comment: Could you add a test coverage fr `getMillis` function? I cannot find one so far. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org