unwrapAggTransform: function(agg) {
        var result = agg;
        while(result instanceof AggTransform) {
            result = result.getSubAgg();
        }