MCPcopy Create free account
hub / github.com/apache/arrow / RunInference

Method RunInference

cpp/src/arrow/csv/column_decoder.cc:174–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174Result<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
195Future<std::shared_ptr<Array>> InferringColumnDecoder::Decode(
196 const std::shared_ptr<BlockParser>& parser) {

Callers

nothing calls this directly

Calls 5

can_loosen_typeMethod · 0.80
LoosenTypeMethod · 0.80
ConvertMethod · 0.45
okMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected