Examples of RangeBoundarySpec


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

        BoundarySpec bs = null;

        CommonTree n=null;


          RangeBoundarySpec rbs = new RangeBoundarySpec();
          bs = rbs;

        try {
            // QSpecBuilder2.g:191:3: ( ^( PRECEDING UNBOUNDED ) | ^( FOLLOWING UNBOUNDED ) | CURRENT | ^( PRECEDING n= Number ) | ^( FOLLOWING n= Number ) )
            int alt37=5;
            switch ( input.LA(1) ) {
            case PRECEDING:
                {
                int LA37_1 = input.LA(2);

                if ( (LA37_1==DOWN) ) {
                    int LA37_4 = input.LA(3);

                    if ( (LA37_4==Number) ) {
                        alt37=4;
                    }
                    else if ( (LA37_4==UNBOUNDED) ) {
                        alt37=1;
                    }
                    else {
                        if (backtracking>0) {failed=true; return bs;}
                        NoViableAltException nvae =
                            new NoViableAltException("186:1: rowsboundary returns [BoundarySpec bs] : ( ^( PRECEDING UNBOUNDED ) | ^( FOLLOWING UNBOUNDED ) | CURRENT | ^( PRECEDING n= Number ) | ^( FOLLOWING n= Number ) );", 37, 4, input);

                        throw nvae;
                    }
                }
                else {
                    if (backtracking>0) {failed=true; return bs;}
                    NoViableAltException nvae =
                        new NoViableAltException("186:1: rowsboundary returns [BoundarySpec bs] : ( ^( PRECEDING UNBOUNDED ) | ^( FOLLOWING UNBOUNDED ) | CURRENT | ^( PRECEDING n= Number ) | ^( FOLLOWING n= Number ) );", 37, 1, input);

                    throw nvae;
                }
                }
                break;
            case FOLLOWING:
                {
                int LA37_2 = input.LA(2);

                if ( (LA37_2==DOWN) ) {
                    int LA37_5 = input.LA(3);

                    if ( (LA37_5==Number) ) {
                        alt37=5;
                    }
                    else if ( (LA37_5==UNBOUNDED) ) {
                        alt37=2;
                    }
                    else {
                        if (backtracking>0) {failed=true; return bs;}
                        NoViableAltException nvae =
                            new NoViableAltException("186:1: rowsboundary returns [BoundarySpec bs] : ( ^( PRECEDING UNBOUNDED ) | ^( FOLLOWING UNBOUNDED ) | CURRENT | ^( PRECEDING n= Number ) | ^( FOLLOWING n= Number ) );", 37, 5, input);

                        throw nvae;
                    }
                }
                else {
                    if (backtracking>0) {failed=true; return bs;}
                    NoViableAltException nvae =
                        new NoViableAltException("186:1: rowsboundary returns [BoundarySpec bs] : ( ^( PRECEDING UNBOUNDED ) | ^( FOLLOWING UNBOUNDED ) | CURRENT | ^( PRECEDING n= Number ) | ^( FOLLOWING n= Number ) );", 37, 2, input);

                    throw nvae;
                }
                }
                break;
            case CURRENT:
                {
                alt37=3;
                }
                break;
            default:
                if (backtracking>0) {failed=true; return bs;}
                NoViableAltException nvae =
                    new NoViableAltException("186:1: rowsboundary returns [BoundarySpec bs] : ( ^( PRECEDING UNBOUNDED ) | ^( FOLLOWING UNBOUNDED ) | CURRENT | ^( PRECEDING n= Number ) | ^( FOLLOWING n= Number ) );", 37, 0, input);

                throw nvae;
            }

            switch (alt37) {
                case 1 :
                    // QSpecBuilder2.g:192:3: ^( PRECEDING UNBOUNDED )
                    {
                    match(input,PRECEDING,FOLLOW_PRECEDING_in_rowsboundary870); if (failed) return bs;

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

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

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

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

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

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

                    }
                    break;
                case 4 :
                    // QSpecBuilder2.g:195:3: ^( PRECEDING n= Number )
                    {
                    match(input,PRECEDING,FOLLOW_PRECEDING_in_rowsboundary903); if (failed) return bs;

                    match(input, Token.DOWN, null); if (failed) return bs;
                    n=(CommonTree)input.LT(1);
                    match(input,Number,FOLLOW_Number_in_rowsboundary907); if (failed) return bs;

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

                    }
                    break;
                case 5 :
                    // QSpecBuilder2.g:196:3: ^( FOLLOWING n= Number )
                    {
                    match(input,FOLLOWING,FOLLOW_FOLLOWING_in_rowsboundary917); if (failed) return bs;

                    match(input, Token.DOWN, null); if (failed) return bs;
                    n=(CommonTree)input.LT(1);
                    match(input,Number,FOLLOW_Number_in_rowsboundary921); if (failed) return bs;

                    match(input, Token.UP, null); if (failed) return bs;
                    if ( backtracking==0 ) {
                      rbs.setDirection(Direction.FOLLOWING); rbs.setAmt(Integer.parseInt(n.getText()));
                    }

                    }
                    break;
View Full Code Here

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

      vbDef.setOI(OI);
      return vbDef;
    }
    else if ( bndSpec instanceof RangeBoundarySpec)
    {
      RangeBoundarySpec rBndSpec = (RangeBoundarySpec) bndSpec;
      RangeBoundaryDef rbDef = new RangeBoundaryDef(rBndSpec);
      return rbDef;
    }
    else if ( bndSpec instanceof CurrentRowSpec)
    {
View Full Code Here

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

      PTFTranslator.validateValueBoundaryExprType(exprDef.getOI());
      vbDef.setExpressionDef(exprDef);
      return vbDef;
    }
    else if (bndSpec instanceof RangeBoundarySpec) {
      RangeBoundarySpec rBndSpec = (RangeBoundarySpec) bndSpec;
      RangeBoundaryDef rbDef = new RangeBoundaryDef();
      rbDef.setAmt(rBndSpec.getAmt());
      rbDef.setDirection(rBndSpec.getDirection());
      return rbDef;
    } else if (bndSpec instanceof CurrentRowSpec) {
      CurrentRowDef cbDef = new CurrentRowDef();
      return cbDef;
    }
View Full Code Here

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

    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.RangeBoundarySpec

    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.RangeBoundarySpec

      PTFTranslator.validateValueBoundaryExprType(exprDef.getOI());
      vbDef.setExpressionDef(exprDef);
      return vbDef;
    }
    else if (bndSpec instanceof RangeBoundarySpec) {
      RangeBoundarySpec rBndSpec = (RangeBoundarySpec) bndSpec;
      RangeBoundaryDef rbDef = new RangeBoundaryDef();
      rbDef.setAmt(rBndSpec.getAmt());
      rbDef.setDirection(rBndSpec.getDirection());
      return rbDef;
    } else if (bndSpec instanceof CurrentRowSpec) {
      CurrentRowDef cbDef = new CurrentRowDef();
      return cbDef;
    }
View Full Code Here

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

    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.RangeBoundarySpec

      PTFTranslator.validateValueBoundaryExprType(exprDef.getOI());
      vbDef.setExpressionDef(exprDef);
      return vbDef;
    }
    else if (bndSpec instanceof RangeBoundarySpec) {
      RangeBoundarySpec rBndSpec = (RangeBoundarySpec) bndSpec;
      RangeBoundaryDef rbDef = new RangeBoundaryDef();
      rbDef.setAmt(rBndSpec.getAmt());
      rbDef.setDirection(rBndSpec.getDirection());
      return rbDef;
    } else if (bndSpec instanceof CurrentRowSpec) {
      CurrentRowDef cbDef = new CurrentRowDef();
      return cbDef;
    }
View Full Code Here

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

      PTFTranslator.validateValueBoundaryExprType(exprDef.getOI());
      vbDef.setExpressionDef(exprDef);
      return vbDef;
    }
    else if (bndSpec instanceof RangeBoundarySpec) {
      RangeBoundarySpec rBndSpec = (RangeBoundarySpec) bndSpec;
      RangeBoundaryDef rbDef = new RangeBoundaryDef();
      rbDef.setAmt(rBndSpec.getAmt());
      rbDef.setDirection(rBndSpec.getDirection());
      return rbDef;
    } else if (bndSpec instanceof CurrentRowSpec) {
      CurrentRowDef cbDef = new CurrentRowDef();
      return cbDef;
    }
View Full Code Here

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

    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.