I have insert to s3 6bil rows table:
```
INSERT INTO FUNCTION
s3('https://s3.us-east-1.amazonaws.com/my-bucket/data.csv', 'DFGHJ', 'FGHJIJH, 'CSVWithNames', 'time DateTime, exchangeId UInt16, pairId UInt16, id String, price Decimal(38, 18), volume Decimal(38, 18)')
SELECT * FROM trade;
```
but it fails trying to upload part 10001 while aws s3 upload [supports](https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html) only 10k parts.

I had to export this select into CSV 600GB file on the disk and then perform successful `aws s3 cp data.csv s3://my-bucket/data.csv`

I expected Clickhouse would do it on his own successfully. 

┌─version()─┐
│ 22.1.3.7  │
└───────────┘

Strings not_finished_prefixes{"tmp_", "delete_tmp_", "attaching_", "deleting_"};
        for (const auto & path : renames)
        {
            
            if (path.find("/detached/") != std::string::npos)
                continue;
            
            fs::path directory_path(path);
            auto directory_name = directory_path.parent_path().filename().string();
            auto predicate = [&directory_name](String & prefix) { return directory_name.starts_with(prefix); };
            if (std::any_of(not_finished_prefixes.begin(), not_finished_prefixes.end(), predicate))
                continue;
            auto detached_path = pathToDetached(path);
            LOG_TRACE(log, "Move directory to 'detached' {} -> {}", path, detached_path);
            fs::path from_path = fs::path(path);
            fs::path to_path = fs::path(detached_path);
            if (path.ends_with('/'))
                to_path /= from_path.parent_path().filename();
            else
                to_path /= from_path.filename();
            
            if (metadata_disk->exists(to_path))
                metadata_disk->removeRecursive(to_path);
            createDirectories(directoryPath(to_path));
            metadata_disk->moveDirectory(from_path, to_path);
        }
    }
    LOG_INFO(log, "File operations restored for disk {}", name);
}
std::tuple<UInt64, String> DiskS3::extractRevisionAndOperationFromKey(const String & key)