**Describe the unexpected behaviour**
New `nonNegativeDerivative` window function fails with LOGICAL_ERROR.

**How to reproduce**

```
root@clickhouse1:/# clickhouse client
ClickHouse client version 22.6.1.1985 (official build).
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 22.6.1 revision 54455.

clickhouse1 :) Bye.
root@clickhouse1:/# echo -e "SELECT id, metric, ts, nonNegativeDerivative(metric, ts) OVER (ORDER BY id ASC) AS nnd FROM values('id Int8, metric Float32, ts DateTime64(0)', (1,1,'2022-12-12 00:00:00'), (2,2,'2022-12-12 00:00:01'),(3,3,'2022-12-12 00:00:02')) FORMAT TabSeparatedWithNames" | clickhouse client -n 2>&1
Received exception from server (version 22.6.1):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Invalid number of rows in Chunk column Float32 position 3: expected 3, got 6. (LOGICAL_ERROR)
(query: SELECT id, metric, ts, nonNegativeDerivative(metric, ts) OVER (ORDER BY id ASC) AS nnd FROM values('id Int8, metric Float32, ts DateTime64(0)', (1,1,'2022-12-12 00:00:00'), (2,2,'2022-12-12 00:00:01'),(3,3,'2022-12-12 00:00:02')) FORMAT TabSeparatedWithNames
)
root@clickhouse1:/# 
```

**Which ClickHouse server version to use**
22.6.1.1985 (official build).

**Error message and/or stacktrace**
```
2022.06.28 15:45:36.627221 [ 9 ] {5552a5a1-7727-4ee2-a7ad-f06064384257} <Error> TCPHandler: Code: 49. DB::Exception: Invalid number of rows in Chunk column Float32 position 3: expected 3, got 6. (LOGICAL_ERROR), Stack trace (when copying this message, always include the lines below):

0. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0xb8a147a in /usr/bin/clickhouse
1. DB::Chunk::checkNumRowsIsConsistent() @ 0x1718194e in /usr/bin/clickhouse
2. DB::WindowTransform::prepare() @ 0x173d497f in /usr/bin/clickhouse
3. DB::ExecutingGraph::updateNode(unsigned long, std::__1::queue<DB::ExecutingGraph::Node*, std::__1::deque<DB::ExecutingGraph::Node*, std::__1::allocator<DB::ExecutingGraph::Node*> > >&, std::__1::queue<DB::ExecutingGraph::Node*, std::__1::deque<DB::ExecutingGraph::Node*, std::__1::allocator<DB::ExecutingGraph::Node*> > >&) @ 0x171a9b59 in /usr/bin/clickhouse
4. DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) @ 0x171a440b in /usr/bin/clickhouse
5. DB::PipelineExecutor::executeImpl(unsigned long) @ 0x171a3921 in /usr/bin/clickhouse
6. DB::PipelineExecutor::execute(unsigned long) @ 0x171a36b8 in /usr/bin/clickhouse
7. ? @ 0x171b38ce in /usr/bin/clickhouse
8. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0xb94d0b7 in /usr/bin/clickhouse
9. ? @ 0xb9504dd in /usr/bin/clickhouse
10. ? @ 0x7f7cd5e02609 in ?
11. clone @ 0x7f7cd5d29293 in ?
```

{
        throw Exception(ErrorCodes::NOT_IMPLEMENTED, "recurrent_detail::getValue() is not implemented for {} type", typeid(T).name());
    }
    template<> Float64 getValue<Float64>(const WindowTransform * transform, size_t function_index, size_t column_index, RowNumber row)
    {
        const auto & workspace = transform->workspaces[function_index];
        const auto & column = transform->blockAt(row.block).input_columns[workspace.argument_column_indices[column_index]];
        return column->getFloat64(row.row);
    }
    template<typename T> void setValueToOutputColumn(const WindowTransform * , size_t , T )
    {
        throw Exception(ErrorCodes::NOT_IMPLEMENTED, "recurrent_detail::setValueToOutputColumn() is not implemented for {} type", typeid(T).name());
    }
    template<> void setValueToOutputColumn<Float64>(const WindowTransform * transform, size_t function_index, Float64 value)
    {
        auto current_row = transform->current_row;
        const auto & current_block = transform->blockAt(current_row);
        IColumn & to = *current_block.output_columns[function_index];
        assert_cast<ColumnFloat64 &>(to).getData().push_back(value);
    }
}
struct WindowFunctionHelpers
{
    template<typename T>
    static T getValue(const WindowTransform * transform, size_t function_index, size_t column_index, RowNumber row)