| 246 | } |
| 247 | |
| 248 | void TableWriteStep::allocate(const ContextPtr & context) |
| 249 | { |
| 250 | auto storage_id = target->getStorage()->prepareTableWrite(context); |
| 251 | if (auto * input_target = dynamic_cast<InsertTarget *>(target.get())) |
| 252 | target = std::make_shared<InsertTarget>(input_target->getStorage(), storage_id, input_target->getColumns(), input_target->getQuery()); |
| 253 | else |
| 254 | throw Exception("unknown TableWrite::Target", ErrorCodes::LOGICAL_ERROR); |
| 255 | } |
| 256 | |
| 257 | void TableWriteStep::Target::toProto(Protos::TableWriteStep::Target & proto) const |
| 258 | { |
nothing calls this directly
no test coverage detected