Examples of Aggregate


Examples of org.h2.expression.Aggregate

        }
        currentSelect.setGroupQuery();
        Expression r;
        if (aggregateType == Aggregate.COUNT) {
            if (readIf("*")) {
                r = new Aggregate(Aggregate.COUNT_ALL, null, currentSelect, false);
            } else {
                boolean distinct = readIf("DISTINCT");
                Expression on = readExpression();
                if (on instanceof Wildcard && !distinct) {
                    // PostgreSQL compatibility: count(t.*)
                    r = new Aggregate(Aggregate.COUNT_ALL, null, currentSelect, false);
                } else {
                    r = new Aggregate(Aggregate.COUNT, on, currentSelect, distinct);
                }
            }
        } else if (aggregateType == Aggregate.GROUP_CONCAT) {
            boolean distinct = readIf("DISTINCT");
            Aggregate agg = new Aggregate(Aggregate.GROUP_CONCAT, readExpression(), currentSelect, distinct);
            if (readIf("ORDER")) {
                read("BY");
                agg.setOrder(parseSimpleOrderList());
            }
            if (readIf("SEPARATOR")) {
                agg.setSeparator(readExpression());
            }
            r = agg;
        } else {
            boolean distinct = readIf("DISTINCT");
            r = new Aggregate(aggregateType, readExpression(), currentSelect, distinct);
        }
        read(")");
        return r;
    }
View Full Code Here

Examples of org.lealone.expression.Aggregate

        }
        currentSelect.setGroupQuery();
        Expression r;
        if (aggregateType == Aggregate.COUNT) {
            if (readIf("*")) {
                r = new Aggregate(Aggregate.COUNT_ALL, null, currentSelect, false);
            } else {
                boolean distinct = readIf("DISTINCT");
                Expression on = readExpression();
                if (on instanceof Wildcard && !distinct) {
                    // PostgreSQL compatibility: count(t.*)
                    r = new Aggregate(Aggregate.COUNT_ALL, null, currentSelect, false);
                } else {
                    r = new Aggregate(Aggregate.COUNT, on, currentSelect, distinct);
                }
            }
        } else if (aggregateType == Aggregate.GROUP_CONCAT) {
            boolean distinct = readIf("DISTINCT");
            Aggregate agg = new Aggregate(Aggregate.GROUP_CONCAT, readExpression(), currentSelect, distinct);
            if (readIf("ORDER")) {
                read("BY");
                agg.setOrder(parseSimpleOrderList());
            }
            if (readIf("SEPARATOR")) {
                agg.setSeparator(readExpression());
            }
            r = agg;
        } else {
            boolean distinct = readIf("DISTINCT");
            r = new Aggregate(aggregateType, readExpression(), currentSelect, distinct);
        }
        read(")");
        return r;
    }
View Full Code Here

Examples of org.mizartools.dli.Aggregate

      itemDefinition = new Attribute(locusList, type, redefinition, properties);
      itemType = ItemType.attr;
      break;
    case G :
      type = Adapter.getType(abstractSignature, constructor.getTypList().getFirst());
      itemDefinition = new Aggregate(locusList, type);
      itemType = ItemType.aggr;
      break;
    case L :
      Prefices prefices = Adapter.getPrefices(abstractSignature, constructor.getTypList());
      Fields fields = Adapter.getFields(abstractSignature, constructor.getFields());
View Full Code Here

Examples of org.pentaho.aggdes.model.Aggregate

    measures.addAll(connectionModel.getSchema().getMeasures());
    thinAgg.setMeasures(measures);
    setModified(false);

    // resync algorithm calculations
    Aggregate algoAggregate = algorithm.createAggregate(connectionModel.getSchema(), thinAgg.getAttributes());
    thinAgg.setEstimateRowCount(algoAggregate.estimateRowCount());
    thinAgg.setEstimateSpace(algoAggregate.estimateSpace());

  }
View Full Code Here

Examples of org.pentaho.aggdes.model.Aggregate

      double totalbenefit = 0;
      double x = 0;
      int count = 0;
      for (Algorithm.CostBenefit cb : costBenefit) {
        Aggregate agg = algoAggregates.get(count);
        double estimateSpace = agg.estimateSpace();
        double hx = estimateSpace / 2;
        totalLoadTime += cb.getLoadTime();
        totalbenefit += cb.getSavedQueryRowCount();
        series1.add(x + hx, totalbenefit);
       
View Full Code Here

Examples of org.pentaho.aggdes.model.Aggregate

    }
  }

  public void showAgg(int idx) {
    aggLevelTable.clearSelection();
    Aggregate agg = getAggList().getAgg(idx);
    if (agg == null) {
      logger.info(String.format("List and Table out of sync, %s does not exist", idx));
    } else {
      getAggList().setSelectedIndex(idx);
    }
View Full Code Here

Examples of org.pentaho.aggdes.model.Aggregate

    XulTree aggTable = (XulTree) document.getElementById("definedAggTable");
    XulTreeRow row = aggTable.getRootChildren().getItem(idx).getRow();
    agg.setEnabled((Boolean) row.getCell(0).getValue());

    // get row count estimate
    Aggregate algoAggregate = algorithm.createAggregate(connectionModel.getSchema(), agg.getAttributes());
    agg.setEstimateRowCount(algoAggregate.estimateRowCount());
    agg.setEstimateSpace(algoAggregate.estimateSpace());
    getAggList().aggChanged(agg);
    System.out.println("Saving agg, enabled? " + row.getCell(0).getValue());
   
  }
View Full Code Here

Examples of org.red5.server.net.rtmp.event.Aggregate

        int bufferLimit = buffer.limit();
        if (bufferLimit > 0) {
          // create new RTMP message and push to the consumer
          switch (dataType) {
            case Constants.TYPE_AGGREGATE:
              event = new Aggregate(buffer);
              event.setTimestamp(cachedEvent.getTimestamp());
              message = RTMPMessage.build(event);
              break;
            case Constants.TYPE_AUDIO_DATA:
              event = new AudioData(buffer);
View Full Code Here

Examples of org.red5.server.net.rtmp.event.Aggregate

    IRTMPEvent event;
    IoBuffer dataReference;
    switch (messageIn.getBody().getDataType()) {
      case Constants.TYPE_AGGREGATE:
        dataReference = ((Aggregate) messageIn.getBody()).getData();
        event = new Aggregate(dataReference);
        event.setTimestamp(messageIn.getBody().getTimestamp());
        break;
      case Constants.TYPE_AUDIO_DATA:
        dataReference = ((AudioData) messageIn.getBody()).getData();
        event = new AudioData(dataReference);
View Full Code Here

Examples of org.red5.server.net.rtmp.event.Aggregate

    return new Unknown(dataType, in);
  }

  /** {@inheritDoc} */
  public Aggregate decodeAggregate(IoBuffer in) {
    return new Aggregate(in);
  }
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.