/* This file is automatically generated by Lemon from input grammar
** source file "sql.y". */
/*
** 2000-05-29
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Driver template for the LEMON parser generator.
**
** The "lemon" program processes an LALR(1) input grammar file, then uses
** this template to construct a parser.  The "lemon" program inserts text
** at each "%%" line.  Also, any "P-a-r-s-e" identifer prefix (without the
** interstitial "-" characters) contained in this template is changed into
** the value of the %name directive from the grammar.  Otherwise, the content
** of this template is copied straight through into the generate parser
** source file.
**
** The following is the concatenation of all %include directives from the
** input grammar file:
*/
/************ Begin %include sections from the grammar ************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdbool.h>
#include "qSqlparser.h"
#include "tcmdtype.h"
#include "ttoken.h"
#include "ttokendef.h"
#include "tutil.h"
#include "tvariant.h"
/**************** End of %include directives **********************************/
/* These constants specify the various numeric values for terminal symbols.
***************** Begin token definitions *************************************/
#ifndef TK_ID
#define TK_ID                              1
#define TK_BOOL                            2
#define TK_TINYINT                         3
#define TK_SMALLINT                        4
#define TK_INTEGER                         5
#define TK_BIGINT                          6
#define TK_FLOAT                           7
#define TK_DOUBLE                          8
#define TK_STRING                          9
#define TK_TIMESTAMP                      10
#define TK_BINARY                         11
#define TK_NCHAR                          12
#define TK_JSON                           13
#define TK_OR                             14
#define TK_AND                            15
#define TK_NOT                            16
#define TK_EQ                             17
#define TK_NE                             18
#define TK_ISNULL                         19
#define TK_NOTNULL                        20
#define TK_IS                             21
#define TK_LIKE                           22
#define TK_MATCH                          23
#define TK_NMATCH                         24
#define TK_CONTAINS                       25
#define TK_GLOB                           26
#define TK_BETWEEN                        27
#define TK_IN                             28
#define TK_GT                             29
#define TK_GE                             30
#define TK_LT                             31
#define TK_LE                             32
#define TK_BITAND                         33
#define TK_BITOR                          34
#define TK_LSHIFT                         35
#define TK_RSHIFT                         36
#define TK_PLUS                           37
#define TK_MINUS                          38
#define TK_DIVIDE                         39
#define TK_TIMES                          40
#define TK_STAR                           41
#define TK_SLASH                          42
#define TK_REM                            43
#define TK_CONCAT                         44
#define TK_UMINUS                         45
#define TK_UPLUS                          46
#define TK_BITNOT                         47
#define TK_ARROW                          48
#define TK_SHOW                           49
#define TK_DATABASES                      50
#define TK_TOPICS                         51
#define TK_FUNCTIONS                      52
#define TK_MNODES                         53
#define TK_DNODES                         54
#define TK_ACCOUNTS                       55
#define TK_USERS                          56
#define TK_MODULES                        57
#define TK_QUERIES                        58
#define TK_CONNECTIONS                    59
#define TK_STREAMS                        60
#define TK_VARIABLES                      61
#define TK_SCORES                         62
#define TK_GRANTS                         63
#define TK_VNODES                         64
#define TK_DOT                            65
#define TK_CREATE                         66
#define TK_TABLE                          67
#define TK_STABLE                         68
#define TK_DATABASE                       69
#define TK_TABLES                         70
#define TK_STABLES                        71
#define TK_VGROUPS                        72
#define TK_DROP                           73
#define TK_TOPIC                          74
#define TK_FUNCTION                       75
#define TK_DNODE                          76
#define TK_USER                           77
#define TK_ACCOUNT                        78
#define TK_USE                            79
#define TK_DESCRIBE                       80
#define TK_DESC                           81
#define TK_ALTER                          82
#define TK_PASS                           83
#define TK_PRIVILEGE                      84
#define TK_LOCAL                          85
#define TK_COMPACT                        86
#define TK_LP                             87
#define TK_RP                             88
#define TK_IF                             89
#define TK_EXISTS                         90
#define TK_AS                             91
#define TK_OUTPUTTYPE                     92
#define TK_AGGREGATE                      93
#define TK_BUFSIZE                        94
#define TK_PPS                            95
#define TK_TSERIES                        96
#define TK_DBS                            97
#define TK_STORAGE                        98
#define TK_QTIME                          99
#define TK_CONNS                          100
#define TK_STATE                          101
#define TK_COMMA                          102
#define TK_KEEP                           103
#define TK_CACHE                          104
#define TK_REPLICA                        105
#define TK_QUORUM                         106
#define TK_DAYS                           107
#define TK_MINROWS                        108
#define TK_MAXROWS                        109
#define TK_BLOCKS                         110
#define TK_CTIME                          111
#define TK_WAL                            112
#define TK_FSYNC                          113
#define TK_COMP                           114
#define TK_PRECISION                      115
#define TK_UPDATE                         116
#define TK_CACHELAST                      117
#define TK_PARTITIONS                     118
#define TK_UNSIGNED                       119
#define TK_TAGS                           120
#define TK_USING                          121
#define TK_NULL                           122
#define TK_NOW                            123
#define TK_SELECT                         124
#define TK_UNION                          125
#define TK_ALL                            126
#define TK_DISTINCT                       127
#define TK_FROM                           128
#define TK_VARIABLE                       129
#define TK_RANGE                          130
#define TK_INTERVAL                       131
#define TK_EVERY                          132
#define TK_SESSION                        133
#define TK_STATE_WINDOW                   134
#define TK_FILL                           135
#define TK_SLIDING                        136
#define TK_ORDER                          137
#define TK_BY                             138
#define TK_ASC                            139
#define TK_GROUP                          140
#define TK_HAVING                         141
#define TK_LIMIT                          142
#define TK_OFFSET                         143
#define TK_SLIMIT                         144
#define TK_SOFFSET                        145
#define TK_WHERE                          146
#define TK_RESET                          147
#define TK_QUERY                          148
#define TK_SYNCDB                         149
#define TK_ADD                            150
#define TK_COLUMN                         151
#define TK_MODIFY                         152
#define TK_TAG                            153
#define TK_CHANGE                         154
#define TK_SET                            155
#define TK_KILL                           156
#define TK_CONNECTION                     157
#define TK_STREAM                         158
#define TK_COLON                          159
#define TK_ABORT                          160
#define TK_AFTER                          161
#define TK_ATTACH                         162
#define TK_BEFORE                         163
#define TK_BEGIN                          164
#define TK_CASCADE                        165
#define TK_CLUSTER                        166
#define TK_CONFLICT                       167
#define TK_COPY                           168
#define TK_DEFERRED                       169
#define TK_DELIMITERS                     170
#define TK_DETACH                         171
#define TK_EACH                           172
#define TK_END                            173
#define TK_EXPLAIN                        174
#define TK_FAIL                           175
#define TK_FOR                            176
#define TK_IGNORE                         177
#define TK_IMMEDIATE                      178
#define TK_INITIALLY                      179
#define TK_INSTEAD                        180
#define TK_KEY                            181
#define TK_OF                             182
#define TK_RAISE                          183
#define TK_REPLACE                        184
#define TK_RESTRICT                       185
#define TK_ROW                            186
#define TK_STATEMENT                      187
#define TK_TRIGGER                        188
#define TK_VIEW                           189
#define TK_IPTOKEN                        190
#define TK_SEMI                           191
#define TK_NONE                           192
#define TK_PREV                           193
#define TK_LINEAR                         194
#define TK_IMPORT                         195
#define TK_TBNAME                         196
#define TK_JOIN                           197
#define TK_INSERT                         198
#define TK_INTO                           199
#define TK_VALUES                         200
#define TK_FILE                           201
#endif
/**************** End token definitions ***************************************/

/* The next sections is a series of control #defines.
** various aspects of the generated parser.
**    YYCODETYPE         is the data type used to store the integer codes
**                       that represent terminal and non-terminal symbols.
**                       "unsigned char" is used if there are fewer than
**                       256 symbols.  Larger types otherwise.
**    YYNOCODE           is a number of type YYCODETYPE that is not used for
**                       any terminal or nonterminal symbol.
**    YYFALLBACK         If defined, this indicates that one or more tokens
**                       (also known as: "terminal symbols") have fall-back
**                       values which should be used if the original symbol
**                       would not parse.  This permits keywords to sometimes
**                       be used as identifiers, for example.
**    YYACTIONTYPE       is the data type used for "action codes" - numbers
**                       that indicate what to do in response to the next
**                       token.
**    ParseTOKENTYPE     is the data type used for minor type for terminal
**                       symbols.  Background: A "minor type" is a semantic
**                       value associated with a terminal or non-terminal
**                       symbols.  For example, for an "ID" terminal symbol,
**                       the minor type might be the name of the identifier.
**                       Each non-terminal can have a different minor type.
**                       Terminal symbols all have the same minor type, though.
**                       This macros defines the minor type for terminal 
**                       symbols.
**    YYMINORTYPE        is the data type used for all minor types.
**                       This is typically a union of many types, one of
**                       which is ParseTOKENTYPE.  The entry in the union
**                       for terminal symbols is called "yy0".
**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
**                       zero the stack is dynamically sized using realloc()
**    ParseARG_SDECL     A static variable declaration for the %extra_argument
**    ParseARG_PDECL     A parameter declaration for the %extra_argument
**    ParseARG_PARAM     Code to pass %extra_argument as a subroutine parameter
**    ParseARG_STORE     Code to store %extra_argument into yypParser
**    ParseARG_FETCH     Code to extract %extra_argument from yypParser
**    ParseCTX_*         As ParseARG_ except for %extra_context
**    YYERRORSYMBOL      is the code number of the error symbol.  If not
**                       defined, then do no error processing.
**    YYNSTATE           the combined number of states.
**    YYNRULE            the number of rules in the grammar
**    YYNTOKEN           Number of terminal symbols
**    YY_MAX_SHIFT       Maximum value for shift actions
**    YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions
**    YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions
**    YY_ERROR_ACTION    The yy_action[] code for syntax error
**    YY_ACCEPT_ACTION   The yy_action[] code for accept
**    YY_NO_ACTION       The yy_action[] code for no-op
**    YY_MIN_REDUCE      Minimum value for reduce actions
**    YY_MAX_REDUCE      Maximum value for reduce actions
*/
#ifndef INTERFACE
# define INTERFACE 1
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned short int
#define YYNOCODE 285
#define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE SStrToken
typedef union {
  int yyinit;
  ParseTOKENTYPE yy0;
  SCreateAcctInfo yy31;
  SSqlNode* yy86;
  TAOS_FIELD yy103;
  tVariant yy176;
  tSqlExpr* yy226;
  SWindowStateVal yy228;
  SArray* yy231;
  SCreatedTableInfo yy306;
  int32_t yy310;
  SSessionWindowVal yy409;
  SCreateTableSql* yy422;
  SIntervalVal yy430;
  SLimitVal yy444;
  SRangeVal yy480;
  SRelationInfo* yy484;
  int yy502;
  SCreateDbInfo yy532;
  int64_t yy549;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
#endif
#define ParseARG_SDECL SSqlInfo* pInfo;
#define ParseARG_PDECL ,SSqlInfo* pInfo
#define ParseARG_PARAM ,pInfo
#define ParseARG_FETCH SSqlInfo* pInfo=yypParser->pInfo;
#define ParseARG_STORE yypParser->pInfo=pInfo;
#define ParseCTX_SDECL
#define ParseCTX_PDECL
#define ParseCTX_PARAM
#define ParseCTX_FETCH
#define ParseCTX_STORE
#define YYFALLBACK 1
#define YYNSTATE             387
#define YYNRULE              312
#define YYNRULE_WITH_ACTION  312
#define YYNTOKEN             202
#define YY_MAX_SHIFT         386
#define YY_MIN_SHIFTREDUCE   609
#define YY_MAX_SHIFTREDUCE   920
#define YY_ERROR_ACTION      921
#define YY_ACCEPT_ACTION     922
#define YY_NO_ACTION         923
#define YY_MIN_REDUCE        924
#define YY_MAX_REDUCE        1235
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))

/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
** to a macro that can assist in verifying code coverage.  For production
** code the yytestcase() macro should be turned off.  But it is useful
** for testing.
*/
#ifndef yytestcase
# define yytestcase(X)
#endif


/* Next are the tables used to determine what action to take based on the
** current state and lookahead token.  These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.  
**
** Suppose the action integer is N.  Then the action is determined as
** follows
**
**   0 <= N <= YY_MAX_SHIFT             Shift N.  That is, push the lookahead
**                                      token onto the stack and goto state N.
**
**   N between YY_MIN_SHIFTREDUCE       Shift to an arbitrary state then
**     and YY_MAX_SHIFTREDUCE           reduce by rule N-YY_MIN_SHIFTREDUCE.
**
**   N == YY_ERROR_ACTION               A syntax error has occurred.
**
**   N == YY_ACCEPT_ACTION              The parser accepts its input.
**
**   N == YY_NO_ACTION                  No such action.  Denotes unused
**                                      slots in the yy_action[] table.
**
**   N between YY_MIN_REDUCE            Reduce by rule N-YY_MIN_REDUCE
**     and YY_MAX_REDUCE
**
** The action table is constructed as a single large table named yy_action[].
** Given state S and lookahead X, the action is computed as either:
**
**    (A)   N = yy_action[ yy_shift_ofst[S] + X ]
**    (B)   N = yy_default[S]
**
** The (A) formula is preferred.  The B formula is used instead if
** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X.
**
** The formulas above are for computing the action when the lookahead is
** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
** a reduce action) then the yy_reduce_ofst[] array is used in place of
** the yy_shift_ofst[] array.
**
** The following are the tables generated in this section:
**
**  yy_action[]        A single table containing all actions.
**  yy_lookahead[]     A table containing the lookahead for each entry in
**                     yy_action.  Used to detect hash collisions.
**  yy_shift_ofst[]    For each state, the offset into yy_action for
**                     shifting terminals.
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
**                     shifting non-terminals after a reduce.
**  yy_default[]       Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (831)
static const YYACTIONTYPE yy_action[] = {
 /*     0 */   101,  660,  660, 1153,  660, 1154,  309,  744, 1073,  661,
 /*    10 */   661,  160,  661,  104,   37,   38,  248,   41,   42,  385,
 /*    20 */   239,  261,   31,   30,   29,  922,  386,   40,  341,   45,
 /*    30 */    43,   46,   44, 1062, 1063,   55, 1066,   36,   35,  363,
 /*    40 */   362,   34,   33,   32,   37,   38,   24,   41,   42, 1067,
 /*    50 */   696,  261,   31,   30,   29,  254, 1209,   40,  341,   45,
 /*    60 */    43,   46,   44, 1049, 1078, 1047, 1048,   36,   35, 1101,
 /*    70 */  1050,   34,   33,   32, 1051, 1092, 1052, 1053,   58,   36,
 /*    80 */    35,  290,  289,   34,   33,   32,   37,   38,   51,   41,
 /*    90 */    42,   84,  283,  261,   31,   30,   29,  660,   90,   40,
 /*   100 */   341,   45,   43,   46,   44,  661,  384,  383,  637,   36,
 /*   110 */    35,  211,  212,   34,   33,   32,   37,   39,  852,   41,
 /*   120 */    42, 1209, 1209,  261,   31,   30,   29, 1075,  337,   40,
 /*   130 */   341,   45,   43,   46,   44,   67,   58,   58, 1098,   36,
 /*   140 */    35,  381, 1010,   34,   33,   32,  610,  611,  612,  613,
 /*   150 */   614,  615,  616,  617,  618,  619,  620,  621,  622,  623,
 /*   160 */   158,   38,  240,   41,   42,   58,   54,  261,   31,   30,
 /*   170 */    29,  812,  813,   40,  341,   45,   43,   46,   44,  284,
 /*   180 */   218,  241,  251,   36,   35, 1076, 1076,   34,   33,   32,
 /*   190 */  1209,   41,   42,   59,  175,  261,   31,   30,   29,  319,
 /*   200 */   264,   40,  341,   45,   43,   46,   44,   34,   33,   32,
 /*   210 */   252,   36,   35,  299, 1076,   34,   33,   32,   66,  335,
 /*   220 */   380,  379,  334,  333,  332,  378,  331,  330,  329,  377,
 /*   230 */   328,  376,  375,  313,   96,  291,   95,   25, 1041, 1029,
 /*   240 */  1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039,
 /*   250 */  1040, 1042, 1043,  214,  217,  246,  232,  867,   58, 1079,
 /*   260 */   856,  225,  859, 1209,  862, 1211, 1231,  143,  142,  141,
 /*   270 */   224,  373,  232,  867,  348,   90,  856,  265,  859,  263,
 /*   280 */   862,  351,  350,  157,  155,  154,   45,   43,   46,   44,
 /*   290 */   972,   58,  237,  238,   36,   35,  342,  195,   34,   33,
 /*   300 */    32,  800,  858,  352,  861,  803,  219, 1076,  237,  238,
 /*   310 */     1,  183,   67,    5,   61,  185, 1209, 1151,   58, 1152,
 /*   320 */   184,  110,  115,  106,  114,  768,  269,  857,  765,  860,
 /*   330 */   766,  258,  767,  295,  296,  282,  353,   82, 1223,  324,
 /*   340 */  1076,   98,   47,   97,  233,  257,  127,  121,  132, 1164,
 /*   350 */   253,  262,   58,  131, 1079,  137,  140,  130,   47,  275,
 /*   360 */   266,  267,  784,  354,  134,   58,   58, 1076,  279,  278,
 /*   370 */   294,  293,   66,  340,  380,  379,  832,  868,  863,  378,
 /*   380 */   205,  203,  201,  377,  864,  376,  375,  200,  147,  146,
 /*   390 */   145,  144,  214,  868,  863,   13,  339,  355, 1065,  100,
 /*   400 */   864, 1076, 1209,  271, 1212,  268,  214,  358,  357,   58,
 /*   410 */   359,  360,  214,  260, 1076, 1076, 1209,   58, 1212,  244,
 /*   420 */   345,  220, 1209, 1201, 1212,  270,  865, 1200, 1199,  103,
 /*   430 */   235, 1209,  236, 1209,  831,    6,  181, 1209, 1209, 1163,
 /*   440 */  1209,   83, 1209,  215,  292,  769,  770,  216,  788,  221,
 /*   450 */   213,  866,  255, 1209,  361,  222, 1079, 1209, 1076, 1209,
 /*   460 */  1209,  223,  365,  227,  228, 1209, 1076, 1092,  229,  226,
 /*   470 */   210, 1209, 1092, 1209, 1209, 1064,  982,  270, 1209, 1209,
 /*   480 */  1209,  270,  129,  195,  242,   99,  973,  337,  182,  243,
 /*   490 */     3,  196, 1077,  195,  373,  781,   87,   88,  809,  819,
 /*   500 */    85,  820,  339,   75,   78,   15,  754,   14,  316,  344,
 /*   510 */   756,  318,  162,   70,  755,   48,  895,  869,  259,  312,
 /*   520 */    59,   10,   59,  659,   70,  102,  871,  120,   70,  119,
 /*   530 */     9,    9,  343,  286,  286,   81,   17,    9,   16,  773,
 /*   540 */   771,  774,  772,  139,  138,   79,   76,   19,  126,   18,
 /*   550 */   125,   21,   26,   20,  249, 1160, 1159,  280,  855,  250,
 /*   560 */   364,  159, 1100, 1111, 1108, 1109, 1093,  743, 1113,  287,
 /*   570 */   161,  166,  305, 1143, 1142, 1141,  177, 1074,  178, 1140,
 /*   580 */   156, 1072,  179,  180,  987,  321,  322,  323,  326,  174,
 /*   590 */   327,   68,  208,   64,  338,  981,  349,  799, 1230,  117,
 /*   600 */   298,  167,  245,  300,  302, 1090,   80, 1229,  314, 1226,
 /*   610 */   186,  356,  168,   77,   28,  169, 1222,  310,  123, 1221,
 /*   620 */  1218,  187,  308, 1007,  306,   65,  170,  172,   60,   69,
 /*   630 */   304,  209,  171,  173,  969,  133,  967,  135,  136,  301,
 /*   640 */   965,  964,  272,  198,  199,  961,  960,  959,  958,  957,
 /*   650 */   956,  955,  297,  202,  204,  951,  949,  947,   27,  206,
 /*   660 */   944,  207,  940,  325,  374,  285,  128,   86,   91,  303,
 /*   670 */   366,  367,  234,  368,  369,  371,  256,  370,  320,  372,
 /*   680 */   382,  920,  273,  274,  230,  231,  919,  276,  277,  918,
 /*   690 */   986,  985,  111,  112,  901,  281,  900,  286,  315,   11,
 /*   700 */    89,  963,  962,   52,  954,  190,  189, 1008,  148,  188,
 /*   710 */   191,  192,  194,  193,  149,  150,  953,    2,  151, 1045,
 /*   720 */  1009,    4,  946,   53,  176,  945,  776,  288,   92,  808,
 /*   730 */    73,  806, 1055,  805,  802,  801,   74,  165,  810,  163,
 /*   740 */   247,  821,  164,   22,  815,   93,   62,  817,   94,  307,
 /*   750 */   343,  311,   23,   63,   12,   49,  317,   50,  103,  674,
 /*   760 */   105,   56,  107,  108,   57,  109,  709,  707,  706,  705,
 /*   770 */   703,  702,  701,  698,  336,  664,  113,    7,  892,  890,
 /*   780 */   870,  893,  891,    8,  346,  872,  347,  116,   71,   59,
 /*   790 */   746,   72,  118,  122,  745,  124,  742,  690,  688,  680,
 /*   800 */   686,  682,  684,  678,  676,  712,  711,  710,  708,  704,
 /*   810 */   700,  699,  197,  662,  627,  924,  923,  923,  923,  923,
 /*   820 */   923,  923,  923,  923,  923,  923,  923,  923,  923,  152,
 /*   830 */   153,
};
static const YYCODETYPE yy_lookahead[] = {
 /*     0 */   212,    1,    1,  280,    1,  282,  283,    5,  204,    9,
 /*    10 */     9,  204,    9,  212,   14,   15,    1,   17,   18,  204,
 /*    20 */   205,   21,   22,   23,   24,  202,  203,   27,   28,   29,
 /*    30 */    30,   31,   32,  245,  246,  247,  248,   37,   38,   37,
 /*    40 */    38,   41,   42,   43,   14,   15,  272,   17,   18,  248,
 /*    50 */     5,   21,   22,   23,   24,  251,  282,   27,   28,   29,
 /*    60 */    30,   31,   32,  228,  254,  230,  231,   37,   38,  204,
 /*    70 */   235,   41,   42,   43,  239,  252,  241,  242,  204,   37,
 /*    80 */    38,  274,  275,   41,   42,   43,   14,   15,   87,   17,
 /*    90 */    18,   91,  269,   21,   22,   23,   24,    1,   87,   27,
 /*   100 */    28,   29,   30,   31,   32,    9,   70,   71,   72,   37,
 /*   110 */    38,  272,  272,   41,   42,   43,   14,   15,   88,   17,
 /*   120 */    18,  282,  282,   21,   22,   23,   24,  253,   89,   27,
 /*   130 */    28,   29,   30,   31,   32,  124,  204,  204,  273,   37,
 /*   140 */    38,  226,  227,   41,   42,   43,   50,   51,   52,   53,
 /*   150 */    54,   55,   56,   57,   58,   59,   60,   61,   62,   63,
 /*   160 */    64,   15,   66,   17,   18,  204,   87,   21,   22,   23,
 /*   170 */    24,  131,  132,   27,   28,   29,   30,   31,   32,   88,
 /*   180 */   272,  249,  249,   37,   38,  253,  253,   41,   42,   43,
 /*   190 */   282,   17,   18,  102,  259,   21,   22,   23,   24,  120,
 /*   200 */    73,   27,   28,   29,   30,   31,   32,   41,   42,   43,
 /*   210 */   249,   37,   38,  278,  253,   41,   42,   43,  103,  104,
 /*   220 */   105,  106,  107,  108,  109,  110,  111,  112,  113,  114,
 /*   230 */   115,  116,  117,  279,  280,  277,  282,   49,  228,  229,
 /*   240 */   230,  231,  232,  233,  234,  235,  236,  237,  238,  239,
 /*   250 */   240,  241,  242,  272,   66,  250,    1,    2,  204,  254,
 /*   260 */     5,   73,    7,  282,    9,  284,  254,   79,   80,   81,
 /*   270 */    82,   95,    1,    2,   86,   87,    5,  150,    7,  152,
 /*   280 */     9,  154,  155,   67,   68,   69,   29,   30,   31,   32,
 /*   290 */   210,  204,   37,   38,   37,   38,   41,  217,   41,   42,
 /*   300 */    43,    5,    5,  249,    7,    9,  272,  253,   37,   38,
 /*   310 */   213,  214,  124,   67,   68,   69,  282,  280,  204,  282,
 /*   320 */    74,   75,   76,   77,   78,    2,   73,    5,    5,    7,
 /*   330 */     7,  211,    9,   37,   38,  147,  249,  149,  254,   93,
 /*   340 */   253,  280,   87,  282,  156,  211,   67,   68,   69,  244,
 /*   350 */   250,  211,  204,   74,  254,   76,   77,   78,   87,  148,
 /*   360 */    37,   38,   41,  249,   85,  204,  204,  253,  157,  158,
 /*   370 */    37,   38,  103,   25,  105,  106,   81,  122,  123,  110,
 /*   380 */    67,   68,   69,  114,  129,  116,  117,   74,   75,   76,
 /*   390 */    77,   78,  272,  122,  123,   87,   48,  249,    0,   91,
 /*   400 */   129,  253,  282,  150,  284,  152,  272,  154,  155,  204,
 /*   410 */   249,  249,  272,   65,  253,  253,  282,  204,  284,  123,
 /*   420 */    16,  272,  282,  272,  284,  204,  129,  272,  272,  121,
 /*   430 */   272,  282,  272,  282,  139,   87,  215,  282,  282,  244,
 /*   440 */   282,  212,  282,  272,  277,  122,  123,  272,  127,  272,
 /*   450 */   272,  129,  250,  282,  249,  272,  254,  282,  253,  282,
 /*   460 */   282,  272,  249,  272,  272,  282,  253,  252,  272,  272,
 /*   470 */   272,  282,  252,  282,  282,  246,  210,  204,  282,  282,
 /*   480 */   282,  204,   83,  217,  269,  255,  210,   89,  215,  269,
 /*   490 */   208,  209,  215,  217,   95,  102,   88,   88,   88,   88,
 /*   500 */   270,   88,   48,  102,  102,  151,   88,  153,   88,   25,
 /*   510 */    88,   88,  102,  102,   88,  102,   88,   88,    1,   65,
 /*   520 */   102,  128,  102,   88,  102,  102,  122,  151,  102,  153,
 /*   530 */   102,  102,   48,  125,  125,   87,  151,  102,  153,    5,
 /*   540 */     5,    7,    7,   83,   84,  143,  145,  151,  151,  153,
 /*   550 */   153,  151,  271,  153,  244,  244,  244,  204,   41,  244,
 /*   560 */   244,  204,  204,  204,  204,  204,  252,  119,  204,  252,
 /*   570 */   204,  204,  204,  281,  281,  281,  256,  252,  204,  281,
 /*   580 */    65,  204,  204,  204,  204,  204,  204,  204,  204,  260,
 /*   590 */   204,  204,  204,  204,  204,  204,  204,  129,  204,  204,
 /*   600 */   276,  267,  276,  276,  276,  268,  142,  204,  137,  204,
 /*   610 */   204,  204,  266,  144,  141,  265,  204,  140,  204,  204,
 /*   620 */   204,  204,  135,  204,  134,  204,  264,  262,  204,  204,
 /*   630 */   133,  204,  263,  261,  204,  204,  204,  204,  204,  136,
 /*   640 */   204,  204,  204,  204,  204,  204,  204,  204,  204,  204,
 /*   650 */   204,  204,  130,  204,  204,  204,  204,  204,  146,  204,
 /*   660 */   204,  204,  204,   94,  118,  206,  101,  206,  206,  206,
 /*   670 */   100,   56,  206,   97,   99,   98,  206,   60,  206,   96,
 /*   680 */    89,    5,  159,    5,  206,  206,    5,  159,    5,    5,
 /*   690 */   216,  216,  212,  212,  105,  148,  104,  125,  120,   87,
 /*   700 */   126,  206,  206,   87,  206,  219,  223,  225,  207,  224,
 /*   710 */   222,  220,  218,  221,  207,  207,  206,  213,  207,  243,
 /*   720 */   227,  208,  206,  258,  257,  206,   88,  102,  102,   88,
 /*   730 */   102,  129,  243,  129,    5,    5,   87,  102,   88,   87,
 /*   740 */     1,   88,   87,  138,   88,   87,  102,   88,   87,   87,
 /*   750 */    48,    1,  138,  102,   87,   87,  120,   87,  121,    5,
 /*   760 */    83,   92,   91,   75,   92,   91,    9,    5,    5,    5,
 /*   770 */     5,    5,    5,    5,   16,   90,   83,   87,    9,    9,
 /*   780 */    88,    9,    9,   87,   28,  122,   64,  153,   17,  102,
 /*   790 */     5,   17,  153,  153,    5,  153,   88,    5,    5,    5,
 /*   800 */     5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
 /*   810 */     5,    5,  102,   90,   65,    0,  285,  285,  285,  285,
 /*   820 */   285,  285,  285,  285,  285,  285,  285,  285,  285,   22,
 /*   830 */    22,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*   840 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*   850 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*   860 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*   870 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*   880 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*   890 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*   900 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*   910 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*   920 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*   930 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*   940 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*   950 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*   960 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*   970 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*   980 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*   990 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*  1000 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*  1010 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*  1020 */   285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
 /*  1030 */   285,  285,  285,
};
#define YY_SHIFT_COUNT    (386)
#define YY_SHIFT_MIN      (0)
#define YY_SHIFT_MAX      (815)
static const unsigned short int yy_shift_ofst[] = {
 /*     0 */   188,  115,  115,  269,  269,   39,  255,  271,  271,  271,
 /*    10 */     1,    3,    3,    3,    3,    3,    3,    3,    3,    3,
 /*    20 */     3,    3,   15,   15,    0,   96,  271,  271,  271,  271,
 /*    30 */   271,  271,  271,  271,  271,  271,  271,  271,  271,  271,
 /*    40 */   271,  271,  271,  271,  271,  271,  271,  271,  323,  323,
 /*    50 */   323,   11,   11,   40,    3,  398,    3,    3,    3,    3,
 /*    60 */   399,   39,   15,   15,  176,  176,   45,  831,  831,  831,
 /*    70 */   323,  323,  323,  296,  296,    2,    2,    2,    2,    2,
 /*    80 */     2,    2,    3,    3,    3,  321,    3,    3,    3,   11,
 /*    90 */    11,    3,    3,    3,    3,  295,  295,  295,  295,  393,
 /*   100 */    11,    3,    3,    3,    3,    3,    3,    3,    3,    3,
 /*   110 */     3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
 /*   120 */     3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
 /*   130 */     3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
 /*   140 */     3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
 /*   150 */     3,    3,    3,    3,    3,    3,    3,    3,    3,  515,
 /*   160 */   515,  515,  468,  468,  468,  468,  515,  464,  469,  471,
 /*   170 */   473,  477,  487,  490,  497,  503,  522,  512,  515,  515,
 /*   180 */   515,  569,  569,  546,   39,   39,  515,  515,  565,  570,
 /*   190 */   615,  576,  575,  617,  577,  583,  546,   45,  515,  515,
 /*   200 */   591,  591,  515,  591,  515,  591,  515,  515,  831,  831,
 /*   210 */    30,   72,   72,  102,   72,  146,  174,  246,  257,  257,
 /*   220 */   257,  257,  257,  257,  279,  313,   42,   42,   42,   42,
 /*   230 */   127,  253,  348,  211,  308,  166,  166,  297,  322,   36,
 /*   240 */   216,   91,  408,  409,  333,  410,  411,  413,  454,  401,
 /*   250 */   402,  418,  420,  422,  423,  426,   79,  428,  429,  484,
 /*   260 */   517,  404,  435,  354,  376,  385,  534,  535,  396,  397,
 /*   270 */   448,  400,  460,  676,  523,  678,  681,  528,  683,  684,
 /*   280 */   589,  592,  547,  572,  578,  612,  574,  638,  616,  625,
 /*   290 */   626,  641,  628,  602,  604,  729,  730,  649,  650,  652,
 /*   300 */   653,  655,  656,  635,  658,  659,  661,  739,  662,  644,
 /*   310 */   605,  702,  750,  651,  614,  667,  578,  668,  636,  670,
 /*   320 */   637,  677,  669,  671,  688,  754,  672,  674,  757,  762,
 /*   330 */   763,  764,  765,  766,  767,  768,  685,  758,  693,  769,
 /*   340 */   770,  690,  692,  772,  773,  663,  696,  756,  722,  771,
 /*   350 */   634,  639,  687,  687,  687,  687,  774,  640,  642,  687,
 /*   360 */   687,  687,  785,  789,  708,  687,  792,  793,  794,  795,
 /*   370 */   796,  797,  798,  799,  800,  801,  802,  803,  804,  805,
 /*   380 */   806,  710,  723,  807,  808,  749,  815,
};
#define YY_REDUCE_COUNT (209)
#define YY_REDUCE_MIN   (-277)
#define YY_REDUCE_MAX   (519)
static const short yy_reduce_ofst[] = {
 /*     0 */  -177,   10,   10, -165, -165, -212,  120,  134,  140,  -19,
 /*    10 */  -193,  -68,  -67,  -39,   54,   87,  114,  148,  161,  162,
 /*    20 */   205,  213, -277,  -46, -135, -185, -226, -161, -160,  -92,
 /*    30 */    34,  149,  151,  155,  156,  158,  160,  171,  175,  177,
 /*    40 */   178,  183,  189,  191,  192,  196,  197,  198,    5,  100,
 /*    50 */   202,  215,  220,  -65, -196, -199,  221,  273,  277, -126,
 /*    60 */    80,  229,   37,   61,  266,  276,  -85,  230,   97,  282,
 /*    70 */  -190,   12,   84,  -42,  167,  105,  195,  310,  311,  312,
 /*    80 */   315,  316,  353,  357,  358,  281,  359,  360,  361,  314,
 /*    90 */   317,  364,  366,  367,  368,  292,  293,  294,  298,  320,
 /*   100 */   325,  374,  377,  378,  379,  380,  381,  382,  383,  384,
 /*   110 */   386,  387,  388,  389,  390,  391,  392,  394,  395,  403,
 /*   120 */   405,  406,  407,  412,  414,  415,  416,  417,  419,  421,
 /*   130 */   424,  425,  427,  430,  431,  432,  433,  434,  436,  437,
 /*   140 */   438,  439,  440,  441,  442,  443,  444,  445,  446,  447,
 /*   150 */   449,  450,  451,  452,  453,  455,  456,  457,  458,  459,
 /*   160 */   461,  462,  324,  326,  327,  328,  463,  337,  334,  346,
 /*   170 */   350,  362,  369,  365,  372,  329,  465,  467,  466,  470,
 /*   180 */   472,  474,  475,  476,  480,  481,  478,  479,  482,  485,
 /*   190 */   483,  486,  488,  491,  492,  494,  489,  493,  495,  496,
 /*   200 */   501,  507,  498,  508,  510,  511,  516,  519,  504,  513,
};
static const YYACTIONTYPE yy_default[] = {
 /*     0 */   921, 1044,  983, 1054,  970,  980, 1214, 1214, 1214, 1214,
 /*    10 */   921,  921,  921,  921,  921,  921,  921,  921,  921,  921,
 /*    20 */   921,  921,  921,  921, 1102,  941,  921,  921,  921,  921,
 /*    30 */   921,  921,  921,  921,  921,  921,  921,  921,  921,  921,
 /*    40 */   921,  921,  921,  921,  921,  921,  921,  921,  921,  921,
 /*    50 */   921,  921,  921, 1126,  921,  980,  921,  921,  921,  921,
 /*    60 */   990,  980,  921,  921,  990,  990,  921, 1097, 1028, 1046,
 /*    70 */   921,  921,  921,  921,  921,  921,  921,  921,  921,  921,
 /*    80 */   921,  921,  921,  921,  921, 1104, 1110, 1107,  921,  921,
 /*    90 */   921, 1112,  921,  921,  921, 1148, 1148, 1148, 1148, 1095,
 /*   100 */   921,  921,  921,  921,  921,  921,  921,  921,  921,  921,
 /*   110 */   921,  921,  921,  921,  921,  921,  921,  921,  921,  921,
 /*   120 */   921,  921,  921,  921,  921,  921,  921,  921,  921,  921,
 /*   130 */   921,  921,  921,  968,  921,  966,  921,  921,  921,  921,
 /*   140 */   921,  921,  921,  921,  921,  921,  921,  921,  921,  921,
 /*   150 */   921,  921,  921,  921,  921,  921,  921,  921,  939,  943,
 /*   160 */   943,  943,  921,  921,  921,  921,  943, 1157, 1161, 1138,
 /*   170 */  1155, 1149, 1133, 1131, 1129, 1137, 1122, 1165,  943,  943,
 /*   180 */   943,  988,  988,  984,  980,  980,  943,  943, 1006, 1004,
 /*   190 */  1002,  994, 1000,  996,  998,  992,  971,  921,  943,  943,
 /*   200 */   978,  978,  943,  978,  943,  978,  943,  943, 1028, 1046,
 /*   210 */   921, 1166, 1156,  921, 1213, 1196, 1195,  921, 1204, 1203,
 /*   220 */  1202, 1194, 1193, 1192,  921,  921, 1188, 1191, 1190, 1189,
 /*   230 */   921,  921, 1168,  921,  921, 1198, 1197,  921,  921,  921,
 /*   240 */   921,  921,  921,  921, 1119,  921,  921,  921, 1144, 1162,
 /*   250 */  1158,  921,  921,  921,  921,  921,  921,  921,  921, 1169,
 /*   260 */   921,  921,  921,  921,  921,  921,  921,  921,  921,  921,
 /*   270 */  1056,  921,  921,  921,  921,  921,  921,  921,  921,  921,
 /*   280 */   921,  921,  921, 1094,  921,  921,  921,  921,  921, 1106,
 /*   290 */  1105,  921,  921,  921,  921,  921,  921,  921,  921,  921,
 /*   300 */   921,  921,  921,  921,  921,  921,  921,  921,  921, 1150,
 /*   310 */   921, 1145,  921, 1139,  921,  921, 1068,  921,  921,  921,
 /*   320 */   921,  921,  921,  921,  921,  921,  921,  921,  921,  921,
 /*   330 */   921,  921,  921,  921,  921,  921,  921,  921,  921,  921,
 /*   340 */   921,  921,  921,  921,  921,  921,  921,  921,  921,  921,
 /*   350 */   921,  921, 1232, 1227, 1228, 1225,  921,  921,  921, 1224,
 /*   360 */  1219, 1220,  921,  921,  921, 1217,  921,  921,  921,  921,
 /*   370 */   921,  921,  921,  921,  921,  921,  921,  921,  921,  921,
 /*   380 */   921, 1012,  921,  950,  948,  921,  921,
};
/********** End of lemon-generated parsing tables *****************************/

/* The next table maps tokens (terminal symbols) into fallback tokens.  
** If a construct like the following:
** 
**      %fallback ID X Y Z.
**
** appears in the grammar, then ID becomes a fallback token for X, Y,
** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
** but it does not parse, the type of the token is changed to ID and
** the parse is retried before an error is thrown.
**
** This feature can be used, for example, to cause some keywords in a language
** to revert to identifiers if they keyword does not apply in the context where
** it appears.
*/
#ifdef YYFALLBACK
static const YYCODETYPE yyFallback[] = {
    0,  /*          $ => nothing */
    0,  /*         ID => nothing */
    1,  /*       BOOL => ID */
    1,  /*    TINYINT => ID */
    1,  /*   SMALLINT => ID */
    1,  /*    INTEGER => ID */
    1,  /*     BIGINT => ID */
    1,  /*      FLOAT => ID */
    1,  /*     DOUBLE => ID */
    1,  /*     STRING => ID */
    1,  /*  TIMESTAMP => ID */
    1,  /*     BINARY => ID */
    1,  /*      NCHAR => ID */
    1,  /*       JSON => ID */
    0,  /*         OR => nothing */
    0,  /*        AND => nothing */
    0,  /*        NOT => nothing */
    0,  /*         EQ => nothing */
    0,  /*         NE => nothing */
    0,  /*     ISNULL => nothing */
    0,  /*    NOTNULL => nothing */
    0,  /*         IS => nothing */
    1,  /*       LIKE => ID */
    1,  /*      MATCH => ID */
    1,  /*     NMATCH => ID */
    0,  /*   CONTAINS => nothing */
    1,  /*       GLOB => ID */
    0,  /*    BETWEEN => nothing */
    0,  /*         IN => nothing */
    0,  /*         GT => nothing */
    0,  /*         GE => nothing */
    0,  /*         LT => nothing */
    0,  /*         LE => nothing */
    0,  /*     BITAND => nothing */
    0,  /*      BITOR => nothing */
    0,  /*     LSHIFT => nothing */
    0,  /*     RSHIFT => nothing */
    0,  /*       PLUS => nothing */
    0,  /*      MINUS => nothing */
    0,  /*     DIVIDE => nothing */
    0,  /*      TIMES => nothing */
    0,  /*       STAR => nothing */
    0,  /*      SLASH => nothing */
    0,  /*        REM => nothing */
    0,  /*     CONCAT => nothing */
    0,  /*     UMINUS => nothing */
    0,  /*      UPLUS => nothing */
    0,  /*     BITNOT => nothing */
    0,  /*      ARROW => nothing */
    0,  /*       SHOW => nothing */
    0,  /*  DATABASES => nothing */
    0,  /*     TOPICS => nothing */
    0,  /*  FUNCTIONS => nothing */
    0,  /*     MNODES => nothing */
    0,  /*     DNODES => nothing */
    0,  /*   ACCOUNTS => nothing */
    0,  /*      USERS => nothing */
    0,  /*    MODULES => nothing */
    0,  /*    QUERIES => nothing */
    0,  /* CONNECTIONS => nothing */
    0,  /*    STREAMS => nothing */
    0,  /*  VARIABLES => nothing */
    0,  /*     SCORES => nothing */
    0,  /*     GRANTS => nothing */
    0,  /*     VNODES => nothing */
    0,  /*        DOT => nothing */
    0,  /*     CREATE => nothing */
    0,  /*      TABLE => nothing */
    1,  /*     STABLE => ID */
    1,  /*   DATABASE => ID */
    0,  /*     TABLES => nothing */
    0,  /*    STABLES => nothing */
    0,  /*    VGROUPS => nothing */
    0,  /*       DROP => nothing */
    0,  /*      TOPIC => nothing */
    0,  /*   FUNCTION => nothing */
    0,  /*      DNODE => nothing */
    0,  /*       USER => nothing */
    0,  /*    ACCOUNT => nothing */
    0,  /*        USE => nothing */
    0,  /*   DESCRIBE => nothing */
    1,  /*       DESC => ID */
    0,  /*      ALTER => nothing */
    0,  /*       PASS => nothing */
    0,  /*  PRIVILEGE => nothing */
    0,  /*      LOCAL => nothing */
    0,  /*    COMPACT => nothing */
    0,  /*         LP => nothing */
    0,  /*         RP => nothing */
    0,  /*         IF => nothing */
    0,  /*     EXISTS => nothing */
    0,  /*         AS => nothing */
    0,  /* OUTPUTTYPE => nothing */
    0,  /*  AGGREGATE => nothing */
    0,  /*    BUFSIZE => nothing */
    0,  /*        PPS => nothing */
    0,  /*    TSERIES => nothing */
    0,  /*        DBS => nothing */
    0,  /*    STORAGE => nothing */
    0,  /*      QTIME => nothing */
    0,  /*      CONNS => nothing */
    0,  /*      STATE => nothing */
    0,  /*      COMMA => nothing */
    0,  /*       KEEP => nothing */
    0,  /*      CACHE => nothing */
    0,  /*    REPLICA => nothing */
    0,  /*     QUORUM => nothing */
    0,  /*       DAYS => nothing */
    0,  /*    MINROWS => nothing */
    0,  /*    MAXROWS => nothing */
    0,  /*     BLOCKS => nothing */
    0,  /*      CTIME => nothing */
    0,  /*        WAL => nothing */
    0,  /*      FSYNC => nothing */
    0,  /*       COMP => nothing */
    0,  /*  PRECISION => nothing */
    0,  /*     UPDATE => nothing */
    0,  /*  CACHELAST => nothing */
    0,  /* PARTITIONS => nothing */
    0,  /*   UNSIGNED => nothing */
    0,  /*       TAGS => nothing */
    0,  /*      USING => nothing */
    1,  /*       NULL => ID */
    1,  /*        NOW => ID */
    0,  /*     SELECT => nothing */
    0,  /*      UNION => nothing */
    1,  /*        ALL => ID */
    0,  /*   DISTINCT => nothing */
    0,  /*       FROM => nothing */
    0,  /*   VARIABLE => nothing */
    0,  /*      RANGE => nothing */
    0,  /*   INTERVAL => nothing */
    0,  /*      EVERY => nothing */
    0,  /*    SESSION => nothing */
    0,  /* STATE_WINDOW => nothing */
    0,  /*       FILL => nothing */
    0,  /*    SLIDING => nothing */
    0,  /*      ORDER => nothing */
    0,  /*         BY => nothing */
    1,  /*        ASC => ID */
    0,  /*      GROUP => nothing */
    0,  /*     HAVING => nothing */
    0,  /*      LIMIT => nothing */
    1,  /*     OFFSET => ID */
    0,  /*     SLIMIT => nothing */
    0,  /*    SOFFSET => nothing */
    0,  /*      WHERE => nothing */
    0,  /*      RESET => nothing */
    0,  /*      QUERY => nothing */
    0,  /*     SYNCDB => nothing */
    0,  /*        ADD => nothing */
    0,  /*     COLUMN => nothing */
    0,  /*     MODIFY => nothing */
    0,  /*        TAG => nothing */
    0,  /*     CHANGE => nothing */
    0,  /*        SET => nothing */
    0,  /*       KILL => nothing */
    0,  /* CONNECTION => nothing */
    0,  /*     STREAM => nothing */
    0,  /*      COLON => nothing */
    1,  /*      ABORT => ID */
    1,  /*      AFTER => ID */
    1,  /*     ATTACH => ID */
    1,  /*     BEFORE => ID */
    1,  /*      BEGIN => ID */
    1,  /*    CASCADE => ID */
    1,  /*    CLUSTER => ID */
    1,  /*   CONFLICT => ID */
    1,  /*       COPY => ID */
    1,  /*   DEFERRED => ID */
    1,  /* DELIMITERS => ID */
    1,  /*     DETACH => ID */
    1,  /*       EACH => ID */
    1,  /*        END => ID */
    1,  /*    EXPLAIN => ID */
    1,  /*       FAIL => ID */
    1,  /*        FOR => ID */
    1,  /*     IGNORE => ID */
    1,  /*  IMMEDIATE => ID */
    1,  /*  INITIALLY => ID */
    1,  /*    INSTEAD => ID */
    1,  /*        KEY => ID */
    1,  /*         OF => ID */
    1,  /*      RAISE => ID */
    1,  /*    REPLACE => ID */
    1,  /*   RESTRICT => ID */
    1,  /*        ROW => ID */
    1,  /*  STATEMENT => ID */
    1,  /*    TRIGGER => ID */
    1,  /*       VIEW => ID */
    1,  /*    IPTOKEN => ID */
    1,  /*       SEMI => ID */
    1,  /*       NONE => ID */
    1,  /*       PREV => ID */
    1,  /*     LINEAR => ID */
    1,  /*     IMPORT => ID */
    1,  /*     TBNAME => ID */
    1,  /*       JOIN => ID */
    1,  /*     INSERT => ID */
    1,  /*       INTO => ID */
    1,  /*     VALUES => ID */
    1,  /*       FILE => ID */
};
#endif /* YYFALLBACK */

/* The following structure represents a single element of the
** parser's stack.  Information stored includes:
**
**   +  The state number for the parser at this level of the stack.
**
**   +  The value of the token stored at this level of the stack.
**      (In other words, the "major" token.)
**
**   +  The semantic value stored at this level of the stack.  This is
**      the information used by the action routines in the grammar.
**      It is sometimes called the "minor" token.
**
** After the "shift" half of a SHIFTREDUCE action, the stateno field
** actually contains the reduce action for the second half of the
** SHIFTREDUCE.
*/
struct yyStackEntry {
  YYACTIONTYPE stateno;  /* The state-number, or reduce action in SHIFTREDUCE */
  YYCODETYPE major;      /* The major token value.  This is the code
                         ** number for the token at this stack level */
  YYMINORTYPE minor;     /* The user-supplied minor token value.  This
                         ** is the value of the token  */
};
typedef struct yyStackEntry yyStackEntry;

/* The state of the parser is completely contained in an instance of
** the following structure */
struct yyParser {
  yyStackEntry *yytos;          /* Pointer to top element of the stack */
#ifdef YYTRACKMAXSTACKDEPTH
  int yyhwm;                    /* High-water mark of the stack */
#endif
#ifndef YYNOERRORRECOVERY
  int yyerrcnt;                 /* Shifts left before out of the error */
#endif
  ParseARG_SDECL                /* A place to hold %extra_argument */
  ParseCTX_SDECL                /* A place to hold %extra_context */
#if YYSTACKDEPTH<=0
  int yystksz;                  /* Current side of the stack */
  yyStackEntry *yystack;        /* The parser's stack */
  yyStackEntry yystk0;          /* First stack entry */
#else
  yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
  yyStackEntry *yystackEnd;            /* Last entry in the stack */
#endif
};
typedef struct yyParser yyParser;

#ifndef NDEBUG
#include <stdio.h>
#include <assert.h>
static FILE *yyTraceFILE = 0;
static char *yyTracePrompt = 0;
#endif /* NDEBUG */

#ifndef NDEBUG
/* 
** Turn parser tracing on by giving a stream to which to write the trace
** and a prompt to preface each trace message.  Tracing is turned off
** by making either argument NULL 
**
** Inputs:
** <ul>
** <li> A FILE* to which trace output should be written.
**      If NULL, then tracing is turned off.
** <li> A prefix string written at the beginning of every
**      line of trace output.  If NULL, then tracing is
**      turned off.
** </ul>
**
** Outputs:
** None.
*/
void ParseTrace(FILE *TraceFILE, char *zTracePrompt){
  yyTraceFILE = TraceFILE;
  yyTracePrompt = zTracePrompt;
  if( yyTraceFILE==0 ) yyTracePrompt = 0;
  else if( yyTracePrompt==0 ) yyTraceFILE = 0;
}
#endif /* NDEBUG */

#if defined(YYCOVERAGE) || !defined(NDEBUG)
/* For tracing shifts, the names of all terminals and nonterminals
** are required.  The following table supplies these names */
static const char *const yyTokenName[] = { 
  /*    0 */ "$",
  /*    1 */ "ID",
  /*    2 */ "BOOL",
  /*    3 */ "TINYINT",
  /*    4 */ "SMALLINT",
  /*    5 */ "INTEGER",
  /*    6 */ "BIGINT",
  /*    7 */ "FLOAT",
  /*    8 */ "DOUBLE",
  /*    9 */ "STRING",
  /*   10 */ "TIMESTAMP",
  /*   11 */ "BINARY",
  /*   12 */ "NCHAR",
  /*   13 */ "JSON",
  /*   14 */ "OR",
  /*   15 */ "AND",
  /*   16 */ "NOT",
  /*   17 */ "EQ",
  /*   18 */ "NE",
  /*   19 */ "ISNULL",
  /*   20 */ "NOTNULL",
  /*   21 */ "IS",
  /*   22 */ "LIKE",
  /*   23 */ "MATCH",
  /*   24 */ "NMATCH",
  /*   25 */ "CONTAINS",
  /*   26 */ "GLOB",
  /*   27 */ "BETWEEN",
  /*   28 */ "IN",
  /*   29 */ "GT",
  /*   30 */ "GE",
  /*   31 */ "LT",
  /*   32 */ "LE",
  /*   33 */ "BITAND",
  /*   34 */ "BITOR",
  /*   35 */ "LSHIFT",
  /*   36 */ "RSHIFT",
  /*   37 */ "PLUS",
  /*   38 */ "MINUS",
  /*   39 */ "DIVIDE",
  /*   40 */ "TIMES",
  /*   41 */ "STAR",
  /*   42 */ "SLASH",
  /*   43 */ "REM",
  /*   44 */ "CONCAT",
  /*   45 */ "UMINUS",
  /*   46 */ "UPLUS",
  /*   47 */ "BITNOT",
  /*   48 */ "ARROW",
  /*   49 */ "SHOW",
  /*   50 */ "DATABASES",
  /*   51 */ "TOPICS",
  /*   52 */ "FUNCTIONS",
  /*   53 */ "MNODES",
  /*   54 */ "DNODES",
  /*   55 */ "ACCOUNTS",
  /*   56 */ "USERS",
  /*   57 */ "MODULES",
  /*   58 */ "QUERIES",
  /*   59 */ "CONNECTIONS",
  /*   60 */ "STREAMS",
  /*   61 */ "VARIABLES",
  /*   62 */ "SCORES",
  /*   63 */ "GRANTS",
  /*   64 */ "VNODES",
  /*   65 */ "DOT",
  /*   66 */ "CREATE",
  /*   67 */ "TABLE",
  /*   68 */ "STABLE",
  /*   69 */ "DATABASE",
  /*   70 */ "TABLES",
  /*   71 */ "STABLES",
  /*   72 */ "VGROUPS",
  /*   73 */ "DROP",
  /*   74 */ "TOPIC",
  /*   75 */ "FUNCTION",
  /*   76 */ "DNODE",
  /*   77 */ "USER",
  /*   78 */ "ACCOUNT",
  /*   79 */ "USE",
  /*   80 */ "DESCRIBE",
  /*   81 */ "DESC",
  /*   82 */ "ALTER",
  /*   83 */ "PASS",
  /*   84 */ "PRIVILEGE",
  /*   85 */ "LOCAL",
  /*   86 */ "COMPACT",
  /*   87 */ "LP",
  /*   88 */ "RP",
  /*   89 */ "IF",
  /*   90 */ "EXISTS",
  /*   91 */ "AS",
  /*   92 */ "OUTPUTTYPE",
  /*   93 */ "AGGREGATE",
  /*   94 */ "BUFSIZE",
  /*   95 */ "PPS",
  /*   96 */ "TSERIES",
  /*   97 */ "DBS",
  /*   98 */ "STORAGE",
  /*   99 */ "QTIME",
  /*  100 */ "CONNS",
  /*  101 */ "STATE",
  /*  102 */ "COMMA",
  /*  103 */ "KEEP",
  /*  104 */ "CACHE",
  /*  105 */ "REPLICA",
  /*  106 */ "QUORUM",
  /*  107 */ "DAYS",
  /*  108 */ "MINROWS",
  /*  109 */ "MAXROWS",
  /*  110 */ "BLOCKS",
  /*  111 */ "CTIME",
  /*  112 */ "WAL",
  /*  113 */ "FSYNC",
  /*  114 */ "COMP",
  /*  115 */ "PRECISION",
  /*  116 */ "UPDATE",
  /*  117 */ "CACHELAST",
  /*  118 */ "PARTITIONS",
  /*  119 */ "UNSIGNED",
  /*  120 */ "TAGS",
  /*  121 */ "USING",
  /*  122 */ "NULL",
  /*  123 */ "NOW",
  /*  124 */ "SELECT",
  /*  125 */ "UNION",
  /*  126 */ "ALL",
  /*  127 */ "DISTINCT",
  /*  128 */ "FROM",
  /*  129 */ "VARIABLE",
  /*  130 */ "RANGE",
  /*  131 */ "INTERVAL",
  /*  132 */ "EVERY",
  /*  133 */ "SESSION",
  /*  134 */ "STATE_WINDOW",
  /*  135 */ "FILL",
  /*  136 */ "SLIDING",
  /*  137 */ "ORDER",
  /*  138 */ "BY",
  /*  139 */ "ASC",
  /*  140 */ "GROUP",
  /*  141 */ "HAVING",
  /*  142 */ "LIMIT",
  /*  143 */ "OFFSET",
  /*  144 */ "SLIMIT",
  /*  145 */ "SOFFSET",
  /*  146 */ "WHERE",
  /*  147 */ "RESET",
  /*  148 */ "QUERY",
  /*  149 */ "SYNCDB",
  /*  150 */ "ADD",
  /*  151 */ "COLUMN",
  /*  152 */ "MODIFY",
  /*  153 */ "TAG",
  /*  154 */ "CHANGE",
  /*  155 */ "SET",
  /*  156 */ "KILL",
  /*  157 */ "CONNECTION",
  /*  158 */ "STREAM",
  /*  159 */ "COLON",
  /*  160 */ "ABORT",
  /*  161 */ "AFTER",
  /*  162 */ "ATTACH",
  /*  163 */ "BEFORE",
  /*  164 */ "BEGIN",
  /*  165 */ "CASCADE",
  /*  166 */ "CLUSTER",
  /*  167 */ "CONFLICT",
  /*  168 */ "COPY",
  /*  169 */ "DEFERRED",
  /*  170 */ "DELIMITERS",
  /*  171 */ "DETACH",
  /*  172 */ "EACH",
  /*  173 */ "END",
  /*  174 */ "EXPLAIN",
  /*  175 */ "FAIL",
  /*  176 */ "FOR",
  /*  177 */ "IGNORE",
  /*  178 */ "IMMEDIATE",
  /*  179 */ "INITIALLY",
  /*  180 */ "INSTEAD",
  /*  181 */ "KEY",
  /*  182 */ "OF",
  /*  183 */ "RAISE",
  /*  184 */ "REPLACE",
  /*  185 */ "RESTRICT",
  /*  186 */ "ROW",
  /*  187 */ "STATEMENT",
  /*  188 */ "TRIGGER",
  /*  189 */ "VIEW",
  /*  190 */ "IPTOKEN",
  /*  191 */ "SEMI",
  /*  192 */ "NONE",
  /*  193 */ "PREV",
  /*  194 */ "LINEAR",
  /*  195 */ "IMPORT",
  /*  196 */ "TBNAME",
  /*  197 */ "JOIN",
  /*  198 */ "INSERT",
  /*  199 */ "INTO",
  /*  200 */ "VALUES",
  /*  201 */ "FILE",
  /*  202 */ "program",
  /*  203 */ "cmd",
  /*  204 */ "ids",
  /*  205 */ "dbPrefix",
  /*  206 */ "cpxName",
  /*  207 */ "ifexists",
  /*  208 */ "alter_db_optr",
  /*  209 */ "alter_topic_optr",
  /*  210 */ "acct_optr",
  /*  211 */ "exprlist",
  /*  212 */ "ifnotexists",
  /*  213 */ "db_optr",
  /*  214 */ "topic_optr",
  /*  215 */ "typename",
  /*  216 */ "bufsize",
  /*  217 */ "pps",
  /*  218 */ "tseries",
  /*  219 */ "dbs",
  /*  220 */ "streams",
  /*  221 */ "storage",
  /*  222 */ "qtime",
  /*  223 */ "users",
  /*  224 */ "conns",
  /*  225 */ "state",
  /*  226 */ "intitemlist",
  /*  227 */ "intitem",
  /*  228 */ "keep",
  /*  229 */ "cache",
  /*  230 */ "replica",
  /*  231 */ "quorum",
  /*  232 */ "days",
  /*  233 */ "minrows",
  /*  234 */ "maxrows",
  /*  235 */ "blocks",
  /*  236 */ "ctime",
  /*  237 */ "wal",
  /*  238 */ "fsync",
  /*  239 */ "comp",
  /*  240 */ "prec",
  /*  241 */ "update",
  /*  242 */ "cachelast",
  /*  243 */ "partitions",
  /*  244 */ "signed",
  /*  245 */ "create_table_args",
  /*  246 */ "create_stable_args",
  /*  247 */ "create_table_list",
  /*  248 */ "create_from_stable",
  /*  249 */ "columnlist",
  /*  250 */ "tagitemlist",
  /*  251 */ "tagNamelist",
  /*  252 */ "select",
  /*  253 */ "column",
  /*  254 */ "tagitem",
  /*  255 */ "selcollist",
  /*  256 */ "from",
  /*  257 */ "where_opt",
  /*  258 */ "range_option",
  /*  259 */ "interval_option",
  /*  260 */ "sliding_opt",
  /*  261 */ "session_option",
  /*  262 */ "windowstate_option",
  /*  263 */ "fill_opt",
  /*  264 */ "groupby_opt",
  /*  265 */ "having_opt",
  /*  266 */ "orderby_opt",
  /*  267 */ "slimit_opt",
  /*  268 */ "limit_opt",
  /*  269 */ "union",
  /*  270 */ "sclp",
  /*  271 */ "distinct",
  /*  272 */ "expr",
  /*  273 */ "as",
  /*  274 */ "tablelist",
  /*  275 */ "sub",
  /*  276 */ "tmvar",
  /*  277 */ "timestamp",
  /*  278 */ "intervalKey",
  /*  279 */ "sortlist",
  /*  280 */ "item",
  /*  281 */ "sortorder",
  /*  282 */ "arrow",
  /*  283 */ "grouplist",
  /*  284 */ "expritem",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
 /*   0 */ "program ::= cmd",
 /*   1 */ "cmd ::= SHOW DATABASES",
 /*   2 */ "cmd ::= SHOW TOPICS",
 /*   3 */ "cmd ::= SHOW FUNCTIONS",
 /*   4 */ "cmd ::= SHOW MNODES",
 /*   5 */ "cmd ::= SHOW DNODES",
 /*   6 */ "cmd ::= SHOW ACCOUNTS",
 /*   7 */ "cmd ::= SHOW USERS",
 /*   8 */ "cmd ::= SHOW MODULES",
 /*   9 */ "cmd ::= SHOW QUERIES",
 /*  10 */ "cmd ::= SHOW CONNECTIONS",
 /*  11 */ "cmd ::= SHOW STREAMS",
 /*  12 */ "cmd ::= SHOW VARIABLES",
 /*  13 */ "cmd ::= SHOW SCORES",
 /*  14 */ "cmd ::= SHOW GRANTS",
 /*  15 */ "cmd ::= SHOW VNODES",
 /*  16 */ "cmd ::= SHOW VNODES ids",
 /*  17 */ "dbPrefix ::=",
 /*  18 */ "dbPrefix ::= ids DOT",
 /*  19 */ "cpxName ::=",
 /*  20 */ "cpxName ::= DOT ids",
 /*  21 */ "cmd ::= SHOW CREATE TABLE ids cpxName",
 /*  22 */ "cmd ::= SHOW CREATE STABLE ids cpxName",
 /*  23 */ "cmd ::= SHOW CREATE DATABASE ids",
 /*  24 */ "cmd ::= SHOW dbPrefix TABLES",
 /*  25 */ "cmd ::= SHOW dbPrefix TABLES LIKE ids",
 /*  26 */ "cmd ::= SHOW dbPrefix STABLES",
 /*  27 */ "cmd ::= SHOW dbPrefix STABLES LIKE ids",
 /*  28 */ "cmd ::= SHOW dbPrefix VGROUPS",
 /*  29 */ "cmd ::= DROP TABLE ifexists ids cpxName",
 /*  30 */ "cmd ::= DROP STABLE ifexists ids cpxName",
 /*  31 */ "cmd ::= DROP DATABASE ifexists ids",
 /*  32 */ "cmd ::= DROP TOPIC ifexists ids",
 /*  33 */ "cmd ::= DROP FUNCTION ids",
 /*  34 */ "cmd ::= DROP DNODE ids",
 /*  35 */ "cmd ::= DROP USER ids",
 /*  36 */ "cmd ::= DROP ACCOUNT ids",
 /*  37 */ "cmd ::= USE ids",
 /*  38 */ "cmd ::= DESCRIBE ids cpxName",
 /*  39 */ "cmd ::= DESC ids cpxName",
 /*  40 */ "cmd ::= ALTER USER ids PASS ids",
 /*  41 */ "cmd ::= ALTER USER ids PRIVILEGE ids",
 /*  42 */ "cmd ::= ALTER DNODE ids ids",
 /*  43 */ "cmd ::= ALTER DNODE ids ids ids",
 /*  44 */ "cmd ::= ALTER LOCAL ids",
 /*  45 */ "cmd ::= ALTER LOCAL ids ids",
 /*  46 */ "cmd ::= ALTER DATABASE ids alter_db_optr",
 /*  47 */ "cmd ::= ALTER TOPIC ids alter_topic_optr",
 /*  48 */ "cmd ::= ALTER ACCOUNT ids acct_optr",
 /*  49 */ "cmd ::= ALTER ACCOUNT ids PASS ids acct_optr",
 /*  50 */ "cmd ::= COMPACT VNODES IN LP exprlist RP",
 /*  51 */ "ids ::= ID",
 /*  52 */ "ids ::= STRING",
 /*  53 */ "ifexists ::= IF EXISTS",
 /*  54 */ "ifexists ::=",
 /*  55 */ "ifnotexists ::= IF NOT EXISTS",
 /*  56 */ "ifnotexists ::=",
 /*  57 */ "cmd ::= CREATE DNODE ids",
 /*  58 */ "cmd ::= CREATE ACCOUNT ids PASS ids acct_optr",
 /*  59 */ "cmd ::= CREATE DATABASE ifnotexists ids db_optr",
 /*  60 */ "cmd ::= CREATE TOPIC ifnotexists ids topic_optr",
 /*  61 */ "cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize",
 /*  62 */ "cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize",
 /*  63 */ "cmd ::= CREATE USER ids PASS ids",
 /*  64 */ "bufsize ::=",
 /*  65 */ "bufsize ::= BUFSIZE INTEGER",
 /*  66 */ "pps ::=",
 /*  67 */ "pps ::= PPS INTEGER",
 /*  68 */ "tseries ::=",
 /*  69 */ "tseries ::= TSERIES INTEGER",
 /*  70 */ "dbs ::=",
 /*  71 */ "dbs ::= DBS INTEGER",
 /*  72 */ "streams ::=",
 /*  73 */ "streams ::= STREAMS INTEGER",
 /*  74 */ "storage ::=",
 /*  75 */ "storage ::= STORAGE INTEGER",
 /*  76 */ "qtime ::=",
 /*  77 */ "qtime ::= QTIME INTEGER",
 /*  78 */ "users ::=",
 /*  79 */ "users ::= USERS INTEGER",
 /*  80 */ "conns ::=",
 /*  81 */ "conns ::= CONNS INTEGER",
 /*  82 */ "state ::=",
 /*  83 */ "state ::= STATE ids",
 /*  84 */ "acct_optr ::= pps tseries storage streams qtime dbs users conns state",
 /*  85 */ "intitemlist ::= intitemlist COMMA intitem",
 /*  86 */ "intitemlist ::= intitem",
 /*  87 */ "intitem ::= INTEGER",
 /*  88 */ "keep ::= KEEP intitemlist",
 /*  89 */ "cache ::= CACHE INTEGER",
 /*  90 */ "replica ::= REPLICA INTEGER",
 /*  91 */ "quorum ::= QUORUM INTEGER",
 /*  92 */ "days ::= DAYS INTEGER",
 /*  93 */ "minrows ::= MINROWS INTEGER",
 /*  94 */ "maxrows ::= MAXROWS INTEGER",
 /*  95 */ "blocks ::= BLOCKS INTEGER",
 /*  96 */ "ctime ::= CTIME INTEGER",
 /*  97 */ "wal ::= WAL INTEGER",
 /*  98 */ "fsync ::= FSYNC INTEGER",
 /*  99 */ "comp ::= COMP INTEGER",
 /* 100 */ "prec ::= PRECISION STRING",
 /* 101 */ "update ::= UPDATE INTEGER",
 /* 102 */ "cachelast ::= CACHELAST INTEGER",
 /* 103 */ "partitions ::= PARTITIONS INTEGER",
 /* 104 */ "db_optr ::=",
 /* 105 */ "db_optr ::= db_optr cache",
 /* 106 */ "db_optr ::= db_optr replica",
 /* 107 */ "db_optr ::= db_optr quorum",
 /* 108 */ "db_optr ::= db_optr days",
 /* 109 */ "db_optr ::= db_optr minrows",
 /* 110 */ "db_optr ::= db_optr maxrows",
 /* 111 */ "db_optr ::= db_optr blocks",
 /* 112 */ "db_optr ::= db_optr ctime",
 /* 113 */ "db_optr ::= db_optr wal",
 /* 114 */ "db_optr ::= db_optr fsync",
 /* 115 */ "db_optr ::= db_optr comp",
 /* 116 */ "db_optr ::= db_optr prec",
 /* 117 */ "db_optr ::= db_optr keep",
 /* 118 */ "db_optr ::= db_optr update",
 /* 119 */ "db_optr ::= db_optr cachelast",
 /* 120 */ "topic_optr ::= db_optr",
 /* 121 */ "topic_optr ::= topic_optr partitions",
 /* 122 */ "alter_db_optr ::=",
 /* 123 */ "alter_db_optr ::= alter_db_optr replica",
 /* 124 */ "alter_db_optr ::= alter_db_optr quorum",
 /* 125 */ "alter_db_optr ::= alter_db_optr keep",
 /* 126 */ "alter_db_optr ::= alter_db_optr blocks",
 /* 127 */ "alter_db_optr ::= alter_db_optr comp",
 /* 128 */ "alter_db_optr ::= alter_db_optr update",
 /* 129 */ "alter_db_optr ::= alter_db_optr cachelast",
 /* 130 */ "alter_topic_optr ::= alter_db_optr",
 /* 131 */ "alter_topic_optr ::= alter_topic_optr partitions",
 /* 132 */ "typename ::= ids",
 /* 133 */ "typename ::= ids LP signed RP",
 /* 134 */ "typename ::= ids UNSIGNED",
 /* 135 */ "signed ::= INTEGER",
 /* 136 */ "signed ::= PLUS INTEGER",
 /* 137 */ "signed ::= MINUS INTEGER",
 /* 138 */ "cmd ::= CREATE TABLE create_table_args",
 /* 139 */ "cmd ::= CREATE TABLE create_stable_args",
 /* 140 */ "cmd ::= CREATE STABLE create_stable_args",
 /* 141 */ "cmd ::= CREATE TABLE create_table_list",
 /* 142 */ "create_table_list ::= create_from_stable",
 /* 143 */ "create_table_list ::= create_table_list create_from_stable",
 /* 144 */ "create_table_args ::= ifnotexists ids cpxName LP columnlist RP",
 /* 145 */ "create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP",
 /* 146 */ "create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP",
 /* 147 */ "create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP",
 /* 148 */ "tagNamelist ::= tagNamelist COMMA ids",
 /* 149 */ "tagNamelist ::= ids",
 /* 150 */ "create_table_args ::= ifnotexists ids cpxName AS select",
 /* 151 */ "columnlist ::= columnlist COMMA column",
 /* 152 */ "columnlist ::= column",
 /* 153 */ "column ::= ids typename",
 /* 154 */ "tagitemlist ::= tagitemlist COMMA tagitem",
 /* 155 */ "tagitemlist ::= tagitem",
 /* 156 */ "tagitem ::= INTEGER",
 /* 157 */ "tagitem ::= FLOAT",
 /* 158 */ "tagitem ::= STRING",
 /* 159 */ "tagitem ::= BOOL",
 /* 160 */ "tagitem ::= NULL",
 /* 161 */ "tagitem ::= NOW",
 /* 162 */ "tagitem ::= MINUS INTEGER",
 /* 163 */ "tagitem ::= MINUS FLOAT",
 /* 164 */ "tagitem ::= PLUS INTEGER",
 /* 165 */ "tagitem ::= PLUS FLOAT",
 /* 166 */ "select ::= SELECT selcollist from where_opt range_option interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt",
 /* 167 */ "select ::= LP select RP",
 /* 168 */ "union ::= select",
 /* 169 */ "union ::= union UNION ALL select",
 /* 170 */ "cmd ::= union",
 /* 171 */ "select ::= SELECT selcollist",
 /* 172 */ "sclp ::= selcollist COMMA",
 /* 173 */ "sclp ::=",
 /* 174 */ "selcollist ::= sclp distinct expr as",
 /* 175 */ "selcollist ::= sclp STAR",
 /* 176 */ "as ::= AS ids",
 /* 177 */ "as ::= ids",
 /* 178 */ "as ::=",
 /* 179 */ "distinct ::= DISTINCT",
 /* 180 */ "distinct ::=",
 /* 181 */ "from ::= FROM tablelist",
 /* 182 */ "from ::= FROM sub",
 /* 183 */ "sub ::= LP union RP",
 /* 184 */ "sub ::= LP union RP ids",
 /* 185 */ "sub ::= sub COMMA LP union RP ids",
 /* 186 */ "tablelist ::= ids cpxName",
 /* 187 */ "tablelist ::= ids cpxName ids",
 /* 188 */ "tablelist ::= tablelist COMMA ids cpxName",
 /* 189 */ "tablelist ::= tablelist COMMA ids cpxName ids",
 /* 190 */ "tmvar ::= VARIABLE",
 /* 191 */ "timestamp ::= INTEGER",
 /* 192 */ "timestamp ::= MINUS INTEGER",
 /* 193 */ "timestamp ::= PLUS INTEGER",
 /* 194 */ "timestamp ::= STRING",
 /* 195 */ "timestamp ::= NOW",
 /* 196 */ "timestamp ::= NOW PLUS VARIABLE",
 /* 197 */ "timestamp ::= NOW MINUS VARIABLE",
 /* 198 */ "range_option ::=",
 /* 199 */ "range_option ::= RANGE LP timestamp COMMA timestamp RP",
 /* 200 */ "interval_option ::= intervalKey LP tmvar RP",
 /* 201 */ "interval_option ::= intervalKey LP tmvar COMMA tmvar RP",
 /* 202 */ "interval_option ::=",
 /* 203 */ "intervalKey ::= INTERVAL",
 /* 204 */ "intervalKey ::= EVERY",
 /* 205 */ "session_option ::=",
 /* 206 */ "session_option ::= SESSION LP ids cpxName COMMA tmvar RP",
 /* 207 */ "windowstate_option ::=",
 /* 208 */ "windowstate_option ::= STATE_WINDOW LP ids RP",
 /* 209 */ "fill_opt ::=",
 /* 210 */ "fill_opt ::= FILL LP ID COMMA tagitemlist RP",
 /* 211 */ "fill_opt ::= FILL LP ID RP",
 /* 212 */ "sliding_opt ::= SLIDING LP tmvar RP",
 /* 213 */ "sliding_opt ::=",
 /* 214 */ "orderby_opt ::=",
 /* 215 */ "orderby_opt ::= ORDER BY sortlist",
 /* 216 */ "sortlist ::= sortlist COMMA item sortorder",
 /* 217 */ "sortlist ::= sortlist COMMA arrow sortorder",
 /* 218 */ "sortlist ::= item sortorder",
 /* 219 */ "sortlist ::= arrow sortorder",
 /* 220 */ "item ::= ID",
 /* 221 */ "item ::= ID DOT ID",
 /* 222 */ "sortorder ::= ASC",
 /* 223 */ "sortorder ::= DESC",
 /* 224 */ "sortorder ::=",
 /* 225 */ "groupby_opt ::=",
 /* 226 */ "groupby_opt ::= GROUP BY grouplist",
 /* 227 */ "grouplist ::= grouplist COMMA item",
 /* 228 */ "grouplist ::= grouplist COMMA arrow",
 /* 229 */ "grouplist ::= item",
 /* 230 */ "grouplist ::= arrow",
 /* 231 */ "having_opt ::=",
 /* 232 */ "having_opt ::= HAVING expr",
 /* 233 */ "limit_opt ::=",
 /* 234 */ "limit_opt ::= LIMIT signed",
 /* 235 */ "limit_opt ::= LIMIT signed OFFSET signed",
 /* 236 */ "limit_opt ::= LIMIT signed COMMA signed",
 /* 237 */ "slimit_opt ::=",
 /* 238 */ "slimit_opt ::= SLIMIT signed",
 /* 239 */ "slimit_opt ::= SLIMIT signed SOFFSET signed",
 /* 240 */ "slimit_opt ::= SLIMIT signed COMMA signed",
 /* 241 */ "where_opt ::=",
 /* 242 */ "where_opt ::= WHERE expr",
 /* 243 */ "expr ::= LP expr RP",
 /* 244 */ "expr ::= ID",
 /* 245 */ "expr ::= ID DOT ID",
 /* 246 */ "expr ::= ID DOT STAR",
 /* 247 */ "expr ::= INTEGER",
 /* 248 */ "expr ::= MINUS INTEGER",
 /* 249 */ "expr ::= PLUS INTEGER",
 /* 250 */ "expr ::= FLOAT",
 /* 251 */ "expr ::= MINUS FLOAT",
 /* 252 */ "expr ::= PLUS FLOAT",
 /* 253 */ "expr ::= STRING",
 /* 254 */ "expr ::= NOW",
 /* 255 */ "expr ::= VARIABLE",
 /* 256 */ "expr ::= PLUS VARIABLE",
 /* 257 */ "expr ::= MINUS VARIABLE",
 /* 258 */ "expr ::= BOOL",
 /* 259 */ "expr ::= NULL",
 /* 260 */ "expr ::= ID LP exprlist RP",
 /* 261 */ "expr ::= ID LP STAR RP",
 /* 262 */ "expr ::= expr IS NULL",
 /* 263 */ "expr ::= expr IS NOT NULL",
 /* 264 */ "expr ::= expr LT expr",
 /* 265 */ "expr ::= expr GT expr",
 /* 266 */ "expr ::= expr LE expr",
 /* 267 */ "expr ::= expr GE expr",
 /* 268 */ "expr ::= expr NE expr",
 /* 269 */ "expr ::= expr EQ expr",
 /* 270 */ "expr ::= expr BETWEEN expr AND expr",
 /* 271 */ "expr ::= expr AND expr",
 /* 272 */ "expr ::= expr OR expr",
 /* 273 */ "expr ::= expr PLUS expr",
 /* 274 */ "expr ::= expr MINUS expr",
 /* 275 */ "expr ::= expr STAR expr",
 /* 276 */ "expr ::= expr SLASH expr",
 /* 277 */ "expr ::= expr REM expr",
 /* 278 */ "expr ::= expr LIKE expr",
 /* 279 */ "expr ::= expr MATCH expr",
 /* 280 */ "expr ::= expr NMATCH expr",
 /* 281 */ "expr ::= ID CONTAINS STRING",
 /* 282 */ "expr ::= ID DOT ID CONTAINS STRING",
 /* 283 */ "arrow ::= ID ARROW STRING",
 /* 284 */ "arrow ::= ID DOT ID ARROW STRING",
 /* 285 */ "expr ::= arrow",
 /* 286 */ "expr ::= expr IN LP exprlist RP",
 /* 287 */ "exprlist ::= exprlist COMMA expritem",
 /* 288 */ "exprlist ::= expritem",
 /* 289 */ "expritem ::= expr",
 /* 290 */ "expritem ::=",
 /* 291 */ "cmd ::= RESET QUERY CACHE",
 /* 292 */ "cmd ::= SYNCDB ids REPLICA",
 /* 293 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist",
 /* 294 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids",
 /* 295 */ "cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist",
 /* 296 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist",
 /* 297 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids",
 /* 298 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids",
 /* 299 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem",
 /* 300 */ "cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist",
 /* 301 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist",
 /* 302 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids",
 /* 303 */ "cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist",
 /* 304 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist",
 /* 305 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids",
 /* 306 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids",
 /* 307 */ "cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem",
 /* 308 */ "cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist",
 /* 309 */ "cmd ::= KILL CONNECTION INTEGER",
 /* 310 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER",
 /* 311 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER",
};
#endif /* NDEBUG */


#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack.  Return the number
** of errors.  Return 0 on success.
*/
static int yyGrowStack(yyParser *p){
  int newSize;
  int idx;
  yyStackEntry *pNew;

  newSize = p->yystksz*2 + 100;
  idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
  if( p->yystack==&p->yystk0 ){
    pNew = malloc(newSize*sizeof(pNew[0]));
    if( pNew ) pNew[0] = p->yystk0;
  }else{
    pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
  }
  if( pNew ){
    p->yystack = pNew;
    p->yytos = &p->yystack[idx];
#ifndef NDEBUG
    if( yyTraceFILE ){
      fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n",
              yyTracePrompt, p->yystksz, newSize);
    }
#endif
    p->yystksz = newSize;
  }
  return pNew==0; 
}
#endif

/* Datatype of the argument to the memory allocated passed as the
** second argument to ParseAlloc() below.  This can be changed by
** putting an appropriate #define in the %include section of the input
** grammar.
*/
#ifndef YYMALLOCARGTYPE
# define YYMALLOCARGTYPE size_t
#endif

/* Initialize a new parser that has already been allocated.
*/
void ParseInit(void *yypRawParser ParseCTX_PDECL){
  yyParser *yypParser = (yyParser*)yypRawParser;
  ParseCTX_STORE
#ifdef YYTRACKMAXSTACKDEPTH
  yypParser->yyhwm = 0;
#endif
#if YYSTACKDEPTH<=0
  yypParser->yytos = NULL;
  yypParser->yystack = NULL;
  yypParser->yystksz = 0;
  if( yyGrowStack(yypParser) ){
    yypParser->yystack = &yypParser->yystk0;
    yypParser->yystksz = 1;
  }
#endif
#ifndef YYNOERRORRECOVERY
  yypParser->yyerrcnt = -1;
#endif
  yypParser->yytos = yypParser->yystack;
  yypParser->yystack[0].stateno = 0;
  yypParser->yystack[0].major = 0;
#if YYSTACKDEPTH>0
  yypParser->yystackEnd = &yypParser->yystack[YYSTACKDEPTH-1];
#endif
}

#ifndef Parse_ENGINEALWAYSONSTACK
/* 
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
** malloc.
**
** Inputs:
** A pointer to the function used to allocate memory.
**
** Outputs:
** A pointer to a parser.  This pointer is used in subsequent calls
** to Parse and ParseFree.
*/
void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE) ParseCTX_PDECL){
  yyParser *yypParser;
  yypParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
  if( yypParser ){
    ParseCTX_STORE
    ParseInit(yypParser ParseCTX_PARAM);
  }
  return (void*)yypParser;
}
#endif /* Parse_ENGINEALWAYSONSTACK */


/* The following function deletes the "minor type" or semantic value
** associated with a symbol.  The symbol can be either a terminal
** or nonterminal. "yymajor" is the symbol code, and "yypminor" is
** a pointer to the value to be deleted.  The code used to do the 
** deletions is derived from the %destructor and/or %token_destructor
** directives of the input grammar.
*/
static void yy_destructor(
  yyParser *yypParser,    /* The parser */
  YYCODETYPE yymajor,     /* Type code for object to destroy */
  YYMINORTYPE *yypminor   /* The object to be destroyed */
){
  ParseARG_FETCH
  ParseCTX_FETCH
  switch( yymajor ){
    /* Here is inserted the actions which take place when a
    ** terminal or non-terminal is destroyed.  This can happen
    ** when the symbol is popped from the stack during a
    ** reduce or during error processing or when a parser is 
    ** being destroyed before it is finished parsing.
    **
    ** Note: during a reduce, the only symbols destroyed are those
    ** which appear on the RHS of the rule, but which are *not* used
    ** inside the C code.
    */
/********* Begin destructor definitions ***************************************/
    case 211: /* exprlist */
    case 255: /* selcollist */
    case 270: /* sclp */
{
tSqlExprListDestroy((yypminor->yy231));
}
      break;
    case 226: /* intitemlist */
    case 228: /* keep */
    case 249: /* columnlist */
    case 250: /* tagitemlist */
    case 251: /* tagNamelist */
    case 263: /* fill_opt */
    case 264: /* groupby_opt */
    case 266: /* orderby_opt */
    case 279: /* sortlist */
    case 283: /* grouplist */
{
taosArrayDestroy((yypminor->yy231));
}
      break;
    case 247: /* create_table_list */
{
destroyCreateTableSql((yypminor->yy422));
}
      break;
    case 252: /* select */
{
destroySqlNode((yypminor->yy86));
}
      break;
    case 256: /* from */
    case 274: /* tablelist */
    case 275: /* sub */
{
destroyRelationInfo((yypminor->yy484));
}
      break;
    case 257: /* where_opt */
    case 265: /* having_opt */
    case 272: /* expr */
    case 277: /* timestamp */
    case 282: /* arrow */
    case 284: /* expritem */
{
tSqlExprDestroy((yypminor->yy226));
}
      break;
    case 269: /* union */
{
destroyAllSqlNode((yypminor->yy231));
}
      break;
/********* End destructor definitions *****************************************/
    default:  break;   /* If no destructor action specified: do nothing */
  }
}

/*
** Pop the parser's stack once.
**
** If there is a destructor routine associated with the token which
** is popped from the stack, then call it.
*/
static void yy_pop_parser_stack(yyParser *pParser){
  yyStackEntry *yytos;
  assert( pParser->yytos!=0 );
  assert( pParser->yytos > pParser->yystack );
  yytos = pParser->yytos--;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sPopping %s\n",
      yyTracePrompt,
      yyTokenName[yytos->major]);
  }
#endif
  yy_destructor(pParser, yytos->major, &yytos->minor);
}

/*
** Clear all secondary memory allocations from the parser
*/
void ParseFinalize(void *p){
  yyParser *pParser = (yyParser*)p;
  while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
  if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
#endif
}

#ifndef Parse_ENGINEALWAYSONSTACK
/* 
** Deallocate and destroy a parser.  Destructors are called for
** all stack elements before shutting the parser down.
**
** If the YYPARSEFREENEVERNULL macro exists (for example because it
** is defined in a %include section of the input grammar) then it is
** assumed that the input pointer is never NULL.
*/
void ParseFree(
  void *p,                    /* The parser to be deleted */
  void (*freeProc)(void*)     /* Function used to reclaim memory */
){
#ifndef YYPARSEFREENEVERNULL
  if( p==0 ) return;
#endif
  ParseFinalize(p);
  (*freeProc)(p);
}
#endif /* Parse_ENGINEALWAYSONSTACK */

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int ParseStackPeak(void *p){
  yyParser *pParser = (yyParser*)p;
  return pParser->yyhwm;
}
#endif

/* This array of booleans keeps track of the parser statement
** coverage.  The element yycoverage[X][Y] is set when the parser
** is in state X and has a lookahead token Y.  In a well-tested
** systems, every element of this matrix should end up being set.
*/
#if defined(YYCOVERAGE)
static unsigned char yycoverage[YYNSTATE][YYNTOKEN];
#endif

/*
** Write into out a description of every state/lookahead combination that
**
**   (1)  has not been used by the parser, and
**   (2)  is not a syntax error.
**
** Return the number of missed state/lookahead combinations.
*/
#if defined(YYCOVERAGE)
int ParseCoverage(FILE *out){
  int stateno, iLookAhead, i;
  int nMissed = 0;
  for(stateno=0; stateno<YYNSTATE; stateno++){
    i = yy_shift_ofst[stateno];
    for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){
      if( yy_lookahead[i+iLookAhead]!=iLookAhead ) continue;
      if( yycoverage[stateno][iLookAhead]==0 ) nMissed++;
      if( out ){
        fprintf(out,"State %d lookahead %s %s\n", stateno,
                yyTokenName[iLookAhead],
                yycoverage[stateno][iLookAhead] ? "ok" : "missed");
      }
    }
  }
  return nMissed;
}
#endif

/*
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
*/
static YYACTIONTYPE yy_find_shift_action(
  YYCODETYPE iLookAhead,    /* The look-ahead token */
  YYACTIONTYPE stateno      /* Current state number */
){
  int i;

  if( stateno>YY_MAX_SHIFT ) return stateno;
  assert( stateno <= YY_SHIFT_COUNT );
#if defined(YYCOVERAGE)
  yycoverage[stateno][iLookAhead] = 1;
#endif
  do{
    i = yy_shift_ofst[stateno];
    assert( i>=0 );
    assert( i<=YY_ACTTAB_COUNT );
    assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD );
    assert( iLookAhead!=YYNOCODE );
    assert( iLookAhead < YYNTOKEN );
    i += iLookAhead;
    assert( i<(int)YY_NLOOKAHEAD );
    if( yy_lookahead[i]!=iLookAhead ){
#ifdef YYFALLBACK
      YYCODETYPE iFallback;            /* Fallback token */
      assert( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0]) );
      iFallback = yyFallback[iLookAhead];
      if( iFallback!=0 ){
#ifndef NDEBUG
        if( yyTraceFILE ){
          fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
             yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
        }
#endif
        assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
        iLookAhead = iFallback;
        continue;
      }
#endif
#ifdef YYWILDCARD
      {
        int j = i - iLookAhead + YYWILDCARD;
        assert( j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) );
        if( yy_lookahead[j]==YYWILDCARD && iLookAhead>0 ){
#ifndef NDEBUG
          if( yyTraceFILE ){
            fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
               yyTracePrompt, yyTokenName[iLookAhead],
               yyTokenName[YYWILDCARD]);
          }
#endif /* NDEBUG */
          return yy_action[j];
        }
      }
#endif /* YYWILDCARD */
      return yy_default[stateno];
    }else{
      assert( i>=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) );
      return yy_action[i];
    }
  }while(1);
}

/*
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.
*/
static YYACTIONTYPE yy_find_reduce_action(
  YYACTIONTYPE stateno,     /* Current state number */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){
  int i;
#ifdef YYERRORSYMBOL
  if( stateno>YY_REDUCE_COUNT ){
    return yy_default[stateno];
  }
#else
  assert( stateno<=YY_REDUCE_COUNT );
#endif
  i = yy_reduce_ofst[stateno];
  assert( iLookAhead!=YYNOCODE );
  i += iLookAhead;
#ifdef YYERRORSYMBOL
  if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
    return yy_default[stateno];
  }
#else
  assert( i>=0 && i<YY_ACTTAB_COUNT );
  assert( yy_lookahead[i]==iLookAhead );
#endif
  return yy_action[i];
}

/*
** The following routine is called if the stack overflows.
*/
static void yyStackOverflow(yyParser *yypParser){
   ParseARG_FETCH
   ParseCTX_FETCH
#ifndef NDEBUG
   if( yyTraceFILE ){
     fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
   }
#endif
   while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
   /* Here code is inserted which will execute if the parser
   ** stack every overflows */
/******** Begin %stack_overflow code ******************************************/
/******** End %stack_overflow code ********************************************/
   ParseARG_STORE /* Suppress warning about unused %extra_argument var */
   ParseCTX_STORE
}

/*
** Print tracing information for a SHIFT action
*/
#ifndef NDEBUG
static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){
  if( yyTraceFILE ){
    if( yyNewState<YYNSTATE ){
      fprintf(yyTraceFILE,"%s%s '%s', go to state %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
         yyNewState);
    }else{
      fprintf(yyTraceFILE,"%s%s '%s', pending reduce %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
         yyNewState - YY_MIN_REDUCE);
    }
  }
}
#else
# define yyTraceShift(X,Y,Z)
#endif

/*
** Perform a shift action.
*/
static void yy_shift(
  yyParser *yypParser,          /* The parser to be shifted */
  YYACTIONTYPE yyNewState,      /* The new state to shift in */
  YYCODETYPE yyMajor,           /* The major token to shift in */
  ParseTOKENTYPE yyMinor        /* The minor token to shift in */
){
  yyStackEntry *yytos;
  yypParser->yytos++;
#ifdef YYTRACKMAXSTACKDEPTH
  if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
    yypParser->yyhwm++;
    assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );
  }
#endif
#if YYSTACKDEPTH>0 
  if( yypParser->yytos>yypParser->yystackEnd ){
    yypParser->yytos--;
    yyStackOverflow(yypParser);
    return;
  }
#else
  if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
    if( yyGrowStack(yypParser) ){
      yypParser->yytos--;
      yyStackOverflow(yypParser);
      return;
    }
  }
#endif
  if( yyNewState > YY_MAX_SHIFT ){
    yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
  }
  yytos = yypParser->yytos;
  yytos->stateno = yyNewState;
  yytos->major = yyMajor;
  yytos->minor.yy0 = yyMinor;
  yyTraceShift(yypParser, yyNewState, "Shift");
}

/* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side
** of that rule */
static const YYCODETYPE yyRuleInfoLhs[] = {
   202,  /* (0) program ::= cmd */
   203,  /* (1) cmd ::= SHOW DATABASES */
   203,  /* (2) cmd ::= SHOW TOPICS */
   203,  /* (3) cmd ::= SHOW FUNCTIONS */
   203,  /* (4) cmd ::= SHOW MNODES */
   203,  /* (5) cmd ::= SHOW DNODES */
   203,  /* (6) cmd ::= SHOW ACCOUNTS */
   203,  /* (7) cmd ::= SHOW USERS */
   203,  /* (8) cmd ::= SHOW MODULES */
   203,  /* (9) cmd ::= SHOW QUERIES */
   203,  /* (10) cmd ::= SHOW CONNECTIONS */
   203,  /* (11) cmd ::= SHOW STREAMS */
   203,  /* (12) cmd ::= SHOW VARIABLES */
   203,  /* (13) cmd ::= SHOW SCORES */
   203,  /* (14) cmd ::= SHOW GRANTS */
   203,  /* (15) cmd ::= SHOW VNODES */
   203,  /* (16) cmd ::= SHOW VNODES ids */
   205,  /* (17) dbPrefix ::= */
   205,  /* (18) dbPrefix ::= ids DOT */
   206,  /* (19) cpxName ::= */
   206,  /* (20) cpxName ::= DOT ids */
   203,  /* (21) cmd ::= SHOW CREATE TABLE ids cpxName */
   203,  /* (22) cmd ::= SHOW CREATE STABLE ids cpxName */
   203,  /* (23) cmd ::= SHOW CREATE DATABASE ids */
   203,  /* (24) cmd ::= SHOW dbPrefix TABLES */
   203,  /* (25) cmd ::= SHOW dbPrefix TABLES LIKE ids */
   203,  /* (26) cmd ::= SHOW dbPrefix STABLES */
   203,  /* (27) cmd ::= SHOW dbPrefix STABLES LIKE ids */
   203,  /* (28) cmd ::= SHOW dbPrefix VGROUPS */
   203,  /* (29) cmd ::= DROP TABLE ifexists ids cpxName */
   203,  /* (30) cmd ::= DROP STABLE ifexists ids cpxName */
   203,  /* (31) cmd ::= DROP DATABASE ifexists ids */
   203,  /* (32) cmd ::= DROP TOPIC ifexists ids */
   203,  /* (33) cmd ::= DROP FUNCTION ids */
   203,  /* (34) cmd ::= DROP DNODE ids */
   203,  /* (35) cmd ::= DROP USER ids */
   203,  /* (36) cmd ::= DROP ACCOUNT ids */
   203,  /* (37) cmd ::= USE ids */
   203,  /* (38) cmd ::= DESCRIBE ids cpxName */
   203,  /* (39) cmd ::= DESC ids cpxName */
   203,  /* (40) cmd ::= ALTER USER ids PASS ids */
   203,  /* (41) cmd ::= ALTER USER ids PRIVILEGE ids */
   203,  /* (42) cmd ::= ALTER DNODE ids ids */
   203,  /* (43) cmd ::= ALTER DNODE ids ids ids */
   203,  /* (44) cmd ::= ALTER LOCAL ids */
   203,  /* (45) cmd ::= ALTER LOCAL ids ids */
   203,  /* (46) cmd ::= ALTER DATABASE ids alter_db_optr */
   203,  /* (47) cmd ::= ALTER TOPIC ids alter_topic_optr */
   203,  /* (48) cmd ::= ALTER ACCOUNT ids acct_optr */
   203,  /* (49) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
   203,  /* (50) cmd ::= COMPACT VNODES IN LP exprlist RP */
   204,  /* (51) ids ::= ID */
   204,  /* (52) ids ::= STRING */
   207,  /* (53) ifexists ::= IF EXISTS */
   207,  /* (54) ifexists ::= */
   212,  /* (55) ifnotexists ::= IF NOT EXISTS */
   212,  /* (56) ifnotexists ::= */
   203,  /* (57) cmd ::= CREATE DNODE ids */
   203,  /* (58) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
   203,  /* (59) cmd ::= CREATE DATABASE ifnotexists ids db_optr */
   203,  /* (60) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */
   203,  /* (61) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */
   203,  /* (62) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */
   203,  /* (63) cmd ::= CREATE USER ids PASS ids */
   216,  /* (64) bufsize ::= */
   216,  /* (65) bufsize ::= BUFSIZE INTEGER */
   217,  /* (66) pps ::= */
   217,  /* (67) pps ::= PPS INTEGER */
   218,  /* (68) tseries ::= */
   218,  /* (69) tseries ::= TSERIES INTEGER */
   219,  /* (70) dbs ::= */
   219,  /* (71) dbs ::= DBS INTEGER */
   220,  /* (72) streams ::= */
   220,  /* (73) streams ::= STREAMS INTEGER */
   221,  /* (74) storage ::= */
   221,  /* (75) storage ::= STORAGE INTEGER */
   222,  /* (76) qtime ::= */
   222,  /* (77) qtime ::= QTIME INTEGER */
   223,  /* (78) users ::= */
   223,  /* (79) users ::= USERS INTEGER */
   224,  /* (80) conns ::= */
   224,  /* (81) conns ::= CONNS INTEGER */
   225,  /* (82) state ::= */
   225,  /* (83) state ::= STATE ids */
   210,  /* (84) acct_optr ::= pps tseries storage streams qtime dbs users conns state */
   226,  /* (85) intitemlist ::= intitemlist COMMA intitem */
   226,  /* (86) intitemlist ::= intitem */
   227,  /* (87) intitem ::= INTEGER */
   228,  /* (88) keep ::= KEEP intitemlist */
   229,  /* (89) cache ::= CACHE INTEGER */
   230,  /* (90) replica ::= REPLICA INTEGER */
   231,  /* (91) quorum ::= QUORUM INTEGER */
   232,  /* (92) days ::= DAYS INTEGER */
   233,  /* (93) minrows ::= MINROWS INTEGER */
   234,  /* (94) maxrows ::= MAXROWS INTEGER */
   235,  /* (95) blocks ::= BLOCKS INTEGER */
   236,  /* (96) ctime ::= CTIME INTEGER */
   237,  /* (97) wal ::= WAL INTEGER */
   238,  /* (98) fsync ::= FSYNC INTEGER */
   239,  /* (99) comp ::= COMP INTEGER */
   240,  /* (100) prec ::= PRECISION STRING */
   241,  /* (101) update ::= UPDATE INTEGER */
   242,  /* (102) cachelast ::= CACHELAST INTEGER */
   243,  /* (103) partitions ::= PARTITIONS INTEGER */
   213,  /* (104) db_optr ::= */
   213,  /* (105) db_optr ::= db_optr cache */
   213,  /* (106) db_optr ::= db_optr replica */
   213,  /* (107) db_optr ::= db_optr quorum */
   213,  /* (108) db_optr ::= db_optr days */
   213,  /* (109) db_optr ::= db_optr minrows */
   213,  /* (110) db_optr ::= db_optr maxrows */
   213,  /* (111) db_optr ::= db_optr blocks */
   213,  /* (112) db_optr ::= db_optr ctime */
   213,  /* (113) db_optr ::= db_optr wal */
   213,  /* (114) db_optr ::= db_optr fsync */
   213,  /* (115) db_optr ::= db_optr comp */
   213,  /* (116) db_optr ::= db_optr prec */
   213,  /* (117) db_optr ::= db_optr keep */
   213,  /* (118) db_optr ::= db_optr update */
   213,  /* (119) db_optr ::= db_optr cachelast */
   214,  /* (120) topic_optr ::= db_optr */
   214,  /* (121) topic_optr ::= topic_optr partitions */
   208,  /* (122) alter_db_optr ::= */
   208,  /* (123) alter_db_optr ::= alter_db_optr replica */
   208,  /* (124) alter_db_optr ::= alter_db_optr quorum */
   208,  /* (125) alter_db_optr ::= alter_db_optr keep */
   208,  /* (126) alter_db_optr ::= alter_db_optr blocks */
   208,  /* (127) alter_db_optr ::= alter_db_optr comp */
   208,  /* (128) alter_db_optr ::= alter_db_optr update */
   208,  /* (129) alter_db_optr ::= alter_db_optr cachelast */
   209,  /* (130) alter_topic_optr ::= alter_db_optr */
   209,  /* (131) alter_topic_optr ::= alter_topic_optr partitions */
   215,  /* (132) typename ::= ids */
   215,  /* (133) typename ::= ids LP signed RP */
   215,  /* (134) typename ::= ids UNSIGNED */
   244,  /* (135) signed ::= INTEGER */
   244,  /* (136) signed ::= PLUS INTEGER */
   244,  /* (137) signed ::= MINUS INTEGER */
   203,  /* (138) cmd ::= CREATE TABLE create_table_args */
   203,  /* (139) cmd ::= CREATE TABLE create_stable_args */
   203,  /* (140) cmd ::= CREATE STABLE create_stable_args */
   203,  /* (141) cmd ::= CREATE TABLE create_table_list */
   247,  /* (142) create_table_list ::= create_from_stable */
   247,  /* (143) create_table_list ::= create_table_list create_from_stable */
   245,  /* (144) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */
   246,  /* (145) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */
   248,  /* (146) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */
   248,  /* (147) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */
   251,  /* (148) tagNamelist ::= tagNamelist COMMA ids */
   251,  /* (149) tagNamelist ::= ids */
   245,  /* (150) create_table_args ::= ifnotexists ids cpxName AS select */
   249,  /* (151) columnlist ::= columnlist COMMA column */
   249,  /* (152) columnlist ::= column */
   253,  /* (153) column ::= ids typename */
   250,  /* (154) tagitemlist ::= tagitemlist COMMA tagitem */
   250,  /* (155) tagitemlist ::= tagitem */
   254,  /* (156) tagitem ::= INTEGER */
   254,  /* (157) tagitem ::= FLOAT */
   254,  /* (158) tagitem ::= STRING */
   254,  /* (159) tagitem ::= BOOL */
   254,  /* (160) tagitem ::= NULL */
   254,  /* (161) tagitem ::= NOW */
   254,  /* (162) tagitem ::= MINUS INTEGER */
   254,  /* (163) tagitem ::= MINUS FLOAT */
   254,  /* (164) tagitem ::= PLUS INTEGER */
   254,  /* (165) tagitem ::= PLUS FLOAT */
   252,  /* (166) select ::= SELECT selcollist from where_opt range_option interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */
   252,  /* (167) select ::= LP select RP */
   269,  /* (168) union ::= select */
   269,  /* (169) union ::= union UNION ALL select */
   203,  /* (170) cmd ::= union */
   252,  /* (171) select ::= SELECT selcollist */
   270,  /* (172) sclp ::= selcollist COMMA */
   270,  /* (173) sclp ::= */
   255,  /* (174) selcollist ::= sclp distinct expr as */
   255,  /* (175) selcollist ::= sclp STAR */
   273,  /* (176) as ::= AS ids */
   273,  /* (177) as ::= ids */
   273,  /* (178) as ::= */
   271,  /* (179) distinct ::= DISTINCT */
   271,  /* (180) distinct ::= */
   256,  /* (181) from ::= FROM tablelist */
   256,  /* (182) from ::= FROM sub */
   275,  /* (183) sub ::= LP union RP */
   275,  /* (184) sub ::= LP union RP ids */
   275,  /* (185) sub ::= sub COMMA LP union RP ids */
   274,  /* (186) tablelist ::= ids cpxName */
   274,  /* (187) tablelist ::= ids cpxName ids */
   274,  /* (188) tablelist ::= tablelist COMMA ids cpxName */
   274,  /* (189) tablelist ::= tablelist COMMA ids cpxName ids */
   276,  /* (190) tmvar ::= VARIABLE */
   277,  /* (191) timestamp ::= INTEGER */
   277,  /* (192) timestamp ::= MINUS INTEGER */
   277,  /* (193) timestamp ::= PLUS INTEGER */
   277,  /* (194) timestamp ::= STRING */
   277,  /* (195) timestamp ::= NOW */
   277,  /* (196) timestamp ::= NOW PLUS VARIABLE */
   277,  /* (197) timestamp ::= NOW MINUS VARIABLE */
   258,  /* (198) range_option ::= */
   258,  /* (199) range_option ::= RANGE LP timestamp COMMA timestamp RP */
   259,  /* (200) interval_option ::= intervalKey LP tmvar RP */
   259,  /* (201) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */
   259,  /* (202) interval_option ::= */
   278,  /* (203) intervalKey ::= INTERVAL */
   278,  /* (204) intervalKey ::= EVERY */
   261,  /* (205) session_option ::= */
   261,  /* (206) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
   262,  /* (207) windowstate_option ::= */
   262,  /* (208) windowstate_option ::= STATE_WINDOW LP ids RP */
   263,  /* (209) fill_opt ::= */
   263,  /* (210) fill_opt ::= FILL LP ID COMMA tagitemlist RP */
   263,  /* (211) fill_opt ::= FILL LP ID RP */
   260,  /* (212) sliding_opt ::= SLIDING LP tmvar RP */
   260,  /* (213) sliding_opt ::= */
   266,  /* (214) orderby_opt ::= */
   266,  /* (215) orderby_opt ::= ORDER BY sortlist */
   279,  /* (216) sortlist ::= sortlist COMMA item sortorder */
   279,  /* (217) sortlist ::= sortlist COMMA arrow sortorder */
   279,  /* (218) sortlist ::= item sortorder */
   279,  /* (219) sortlist ::= arrow sortorder */
   280,  /* (220) item ::= ID */
   280,  /* (221) item ::= ID DOT ID */
   281,  /* (222) sortorder ::= ASC */
   281,  /* (223) sortorder ::= DESC */
   281,  /* (224) sortorder ::= */
   264,  /* (225) groupby_opt ::= */
   264,  /* (226) groupby_opt ::= GROUP BY grouplist */
   283,  /* (227) grouplist ::= grouplist COMMA item */
   283,  /* (228) grouplist ::= grouplist COMMA arrow */
   283,  /* (229) grouplist ::= item */
   283,  /* (230) grouplist ::= arrow */
   265,  /* (231) having_opt ::= */
   265,  /* (232) having_opt ::= HAVING expr */
   268,  /* (233) limit_opt ::= */
   268,  /* (234) limit_opt ::= LIMIT signed */
   268,  /* (235) limit_opt ::= LIMIT signed OFFSET signed */
   268,  /* (236) limit_opt ::= LIMIT signed COMMA signed */
   267,  /* (237) slimit_opt ::= */
   267,  /* (238) slimit_opt ::= SLIMIT signed */
   267,  /* (239) slimit_opt ::= SLIMIT signed SOFFSET signed */
   267,  /* (240) slimit_opt ::= SLIMIT signed COMMA signed */
   257,  /* (241) where_opt ::= */
   257,  /* (242) where_opt ::= WHERE expr */
   272,  /* (243) expr ::= LP expr RP */
   272,  /* (244) expr ::= ID */
   272,  /* (245) expr ::= ID DOT ID */
   272,  /* (246) expr ::= ID DOT STAR */
   272,  /* (247) expr ::= INTEGER */
   272,  /* (248) expr ::= MINUS INTEGER */
   272,  /* (249) expr ::= PLUS INTEGER */
   272,  /* (250) expr ::= FLOAT */
   272,  /* (251) expr ::= MINUS FLOAT */
   272,  /* (252) expr ::= PLUS FLOAT */
   272,  /* (253) expr ::= STRING */
   272,  /* (254) expr ::= NOW */
   272,  /* (255) expr ::= VARIABLE */
   272,  /* (256) expr ::= PLUS VARIABLE */
   272,  /* (257) expr ::= MINUS VARIABLE */
   272,  /* (258) expr ::= BOOL */
   272,  /* (259) expr ::= NULL */
   272,  /* (260) expr ::= ID LP exprlist RP */
   272,  /* (261) expr ::= ID LP STAR RP */
   272,  /* (262) expr ::= expr IS NULL */
   272,  /* (263) expr ::= expr IS NOT NULL */
   272,  /* (264) expr ::= expr LT expr */
   272,  /* (265) expr ::= expr GT expr */
   272,  /* (266) expr ::= expr LE expr */
   272,  /* (267) expr ::= expr GE expr */
   272,  /* (268) expr ::= expr NE expr */
   272,  /* (269) expr ::= expr EQ expr */
   272,  /* (270) expr ::= expr BETWEEN expr AND expr */
   272,  /* (271) expr ::= expr AND expr */
   272,  /* (272) expr ::= expr OR expr */
   272,  /* (273) expr ::= expr PLUS expr */
   272,  /* (274) expr ::= expr MINUS expr */
   272,  /* (275) expr ::= expr STAR expr */
   272,  /* (276) expr ::= expr SLASH expr */
   272,  /* (277) expr ::= expr REM expr */
   272,  /* (278) expr ::= expr LIKE expr */
   272,  /* (279) expr ::= expr MATCH expr */
   272,  /* (280) expr ::= expr NMATCH expr */
   272,  /* (281) expr ::= ID CONTAINS STRING */
   272,  /* (282) expr ::= ID DOT ID CONTAINS STRING */
   282,  /* (283) arrow ::= ID ARROW STRING */
   282,  /* (284) arrow ::= ID DOT ID ARROW STRING */
   272,  /* (285) expr ::= arrow */
   272,  /* (286) expr ::= expr IN LP exprlist RP */
   211,  /* (287) exprlist ::= exprlist COMMA expritem */
   211,  /* (288) exprlist ::= expritem */
   284,  /* (289) expritem ::= expr */
   284,  /* (290) expritem ::= */
   203,  /* (291) cmd ::= RESET QUERY CACHE */
   203,  /* (292) cmd ::= SYNCDB ids REPLICA */
   203,  /* (293) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
   203,  /* (294) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
   203,  /* (295) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
   203,  /* (296) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
   203,  /* (297) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
   203,  /* (298) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
   203,  /* (299) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
   203,  /* (300) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
   203,  /* (301) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
   203,  /* (302) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
   203,  /* (303) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
   203,  /* (304) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
   203,  /* (305) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
   203,  /* (306) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
   203,  /* (307) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
   203,  /* (308) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
   203,  /* (309) cmd ::= KILL CONNECTION INTEGER */
   203,  /* (310) cmd ::= KILL STREAM INTEGER COLON INTEGER */
   203,  /* (311) cmd ::= KILL QUERY INTEGER COLON INTEGER */
};

/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
** of symbols on the right-hand side of that rule. */
static const signed char yyRuleInfoNRhs[] = {
   -1,  /* (0) program ::= cmd */
   -2,  /* (1) cmd ::= SHOW DATABASES */
   -2,  /* (2) cmd ::= SHOW TOPICS */
   -2,  /* (3) cmd ::= SHOW FUNCTIONS */
   -2,  /* (4) cmd ::= SHOW MNODES */
   -2,  /* (5) cmd ::= SHOW DNODES */
   -2,  /* (6) cmd ::= SHOW ACCOUNTS */
   -2,  /* (7) cmd ::= SHOW USERS */
   -2,  /* (8) cmd ::= SHOW MODULES */
   -2,  /* (9) cmd ::= SHOW QUERIES */
   -2,  /* (10) cmd ::= SHOW CONNECTIONS */
   -2,  /* (11) cmd ::= SHOW STREAMS */
   -2,  /* (12) cmd ::= SHOW VARIABLES */
   -2,  /* (13) cmd ::= SHOW SCORES */
   -2,  /* (14) cmd ::= SHOW GRANTS */
   -2,  /* (15) cmd ::= SHOW VNODES */
   -3,  /* (16) cmd ::= SHOW VNODES ids */
    0,  /* (17) dbPrefix ::= */
   -2,  /* (18) dbPrefix ::= ids DOT */
    0,  /* (19) cpxName ::= */
   -2,  /* (20) cpxName ::= DOT ids */
   -5,  /* (21) cmd ::= SHOW CREATE TABLE ids cpxName */
   -5,  /* (22) cmd ::= SHOW CREATE STABLE ids cpxName */
   -4,  /* (23) cmd ::= SHOW CREATE DATABASE ids */
   -3,  /* (24) cmd ::= SHOW dbPrefix TABLES */
   -5,  /* (25) cmd ::= SHOW dbPrefix TABLES LIKE ids */
   -3,  /* (26) cmd ::= SHOW dbPrefix STABLES */
   -5,  /* (27) cmd ::= SHOW dbPrefix STABLES LIKE ids */
   -3,  /* (28) cmd ::= SHOW dbPrefix VGROUPS */
   -5,  /* (29) cmd ::= DROP TABLE ifexists ids cpxName */
   -5,  /* (30) cmd ::= DROP STABLE ifexists ids cpxName */
   -4,  /* (31) cmd ::= DROP DATABASE ifexists ids */
   -4,  /* (32) cmd ::= DROP TOPIC ifexists ids */
   -3,  /* (33) cmd ::= DROP FUNCTION ids */
   -3,  /* (34) cmd ::= DROP DNODE ids */
   -3,  /* (35) cmd ::= DROP USER ids */
   -3,  /* (36) cmd ::= DROP ACCOUNT ids */
   -2,  /* (37) cmd ::= USE ids */
   -3,  /* (38) cmd ::= DESCRIBE ids cpxName */
   -3,  /* (39) cmd ::= DESC ids cpxName */
   -5,  /* (40) cmd ::= ALTER USER ids PASS ids */
   -5,  /* (41) cmd ::= ALTER USER ids PRIVILEGE ids */
   -4,  /* (42) cmd ::= ALTER DNODE ids ids */
   -5,  /* (43) cmd ::= ALTER DNODE ids ids ids */
   -3,  /* (44) cmd ::= ALTER LOCAL ids */
   -4,  /* (45) cmd ::= ALTER LOCAL ids ids */
   -4,  /* (46) cmd ::= ALTER DATABASE ids alter_db_optr */
   -4,  /* (47) cmd ::= ALTER TOPIC ids alter_topic_optr */
   -4,  /* (48) cmd ::= ALTER ACCOUNT ids acct_optr */
   -6,  /* (49) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
   -6,  /* (50) cmd ::= COMPACT VNODES IN LP exprlist RP */
   -1,  /* (51) ids ::= ID */
   -1,  /* (52) ids ::= STRING */
   -2,  /* (53) ifexists ::= IF EXISTS */
    0,  /* (54) ifexists ::= */
   -3,  /* (55) ifnotexists ::= IF NOT EXISTS */
    0,  /* (56) ifnotexists ::= */
   -3,  /* (57) cmd ::= CREATE DNODE ids */
   -6,  /* (58) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
   -5,  /* (59) cmd ::= CREATE DATABASE ifnotexists ids db_optr */
   -5,  /* (60) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */
   -8,  /* (61) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */
   -9,  /* (62) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */
   -5,  /* (63) cmd ::= CREATE USER ids PASS ids */
    0,  /* (64) bufsize ::= */
   -2,  /* (65) bufsize ::= BUFSIZE INTEGER */
    0,  /* (66) pps ::= */
   -2,  /* (67) pps ::= PPS INTEGER */
    0,  /* (68) tseries ::= */
   -2,  /* (69) tseries ::= TSERIES INTEGER */
    0,  /* (70) dbs ::= */
   -2,  /* (71) dbs ::= DBS INTEGER */
    0,  /* (72) streams ::= */
   -2,  /* (73) streams ::= STREAMS INTEGER */
    0,  /* (74) storage ::= */
   -2,  /* (75) storage ::= STORAGE INTEGER */
    0,  /* (76) qtime ::= */
   -2,  /* (77) qtime ::= QTIME INTEGER */
    0,  /* (78) users ::= */
   -2,  /* (79) users ::= USERS INTEGER */
    0,  /* (80) conns ::= */
   -2,  /* (81) conns ::= CONNS INTEGER */
    0,  /* (82) state ::= */
   -2,  /* (83) state ::= STATE ids */
   -9,  /* (84) acct_optr ::= pps tseries storage streams qtime dbs users conns state */
   -3,  /* (85) intitemlist ::= intitemlist COMMA intitem */
   -1,  /* (86) intitemlist ::= intitem */
   -1,  /* (87) intitem ::= INTEGER */
   -2,  /* (88) keep ::= KEEP intitemlist */
   -2,  /* (89) cache ::= CACHE INTEGER */
   -2,  /* (90) replica ::= REPLICA INTEGER */
   -2,  /* (91) quorum ::= QUORUM INTEGER */
   -2,  /* (92) days ::= DAYS INTEGER */
   -2,  /* (93) minrows ::= MINROWS INTEGER */
   -2,  /* (94) maxrows ::= MAXROWS INTEGER */
   -2,  /* (95) blocks ::= BLOCKS INTEGER */
   -2,  /* (96) ctime ::= CTIME INTEGER */
   -2,  /* (97) wal ::= WAL INTEGER */
   -2,  /* (98) fsync ::= FSYNC INTEGER */
   -2,  /* (99) comp ::= COMP INTEGER */
   -2,  /* (100) prec ::= PRECISION STRING */
   -2,  /* (101) update ::= UPDATE INTEGER */
   -2,  /* (102) cachelast ::= CACHELAST INTEGER */
   -2,  /* (103) partitions ::= PARTITIONS INTEGER */
    0,  /* (104) db_optr ::= */
   -2,  /* (105) db_optr ::= db_optr cache */
   -2,  /* (106) db_optr ::= db_optr replica */
   -2,  /* (107) db_optr ::= db_optr quorum */
   -2,  /* (108) db_optr ::= db_optr days */
   -2,  /* (109) db_optr ::= db_optr minrows */
   -2,  /* (110) db_optr ::= db_optr maxrows */
   -2,  /* (111) db_optr ::= db_optr blocks */
   -2,  /* (112) db_optr ::= db_optr ctime */
   -2,  /* (113) db_optr ::= db_optr wal */
   -2,  /* (114) db_optr ::= db_optr fsync */
   -2,  /* (115) db_optr ::= db_optr comp */
   -2,  /* (116) db_optr ::= db_optr prec */
   -2,  /* (117) db_optr ::= db_optr keep */
   -2,  /* (118) db_optr ::= db_optr update */
   -2,  /* (119) db_optr ::= db_optr cachelast */
   -1,  /* (120) topic_optr ::= db_optr */
   -2,  /* (121) topic_optr ::= topic_optr partitions */
    0,  /* (122) alter_db_optr ::= */
   -2,  /* (123) alter_db_optr ::= alter_db_optr replica */
   -2,  /* (124) alter_db_optr ::= alter_db_optr quorum */
   -2,  /* (125) alter_db_optr ::= alter_db_optr keep */
   -2,  /* (126) alter_db_optr ::= alter_db_optr blocks */
   -2,  /* (127) alter_db_optr ::= alter_db_optr comp */
   -2,  /* (128) alter_db_optr ::= alter_db_optr update */
   -2,  /* (129) alter_db_optr ::= alter_db_optr cachelast */
   -1,  /* (130) alter_topic_optr ::= alter_db_optr */
   -2,  /* (131) alter_topic_optr ::= alter_topic_optr partitions */
   -1,  /* (132) typename ::= ids */
   -4,  /* (133) typename ::= ids LP signed RP */
   -2,  /* (134) typename ::= ids UNSIGNED */
   -1,  /* (135) signed ::= INTEGER */
   -2,  /* (136) signed ::= PLUS INTEGER */
   -2,  /* (137) signed ::= MINUS INTEGER */
   -3,  /* (138) cmd ::= CREATE TABLE create_table_args */
   -3,  /* (139) cmd ::= CREATE TABLE create_stable_args */
   -3,  /* (140) cmd ::= CREATE STABLE create_stable_args */
   -3,  /* (141) cmd ::= CREATE TABLE create_table_list */
   -1,  /* (142) create_table_list ::= create_from_stable */
   -2,  /* (143) create_table_list ::= create_table_list create_from_stable */
   -6,  /* (144) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */
  -10,  /* (145) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */
  -10,  /* (146) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */
  -13,  /* (147) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */
   -3,  /* (148) tagNamelist ::= tagNamelist COMMA ids */
   -1,  /* (149) tagNamelist ::= ids */
   -5,  /* (150) create_table_args ::= ifnotexists ids cpxName AS select */
   -3,  /* (151) columnlist ::= columnlist COMMA column */
   -1,  /* (152) columnlist ::= column */
   -2,  /* (153) column ::= ids typename */
   -3,  /* (154) tagitemlist ::= tagitemlist COMMA tagitem */
   -1,  /* (155) tagitemlist ::= tagitem */
   -1,  /* (156) tagitem ::= INTEGER */
   -1,  /* (157) tagitem ::= FLOAT */
   -1,  /* (158) tagitem ::= STRING */
   -1,  /* (159) tagitem ::= BOOL */
   -1,  /* (160) tagitem ::= NULL */
   -1,  /* (161) tagitem ::= NOW */
   -2,  /* (162) tagitem ::= MINUS INTEGER */
   -2,  /* (163) tagitem ::= MINUS FLOAT */
   -2,  /* (164) tagitem ::= PLUS INTEGER */
   -2,  /* (165) tagitem ::= PLUS FLOAT */
  -15,  /* (166) select ::= SELECT selcollist from where_opt range_option interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */
   -3,  /* (167) select ::= LP select RP */
   -1,  /* (168) union ::= select */
   -4,  /* (169) union ::= union UNION ALL select */
   -1,  /* (170) cmd ::= union */
   -2,  /* (171) select ::= SELECT selcollist */
   -2,  /* (172) sclp ::= selcollist COMMA */
    0,  /* (173) sclp ::= */
   -4,  /* (174) selcollist ::= sclp distinct expr as */
   -2,  /* (175) selcollist ::= sclp STAR */
   -2,  /* (176) as ::= AS ids */
   -1,  /* (177) as ::= ids */
    0,  /* (178) as ::= */
   -1,  /* (179) distinct ::= DISTINCT */
    0,  /* (180) distinct ::= */
   -2,  /* (181) from ::= FROM tablelist */
   -2,  /* (182) from ::= FROM sub */
   -3,  /* (183) sub ::= LP union RP */
   -4,  /* (184) sub ::= LP union RP ids */
   -6,  /* (185) sub ::= sub COMMA LP union RP ids */
   -2,  /* (186) tablelist ::= ids cpxName */
   -3,  /* (187) tablelist ::= ids cpxName ids */
   -4,  /* (188) tablelist ::= tablelist COMMA ids cpxName */
   -5,  /* (189) tablelist ::= tablelist COMMA ids cpxName ids */
   -1,  /* (190) tmvar ::= VARIABLE */
   -1,  /* (191) timestamp ::= INTEGER */
   -2,  /* (192) timestamp ::= MINUS INTEGER */
   -2,  /* (193) timestamp ::= PLUS INTEGER */
   -1,  /* (194) timestamp ::= STRING */
   -1,  /* (195) timestamp ::= NOW */
   -3,  /* (196) timestamp ::= NOW PLUS VARIABLE */
   -3,  /* (197) timestamp ::= NOW MINUS VARIABLE */
    0,  /* (198) range_option ::= */
   -6,  /* (199) range_option ::= RANGE LP timestamp COMMA timestamp RP */
   -4,  /* (200) interval_option ::= intervalKey LP tmvar RP */
   -6,  /* (201) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */
    0,  /* (202) interval_option ::= */
   -1,  /* (203) intervalKey ::= INTERVAL */
   -1,  /* (204) intervalKey ::= EVERY */
    0,  /* (205) session_option ::= */
   -7,  /* (206) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
    0,  /* (207) windowstate_option ::= */
   -4,  /* (208) windowstate_option ::= STATE_WINDOW LP ids RP */
    0,  /* (209) fill_opt ::= */
   -6,  /* (210) fill_opt ::= FILL LP ID COMMA tagitemlist RP */
   -4,  /* (211) fill_opt ::= FILL LP ID RP */
   -4,  /* (212) sliding_opt ::= SLIDING LP tmvar RP */
    0,  /* (213) sliding_opt ::= */
    0,  /* (214) orderby_opt ::= */
   -3,  /* (215) orderby_opt ::= ORDER BY sortlist */
   -4,  /* (216) sortlist ::= sortlist COMMA item sortorder */
   -4,  /* (217) sortlist ::= sortlist COMMA arrow sortorder */
   -2,  /* (218) sortlist ::= item sortorder */
   -2,  /* (219) sortlist ::= arrow sortorder */
   -1,  /* (220) item ::= ID */
   -3,  /* (221) item ::= ID DOT ID */
   -1,  /* (222) sortorder ::= ASC */
   -1,  /* (223) sortorder ::= DESC */
    0,  /* (224) sortorder ::= */
    0,  /* (225) groupby_opt ::= */
   -3,  /* (226) groupby_opt ::= GROUP BY grouplist */
   -3,  /* (227) grouplist ::= grouplist COMMA item */
   -3,  /* (228) grouplist ::= grouplist COMMA arrow */
   -1,  /* (229) grouplist ::= item */
   -1,  /* (230) grouplist ::= arrow */
    0,  /* (231) having_opt ::= */
   -2,  /* (232) having_opt ::= HAVING expr */
    0,  /* (233) limit_opt ::= */
   -2,  /* (234) limit_opt ::= LIMIT signed */
   -4,  /* (235) limit_opt ::= LIMIT signed OFFSET signed */
   -4,  /* (236) limit_opt ::= LIMIT signed COMMA signed */
    0,  /* (237) slimit_opt ::= */
   -2,  /* (238) slimit_opt ::= SLIMIT signed */
   -4,  /* (239) slimit_opt ::= SLIMIT signed SOFFSET signed */
   -4,  /* (240) slimit_opt ::= SLIMIT signed COMMA signed */
    0,  /* (241) where_opt ::= */
   -2,  /* (242) where_opt ::= WHERE expr */
   -3,  /* (243) expr ::= LP expr RP */
   -1,  /* (244) expr ::= ID */
   -3,  /* (245) expr ::= ID DOT ID */
   -3,  /* (246) expr ::= ID DOT STAR */
   -1,  /* (247) expr ::= INTEGER */
   -2,  /* (248) expr ::= MINUS INTEGER */
   -2,  /* (249) expr ::= PLUS INTEGER */
   -1,  /* (250) expr ::= FLOAT */
   -2,  /* (251) expr ::= MINUS FLOAT */
   -2,  /* (252) expr ::= PLUS FLOAT */
   -1,  /* (253) expr ::= STRING */
   -1,  /* (254) expr ::= NOW */
   -1,  /* (255) expr ::= VARIABLE */
   -2,  /* (256) expr ::= PLUS VARIABLE */
   -2,  /* (257) expr ::= MINUS VARIABLE */
   -1,  /* (258) expr ::= BOOL */
   -1,  /* (259) expr ::= NULL */
   -4,  /* (260) expr ::= ID LP exprlist RP */
   -4,  /* (261) expr ::= ID LP STAR RP */
   -3,  /* (262) expr ::= expr IS NULL */
   -4,  /* (263) expr ::= expr IS NOT NULL */
   -3,  /* (264) expr ::= expr LT expr */
   -3,  /* (265) expr ::= expr GT expr */
   -3,  /* (266) expr ::= expr LE expr */
   -3,  /* (267) expr ::= expr GE expr */
   -3,  /* (268) expr ::= expr NE expr */
   -3,  /* (269) expr ::= expr EQ expr */
   -5,  /* (270) expr ::= expr BETWEEN expr AND expr */
   -3,  /* (271) expr ::= expr AND expr */
   -3,  /* (272) expr ::= expr OR expr */
   -3,  /* (273) expr ::= expr PLUS expr */
   -3,  /* (274) expr ::= expr MINUS expr */
   -3,  /* (275) expr ::= expr STAR expr */
   -3,  /* (276) expr ::= expr SLASH expr */
   -3,  /* (277) expr ::= expr REM expr */
   -3,  /* (278) expr ::= expr LIKE expr */
   -3,  /* (279) expr ::= expr MATCH expr */
   -3,  /* (280) expr ::= expr NMATCH expr */
   -3,  /* (281) expr ::= ID CONTAINS STRING */
   -5,  /* (282) expr ::= ID DOT ID CONTAINS STRING */
   -3,  /* (283) arrow ::= ID ARROW STRING */
   -5,  /* (284) arrow ::= ID DOT ID ARROW STRING */
   -1,  /* (285) expr ::= arrow */
   -5,  /* (286) expr ::= expr IN LP exprlist RP */
   -3,  /* (287) exprlist ::= exprlist COMMA expritem */
   -1,  /* (288) exprlist ::= expritem */
   -1,  /* (289) expritem ::= expr */
    0,  /* (290) expritem ::= */
   -3,  /* (291) cmd ::= RESET QUERY CACHE */
   -3,  /* (292) cmd ::= SYNCDB ids REPLICA */
   -7,  /* (293) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
   -7,  /* (294) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
   -7,  /* (295) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
   -7,  /* (296) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
   -7,  /* (297) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
   -8,  /* (298) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
   -9,  /* (299) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
   -7,  /* (300) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
   -7,  /* (301) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
   -7,  /* (302) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
   -7,  /* (303) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
   -7,  /* (304) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
   -7,  /* (305) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
   -8,  /* (306) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
   -9,  /* (307) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
   -7,  /* (308) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
   -3,  /* (309) cmd ::= KILL CONNECTION INTEGER */
   -5,  /* (310) cmd ::= KILL STREAM INTEGER COLON INTEGER */
   -5,  /* (311) cmd ::= KILL QUERY INTEGER COLON INTEGER */
};

static void yy_accept(yyParser*);  /* Forward Declaration */

/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
**
** The yyLookahead and yyLookaheadToken parameters provide reduce actions
** access to the lookahead token (if any).  The yyLookahead will be YYNOCODE
** if the lookahead token has already been consumed.  As this procedure is
** only called from one place, optimizing compilers will in-line it, which
** means that the extra parameters have no performance impact.
*/
static YYACTIONTYPE yy_reduce(
  yyParser *yypParser,         /* The parser */
  unsigned int yyruleno,       /* Number of the rule by which to reduce */
  int yyLookahead,             /* Lookahead token, or YYNOCODE if none */
  ParseTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */
  ParseCTX_PDECL                   /* %extra_context */
){
  int yygoto;                     /* The next state */
  YYACTIONTYPE yyact;             /* The next action */
  yyStackEntry *yymsp;            /* The top of the parser's stack */
  int yysize;                     /* Amount to pop the stack */
  ParseARG_FETCH
  (void)yyLookahead;
  (void)yyLookaheadToken;
  yymsp = yypParser->yytos;

  switch( yyruleno ){
  /* Beginning here are the reduction cases.  A typical example
  ** follows:
  **   case 0:
  **  #line <lineno> <grammarfile>
  **     { ... }           // User supplied code
  **  #line <lineno> <thisfile>
  **     break;
  */
/********** Begin reduce actions **********************************************/
        YYMINORTYPE yylhsminor;
      case 0: /* program ::= cmd */
      case 138: /* cmd ::= CREATE TABLE create_table_args */ yytestcase(yyruleno==138);
      case 139: /* cmd ::= CREATE TABLE create_stable_args */ yytestcase(yyruleno==139);
      case 140: /* cmd ::= CREATE STABLE create_stable_args */ yytestcase(yyruleno==140);
{}
        break;
      case 1: /* cmd ::= SHOW DATABASES */
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_DB, 0, 0);}
        break;
      case 2: /* cmd ::= SHOW TOPICS */
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_TP, 0, 0);}
        break;
      case 3: /* cmd ::= SHOW FUNCTIONS */
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_FUNCTION, 0, 0);}
        break;
      case 4: /* cmd ::= SHOW MNODES */
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_MNODE, 0, 0);}
        break;
      case 5: /* cmd ::= SHOW DNODES */
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_DNODE, 0, 0);}
        break;
      case 6: /* cmd ::= SHOW ACCOUNTS */
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_ACCT, 0, 0);}
        break;
      case 7: /* cmd ::= SHOW USERS */
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_USER, 0, 0);}
        break;
      case 8: /* cmd ::= SHOW MODULES */
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_MODULE, 0, 0);  }
        break;
      case 9: /* cmd ::= SHOW QUERIES */
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_QUERIES, 0, 0);  }
        break;
      case 10: /* cmd ::= SHOW CONNECTIONS */
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_CONNS, 0, 0);}
        break;
      case 11: /* cmd ::= SHOW STREAMS */
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_STREAMS, 0, 0);  }
        break;
      case 12: /* cmd ::= SHOW VARIABLES */
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_VARIABLES, 0, 0);  }
        break;
      case 13: /* cmd ::= SHOW SCORES */
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_SCORES, 0, 0);   }
        break;
      case 14: /* cmd ::= SHOW GRANTS */
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_GRANTS, 0, 0);   }
        break;
      case 15: /* cmd ::= SHOW VNODES */
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_VNODES, 0, 0); }
        break;
      case 16: /* cmd ::= SHOW VNODES ids */
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_VNODES, &yymsp[0].minor.yy0, 0); }
        break;
      case 17: /* dbPrefix ::= */
{yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.type = 0;}
        break;
      case 18: /* dbPrefix ::= ids DOT */
{yylhsminor.yy0 = yymsp[-1].minor.yy0;  }
  yymsp[-1].minor.yy0 = yylhsminor.yy0;
        break;
      case 19: /* cpxName ::= */
{yymsp[1].minor.yy0.n = 0;  }
        break;
      case 20: /* cpxName ::= DOT ids */
{yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n += 1;    }
        break;
      case 21: /* cmd ::= SHOW CREATE TABLE ids cpxName */
{
   yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
   setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_TABLE, 1, &yymsp[-1].minor.yy0);
}
        break;
      case 22: /* cmd ::= SHOW CREATE STABLE ids cpxName */
{
   yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
   setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_STABLE, 1, &yymsp[-1].minor.yy0);
}
        break;
      case 23: /* cmd ::= SHOW CREATE DATABASE ids */
{
  setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_DATABASE, 1, &yymsp[0].minor.yy0);
}
        break;
      case 24: /* cmd ::= SHOW dbPrefix TABLES */
{
    setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &yymsp[-1].minor.yy0, 0);
}
        break;
      case 25: /* cmd ::= SHOW dbPrefix TABLES LIKE ids */
{
    setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0);
}
        break;
      case 26: /* cmd ::= SHOW dbPrefix STABLES */
{
    setShowOptions(pInfo, TSDB_MGMT_TABLE_METRIC, &yymsp[-1].minor.yy0, 0);
}
        break;
      case 27: /* cmd ::= SHOW dbPrefix STABLES LIKE ids */
{
    SStrToken token;
    tSetDbName(&token, &yymsp[-3].minor.yy0);
    setShowOptions(pInfo, TSDB_MGMT_TABLE_METRIC, &token, &yymsp[0].minor.yy0);
}
        break;
      case 28: /* cmd ::= SHOW dbPrefix VGROUPS */
{
    SStrToken token;
    tSetDbName(&token, &yymsp[-1].minor.yy0);
    setShowOptions(pInfo, TSDB_MGMT_TABLE_VGROUP, &token, 0);
}
        break;
      case 29: /* cmd ::= DROP TABLE ifexists ids cpxName */
{
    yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
    setDropDbTableInfo(pInfo, TSDB_SQL_DROP_TABLE, &yymsp[-1].minor.yy0, &yymsp[-2].minor.yy0, -1, -1);
}
        break;
      case 30: /* cmd ::= DROP STABLE ifexists ids cpxName */
{
    yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
    setDropDbTableInfo(pInfo, TSDB_SQL_DROP_TABLE, &yymsp[-1].minor.yy0, &yymsp[-2].minor.yy0, -1, TSDB_SUPER_TABLE);
}
        break;
      case 31: /* cmd ::= DROP DATABASE ifexists ids */
{ setDropDbTableInfo(pInfo, TSDB_SQL_DROP_DB, &yymsp[0].minor.yy0, &yymsp[-1].minor.yy0, TSDB_DB_TYPE_DEFAULT, -1); }
        break;
      case 32: /* cmd ::= DROP TOPIC ifexists ids */
{ setDropDbTableInfo(pInfo, TSDB_SQL_DROP_DB, &yymsp[0].minor.yy0, &yymsp[-1].minor.yy0, TSDB_DB_TYPE_TOPIC, -1); }
        break;
      case 33: /* cmd ::= DROP FUNCTION ids */
{ setDropFuncInfo(pInfo, TSDB_SQL_DROP_FUNCTION, &yymsp[0].minor.yy0); }
        break;
      case 34: /* cmd ::= DROP DNODE ids */
{ setDCLSqlElems(pInfo, TSDB_SQL_DROP_DNODE, 1, &yymsp[0].minor.yy0);    }
        break;
      case 35: /* cmd ::= DROP USER ids */
{ setDCLSqlElems(pInfo, TSDB_SQL_DROP_USER, 1, &yymsp[0].minor.yy0);     }
        break;
      case 36: /* cmd ::= DROP ACCOUNT ids */
{ setDCLSqlElems(pInfo, TSDB_SQL_DROP_ACCT, 1, &yymsp[0].minor.yy0);  }
        break;
      case 37: /* cmd ::= USE ids */
{ setDCLSqlElems(pInfo, TSDB_SQL_USE_DB, 1, &yymsp[0].minor.yy0);}
        break;
      case 38: /* cmd ::= DESCRIBE ids cpxName */
      case 39: /* cmd ::= DESC ids cpxName */ yytestcase(yyruleno==39);
{
    yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
    setDCLSqlElems(pInfo, TSDB_SQL_DESCRIBE_TABLE, 1, &yymsp[-1].minor.yy0);
}
        break;
      case 40: /* cmd ::= ALTER USER ids PASS ids */
{ setAlterUserSql(pInfo, TSDB_ALTER_USER_PASSWD, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, NULL);    }
        break;
      case 41: /* cmd ::= ALTER USER ids PRIVILEGE ids */
{ setAlterUserSql(pInfo, TSDB_ALTER_USER_PRIVILEGES, &yymsp[-2].minor.yy0, NULL, &yymsp[0].minor.yy0);}
        break;
      case 42: /* cmd ::= ALTER DNODE ids ids */
{ setDCLSqlElems(pInfo, TSDB_SQL_CFG_DNODE, 2, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);          }
        break;
      case 43: /* cmd ::= ALTER DNODE ids ids ids */
{ setDCLSqlElems(pInfo, TSDB_SQL_CFG_DNODE, 3, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);      }
        break;
      case 44: /* cmd ::= ALTER LOCAL ids */
{ setDCLSqlElems(pInfo, TSDB_SQL_CFG_LOCAL, 1, &yymsp[0].minor.yy0);              }
        break;
      case 45: /* cmd ::= ALTER LOCAL ids ids */
{ setDCLSqlElems(pInfo, TSDB_SQL_CFG_LOCAL, 2, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);          }
        break;
      case 46: /* cmd ::= ALTER DATABASE ids alter_db_optr */
      case 47: /* cmd ::= ALTER TOPIC ids alter_topic_optr */ yytestcase(yyruleno==47);
{ SStrToken t = {0};  setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy532, &t);}
        break;
      case 48: /* cmd ::= ALTER ACCOUNT ids acct_optr */
{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy31);}
        break;
      case 49: /* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy31);}
        break;
      case 50: /* cmd ::= COMPACT VNODES IN LP exprlist RP */
{ setCompactVnodeSql(pInfo, TSDB_SQL_COMPACT_VNODE, yymsp[-1].minor.yy231);}
        break;
      case 51: /* ids ::= ID */
      case 52: /* ids ::= STRING */ yytestcase(yyruleno==52);
{yylhsminor.yy0 = yymsp[0].minor.yy0; }
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 53: /* ifexists ::= IF EXISTS */
{ yymsp[-1].minor.yy0.n = 1;}
        break;
      case 54: /* ifexists ::= */
      case 56: /* ifnotexists ::= */ yytestcase(yyruleno==56);
      case 180: /* distinct ::= */ yytestcase(yyruleno==180);
{ yymsp[1].minor.yy0.n = 0;}
        break;
      case 55: /* ifnotexists ::= IF NOT EXISTS */
{ yymsp[-2].minor.yy0.n = 1;}
        break;
      case 57: /* cmd ::= CREATE DNODE ids */
{ setDCLSqlElems(pInfo, TSDB_SQL_CREATE_DNODE, 1, &yymsp[0].minor.yy0);}
        break;
      case 58: /* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
{ setCreateAcctSql(pInfo, TSDB_SQL_CREATE_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy31);}
        break;
      case 59: /* cmd ::= CREATE DATABASE ifnotexists ids db_optr */
      case 60: /* cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ yytestcase(yyruleno==60);
{ setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy532, &yymsp[-2].minor.yy0);}
        break;
      case 61: /* cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */
{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy103, &yymsp[0].minor.yy0, 1);}
        break;
      case 62: /* cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */
{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy103, &yymsp[0].minor.yy0, 2);}
        break;
      case 63: /* cmd ::= CREATE USER ids PASS ids */
{ setCreateUserSql(pInfo, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);}
        break;
      case 64: /* bufsize ::= */
      case 66: /* pps ::= */ yytestcase(yyruleno==66);
      case 68: /* tseries ::= */ yytestcase(yyruleno==68);
      case 70: /* dbs ::= */ yytestcase(yyruleno==70);
      case 72: /* streams ::= */ yytestcase(yyruleno==72);
      case 74: /* storage ::= */ yytestcase(yyruleno==74);
      case 76: /* qtime ::= */ yytestcase(yyruleno==76);
      case 78: /* users ::= */ yytestcase(yyruleno==78);
      case 80: /* conns ::= */ yytestcase(yyruleno==80);
      case 82: /* state ::= */ yytestcase(yyruleno==82);
{ yymsp[1].minor.yy0.n = 0;   }
        break;
      case 65: /* bufsize ::= BUFSIZE INTEGER */
      case 67: /* pps ::= PPS INTEGER */ yytestcase(yyruleno==67);
      case 69: /* tseries ::= TSERIES INTEGER */ yytestcase(yyruleno==69);
      case 71: /* dbs ::= DBS INTEGER */ yytestcase(yyruleno==71);
      case 73: /* streams ::= STREAMS INTEGER */ yytestcase(yyruleno==73);
      case 75: /* storage ::= STORAGE INTEGER */ yytestcase(yyruleno==75);
      case 77: /* qtime ::= QTIME INTEGER */ yytestcase(yyruleno==77);
      case 79: /* users ::= USERS INTEGER */ yytestcase(yyruleno==79);
      case 81: /* conns ::= CONNS INTEGER */ yytestcase(yyruleno==81);
      case 83: /* state ::= STATE ids */ yytestcase(yyruleno==83);
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;     }
        break;
      case 84: /* acct_optr ::= pps tseries storage streams qtime dbs users conns state */
{
    yylhsminor.yy31.maxUsers   = (yymsp[-2].minor.yy0.n>0)?atoi(yymsp[-2].minor.yy0.z):-1;
    yylhsminor.yy31.maxDbs     = (yymsp[-3].minor.yy0.n>0)?atoi(yymsp[-3].minor.yy0.z):-1;
    yylhsminor.yy31.maxTimeSeries = (yymsp[-7].minor.yy0.n>0)?atoi(yymsp[-7].minor.yy0.z):-1;
    yylhsminor.yy31.maxStreams = (yymsp[-5].minor.yy0.n>0)?atoi(yymsp[-5].minor.yy0.z):-1;
    yylhsminor.yy31.maxPointsPerSecond     = (yymsp[-8].minor.yy0.n>0)?atoi(yymsp[-8].minor.yy0.z):-1;
    yylhsminor.yy31.maxStorage = (yymsp[-6].minor.yy0.n>0)?strtoll(yymsp[-6].minor.yy0.z, NULL, 10):-1;
    yylhsminor.yy31.maxQueryTime   = (yymsp[-4].minor.yy0.n>0)?strtoll(yymsp[-4].minor.yy0.z, NULL, 10):-1;
    yylhsminor.yy31.maxConnections   = (yymsp[-1].minor.yy0.n>0)?atoi(yymsp[-1].minor.yy0.z):-1;
    yylhsminor.yy31.stat    = yymsp[0].minor.yy0;
}
  yymsp[-8].minor.yy31 = yylhsminor.yy31;
        break;
      case 85: /* intitemlist ::= intitemlist COMMA intitem */
      case 154: /* tagitemlist ::= tagitemlist COMMA tagitem */ yytestcase(yyruleno==154);
{ yylhsminor.yy231 = tVariantListAppend(yymsp[-2].minor.yy231, &yymsp[0].minor.yy176, -1);    }
  yymsp[-2].minor.yy231 = yylhsminor.yy231;
        break;
      case 86: /* intitemlist ::= intitem */
      case 155: /* tagitemlist ::= tagitem */ yytestcase(yyruleno==155);
{ yylhsminor.yy231 = tVariantListAppend(NULL, &yymsp[0].minor.yy176, -1); }
  yymsp[0].minor.yy231 = yylhsminor.yy231;
        break;
      case 87: /* intitem ::= INTEGER */
      case 156: /* tagitem ::= INTEGER */ yytestcase(yyruleno==156);
      case 157: /* tagitem ::= FLOAT */ yytestcase(yyruleno==157);
      case 158: /* tagitem ::= STRING */ yytestcase(yyruleno==158);
      case 159: /* tagitem ::= BOOL */ yytestcase(yyruleno==159);
{ toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy176, &yymsp[0].minor.yy0, true); }
  yymsp[0].minor.yy176 = yylhsminor.yy176;
        break;
      case 88: /* keep ::= KEEP intitemlist */
{ yymsp[-1].minor.yy231 = yymsp[0].minor.yy231; }
        break;
      case 89: /* cache ::= CACHE INTEGER */
      case 90: /* replica ::= REPLICA INTEGER */ yytestcase(yyruleno==90);
      case 91: /* quorum ::= QUORUM INTEGER */ yytestcase(yyruleno==91);
      case 92: /* days ::= DAYS INTEGER */ yytestcase(yyruleno==92);
      case 93: /* minrows ::= MINROWS INTEGER */ yytestcase(yyruleno==93);
      case 94: /* maxrows ::= MAXROWS INTEGER */ yytestcase(yyruleno==94);
      case 95: /* blocks ::= BLOCKS INTEGER */ yytestcase(yyruleno==95);
      case 96: /* ctime ::= CTIME INTEGER */ yytestcase(yyruleno==96);
      case 97: /* wal ::= WAL INTEGER */ yytestcase(yyruleno==97);
      case 98: /* fsync ::= FSYNC INTEGER */ yytestcase(yyruleno==98);
      case 99: /* comp ::= COMP INTEGER */ yytestcase(yyruleno==99);
      case 100: /* prec ::= PRECISION STRING */ yytestcase(yyruleno==100);
      case 101: /* update ::= UPDATE INTEGER */ yytestcase(yyruleno==101);
      case 102: /* cachelast ::= CACHELAST INTEGER */ yytestcase(yyruleno==102);
      case 103: /* partitions ::= PARTITIONS INTEGER */ yytestcase(yyruleno==103);
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
        break;
      case 104: /* db_optr ::= */
{setDefaultCreateDbOption(&yymsp[1].minor.yy532); yymsp[1].minor.yy532.dbType = TSDB_DB_TYPE_DEFAULT;}
        break;
      case 105: /* db_optr ::= db_optr cache */
{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
  yymsp[-1].minor.yy532 = yylhsminor.yy532;
        break;
      case 106: /* db_optr ::= db_optr replica */
      case 123: /* alter_db_optr ::= alter_db_optr replica */ yytestcase(yyruleno==123);
{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
  yymsp[-1].minor.yy532 = yylhsminor.yy532;
        break;
      case 107: /* db_optr ::= db_optr quorum */
      case 124: /* alter_db_optr ::= alter_db_optr quorum */ yytestcase(yyruleno==124);
{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.quorum = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
  yymsp[-1].minor.yy532 = yylhsminor.yy532;
        break;
      case 108: /* db_optr ::= db_optr days */
{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
  yymsp[-1].minor.yy532 = yylhsminor.yy532;
        break;
      case 109: /* db_optr ::= db_optr minrows */
{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.minRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); }
  yymsp[-1].minor.yy532 = yylhsminor.yy532;
        break;
      case 110: /* db_optr ::= db_optr maxrows */
{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.maxRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); }
  yymsp[-1].minor.yy532 = yylhsminor.yy532;
        break;
      case 111: /* db_optr ::= db_optr blocks */
      case 126: /* alter_db_optr ::= alter_db_optr blocks */ yytestcase(yyruleno==126);
{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.numOfBlocks = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
  yymsp[-1].minor.yy532 = yylhsminor.yy532;
        break;
      case 112: /* db_optr ::= db_optr ctime */
{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
  yymsp[-1].minor.yy532 = yylhsminor.yy532;
        break;
      case 113: /* db_optr ::= db_optr wal */
{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.walLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
  yymsp[-1].minor.yy532 = yylhsminor.yy532;
        break;
      case 114: /* db_optr ::= db_optr fsync */
{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.fsyncPeriod = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
  yymsp[-1].minor.yy532 = yylhsminor.yy532;
        break;
      case 115: /* db_optr ::= db_optr comp */
      case 127: /* alter_db_optr ::= alter_db_optr comp */ yytestcase(yyruleno==127);
{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
  yymsp[-1].minor.yy532 = yylhsminor.yy532;
        break;
      case 116: /* db_optr ::= db_optr prec */
{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.precision = yymsp[0].minor.yy0; }
  yymsp[-1].minor.yy532 = yylhsminor.yy532;
        break;
      case 117: /* db_optr ::= db_optr keep */
      case 125: /* alter_db_optr ::= alter_db_optr keep */ yytestcase(yyruleno==125);
{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.keep = yymsp[0].minor.yy231; }
  yymsp[-1].minor.yy532 = yylhsminor.yy532;
        break;
      case 118: /* db_optr ::= db_optr update */
      case 128: /* alter_db_optr ::= alter_db_optr update */ yytestcase(yyruleno==128);
{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.update = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
  yymsp[-1].minor.yy532 = yylhsminor.yy532;
        break;
      case 119: /* db_optr ::= db_optr cachelast */
      case 129: /* alter_db_optr ::= alter_db_optr cachelast */ yytestcase(yyruleno==129);
{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.cachelast = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
  yymsp[-1].minor.yy532 = yylhsminor.yy532;
        break;
      case 120: /* topic_optr ::= db_optr */
      case 130: /* alter_topic_optr ::= alter_db_optr */ yytestcase(yyruleno==130);
{ yylhsminor.yy532 = yymsp[0].minor.yy532; yylhsminor.yy532.dbType = TSDB_DB_TYPE_TOPIC; }
  yymsp[0].minor.yy532 = yylhsminor.yy532;
        break;
      case 121: /* topic_optr ::= topic_optr partitions */
      case 131: /* alter_topic_optr ::= alter_topic_optr partitions */ yytestcase(yyruleno==131);
{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.partitions = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
  yymsp[-1].minor.yy532 = yylhsminor.yy532;
        break;
      case 122: /* alter_db_optr ::= */
{ setDefaultCreateDbOption(&yymsp[1].minor.yy532); yymsp[1].minor.yy532.dbType = TSDB_DB_TYPE_DEFAULT;}
        break;
      case 132: /* typename ::= ids */
{
  yymsp[0].minor.yy0.type = 0;
  tSetColumnType (&yylhsminor.yy103, &yymsp[0].minor.yy0);
}
  yymsp[0].minor.yy103 = yylhsminor.yy103;
        break;
      case 133: /* typename ::= ids LP signed RP */
{
  if (yymsp[-1].minor.yy549 <= 0) {
    yymsp[-3].minor.yy0.type = 0;
    tSetColumnType(&yylhsminor.yy103, &yymsp[-3].minor.yy0);
  } else {
    yymsp[-3].minor.yy0.type = -yymsp[-1].minor.yy549;  // negative value of name length
    tSetColumnType(&yylhsminor.yy103, &yymsp[-3].minor.yy0);
  }
}
  yymsp[-3].minor.yy103 = yylhsminor.yy103;
        break;
      case 134: /* typename ::= ids UNSIGNED */
{
  yymsp[-1].minor.yy0.type = 0;
  yymsp[-1].minor.yy0.n = ((yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z);
  tSetColumnType (&yylhsminor.yy103, &yymsp[-1].minor.yy0);
}
  yymsp[-1].minor.yy103 = yylhsminor.yy103;
        break;
      case 135: /* signed ::= INTEGER */
{ yylhsminor.yy549 = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
  yymsp[0].minor.yy549 = yylhsminor.yy549;
        break;
      case 136: /* signed ::= PLUS INTEGER */
{ yymsp[-1].minor.yy549 = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
        break;
      case 137: /* signed ::= MINUS INTEGER */
{ yymsp[-1].minor.yy549 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);}
        break;
      case 141: /* cmd ::= CREATE TABLE create_table_list */
{ pInfo->type = TSDB_SQL_CREATE_TABLE; pInfo->pCreateTableInfo = yymsp[0].minor.yy422;}
        break;
      case 142: /* create_table_list ::= create_from_stable */
{
  SCreateTableSql* pCreateTable = calloc(1, sizeof(SCreateTableSql));
  pCreateTable->childTableInfo = taosArrayInit(4, sizeof(SCreatedTableInfo));

  taosArrayPush(pCreateTable->childTableInfo, &yymsp[0].minor.yy306);
  pCreateTable->type = TSQL_CREATE_TABLE_FROM_STABLE;
  yylhsminor.yy422 = pCreateTable;
}
  yymsp[0].minor.yy422 = yylhsminor.yy422;
        break;
      case 143: /* create_table_list ::= create_table_list create_from_stable */
{
  taosArrayPush(yymsp[-1].minor.yy422->childTableInfo, &yymsp[0].minor.yy306);
  yylhsminor.yy422 = yymsp[-1].minor.yy422;
}
  yymsp[-1].minor.yy422 = yylhsminor.yy422;
        break;
      case 144: /* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */
{
  yylhsminor.yy422 = tSetCreateTableInfo(yymsp[-1].minor.yy231, NULL, NULL, TSQL_CREATE_TABLE);
  setSqlInfo(pInfo, yylhsminor.yy422, NULL, TSDB_SQL_CREATE_TABLE);

  yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
  setCreatedTableName(pInfo, &yymsp[-4].minor.yy0, &yymsp[-5].minor.yy0);
}
  yymsp[-5].minor.yy422 = yylhsminor.yy422;
        break;
      case 145: /* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */
{
  yylhsminor.yy422 = tSetCreateTableInfo(yymsp[-5].minor.yy231, yymsp[-1].minor.yy231, NULL, TSQL_CREATE_STABLE);
  setSqlInfo(pInfo, yylhsminor.yy422, NULL, TSDB_SQL_CREATE_TABLE);

  yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n;
  setCreatedTableName(pInfo, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0);
}
  yymsp[-9].minor.yy422 = yylhsminor.yy422;
        break;
      case 146: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */
{
  yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n;
  yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n;
  yylhsminor.yy306 = createNewChildTableInfo(&yymsp[-5].minor.yy0, NULL, yymsp[-1].minor.yy231, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0);
}
  yymsp[-9].minor.yy306 = yylhsminor.yy306;
        break;
      case 147: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */
{
  yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n;
  yymsp[-11].minor.yy0.n += yymsp[-10].minor.yy0.n;
  yylhsminor.yy306 = createNewChildTableInfo(&yymsp[-8].minor.yy0, yymsp[-5].minor.yy231, yymsp[-1].minor.yy231, &yymsp[-11].minor.yy0, &yymsp[-12].minor.yy0);
}
  yymsp[-12].minor.yy306 = yylhsminor.yy306;
        break;
      case 148: /* tagNamelist ::= tagNamelist COMMA ids */
{taosArrayPush(yymsp[-2].minor.yy231, &yymsp[0].minor.yy0); yylhsminor.yy231 = yymsp[-2].minor.yy231;  }
  yymsp[-2].minor.yy231 = yylhsminor.yy231;
        break;
      case 149: /* tagNamelist ::= ids */
{yylhsminor.yy231 = taosArrayInit(4, sizeof(SStrToken)); taosArrayPush(yylhsminor.yy231, &yymsp[0].minor.yy0);}
  yymsp[0].minor.yy231 = yylhsminor.yy231;
        break;
      case 150: /* create_table_args ::= ifnotexists ids cpxName AS select */
{
  yylhsminor.yy422 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy86, TSQL_CREATE_STREAM);
  setSqlInfo(pInfo, yylhsminor.yy422, NULL, TSDB_SQL_CREATE_TABLE);

  yymsp[-3].minor.yy0.n += yymsp[-2].minor.yy0.n;
  setCreatedTableName(pInfo, &yymsp[-3].minor.yy0, &yymsp[-4].minor.yy0);
}
  yymsp[-4].minor.yy422 = yylhsminor.yy422;
        break;
      case 151: /* columnlist ::= columnlist COMMA column */
{taosArrayPush(yymsp[-2].minor.yy231, &yymsp[0].minor.yy103); yylhsminor.yy231 = yymsp[-2].minor.yy231;  }
  yymsp[-2].minor.yy231 = yylhsminor.yy231;
        break;
      case 152: /* columnlist ::= column */
{yylhsminor.yy231 = taosArrayInit(4, sizeof(TAOS_FIELD)); taosArrayPush(yylhsminor.yy231, &yymsp[0].minor.yy103);}
  yymsp[0].minor.yy231 = yylhsminor.yy231;
        break;
      case 153: /* column ::= ids typename */
{
  tSetColumnInfo(&yylhsminor.yy103, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy103);
}
  yymsp[-1].minor.yy103 = yylhsminor.yy103;
        break;
      case 160: /* tagitem ::= NULL */
{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy176, &yymsp[0].minor.yy0, true); }
  yymsp[0].minor.yy176 = yylhsminor.yy176;
        break;
      case 161: /* tagitem ::= NOW */
{ yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; tVariantCreate(&yylhsminor.yy176, &yymsp[0].minor.yy0, true);}
  yymsp[0].minor.yy176 = yylhsminor.yy176;
        break;
      case 162: /* tagitem ::= MINUS INTEGER */
      case 163: /* tagitem ::= MINUS FLOAT */ yytestcase(yyruleno==163);
      case 164: /* tagitem ::= PLUS INTEGER */ yytestcase(yyruleno==164);
      case 165: /* tagitem ::= PLUS FLOAT */ yytestcase(yyruleno==165);
{
    yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
    yymsp[-1].minor.yy0.type = yymsp[0].minor.yy0.type;
    toTSDBType(yymsp[-1].minor.yy0.type);
    tVariantCreate(&yylhsminor.yy176, &yymsp[-1].minor.yy0, true);
}
  yymsp[-1].minor.yy176 = yylhsminor.yy176;
        break;
      case 166: /* select ::= SELECT selcollist from where_opt range_option interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */
{
  yylhsminor.yy86 = tSetQuerySqlNode(&yymsp[-14].minor.yy0, yymsp[-13].minor.yy231, yymsp[-12].minor.yy484, yymsp[-11].minor.yy226, yymsp[-4].minor.yy231, yymsp[-2].minor.yy231, &yymsp[-9].minor.yy430, &yymsp[-7].minor.yy409, &yymsp[-6].minor.yy228, &yymsp[-8].minor.yy0, yymsp[-5].minor.yy231, &yymsp[0].minor.yy444, &yymsp[-1].minor.yy444, yymsp[-3].minor.yy226, &yymsp[-10].minor.yy480);
}
  yymsp[-14].minor.yy86 = yylhsminor.yy86;
        break;
      case 167: /* select ::= LP select RP */
{yymsp[-2].minor.yy86 = yymsp[-1].minor.yy86;}
        break;
      case 168: /* union ::= select */
{ yylhsminor.yy231 = setSubclause(NULL, yymsp[0].minor.yy86); }
  yymsp[0].minor.yy231 = yylhsminor.yy231;
        break;
      case 169: /* union ::= union UNION ALL select */
{ yylhsminor.yy231 = appendSelectClause(yymsp[-3].minor.yy231, yymsp[0].minor.yy86); }
  yymsp[-3].minor.yy231 = yylhsminor.yy231;
        break;
      case 170: /* cmd ::= union */
{ setSqlInfo(pInfo, yymsp[0].minor.yy231, NULL, TSDB_SQL_SELECT); }
        break;
      case 171: /* select ::= SELECT selcollist */
{
  yylhsminor.yy86 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy231, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
}
  yymsp[-1].minor.yy86 = yylhsminor.yy86;
        break;
      case 172: /* sclp ::= selcollist COMMA */
{yylhsminor.yy231 = yymsp[-1].minor.yy231;}
  yymsp[-1].minor.yy231 = yylhsminor.yy231;
        break;
      case 173: /* sclp ::= */
      case 214: /* orderby_opt ::= */ yytestcase(yyruleno==214);
{yymsp[1].minor.yy231 = 0;}
        break;
      case 174: /* selcollist ::= sclp distinct expr as */
{
   yylhsminor.yy231 = tSqlExprListAppend(yymsp[-3].minor.yy231, yymsp[-1].minor.yy226,  yymsp[-2].minor.yy0.n? &yymsp[-2].minor.yy0:0, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0);
}
  yymsp[-3].minor.yy231 = yylhsminor.yy231;
        break;
      case 175: /* selcollist ::= sclp STAR */
{
   tSqlExpr *pNode = tSqlExprCreateIdValue(pInfo, NULL, TK_ALL);
   yylhsminor.yy231 = tSqlExprListAppend(yymsp[-1].minor.yy231, pNode, 0, 0);
}
  yymsp[-1].minor.yy231 = yylhsminor.yy231;
        break;
      case 176: /* as ::= AS ids */
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;    }
        break;
      case 177: /* as ::= ids */
{ yylhsminor.yy0 = yymsp[0].minor.yy0;    }
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 178: /* as ::= */
{ yymsp[1].minor.yy0.n = 0;  }
        break;
      case 179: /* distinct ::= DISTINCT */
{ yylhsminor.yy0 = yymsp[0].minor.yy0;  }
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 181: /* from ::= FROM tablelist */
      case 182: /* from ::= FROM sub */ yytestcase(yyruleno==182);
{yymsp[-1].minor.yy484 = yymsp[0].minor.yy484;}
        break;
      case 183: /* sub ::= LP union RP */
{yymsp[-2].minor.yy484 = addSubqueryElem(NULL, yymsp[-1].minor.yy231, NULL);}
        break;
      case 184: /* sub ::= LP union RP ids */
{yymsp[-3].minor.yy484 = addSubqueryElem(NULL, yymsp[-2].minor.yy231, &yymsp[0].minor.yy0);}
        break;
      case 185: /* sub ::= sub COMMA LP union RP ids */
{yylhsminor.yy484 = addSubqueryElem(yymsp[-5].minor.yy484, yymsp[-2].minor.yy231, &yymsp[0].minor.yy0);}
  yymsp[-5].minor.yy484 = yylhsminor.yy484;
        break;
      case 186: /* tablelist ::= ids cpxName */
{
  yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
  yylhsminor.yy484 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL);
}
  yymsp[-1].minor.yy484 = yylhsminor.yy484;
        break;
      case 187: /* tablelist ::= ids cpxName ids */
{
  yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n;
  yylhsminor.yy484 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
}
  yymsp[-2].minor.yy484 = yylhsminor.yy484;
        break;
      case 188: /* tablelist ::= tablelist COMMA ids cpxName */
{
  yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
  yylhsminor.yy484 = setTableNameList(yymsp[-3].minor.yy484, &yymsp[-1].minor.yy0, NULL);
}
  yymsp[-3].minor.yy484 = yylhsminor.yy484;
        break;
      case 189: /* tablelist ::= tablelist COMMA ids cpxName ids */
{
  yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n;
  yylhsminor.yy484 = setTableNameList(yymsp[-4].minor.yy484, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
}
  yymsp[-4].minor.yy484 = yylhsminor.yy484;
        break;
      case 190: /* tmvar ::= VARIABLE */
{yylhsminor.yy0 = yymsp[0].minor.yy0;}
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 191: /* timestamp ::= INTEGER */
{ yylhsminor.yy226 = tSqlExprCreateTimestamp(&yymsp[0].minor.yy0, TK_INTEGER);}
  yymsp[0].minor.yy226 = yylhsminor.yy226;
        break;
      case 192: /* timestamp ::= MINUS INTEGER */
      case 193: /* timestamp ::= PLUS INTEGER */ yytestcase(yyruleno==193);
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy226 = tSqlExprCreateTimestamp(&yymsp[-1].minor.yy0, TK_INTEGER);}
  yymsp[-1].minor.yy226 = yylhsminor.yy226;
        break;
      case 194: /* timestamp ::= STRING */
{ yylhsminor.yy226 = tSqlExprCreateTimestamp(&yymsp[0].minor.yy0, TK_STRING);}
  yymsp[0].minor.yy226 = yylhsminor.yy226;
        break;
      case 195: /* timestamp ::= NOW */
{ yylhsminor.yy226 = tSqlExprCreateTimestamp(&yymsp[0].minor.yy0, TK_NOW); }
  yymsp[0].minor.yy226 = yylhsminor.yy226;
        break;
      case 196: /* timestamp ::= NOW PLUS VARIABLE */
{yymsp[-2].minor.yy226 = tSqlExprCreateTimestamp(&yymsp[0].minor.yy0, TK_PLUS);  }
        break;
      case 197: /* timestamp ::= NOW MINUS VARIABLE */
{yymsp[-2].minor.yy226 = tSqlExprCreateTimestamp(&yymsp[0].minor.yy0, TK_MINUS); }
        break;
      case 198: /* range_option ::= */
{yymsp[1].minor.yy480.start = 0; yymsp[1].minor.yy480.end = 0;}
        break;
      case 199: /* range_option ::= RANGE LP timestamp COMMA timestamp RP */
{yymsp[-5].minor.yy480.start = yymsp[-3].minor.yy226; yymsp[-5].minor.yy480.end = yymsp[-1].minor.yy226;}
        break;
      case 200: /* interval_option ::= intervalKey LP tmvar RP */
{yylhsminor.yy430.interval = yymsp[-1].minor.yy0; yylhsminor.yy430.offset.n = 0; yylhsminor.yy430.token = yymsp[-3].minor.yy310;}
  yymsp[-3].minor.yy430 = yylhsminor.yy430;
        break;
      case 201: /* interval_option ::= intervalKey LP tmvar COMMA tmvar RP */
{yylhsminor.yy430.interval = yymsp[-3].minor.yy0; yylhsminor.yy430.offset = yymsp[-1].minor.yy0;   yylhsminor.yy430.token = yymsp[-5].minor.yy310;}
  yymsp[-5].minor.yy430 = yylhsminor.yy430;
        break;
      case 202: /* interval_option ::= */
{memset(&yymsp[1].minor.yy430, 0, sizeof(yymsp[1].minor.yy430));}
        break;
      case 203: /* intervalKey ::= INTERVAL */
{yymsp[0].minor.yy310 = TK_INTERVAL;}
        break;
      case 204: /* intervalKey ::= EVERY */
{yymsp[0].minor.yy310 = TK_EVERY;   }
        break;
      case 205: /* session_option ::= */
{yymsp[1].minor.yy409.col.n = 0; yymsp[1].minor.yy409.gap.n = 0;}
        break;
      case 206: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
{
   yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
   yymsp[-6].minor.yy409.col = yymsp[-4].minor.yy0;
   yymsp[-6].minor.yy409.gap = yymsp[-1].minor.yy0;
}
        break;
      case 207: /* windowstate_option ::= */
{ yymsp[1].minor.yy228.col.n = 0; yymsp[1].minor.yy228.col.z = NULL;}
        break;
      case 208: /* windowstate_option ::= STATE_WINDOW LP ids RP */
{ yymsp[-3].minor.yy228.col = yymsp[-1].minor.yy0; }
        break;
      case 209: /* fill_opt ::= */
{ yymsp[1].minor.yy231 = 0;     }
        break;
      case 210: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{
    tVariant A = {0};
    toTSDBType(yymsp[-3].minor.yy0.type);
    tVariantCreate(&A, &yymsp[-3].minor.yy0, true);

    tVariantListInsert(yymsp[-1].minor.yy231, &A, -1, 0);
    yymsp[-5].minor.yy231 = yymsp[-1].minor.yy231;
}
        break;
      case 211: /* fill_opt ::= FILL LP ID RP */
{
    toTSDBType(yymsp[-1].minor.yy0.type);
    yymsp[-3].minor.yy231 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1, true);
}
        break;
      case 212: /* sliding_opt ::= SLIDING LP tmvar RP */
{yymsp[-3].minor.yy0 = yymsp[-1].minor.yy0;     }
        break;
      case 213: /* sliding_opt ::= */
{yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = NULL; yymsp[1].minor.yy0.type = 0;   }
        break;
      case 215: /* orderby_opt ::= ORDER BY sortlist */
{yymsp[-2].minor.yy231 = yymsp[0].minor.yy231;}
        break;
      case 216: /* sortlist ::= sortlist COMMA item sortorder */
{
  yylhsminor.yy231 = commonItemAppend(yymsp[-3].minor.yy231, &yymsp[-1].minor.yy176, NULL, false, yymsp[0].minor.yy502);
}
  yymsp[-3].minor.yy231 = yylhsminor.yy231;
        break;
      case 217: /* sortlist ::= sortlist COMMA arrow sortorder */
{
  yylhsminor.yy231 = commonItemAppend(yymsp[-3].minor.yy231, NULL, yymsp[-1].minor.yy226, true, yymsp[0].minor.yy502);
}
  yymsp[-3].minor.yy231 = yylhsminor.yy231;
        break;
      case 218: /* sortlist ::= item sortorder */
{
  yylhsminor.yy231 = commonItemAppend(NULL, &yymsp[-1].minor.yy176, NULL, false, yymsp[0].minor.yy502);
}
  yymsp[-1].minor.yy231 = yylhsminor.yy231;
        break;
      case 219: /* sortlist ::= arrow sortorder */
{
  yylhsminor.yy231 = commonItemAppend(NULL, NULL, yymsp[-1].minor.yy226, true, yymsp[0].minor.yy502);
}
  yymsp[-1].minor.yy231 = yylhsminor.yy231;
        break;
      case 220: /* item ::= ID */
{
  toTSDBType(yymsp[0].minor.yy0.type);
  tVariantCreate(&yylhsminor.yy176, &yymsp[0].minor.yy0, true);
}
  yymsp[0].minor.yy176 = yylhsminor.yy176;
        break;
      case 221: /* item ::= ID DOT ID */
{
  toTSDBType(yymsp[-2].minor.yy0.type);
  yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n);
  tVariantCreate(&yylhsminor.yy176, &yymsp[-2].minor.yy0, true);
}
  yymsp[-2].minor.yy176 = yylhsminor.yy176;
        break;
      case 222: /* sortorder ::= ASC */
{ yymsp[0].minor.yy502 = TSDB_ORDER_ASC; }
        break;
      case 223: /* sortorder ::= DESC */
{ yymsp[0].minor.yy502 = TSDB_ORDER_DESC;}
        break;
      case 224: /* sortorder ::= */
{ yymsp[1].minor.yy502 = TSDB_ORDER_ASC; }
        break;
      case 225: /* groupby_opt ::= */
{ yymsp[1].minor.yy231 = 0;}
        break;
      case 226: /* groupby_opt ::= GROUP BY grouplist */
{ yymsp[-2].minor.yy231 = yymsp[0].minor.yy231;}
        break;
      case 227: /* grouplist ::= grouplist COMMA item */
{
  yylhsminor.yy231 = commonItemAppend(yymsp[-2].minor.yy231, &yymsp[0].minor.yy176, NULL, false, -1);
}
  yymsp[-2].minor.yy231 = yylhsminor.yy231;
        break;
      case 228: /* grouplist ::= grouplist COMMA arrow */
{
  yylhsminor.yy231 = commonItemAppend(yymsp[-2].minor.yy231, NULL, yymsp[0].minor.yy226, true, -1);
}
  yymsp[-2].minor.yy231 = yylhsminor.yy231;
        break;
      case 229: /* grouplist ::= item */
{
  yylhsminor.yy231 = commonItemAppend(NULL, &yymsp[0].minor.yy176, NULL, false, -1);
}
  yymsp[0].minor.yy231 = yylhsminor.yy231;
        break;
      case 230: /* grouplist ::= arrow */
{
  yylhsminor.yy231 = commonItemAppend(NULL, NULL, yymsp[0].minor.yy226, true, -1);
}
  yymsp[0].minor.yy231 = yylhsminor.yy231;
        break;
      case 231: /* having_opt ::= */
      case 241: /* where_opt ::= */ yytestcase(yyruleno==241);
      case 290: /* expritem ::= */ yytestcase(yyruleno==290);
{yymsp[1].minor.yy226 = 0;}
        break;
      case 232: /* having_opt ::= HAVING expr */
      case 242: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==242);
{yymsp[-1].minor.yy226 = yymsp[0].minor.yy226;}
        break;
      case 233: /* limit_opt ::= */
      case 237: /* slimit_opt ::= */ yytestcase(yyruleno==237);
{yymsp[1].minor.yy444.limit = -1; yymsp[1].minor.yy444.offset = 0;}
        break;
      case 234: /* limit_opt ::= LIMIT signed */
      case 238: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==238);
{yymsp[-1].minor.yy444.limit = yymsp[0].minor.yy549;  yymsp[-1].minor.yy444.offset = 0;}
        break;
      case 235: /* limit_opt ::= LIMIT signed OFFSET signed */
{ yymsp[-3].minor.yy444.limit = yymsp[-2].minor.yy549;  yymsp[-3].minor.yy444.offset = yymsp[0].minor.yy549;}
        break;
      case 236: /* limit_opt ::= LIMIT signed COMMA signed */
{ yymsp[-3].minor.yy444.limit = yymsp[0].minor.yy549;  yymsp[-3].minor.yy444.offset = yymsp[-2].minor.yy549;}
        break;
      case 239: /* slimit_opt ::= SLIMIT signed SOFFSET signed */
{yymsp[-3].minor.yy444.limit = yymsp[-2].minor.yy549;  yymsp[-3].minor.yy444.offset = yymsp[0].minor.yy549;}
        break;
      case 240: /* slimit_opt ::= SLIMIT signed COMMA signed */
{yymsp[-3].minor.yy444.limit = yymsp[0].minor.yy549;  yymsp[-3].minor.yy444.offset = yymsp[-2].minor.yy549;}
        break;
      case 243: /* expr ::= LP expr RP */
{yylhsminor.yy226 = yymsp[-1].minor.yy226; yylhsminor.yy226->exprToken.z = yymsp[-2].minor.yy0.z; yylhsminor.yy226->exprToken.n = (yymsp[0].minor.yy0.z - yymsp[-2].minor.yy0.z + 1);}
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 244: /* expr ::= ID */
{ yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_ID);}
  yymsp[0].minor.yy226 = yylhsminor.yy226;
        break;
      case 245: /* expr ::= ID DOT ID */
{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[-2].minor.yy0, TK_ID);}
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 246: /* expr ::= ID DOT STAR */
{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[-2].minor.yy0, TK_ALL);}
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 247: /* expr ::= INTEGER */
{ yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_INTEGER);}
  yymsp[0].minor.yy226 = yylhsminor.yy226;
        break;
      case 248: /* expr ::= MINUS INTEGER */
      case 249: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==249);
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[-1].minor.yy0, TK_INTEGER);}
  yymsp[-1].minor.yy226 = yylhsminor.yy226;
        break;
      case 250: /* expr ::= FLOAT */
{ yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_FLOAT);}
  yymsp[0].minor.yy226 = yylhsminor.yy226;
        break;
      case 251: /* expr ::= MINUS FLOAT */
      case 252: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==252);
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[-1].minor.yy0, TK_FLOAT);}
  yymsp[-1].minor.yy226 = yylhsminor.yy226;
        break;
      case 253: /* expr ::= STRING */
{ yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_STRING);}
  yymsp[0].minor.yy226 = yylhsminor.yy226;
        break;
      case 254: /* expr ::= NOW */
{ yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_NOW); }
  yymsp[0].minor.yy226 = yylhsminor.yy226;
        break;
      case 255: /* expr ::= VARIABLE */
{ yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_VARIABLE);}
  yymsp[0].minor.yy226 = yylhsminor.yy226;
        break;
      case 256: /* expr ::= PLUS VARIABLE */
      case 257: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==257);
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_VARIABLE; yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[-1].minor.yy0, TK_VARIABLE);}
  yymsp[-1].minor.yy226 = yylhsminor.yy226;
        break;
      case 258: /* expr ::= BOOL */
{ yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_BOOL);}
  yymsp[0].minor.yy226 = yylhsminor.yy226;
        break;
      case 259: /* expr ::= NULL */
{ yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_NULL);}
  yymsp[0].minor.yy226 = yylhsminor.yy226;
        break;
      case 260: /* expr ::= ID LP exprlist RP */
{ tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy226 = tSqlExprCreateFunction(yymsp[-1].minor.yy231, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); }
  yymsp[-3].minor.yy226 = yylhsminor.yy226;
        break;
      case 261: /* expr ::= ID LP STAR RP */
{ tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy226 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); }
  yymsp[-3].minor.yy226 = yylhsminor.yy226;
        break;
      case 262: /* expr ::= expr IS NULL */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, NULL, TK_ISNULL);}
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 263: /* expr ::= expr IS NOT NULL */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-3].minor.yy226, NULL, TK_NOTNULL);}
  yymsp[-3].minor.yy226 = yylhsminor.yy226;
        break;
      case 264: /* expr ::= expr LT expr */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_LT);}
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 265: /* expr ::= expr GT expr */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_GT);}
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 266: /* expr ::= expr LE expr */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_LE);}
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 267: /* expr ::= expr GE expr */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_GE);}
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 268: /* expr ::= expr NE expr */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_NE);}
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 269: /* expr ::= expr EQ expr */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_EQ);}
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 270: /* expr ::= expr BETWEEN expr AND expr */
{ tSqlExpr* X2 = tSqlExprClone(yymsp[-4].minor.yy226); yylhsminor.yy226 = tSqlExprCreate(tSqlExprCreate(yymsp[-4].minor.yy226, yymsp[-2].minor.yy226, TK_GE), tSqlExprCreate(X2, yymsp[0].minor.yy226, TK_LE), TK_AND);}
  yymsp[-4].minor.yy226 = yylhsminor.yy226;
        break;
      case 271: /* expr ::= expr AND expr */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_AND);}
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 272: /* expr ::= expr OR expr */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_OR); }
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 273: /* expr ::= expr PLUS expr */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_PLUS);  }
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 274: /* expr ::= expr MINUS expr */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_MINUS); }
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 275: /* expr ::= expr STAR expr */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_STAR);  }
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 276: /* expr ::= expr SLASH expr */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_DIVIDE);}
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 277: /* expr ::= expr REM expr */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_REM);   }
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 278: /* expr ::= expr LIKE expr */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_LIKE);  }
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 279: /* expr ::= expr MATCH expr */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_MATCH);  }
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 280: /* expr ::= expr NMATCH expr */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_NMATCH);  }
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 281: /* expr ::= ID CONTAINS STRING */
{ tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &yymsp[-2].minor.yy0, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_STRING); yylhsminor.yy226 = tSqlExprCreate(S, M, TK_CONTAINS);  }
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 282: /* expr ::= ID DOT ID CONTAINS STRING */
{ yymsp[-4].minor.yy0.n += (1+yymsp[-2].minor.yy0.n); tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &yymsp[-4].minor.yy0, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_STRING); yylhsminor.yy226 = tSqlExprCreate(S, M, TK_CONTAINS);  }
  yymsp[-4].minor.yy226 = yylhsminor.yy226;
        break;
      case 283: /* arrow ::= ID ARROW STRING */
{tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &yymsp[-2].minor.yy0, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_STRING); yylhsminor.yy226 = tSqlExprCreate(S, M, TK_ARROW);  }
  yymsp[-2].minor.yy226 = yylhsminor.yy226;
        break;
      case 284: /* arrow ::= ID DOT ID ARROW STRING */
{yymsp[-4].minor.yy0.n += (1+yymsp[-2].minor.yy0.n); tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &yymsp[-4].minor.yy0, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_STRING); yylhsminor.yy226 = tSqlExprCreate(S, M, TK_ARROW);  }
  yymsp[-4].minor.yy226 = yylhsminor.yy226;
        break;
      case 285: /* expr ::= arrow */
      case 289: /* expritem ::= expr */ yytestcase(yyruleno==289);
{yylhsminor.yy226 = yymsp[0].minor.yy226;}
  yymsp[0].minor.yy226 = yylhsminor.yy226;
        break;
      case 286: /* expr ::= expr IN LP exprlist RP */
{yylhsminor.yy226 = tSqlExprCreate(yymsp[-4].minor.yy226, (tSqlExpr*)yymsp[-1].minor.yy231, TK_IN); }
  yymsp[-4].minor.yy226 = yylhsminor.yy226;
        break;
      case 287: /* exprlist ::= exprlist COMMA expritem */
{yylhsminor.yy231 = tSqlExprListAppend(yymsp[-2].minor.yy231,yymsp[0].minor.yy226,0, 0);}
  yymsp[-2].minor.yy231 = yylhsminor.yy231;
        break;
      case 288: /* exprlist ::= expritem */
{yylhsminor.yy231 = tSqlExprListAppend(0,yymsp[0].minor.yy226,0, 0);}
  yymsp[0].minor.yy231 = yylhsminor.yy231;
        break;
      case 291: /* cmd ::= RESET QUERY CACHE */
{ setDCLSqlElems(pInfo, TSDB_SQL_RESET_CACHE, 0);}
        break;
      case 292: /* cmd ::= SYNCDB ids REPLICA */
{ setDCLSqlElems(pInfo, TSDB_SQL_SYNC_DB_REPLICA, 1, &yymsp[-1].minor.yy0);}
        break;
      case 293: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{
    yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
    SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy231, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1);
    setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
        break;
      case 294: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{
    yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;

    toTSDBType(yymsp[0].minor.yy0.type);
    SArray* K = tVariantListAppendToken(NULL, &yymsp[0].minor.yy0, -1, false);

    SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, K, TSDB_ALTER_TABLE_DROP_COLUMN, -1);
    setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
        break;
      case 295: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
{
    yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
    SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy231, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, -1);
    setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
        break;
      case 296: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{
    yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
    SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy231, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1);
    setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
        break;
      case 297: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
    yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;

    toTSDBType(yymsp[0].minor.yy0.type);
    SArray* A = tVariantListAppendToken(NULL, &yymsp[0].minor.yy0, -1, true);

    SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, A, TSDB_ALTER_TABLE_DROP_TAG_COLUMN, -1);
    setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
        break;
      case 298: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{
    yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n;

    toTSDBType(yymsp[-1].minor.yy0.type);
    SArray* A = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1, true);

    toTSDBType(yymsp[0].minor.yy0.type);
    A = tVariantListAppendToken(A, &yymsp[0].minor.yy0, -1, true);

    SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-5].minor.yy0, NULL, A, TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN, -1);
    setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
        break;
      case 299: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{
    yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n;

    toTSDBType(yymsp[-2].minor.yy0.type);
    SArray* A = tVariantListAppendToken(NULL, &yymsp[-2].minor.yy0, -1, true);
    A = tVariantListAppend(A, &yymsp[0].minor.yy176, -1);

    SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-6].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, -1);
    setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
        break;
      case 300: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
{
    yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
    SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy231, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, -1);
    setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
        break;
      case 301: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
{
    yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
    SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy231, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE);
    setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
        break;
      case 302: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
{
    yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;

    toTSDBType(yymsp[0].minor.yy0.type);
    SArray* K = tVariantListAppendToken(NULL, &yymsp[0].minor.yy0, -1, true);

    SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, K, TSDB_ALTER_TABLE_DROP_COLUMN, TSDB_SUPER_TABLE);
    setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
        break;
      case 303: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
{
    yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
    SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy231, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE);
    setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
        break;
      case 304: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
{
    yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
    SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy231, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE);
    setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
        break;
      case 305: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
{
    yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;

    toTSDBType(yymsp[0].minor.yy0.type);
    SArray* A = tVariantListAppendToken(NULL, &yymsp[0].minor.yy0, -1, true);

    SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, A, TSDB_ALTER_TABLE_DROP_TAG_COLUMN, TSDB_SUPER_TABLE);
    setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
        break;
      case 306: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
{
    yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n;

    toTSDBType(yymsp[-1].minor.yy0.type);
    SArray* A = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1, true);

    toTSDBType(yymsp[0].minor.yy0.type);
    A = tVariantListAppendToken(A, &yymsp[0].minor.yy0, -1, true);

    SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-5].minor.yy0, NULL, A, TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN, TSDB_SUPER_TABLE);
    setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
        break;
      case 307: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
{
    yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n;

    toTSDBType(yymsp[-2].minor.yy0.type);
    SArray* A = tVariantListAppendToken(NULL, &yymsp[-2].minor.yy0, -1, true);
    A = tVariantListAppend(A, &yymsp[0].minor.yy176, -1);

    SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-6].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, TSDB_SUPER_TABLE);
    setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
        break;
      case 308: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
{
    yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
    SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy231, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, TSDB_SUPER_TABLE);
    setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
        break;
      case 309: /* cmd ::= KILL CONNECTION INTEGER */
{setKillSql(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[0].minor.yy0);}
        break;
      case 310: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */
{yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_STREAM, &yymsp[-2].minor.yy0);}
        break;
      case 311: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */
{yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_QUERY, &yymsp[-2].minor.yy0);}
        break;
      default:
        break;
/********** End reduce actions ************************************************/
  };
  assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) );
  yygoto = yyRuleInfoLhs[yyruleno];
  yysize = yyRuleInfoNRhs[yyruleno];
  yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);

  /* There are no SHIFTREDUCE actions on nonterminals because the table
  ** generator has simplified them to pure REDUCE actions. */
  assert( !(yyact>YY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) );

  /* It is not possible for a REDUCE to be followed by an error */
  assert( yyact!=YY_ERROR_ACTION );

  yymsp += yysize+1;
  yypParser->yytos = yymsp;
  yymsp->stateno = (YYACTIONTYPE)yyact;
  yymsp->major = (YYCODETYPE)yygoto;
  yyTraceShift(yypParser, yyact, "... then shift");
  return yyact;
}

/*
** The following code executes when the parse fails
*/
#ifndef YYNOERRORRECOVERY
static void yy_parse_failed(
  yyParser *yypParser           /* The parser */
){
  ParseARG_FETCH
  ParseCTX_FETCH
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
  }
#endif
  while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
  /* Here code is inserted which will be executed whenever the
  ** parser fails */
/************ Begin %parse_failure code ***************************************/
/************ End %parse_failure code *****************************************/
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
}
#endif /* YYNOERRORRECOVERY */

/*
** The following code executes when a syntax error first occurs.
*/
static void yy_syntax_error(
  yyParser *yypParser,           /* The parser */
  int yymajor,                   /* The major type of the error token */
  ParseTOKENTYPE yyminor         /* The minor type of the error token */
){
  ParseARG_FETCH
  ParseCTX_FETCH
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/

  pInfo->valid = false;
  int32_t outputBufLen = tListLen(pInfo->msg);
  int32_t len = 0;

  if(TOKEN.z) {
    char msg[] = "syntax error near \"%s\"";
    int32_t sqlLen = strlen(&TOKEN.z[0]);

    if (sqlLen + sizeof(msg)/sizeof(msg[0]) + 1 > outputBufLen) {
        char tmpstr[128] = {0};
        memcpy(tmpstr, &TOKEN.z[0], sizeof(tmpstr)/sizeof(tmpstr[0]) - 1);
        len = sprintf(pInfo->msg, msg, tmpstr);
    } else {
        len = sprintf(pInfo->msg, msg, &TOKEN.z[0]);
    }

  } else {
    len = sprintf(pInfo->msg, "Incomplete SQL statement");
  }

  assert(len <= outputBufLen);
/************ End %syntax_error code ******************************************/
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
}

/*
** The following is executed when the parser accepts
*/
static void yy_accept(
  yyParser *yypParser           /* The parser */
){
  ParseARG_FETCH
  ParseCTX_FETCH
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
  }
#endif
#ifndef YYNOERRORRECOVERY
  yypParser->yyerrcnt = -1;
#endif
  assert( yypParser->yytos==yypParser->yystack );
  /* Here code is inserted which will be executed whenever the
  ** parser accepts */
/*********** Begin %parse_accept code *****************************************/

/*********** End %parse_accept code *******************************************/
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
** "ParseAlloc" which describes the current state of the parser.
** The second argument is the major token number.  The third is
** the minor token.  The fourth optional argument is whatever the
** user wants (and specified in the grammar) and is available for
** use by the action routines.
**
** Inputs:
** <ul>
** <li> A pointer to the parser (an opaque structure.)
** <li> The major token number.
** <li> The minor token number.
** <li> An option argument of a grammar-specified type.
** </ul>
**
** Outputs:
** None.
*/
void Parse(
  void *yyp,                   /* The parser */
  int yymajor,                 /* The major token code number */
  ParseTOKENTYPE yyminor       /* The value for the token */
  ParseARG_PDECL               /* Optional %extra_argument parameter */
){
  YYMINORTYPE yyminorunion;
  YYACTIONTYPE yyact;   /* The parser action. */
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
  int yyendofinput;     /* True if we are at the end of input */
#endif
#ifdef YYERRORSYMBOL
  int yyerrorhit = 0;   /* True if yymajor has invoked an error */
#endif
  yyParser *yypParser = (yyParser*)yyp;  /* The parser */
  ParseCTX_FETCH
  ParseARG_STORE

  assert( yypParser->yytos!=0 );
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
  yyendofinput = (yymajor==0);
#endif

  yyact = yypParser->yytos->stateno;
#ifndef NDEBUG
  if( yyTraceFILE ){
    if( yyact < YY_MIN_REDUCE ){
      fprintf(yyTraceFILE,"%sInput '%s' in state %d\n",
              yyTracePrompt,yyTokenName[yymajor],yyact);
    }else{
      fprintf(yyTraceFILE,"%sInput '%s' with pending reduce %d\n",
              yyTracePrompt,yyTokenName[yymajor],yyact-YY_MIN_REDUCE);
    }
  }
#endif

  while(1){ /* Exit by "break" */
    assert( yypParser->yytos>=yypParser->yystack );
    assert( yyact==yypParser->yytos->stateno );
    yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
    if( yyact >= YY_MIN_REDUCE ){
      unsigned int yyruleno = yyact - YY_MIN_REDUCE; /* Reduce by this rule */
      assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) );
#ifndef NDEBUG
      if( yyTraceFILE ){
        int yysize = yyRuleInfoNRhs[yyruleno];
        if( yysize ){
          fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n",
            yyTracePrompt,
            yyruleno, yyRuleName[yyruleno],
            yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action",
            yypParser->yytos[yysize].stateno);
        }else{
          fprintf(yyTraceFILE, "%sReduce %d [%s]%s.\n",
            yyTracePrompt, yyruleno, yyRuleName[yyruleno],
            yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action");
        }
      }
#endif /* NDEBUG */

      /* Check that the stack is large enough to grow by a single entry
      ** if the RHS of the rule is empty.  This ensures that there is room
      ** enough on the stack to push the LHS value */
      if( yyRuleInfoNRhs[yyruleno]==0 ){
#ifdef YYTRACKMAXSTACKDEPTH
        if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
          yypParser->yyhwm++;
          assert( yypParser->yyhwm ==
                  (int)(yypParser->yytos - yypParser->yystack));
        }
#endif
#if YYSTACKDEPTH>0 
        if( yypParser->yytos>=yypParser->yystackEnd ){
          yyStackOverflow(yypParser);
          break;
        }
#else
        if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
          if( yyGrowStack(yypParser) ){
            yyStackOverflow(yypParser);
            break;
          }
        }
#endif
      }
      yyact = yy_reduce(yypParser,yyruleno,yymajor,yyminor ParseCTX_PARAM);
    }else if( yyact <= YY_MAX_SHIFTREDUCE ){
      yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor);
#ifndef YYNOERRORRECOVERY
      yypParser->yyerrcnt--;
#endif
      break;
    }else if( yyact==YY_ACCEPT_ACTION ){
      yypParser->yytos--;
      yy_accept(yypParser);
      return;
    }else{
      assert( yyact == YY_ERROR_ACTION );
      yyminorunion.yy0 = yyminor;
#ifdef YYERRORSYMBOL
      int yymx;
#endif
#ifndef NDEBUG
      if( yyTraceFILE ){
        fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
      }
#endif
#ifdef YYERRORSYMBOL
      /* A syntax error has occurred.
      ** The response to an error depends upon whether or not the
      ** grammar defines an error token "ERROR".  
      **
      ** This is what we do if the grammar does define ERROR:
      **
      **  * Call the %syntax_error function.
      **
      **  * Begin popping the stack until we enter a state where
      **    it is legal to shift the error symbol, then shift
      **    the error symbol.
      **
      **  * Set the error count to three.
      **
      **  * Begin accepting and shifting new tokens.  No new error
      **    processing will occur until three tokens have been
      **    shifted successfully.
      **
      */
      if( yypParser->yyerrcnt<0 ){
        yy_syntax_error(yypParser,yymajor,yyminor);
      }
      yymx = yypParser->yytos->major;
      if( yymx==YYERRORSYMBOL || yyerrorhit ){
#ifndef NDEBUG
        if( yyTraceFILE ){
          fprintf(yyTraceFILE,"%sDiscard input token %s\n",
             yyTracePrompt,yyTokenName[yymajor]);
        }
#endif
        yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
        yymajor = YYNOCODE;
      }else{
        while( yypParser->yytos > yypParser->yystack ){
          yyact = yy_find_reduce_action(yypParser->yytos->stateno,
                                        YYERRORSYMBOL);
          if( yyact<=YY_MAX_SHIFTREDUCE ) break;
          yy_pop_parser_stack(yypParser);
        }
        if( yypParser->yytos <= yypParser->yystack || yymajor==0 ){
          yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
          yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
          yypParser->yyerrcnt = -1;
#endif
          yymajor = YYNOCODE;
        }else if( yymx!=YYERRORSYMBOL ){
          yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor);
        }
      }
      yypParser->yyerrcnt = 3;
      yyerrorhit = 1;
      if( yymajor==YYNOCODE ) break;
      yyact = yypParser->yytos->stateno;
#elif defined(YYNOERRORRECOVERY)
      /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
      ** do any kind of error recovery.  Instead, simply invoke the syntax
      ** error routine and continue going as if nothing had happened.
      **
      ** Applications can set this macro (for example inside %include) if
      ** they intend to abandon the parse upon the first syntax error seen.
      */
      yy_syntax_error(yypParser,yymajor, yyminor);
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
      break;
#else  /* YYERRORSYMBOL is not defined */
      /* This is what we do if the grammar does not define ERROR:
      **
      **  * Report an error message, and throw away the input token.
      **
      **  * If the input token is $, then fail the parse.
      **
      ** As before, subsequent error messages are suppressed until
      ** three input tokens have been successfully shifted.
      */
      if( yypParser->yyerrcnt<=0 ){
        yy_syntax_error(yypParser,yymajor, yyminor);
      }
      yypParser->yyerrcnt = 3;
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
      if( yyendofinput ){
        yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
        yypParser->yyerrcnt = -1;
#endif
      }
      break;
#endif
    }
  }
#ifndef NDEBUG
  if( yyTraceFILE ){
    yyStackEntry *i;
    char cDiv = '[';
    fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt);
    for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){
      fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]);
      cDiv = ' ';
    }
    fprintf(yyTraceFILE,"]\n");
  }
#endif
  return;
}

/*
** Return the fallback token corresponding to canonical token iToken, or
** 0 if iToken has no fallback.
*/
int ParseFallback(int iToken){
#ifdef YYFALLBACK
  assert( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) );
  return yyFallback[iToken];
#else
  (void)iToken;
  return 0;
#endif
}
