uwescience/raco — pull request #305 by 7andrew7 (2014-09-03 21:19:44+00:00)
Title: Allow for UDAs with multiple return values

Allow for multiple arguments from the emit clause of a UDA:

```
uda SumCountMean(x) {
[0 as _sum, 0 as _count];
[_sum + x, _count + 1];
[_sum, _count, _sum/_count];
};
```

As per yesterday's discussion, I did not modify the underlying expression framework to be "tuple aware". Rather, we instantiate one scalar-valued function for each argument in the emit clause.

The Myrial parser is augmented with a TupleExpression type, which stores a collection scalar-valued expressions. These TupleExpressions are compiled away at the end of parse phase -- i.e., no code outside the parser knows about tuple-valued expressions.

TupleExpression instances are only legal as naked emit arguments. That is, tuple-valued aggregates cannot be nested or combined in any way with other expressions. Legal:

```
Y = [from X emit SumCount($3) as [_sum, _count]];
```

Not legal:

```
Y = [from X emit SumCount($3) * 5 as [_sum, _count]];
```