Given that vcounter is a View, the settings limit/offset dose not work as expected.

```sql
CREATE TABLE counter (id UInt64, createdAt DateTime) ENGINE = MergeTree() ORDER BY id;
INSERT INTO counter SELECT number, now() FROM numbers(500);

CREATE VIEW vcounter AS
SELECT
    intDiv(id, 10) AS tens,
    max(createdAt) AS maxid
FROM counter
GROUP BY tens;

SELECT *
FROM vcounter
ORDER BY tens ASC
LIMIT 100
SETTINGS limit = 6, offset = 5


┌─tens─┬───────────────maxid─┐
│   47 │ 2021-12-29 13:05:23 │
└──────┴─────────────────────┘

1 rows in set. Elapsed: 0.006 sec.

```

The query should return 6 rows, instead of one. 

**Does it reproduce on recent release?**

Yes, we can reproduce it on `21.10`.

**Expected behavior**

The query should return 6 rows, instead of one.

**Additional context**

Replace view with subquery works though,

```sql
SELECT *
FROM
(
    SELECT
        intDiv(id, 10) AS tens,
        max(createdAt) AS maxid
    FROM test.counter
    GROUP BY tens
)
LIMIT 100
SETTINGS limit = 6, offset = 5;

┌─tens─┬───────────────maxid─┐
│    3 │ 2021-12-29 13:05:23 │
│   31 │ 2021-12-29 13:05:23 │
│   47 │ 2021-12-29 13:05:23 │
│   40 │ 2021-12-29 13:05:23 │
│   30 │ 2021-12-29 13:05:23 │
│    2 │ 2021-12-29 13:05:23 │
└──────┴─────────────────────┘

6 rows in set. Elapsed: 0.011 sec. 
```

}
        return res;
    }
    if (options.to_stage >= QueryProcessingStage::Enum::WithMergeableStateAfterAggregation)
    {
        
        
        if (analysis_result.before_window)
            return analysis_result.before_window->getResultColumns();
        return analysis_result.before_order_by->getResultColumns();
    }
    return analysis_result.final_projection->getResultColumns();
}
static Field getWithFillFieldValue(const ASTPtr & node, ContextPtr context)
{
    auto [field, type] = evaluateConstantExpression(node, context);
    if (!isColumnedAsNumber(type))
        throw Exception("Illegal type " + type->getName() + " of WITH FILL expression, must be numeric type", ErrorCodes::INVALID_WITH_FILL_EXPRESSION);
    return field;
}
static std::pair<Field, std::optional<IntervalKind>> getWithFillStep(const ASTPtr & node, ContextPtr context)
{
    auto [field, type] = evaluateConstantExpression(node, context);
    if (const auto * type_interval = typeid_cast<const DataTypeInterval *>(type.get()))
        return std::make_pair(std::move(field), type_interval->getKind());
    if (isColumnedAsNumber(type))
        return std::make_pair(std::move(field), std::nullopt);
    throw Exception("Illegal type " + type->getName() + " of WITH FILL expression, must be numeric type", ErrorCodes::INVALID_WITH_FILL_EXPRESSION);
}
static FillColumnDescription getWithFillDescription(const ASTOrderByElement & order_by_elem, ContextPtr context)