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      | 
````

#include <Processors/QueryPlan/Optimizations/Optimizations.h>
#include <Processors/QueryPlan/ITransformingStep.h>
#include <Processors/QueryPlan/LimitStep.h>
#include <Processors/QueryPlan/TotalsHavingStep.h>
#include <Processors/QueryPlan/SortingStep.h>
#include <Common/typeid_cast.h>
namespace DB::QueryPlanOptimizations
{
static bool tryUpdateLimitForSortingSteps(QueryPlan::Node * node, size_t limit)
{
    if (limit == 0)
        return false;
    QueryPlanStepPtr & step = node->step;
    QueryPlan::Node * child = nullptr;
    bool updated = false;
    if (auto * sorting = typeid_cast<SortingStep *>(step.get()))
    {
        
        sorting->updateLimit(limit);
        updated = true;
        child = node->children.front();
    }
    
    
    if (child)
        tryUpdateLimitForSortingSteps(child, limit);
    return updated;
}
size_t tryPushDownLimit(QueryPlan::Node * parent_node, QueryPlan::Nodes &)