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


##########
cpp/src/parquet/arrow/fuzz_internal.cc:
##########
@@ -98,16 +98,15 @@ namespace {
 Status FuzzReadData(std::unique_ptr<FileReader> reader) {
   auto final_status = Status::OK();
   for (int i = 0; i < reader->num_row_groups(); ++i) {
-    std::shared_ptr<Table> table;
-    auto row_group_status = reader->ReadRowGroup(i, &table);
-    if (row_group_status.ok()) {
+    auto table_result = reader->ReadRowGroup(i);
+    if (table_result.ok()) {
       // When reading returns successfully, the Arrow data should be 
structurally
       // valid so that it can be read normally. If that is not the case, abort
       // so that the error can be published by OSS-Fuzz.
-      ARROW_CHECK_OK(table->Validate());
-      row_group_status &= table->ValidateFull();
+      ARROW_CHECK_OK((*table_result)->Validate());
+      final_status &= (*table_result)->ValidateFull();

Review Comment:
   Let's assign `*table_result`:
   
   ```suggestion
         auto table = *table_result;
         ARROW_CHECK_OK(table->Validate());
         final_status &= table->ValidateFull();
   ```



##########
cpp/src/parquet/arrow/arrow_reader_writer_test.cc:
##########
@@ -2453,10 +2453,10 @@ TEST(TestArrowReadWrite, ReadSingleRowGroup) {
 
   std::shared_ptr<Table> r1, r2, r3, r4;
   // Read everything
-  ASSERT_OK_NO_THROW(reader->ReadRowGroup(0, &r1));
+  ASSERT_OK_AND_ASSIGN(r1, reader->ReadRowGroup(0));
   ASSERT_OK_NO_THROW(reader->RowGroup(1)->ReadTable(&r2));

Review Comment:
   Let's work on it as a separated task.



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