test
```
DROP TABLE IF EXISTS range_issue;

CREATE TABLE range_issue
ENGINE = Log AS
SELECT range(rand() % 601) AS arr
FROM numbers(21000000)
```

It's regression:
20.7 - last version when test passes.
20.8 - first version when  test fails. 

Error message & stacktrace:
```
Received exception from server (version 21.9.1):
Code: 69. DB::Exception: Received from localhost:9000. DB::Exception: A call to function range would produce 314754485 array elements, which is greater than the allowed maximum of 100000000: while executing 'FUNCTION range(modulo(rand(), 601) :: 2) -> range(modulo(rand(), 601)) Array(UInt16) : 1'. Stack trace:

0. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x8f9817a in /usr/lib/debug/.build-id/8c/ba2568d486f3b979445af26ce56a0deaa65ba7.debug
1. COW<DB::IColumn>::immutable_ptr<DB::IColumn> DB::FunctionRange::executeInternal<unsigned short>(DB::IColumn const*) const @ 0xed7f527 in /usr/lib/debug/.build-id/8c/ba2568d486f3b979445af26ce56a0deaa65ba7.debug
2. DB::FunctionRange::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0xed7d422 in /usr/lib/debug/.build-id/8c/ba2568d486f3b979445af26ce56a0deaa65ba7.debug
3. DB::FunctionToExecutableFunctionAdaptor::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0xb12828e in /usr/lib/debug/.build-id/8c/ba2568d486f3b979445af26ce56a0deaa65ba7.debug
4. DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0xfa7621e in /usr/lib/debug/.build-id/8c/ba2568d486f3b979445af26ce56a0deaa65ba7.debug
5. DB::IExecutableFunction::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0xfa76712 in /usr/lib/debug/.build-id/8c/ba2568d486f3b979445af26ce56a0deaa65ba7.debug
6. DB::ExpressionActions::execute(DB::Block&, unsigned long&, bool) const @ 0x100d6e15 in /usr/lib/debug/.build-id/8c/ba2568d486f3b979445af26ce56a0deaa65ba7.debug
7. DB::ExpressionTransform::transform(DB::Chunk&) @ 0x1119b6dc in /usr/lib/debug/.build-id/8c/ba2568d486f3b979445af26ce56a0deaa65ba7.debug
8. DB::ISimpleTransform::transform(DB::Chunk&, DB::Chunk&) @ 0x1119ba70 in /usr/lib/debug/.build-id/8c/ba2568d486f3b979445af26ce56a0deaa65ba7.debug
9. DB::ISimpleTransform::work() @ 0x1119e947 in /usr/lib/debug/.build-id/8c/ba2568d486f3b979445af26ce56a0deaa65ba7.debug
10. void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0, void ()> >(std::__1::__function::__policy_storage const*) @ 0x11051d7d in /usr/lib/debug/.build-id/8c/ba2568d486f3b979445af26ce56a0deaa65ba7.debug
11. DB::PipelineExecutor::executeStepImpl(unsigned long, unsigned long, std::__1::atomic<bool>*) @ 0x1104e911 in /usr/lib/debug/.build-id/8c/ba2568d486f3b979445af26ce56a0deaa65ba7.debug
12. DB::PipelineExecutor::executeImpl(unsigned long) @ 0x1104c94f in /usr/lib/debug/.build-id/8c/ba2568d486f3b979445af26ce56a0deaa65ba7.debug
13. DB::PipelineExecutor::execute(unsigned long) @ 0x1104c72d in /usr/lib/debug/.build-id/8c/ba2568d486f3b979445af26ce56a0deaa65ba7.debug
14. void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) @ 0x110599bf in /usr/lib/debug/.build-id/8c/ba2568d486f3b979445af26ce56a0deaa65ba7.debug
15. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x8fd903f in /usr/lib/debug/.build-id/8c/ba2568d486f3b979445af26ce56a0deaa65ba7.debug
16. void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()> >(void*) @ 0x8fdc923 in /usr/lib/debug/.build-id/8c/ba2568d486f3b979445af26ce56a0deaa65ba7.debug
17. start_thread @ 0x9609 in /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
18. clone @ 0x122293 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
```


: (end_data[row_idx] - start_data[row_idx] - 1) / step + 1;
            if (pre_values < total_values)
                throw Exception{"A call to function " + getName() + " overflows, investigate the values of arguments you are passing",
                            ErrorCodes::ARGUMENT_OUT_OF_BOUND};
            total_values = pre_values;
            if (total_values > max_elements)
                throw Exception{"A call to function " + getName() + " would produce " + std::to_string(total_values) +
                    " array elements, which is greater than the allowed maximum of " + std::to_string(max_elements),
                    ErrorCodes::ARGUMENT_OUT_OF_BOUND};
        }
        auto data_col = ColumnVector<T>::create(total_values);
        auto offsets_col = ColumnArray::ColumnOffsets::create(end_column->size());
        auto & out_data = data_col->getData();
        auto & out_offsets = offsets_col->getData();
        IColumn::Offset offset{};
        for (size_t row_idx = 0; row_idx < input_rows_count; ++row_idx)
        {
            for (size_t st = start_data[row_idx], ed = end_data[row_idx]; st < ed; st += step)
            {
                out_data[offset++] = st;
                if (st > st + step)
                    throw Exception{"A call to function " + getName() + " overflows, investigate the values of arguments you are passing",
                                ErrorCodes::ARGUMENT_OUT_OF_BOUND};
            }
            out_offsets[row_idx] = offset;
        }
        return ColumnArray::create(std::move(data_col), std::move(offsets_col));
    }
    template <typename T>
    ColumnPtr executeConstStart(