Suppose I have a Hive table that looks like this:
a b
41 77
8 32
31 76
I would like to have another column say c which applies a function that loops through all integers between columns a and b. For example, c could contain the sum of all integers between a and b. Is there a way to phrase my Hive query?
Edit: I'm using Hive 2.1.1-mapr-1803 version.
atobabove, I wouldn't want an answer that suggests I use the formula for sum of numbers in an arithmetic progression. – Abhishek Parab Jul 25 '19 at 22:07b(b-1) - a(a+1)– ypercubeᵀᴹ Jul 25 '19 at 22:23