kou commented on code in PR #47164:
URL: https://github.com/apache/arrow/pull/47164#discussion_r2320611094


##########
cpp/src/arrow/table.h:
##########
@@ -203,11 +204,24 @@ class ARROW_EXPORT Table {
   /// \brief Return the number of rows (equal to each column's logical length)
   int64_t num_rows() const { return num_rows_; }
 
-  /// \brief Determine if tables are equal
+  /// \brief Determine if two tables are equal
   ///
-  /// Two tables can be equal only if they have equal schemas.
-  /// However, they may be equal even if they have different chunkings.
-  bool Equals(const Table& other, bool check_metadata = false) const;
+  /// \param[in] other the Table to compare with
+  /// \param[in] opts the options for equality comparisons
+  /// \return true if tables are equal
+  bool Equals(const Table& other, const EqualOptions& opts) const;
+
+  /// \brief Determine if two tables are equal
+  ///
+  /// \param[in] other the Table to compare with

Review Comment:
   ```suggestion
     /// \param[in] other the table to compare with
   ```



##########
cpp/src/arrow/table.h:
##########
@@ -203,11 +204,24 @@ class ARROW_EXPORT Table {
   /// \brief Return the number of rows (equal to each column's logical length)
   int64_t num_rows() const { return num_rows_; }
 
-  /// \brief Determine if tables are equal
+  /// \brief Determine if two tables are equal
   ///
-  /// Two tables can be equal only if they have equal schemas.
-  /// However, they may be equal even if they have different chunkings.
-  bool Equals(const Table& other, bool check_metadata = false) const;
+  /// \param[in] other the Table to compare with

Review Comment:
   ```suggestion
     /// \param[in] other the table to compare with
   ```



##########
cpp/src/arrow/table.h:
##########
@@ -203,11 +204,24 @@ class ARROW_EXPORT Table {
   /// \brief Return the number of rows (equal to each column's logical length)
   int64_t num_rows() const { return num_rows_; }
 
-  /// \brief Determine if tables are equal
+  /// \brief Determine if two tables are equal
   ///
-  /// Two tables can be equal only if they have equal schemas.
-  /// However, they may be equal even if they have different chunkings.
-  bool Equals(const Table& other, bool check_metadata = false) const;
+  /// \param[in] other the Table to compare with
+  /// \param[in] opts the options for equality comparisons
+  /// \return true if tables are equal

Review Comment:
   ```suggestion
     /// \return true if two tables are equal
   ```



##########
cpp/src/arrow/table_test.cc:
##########
@@ -152,38 +153,234 @@ TEST_F(TestTable, AllColumnsAndFields) {
   ASSERT_EQ(0, fields.size());
 }
 
-TEST_F(TestTable, Equals) {
-  const int length = 100;
-  MakeExample1(length);
+class TestTableEquality : public TestTable {};
 
-  table_ = Table::Make(schema_, columns_);
+TEST_F(TestTableEquality, Equals) {

Review Comment:
   It seems that we don't need to inherit `TestTable` because 
`TestTableEquality` doesn't use `MakeExample1()`.
   
   How about using `TEST(TestTableEquality, Equals)`?



##########
cpp/src/arrow/table.h:
##########
@@ -203,11 +204,24 @@ class ARROW_EXPORT Table {
   /// \brief Return the number of rows (equal to each column's logical length)
   int64_t num_rows() const { return num_rows_; }
 
-  /// \brief Determine if tables are equal
+  /// \brief Determine if two tables are equal
   ///
-  /// Two tables can be equal only if they have equal schemas.
-  /// However, they may be equal even if they have different chunkings.
-  bool Equals(const Table& other, bool check_metadata = false) const;
+  /// \param[in] other the Table to compare with
+  /// \param[in] opts the options for equality comparisons
+  /// \return true if tables are equal
+  bool Equals(const Table& other, const EqualOptions& opts) const;
+
+  /// \brief Determine if two tables are equal
+  ///
+  /// \param[in] other the Table to compare with
+  /// \param[in] check_metadata if true, the schema metadata will be compared,
+  ///            regardless of the value set in \ref EqualOptions::use_metadata
+  /// \param[in] opts the options for equality comparisons
+  /// \return true if tables are equal

Review Comment:
   ```suggestion
     /// \return true if two tables are equal
   ```



-- 
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: github-unsubscr...@arrow.apache.org

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

Reply via email to