Examples of BoundaryDef


Examples of com.sap.hadoop.windowing.query2.definition.WindowFrameDef.BoundaryDef

    return vals;
  }
 
  static Range getRange(WindowFunctionDef wFnDef, int currRow, Partition p) throws WindowingException
  {
    BoundaryDef startB = wFnDef.getWindow().getWindow().getStart();
    BoundaryDef endB = wFnDef.getWindow().getWindow().getEnd();
   
    int start = getIndex(startB, currRow, p, false);
    int end = getIndex(endB, currRow, p, true);
   
    return new Range(start, end, p);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.PTFDesc.BoundaryDef

    return vals;
  }

  Range getRange(WindowFunctionDef wFnDef, int currRow, PTFPartition p, Order order) throws HiveException
  {
    BoundaryDef startB = wFnDef.getWindowFrame().getStart();
    BoundaryDef endB = wFnDef.getWindowFrame().getEnd();
    boolean rowFrame = true;

    if ( startB instanceof ValueBoundaryDef || endB instanceof ValueBoundaryDef) {
      rowFrame = false;
    }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.PTFDesc.BoundaryDef

    return vals;
  }

  Range getRange(WindowFunctionDef wFnDef, int currRow, PTFPartition p, Order order) throws HiveException
  {
    BoundaryDef startB = wFnDef.getWindowFrame().getStart();
    BoundaryDef endB = wFnDef.getWindowFrame().getEnd();
    boolean rowFrame = true;

    if ( startB instanceof ValueBoundaryDef || endB instanceof ValueBoundaryDef) {
      rowFrame = false;
    }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.ptf.BoundaryDef

    return vals;
  }

  Range getRange(WindowFunctionDef wFnDef, int currRow, PTFPartition p, Order order) throws HiveException
  {
    BoundaryDef startB = wFnDef.getWindowFrame().getStart();
    BoundaryDef endB = wFnDef.getWindowFrame().getEnd();
    boolean rowFrame = true;

    if ( startB instanceof ValueBoundaryDef || endB instanceof ValueBoundaryDef) {
      rowFrame = false;
    }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.ptf.BoundaryDef

            (wFnDef.getWFnEval() instanceof GenericUDAFDenseRankEvaluator ||
            (wFnDef.getWFnEval() instanceof GenericUDAFLeadEvaluator ) ) {
          continue;
        }
        WindowFrameDef wdwFrame = wFnDef.getWindowFrame();
        BoundaryDef end = wdwFrame.getEnd();
        if ( end instanceof ValueBoundaryDef ) {
          return false;
        }
        if ( end.getDirection() == Direction.FOLLOWING ) {
          return false;
        }
      }
      return true;
    }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.ptf.BoundaryDef

    if (!wFnInfo.isSupportsWindow()) {
      return true;
    }

    BoundaryDef start = wdwFrame.getStart();
    BoundaryDef end = wdwFrame.getEnd();

    /*
     * Currently we are not handling dynamic sized windows implied by range
     * based windows.
     */
    if (start instanceof ValueBoundaryDef || end instanceof ValueBoundaryDef) {
      return false;
    }

    /*
     * Windows that are unbounded following don't benefit from Streaming.
     */
    if (end.getAmt() == BoundarySpec.UNBOUNDED_AMOUNT) {
      return false;
    }

    /*
     * let function decide if it can handle this special case.
     */
    if (start.getAmt() == BoundarySpec.UNBOUNDED_AMOUNT) {
      return true;
    }

    int windowLimit = HiveConf.getIntVar(cfg, ConfVars.HIVEJOINCACHESIZE);

    if (windowLimit < (start.getAmt() + end.getAmt() + 1)) {
      return false;
    }

    return true;
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.ptf.BoundaryDef

          .getWindowingEvaluator(wdwFrame) : null;
      if (streamingEval != null
          && streamingEval instanceof ISupportStreamingModeForWindowing) {
        continue;
      }
      BoundaryDef start = wdwFrame.getStart();
      BoundaryDef end = wdwFrame.getEnd();
      if (!(end instanceof ValueBoundaryDef)
          && !(start instanceof ValueBoundaryDef)) {
        if (end.getAmt() != BoundarySpec.UNBOUNDED_AMOUNT
            && start.getAmt() != BoundarySpec.UNBOUNDED_AMOUNT
            && end.getDirection() != Direction.PRECEDING
            && start.getDirection() != Direction.FOLLOWING) {

          int amt = wdwFrame.getStart().getAmt();
          if (amt > precedingSpan) {
            precedingSpan = amt;
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.ptf.BoundaryDef

    return vals;
  }

  Range getRange(WindowFunctionDef wFnDef, int currRow, PTFPartition p, Order order) throws HiveException
  {
    BoundaryDef startB = wFnDef.getWindowFrame().getStart();
    BoundaryDef endB = wFnDef.getWindowFrame().getEnd();
    boolean rowFrame = true;

    if ( startB instanceof ValueBoundaryDef || endB instanceof ValueBoundaryDef) {
      rowFrame = false;
    }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.ptf.BoundaryDef

    }

    @Override
    public GenericUDAFEvaluator getWindowingEvaluator(WindowFrameDef wFrmDef) {
      BoundaryDef start = wFrmDef.getStart();
      BoundaryDef end = wFrmDef.getEnd();
      return new LastValStreamingFixedWindow(this, start.getAmt(), end.getAmt());
    }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.ptf.BoundaryDef

public class TestStreamingSum {

  public static WindowFrameDef wdwFrame(int p, int f) {
    WindowFrameDef wFrmDef = new WindowFrameDef();
    BoundaryDef start, end;
    if (p == 0) {
      start = new CurrentRowDef();
    } else {
      RangeBoundaryDef startR = new RangeBoundaryDef();
      startR.setDirection(Direction.PRECEDING);
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.