for the last year I replied 3 times with a silly snippet:
```
SELECT
    [2, 3, 4] AS x,
    pow(2, arraySum(i -> log2(i), x)) AS arrayProduct
┌─x───────┬─arrayProduct─┐
│ [2,3,4] │           24 │
└─────────┴──────────────┘
```

I think we need a function to multiply elements of an array.
using Result = ArrayElement;
};
template <typename ArrayElement>
struct ArrayAggregateResultImpl<ArrayElement, AggregateOperation::max>
{
    using Result = ArrayElement;
};
template <typename ArrayElement>
struct ArrayAggregateResultImpl<ArrayElement, AggregateOperation::average>
{
    using Result = Float64;
};
template <typename ArrayElement>
struct ArrayAggregateResultImpl<ArrayElement, AggregateOperation::sum>
{
    using Result =
        std::conditional_t<std::is_same_v<ArrayElement, Int128>, Int128,
            std::conditional_t<std::is_same_v<ArrayElement, Int256>, Int256,
                std::conditional_t<std::is_same_v<ArrayElement, UInt256>, UInt256,
                    std::conditional_t<IsDecimalNumber<ArrayElement>, Decimal128,
                        std::conditional_t<std::is_floating_point_v<ArrayElement>, Float64,
                            std::conditional_t<std::is_signed_v<ArrayElement>, Int64,
                                UInt64>>>>>>;
};
template <typename ArrayElement, AggregateOperation operation>
using ArrayAggregateResult = typename ArrayAggregateResultImpl<ArrayElement, operation>::Result;
template<AggregateOperation aggregate_operation>
struct ArrayAggregateImpl
{
    static bool needBoolean() { return false; }