zhjwpku commented on code in PR #653:
URL: https://github.com/apache/iceberg-cpp/pull/653#discussion_r3275046522


##########
src/iceberg/util/transform_util.cc:
##########
@@ -117,6 +199,21 @@ std::string TransformUtil::HumanTimestamp(int64_t 
timestamp_micros) {
   }
 }
 
+std::string TransformUtil::HumanTimestampNs(int64_t timestamp_nanos) {
+  auto tp = std::chrono::time_point<std::chrono::system_clock, 
std::chrono::seconds>{
+      std::chrono::seconds(timestamp_nanos / kNanosPerSecond)};
+  auto nanos = timestamp_nanos % kNanosPerSecond;

Review Comment:
   Good catch, fixed with some additional test cases.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to