| 242 | } |
| 243 | |
| 244 | void DataPartStorageOnDiskFull::copyFileFrom(const IDataPartStorage & source, const std::string & from, const std::string & to) |
| 245 | { |
| 246 | const auto * source_on_disk = typeid_cast<const DataPartStorageOnDiskFull *>(&source); |
| 247 | if (!source_on_disk) |
| 248 | throw Exception( |
| 249 | ErrorCodes::LOGICAL_ERROR, |
| 250 | "Cannot create copy file from different storage. Expected DataPartStorageOnDiskFull, got {}", |
| 251 | typeid(source).name()); |
| 252 | |
| 253 | /// Copying files between different disks is |
| 254 | /// not supported in disk transactions. |
| 255 | source_on_disk->getDisk()->copyFile( |
| 256 | fs::path(source_on_disk->getRelativePath()) / from, |
| 257 | *volume->getDisk(), |
| 258 | fs::path(root_path) / part_dir / to, |
| 259 | getReadSettings()); |
| 260 | } |
| 261 | |
| 262 | void DataPartStorageOnDiskFull::createProjection(const std::string & name) |
| 263 | { |
no test coverage detected