|
|
-
TOBAG Function on a Tuple?Eli Finkelshteyn 2012-02-16, 19:48
Hi,
I was recently interested in converting a tuple to a bag. I found the useful looking TOBAG function and figured it was perfect. Problem is, when I pass it just a tuple, it just takes that tuple and makes a bag with the tuple as the one item in the bag. If the tuple has a variable number of items in it, how can I get TOBAG to put each of those items individually in a bag ( i.e. (1,2,3) => {(1),(2),(3)} )? I know I can just make a udf for this, but I'm feeling like there's a way to do it with TOBAG that I'm likely missing. Eli |