// $ANTLR start tblfunc
// QSpecBuilder.g:111:1: tblfunc returns [TableFuncSpec tf] : ^( TBLFUNCTION name= ID tf1= tableSpec (p= functionparam )* ( partitionby )? ( orderby )? (w= window_expression )? ) ;
public final TableFuncSpec tblfunc() throws RecognitionException {
PartOrderScope_stack.push(new PartOrderScope_scope());
TableFuncSpec tf = null;
CommonTree name=null;
TableFuncSpec tf1 = null;
FuncArg p = null;
Window w = null;
tf = new TableFuncSpec();
((PartOrderScope_scope)PartOrderScope_stack.peek()).partitionColumns = tf.getPartitionColumns();
((PartOrderScope_scope)PartOrderScope_stack.peek()).orderColumns = tf.getOrderColumns();
try {
// QSpecBuilder.g:127:1: ( ^( TBLFUNCTION name= ID tf1= tableSpec (p= functionparam )* ( partitionby )? ( orderby )? (w= window_expression )? ) )