Package com.sap.hadoop.windowing.query

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



    // $ANTLR start funclist
    // QSpecBuilder.g:173:1: funclist : ^( FUNCTIONS (f= function )+ ) ;
    public final void funclist() throws RecognitionException {
        FuncSpec f = null;


        try {
            // QSpecBuilder.g:173:10: ( ^( FUNCTIONS (f= function )+ ) )
            // QSpecBuilder.g:174:2: ^( FUNCTIONS (f= function )+ )
View Full Code Here



    // $ANTLR start function
    // QSpecBuilder.g:177:1: function returns [FuncSpec f] : ^( FUNCTION name= ID alias= ID (p= functionparam )* ( ^( TYPENAME t= ID ) )? (w= window_expression )? ) ;
    public final FuncSpec function() throws RecognitionException {
        FuncSpec f = null;

        CommonTree name=null;
        CommonTree alias=null;
        CommonTree t=null;
        FuncArg p = null;

        Window w = null;



          f = new FuncSpec();

        try {
            // QSpecBuilder.g:182:1: ( ^( FUNCTION name= ID alias= ID (p= functionparam )* ( ^( TYPENAME t= ID ) )? (w= window_expression )? ) )
            // QSpecBuilder.g:183:2: ^( FUNCTION name= ID alias= ID (p= functionparam )* ( ^( TYPENAME t= ID ) )? (w= window_expression )? )
            {
            match(input,FUNCTION,FOLLOW_FUNCTION_in_function469);

            match(input, Token.DOWN, null);
            name=(CommonTree)input.LT(1);
            match(input,ID,FOLLOW_ID_in_function480);
            f.setName(name.getText().toLowerCase());
            alias=(CommonTree)input.LT(1);
            match(input,ID,FOLLOW_ID_in_function492);
            f.setAlias(alias.getText());
            // QSpecBuilder.g:186:7: (p= functionparam )*
            loop15:
            do {
                int alt15=2;
                int LA15_0 = input.LA(1);

                if ( (LA15_0==ID||(LA15_0>=GROOVYEXPRESSION && LA15_0<=STRING)||LA15_0==NUMBER) ) {
                    alt15=1;
                }


                switch (alt15) {
              case 1 :
                  // QSpecBuilder.g:186:8: p= functionparam
                  {
                  pushFollow(FOLLOW_functionparam_in_function505);
                  p=functionparam();
                  _fsp--;

                  f.getParams().add(p);

                  }
                  break;

              default :
                  break loop15;
                }
            } while (true);

            // QSpecBuilder.g:187:7: ( ^( TYPENAME t= ID ) )?
            int alt16=2;
            int LA16_0 = input.LA(1);

            if ( (LA16_0==TYPENAME) ) {
                alt16=1;
            }
            switch (alt16) {
                case 1 :
                    // QSpecBuilder.g:187:8: ^( TYPENAME t= ID )
                    {
                    match(input,TYPENAME,FOLLOW_TYPENAME_in_function520);

                    match(input, Token.DOWN, null);
                    t=(CommonTree)input.LT(1);
                    match(input,ID,FOLLOW_ID_in_function524);

                    match(input, Token.UP, null);
                    f.setTypeName(t.getText());

                    }
                    break;

            }

            // QSpecBuilder.g:188:7: (w= window_expression )?
            int alt17=2;
            int LA17_0 = input.LA(1);

            if ( ((LA17_0>=WINDOWRANGE && LA17_0<=WINDOWVALUES)) ) {
                alt17=1;
            }
            switch (alt17) {
                case 1 :
                    // QSpecBuilder.g:188:8: w= window_expression
                    {
                    pushFollow(FOLLOW_window_expression_in_function541);
                    w=window_expression();
                    _fsp--;

                    f.setWindow(w);

                    }
                    break;

            }
View Full Code Here

TOP

Related Classes of com.sap.hadoop.windowing.query.FuncSpec

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.