Package com.odiago.flumebase.parser

Examples of com.odiago.flumebase.parser.FnCallExpr


      // Execute each aggregation function over the applicable subset of buckets
      // in bucketsByTime.
      for (int i = 0; i < mAggregateExprs.size(); i++) {
        BucketIterator aggIterator = new BucketIterator(i, loTime, closeTime, bucketsByTime);
        AliasedExpr aliasExpr = mAggregateExprs.get(i);
        FnCallExpr fnCall = (FnCallExpr) aliasExpr.getExpr();
        Object result = fnCall.finishWindow(new IterableIterator(aggIterator));
        numBucketsInRangeForGroup += aggIterator.getYieldCount();
        record.put(aliasExpr.getAvroLabel(), result);
      }

      // If there are no buckets in bucketsByTime that are in our time range,
View Full Code Here


    assert buckets.size() == mAggregateExprs.size();
    for (int i = 0; i < mAggregateExprs.size(); i++ ) {
      AliasedExpr aliasExpr = mAggregateExprs.get(i);
      Expr expr = aliasExpr.getExpr();
      assert expr instanceof FnCallExpr;
      FnCallExpr fnCall = (FnCallExpr) expr;
      Bucket bucket = buckets.get(i);
      fnCall.insertAggregate(e, bucket);
    }

    // Insert a callback into a queue to allow time to expire these windows.
    enqueueWakeup(curBucketTime);
  }
View Full Code Here

    // Check if the underlying expression is a function call to an aggregate fn.

    Expr subExpr = e.getExpr();
    boolean disallowedInChildren = false;
    if (subExpr instanceof FnCallExpr) {
      FnCallExpr fnCall = (FnCallExpr) subExpr;
      if (fnCall.isAggregate()) {
        // Yep, it's an aggregate function. Mark this aliasedExpr for aggregation step.
        mAggregateExprs.add(e);
        LOG.debug("Identified call to aggregate expr " + fnCall.getFunctionName());
      }
    } else {
      // Don't allow aggregate functions in any other subexpr of 'e'.
      mDisallowAggregates++;
      disallowedInChildren = true;
View Full Code Here

TOP

Related Classes of com.odiago.flumebase.parser.FnCallExpr

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.