Hi. I noticed that when using window functions with a LIMIT clause, the window function appears to be applied to the result _after_ applying the limit. To me this is rather unintuitive and different from the way I am used to it from other applications. 
Is this intended behaviour or should I raise an issue for this? 

Example (clickhouse version 21.3.5.42):

````
CREATE TABLE test.window_test ENGINE = MergeTree()
PARTITION BY field
ORDER BY field
SETTINGS index_granularity = 8192
AS
SELECT
    'a' AS field
UNION ALL
SELECT
    'a' AS field
UNION ALL
SELECT
    'b' AS field
UNION ALL
SELECT
    'b' AS field
    ;

set allow_experimental_window_functions = 1;

-- Example query with expected output:
SELECT
    field,
    count() over (partition by field) AS window_count
FROM
    test.window_test;

-- Output 
--| field | window_count | 
--| a      | 2      | 
--| a      | 2      | 
--| b      | 2      | 
--| b      | 2      |

-- Query with LIMIT giving unexpected output:
SELECT
    field,
    count() over (partition by field) AS window_count
FROM
    test.window_test
LIMIT 1;

-- Output
--| field | window_count | 
--| a      | 1       | 

-- Expected Output:
--| field | window_count | 
--| a      | 2      | 
````

{
    if (parent_node->children.size() != 1)
        return 0;
    QueryPlan::Node * child_node = parent_node->children.front();
    auto & parent = parent_node->step;
    auto & child = child_node->step;
    auto * limit = typeid_cast<LimitStep *>(parent.get());
    if (!limit)
        return 0;
    
    if (limit->withTies())
        return 0;