Examples of Count


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

        }
        getFieldsFromExpression(e, groupedFields);
        hasAggregate = true;
        switch (functionIdx.intValue() / 2) {
        case 0:
            e = new Count(e, distinctOnOperand);
            break;
        case 1:
            e = new Sum(e, distinctOnOperand);
            break;
        case 2:
View Full Code Here

Examples of org.openrdf.query.algebra.Count

  private static Value processAggregate(EvaluationStrategy strategy, Set<BindingSet> bindingSets,
      AggregateOperator operator)
    throws StoreException
  {
    if (operator instanceof Count) {
      Count countOp = (Count)operator;

      ValueExpr arg = countOp.getArg();

      if (arg != null) {
        Set<Value> values = makeValueSet(strategy, arg, bindingSets);
        return new LiteralImpl(Integer.toString(values.size()), XMLSchema.INTEGER);
      }
View Full Code Here

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

    }
   
    public void helpTestDuplicateFilter(Object[] input, Class dataType, int expected) throws TeiidComponentException, TeiidProcessingException {
        BufferManager mgr = BufferManagerFactory.getStandaloneBufferManager();
       
        SortingFilter filter = new SortingFilter(new Count(), mgr, "test", true); //$NON-NLS-1$
        filter.initialize(dataType, dataType);
        ElementSymbol element = new ElementSymbol("val"); //$NON-NLS-1$
        element.setType(dataType);
        filter.setElements(Arrays.asList(element));
        filter.reset();
View Full Code Here

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

            Class<?> inputType = symbol.getType();
            if(symbol instanceof AggregateSymbol) {
                AggregateSymbol aggSymbol = (AggregateSymbol) symbol;
               
                if(aggSymbol.getExpression() == null) {
                    functions[i] = new Count();
                } else {
                  Expression ex = aggSymbol.getExpression();
                  inputType = ex.getType();
                  int index = collectExpression(ex);
                  Type function = aggSymbol.getAggregateFunction();
                  switch (function) {
                  case COUNT:
                    functions[i] = new Count();
                    break;
                  case SUM:
                    functions[i] = new Sum();
                    break;
                  case AVG:
View Full Code Here

Examples of storm.trident.operation.builtin.Count

    topology
        .newStream("spout", spout)
        .each(new Fields("shortid", "date"), new DatePartitionFunction(),
            new Fields("cf", "cq")).project(new Fields("shortid", "cf", "cq"))
        .groupBy(new Fields("shortid", "cf", "cq"))
        .persistentAggregate(state, new Count(), new Fields("count"));

    Config conf = new Config();
    LocalCluster cluster = new LocalCluster();
    cluster.submitTopology("hbase-trident-aggregate", conf, topology.build());
View Full Code Here

Examples of storm.trident.operation.builtin.Count

              topology.newStream("spout1", spout)
                .parallelismHint(16)
                .each(new Fields("sentence"), 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"))
View Full Code Here

Examples of storm.trident.operation.builtin.Count

              topology.newStream("spout1", _spout)
                .parallelismHint(16)
                .each(new Fields("sentence"), 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"))
View Full Code Here

Examples of storm.trident.operation.builtin.Count

        }
       

        TridentState wordCounts = topology.newStream("spout1", spout)
                .each(new Fields("sentence"), new Split(), new Fields("word")).groupBy(new Fields("word"))
                .persistentAggregate(cassandraStateFactory, new Count(), new Fields("count")).parallelismHint(1);

        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"))
View Full Code Here

Examples of storm.trident.operation.builtin.Count

    spout.setCycle(true);

    TridentTopology topology = new TridentTopology();
    TridentState wordCounts = topology.newStream("spout1", spout).parallelismHint(16).each(new Fields("sentence"),
        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 uk.org.ogsadai.expression.arithmetic.Count

    public void visitFunction(Function function)
    {
        ArithmeticExpression[] children = function.getChildren();
        if (function instanceof Count)
        {
            mCurrentExpression = new Count(
                    (Count)function,
                    cloneArithmeticExpression(children[0]));
        }
        else if (function instanceof Average)
        {
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.