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

const auto * transforming = dynamic_cast<const ITransformingStep *>(child.get());
    
    if (!transforming)
        return 0;
    
    if (tryUpdateLimitForSortingSteps(child_node, limit->getLimitForSorting()))
        return 0;
    
    if (typeid_cast<const TotalsHavingStep *>(child.get()))
        return 0;
    
    const auto & transform_traits = transforming->getTransformTraits();
    const auto & data_stream_traits = transforming->getDataStreamTraits();
    
    if (!transform_traits.preserves_number_of_rows)
        return 0;
    
    if (!child->getOutputStream().sort_description.empty() && !data_stream_traits.preserves_sorting)
        return 0;
    
    
    if (!limit->getOutputStream().hasEqualPropertiesWith(transforming->getOutputStream()))
        return 0;
    
    limit->updateInputStream(transforming->getInputStreams().front());
    parent.swap(child);
    return 2;
}
}