Examples of ValueBoundarySpec


Examples of com.sap.hadoop.windowing.query2.specification.WindowFrameSpec.ValueBoundarySpec

                    match(input, Token.DOWN, null); if (failed) return bs;
                    match(input,UNBOUNDED,FOLLOW_UNBOUNDED_in_valuesboundary968); if (failed) return bs;

                    match(input, Token.UP, null); if (failed) return bs;
                    if ( backtracking==0 ) {
                      bs = new ValueBoundarySpec(Direction.PRECEDING, null, BoundarySpec.UNBOUNDED_AMOUNT);
                    }

                    }
                    break;
                case 2 :
                    // QSpecBuilder2.g:205:3: ^( FOLLOWING UNBOUNDED )
                    {
                    match(input,FOLLOWING,FOLLOW_FOLLOWING_in_valuesboundary979); if (failed) return bs;

                    match(input, Token.DOWN, null); if (failed) return bs;
                    match(input,UNBOUNDED,FOLLOW_UNBOUNDED_in_valuesboundary981); if (failed) return bs;

                    match(input, Token.UP, null); if (failed) return bs;
                    if ( backtracking==0 ) {
                      bs = new ValueBoundarySpec(Direction.FOLLOWING, null, BoundarySpec.UNBOUNDED_AMOUNT);
                    }

                    }
                    break;
                case 3 :
                    // QSpecBuilder2.g:206:3: CURRENT
                    {
                    match(input,CURRENT,FOLLOW_CURRENT_in_valuesboundary990); if (failed) return bs;
                    if ( backtracking==0 ) {
                      bs = new CurrentRowSpec();
                    }

                    }
                    break;
                case 4 :
                    // QSpecBuilder2.g:207:3: ^( LESS e= expression n= Number )
                    {
                    match(input,LESS,FOLLOW_LESS_in_valuesboundary999); if (failed) return bs;

                    match(input, Token.DOWN, null); if (failed) return bs;
                    pushFollow(FOLLOW_expression_in_valuesboundary1003);
                    e=expression();
                    _fsp--;
                    if (failed) return bs;
                    n=(CommonTree)input.LT(1);
                    match(input,Number,FOLLOW_Number_in_valuesboundary1007); if (failed) return bs;

                    match(input, Token.UP, null); if (failed) return bs;
                    if ( backtracking==0 ) {
                      bs = new ValueBoundarySpec(Direction.PRECEDING, e, Integer.parseInt(n.getText()));
                    }

                    }
                    break;
                case 5 :
                    // QSpecBuilder2.g:208:3: ^( MORE e= expression n= Number )
                    {
                    match(input,MORE,FOLLOW_MORE_in_valuesboundary1017); if (failed) return bs;

                    match(input, Token.DOWN, null); if (failed) return bs;
                    pushFollow(FOLLOW_expression_in_valuesboundary1021);
                    e=expression();
                    _fsp--;
                    if (failed) return bs;
                    n=(CommonTree)input.LT(1);
                    match(input,Number,FOLLOW_Number_in_valuesboundary1025); if (failed) return bs;

                    match(input, Token.UP, null); if (failed) return bs;
                    if ( backtracking==0 ) {
                      bs = new ValueBoundarySpec(Direction.PRECEDING, e, Integer.parseInt(n.getText()));
                    }

                    }
                    break;
View Full Code Here

Examples of com.sap.hadoop.windowing.query2.specification.WindowFrameSpec.ValueBoundarySpec

 
  static BoundaryDef translateBoundary(QueryDef qDef, BoundarySpec bndSpec, InputInfo iInfo) throws WindowingException
  {
    if ( bndSpec instanceof ValueBoundarySpec )
    {
      ValueBoundarySpec vBndSpec = (ValueBoundarySpec) bndSpec;
      ValueBoundaryDef vbDef = new ValueBoundaryDef(vBndSpec);
      TranslateUtils.validateNoLeadLagInValueBoundarySpec(vBndSpec.getExpression());
      ExprNodeDesc exprNode = TranslateUtils.buildExprNode(vBndSpec.getExpression(), iInfo.getTypeCheckCtx());
      vbDef.setExprNode(exprNode);
      ExprNodeEvaluator exprEval = WindowingExprNodeEvaluatorFactory.get(qDef.getTranslationInfo(), exprNode);
      ObjectInspector OI = TranslateUtils.initExprNodeEvaluator(qDef, exprNode, exprEval, iInfo);
      TranslateUtils.validateValueBoundaryExprType(OI);
      vbDef.setExprEvaluator(exprEval);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.parse.WindowingSpec.ValueBoundarySpec

  }

  private BoundaryDef translate(ShapeDetails inpShape, BoundarySpec bndSpec)
      throws SemanticException {
    if (bndSpec instanceof ValueBoundarySpec) {
      ValueBoundarySpec vBndSpec = (ValueBoundarySpec) bndSpec;
      ValueBoundaryDef vbDef = new ValueBoundaryDef();
      vbDef.setAmt(vBndSpec.getAmt());
      vbDef.setDirection(vBndSpec.getDirection());
      PTFTranslator.validateNoLeadLagInValueBoundarySpec(vBndSpec.getExpression());
      PTFExpressionDef exprDef = null;
      try {
        exprDef = buildExpressionDef(inpShape, vBndSpec.getExpression());
      } catch (HiveException he) {
        throw new SemanticException(he);
      }
      PTFTranslator.validateValueBoundaryExprType(exprDef.getOI());
      vbDef.setExpressionDef(exprDef);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.parse.WindowingSpec.ValueBoundarySpec

    return new WindowFrameSpec(start, end);
  }

  private BoundarySpec processBoundary(int frameType, ASTNode nodethrows SemanticException {
    BoundarySpec bs = frameType == HiveParser.TOK_WINDOWRANGE ?
        new RangeBoundarySpec() : new ValueBoundarySpec();
    int type = node.getType();
    boolean hasAmt = true;

    switch(type)
    {
View Full Code Here

Examples of org.apache.hadoop.hive.ql.parse.WindowingSpec.ValueBoundarySpec

    return new WindowFrameSpec(start, end);
  }

  private BoundarySpec processBoundary(int frameType, ASTNode nodethrows SemanticException {
    BoundarySpec bs = frameType == HiveParser.TOK_WINDOWRANGE ?
        new RangeBoundarySpec() : new ValueBoundarySpec();
    int type = node.getType();
    boolean hasAmt = true;

    switch(type)
    {
View Full Code Here

Examples of org.apache.hadoop.hive.ql.parse.WindowingSpec.ValueBoundarySpec

  }

  private BoundaryDef translate(ShapeDetails inpShape, BoundarySpec bndSpec)
      throws SemanticException {
    if (bndSpec instanceof ValueBoundarySpec) {
      ValueBoundarySpec vBndSpec = (ValueBoundarySpec) bndSpec;
      ValueBoundaryDef vbDef = new ValueBoundaryDef();
      vbDef.setAmt(vBndSpec.getAmt());
      vbDef.setDirection(vBndSpec.getDirection());
      PTFTranslator.validateNoLeadLagInValueBoundarySpec(vBndSpec.getExpression());
      PTFExpressionDef exprDef = null;
      try {
        exprDef = buildExpressionDef(inpShape, vBndSpec.getExpression());
      } catch (HiveException he) {
        throw new SemanticException(he);
      }
      PTFTranslator.validateValueBoundaryExprType(exprDef.getOI());
      vbDef.setExpressionDef(exprDef);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.parse.WindowingSpec.ValueBoundarySpec

    return new WindowFrameSpec(start, end);
  }

  private BoundarySpec processBoundary(int frameType, ASTNode nodethrows SemanticException {
    BoundarySpec bs = frameType == HiveParser.TOK_WINDOWRANGE ?
        new RangeBoundarySpec() : new ValueBoundarySpec();
    int type = node.getType();
    boolean hasAmt = true;

    switch(type)
    {
View Full Code Here

Examples of org.apache.hadoop.hive.ql.parse.WindowingSpec.ValueBoundarySpec

  }

  private BoundaryDef translate(ShapeDetails inpShape, BoundarySpec bndSpec)
      throws SemanticException {
    if (bndSpec instanceof ValueBoundarySpec) {
      ValueBoundarySpec vBndSpec = (ValueBoundarySpec) bndSpec;
      ValueBoundaryDef vbDef = new ValueBoundaryDef();
      vbDef.setAmt(vBndSpec.getAmt());
      vbDef.setDirection(vBndSpec.getDirection());
      PTFTranslator.validateNoLeadLagInValueBoundarySpec(vBndSpec.getExpression());
      PTFExpressionDef exprDef = null;
      try {
        exprDef = buildExpressionDef(inpShape, vBndSpec.getExpression());
      } catch (HiveException he) {
        throw new SemanticException(he);
      }
      PTFTranslator.validateValueBoundaryExprType(exprDef.getOI());
      vbDef.setExpressionDef(exprDef);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.parse.WindowingSpec.ValueBoundarySpec

  }

  private BoundaryDef translate(ShapeDetails inpShape, BoundarySpec bndSpec)
      throws SemanticException {
    if (bndSpec instanceof ValueBoundarySpec) {
      ValueBoundarySpec vBndSpec = (ValueBoundarySpec) bndSpec;
      ValueBoundaryDef vbDef = new ValueBoundaryDef();
      vbDef.setAmt(vBndSpec.getAmt());
      vbDef.setDirection(vBndSpec.getDirection());
      PTFTranslator.validateNoLeadLagInValueBoundarySpec(vBndSpec.getExpression());
      PTFExpressionDef exprDef = null;
      try {
        exprDef = buildExpressionDef(inpShape, vBndSpec.getExpression());
      } catch (HiveException he) {
        throw new SemanticException(he);
      }
      PTFTranslator.validateValueBoundaryExprType(exprDef.getOI());
      vbDef.setExpressionDef(exprDef);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.parse.WindowingSpec.ValueBoundarySpec

    return new WindowFrameSpec(start, end);
  }

  private BoundarySpec processBoundary(int frameType, ASTNode nodethrows SemanticException {
    BoundarySpec bs = frameType == HiveParser.TOK_WINDOWRANGE ?
        new RangeBoundarySpec() : new ValueBoundarySpec();
    int type = node.getType();
    boolean hasAmt = true;

    switch(type)
    {
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.