Examples of RangeBoundary


Examples of com.sap.hadoop.windowing.query.RangeBoundary

                    match(input, Token.DOWN, null);
                    match(input,UNBOUNDED,FOLLOW_UNBOUNDED_in_valuesboundary790);

                    match(input, Token.UP, null);

                        RangeBoundary rb = new RangeBoundary();
                        rb.setDirection(Direction.FOLLOWING);
                        rb.setAmt(Boundary.UNBOUNDED_AMOUNT);
                        b = rb;
                     

                    }
                    break;
                case 2 :
                    // QSpecBuilder.g:268:3: ^( PRECEDING UNBOUNDED )
                    {
                    match(input,PRECEDING,FOLLOW_PRECEDING_in_valuesboundary801);

                    match(input, Token.DOWN, null);
                    match(input,UNBOUNDED,FOLLOW_UNBOUNDED_in_valuesboundary803);

                    match(input, Token.UP, null);

                        RangeBoundary rb = new RangeBoundary();
                        rb.setDirection(Direction.PRECEDING);
                        rb.setAmt(Boundary.UNBOUNDED_AMOUNT);
                        b = rb;
                     

                    }
                    break;
View Full Code Here

Examples of com.sap.hadoop.windowing.query.RangeBoundary

        Boundary b = null;

        CommonTree n=null;


          RangeBoundary rb = new RangeBoundary();
          b = rb;

        try {
            // QSpecBuilder.g:226:1: ( ^( FOLLOWING UNBOUNDED ) | ^( PRECEDING UNBOUNDED ) | CURRENT | ^( FOLLOWING n= NUMBER ) | ^( PRECEDING n= NUMBER ) )
            int alt20=5;
            switch ( input.LA(1) ) {
            case FOLLOWING:
                {
                int LA20_1 = input.LA(2);

                if ( (LA20_1==DOWN) ) {
                    int LA20_4 = input.LA(3);

                    if ( (LA20_4==NUMBER) ) {
                        alt20=4;
                    }
                    else if ( (LA20_4==UNBOUNDED) ) {
                        alt20=1;
                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("220:1: rowsboundary returns [Boundary b] : ( ^( FOLLOWING UNBOUNDED ) | ^( PRECEDING UNBOUNDED ) | CURRENT | ^( FOLLOWING n= NUMBER ) | ^( PRECEDING n= NUMBER ) );", 20, 4, input);

                        throw nvae;
                    }
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("220:1: rowsboundary returns [Boundary b] : ( ^( FOLLOWING UNBOUNDED ) | ^( PRECEDING UNBOUNDED ) | CURRENT | ^( FOLLOWING n= NUMBER ) | ^( PRECEDING n= NUMBER ) );", 20, 1, input);

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

                if ( (LA20_2==DOWN) ) {
                    int LA20_5 = input.LA(3);

                    if ( (LA20_5==NUMBER) ) {
                        alt20=5;
                    }
                    else if ( (LA20_5==UNBOUNDED) ) {
                        alt20=2;
                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("220:1: rowsboundary returns [Boundary b] : ( ^( FOLLOWING UNBOUNDED ) | ^( PRECEDING UNBOUNDED ) | CURRENT | ^( FOLLOWING n= NUMBER ) | ^( PRECEDING n= NUMBER ) );", 20, 5, input);

                        throw nvae;
                    }
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("220:1: rowsboundary returns [Boundary b] : ( ^( FOLLOWING UNBOUNDED ) | ^( PRECEDING UNBOUNDED ) | CURRENT | ^( FOLLOWING n= NUMBER ) | ^( PRECEDING n= NUMBER ) );", 20, 2, input);

                    throw nvae;
                }
                }
                break;
            case CURRENT:
                {
                alt20=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("220:1: rowsboundary returns [Boundary b] : ( ^( FOLLOWING UNBOUNDED ) | ^( PRECEDING UNBOUNDED ) | CURRENT | ^( FOLLOWING n= NUMBER ) | ^( PRECEDING n= NUMBER ) );", 20, 0, input);

                throw nvae;
            }

            switch (alt20) {
                case 1 :
                    // QSpecBuilder.g:227:3: ^( FOLLOWING UNBOUNDED )
                    {
                    match(input,FOLLOWING,FOLLOW_FOLLOWING_in_rowsboundary685);

                    match(input, Token.DOWN, null);
                    match(input,UNBOUNDED,FOLLOW_UNBOUNDED_in_rowsboundary687);

                    match(input, Token.UP, null);

                        rb.setDirection(Direction.FOLLOWING);
                        rb.setAmt(Boundary.UNBOUNDED_AMOUNT);
                     

                    }
                    break;
                case 2 :
                    // QSpecBuilder.g:231:3: ^( PRECEDING UNBOUNDED )
                    {
                    match(input,PRECEDING,FOLLOW_PRECEDING_in_rowsboundary698);

                    match(input, Token.DOWN, null);
                    match(input,UNBOUNDED,FOLLOW_UNBOUNDED_in_rowsboundary700);

                    match(input, Token.UP, null);

                        rb.setDirection(Direction.PRECEDING);
                        rb.setAmt(Boundary.UNBOUNDED_AMOUNT);
                     

                    }
                    break;
                case 3 :
                    // QSpecBuilder.g:235:3: CURRENT
                    {
                    match(input,CURRENT,FOLLOW_CURRENT_in_rowsboundary710);
                    b = new CurrentRow();

                    }
                    break;
                case 4 :
                    // QSpecBuilder.g:236:3: ^( FOLLOWING n= NUMBER )
                    {
                    match(input,FOLLOWING,FOLLOW_FOLLOWING_in_rowsboundary719);

                    match(input, Token.DOWN, null);
                    n=(CommonTree)input.LT(1);
                    match(input,NUMBER,FOLLOW_NUMBER_in_rowsboundary723);

                    match(input, Token.UP, null);

                        rb.setDirection(Direction.FOLLOWING);
                        rb.setAmt(Integer.parseInt(n.getText()));
                     

                    }
                    break;
                case 5 :
                    // QSpecBuilder.g:240:3: ^( PRECEDING n= NUMBER )
                    {
                    match(input,PRECEDING,FOLLOW_PRECEDING_in_rowsboundary733);

                    match(input, Token.DOWN, null);
                    n=(CommonTree)input.LT(1);
                    match(input,NUMBER,FOLLOW_NUMBER_in_rowsboundary737);

                    match(input, Token.UP, null);

                        rb.setDirection(Direction.PRECEDING);
                        rb.setAmt(Integer.parseInt(n.getText()));
                     

                    }
                    break;
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.