Examples of Sum


Examples of org.apache.pig.builtin.SUM

            func = new DoubleSum();
        } else if ("sum(int)".equalsIgnoreCase(agg) ||
            "sum(long)".equalsIgnoreCase(agg)) {
            func = new LongSum();
        } else if ("sum(bytearray)".equalsIgnoreCase(agg)) {
            func = new SUM();
        } else if ("avg(double)".equalsIgnoreCase(agg)) {
            func = new DoubleAvg();
        } else if ("avg(float)".equalsIgnoreCase(agg)) {
            func = new FloatAvg();
        } else if ("avg(long)".equalsIgnoreCase(agg)) {
View Full Code Here

Examples of org.apache.torque.util.functions.Sum

        returnTypes.add(Integer.class);

        summary.addAggregate("MAX_INT1", new Max(Summarize1Peer.INT_1));
        returnTypes.add(Integer.class);

        summary.addAggregate("SUM_INT1", new Sum(Summarize1Peer.INT_1));
        returnTypes.add(Integer.class);

        summary.addAggregate("AVG_FLOAT1", new Avg(Summarize1Peer.FLOAT1));
        returnTypes.add(Float.class);

        summary.addAggregate("MIN_FLOAT1", new Min(Summarize1Peer.FLOAT1));
        returnTypes.add(Float.class);

        summary.addAggregate("MAX_FLOAT1", new Max(Summarize1Peer.FLOAT1));
        returnTypes.add(Float.class);

        summary.addAggregate("SUM_FLOAT1", new Sum(Summarize1Peer.FLOAT1));
        returnTypes.add(Float.class);

        List<ListOrderedMapCI> results = summary.summarize(c, returnTypes);

        StringWriter out = new StringWriter();
View Full Code Here

Examples of org.objectweb.medor.filter.lib.Sum

        switch (functionIdx.intValue() / 2) {
        case 0:
            e = new Count(e, distinctOnOperand);
            break;
        case 1:
            e = new Sum(e, distinctOnOperand);
            break;
        case 2:
            e = new Min(e, distinctOnOperand);
            break;
        case 3:
View Full Code Here

Examples of org.teiid.query.function.aggregate.Sum

                  switch (function) {
                  case COUNT:
                    functions[i] = new Count();
                    break;
                  case SUM:
                    functions[i] = new Sum();
                    break;
                  case AVG:
                    functions[i] = new Avg();
                    break;
                  case MIN:
View Full Code Here

Examples of storm.trident.operation.builtin.Sum

                .shuffle()
                .stateQuery(tweetersToFollowers, new Fields("tweeter"), new MapGet(), new Fields("followers"))
                .each(new Fields("followers"), new ExpandList(), new Fields("follower"))
                .groupBy(new Fields("follower"))
                .aggregate(new One(), new Fields("one"))
                .aggregate(new Fields("one"), new Sum(), new Fields("reach"));
        return topology.build();
    }
View Full Code Here

Examples of storm.trident.operation.builtin.Sum

        LocalDRPC client = new LocalDRPC();
        topology.newDRPCStream("words", client).each(new Fields("args"), new Split(), new Fields("word"))
                .groupBy(new Fields("word"))
                .stateQuery(wordCounts, new Fields("word"), new MapGet(), new Fields("count"))
                .each(new Fields("count"), new FilterNull())
                .aggregate(new Fields("count"), new Sum(), new Fields("sum"));

        LocalCluster cluster = new LocalCluster();
        cluster.submitTopology("test", config, topology.build());

            Thread.sleep(10000);
View Full Code Here

Examples of storm.trident.operation.builtin.Sum

        new Split(), new Fields("word")).groupBy(new Fields("word")).persistentAggregate(new MemoryMapState.Factory(),
        new Count(), new Fields("count")).parallelismHint(16);

    topology.newDRPCStream("words", drpc).each(new Fields("args"), new Split(), new Fields("word")).groupBy(new Fields(
        "word")).stateQuery(wordCounts, new Fields("word"), new MapGet(), new Fields("count")).each(new Fields("count"),
        new FilterNull()).aggregate(new Fields("count"), new Sum(), new Fields("sum"));
    return topology.build();
  }
View Full Code Here

Examples of storm.trident.operation.builtin.Sum

    topology.newDRPCStream("reach", drpc).stateQuery(urlToTweeters, new Fields("args"), new MapGet(), new Fields(
        "tweeters")).each(new Fields("tweeters"), new ExpandList(), new Fields("tweeter")).shuffle().stateQuery(
        tweetersToFollowers, new Fields("tweeter"), new MapGet(), new Fields("followers")).each(new Fields("followers"),
        new ExpandList(), new Fields("follower")).groupBy(new Fields("follower")).aggregate(new One(), new Fields(
        "one")).aggregate(new Fields("one"), new Sum(), new Fields("reach"));
    return topology.build();
  }
View Full Code Here

Examples of testPackage.Sum

  }
  public void foo() {
    this.a = 17;
    System.out.println("The value of a is: " + this.a);
   
    Sum mySum = new Sum();
    mySum.computeOtherResolved(juhu);
  }
View Full Code Here

Examples of testPackage.Sum

  public void accessInner() {
    (new Inner()).innerMethod();
  }
 
  public int computeSum() {
    Sum s = new Sum(10, 15);
    return s.compute() + s.compute();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.