**Describe the bug**
`SELECT i FROM generateRandom('i Array(Int8)', 1048575, 10, 1048577) LIMIT 1048575`

Memory limit should be respected.
{
    String path = getFullRelativePath() + "columns.txt";
    auto metadata_snapshot = storage.getInMemoryMetadataPtr();
    if (!volume->getDisk()->exists(path))
    {
        
        if (require || part_type == Type::COMPACT)
            throw Exception("No columns.txt in part " + name, ErrorCodes::NO_FILE_IN_DATA_PART);
        
        for (const NameAndTypePair & column : metadata_snapshot->getColumns().getAllPhysical())
            if (volume->getDisk()->exists(getFullRelativePath() + getFileNameForColumn(column) + ".bin"))
                columns.push_back(column);
        if (columns.empty())
            throw Exception("No columns in part " + name, ErrorCodes::NO_FILE_IN_DATA_PART);
        {
            auto buf = volume->getDisk()->writeFile(path + ".tmp", 4096);
            columns.writeText(*buf);
        }
        volume->getDisk()->moveFile(path + ".tmp", path);
    }
    else
    {
        columns.readText(*volume->getDisk()->readFile(path));
    }
    size_t pos = 0;
    for (const auto & column : columns)
        column_name_to_position.emplace(column.name, pos++);
}
bool IMergeTreeDataPart::shallParticipateInMerges(const StoragePolicyPtr & storage_policy) const