Package io.druid.query.aggregation

Examples of io.druid.query.aggregation.JavaScriptAggregatorFactory


                    .addDimension("sally")
                    .addAggregator(
                        new LongSumAggregatorFactory("cnt", "cnt")
                    )
                    .addAggregator(
                        new JavaScriptAggregatorFactory(
                            "fieldLength",
                            Arrays.asList("sally", "billy"),
                            "function(current, s, b) { return current + (s == null ? 0 : s.length) + (b == null ? 0 : b.length); }",
                            "function() { return 0; }",
                            "function(a,b) { return a + b; }"
View Full Code Here


        .setDimFilter(new JavaScriptDimFilter("market", "function(dim){ return true; }"))
        .setAggregatorSpecs(
            Arrays.asList(
                QueryRunnerTestHelper.rowsCount,
                new DoubleSumAggregatorFactory("idx_subagg", "index"),
                new JavaScriptAggregatorFactory(
                    "js_agg",
                    Arrays.asList("index", "market"),
                    "function(current, index, dim){return current + index + dim.length;}",
                    "function(){return 0;}",
                    "function(a,b){return a + b;}"
View Full Code Here

TOP

Related Classes of io.druid.query.aggregation.JavaScriptAggregatorFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.