| 172 | } |
| 173 | |
| 174 | Result<std::shared_ptr<Array>> InferringColumnDecoder::RunInference( |
| 175 | const std::shared_ptr<BlockParser>& parser) { |
| 176 | while (true) { |
| 177 | // (no one else should be updating converter_ concurrently) |
| 178 | auto maybe_array = converter_->Convert(*parser, col_index_); |
| 179 | |
| 180 | if (maybe_array.ok() || !infer_status_.can_loosen_type()) { |
| 181 | // Conversion succeeded, or failed definitively |
| 182 | DCHECK(!type_frozen_); |
| 183 | type_frozen_ = true; |
| 184 | return maybe_array; |
| 185 | } |
| 186 | // Conversion failed temporarily, try another type |
| 187 | infer_status_.LoosenType(maybe_array.status()); |
| 188 | auto update_status = UpdateType(); |
| 189 | if (!update_status.ok()) { |
| 190 | return update_status; |
| 191 | } |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | Future<std::shared_ptr<Array>> InferringColumnDecoder::Decode( |
| 196 | const std::shared_ptr<BlockParser>& parser) { |
nothing calls this directly
no test coverage detected