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

Memory limit should be respected.
{
    if (!skip_indices_initialized)
        throw Exception("Skip indices are not initialized", ErrorCodes::LOGICAL_ERROR);
    size_t rows = skip_indexes_block.rows();
    size_t skip_index_current_data_mark = 0;
    
    for (size_t i = 0; i < skip_indices.size(); ++i)
    {
        const auto index_helper = skip_indices[i];
        auto & stream = *skip_indices_streams[i];
        size_t prev_pos = 0;
        skip_index_current_data_mark = skip_index_data_mark;
        while (prev_pos < rows)
        {
            UInt64 limit = 0;
            size_t current_index_offset = getIndexOffset();
            if (prev_pos == 0 && current_index_offset != 0)
            {
                limit = current_index_offset;
            }
            else if (skip_index_current_data_mark == index_granularity.getMarksCount())
            {
                
                limit = rows - prev_pos;
            }
            else
            {
                limit = index_granularity.getMarkRows(skip_index_current_data_mark);