public class ExpandAggregations extends Object
Select
that contains aggregations. If it is called on a Select
without aggregations it is simply returned.
This select:
in.select('key, 'value.avg)
is transformed to this expansion:
in
.select('key, 'value, Literal(1) as 'intermediate.1)
.aggregate('value.sum, 'intermediate.1.sum)
.select('key, 'value / 'intermediate.1)
If the input of the Select
is a GroupBy
this is preserved before the aggregation.
Constructor and Description |
---|
ExpandAggregations() |
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.