| 109 | const bool full_validation; |
| 110 | |
| 111 | Status Validate() { |
| 112 | if (data.type == nullptr) { |
| 113 | return Status::Invalid("Array type is absent"); |
| 114 | } |
| 115 | |
| 116 | // XXX should we unpack extension types here? |
| 117 | |
| 118 | RETURN_NOT_OK(ValidateLayout(*data.type)); |
| 119 | // Check nulls *after* validating the buffer sizes, to avoid |
| 120 | // reading out of bounds. |
| 121 | RETURN_NOT_OK(ValidateNulls(*data.type)); |
| 122 | |
| 123 | // Run type-specific validations |
| 124 | return ValidateWithType(*data.type); |
| 125 | } |
| 126 | |
| 127 | Status ValidateWithType(const DataType& type) { |
| 128 | if (type.id() != Type::EXTENSION) { |
no test coverage detected