v.21.6New Feature

Add arrayProduct function to return the product of array elements

Add function arrayProduct which accept an array as the parameter, and return the product of all the elements in array. Closes #21613. #23782 (Maksim Kita).
Added the arrayProduct function which takes an array as input and returns the product of all its elements.

Why it matters

The arrayProduct function provides users with an easy way to compute the multiplication of all elements in an array, simplifying calculations and improving query expressiveness when dealing with arrays.

How to use it

Use the arrayProduct function by passing an array as an argument in your query, for example:

SELECT arrayProduct([1, 2, 3, 4])

This will return the product of the array elements.