| 97 | namespace { |
| 98 | |
| 99 | Status FuzzReadData(std::unique_ptr<FileReader> reader) { |
| 100 | auto final_status = Status::OK(); |
| 101 | for (int i = 0; i < reader->num_row_groups(); ++i) { |
| 102 | auto table_result = reader->ReadRowGroup(i); |
| 103 | if (table_result.ok()) { |
| 104 | // When reading returns successfully, the Arrow data should be structurally |
| 105 | // valid so that it can be read normally. If that is not the case, abort |
| 106 | // so that the error can be published by OSS-Fuzz. |
| 107 | auto table = *table_result; |
| 108 | ARROW_CHECK_OK(table->Validate()); |
| 109 | final_status &= table->ValidateFull(); |
| 110 | } |
| 111 | final_status &= table_result.status(); |
| 112 | } |
| 113 | return final_status; |
| 114 | } |
| 115 | |
| 116 | template <typename DType> |
| 117 | Status FuzzReadTypedColumnIndex(const TypedColumnIndex<DType>* index) { |
no test coverage detected