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


##########
cpp/src/arrow/record_batch_test.cc:
##########
@@ -64,44 +65,98 @@ class TestRecordBatch : public ::testing::Test {};
 TEST_F(TestRecordBatch, Equals) {
   const int length = 10;
 
+  auto f0 = field("f0", int32());
+  auto f1 = field("f1", uint8());
+  auto f2 = field("f2", int16());
+
+  auto schema0_f0_f1_f2 = schema({f0, f1, f2});
+  auto schema1_f0_f1_f2 = schema({f0, f1, f2});
+  auto schema2_f0_f1 = schema({f0, f1});

Review Comment:
   Can we use intention instead of content for name?
   
   ```suggestion
     auto schema = schema({f0, f1, f2});
     auto schema_same = schema({f0, f1, f2});
     auto schema_different = schema({f0, f1});
   ```



##########
cpp/src/arrow/record_batch_test.cc:
##########
@@ -64,44 +65,98 @@ class TestRecordBatch : public ::testing::Test {};
 TEST_F(TestRecordBatch, Equals) {
   const int length = 10;
 
+  auto f0 = field("f0", int32());
+  auto f1 = field("f1", uint8());
+  auto f2 = field("f2", int16());
+
+  auto schema0_f0_f1_f2 = schema({f0, f1, f2});
+  auto schema1_f0_f1_f2 = schema({f0, f1, f2});
+  auto schema2_f0_f1 = schema({f0, f1});
+
+  random::RandomArrayGenerator gen(42);
+
+  auto a0 = gen.ArrayOf(int32(), length);
+  auto a1 = gen.ArrayOf(uint8(), length);
+  auto a2 = gen.ArrayOf(int16(), length);
+  auto a3 = a0->Slice(0, length / 2);
+  auto a4 = a1->Slice(0, length / 2);
+  auto a5 = gen.ArrayOf(int32(), length);
+  auto a6 = gen.ArrayOf(uint8(), length);

Review Comment:
   ```suggestion
     auto a_f0 = gen.ArrayOf(int32(), length);
     auto a_f1 = gen.ArrayOf(uint8(), length);
     auto a_f2 = gen.ArrayOf(int16(), length);
     auto a_f0_half = a_f0->Slice(0, length / 2);
     auto a_f1_half = a_f1->Slice(0, length / 2);
     auto a_f0_different = gen.ArrayOf(int32(), length);
     auto a_f1_different = gen.ArrayOf(uint8(), length);
   ```



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

Reply via email to