I was wondering if there is a way to compute the product of all the values

in a bag much like the built in function SUM does currently.

For reference, I am currently implementing a multinomial naive bayes

classifier and need to compute the product of probabilities. I am trying to

avoid using a UDF because the requirements of the project prohibit me from

using a secondary language such as python, javascript, etc.

Thanks,

Sergey