wgtmac commented on code in PR #85:
URL: https://github.com/apache/iceberg-cpp/pull/85#discussion_r2055709443


##########
src/iceberg/table_metadata.cc:
##########
@@ -69,4 +76,100 @@ Result<std::shared_ptr<SortOrder>> 
TableMetadata::SortOrder() const {
   return *iter;
 }
 
+namespace {
+
+template <typename T>
+bool SharedPtrVectorEquals(const std::vector<std::shared_ptr<T>>& lhs,
+                           const std::vector<std::shared_ptr<T>>& rhs) {
+  if (lhs.size() != rhs.size()) {
+    return false;
+  }
+  for (size_t i = 0; i < lhs.size(); ++i) {
+    if (*lhs[i] != *rhs[i]) {

Review Comment:
   It could be null if there is something wrong. Since `operator==` is only 
used in the test case, it should be fine. I can add a `NullSafeEquals` later if 
this is required.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to