| 163 | |
| 164 | protected: |
| 165 | Status Init(MemoryPool* pool) override { |
| 166 | std::unique_ptr<BaseConverter> child_converter; |
| 167 | std::vector<std::shared_ptr<ArrayBuilder>> child_builders; |
| 168 | |
| 169 | struct_type_ = checked_cast<const StructType*>(this->type_.get()); |
| 170 | for (const auto& field : struct_type_->fields()) { |
| 171 | ARROW_ASSIGN_OR_RAISE(child_converter, |
| 172 | (MakeConverter<BaseConverter, ConverterTrait>( |
| 173 | field->type(), this->options_, pool))); |
| 174 | this->may_overflow_ |= child_converter->may_overflow(); |
| 175 | this->rewind_on_overflow_ = this->may_overflow_; |
| 176 | child_builders.push_back(child_converter->builder()); |
| 177 | children_.push_back(std::move(child_converter)); |
| 178 | } |
| 179 | |
| 180 | this->builder_ = |
| 181 | std::make_shared<StructBuilder>(this->type_, pool, std::move(child_builders)); |
| 182 | struct_builder_ = checked_cast<StructBuilder*>(this->builder_.get()); |
| 183 | |
| 184 | return Status::OK(); |
| 185 | } |
| 186 | |
| 187 | const StructType* struct_type_; |
| 188 | StructBuilder* struct_builder_; |
nothing calls this directly
no test coverage detected