提交 eae2d7b6 编写于 作者: X Xiaoyu Wang

TD-13675 create sma index grammar

上级 7aeb0a2a
......@@ -1914,11 +1914,12 @@ typedef struct {
int8_t slidingUnit;
char indexName[TSDB_INDEX_NAME_LEN];
char timezone[TD_TIMEZONE_LEN]; // sma data is invalid if timezone change.
uint16_t exprLen;
uint16_t tagsFilterLen;
int32_t exprLen;
int32_t tagsFilterLen;
int64_t indexUid;
tb_uid_t tableUid; // super/child/common table uid
int64_t interval;
int64_t offset;
int64_t sliding;
char* expr; // sma expression
char* tagsFilter;
......@@ -2020,11 +2021,12 @@ static FORCE_INLINE int32_t tEncodeTSma(void** buf, const STSma* pSma) {
tlen += taosEncodeFixedI8(buf, pSma->slidingUnit);
tlen += taosEncodeString(buf, pSma->indexName);
tlen += taosEncodeString(buf, pSma->timezone);
tlen += taosEncodeFixedU16(buf, pSma->exprLen);
tlen += taosEncodeFixedU16(buf, pSma->tagsFilterLen);
tlen += taosEncodeFixedI32(buf, pSma->exprLen);
tlen += taosEncodeFixedI32(buf, pSma->tagsFilterLen);
tlen += taosEncodeFixedI64(buf, pSma->indexUid);
tlen += taosEncodeFixedI64(buf, pSma->tableUid);
tlen += taosEncodeFixedI64(buf, pSma->interval);
tlen += taosEncodeFixedI64(buf, pSma->offset);
tlen += taosEncodeFixedI64(buf, pSma->sliding);
if (pSma->exprLen > 0) {
......@@ -2054,14 +2056,14 @@ static FORCE_INLINE void* tDecodeTSma(void* buf, STSma* pSma) {
buf = taosDecodeFixedI8(buf, &pSma->slidingUnit);
buf = taosDecodeStringTo(buf, pSma->indexName);
buf = taosDecodeStringTo(buf, pSma->timezone);
buf = taosDecodeFixedU16(buf, &pSma->exprLen);
buf = taosDecodeFixedU16(buf, &pSma->tagsFilterLen);
buf = taosDecodeFixedI32(buf, &pSma->exprLen);
buf = taosDecodeFixedI32(buf, &pSma->tagsFilterLen);
buf = taosDecodeFixedI64(buf, &pSma->indexUid);
buf = taosDecodeFixedI64(buf, &pSma->tableUid);
buf = taosDecodeFixedI64(buf, &pSma->interval);
buf = taosDecodeFixedI64(buf, &pSma->offset);
buf = taosDecodeFixedI64(buf, &pSma->sliding);
if (pSma->exprLen > 0) {
pSma->expr = (char*)calloc(pSma->exprLen, 1);
if (pSma->expr != NULL) {
......
......@@ -25,6 +25,17 @@ extern "C" {
#define TIME_IS_VAR_DURATION(_t) ((_t) == 'n' || (_t) == 'y' || (_t) == 'N' || (_t) == 'Y')
#define TIME_UNIT_NANOSECOND 'b'
#define TIME_UNIT_MICROSECOND 'u'
#define TIME_UNIT_MILLISECOND 'a'
#define TIME_UNIT_SECOND 's'
#define TIME_UNIT_MINUTE 'm'
#define TIME_UNIT_HOUR 'h'
#define TIME_UNIT_DAY 'd'
#define TIME_UNIT_WEEK 'w'
#define TIME_UNIT_MONTH 'n'
#define TIME_UNIT_YEAR 'y'
/*
* @return timestamp decided by global conf variable, tsTimePrecision
* if precision == TSDB_TIME_PRECISION_MICRO, it returns timestamp in microsecond.
......
......@@ -101,55 +101,58 @@
#define TK_VARBINARY 83
#define TK_DECIMAL 84
#define TK_SMA 85
#define TK_MNODES 86
#define TK_NK_FLOAT 87
#define TK_NK_BOOL 88
#define TK_NK_VARIABLE 89
#define TK_BETWEEN 90
#define TK_IS 91
#define TK_NULL 92
#define TK_NK_LT 93
#define TK_NK_GT 94
#define TK_NK_LE 95
#define TK_NK_GE 96
#define TK_NK_NE 97
#define TK_NK_EQ 98
#define TK_LIKE 99
#define TK_MATCH 100
#define TK_NMATCH 101
#define TK_IN 102
#define TK_FROM 103
#define TK_AS 104
#define TK_JOIN 105
#define TK_ON 106
#define TK_INNER 107
#define TK_SELECT 108
#define TK_DISTINCT 109
#define TK_WHERE 110
#define TK_PARTITION 111
#define TK_BY 112
#define TK_SESSION 113
#define TK_STATE_WINDOW 114
#define TK_INTERVAL 115
#define TK_SLIDING 116
#define TK_FILL 117
#define TK_VALUE 118
#define TK_NONE 119
#define TK_PREV 120
#define TK_LINEAR 121
#define TK_NEXT 122
#define TK_GROUP 123
#define TK_HAVING 124
#define TK_ORDER 125
#define TK_SLIMIT 126
#define TK_SOFFSET 127
#define TK_LIMIT 128
#define TK_OFFSET 129
#define TK_ASC 130
#define TK_DESC 131
#define TK_NULLS 132
#define TK_FIRST 133
#define TK_LAST 134
#define TK_INDEX 86
#define TK_ON 87
#define TK_FULLTEXT 88
#define TK_FUNCTION 89
#define TK_INTERVAL 90
#define TK_MNODES 91
#define TK_NK_FLOAT 92
#define TK_NK_BOOL 93
#define TK_NK_VARIABLE 94
#define TK_BETWEEN 95
#define TK_IS 96
#define TK_NULL 97
#define TK_NK_LT 98
#define TK_NK_GT 99
#define TK_NK_LE 100
#define TK_NK_GE 101
#define TK_NK_NE 102
#define TK_NK_EQ 103
#define TK_LIKE 104
#define TK_MATCH 105
#define TK_NMATCH 106
#define TK_IN 107
#define TK_FROM 108
#define TK_AS 109
#define TK_JOIN 110
#define TK_INNER 111
#define TK_SELECT 112
#define TK_DISTINCT 113
#define TK_WHERE 114
#define TK_PARTITION 115
#define TK_BY 116
#define TK_SESSION 117
#define TK_STATE_WINDOW 118
#define TK_SLIDING 119
#define TK_FILL 120
#define TK_VALUE 121
#define TK_NONE 122
#define TK_PREV 123
#define TK_LINEAR 124
#define TK_NEXT 125
#define TK_GROUP 126
#define TK_HAVING 127
#define TK_ORDER 128
#define TK_SLIMIT 129
#define TK_SOFFSET 130
#define TK_LIMIT 131
#define TK_OFFSET 132
#define TK_ASC 133
#define TK_DESC 134
#define TK_NULLS 135
#define TK_FIRST 136
#define TK_LAST 137
#define TK_NK_SPACE 300
#define TK_NK_COMMENT 301
......
......@@ -23,6 +23,7 @@ extern "C" {
#include "querynodes.h"
typedef struct SDatabaseOptions {
ENodeType type;
int32_t numOfBlocks;
int32_t cacheBlockSize;
int8_t cachelast;
......@@ -46,7 +47,7 @@ typedef struct SCreateDatabaseStmt {
ENodeType type;
char dbName[TSDB_DB_NAME_LEN];
bool ignoreExists;
SDatabaseOptions options;
SDatabaseOptions* pOptions;
} SCreateDatabaseStmt;
typedef struct SUseDatabaseStmt {
......@@ -61,6 +62,7 @@ typedef struct SDropDatabaseStmt {
} SDropDatabaseStmt;
typedef struct STableOptions {
ENodeType type;
int32_t keep;
int32_t ttl;
char comments[TSDB_STB_COMMENT_LEN];
......@@ -81,7 +83,7 @@ typedef struct SCreateTableStmt {
bool ignoreExists;
SNodeList* pCols;
SNodeList* pTags;
STableOptions options;
STableOptions* pOptions;
} SCreateTableStmt;
typedef struct SCreateSubTableClause {
......@@ -155,6 +157,28 @@ typedef struct SShowStmt {
char dbName[TSDB_DB_NAME_LEN];
} SShowStmt;
typedef enum EIndexType {
INDEX_TYPE_SMA = 1,
INDEX_TYPE_FULLTEXT
} EIndexType;
typedef struct SIndexOptions {
ENodeType type;
SNodeList* pFuncs;
SNode* pInterval;
SNode* pOffset;
SNode* pSliding;
} SIndexOptions;
typedef struct SCreateIndexStmt {
ENodeType type;
EIndexType indexType;
char indexName[TSDB_INDEX_NAME_LEN];
char tableName[TSDB_TABLE_NAME_LEN];
SNodeList* pCols;
SIndexOptions* pOptions;
} SCreateIndexStmt;
#ifdef __cplusplus
}
#endif
......
......@@ -67,6 +67,9 @@ typedef enum ENodeType {
QUERY_NODE_SLOT_DESC,
QUERY_NODE_COLUMN_DEF,
QUERY_NODE_DOWNSTREAM_SOURCE,
QUERY_NODE_DATABASE_OPTIONS,
QUERY_NODE_TABLE_OPTIONS,
QUERY_NODE_INDEX_OPTIONS,
// Statement nodes are used in parser and planner module.
QUERY_NODE_SET_OPERATOR,
......@@ -93,6 +96,7 @@ typedef enum ENodeType {
QUERY_NODE_SHOW_DNODES_STMT,
QUERY_NODE_SHOW_VGROUPS_STMT,
QUERY_NODE_SHOW_MNODES_STMT,
QUERY_NODE_CREATE_INDEX_STMT,
// logic plan node
QUERY_NODE_LOGIC_PLAN_SCAN,
......@@ -185,6 +189,9 @@ const char* nodesNodeName(ENodeType type);
int32_t nodesNodeToString(const SNodeptr pNode, bool format, char** pStr, int32_t* pLen);
int32_t nodesStringToNode(const char* pStr, SNode** pNode);
int32_t nodesListToString(const SNodeList* pList, bool format, char** pStr, int32_t* pLen);
int32_t nodesStringToList(const char* pStr, SNodeList** pList);
#ifdef __cplusplus
}
#endif
......
......@@ -82,6 +82,7 @@ typedef struct SValueNode {
double d;
char* p;
} datum;
char unit;
} SValueNode;
typedef struct SOperatorNode {
......
......@@ -25,6 +25,7 @@ extern "C" {
typedef void SJson;
SJson* tjsonCreateObject();
SJson* tjsonCreateArray();
void tjsonDelete(SJson* pJson);
SJson* tjsonAddArrayToObject(SJson* pJson, const char* pName);
......
......@@ -151,8 +151,7 @@ static int32_t nodeListToJson(SJson* pJson, const char* pName, const SNodeList*
return TSDB_CODE_SUCCESS;
}
static int32_t jsonToNodeList(const SJson* pJson, const char* pName, SNodeList** pList) {
const SJson* pJsonArray = tjsonGetObjectItem(pJson, pName);
static int32_t jsonToNodeListImpl(const SJson* pJsonArray, SNodeList** pList) {
int32_t size = (NULL == pJsonArray ? 0 : tjsonGetArraySize(pJsonArray));
if (size > 0) {
*pList = nodesMakeList();
......@@ -176,6 +175,10 @@ static int32_t jsonToNodeList(const SJson* pJson, const char* pName, SNodeList**
return code;
}
static int32_t jsonToNodeList(const SJson* pJson, const char* pName, SNodeList** pList) {
return jsonToNodeListImpl(tjsonGetObjectItem(pJson, pName), pList);
}
static const char* jkTableMetaUid = "TableMetaUid";
static const char* jkTableMetaSuid = "TableMetaSuid";
......@@ -1750,3 +1753,52 @@ int32_t nodesStringToNode(const char* pStr, SNode** pNode) {
}
return TSDB_CODE_SUCCESS;
}
int32_t nodesListToString(const SNodeList* pList, bool format, char** pStr, int32_t* pLen) {
if (NULL == pList || NULL == pStr || NULL == pLen) {
terrno = TSDB_CODE_FAILED;
return TSDB_CODE_FAILED;
}
if (0 == LIST_LENGTH(pList)) {
return TSDB_CODE_SUCCESS;
}
SJson* pJson = tjsonCreateArray();
if (NULL == pJson) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
return TSDB_CODE_OUT_OF_MEMORY;
}
SNode* pNode;
FOREACH(pNode, pList) {
int32_t code = tjsonAddItem(pJson, nodeToJson, pNode);
if (TSDB_CODE_SUCCESS != code) {
terrno = code;
return code;
}
}
*pStr = format ? tjsonToString(pJson) : tjsonToUnformattedString(pJson);
tjsonDelete(pJson);
*pLen = strlen(*pStr) + 1;
return TSDB_CODE_SUCCESS;
}
int32_t nodesStringToList(const char* pStr, SNodeList** pList) {
if (NULL == pStr || NULL == pList) {
return TSDB_CODE_SUCCESS;
}
SJson* pJson = tjsonParse(pStr);
if (NULL == pJson) {
return TSDB_CODE_FAILED;
}
int32_t code = jsonToNodeListImpl(pJson, pList);
if (TSDB_CODE_SUCCESS != code) {
nodesDestroyList(*pList);
terrno = code;
return code;
}
return TSDB_CODE_SUCCESS;
}
......@@ -76,6 +76,12 @@ SNodeptr nodesMakeNode(ENodeType type) {
return makeNode(type, sizeof(SColumnDefNode));
case QUERY_NODE_DOWNSTREAM_SOURCE:
return makeNode(type, sizeof(SDownstreamSourceNode));
case QUERY_NODE_DATABASE_OPTIONS:
return makeNode(type, sizeof(SDatabaseOptions));
case QUERY_NODE_TABLE_OPTIONS:
return makeNode(type, sizeof(STableOptions));
case QUERY_NODE_INDEX_OPTIONS:
return makeNode(type, sizeof(SIndexOptions));
case QUERY_NODE_SET_OPERATOR:
return makeNode(type, sizeof(SSetOperator));
case QUERY_NODE_SELECT_STMT:
......@@ -122,6 +128,8 @@ SNodeptr nodesMakeNode(ENodeType type) {
case QUERY_NODE_SHOW_VGROUPS_STMT:
case QUERY_NODE_SHOW_MNODES_STMT:
return makeNode(type, sizeof(SShowStmt));
case QUERY_NODE_CREATE_INDEX_STMT:
return makeNode(type, sizeof(SCreateIndexStmt));
case QUERY_NODE_LOGIC_PLAN_SCAN:
return makeNode(type, sizeof(SScanLogicNode));
case QUERY_NODE_LOGIC_PLAN_JOIN:
......
......@@ -109,17 +109,17 @@ SNode* addLimitClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pLimit);
SNode* createSelectStmt(SAstCreateContext* pCxt, bool isDistinct, SNodeList* pProjectionList, SNode* pTable);
SNode* createSetOperator(SAstCreateContext* pCxt, ESetOperatorType type, SNode* pLeft, SNode* pRight);
SDatabaseOptions* createDefaultDatabaseOptions(SAstCreateContext* pCxt);
SDatabaseOptions* setDatabaseOption(SAstCreateContext* pCxt, SDatabaseOptions* pOptions, EDatabaseOptionType type, const SToken* pVal);
SNode* createCreateDatabaseStmt(SAstCreateContext* pCxt, bool ignoreExists, const SToken* pDbName, SDatabaseOptions* pOptions);
SNode* createDefaultDatabaseOptions(SAstCreateContext* pCxt);
SNode* setDatabaseOption(SAstCreateContext* pCxt, SNode* pOptions, EDatabaseOptionType type, const SToken* pVal);
SNode* createCreateDatabaseStmt(SAstCreateContext* pCxt, bool ignoreExists, const SToken* pDbName, SNode* pOptions);
SNode* createDropDatabaseStmt(SAstCreateContext* pCxt, bool ignoreNotExists, const SToken* pDbName);
STableOptions* createDefaultTableOptions(SAstCreateContext* pCxt);
STableOptions* setTableOption(SAstCreateContext* pCxt, STableOptions* pOptions, ETableOptionType type, const SToken* pVal);
STableOptions* setTableSmaOption(SAstCreateContext* pCxt, STableOptions* pOptions, SNodeList* pSma);
SNode* createDefaultTableOptions(SAstCreateContext* pCxt);
SNode* setTableOption(SAstCreateContext* pCxt, SNode* pOptions, ETableOptionType type, const SToken* pVal);
SNode* setTableSmaOption(SAstCreateContext* pCxt, SNode* pOptions, SNodeList* pSma);
SNode* createColumnDefNode(SAstCreateContext* pCxt, const SToken* pColName, SDataType dataType, const SToken* pComment);
SDataType createDataType(uint8_t type);
SDataType createVarLenDataType(uint8_t type, const SToken* pLen);
SNode* createCreateTableStmt(SAstCreateContext* pCxt, bool ignoreExists, SNode* pRealTable, SNodeList* pCols, SNodeList* pTags, STableOptions* pOptions);
SNode* createCreateTableStmt(SAstCreateContext* pCxt, bool ignoreExists, SNode* pRealTable, SNodeList* pCols, SNodeList* pTags, SNode* pOptions);
SNode* createCreateSubTableClause(SAstCreateContext* pCxt, bool ignoreExists, SNode* pRealTable, SNode* pUseRealTable, SNodeList* pSpecificTags, SNodeList* pValsOfTags);
SNode* createCreateMultiTableStmt(SAstCreateContext* pCxt, SNodeList* pSubTables);
SNode* createDropTableClause(SAstCreateContext* pCxt, bool ignoreNotExists, SNode* pRealTable);
......@@ -132,6 +132,8 @@ SNode* createAlterUserStmt(SAstCreateContext* pCxt, const SToken* pUserName, int
SNode* createDropUserStmt(SAstCreateContext* pCxt, const SToken* pUserName);
SNode* createCreateDnodeStmt(SAstCreateContext* pCxt, const SToken* pFqdn, const SToken* pPort);
SNode* createDropDnodeStmt(SAstCreateContext* pCxt, const SToken* pDnode);
SNode* createCreateIndexStmt(SAstCreateContext* pCxt, EIndexType type, const SToken* pIndexName, const SToken* pTableName, SNodeList* pCols, SNode* pOptions);
SNode* createIndexOption(SAstCreateContext* pCxt, SNodeList* pFuncs, SNode* pInterval, SNode* pOffset, SNode* pSliding);
#ifdef __cplusplus
}
......
......@@ -80,8 +80,6 @@ not_exists_opt(A) ::= .
exists_opt(A) ::= IF EXISTS. { A = true; }
exists_opt(A) ::= . { A = false; }
%type db_options { SDatabaseOptions* }
%destructor db_options { tfree($$); }
db_options(A) ::= . { A = createDefaultDatabaseOptions(pCxt); }
db_options(A) ::= db_options(B) BLOCKS NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_BLOCKS, &C); }
db_options(A) ::= db_options(B) CACHE NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_CACHE, &C); }
......@@ -179,8 +177,6 @@ tags_def_opt(A) ::= tags_def(B).
%destructor tags_def { nodesDestroyList($$); }
tags_def(A) ::= TAGS NK_LP column_def_list(B) NK_RP. { A = B; }
%type table_options { STableOptions* }
%destructor table_options { tfree($$); }
table_options(A) ::= . { A = createDefaultTableOptions(pCxt);}
table_options(A) ::= table_options(B) COMMENT NK_STRING(C). { A = setTableOption(pCxt, B, TABLE_OPTION_COMMENT, &C); }
table_options(A) ::= table_options(B) KEEP NK_INTEGER(C). { A = setTableOption(pCxt, B, TABLE_OPTION_KEEP, &C); }
......@@ -194,6 +190,24 @@ col_name_list(A) ::= col_name_list(B) NK_COMMA col_name(C).
col_name(A) ::= column_name(B). { A = createColumnNode(pCxt, NULL, &B); }
/************************************************ create index ********************************************************/
cmd ::= CREATE SMA INDEX index_name(A) ON table_name(B) index_options(C). { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, &A, &B, NULL, C); }
cmd ::= CREATE FULLTEXT INDEX
index_name(A) ON table_name(B) NK_LP col_name_list(C) NK_RP. { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_FULLTEXT, &A, &B, C, NULL); }
index_options(A) ::= . { A = NULL; }
index_options(A) ::= FUNCTION NK_LP func_list(B) NK_RP INTERVAL
NK_LP duration_literal(C) NK_RP sliding_opt(D). { A = createIndexOption(pCxt, B, C, NULL, D); }
index_options(A) ::= FUNCTION NK_LP func_list(B) NK_RP INTERVAL
NK_LP duration_literal(C) NK_COMMA duration_literal(D) NK_RP sliding_opt(E). { A = createIndexOption(pCxt, B, C, D, E); }
%type func_list { SNodeList* }
%destructor func_list { nodesDestroyList($$); }
func_list(A) ::= func(B). { A = createNodeList(pCxt, B); }
func_list(A) ::= func_list(B) NK_COMMA func(C). { A = addNodeToList(pCxt, B, C); }
func(A) ::= function_name(B) NK_LP expression_list(C) NK_RP. { A = createFunctionNode(pCxt, &B, C); }
/************************************************ show vgroups ********************************************************/
cmd ::= SHOW VGROUPS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, NULL); }
cmd ::= SHOW db_name(B) NK_DOT VGROUPS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, &B); }
......@@ -248,6 +262,10 @@ column_alias(A) ::= NK_ID(B).
%destructor user_name { }
user_name(A) ::= NK_ID(B). { A = B; }
%type index_name { SToken }
%destructor index_name { }
index_name(A) ::= NK_ID(B). { A = B; }
/************************************************ expression **********************************************************/
expression(A) ::= literal(B). { A = B; }
//expression(A) ::= NK_QUESTION(B). { A = B; }
......@@ -463,13 +481,13 @@ twindow_clause_opt(A) ::=
SESSION NK_LP column_reference(B) NK_COMMA NK_INTEGER(C) NK_RP. { A = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, B), &C); }
twindow_clause_opt(A) ::= STATE_WINDOW NK_LP column_reference(B) NK_RP. { A = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, B)); }
twindow_clause_opt(A) ::=
INTERVAL NK_LP duration_literal(B) NK_RP sliding_opt(C) fill_opt(D). { A = createIntervalWindowNode(pCxt, B, NULL, C, D); }
INTERVAL NK_LP duration_literal(B) NK_RP sliding_opt(C) fill_opt(D). { A = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, B), NULL, C, D); }
twindow_clause_opt(A) ::=
INTERVAL NK_LP duration_literal(B) NK_COMMA duration_literal(C) NK_RP
sliding_opt(D) fill_opt(E). { A = createIntervalWindowNode(pCxt, B, C, D, E); }
sliding_opt(D) fill_opt(E). { A = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C), D, E); }
sliding_opt(A) ::= . { A = NULL; }
sliding_opt(A) ::= SLIDING NK_LP duration_literal(B) NK_RP. { A = B; }
sliding_opt(A) ::= SLIDING NK_LP duration_literal(B) NK_RP. { A = releaseRawExprNode(pCxt, B); }
fill_opt(A) ::= . { A = NULL; }
fill_opt(A) ::= FILL NK_LP fill_mode(B) NK_RP. { A = createFillNode(pCxt, B, NULL); }
......
......@@ -420,6 +420,14 @@ static bool checkColumnName(SAstCreateContext* pCxt, const SToken* pColumnName)
return pCxt->valid;
}
static bool checkIndexName(SAstCreateContext* pCxt, const SToken* pIndexName) {
if (NULL == pIndexName) {
return false;
}
pCxt->valid = pIndexName->n < TSDB_INDEX_NAME_LEN ? true : false;
return pCxt->valid;
}
SNode* createRawExprNode(SAstCreateContext* pCxt, const SToken* pToken, SNode* pNode) {
SRawExprNode* target = (SRawExprNode*)nodesMakeNode(QUERY_NODE_RAW_EXPR);
CHECK_OUT_OF_MEM(target);
......@@ -741,8 +749,8 @@ SNode* createSetOperator(SAstCreateContext* pCxt, ESetOperatorType type, SNode*
return (SNode*)setOp;
}
SDatabaseOptions* createDefaultDatabaseOptions(SAstCreateContext* pCxt) {
SDatabaseOptions* pOptions = calloc(1, sizeof(SDatabaseOptions));
SNode* createDefaultDatabaseOptions(SAstCreateContext* pCxt) {
SDatabaseOptions* pOptions = nodesMakeNode(QUERY_NODE_DATABASE_OPTIONS);
CHECK_OUT_OF_MEM(pOptions);
pOptions->numOfBlocks = TSDB_DEFAULT_TOTAL_BLOCKS;
pOptions->cacheBlockSize = TSDB_DEFAULT_CACHE_BLOCK_SIZE;
......@@ -761,14 +769,14 @@ SDatabaseOptions* createDefaultDatabaseOptions(SAstCreateContext* pCxt) {
pOptions->numOfVgroups = TSDB_DEFAULT_VN_PER_DB;
pOptions->singleStable = TSDB_DEFAULT_DB_SINGLE_STABLE_OPTION;
pOptions->streamMode = TSDB_DEFAULT_DB_STREAM_MODE_OPTION;
return pOptions;
return (SNode*)pOptions;
}
SDatabaseOptions* setDatabaseOption(SAstCreateContext* pCxt, SDatabaseOptions* pOptions, EDatabaseOptionType type, const SToken* pVal) {
return setDbOptionFuncs[type](pCxt, pOptions, pVal);
SNode* setDatabaseOption(SAstCreateContext* pCxt, SNode* pOptions, EDatabaseOptionType type, const SToken* pVal) {
return (SNode*)setDbOptionFuncs[type](pCxt, (SDatabaseOptions*)pOptions, pVal);
}
SNode* createCreateDatabaseStmt(SAstCreateContext* pCxt, bool ignoreExists, const SToken* pDbName, SDatabaseOptions* pOptions) {
SNode* createCreateDatabaseStmt(SAstCreateContext* pCxt, bool ignoreExists, const SToken* pDbName, SNode* pOptions) {
if (!checkDbName(pCxt, pDbName)) {
return NULL;
}
......@@ -776,8 +784,7 @@ SNode* createCreateDatabaseStmt(SAstCreateContext* pCxt, bool ignoreExists, cons
CHECK_OUT_OF_MEM(pStmt);
strncpy(pStmt->dbName, pDbName->z, pDbName->n);
pStmt->ignoreExists = ignoreExists;
pStmt->options = *pOptions;
tfree(pOptions);
pStmt->pOptions = (SDatabaseOptions*)pOptions;
return (SNode*)pStmt;
}
......@@ -792,20 +799,20 @@ SNode* createDropDatabaseStmt(SAstCreateContext* pCxt, bool ignoreNotExists, con
return (SNode*)pStmt;
}
STableOptions* createDefaultTableOptions(SAstCreateContext* pCxt) {
STableOptions* pOptions = calloc(1, sizeof(STableOptions));
SNode* createDefaultTableOptions(SAstCreateContext* pCxt) {
STableOptions* pOptions = nodesMakeNode(QUERY_NODE_TABLE_OPTIONS);
CHECK_OUT_OF_MEM(pOptions);
pOptions->keep = TSDB_DEFAULT_KEEP;
pOptions->ttl = TSDB_DEFAULT_DB_TTL_OPTION;
return pOptions;
return (SNode*)pOptions;
}
STableOptions* setTableOption(SAstCreateContext* pCxt, STableOptions* pOptions, ETableOptionType type, const SToken* pVal) {
return setTableOptionFuncs[type](pCxt, pOptions, pVal);
SNode* setTableOption(SAstCreateContext* pCxt, SNode* pOptions, ETableOptionType type, const SToken* pVal) {
return (SNode*)setTableOptionFuncs[type](pCxt, (STableOptions*)pOptions, pVal);
}
STableOptions* setTableSmaOption(SAstCreateContext* pCxt, STableOptions* pOptions, SNodeList* pSma) {
pOptions->pSma = pSma;
SNode* setTableSmaOption(SAstCreateContext* pCxt, SNode* pOptions, SNodeList* pSma) {
((STableOptions*)pOptions)->pSma = pSma;
return pOptions;
}
......@@ -831,7 +838,7 @@ SDataType createVarLenDataType(uint8_t type, const SToken* pLen) {
}
SNode* createCreateTableStmt(SAstCreateContext* pCxt,
bool ignoreExists, SNode* pRealTable, SNodeList* pCols, SNodeList* pTags, STableOptions* pOptions) {
bool ignoreExists, SNode* pRealTable, SNodeList* pCols, SNodeList* pTags, SNode* pOptions) {
SCreateTableStmt* pStmt = (SCreateTableStmt*)nodesMakeNode(QUERY_NODE_CREATE_TABLE_STMT);
CHECK_OUT_OF_MEM(pStmt);
strcpy(pStmt->dbName, ((SRealTableNode*)pRealTable)->table.dbName);
......@@ -839,9 +846,7 @@ SNode* createCreateTableStmt(SAstCreateContext* pCxt,
pStmt->ignoreExists = ignoreExists;
pStmt->pCols = pCols;
pStmt->pTags = pTags;
pStmt->options = *pOptions;
nodesDestroyList(pOptions->pSma);
tfree(pOptions);
pStmt->pOptions = (STableOptions*)pOptions;
nodesDestroyNode(pRealTable);
return (SNode*)pStmt;
}
......@@ -992,3 +997,27 @@ SNode* createDropDnodeStmt(SAstCreateContext* pCxt, const SToken* pDnode) {
}
return (SNode*)pStmt;
}
SNode* createCreateIndexStmt(SAstCreateContext* pCxt, EIndexType type, const SToken* pIndexName, const SToken* pTableName, SNodeList* pCols, SNode* pOptions) {
if (!checkIndexName(pCxt, pIndexName) || !checkTableName(pCxt, pTableName)) {
return NULL;
}
SCreateIndexStmt* pStmt = nodesMakeNode(QUERY_NODE_CREATE_INDEX_STMT);
CHECK_OUT_OF_MEM(pStmt);
pStmt->indexType = type;
strncpy(pStmt->indexName, pIndexName->z, pIndexName->n);
strncpy(pStmt->tableName, pTableName->z, pTableName->n);
pStmt->pCols = pCols;
pStmt->pOptions = (SIndexOptions*)pOptions;
return (SNode*)pStmt;
}
SNode* createIndexOption(SAstCreateContext* pCxt, SNodeList* pFuncs, SNode* pInterval, SNode* pOffset, SNode* pSliding) {
SIndexOptions* pOptions = nodesMakeNode(QUERY_NODE_INDEX_OPTIONS);
CHECK_OUT_OF_MEM(pOptions);
pOptions->pFuncs = pFuncs;
pOptions->pInterval = pInterval;
pOptions->pOffset = pOffset;
pOptions->pSliding = pSliding;
return (SNode*)pOptions;
}
......@@ -59,11 +59,13 @@ static SKeyword keywordTable[] = {
{"FLOAT", TK_FLOAT},
{"FROM", TK_FROM},
{"FSYNC", TK_FSYNC},
{"FUNCTION", TK_FUNCTION},
{"GROUP", TK_GROUP},
{"HAVING", TK_HAVING},
{"IF", TK_IF},
{"IMPORT", TK_IMPORT},
{"IN", TK_IN},
{"INDEX", TK_INDEX},
{"INNER", TK_INNER},
{"INT", TK_INT},
{"INSERT", TK_INSERT},
......@@ -230,7 +232,6 @@ static SKeyword keywordTable[] = {
// {"TOPICS", TK_TOPICS},
// {"COMPACT", TK_COMPACT},
// {"MODIFY", TK_MODIFY},
// {"FUNCTION", TK_FUNCTION},
// {"FUNCTIONS", TK_FUNCTIONS},
// {"OUTPUTTYPE", TK_OUTPUTTYPE},
// {"AGGREGATE", TK_AGGREGATE},
......
......@@ -254,8 +254,7 @@ static int32_t trimStringWithVarFormat(const char* src, int32_t len, bool format
static EDealRes translateValue(STranslateContext* pCxt, SValueNode* pVal) {
if (pVal->isDuration) {
char unit = 0;
if (parseAbsoluteDuration(pVal->literal, strlen(pVal->literal), &pVal->datum.i, &unit, pVal->node.resType.precision) != TSDB_CODE_SUCCESS) {
if (parseAbsoluteDuration(pVal->literal, strlen(pVal->literal), &pVal->datum.i, &pVal->unit, pVal->node.resType.precision) != TSDB_CODE_SUCCESS) {
return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_WRONG_VALUE_TYPE, pVal->literal);
}
} else {
......@@ -768,26 +767,26 @@ static void buildCreateDbReq(STranslateContext* pCxt, SCreateDatabaseStmt* pStmt
SName name = {0};
tNameSetDbName(&name, pCxt->pParseCxt->acctId, pStmt->dbName, strlen(pStmt->dbName));
tNameGetFullDbName(&name, pReq->db);
pReq->numOfVgroups = pStmt->options.numOfVgroups;
pReq->cacheBlockSize = pStmt->options.cacheBlockSize;
pReq->totalBlocks = pStmt->options.numOfBlocks;
pReq->daysPerFile = pStmt->options.daysPerFile;
pReq->daysToKeep0 = pStmt->options.keep;
pReq->numOfVgroups = pStmt->pOptions->numOfVgroups;
pReq->cacheBlockSize = pStmt->pOptions->cacheBlockSize;
pReq->totalBlocks = pStmt->pOptions->numOfBlocks;
pReq->daysPerFile = pStmt->pOptions->daysPerFile;
pReq->daysToKeep0 = pStmt->pOptions->keep;
pReq->daysToKeep1 = -1;
pReq->daysToKeep2 = -1;
pReq->minRows = pStmt->options.minRowsPerBlock;
pReq->maxRows = pStmt->options.maxRowsPerBlock;
pReq->minRows = pStmt->pOptions->minRowsPerBlock;
pReq->maxRows = pStmt->pOptions->maxRowsPerBlock;
pReq->commitTime = -1;
pReq->fsyncPeriod = pStmt->options.fsyncPeriod;
pReq->walLevel = pStmt->options.walLevel;
pReq->precision = pStmt->options.precision;
pReq->compression = pStmt->options.compressionLevel;
pReq->replications = pStmt->options.replica;
pReq->quorum = pStmt->options.quorum;
pReq->fsyncPeriod = pStmt->pOptions->fsyncPeriod;
pReq->walLevel = pStmt->pOptions->walLevel;
pReq->precision = pStmt->pOptions->precision;
pReq->compression = pStmt->pOptions->compressionLevel;
pReq->replications = pStmt->pOptions->replica;
pReq->quorum = pStmt->pOptions->quorum;
pReq->update = -1;
pReq->cacheLastRow = pStmt->options.cachelast;
pReq->cacheLastRow = pStmt->pOptions->cachelast;
pReq->ignoreExist = pStmt->ignoreExists;
pReq->streamMode = pStmt->options.streamMode;
pReq->streamMode = pStmt->pOptions->streamMode;
return;
}
......@@ -1141,6 +1140,63 @@ static int32_t translateShowTables(STranslateContext* pCxt) {
return TSDB_CODE_SUCCESS;
}
static int32_t translateCreateSmaIndex(STranslateContext* pCxt, SCreateIndexStmt* pStmt) {
SVCreateTSmaReq createSmaReq = {0};
if (DEAL_RES_ERROR == translateValue(pCxt, (SValueNode*)pStmt->pOptions->pInterval) ||
(NULL != pStmt->pOptions->pOffset && DEAL_RES_ERROR == translateValue(pCxt, (SValueNode*)pStmt->pOptions->pOffset)) ||
(NULL != pStmt->pOptions->pSliding && DEAL_RES_ERROR == translateValue(pCxt, (SValueNode*)pStmt->pOptions->pSliding))) {
return pCxt->errCode;
}
createSmaReq.tSma.intervalUnit = ((SValueNode*)pStmt->pOptions->pInterval)->unit;
createSmaReq.tSma.slidingUnit = (NULL != pStmt->pOptions->pSliding ? ((SValueNode*)pStmt->pOptions->pSliding)->unit : 0);
strcpy(createSmaReq.tSma.indexName, pStmt->indexName);
SName name;
name.type = TSDB_TABLE_NAME_T;
name.acctId = pCxt->pParseCxt->acctId;
strcpy(name.dbname, pCxt->pParseCxt->db);
strcpy(name.tname, pStmt->tableName);
STableMeta* pMeta = NULL;
int32_t code = catalogGetTableMeta(pCxt->pParseCxt->pCatalog, pCxt->pParseCxt->pTransporter, &pCxt->pParseCxt->mgmtEpSet, &name, &pMeta);
if (TSDB_CODE_SUCCESS != code) {
return code;
}
createSmaReq.tSma.tableUid = pMeta->uid;
createSmaReq.tSma.interval = ((SValueNode*)pStmt->pOptions->pInterval)->datum.i;
createSmaReq.tSma.sliding = (NULL != pStmt->pOptions->pSliding ? ((SValueNode*)pStmt->pOptions->pSliding)->datum.i : 0);
code = nodesListToString(pStmt->pCols, false, &createSmaReq.tSma.expr, &createSmaReq.tSma.exprLen);
if (TSDB_CODE_SUCCESS != code) {
return code;
}
pCxt->pCmdMsg = malloc(sizeof(SCmdMsgInfo));
if (NULL== pCxt->pCmdMsg) {
return TSDB_CODE_OUT_OF_MEMORY;
}
pCxt->pCmdMsg->epSet = pCxt->pParseCxt->mgmtEpSet;
pCxt->pCmdMsg->msgType = TDMT_VND_CREATE_SMA;
pCxt->pCmdMsg->msgLen = tSerializeSVCreateTSmaReq(NULL, &createSmaReq);
pCxt->pCmdMsg->pMsg = malloc(pCxt->pCmdMsg->msgLen);
if (NULL== pCxt->pCmdMsg->pMsg) {
return TSDB_CODE_OUT_OF_MEMORY;
}
tSerializeSVCreateTSmaReq(pCxt->pCmdMsg->pMsg, &createSmaReq);
return TSDB_CODE_SUCCESS;
}
static int32_t translateCreateIndex(STranslateContext* pCxt, SCreateIndexStmt* pStmt) {
if (INDEX_TYPE_SMA == pStmt->indexType) {
return translateCreateSmaIndex(pCxt, pStmt);
} else {
// todo fulltext index
return TSDB_CODE_FAILED;
}
}
static int32_t translateQuery(STranslateContext* pCxt, SNode* pNode) {
int32_t code = TSDB_CODE_SUCCESS;
switch (nodeType(pNode)) {
......@@ -1191,6 +1247,9 @@ static int32_t translateQuery(STranslateContext* pCxt, SNode* pNode) {
case QUERY_NODE_SHOW_TABLES_STMT:
code = translateShowTables(pCxt);
break;
case QUERY_NODE_CREATE_INDEX_STMT:
code = translateCreateIndex(pCxt, (SCreateIndexStmt*)pNode);
break;
default:
break;
}
......
......@@ -99,24 +99,22 @@
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned char
#define YYNOCODE 209
#define YYNOCODE 216
#define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE SToken
typedef union {
int yyinit;
ParseTOKENTYPE yy0;
SNodeList* yy46;
SDataType yy70;
SToken yy129;
ENullOrder yy147;
bool yy185;
EOrder yy202;
SNode* yy256;
EJoinType yy266;
EOperatorType yy326;
STableOptions* yy340;
EFillMode yy360;
SDatabaseOptions* yy391;
EOrder yy2;
EJoinType yy36;
SToken yy209;
ENullOrder yy217;
EOperatorType yy236;
SNodeList* yy280;
bool yy281;
SDataType yy304;
EFillMode yy342;
SNode* yy344;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
......@@ -131,17 +129,17 @@ typedef union {
#define ParseCTX_PARAM
#define ParseCTX_FETCH
#define ParseCTX_STORE
#define YYNSTATE 279
#define YYNRULE 237
#define YYNTOKEN 135
#define YY_MAX_SHIFT 278
#define YY_MIN_SHIFTREDUCE 439
#define YY_MAX_SHIFTREDUCE 675
#define YY_ERROR_ACTION 676
#define YY_ACCEPT_ACTION 677
#define YY_NO_ACTION 678
#define YY_MIN_REDUCE 679
#define YY_MAX_REDUCE 915
#define YYNSTATE 308
#define YYNRULE 246
#define YYNTOKEN 138
#define YY_MAX_SHIFT 307
#define YY_MIN_SHIFTREDUCE 475
#define YY_MAX_SHIFTREDUCE 720
#define YY_ERROR_ACTION 721
#define YY_ACCEPT_ACTION 722
#define YY_NO_ACTION 723
#define YY_MIN_REDUCE 724
#define YY_MAX_REDUCE 969
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
......@@ -208,285 +206,318 @@ typedef union {
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (905)
#define YY_ACTTAB_COUNT (1037)
static const YYACTIONTYPE yy_action[] = {
/* 0 */ 137, 149, 23, 95, 772, 721, 770, 247, 150, 784,
/* 10 */ 782, 148, 30, 28, 26, 25, 24, 784, 782, 194,
/* 20 */ 177, 808, 201, 735, 66, 30, 28, 26, 25, 24,
/* 30 */ 692, 166, 194, 222, 808, 60, 208, 132, 793, 782,
/* 40 */ 195, 209, 222, 54, 794, 730, 797, 833, 733, 58,
/* 50 */ 132, 139, 829, 906, 19, 785, 782, 733, 558, 73,
/* 60 */ 840, 841, 867, 845, 30, 28, 26, 25, 24, 271,
/* 70 */ 270, 269, 268, 267, 266, 265, 264, 263, 262, 261,
/* 80 */ 260, 259, 258, 257, 256, 255, 26, 25, 24, 550,
/* 90 */ 22, 141, 171, 576, 577, 578, 579, 580, 581, 582,
/* 100 */ 584, 585, 586, 22, 141, 617, 576, 577, 578, 579,
/* 110 */ 580, 581, 582, 584, 585, 586, 275, 274, 499, 245,
/* 120 */ 244, 243, 503, 242, 505, 506, 241, 508, 238, 41,
/* 130 */ 514, 235, 516, 517, 232, 229, 194, 194, 808, 808,
/* 140 */ 729, 184, 793, 782, 195, 77, 45, 53, 794, 170,
/* 150 */ 797, 833, 194, 719, 808, 131, 829, 726, 793, 782,
/* 160 */ 195, 104, 93, 125, 794, 145, 797, 894, 153, 78,
/* 170 */ 221, 772, 180, 770, 808, 103, 736, 66, 793, 782,
/* 180 */ 195, 76, 209, 54, 794, 892, 797, 833, 194, 254,
/* 190 */ 808, 139, 829, 71, 793, 782, 195, 221, 42, 54,
/* 200 */ 794, 101, 797, 833, 772, 94, 771, 139, 829, 906,
/* 210 */ 616, 156, 860, 894, 180, 254, 808, 551, 890, 50,
/* 220 */ 793, 782, 195, 10, 47, 54, 794, 893, 797, 833,
/* 230 */ 194, 892, 808, 139, 829, 71, 793, 782, 195, 29,
/* 240 */ 27, 54, 794, 677, 797, 833, 41, 187, 539, 139,
/* 250 */ 829, 906, 114, 61, 861, 763, 537, 728, 146, 221,
/* 260 */ 851, 29, 27, 618, 11, 194, 182, 808, 196, 548,
/* 270 */ 539, 793, 782, 195, 77, 639, 121, 794, 537, 797,
/* 280 */ 146, 194, 56, 808, 1, 10, 11, 793, 782, 195,
/* 290 */ 79, 51, 55, 794, 894, 797, 833, 9, 8, 62,
/* 300 */ 832, 829, 725, 223, 222, 449, 1, 219, 76, 173,
/* 310 */ 248, 152, 892, 212, 538, 540, 543, 720, 191, 733,
/* 320 */ 194, 573, 808, 735, 66, 223, 793, 782, 195, 6,
/* 330 */ 613, 125, 794, 157, 797, 77, 538, 540, 543, 194,
/* 340 */ 222, 808, 96, 220, 184, 793, 782, 195, 29, 27,
/* 350 */ 119, 794, 163, 797, 594, 733, 847, 539, 172, 167,
/* 360 */ 165, 88, 29, 27, 251, 537, 188, 146, 250, 186,
/* 370 */ 894, 539, 222, 11, 844, 109, 847, 177, 852, 537,
/* 380 */ 613, 146, 192, 252, 76, 863, 154, 733, 892, 194,
/* 390 */ 177, 808, 60, 1, 843, 793, 782, 195, 735, 66,
/* 400 */ 55, 794, 249, 797, 833, 60, 58, 7, 181, 829,
/* 410 */ 184, 449, 223, 9, 8, 179, 72, 840, 841, 58,
/* 420 */ 845, 450, 451, 538, 540, 543, 223, 85, 189, 91,
/* 430 */ 840, 176, 625, 175, 82, 847, 894, 538, 540, 543,
/* 440 */ 178, 98, 29, 27, 183, 222, 29, 27, 155, 548,
/* 450 */ 76, 539, 809, 842, 892, 539, 674, 675, 77, 537,
/* 460 */ 733, 146, 194, 537, 808, 146, 20, 2, 793, 782,
/* 470 */ 195, 29, 27, 55, 794, 583, 797, 833, 587, 211,
/* 480 */ 539, 217, 830, 551, 215, 642, 539, 7, 537, 588,
/* 490 */ 146, 1, 864, 194, 537, 808, 31, 164, 161, 793,
/* 500 */ 782, 195, 555, 874, 68, 794, 223, 797, 80, 31,
/* 510 */ 223, 162, 640, 641, 643, 644, 7, 538, 540, 543,
/* 520 */ 789, 538, 540, 543, 106, 543, 194, 787, 808, 492,
/* 530 */ 159, 63, 793, 782, 195, 223, 64, 125, 794, 140,
/* 540 */ 797, 223, 873, 185, 907, 718, 538, 540, 543, 194,
/* 550 */ 160, 808, 538, 540, 543, 793, 782, 195, 487, 84,
/* 560 */ 68, 794, 138, 797, 194, 56, 808, 5, 854, 174,
/* 570 */ 793, 782, 195, 520, 70, 120, 794, 524, 797, 194,
/* 580 */ 227, 808, 4, 87, 63, 793, 782, 195, 158, 613,
/* 590 */ 122, 794, 251, 797, 89, 194, 250, 808, 529, 547,
/* 600 */ 908, 793, 782, 195, 59, 64, 117, 794, 65, 797,
/* 610 */ 194, 252, 808, 550, 848, 63, 793, 782, 195, 32,
/* 620 */ 16, 123, 794, 142, 797, 194, 815, 808, 90, 909,
/* 630 */ 249, 793, 782, 195, 193, 891, 118, 794, 194, 797,
/* 640 */ 808, 97, 546, 190, 793, 782, 195, 197, 210, 124,
/* 650 */ 794, 194, 797, 808, 40, 102, 552, 793, 782, 195,
/* 660 */ 734, 213, 805, 794, 147, 797, 194, 46, 808, 113,
/* 670 */ 44, 225, 793, 782, 195, 115, 110, 804, 794, 194,
/* 680 */ 797, 808, 278, 3, 128, 793, 782, 195, 129, 116,
/* 690 */ 803, 794, 31, 797, 194, 14, 808, 81, 636, 83,
/* 700 */ 793, 782, 195, 35, 638, 135, 794, 194, 797, 808,
/* 710 */ 69, 86, 37, 793, 782, 195, 632, 631, 134, 794,
/* 720 */ 194, 797, 808, 168, 38, 169, 793, 782, 195, 787,
/* 730 */ 610, 136, 794, 18, 797, 194, 15, 808, 609, 92,
/* 740 */ 207, 793, 782, 195, 206, 546, 133, 794, 205, 797,
/* 750 */ 33, 194, 34, 808, 75, 8, 574, 793, 782, 195,
/* 760 */ 556, 665, 126, 794, 17, 797, 177, 202, 12, 39,
/* 770 */ 660, 659, 143, 664, 204, 203, 30, 28, 26, 25,
/* 780 */ 24, 60, 99, 663, 130, 144, 13, 776, 218, 695,
/* 790 */ 127, 67, 775, 774, 112, 58, 200, 773, 199, 724,
/* 800 */ 198, 100, 57, 21, 723, 74, 840, 841, 111, 845,
/* 810 */ 694, 688, 683, 30, 28, 26, 25, 24, 30, 28,
/* 820 */ 26, 25, 24, 722, 458, 693, 30, 28, 26, 25,
/* 830 */ 24, 52, 687, 686, 107, 682, 681, 214, 680, 216,
/* 840 */ 105, 43, 47, 786, 226, 108, 224, 541, 36, 151,
/* 850 */ 513, 230, 521, 228, 512, 511, 518, 231, 233, 236,
/* 860 */ 515, 509, 234, 239, 558, 237, 510, 507, 498, 528,
/* 870 */ 240, 527, 526, 246, 77, 456, 48, 477, 253, 476,
/* 880 */ 470, 49, 475, 474, 473, 472, 471, 469, 685, 468,
/* 890 */ 467, 466, 465, 464, 671, 672, 463, 462, 461, 272,
/* 900 */ 273, 684, 679, 276, 277,
/* 0 */ 152, 235, 276, 862, 835, 251, 251, 167, 185, 775,
/* 10 */ 838, 835, 31, 29, 27, 26, 25, 837, 835, 208,
/* 20 */ 778, 778, 165, 178, 837, 31, 29, 27, 26, 25,
/* 30 */ 737, 39, 9, 8, 780, 70, 151, 145, 61, 817,
/* 40 */ 250, 815, 773, 235, 251, 862, 235, 248, 862, 164,
/* 50 */ 145, 835, 823, 238, 237, 24, 109, 847, 603, 778,
/* 60 */ 58, 848, 851, 887, 212, 662, 10, 886, 883, 300,
/* 70 */ 299, 298, 297, 296, 295, 294, 293, 292, 291, 290,
/* 80 */ 289, 288, 287, 286, 285, 284, 304, 303, 250, 639,
/* 90 */ 31, 29, 27, 26, 25, 23, 159, 592, 621, 622,
/* 100 */ 623, 624, 625, 626, 627, 629, 630, 631, 23, 159,
/* 110 */ 186, 621, 622, 623, 624, 625, 626, 627, 629, 630,
/* 120 */ 631, 31, 29, 27, 26, 25, 535, 274, 273, 272,
/* 130 */ 539, 271, 541, 542, 270, 544, 267, 20, 550, 264,
/* 140 */ 552, 553, 261, 258, 235, 87, 862, 31, 29, 27,
/* 150 */ 26, 25, 835, 75, 766, 237, 213, 223, 847, 86,
/* 160 */ 82, 56, 848, 851, 887, 54, 948, 603, 144, 883,
/* 170 */ 250, 130, 219, 65, 661, 195, 770, 134, 71, 947,
/* 180 */ 948, 593, 40, 946, 222, 84, 862, 64, 83, 764,
/* 190 */ 186, 583, 835, 81, 39, 237, 10, 946, 847, 581,
/* 200 */ 223, 57, 848, 851, 887, 774, 62, 207, 154, 883,
/* 210 */ 76, 716, 717, 27, 26, 25, 102, 894, 218, 485,
/* 220 */ 217, 166, 105, 948, 817, 283, 815, 189, 200, 914,
/* 230 */ 222, 125, 862, 283, 214, 209, 81, 594, 835, 60,
/* 240 */ 946, 237, 485, 277, 847, 124, 252, 57, 848, 851,
/* 250 */ 887, 82, 486, 487, 154, 883, 76, 251, 226, 235,
/* 260 */ 249, 862, 582, 584, 587, 82, 251, 835, 55, 122,
/* 270 */ 237, 120, 778, 847, 106, 915, 57, 848, 851, 887,
/* 280 */ 169, 778, 205, 154, 883, 960, 99, 235, 251, 862,
/* 290 */ 722, 172, 780, 70, 921, 835, 171, 247, 237, 127,
/* 300 */ 199, 847, 808, 778, 57, 848, 851, 887, 780, 70,
/* 310 */ 595, 154, 883, 960, 48, 104, 235, 188, 862, 21,
/* 320 */ 30, 28, 944, 173, 835, 771, 220, 237, 628, 583,
/* 330 */ 847, 632, 230, 57, 848, 851, 887, 581, 765, 161,
/* 340 */ 154, 883, 960, 6, 901, 12, 948, 30, 28, 663,
/* 350 */ 170, 905, 901, 817, 863, 815, 583, 917, 901, 81,
/* 360 */ 235, 898, 862, 946, 581, 1, 161, 658, 835, 897,
/* 370 */ 234, 237, 12, 223, 847, 896, 670, 133, 848, 851,
/* 380 */ 227, 824, 238, 225, 252, 280, 30, 28, 91, 279,
/* 390 */ 781, 70, 1, 592, 108, 583, 948, 30, 28, 231,
/* 400 */ 582, 584, 587, 581, 281, 161, 583, 174, 817, 81,
/* 410 */ 816, 252, 194, 946, 581, 192, 161, 906, 658, 196,
/* 420 */ 82, 2, 12, 278, 590, 684, 68, 582, 584, 587,
/* 430 */ 618, 7, 59, 96, 633, 235, 763, 862, 9, 8,
/* 440 */ 94, 32, 1, 835, 600, 228, 237, 719, 720, 847,
/* 450 */ 252, 32, 58, 848, 851, 887, 30, 28, 236, 233,
/* 460 */ 883, 252, 842, 30, 28, 583, 582, 584, 587, 840,
/* 470 */ 38, 53, 583, 581, 576, 161, 50, 582, 584, 587,
/* 480 */ 581, 32, 161, 280, 187, 85, 82, 279, 30, 28,
/* 490 */ 190, 184, 235, 596, 862, 183, 590, 583, 150, 182,
/* 500 */ 835, 7, 281, 237, 197, 581, 847, 161, 7, 72,
/* 510 */ 848, 851, 114, 591, 206, 219, 243, 119, 179, 112,
/* 520 */ 252, 278, 528, 66, 67, 181, 180, 252, 523, 68,
/* 530 */ 64, 597, 556, 1, 198, 59, 582, 584, 587, 256,
/* 540 */ 595, 560, 918, 582, 584, 587, 224, 961, 67, 62,
/* 550 */ 565, 928, 252, 241, 92, 69, 175, 68, 221, 77,
/* 560 */ 894, 895, 67, 899, 235, 587, 862, 203, 582, 584,
/* 570 */ 587, 95, 835, 927, 153, 237, 5, 98, 847, 908,
/* 580 */ 74, 58, 848, 851, 887, 100, 235, 687, 862, 884,
/* 590 */ 202, 4, 216, 63, 835, 658, 594, 237, 160, 902,
/* 600 */ 847, 945, 33, 138, 848, 851, 101, 155, 235, 232,
/* 610 */ 862, 204, 685, 686, 688, 689, 835, 963, 229, 237,
/* 620 */ 201, 107, 847, 17, 869, 138, 848, 851, 822, 239,
/* 630 */ 244, 235, 126, 862, 240, 49, 821, 47, 123, 835,
/* 640 */ 307, 254, 237, 245, 116, 847, 163, 128, 137, 848,
/* 650 */ 851, 235, 142, 862, 246, 129, 779, 143, 829, 835,
/* 660 */ 176, 177, 237, 740, 235, 847, 862, 828, 72, 848,
/* 670 */ 851, 827, 835, 494, 738, 237, 158, 191, 847, 215,
/* 680 */ 826, 138, 848, 851, 769, 768, 235, 739, 862, 31,
/* 690 */ 29, 27, 26, 25, 835, 88, 193, 237, 162, 733,
/* 700 */ 847, 728, 767, 138, 848, 851, 962, 732, 731, 727,
/* 710 */ 726, 235, 219, 862, 725, 819, 41, 89, 90, 835,
/* 720 */ 3, 14, 237, 93, 683, 847, 32, 64, 136, 848,
/* 730 */ 851, 235, 210, 862, 36, 73, 97, 211, 42, 835,
/* 740 */ 677, 676, 237, 43, 15, 847, 62, 34, 139, 848,
/* 750 */ 851, 655, 840, 235, 19, 862, 78, 894, 895, 35,
/* 760 */ 899, 835, 654, 16, 237, 11, 705, 847, 44, 103,
/* 770 */ 131, 848, 851, 704, 710, 235, 80, 862, 156, 709,
/* 780 */ 708, 157, 8, 835, 601, 110, 237, 619, 13, 847,
/* 790 */ 18, 113, 140, 848, 851, 818, 111, 681, 235, 115,
/* 800 */ 862, 242, 45, 46, 117, 118, 835, 839, 585, 237,
/* 810 */ 50, 121, 847, 37, 255, 132, 848, 851, 235, 557,
/* 820 */ 862, 253, 168, 257, 534, 554, 835, 259, 260, 237,
/* 830 */ 551, 235, 847, 862, 262, 141, 848, 851, 263, 835,
/* 840 */ 545, 265, 237, 266, 268, 847, 543, 269, 859, 848,
/* 850 */ 851, 549, 548, 235, 547, 862, 546, 275, 51, 52,
/* 860 */ 564, 835, 563, 562, 237, 506, 492, 847, 513, 512,
/* 870 */ 858, 848, 851, 282, 511, 510, 509, 508, 235, 507,
/* 880 */ 862, 505, 504, 503, 502, 501, 835, 500, 499, 237,
/* 890 */ 498, 497, 847, 730, 301, 857, 848, 851, 235, 302,
/* 900 */ 862, 729, 724, 305, 306, 723, 835, 723, 723, 237,
/* 910 */ 723, 723, 847, 723, 723, 148, 848, 851, 723, 723,
/* 920 */ 235, 723, 862, 723, 723, 723, 723, 723, 835, 723,
/* 930 */ 723, 237, 723, 723, 847, 723, 723, 147, 848, 851,
/* 940 */ 723, 723, 235, 723, 862, 723, 723, 723, 723, 723,
/* 950 */ 835, 723, 723, 237, 723, 723, 847, 723, 723, 149,
/* 960 */ 848, 851, 723, 723, 723, 235, 723, 862, 723, 723,
/* 970 */ 723, 723, 723, 835, 723, 219, 237, 723, 723, 847,
/* 980 */ 723, 723, 146, 848, 851, 235, 723, 862, 723, 723,
/* 990 */ 64, 723, 723, 835, 723, 723, 237, 723, 723, 847,
/* 1000 */ 723, 723, 135, 848, 851, 723, 723, 723, 723, 62,
/* 1010 */ 723, 723, 723, 723, 723, 723, 723, 723, 723, 79,
/* 1020 */ 894, 895, 22, 899, 723, 723, 723, 723, 723, 723,
/* 1030 */ 723, 723, 31, 29, 27, 26, 25,
};
static const YYCODETYPE yy_lookahead[] = {
/* 0 */ 152, 154, 171, 172, 157, 0, 159, 158, 152, 161,
/* 10 */ 162, 144, 12, 13, 14, 15, 16, 161, 162, 155,
/* 20 */ 140, 157, 140, 156, 157, 12, 13, 14, 15, 16,
/* 30 */ 0, 167, 155, 140, 157, 155, 143, 37, 161, 162,
/* 40 */ 163, 36, 140, 166, 167, 143, 169, 170, 155, 169,
/* 50 */ 37, 174, 175, 176, 2, 161, 162, 155, 58, 179,
/* 60 */ 180, 181, 185, 183, 12, 13, 14, 15, 16, 39,
/* 0 */ 155, 158, 161, 160, 166, 143, 143, 155, 146, 146,
/* 10 */ 172, 166, 12, 13, 14, 15, 16, 172, 166, 176,
/* 20 */ 158, 158, 147, 143, 172, 12, 13, 14, 15, 16,
/* 30 */ 0, 145, 1, 2, 159, 160, 157, 37, 152, 160,
/* 40 */ 31, 162, 156, 158, 143, 160, 158, 146, 160, 165,
/* 50 */ 37, 166, 168, 169, 169, 179, 180, 172, 58, 158,
/* 60 */ 175, 176, 177, 178, 176, 4, 57, 182, 183, 39,
/* 70 */ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
/* 80 */ 50, 51, 52, 53, 54, 55, 14, 15, 16, 31,
/* 90 */ 90, 91, 31, 93, 94, 95, 96, 97, 98, 99,
/* 100 */ 100, 101, 102, 90, 91, 4, 93, 94, 95, 96,
/* 110 */ 97, 98, 99, 100, 101, 102, 137, 138, 67, 68,
/* 120 */ 69, 70, 71, 72, 73, 74, 75, 76, 77, 142,
/* 130 */ 79, 80, 81, 82, 83, 84, 155, 155, 157, 157,
/* 140 */ 153, 160, 161, 162, 163, 108, 139, 166, 167, 167,
/* 150 */ 169, 170, 155, 0, 157, 174, 175, 150, 161, 162,
/* 160 */ 163, 19, 104, 166, 167, 168, 169, 186, 154, 27,
/* 170 */ 31, 157, 155, 159, 157, 33, 156, 157, 161, 162,
/* 180 */ 163, 200, 36, 166, 167, 204, 169, 170, 155, 36,
/* 190 */ 157, 174, 175, 176, 161, 162, 163, 31, 56, 166,
/* 200 */ 167, 59, 169, 170, 157, 188, 159, 174, 175, 176,
/* 210 */ 109, 194, 195, 186, 155, 36, 157, 31, 185, 57,
/* 220 */ 161, 162, 163, 57, 62, 166, 167, 200, 169, 170,
/* 230 */ 155, 204, 157, 174, 175, 176, 161, 162, 163, 12,
/* 240 */ 13, 166, 167, 135, 169, 170, 142, 3, 21, 174,
/* 250 */ 175, 176, 145, 149, 195, 148, 29, 153, 31, 31,
/* 260 */ 185, 12, 13, 14, 37, 155, 37, 157, 160, 31,
/* 270 */ 21, 161, 162, 163, 108, 58, 166, 167, 29, 169,
/* 280 */ 31, 155, 65, 157, 57, 57, 37, 161, 162, 163,
/* 290 */ 104, 139, 166, 167, 186, 169, 170, 1, 2, 147,
/* 300 */ 174, 175, 150, 76, 140, 21, 57, 143, 200, 199,
/* 310 */ 63, 144, 204, 29, 87, 88, 89, 0, 65, 155,
/* 320 */ 155, 92, 157, 156, 157, 76, 161, 162, 163, 106,
/* 330 */ 107, 166, 167, 168, 169, 108, 87, 88, 89, 155,
/* 340 */ 140, 157, 207, 143, 160, 161, 162, 163, 12, 13,
/* 350 */ 166, 167, 198, 169, 58, 155, 164, 21, 113, 114,
/* 360 */ 115, 191, 12, 13, 47, 29, 65, 31, 51, 125,
/* 370 */ 186, 21, 140, 37, 182, 143, 164, 140, 105, 29,
/* 380 */ 107, 31, 129, 66, 200, 165, 144, 155, 204, 155,
/* 390 */ 140, 157, 155, 57, 182, 161, 162, 163, 156, 157,
/* 400 */ 166, 167, 85, 169, 170, 155, 169, 57, 174, 175,
/* 410 */ 160, 21, 76, 1, 2, 178, 179, 180, 181, 169,
/* 420 */ 183, 31, 32, 87, 88, 89, 76, 58, 127, 179,
/* 430 */ 180, 181, 14, 183, 65, 164, 186, 87, 88, 89,
/* 440 */ 184, 201, 12, 13, 14, 140, 12, 13, 143, 31,
/* 450 */ 200, 21, 157, 182, 204, 21, 133, 134, 108, 29,
/* 460 */ 155, 31, 155, 29, 157, 31, 90, 187, 161, 162,
/* 470 */ 163, 12, 13, 166, 167, 99, 169, 170, 102, 137,
/* 480 */ 21, 20, 175, 31, 23, 92, 21, 57, 29, 58,
/* 490 */ 31, 57, 165, 155, 29, 157, 65, 117, 116, 161,
/* 500 */ 162, 163, 58, 197, 166, 167, 76, 169, 196, 65,
/* 510 */ 76, 118, 119, 120, 121, 122, 57, 87, 88, 89,
/* 520 */ 57, 87, 88, 89, 58, 89, 155, 64, 157, 58,
/* 530 */ 162, 65, 161, 162, 163, 76, 65, 166, 167, 168,
/* 540 */ 169, 76, 197, 205, 206, 0, 87, 88, 89, 155,
/* 550 */ 162, 157, 87, 88, 89, 161, 162, 163, 58, 196,
/* 560 */ 166, 167, 162, 169, 155, 65, 157, 124, 193, 123,
/* 570 */ 161, 162, 163, 58, 190, 166, 167, 58, 169, 155,
/* 580 */ 65, 157, 110, 192, 65, 161, 162, 163, 111, 107,
/* 590 */ 166, 167, 47, 169, 189, 155, 51, 157, 58, 31,
/* 600 */ 206, 161, 162, 163, 155, 65, 166, 167, 58, 169,
/* 610 */ 155, 66, 157, 31, 164, 65, 161, 162, 163, 103,
/* 620 */ 57, 166, 167, 132, 169, 155, 173, 157, 177, 208,
/* 630 */ 85, 161, 162, 163, 128, 203, 166, 167, 155, 169,
/* 640 */ 157, 202, 31, 126, 161, 162, 163, 140, 140, 166,
/* 650 */ 167, 155, 169, 157, 142, 142, 31, 161, 162, 163,
/* 660 */ 155, 136, 166, 167, 136, 169, 155, 57, 157, 148,
/* 670 */ 139, 151, 161, 162, 163, 140, 139, 166, 167, 155,
/* 680 */ 169, 157, 136, 65, 146, 161, 162, 163, 146, 141,
/* 690 */ 166, 167, 65, 169, 155, 112, 157, 58, 58, 57,
/* 700 */ 161, 162, 163, 65, 58, 166, 167, 155, 169, 157,
/* 710 */ 57, 57, 57, 161, 162, 163, 58, 58, 166, 167,
/* 720 */ 155, 169, 157, 29, 57, 65, 161, 162, 163, 64,
/* 730 */ 58, 166, 167, 65, 169, 155, 112, 157, 58, 64,
/* 740 */ 26, 161, 162, 163, 30, 31, 166, 167, 34, 169,
/* 750 */ 105, 155, 65, 157, 64, 2, 92, 161, 162, 163,
/* 760 */ 58, 58, 166, 167, 65, 169, 140, 53, 112, 4,
/* 770 */ 29, 29, 29, 29, 60, 61, 12, 13, 14, 15,
/* 780 */ 16, 155, 64, 29, 18, 29, 57, 0, 22, 0,
/* 790 */ 24, 25, 0, 0, 19, 169, 64, 0, 53, 0,
/* 800 */ 86, 35, 27, 2, 0, 179, 180, 181, 33, 183,
/* 810 */ 0, 0, 0, 12, 13, 14, 15, 16, 12, 13,
/* 820 */ 14, 15, 16, 0, 38, 0, 12, 13, 14, 15,
/* 830 */ 16, 56, 0, 0, 59, 0, 0, 21, 0, 21,
/* 840 */ 19, 57, 62, 64, 29, 64, 63, 21, 57, 29,
/* 850 */ 78, 29, 58, 57, 78, 78, 58, 57, 29, 29,
/* 860 */ 58, 58, 57, 29, 58, 57, 78, 58, 21, 29,
/* 870 */ 57, 29, 21, 66, 108, 38, 57, 29, 37, 29,
/* 880 */ 21, 57, 29, 29, 29, 29, 29, 29, 0, 29,
/* 890 */ 29, 29, 29, 29, 130, 131, 29, 29, 29, 29,
/* 900 */ 28, 0, 0, 21, 20, 209, 209, 209, 209, 209,
/* 910 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 920 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 930 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 940 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 950 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 960 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 970 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 980 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 990 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 1000 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 1010 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 1020 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 1030 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 80 */ 50, 51, 52, 53, 54, 55, 140, 141, 31, 58,
/* 90 */ 12, 13, 14, 15, 16, 95, 96, 31, 98, 99,
/* 100 */ 100, 101, 102, 103, 104, 105, 106, 107, 95, 96,
/* 110 */ 36, 98, 99, 100, 101, 102, 103, 104, 105, 106,
/* 120 */ 107, 12, 13, 14, 15, 16, 67, 68, 69, 70,
/* 130 */ 71, 72, 73, 74, 75, 76, 77, 2, 79, 80,
/* 140 */ 81, 82, 83, 84, 158, 19, 160, 12, 13, 14,
/* 150 */ 15, 16, 166, 27, 0, 169, 31, 171, 172, 33,
/* 160 */ 112, 175, 176, 177, 178, 142, 194, 58, 182, 183,
/* 170 */ 31, 18, 143, 150, 113, 22, 153, 24, 25, 207,
/* 180 */ 194, 31, 56, 211, 158, 59, 160, 158, 35, 0,
/* 190 */ 36, 21, 166, 207, 145, 169, 57, 211, 172, 29,
/* 200 */ 171, 175, 176, 177, 178, 156, 177, 90, 182, 183,
/* 210 */ 184, 133, 134, 14, 15, 16, 187, 188, 189, 21,
/* 220 */ 191, 157, 196, 194, 160, 36, 162, 29, 202, 203,
/* 230 */ 158, 19, 160, 36, 117, 118, 207, 31, 166, 27,
/* 240 */ 211, 169, 21, 63, 172, 33, 76, 175, 176, 177,
/* 250 */ 178, 112, 31, 32, 182, 183, 184, 143, 3, 158,
/* 260 */ 146, 160, 92, 93, 94, 112, 143, 166, 56, 146,
/* 270 */ 169, 59, 158, 172, 214, 203, 175, 176, 177, 178,
/* 280 */ 147, 158, 205, 182, 183, 184, 199, 158, 143, 160,
/* 290 */ 138, 146, 159, 160, 193, 166, 147, 85, 169, 148,
/* 300 */ 88, 172, 151, 158, 175, 176, 177, 178, 159, 160,
/* 310 */ 31, 182, 183, 184, 142, 109, 158, 140, 160, 95,
/* 320 */ 12, 13, 193, 171, 166, 153, 192, 169, 104, 21,
/* 330 */ 172, 107, 65, 175, 176, 177, 178, 29, 0, 31,
/* 340 */ 182, 183, 184, 87, 173, 37, 194, 12, 13, 14,
/* 350 */ 157, 193, 173, 160, 160, 162, 21, 174, 173, 207,
/* 360 */ 158, 190, 160, 211, 29, 57, 31, 111, 166, 190,
/* 370 */ 37, 169, 37, 171, 172, 190, 14, 175, 176, 177,
/* 380 */ 65, 168, 169, 128, 76, 47, 12, 13, 109, 51,
/* 390 */ 159, 160, 57, 31, 208, 21, 194, 12, 13, 132,
/* 400 */ 92, 93, 94, 29, 66, 31, 21, 143, 160, 207,
/* 410 */ 162, 76, 20, 211, 29, 23, 31, 110, 111, 58,
/* 420 */ 112, 195, 37, 85, 31, 58, 65, 92, 93, 94,
/* 430 */ 97, 57, 65, 58, 58, 158, 0, 160, 1, 2,
/* 440 */ 65, 65, 57, 166, 58, 130, 169, 136, 137, 172,
/* 450 */ 76, 65, 175, 176, 177, 178, 12, 13, 14, 182,
/* 460 */ 183, 76, 57, 12, 13, 21, 92, 93, 94, 64,
/* 470 */ 145, 57, 21, 29, 58, 31, 62, 92, 93, 94,
/* 480 */ 29, 65, 31, 47, 143, 145, 112, 51, 12, 13,
/* 490 */ 139, 26, 158, 31, 160, 30, 31, 21, 139, 34,
/* 500 */ 166, 57, 66, 169, 158, 29, 172, 31, 57, 175,
/* 510 */ 176, 177, 58, 31, 120, 143, 58, 58, 53, 65,
/* 520 */ 76, 85, 58, 65, 65, 60, 61, 76, 58, 65,
/* 530 */ 158, 31, 58, 57, 163, 65, 92, 93, 94, 65,
/* 540 */ 31, 58, 174, 92, 93, 94, 212, 213, 65, 177,
/* 550 */ 58, 204, 76, 119, 167, 58, 91, 65, 186, 187,
/* 560 */ 188, 189, 65, 191, 158, 94, 160, 166, 92, 93,
/* 570 */ 94, 167, 166, 204, 166, 169, 127, 200, 172, 201,
/* 580 */ 198, 175, 176, 177, 178, 197, 158, 97, 160, 183,
/* 590 */ 115, 114, 126, 158, 166, 111, 31, 169, 170, 173,
/* 600 */ 172, 210, 108, 175, 176, 177, 185, 135, 158, 131,
/* 610 */ 160, 121, 122, 123, 124, 125, 166, 215, 129, 169,
/* 620 */ 170, 209, 172, 57, 181, 175, 176, 177, 167, 166,
/* 630 */ 89, 158, 151, 160, 166, 57, 167, 142, 142, 166,
/* 640 */ 139, 154, 169, 164, 158, 172, 166, 143, 175, 176,
/* 650 */ 177, 158, 149, 160, 163, 144, 158, 149, 0, 166,
/* 660 */ 53, 64, 169, 0, 158, 172, 160, 0, 175, 176,
/* 670 */ 177, 0, 166, 38, 0, 169, 170, 21, 172, 206,
/* 680 */ 0, 175, 176, 177, 0, 0, 158, 0, 160, 12,
/* 690 */ 13, 14, 15, 16, 166, 19, 21, 169, 170, 0,
/* 700 */ 172, 0, 0, 175, 176, 177, 213, 0, 0, 0,
/* 710 */ 0, 158, 143, 160, 0, 0, 57, 87, 86, 166,
/* 720 */ 65, 116, 169, 58, 58, 172, 65, 158, 175, 176,
/* 730 */ 177, 158, 29, 160, 65, 57, 57, 65, 57, 166,
/* 740 */ 58, 58, 169, 57, 116, 172, 177, 110, 175, 176,
/* 750 */ 177, 58, 64, 158, 65, 160, 187, 188, 189, 65,
/* 760 */ 191, 166, 58, 65, 169, 116, 29, 172, 4, 64,
/* 770 */ 175, 176, 177, 29, 58, 158, 64, 160, 29, 29,
/* 780 */ 29, 29, 2, 166, 58, 64, 169, 97, 57, 172,
/* 790 */ 57, 57, 175, 176, 177, 0, 58, 58, 158, 57,
/* 800 */ 160, 90, 57, 57, 87, 86, 166, 64, 21, 169,
/* 810 */ 62, 64, 172, 57, 29, 175, 176, 177, 158, 58,
/* 820 */ 160, 63, 29, 57, 21, 58, 166, 29, 57, 169,
/* 830 */ 58, 158, 172, 160, 29, 175, 176, 177, 57, 166,
/* 840 */ 58, 29, 169, 57, 29, 172, 58, 57, 175, 176,
/* 850 */ 177, 78, 78, 158, 78, 160, 78, 66, 57, 57,
/* 860 */ 29, 166, 29, 21, 169, 21, 38, 172, 29, 29,
/* 870 */ 175, 176, 177, 37, 29, 29, 29, 29, 158, 29,
/* 880 */ 160, 29, 29, 29, 29, 29, 166, 29, 29, 169,
/* 890 */ 29, 29, 172, 0, 29, 175, 176, 177, 158, 28,
/* 900 */ 160, 0, 0, 21, 20, 216, 166, 216, 216, 169,
/* 910 */ 216, 216, 172, 216, 216, 175, 176, 177, 216, 216,
/* 920 */ 158, 216, 160, 216, 216, 216, 216, 216, 166, 216,
/* 930 */ 216, 169, 216, 216, 172, 216, 216, 175, 176, 177,
/* 940 */ 216, 216, 158, 216, 160, 216, 216, 216, 216, 216,
/* 950 */ 166, 216, 216, 169, 216, 216, 172, 216, 216, 175,
/* 960 */ 176, 177, 216, 216, 216, 158, 216, 160, 216, 216,
/* 970 */ 216, 216, 216, 166, 216, 143, 169, 216, 216, 172,
/* 980 */ 216, 216, 175, 176, 177, 158, 216, 160, 216, 216,
/* 990 */ 158, 216, 216, 166, 216, 216, 169, 216, 216, 172,
/* 1000 */ 216, 216, 175, 176, 177, 216, 216, 216, 216, 177,
/* 1010 */ 216, 216, 216, 216, 216, 216, 216, 216, 216, 187,
/* 1020 */ 188, 189, 2, 191, 216, 216, 216, 216, 216, 216,
/* 1030 */ 216, 216, 12, 13, 14, 15, 16, 216, 216, 216,
/* 1040 */ 216, 216, 216, 216, 216, 216, 216, 216, 216, 216,
/* 1050 */ 216, 216, 216, 216, 216, 216, 216, 216, 216, 216,
/* 1060 */ 216, 216, 216, 216, 216, 216, 216, 216, 216, 216,
/* 1070 */ 216, 216, 216, 216, 216, 216, 216, 216, 216, 216,
/* 1080 */ 216, 216, 216, 216, 216, 216, 216, 216, 216, 216,
/* 1090 */ 216, 216, 216, 216, 216, 216, 216, 216, 216, 216,
/* 1100 */ 216, 216, 216, 216, 216, 216, 216, 216, 216, 216,
/* 1110 */ 216, 216, 216, 216, 216, 216, 216, 216, 216, 216,
/* 1120 */ 216, 216, 216, 216, 216, 216, 216, 216, 216, 216,
/* 1130 */ 216, 216, 216, 216, 216, 216, 216, 216, 216, 216,
/* 1140 */ 216, 216, 216, 216, 216, 216, 216, 216, 216, 216,
/* 1150 */ 216, 216, 216, 216, 216, 216, 216, 216, 216, 216,
/* 1160 */ 216,
};
#define YY_SHIFT_COUNT (278)
#define YY_SHIFT_COUNT (307)
#define YY_SHIFT_MIN (0)
#define YY_SHIFT_MAX (902)
#define YY_SHIFT_MAX (1020)
static const unsigned short int yy_shift_ofst[] = {
/* 0 */ 766, 227, 249, 336, 336, 336, 336, 350, 336, 336,
/* 10 */ 166, 434, 459, 430, 459, 459, 459, 459, 459, 459,
/* 20 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459,
/* 30 */ 459, 459, 228, 228, 228, 465, 465, 61, 61, 37,
/* 40 */ 139, 139, 146, 238, 139, 139, 238, 139, 238, 238,
/* 50 */ 238, 139, 179, 0, 13, 13, 465, 390, 58, 58,
/* 60 */ 58, 5, 153, 238, 238, 247, 51, 714, 764, 393,
/* 70 */ 245, 186, 273, 223, 273, 418, 244, 101, 284, 452,
/* 80 */ 380, 382, 436, 436, 380, 382, 436, 443, 446, 477,
/* 90 */ 472, 482, 568, 582, 516, 563, 491, 506, 517, 238,
/* 100 */ 611, 146, 611, 146, 625, 625, 247, 179, 568, 610,
/* 110 */ 611, 179, 625, 905, 905, 905, 30, 52, 801, 806,
/* 120 */ 814, 814, 814, 814, 814, 814, 814, 142, 317, 545,
/* 130 */ 775, 296, 376, 72, 72, 72, 72, 217, 369, 412,
/* 140 */ 431, 229, 323, 301, 253, 444, 463, 461, 466, 471,
/* 150 */ 500, 515, 519, 540, 550, 162, 618, 627, 583, 639,
/* 160 */ 640, 642, 638, 646, 653, 654, 658, 655, 659, 694,
/* 170 */ 660, 665, 667, 668, 624, 672, 680, 675, 645, 687,
/* 180 */ 690, 753, 664, 702, 703, 699, 656, 765, 741, 742,
/* 190 */ 743, 744, 754, 756, 718, 729, 787, 789, 792, 793,
/* 200 */ 745, 732, 797, 799, 804, 810, 811, 812, 823, 786,
/* 210 */ 825, 832, 833, 835, 836, 816, 838, 818, 821, 784,
/* 220 */ 780, 779, 781, 826, 791, 783, 794, 815, 820, 796,
/* 230 */ 798, 822, 800, 802, 829, 805, 803, 830, 808, 809,
/* 240 */ 834, 813, 772, 776, 777, 788, 847, 807, 819, 824,
/* 250 */ 840, 842, 851, 837, 841, 848, 850, 853, 854, 855,
/* 260 */ 856, 857, 859, 858, 860, 861, 862, 863, 864, 867,
/* 270 */ 868, 869, 888, 870, 872, 901, 902, 882, 884,
/* 0 */ 153, 308, 335, 385, 385, 385, 385, 374, 385, 385,
/* 10 */ 139, 451, 476, 444, 451, 451, 451, 451, 451, 451,
/* 20 */ 451, 451, 451, 451, 451, 451, 451, 451, 451, 451,
/* 30 */ 451, 451, 451, 9, 9, 9, 170, 170, 57, 57,
/* 40 */ 74, 66, 125, 125, 48, 150, 66, 57, 57, 66,
/* 50 */ 57, 66, 66, 66, 57, 197, 0, 13, 13, 170,
/* 60 */ 221, 154, 206, 206, 206, 189, 150, 66, 66, 180,
/* 70 */ 59, 465, 78, 490, 117, 198, 279, 307, 256, 307,
/* 80 */ 362, 255, 61, 393, 74, 393, 74, 462, 462, 482,
/* 90 */ 500, 509, 394, 434, 471, 394, 434, 471, 449, 466,
/* 100 */ 475, 477, 484, 482, 565, 494, 472, 478, 489, 566,
/* 110 */ 66, 434, 471, 471, 434, 471, 541, 482, 500, 180,
/* 120 */ 197, 482, 578, 393, 197, 462, 1037, 1037, 1037, 30,
/* 130 */ 212, 135, 1020, 109, 126, 677, 677, 677, 677, 677,
/* 140 */ 677, 677, 338, 436, 31, 224, 199, 199, 199, 199,
/* 150 */ 392, 361, 367, 375, 437, 311, 315, 267, 376, 333,
/* 160 */ 386, 405, 416, 454, 458, 459, 464, 470, 474, 483,
/* 170 */ 492, 497, 414, 658, 663, 667, 671, 607, 597, 680,
/* 180 */ 684, 685, 687, 699, 701, 702, 635, 674, 707, 708,
/* 190 */ 709, 710, 656, 714, 675, 676, 715, 659, 630, 632,
/* 200 */ 655, 661, 605, 665, 669, 666, 678, 679, 682, 681,
/* 210 */ 683, 703, 672, 688, 686, 689, 628, 693, 704, 705,
/* 220 */ 637, 694, 712, 716, 698, 649, 764, 737, 744, 749,
/* 230 */ 750, 751, 752, 780, 690, 721, 726, 731, 733, 738,
/* 240 */ 739, 734, 742, 711, 745, 795, 717, 719, 746, 748,
/* 250 */ 743, 747, 787, 756, 758, 761, 785, 793, 766, 767,
/* 260 */ 798, 771, 772, 805, 781, 782, 812, 786, 788, 815,
/* 270 */ 790, 773, 774, 776, 778, 803, 791, 801, 802, 831,
/* 280 */ 833, 842, 828, 836, 839, 840, 845, 846, 847, 848,
/* 290 */ 850, 844, 852, 853, 854, 855, 856, 858, 859, 861,
/* 300 */ 862, 893, 865, 871, 901, 902, 882, 884,
};
#define YY_REDUCE_COUNT (115)
#define YY_REDUCE_MIN (-169)
#define YY_REDUCE_MAX (626)
#define YY_REDUCE_COUNT (128)
#define YY_REDUCE_MIN (-162)
#define YY_REDUCE_MAX (832)
static const short yy_reduce_ofst[] = {
/* 0 */ 108, -19, 17, 59, -123, 33, 75, 184, 126, 234,
/* 10 */ 250, 307, 338, -3, 165, 110, 371, 394, 409, 424,
/* 20 */ 440, 455, 470, 483, 496, 511, 524, 539, 552, 565,
/* 30 */ 580, 596, 237, -120, 626, -152, -144, -136, -18, 27,
/* 40 */ -107, -98, 104, -133, 164, 200, -153, 232, 167, 14,
/* 50 */ 242, 305, 152, -169, -169, -169, -106, -21, 192, 212,
/* 60 */ 271, -13, 7, 20, 47, 107, -151, -118, 135, 154,
/* 70 */ 170, 220, 256, 256, 256, 295, 240, 280, 342, 327,
/* 80 */ 306, 312, 368, 388, 345, 363, 400, 375, 391, 384,
/* 90 */ 405, 256, 449, 450, 451, 453, 421, 432, 439, 295,
/* 100 */ 507, 512, 508, 513, 525, 528, 521, 531, 505, 520,
/* 110 */ 535, 537, 546, 538, 542, 548,
/* 0 */ 152, -14, 26, 72, 101, 129, 158, 202, -115, 277,
/* 10 */ 29, 334, 406, 428, 450, 473, 493, 506, 528, 553,
/* 20 */ 573, 595, 617, 640, 660, 673, 695, 720, 740, 762,
/* 30 */ 784, 807, 827, 372, 569, 832, -155, -148, -138, -137,
/* 40 */ -114, -121, -157, -112, -28, -116, -125, -99, 114, 64,
/* 50 */ 123, 133, 193, 149, 145, 23, -124, -124, -124, -162,
/* 60 */ -54, 49, 171, 179, 185, 172, 213, 231, 248, 151,
/* 70 */ -159, -120, 60, 77, 87, 177, 183, 134, 134, 134,
/* 80 */ 194, 186, 226, 264, 325, 341, 340, 351, 359, 346,
/* 90 */ 371, 368, 347, 387, 401, 369, 404, 408, 378, 377,
/* 100 */ 382, 388, 134, 435, 426, 421, 402, 391, 412, 443,
/* 110 */ 194, 461, 463, 468, 469, 480, 479, 486, 491, 481,
/* 120 */ 495, 498, 487, 504, 496, 501, 503, 508, 511,
};
static const YYACTIONTYPE yy_default[] = {
/* 0 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 10 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 20 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 30 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 40 */ 676, 676, 699, 676, 676, 676, 676, 676, 676, 676,
/* 50 */ 676, 676, 697, 676, 835, 676, 676, 676, 846, 846,
/* 60 */ 846, 699, 697, 676, 676, 762, 676, 676, 910, 676,
/* 70 */ 870, 862, 838, 852, 839, 676, 895, 855, 676, 676,
/* 80 */ 877, 875, 676, 676, 877, 875, 676, 889, 885, 868,
/* 90 */ 866, 852, 676, 676, 676, 676, 913, 901, 897, 676,
/* 100 */ 676, 699, 676, 699, 676, 676, 676, 697, 676, 731,
/* 110 */ 676, 697, 676, 765, 765, 700, 676, 676, 676, 676,
/* 120 */ 888, 887, 812, 811, 810, 806, 807, 676, 676, 676,
/* 130 */ 676, 676, 676, 801, 802, 800, 799, 676, 676, 836,
/* 140 */ 676, 676, 676, 898, 902, 676, 788, 676, 676, 676,
/* 150 */ 676, 676, 676, 676, 676, 676, 859, 869, 676, 676,
/* 160 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 170 */ 676, 788, 676, 886, 676, 845, 841, 676, 676, 837,
/* 180 */ 676, 831, 676, 676, 676, 896, 676, 676, 676, 676,
/* 190 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 200 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 210 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 220 */ 676, 787, 676, 676, 676, 676, 676, 676, 676, 759,
/* 230 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 240 */ 676, 676, 744, 742, 741, 740, 676, 737, 676, 676,
/* 250 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 260 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 270 */ 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 0 */ 721, 721, 721, 721, 721, 721, 721, 721, 721, 721,
/* 10 */ 721, 721, 721, 721, 721, 721, 721, 721, 721, 721,
/* 20 */ 721, 721, 721, 721, 721, 721, 721, 721, 721, 721,
/* 30 */ 721, 721, 721, 721, 721, 721, 721, 721, 721, 721,
/* 40 */ 744, 721, 721, 721, 721, 721, 721, 721, 721, 721,
/* 50 */ 721, 721, 721, 721, 721, 742, 721, 889, 721, 721,
/* 60 */ 721, 744, 900, 900, 900, 742, 721, 721, 721, 807,
/* 70 */ 721, 721, 964, 721, 924, 721, 916, 892, 906, 893,
/* 80 */ 721, 949, 909, 721, 744, 721, 744, 721, 721, 721,
/* 90 */ 721, 721, 931, 929, 721, 931, 929, 721, 943, 939,
/* 100 */ 922, 920, 906, 721, 721, 721, 967, 955, 951, 721,
/* 110 */ 721, 929, 721, 721, 929, 721, 820, 721, 721, 721,
/* 120 */ 742, 721, 776, 721, 742, 721, 810, 810, 745, 721,
/* 130 */ 721, 721, 721, 721, 721, 861, 942, 941, 860, 866,
/* 140 */ 865, 864, 721, 721, 721, 721, 855, 856, 854, 853,
/* 150 */ 721, 721, 721, 721, 890, 721, 952, 956, 721, 721,
/* 160 */ 721, 841, 721, 721, 721, 721, 721, 721, 721, 721,
/* 170 */ 721, 721, 721, 721, 721, 721, 721, 721, 721, 721,
/* 180 */ 721, 721, 721, 721, 721, 721, 721, 721, 721, 721,
/* 190 */ 721, 721, 721, 721, 721, 721, 721, 721, 721, 721,
/* 200 */ 913, 923, 721, 721, 721, 721, 721, 721, 721, 721,
/* 210 */ 721, 721, 721, 841, 721, 940, 721, 899, 895, 721,
/* 220 */ 721, 891, 721, 721, 950, 721, 721, 721, 721, 721,
/* 230 */ 721, 721, 721, 885, 721, 721, 721, 721, 721, 721,
/* 240 */ 721, 721, 721, 721, 721, 721, 721, 721, 721, 721,
/* 250 */ 840, 721, 721, 721, 721, 721, 721, 721, 804, 721,
/* 260 */ 721, 721, 721, 721, 721, 721, 721, 721, 721, 721,
/* 270 */ 721, 789, 787, 786, 785, 721, 782, 721, 721, 721,
/* 280 */ 721, 721, 721, 721, 721, 721, 721, 721, 721, 721,
/* 290 */ 721, 721, 721, 721, 721, 721, 721, 721, 721, 721,
/* 300 */ 721, 721, 721, 721, 721, 721, 721, 721,
};
/********** End of lemon-generated parsing tables *****************************/
......@@ -679,129 +710,136 @@ static const char *const yyTokenName[] = {
/* 83 */ "VARBINARY",
/* 84 */ "DECIMAL",
/* 85 */ "SMA",
/* 86 */ "MNODES",
/* 87 */ "NK_FLOAT",
/* 88 */ "NK_BOOL",
/* 89 */ "NK_VARIABLE",
/* 90 */ "BETWEEN",
/* 91 */ "IS",
/* 92 */ "NULL",
/* 93 */ "NK_LT",
/* 94 */ "NK_GT",
/* 95 */ "NK_LE",
/* 96 */ "NK_GE",
/* 97 */ "NK_NE",
/* 98 */ "NK_EQ",
/* 99 */ "LIKE",
/* 100 */ "MATCH",
/* 101 */ "NMATCH",
/* 102 */ "IN",
/* 103 */ "FROM",
/* 104 */ "AS",
/* 105 */ "JOIN",
/* 106 */ "ON",
/* 107 */ "INNER",
/* 108 */ "SELECT",
/* 109 */ "DISTINCT",
/* 110 */ "WHERE",
/* 111 */ "PARTITION",
/* 112 */ "BY",
/* 113 */ "SESSION",
/* 114 */ "STATE_WINDOW",
/* 115 */ "INTERVAL",
/* 116 */ "SLIDING",
/* 117 */ "FILL",
/* 118 */ "VALUE",
/* 119 */ "NONE",
/* 120 */ "PREV",
/* 121 */ "LINEAR",
/* 122 */ "NEXT",
/* 123 */ "GROUP",
/* 124 */ "HAVING",
/* 125 */ "ORDER",
/* 126 */ "SLIMIT",
/* 127 */ "SOFFSET",
/* 128 */ "LIMIT",
/* 129 */ "OFFSET",
/* 130 */ "ASC",
/* 131 */ "DESC",
/* 132 */ "NULLS",
/* 133 */ "FIRST",
/* 134 */ "LAST",
/* 135 */ "cmd",
/* 136 */ "user_name",
/* 137 */ "dnode_endpoint",
/* 138 */ "dnode_host_name",
/* 139 */ "not_exists_opt",
/* 140 */ "db_name",
/* 141 */ "db_options",
/* 142 */ "exists_opt",
/* 143 */ "full_table_name",
/* 144 */ "column_def_list",
/* 145 */ "tags_def_opt",
/* 146 */ "table_options",
/* 147 */ "multi_create_clause",
/* 148 */ "tags_def",
/* 149 */ "multi_drop_clause",
/* 150 */ "create_subtable_clause",
/* 151 */ "specific_tags_opt",
/* 152 */ "literal_list",
/* 153 */ "drop_table_clause",
/* 154 */ "col_name_list",
/* 155 */ "table_name",
/* 156 */ "column_def",
/* 157 */ "column_name",
/* 158 */ "type_name",
/* 159 */ "col_name",
/* 160 */ "query_expression",
/* 161 */ "literal",
/* 162 */ "duration_literal",
/* 163 */ "function_name",
/* 164 */ "table_alias",
/* 165 */ "column_alias",
/* 166 */ "expression",
/* 167 */ "column_reference",
/* 168 */ "expression_list",
/* 169 */ "subquery",
/* 170 */ "predicate",
/* 171 */ "compare_op",
/* 172 */ "in_op",
/* 173 */ "in_predicate_value",
/* 174 */ "boolean_value_expression",
/* 175 */ "boolean_primary",
/* 176 */ "common_expression",
/* 177 */ "from_clause",
/* 178 */ "table_reference_list",
/* 179 */ "table_reference",
/* 180 */ "table_primary",
/* 181 */ "joined_table",
/* 182 */ "alias_opt",
/* 183 */ "parenthesized_joined_table",
/* 184 */ "join_type",
/* 185 */ "search_condition",
/* 186 */ "query_specification",
/* 187 */ "set_quantifier_opt",
/* 188 */ "select_list",
/* 189 */ "where_clause_opt",
/* 190 */ "partition_by_clause_opt",
/* 191 */ "twindow_clause_opt",
/* 192 */ "group_by_clause_opt",
/* 193 */ "having_clause_opt",
/* 194 */ "select_sublist",
/* 195 */ "select_item",
/* 196 */ "sliding_opt",
/* 197 */ "fill_opt",
/* 198 */ "fill_mode",
/* 199 */ "group_by_list",
/* 200 */ "query_expression_body",
/* 201 */ "order_by_clause_opt",
/* 202 */ "slimit_clause_opt",
/* 203 */ "limit_clause_opt",
/* 204 */ "query_primary",
/* 205 */ "sort_specification_list",
/* 206 */ "sort_specification",
/* 207 */ "ordering_specification_opt",
/* 208 */ "null_ordering_opt",
/* 86 */ "INDEX",
/* 87 */ "ON",
/* 88 */ "FULLTEXT",
/* 89 */ "FUNCTION",
/* 90 */ "INTERVAL",
/* 91 */ "MNODES",
/* 92 */ "NK_FLOAT",
/* 93 */ "NK_BOOL",
/* 94 */ "NK_VARIABLE",
/* 95 */ "BETWEEN",
/* 96 */ "IS",
/* 97 */ "NULL",
/* 98 */ "NK_LT",
/* 99 */ "NK_GT",
/* 100 */ "NK_LE",
/* 101 */ "NK_GE",
/* 102 */ "NK_NE",
/* 103 */ "NK_EQ",
/* 104 */ "LIKE",
/* 105 */ "MATCH",
/* 106 */ "NMATCH",
/* 107 */ "IN",
/* 108 */ "FROM",
/* 109 */ "AS",
/* 110 */ "JOIN",
/* 111 */ "INNER",
/* 112 */ "SELECT",
/* 113 */ "DISTINCT",
/* 114 */ "WHERE",
/* 115 */ "PARTITION",
/* 116 */ "BY",
/* 117 */ "SESSION",
/* 118 */ "STATE_WINDOW",
/* 119 */ "SLIDING",
/* 120 */ "FILL",
/* 121 */ "VALUE",
/* 122 */ "NONE",
/* 123 */ "PREV",
/* 124 */ "LINEAR",
/* 125 */ "NEXT",
/* 126 */ "GROUP",
/* 127 */ "HAVING",
/* 128 */ "ORDER",
/* 129 */ "SLIMIT",
/* 130 */ "SOFFSET",
/* 131 */ "LIMIT",
/* 132 */ "OFFSET",
/* 133 */ "ASC",
/* 134 */ "DESC",
/* 135 */ "NULLS",
/* 136 */ "FIRST",
/* 137 */ "LAST",
/* 138 */ "cmd",
/* 139 */ "user_name",
/* 140 */ "dnode_endpoint",
/* 141 */ "dnode_host_name",
/* 142 */ "not_exists_opt",
/* 143 */ "db_name",
/* 144 */ "db_options",
/* 145 */ "exists_opt",
/* 146 */ "full_table_name",
/* 147 */ "column_def_list",
/* 148 */ "tags_def_opt",
/* 149 */ "table_options",
/* 150 */ "multi_create_clause",
/* 151 */ "tags_def",
/* 152 */ "multi_drop_clause",
/* 153 */ "create_subtable_clause",
/* 154 */ "specific_tags_opt",
/* 155 */ "literal_list",
/* 156 */ "drop_table_clause",
/* 157 */ "col_name_list",
/* 158 */ "table_name",
/* 159 */ "column_def",
/* 160 */ "column_name",
/* 161 */ "type_name",
/* 162 */ "col_name",
/* 163 */ "index_name",
/* 164 */ "index_options",
/* 165 */ "func_list",
/* 166 */ "duration_literal",
/* 167 */ "sliding_opt",
/* 168 */ "func",
/* 169 */ "function_name",
/* 170 */ "expression_list",
/* 171 */ "query_expression",
/* 172 */ "literal",
/* 173 */ "table_alias",
/* 174 */ "column_alias",
/* 175 */ "expression",
/* 176 */ "column_reference",
/* 177 */ "subquery",
/* 178 */ "predicate",
/* 179 */ "compare_op",
/* 180 */ "in_op",
/* 181 */ "in_predicate_value",
/* 182 */ "boolean_value_expression",
/* 183 */ "boolean_primary",
/* 184 */ "common_expression",
/* 185 */ "from_clause",
/* 186 */ "table_reference_list",
/* 187 */ "table_reference",
/* 188 */ "table_primary",
/* 189 */ "joined_table",
/* 190 */ "alias_opt",
/* 191 */ "parenthesized_joined_table",
/* 192 */ "join_type",
/* 193 */ "search_condition",
/* 194 */ "query_specification",
/* 195 */ "set_quantifier_opt",
/* 196 */ "select_list",
/* 197 */ "where_clause_opt",
/* 198 */ "partition_by_clause_opt",
/* 199 */ "twindow_clause_opt",
/* 200 */ "group_by_clause_opt",
/* 201 */ "having_clause_opt",
/* 202 */ "select_sublist",
/* 203 */ "select_item",
/* 204 */ "fill_opt",
/* 205 */ "fill_mode",
/* 206 */ "group_by_list",
/* 207 */ "query_expression_body",
/* 208 */ "order_by_clause_opt",
/* 209 */ "slimit_clause_opt",
/* 210 */ "limit_clause_opt",
/* 211 */ "query_primary",
/* 212 */ "sort_specification_list",
/* 213 */ "sort_specification",
/* 214 */ "ordering_specification_opt",
/* 215 */ "null_ordering_opt",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
......@@ -903,149 +941,158 @@ static const char *const yyRuleName[] = {
/* 91 */ "col_name_list ::= col_name",
/* 92 */ "col_name_list ::= col_name_list NK_COMMA col_name",
/* 93 */ "col_name ::= column_name",
/* 94 */ "cmd ::= SHOW VGROUPS",
/* 95 */ "cmd ::= SHOW db_name NK_DOT VGROUPS",
/* 96 */ "cmd ::= SHOW MNODES",
/* 97 */ "cmd ::= query_expression",
/* 98 */ "literal ::= NK_INTEGER",
/* 99 */ "literal ::= NK_FLOAT",
/* 100 */ "literal ::= NK_STRING",
/* 101 */ "literal ::= NK_BOOL",
/* 102 */ "literal ::= TIMESTAMP NK_STRING",
/* 103 */ "literal ::= duration_literal",
/* 104 */ "duration_literal ::= NK_VARIABLE",
/* 105 */ "literal_list ::= literal",
/* 106 */ "literal_list ::= literal_list NK_COMMA literal",
/* 107 */ "db_name ::= NK_ID",
/* 108 */ "table_name ::= NK_ID",
/* 109 */ "column_name ::= NK_ID",
/* 110 */ "function_name ::= NK_ID",
/* 111 */ "table_alias ::= NK_ID",
/* 112 */ "column_alias ::= NK_ID",
/* 113 */ "user_name ::= NK_ID",
/* 114 */ "expression ::= literal",
/* 115 */ "expression ::= column_reference",
/* 116 */ "expression ::= function_name NK_LP expression_list NK_RP",
/* 117 */ "expression ::= function_name NK_LP NK_STAR NK_RP",
/* 118 */ "expression ::= subquery",
/* 119 */ "expression ::= NK_LP expression NK_RP",
/* 120 */ "expression ::= NK_PLUS expression",
/* 121 */ "expression ::= NK_MINUS expression",
/* 122 */ "expression ::= expression NK_PLUS expression",
/* 123 */ "expression ::= expression NK_MINUS expression",
/* 124 */ "expression ::= expression NK_STAR expression",
/* 125 */ "expression ::= expression NK_SLASH expression",
/* 126 */ "expression ::= expression NK_REM expression",
/* 127 */ "expression_list ::= expression",
/* 128 */ "expression_list ::= expression_list NK_COMMA expression",
/* 129 */ "column_reference ::= column_name",
/* 130 */ "column_reference ::= table_name NK_DOT column_name",
/* 131 */ "predicate ::= expression compare_op expression",
/* 132 */ "predicate ::= expression BETWEEN expression AND expression",
/* 133 */ "predicate ::= expression NOT BETWEEN expression AND expression",
/* 134 */ "predicate ::= expression IS NULL",
/* 135 */ "predicate ::= expression IS NOT NULL",
/* 136 */ "predicate ::= expression in_op in_predicate_value",
/* 137 */ "compare_op ::= NK_LT",
/* 138 */ "compare_op ::= NK_GT",
/* 139 */ "compare_op ::= NK_LE",
/* 140 */ "compare_op ::= NK_GE",
/* 141 */ "compare_op ::= NK_NE",
/* 142 */ "compare_op ::= NK_EQ",
/* 143 */ "compare_op ::= LIKE",
/* 144 */ "compare_op ::= NOT LIKE",
/* 145 */ "compare_op ::= MATCH",
/* 146 */ "compare_op ::= NMATCH",
/* 147 */ "in_op ::= IN",
/* 148 */ "in_op ::= NOT IN",
/* 149 */ "in_predicate_value ::= NK_LP expression_list NK_RP",
/* 150 */ "boolean_value_expression ::= boolean_primary",
/* 151 */ "boolean_value_expression ::= NOT boolean_primary",
/* 152 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression",
/* 153 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
/* 154 */ "boolean_primary ::= predicate",
/* 155 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
/* 156 */ "common_expression ::= expression",
/* 157 */ "common_expression ::= boolean_value_expression",
/* 158 */ "from_clause ::= FROM table_reference_list",
/* 159 */ "table_reference_list ::= table_reference",
/* 160 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
/* 161 */ "table_reference ::= table_primary",
/* 162 */ "table_reference ::= joined_table",
/* 163 */ "table_primary ::= table_name alias_opt",
/* 164 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
/* 165 */ "table_primary ::= subquery alias_opt",
/* 166 */ "table_primary ::= parenthesized_joined_table",
/* 167 */ "alias_opt ::=",
/* 168 */ "alias_opt ::= table_alias",
/* 169 */ "alias_opt ::= AS table_alias",
/* 170 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
/* 171 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
/* 172 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
/* 173 */ "join_type ::=",
/* 174 */ "join_type ::= INNER",
/* 175 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt",
/* 176 */ "set_quantifier_opt ::=",
/* 177 */ "set_quantifier_opt ::= DISTINCT",
/* 178 */ "set_quantifier_opt ::= ALL",
/* 179 */ "select_list ::= NK_STAR",
/* 180 */ "select_list ::= select_sublist",
/* 181 */ "select_sublist ::= select_item",
/* 182 */ "select_sublist ::= select_sublist NK_COMMA select_item",
/* 183 */ "select_item ::= common_expression",
/* 184 */ "select_item ::= common_expression column_alias",
/* 185 */ "select_item ::= common_expression AS column_alias",
/* 186 */ "select_item ::= table_name NK_DOT NK_STAR",
/* 187 */ "where_clause_opt ::=",
/* 188 */ "where_clause_opt ::= WHERE search_condition",
/* 189 */ "partition_by_clause_opt ::=",
/* 190 */ "partition_by_clause_opt ::= PARTITION BY expression_list",
/* 191 */ "twindow_clause_opt ::=",
/* 192 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA NK_INTEGER NK_RP",
/* 193 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP",
/* 194 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt",
/* 195 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt",
/* 196 */ "sliding_opt ::=",
/* 197 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP",
/* 198 */ "fill_opt ::=",
/* 199 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
/* 200 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP",
/* 201 */ "fill_mode ::= NONE",
/* 202 */ "fill_mode ::= PREV",
/* 203 */ "fill_mode ::= NULL",
/* 204 */ "fill_mode ::= LINEAR",
/* 205 */ "fill_mode ::= NEXT",
/* 206 */ "group_by_clause_opt ::=",
/* 207 */ "group_by_clause_opt ::= GROUP BY group_by_list",
/* 208 */ "group_by_list ::= expression",
/* 209 */ "group_by_list ::= group_by_list NK_COMMA expression",
/* 210 */ "having_clause_opt ::=",
/* 211 */ "having_clause_opt ::= HAVING search_condition",
/* 212 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt",
/* 213 */ "query_expression_body ::= query_primary",
/* 214 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body",
/* 215 */ "query_primary ::= query_specification",
/* 216 */ "order_by_clause_opt ::=",
/* 217 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
/* 218 */ "slimit_clause_opt ::=",
/* 219 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
/* 220 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
/* 221 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
/* 222 */ "limit_clause_opt ::=",
/* 223 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
/* 224 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
/* 225 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
/* 226 */ "subquery ::= NK_LP query_expression NK_RP",
/* 227 */ "search_condition ::= common_expression",
/* 228 */ "sort_specification_list ::= sort_specification",
/* 229 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
/* 230 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt",
/* 231 */ "ordering_specification_opt ::=",
/* 232 */ "ordering_specification_opt ::= ASC",
/* 233 */ "ordering_specification_opt ::= DESC",
/* 234 */ "null_ordering_opt ::=",
/* 235 */ "null_ordering_opt ::= NULLS FIRST",
/* 236 */ "null_ordering_opt ::= NULLS LAST",
/* 94 */ "cmd ::= CREATE SMA INDEX index_name ON table_name index_options",
/* 95 */ "cmd ::= CREATE FULLTEXT INDEX index_name ON table_name NK_LP col_name_list NK_RP",
/* 96 */ "index_options ::=",
/* 97 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt",
/* 98 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt",
/* 99 */ "func_list ::= func",
/* 100 */ "func_list ::= func_list NK_COMMA func",
/* 101 */ "func ::= function_name NK_LP expression_list NK_RP",
/* 102 */ "cmd ::= SHOW VGROUPS",
/* 103 */ "cmd ::= SHOW db_name NK_DOT VGROUPS",
/* 104 */ "cmd ::= SHOW MNODES",
/* 105 */ "cmd ::= query_expression",
/* 106 */ "literal ::= NK_INTEGER",
/* 107 */ "literal ::= NK_FLOAT",
/* 108 */ "literal ::= NK_STRING",
/* 109 */ "literal ::= NK_BOOL",
/* 110 */ "literal ::= TIMESTAMP NK_STRING",
/* 111 */ "literal ::= duration_literal",
/* 112 */ "duration_literal ::= NK_VARIABLE",
/* 113 */ "literal_list ::= literal",
/* 114 */ "literal_list ::= literal_list NK_COMMA literal",
/* 115 */ "db_name ::= NK_ID",
/* 116 */ "table_name ::= NK_ID",
/* 117 */ "column_name ::= NK_ID",
/* 118 */ "function_name ::= NK_ID",
/* 119 */ "table_alias ::= NK_ID",
/* 120 */ "column_alias ::= NK_ID",
/* 121 */ "user_name ::= NK_ID",
/* 122 */ "index_name ::= NK_ID",
/* 123 */ "expression ::= literal",
/* 124 */ "expression ::= column_reference",
/* 125 */ "expression ::= function_name NK_LP expression_list NK_RP",
/* 126 */ "expression ::= function_name NK_LP NK_STAR NK_RP",
/* 127 */ "expression ::= subquery",
/* 128 */ "expression ::= NK_LP expression NK_RP",
/* 129 */ "expression ::= NK_PLUS expression",
/* 130 */ "expression ::= NK_MINUS expression",
/* 131 */ "expression ::= expression NK_PLUS expression",
/* 132 */ "expression ::= expression NK_MINUS expression",
/* 133 */ "expression ::= expression NK_STAR expression",
/* 134 */ "expression ::= expression NK_SLASH expression",
/* 135 */ "expression ::= expression NK_REM expression",
/* 136 */ "expression_list ::= expression",
/* 137 */ "expression_list ::= expression_list NK_COMMA expression",
/* 138 */ "column_reference ::= column_name",
/* 139 */ "column_reference ::= table_name NK_DOT column_name",
/* 140 */ "predicate ::= expression compare_op expression",
/* 141 */ "predicate ::= expression BETWEEN expression AND expression",
/* 142 */ "predicate ::= expression NOT BETWEEN expression AND expression",
/* 143 */ "predicate ::= expression IS NULL",
/* 144 */ "predicate ::= expression IS NOT NULL",
/* 145 */ "predicate ::= expression in_op in_predicate_value",
/* 146 */ "compare_op ::= NK_LT",
/* 147 */ "compare_op ::= NK_GT",
/* 148 */ "compare_op ::= NK_LE",
/* 149 */ "compare_op ::= NK_GE",
/* 150 */ "compare_op ::= NK_NE",
/* 151 */ "compare_op ::= NK_EQ",
/* 152 */ "compare_op ::= LIKE",
/* 153 */ "compare_op ::= NOT LIKE",
/* 154 */ "compare_op ::= MATCH",
/* 155 */ "compare_op ::= NMATCH",
/* 156 */ "in_op ::= IN",
/* 157 */ "in_op ::= NOT IN",
/* 158 */ "in_predicate_value ::= NK_LP expression_list NK_RP",
/* 159 */ "boolean_value_expression ::= boolean_primary",
/* 160 */ "boolean_value_expression ::= NOT boolean_primary",
/* 161 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression",
/* 162 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
/* 163 */ "boolean_primary ::= predicate",
/* 164 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
/* 165 */ "common_expression ::= expression",
/* 166 */ "common_expression ::= boolean_value_expression",
/* 167 */ "from_clause ::= FROM table_reference_list",
/* 168 */ "table_reference_list ::= table_reference",
/* 169 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
/* 170 */ "table_reference ::= table_primary",
/* 171 */ "table_reference ::= joined_table",
/* 172 */ "table_primary ::= table_name alias_opt",
/* 173 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
/* 174 */ "table_primary ::= subquery alias_opt",
/* 175 */ "table_primary ::= parenthesized_joined_table",
/* 176 */ "alias_opt ::=",
/* 177 */ "alias_opt ::= table_alias",
/* 178 */ "alias_opt ::= AS table_alias",
/* 179 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
/* 180 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
/* 181 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
/* 182 */ "join_type ::=",
/* 183 */ "join_type ::= INNER",
/* 184 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt",
/* 185 */ "set_quantifier_opt ::=",
/* 186 */ "set_quantifier_opt ::= DISTINCT",
/* 187 */ "set_quantifier_opt ::= ALL",
/* 188 */ "select_list ::= NK_STAR",
/* 189 */ "select_list ::= select_sublist",
/* 190 */ "select_sublist ::= select_item",
/* 191 */ "select_sublist ::= select_sublist NK_COMMA select_item",
/* 192 */ "select_item ::= common_expression",
/* 193 */ "select_item ::= common_expression column_alias",
/* 194 */ "select_item ::= common_expression AS column_alias",
/* 195 */ "select_item ::= table_name NK_DOT NK_STAR",
/* 196 */ "where_clause_opt ::=",
/* 197 */ "where_clause_opt ::= WHERE search_condition",
/* 198 */ "partition_by_clause_opt ::=",
/* 199 */ "partition_by_clause_opt ::= PARTITION BY expression_list",
/* 200 */ "twindow_clause_opt ::=",
/* 201 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA NK_INTEGER NK_RP",
/* 202 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP",
/* 203 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt",
/* 204 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt",
/* 205 */ "sliding_opt ::=",
/* 206 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP",
/* 207 */ "fill_opt ::=",
/* 208 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
/* 209 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP",
/* 210 */ "fill_mode ::= NONE",
/* 211 */ "fill_mode ::= PREV",
/* 212 */ "fill_mode ::= NULL",
/* 213 */ "fill_mode ::= LINEAR",
/* 214 */ "fill_mode ::= NEXT",
/* 215 */ "group_by_clause_opt ::=",
/* 216 */ "group_by_clause_opt ::= GROUP BY group_by_list",
/* 217 */ "group_by_list ::= expression",
/* 218 */ "group_by_list ::= group_by_list NK_COMMA expression",
/* 219 */ "having_clause_opt ::=",
/* 220 */ "having_clause_opt ::= HAVING search_condition",
/* 221 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt",
/* 222 */ "query_expression_body ::= query_primary",
/* 223 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body",
/* 224 */ "query_primary ::= query_specification",
/* 225 */ "order_by_clause_opt ::=",
/* 226 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
/* 227 */ "slimit_clause_opt ::=",
/* 228 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
/* 229 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
/* 230 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
/* 231 */ "limit_clause_opt ::=",
/* 232 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
/* 233 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
/* 234 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
/* 235 */ "subquery ::= NK_LP query_expression NK_RP",
/* 236 */ "search_condition ::= common_expression",
/* 237 */ "sort_specification_list ::= sort_specification",
/* 238 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
/* 239 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt",
/* 240 */ "ordering_specification_opt ::=",
/* 241 */ "ordering_specification_opt ::= ASC",
/* 242 */ "ordering_specification_opt ::= DESC",
/* 243 */ "null_ordering_opt ::=",
/* 244 */ "null_ordering_opt ::= NULLS FIRST",
/* 245 */ "null_ordering_opt ::= NULLS LAST",
};
#endif /* NDEBUG */
......@@ -1172,124 +1219,120 @@ static void yy_destructor(
*/
/********* Begin destructor definitions ***************************************/
/* Default NON-TERMINAL Destructor */
case 135: /* cmd */
case 143: /* full_table_name */
case 150: /* create_subtable_clause */
case 153: /* drop_table_clause */
case 156: /* column_def */
case 159: /* col_name */
case 160: /* query_expression */
case 161: /* literal */
case 162: /* duration_literal */
case 166: /* expression */
case 167: /* column_reference */
case 169: /* subquery */
case 170: /* predicate */
case 173: /* in_predicate_value */
case 174: /* boolean_value_expression */
case 175: /* boolean_primary */
case 176: /* common_expression */
case 177: /* from_clause */
case 178: /* table_reference_list */
case 179: /* table_reference */
case 180: /* table_primary */
case 181: /* joined_table */
case 183: /* parenthesized_joined_table */
case 185: /* search_condition */
case 186: /* query_specification */
case 189: /* where_clause_opt */
case 191: /* twindow_clause_opt */
case 193: /* having_clause_opt */
case 195: /* select_item */
case 196: /* sliding_opt */
case 197: /* fill_opt */
case 200: /* query_expression_body */
case 202: /* slimit_clause_opt */
case 203: /* limit_clause_opt */
case 204: /* query_primary */
case 206: /* sort_specification */
case 138: /* cmd */
case 144: /* db_options */
case 146: /* full_table_name */
case 149: /* table_options */
case 153: /* create_subtable_clause */
case 156: /* drop_table_clause */
case 159: /* column_def */
case 162: /* col_name */
case 164: /* index_options */
case 166: /* duration_literal */
case 167: /* sliding_opt */
case 168: /* func */
case 171: /* query_expression */
case 172: /* literal */
case 175: /* expression */
case 176: /* column_reference */
case 177: /* subquery */
case 178: /* predicate */
case 181: /* in_predicate_value */
case 182: /* boolean_value_expression */
case 183: /* boolean_primary */
case 184: /* common_expression */
case 185: /* from_clause */
case 186: /* table_reference_list */
case 187: /* table_reference */
case 188: /* table_primary */
case 189: /* joined_table */
case 191: /* parenthesized_joined_table */
case 193: /* search_condition */
case 194: /* query_specification */
case 197: /* where_clause_opt */
case 199: /* twindow_clause_opt */
case 201: /* having_clause_opt */
case 203: /* select_item */
case 204: /* fill_opt */
case 207: /* query_expression_body */
case 209: /* slimit_clause_opt */
case 210: /* limit_clause_opt */
case 211: /* query_primary */
case 213: /* sort_specification */
{
nodesDestroyNode((yypminor->yy256));
nodesDestroyNode((yypminor->yy344));
}
break;
case 136: /* user_name */
case 137: /* dnode_endpoint */
case 138: /* dnode_host_name */
case 140: /* db_name */
case 155: /* table_name */
case 157: /* column_name */
case 163: /* function_name */
case 164: /* table_alias */
case 165: /* column_alias */
case 182: /* alias_opt */
case 139: /* user_name */
case 140: /* dnode_endpoint */
case 141: /* dnode_host_name */
case 143: /* db_name */
case 158: /* table_name */
case 160: /* column_name */
case 163: /* index_name */
case 169: /* function_name */
case 173: /* table_alias */
case 174: /* column_alias */
case 190: /* alias_opt */
{
}
break;
case 139: /* not_exists_opt */
case 142: /* exists_opt */
case 187: /* set_quantifier_opt */
case 142: /* not_exists_opt */
case 145: /* exists_opt */
case 195: /* set_quantifier_opt */
{
}
break;
case 141: /* db_options */
case 147: /* column_def_list */
case 148: /* tags_def_opt */
case 150: /* multi_create_clause */
case 151: /* tags_def */
case 152: /* multi_drop_clause */
case 154: /* specific_tags_opt */
case 155: /* literal_list */
case 157: /* col_name_list */
case 165: /* func_list */
case 170: /* expression_list */
case 196: /* select_list */
case 198: /* partition_by_clause_opt */
case 200: /* group_by_clause_opt */
case 202: /* select_sublist */
case 206: /* group_by_list */
case 208: /* order_by_clause_opt */
case 212: /* sort_specification_list */
{
tfree((yypminor->yy391));
nodesDestroyList((yypminor->yy280));
}
break;
case 144: /* column_def_list */
case 145: /* tags_def_opt */
case 147: /* multi_create_clause */
case 148: /* tags_def */
case 149: /* multi_drop_clause */
case 151: /* specific_tags_opt */
case 152: /* literal_list */
case 154: /* col_name_list */
case 168: /* expression_list */
case 188: /* select_list */
case 190: /* partition_by_clause_opt */
case 192: /* group_by_clause_opt */
case 194: /* select_sublist */
case 199: /* group_by_list */
case 201: /* order_by_clause_opt */
case 205: /* sort_specification_list */
{
nodesDestroyList((yypminor->yy46));
}
break;
case 146: /* table_options */
{
tfree((yypminor->yy340));
}
break;
case 158: /* type_name */
case 161: /* type_name */
{
}
break;
case 171: /* compare_op */
case 172: /* in_op */
case 179: /* compare_op */
case 180: /* in_op */
{
}
break;
case 184: /* join_type */
case 192: /* join_type */
{
}
break;
case 198: /* fill_mode */
case 205: /* fill_mode */
{
}
break;
case 207: /* ordering_specification_opt */
case 214: /* ordering_specification_opt */
{
}
break;
case 208: /* null_ordering_opt */
case 215: /* null_ordering_opt */
{
}
......@@ -1588,243 +1631,252 @@ static const struct {
YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */
signed char nrhs; /* Negative of the number of RHS symbols in the rule */
} yyRuleInfo[] = {
{ 135, -5 }, /* (0) cmd ::= CREATE USER user_name PASS NK_STRING */
{ 135, -5 }, /* (1) cmd ::= ALTER USER user_name PASS NK_STRING */
{ 135, -5 }, /* (2) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */
{ 135, -3 }, /* (3) cmd ::= DROP USER user_name */
{ 135, -2 }, /* (4) cmd ::= SHOW USERS */
{ 135, -3 }, /* (5) cmd ::= CREATE DNODE dnode_endpoint */
{ 135, -5 }, /* (6) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */
{ 135, -3 }, /* (7) cmd ::= DROP DNODE NK_INTEGER */
{ 135, -3 }, /* (8) cmd ::= DROP DNODE dnode_endpoint */
{ 135, -2 }, /* (9) cmd ::= SHOW DNODES */
{ 137, -1 }, /* (10) dnode_endpoint ::= NK_STRING */
{ 138, -1 }, /* (11) dnode_host_name ::= NK_ID */
{ 138, -1 }, /* (12) dnode_host_name ::= NK_IPTOKEN */
{ 135, -5 }, /* (13) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
{ 135, -4 }, /* (14) cmd ::= DROP DATABASE exists_opt db_name */
{ 135, -2 }, /* (15) cmd ::= SHOW DATABASES */
{ 135, -2 }, /* (16) cmd ::= USE db_name */
{ 139, -3 }, /* (17) not_exists_opt ::= IF NOT EXISTS */
{ 139, 0 }, /* (18) not_exists_opt ::= */
{ 142, -2 }, /* (19) exists_opt ::= IF EXISTS */
{ 142, 0 }, /* (20) exists_opt ::= */
{ 141, 0 }, /* (21) db_options ::= */
{ 141, -3 }, /* (22) db_options ::= db_options BLOCKS NK_INTEGER */
{ 141, -3 }, /* (23) db_options ::= db_options CACHE NK_INTEGER */
{ 141, -3 }, /* (24) db_options ::= db_options CACHELAST NK_INTEGER */
{ 141, -3 }, /* (25) db_options ::= db_options COMP NK_INTEGER */
{ 141, -3 }, /* (26) db_options ::= db_options DAYS NK_INTEGER */
{ 141, -3 }, /* (27) db_options ::= db_options FSYNC NK_INTEGER */
{ 141, -3 }, /* (28) db_options ::= db_options MAXROWS NK_INTEGER */
{ 141, -3 }, /* (29) db_options ::= db_options MINROWS NK_INTEGER */
{ 141, -3 }, /* (30) db_options ::= db_options KEEP NK_INTEGER */
{ 141, -3 }, /* (31) db_options ::= db_options PRECISION NK_STRING */
{ 141, -3 }, /* (32) db_options ::= db_options QUORUM NK_INTEGER */
{ 141, -3 }, /* (33) db_options ::= db_options REPLICA NK_INTEGER */
{ 141, -3 }, /* (34) db_options ::= db_options TTL NK_INTEGER */
{ 141, -3 }, /* (35) db_options ::= db_options WAL NK_INTEGER */
{ 141, -3 }, /* (36) db_options ::= db_options VGROUPS NK_INTEGER */
{ 141, -3 }, /* (37) db_options ::= db_options SINGLE_STABLE NK_INTEGER */
{ 141, -3 }, /* (38) db_options ::= db_options STREAM_MODE NK_INTEGER */
{ 135, -9 }, /* (39) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
{ 135, -3 }, /* (40) cmd ::= CREATE TABLE multi_create_clause */
{ 135, -9 }, /* (41) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */
{ 135, -3 }, /* (42) cmd ::= DROP TABLE multi_drop_clause */
{ 135, -4 }, /* (43) cmd ::= DROP STABLE exists_opt full_table_name */
{ 135, -2 }, /* (44) cmd ::= SHOW TABLES */
{ 135, -2 }, /* (45) cmd ::= SHOW STABLES */
{ 147, -1 }, /* (46) multi_create_clause ::= create_subtable_clause */
{ 147, -2 }, /* (47) multi_create_clause ::= multi_create_clause create_subtable_clause */
{ 150, -9 }, /* (48) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP */
{ 149, -1 }, /* (49) multi_drop_clause ::= drop_table_clause */
{ 149, -2 }, /* (50) multi_drop_clause ::= multi_drop_clause drop_table_clause */
{ 153, -2 }, /* (51) drop_table_clause ::= exists_opt full_table_name */
{ 151, 0 }, /* (52) specific_tags_opt ::= */
{ 151, -3 }, /* (53) specific_tags_opt ::= NK_LP col_name_list NK_RP */
{ 143, -1 }, /* (54) full_table_name ::= table_name */
{ 143, -3 }, /* (55) full_table_name ::= db_name NK_DOT table_name */
{ 144, -1 }, /* (56) column_def_list ::= column_def */
{ 144, -3 }, /* (57) column_def_list ::= column_def_list NK_COMMA column_def */
{ 156, -2 }, /* (58) column_def ::= column_name type_name */
{ 156, -4 }, /* (59) column_def ::= column_name type_name COMMENT NK_STRING */
{ 158, -1 }, /* (60) type_name ::= BOOL */
{ 158, -1 }, /* (61) type_name ::= TINYINT */
{ 158, -1 }, /* (62) type_name ::= SMALLINT */
{ 158, -1 }, /* (63) type_name ::= INT */
{ 158, -1 }, /* (64) type_name ::= INTEGER */
{ 158, -1 }, /* (65) type_name ::= BIGINT */
{ 158, -1 }, /* (66) type_name ::= FLOAT */
{ 158, -1 }, /* (67) type_name ::= DOUBLE */
{ 158, -4 }, /* (68) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
{ 158, -1 }, /* (69) type_name ::= TIMESTAMP */
{ 158, -4 }, /* (70) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
{ 158, -2 }, /* (71) type_name ::= TINYINT UNSIGNED */
{ 158, -2 }, /* (72) type_name ::= SMALLINT UNSIGNED */
{ 158, -2 }, /* (73) type_name ::= INT UNSIGNED */
{ 158, -2 }, /* (74) type_name ::= BIGINT UNSIGNED */
{ 158, -1 }, /* (75) type_name ::= JSON */
{ 158, -4 }, /* (76) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
{ 158, -1 }, /* (77) type_name ::= MEDIUMBLOB */
{ 158, -1 }, /* (78) type_name ::= BLOB */
{ 158, -4 }, /* (79) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
{ 158, -1 }, /* (80) type_name ::= DECIMAL */
{ 158, -4 }, /* (81) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
{ 158, -6 }, /* (82) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
{ 145, 0 }, /* (83) tags_def_opt ::= */
{ 145, -1 }, /* (84) tags_def_opt ::= tags_def */
{ 148, -4 }, /* (85) tags_def ::= TAGS NK_LP column_def_list NK_RP */
{ 146, 0 }, /* (86) table_options ::= */
{ 146, -3 }, /* (87) table_options ::= table_options COMMENT NK_STRING */
{ 146, -3 }, /* (88) table_options ::= table_options KEEP NK_INTEGER */
{ 146, -3 }, /* (89) table_options ::= table_options TTL NK_INTEGER */
{ 146, -5 }, /* (90) table_options ::= table_options SMA NK_LP col_name_list NK_RP */
{ 154, -1 }, /* (91) col_name_list ::= col_name */
{ 154, -3 }, /* (92) col_name_list ::= col_name_list NK_COMMA col_name */
{ 159, -1 }, /* (93) col_name ::= column_name */
{ 135, -2 }, /* (94) cmd ::= SHOW VGROUPS */
{ 135, -4 }, /* (95) cmd ::= SHOW db_name NK_DOT VGROUPS */
{ 135, -2 }, /* (96) cmd ::= SHOW MNODES */
{ 135, -1 }, /* (97) cmd ::= query_expression */
{ 161, -1 }, /* (98) literal ::= NK_INTEGER */
{ 161, -1 }, /* (99) literal ::= NK_FLOAT */
{ 161, -1 }, /* (100) literal ::= NK_STRING */
{ 161, -1 }, /* (101) literal ::= NK_BOOL */
{ 161, -2 }, /* (102) literal ::= TIMESTAMP NK_STRING */
{ 161, -1 }, /* (103) literal ::= duration_literal */
{ 162, -1 }, /* (104) duration_literal ::= NK_VARIABLE */
{ 152, -1 }, /* (105) literal_list ::= literal */
{ 152, -3 }, /* (106) literal_list ::= literal_list NK_COMMA literal */
{ 140, -1 }, /* (107) db_name ::= NK_ID */
{ 155, -1 }, /* (108) table_name ::= NK_ID */
{ 157, -1 }, /* (109) column_name ::= NK_ID */
{ 163, -1 }, /* (110) function_name ::= NK_ID */
{ 164, -1 }, /* (111) table_alias ::= NK_ID */
{ 165, -1 }, /* (112) column_alias ::= NK_ID */
{ 136, -1 }, /* (113) user_name ::= NK_ID */
{ 166, -1 }, /* (114) expression ::= literal */
{ 166, -1 }, /* (115) expression ::= column_reference */
{ 166, -4 }, /* (116) expression ::= function_name NK_LP expression_list NK_RP */
{ 166, -4 }, /* (117) expression ::= function_name NK_LP NK_STAR NK_RP */
{ 166, -1 }, /* (118) expression ::= subquery */
{ 166, -3 }, /* (119) expression ::= NK_LP expression NK_RP */
{ 166, -2 }, /* (120) expression ::= NK_PLUS expression */
{ 166, -2 }, /* (121) expression ::= NK_MINUS expression */
{ 166, -3 }, /* (122) expression ::= expression NK_PLUS expression */
{ 166, -3 }, /* (123) expression ::= expression NK_MINUS expression */
{ 166, -3 }, /* (124) expression ::= expression NK_STAR expression */
{ 166, -3 }, /* (125) expression ::= expression NK_SLASH expression */
{ 166, -3 }, /* (126) expression ::= expression NK_REM expression */
{ 168, -1 }, /* (127) expression_list ::= expression */
{ 168, -3 }, /* (128) expression_list ::= expression_list NK_COMMA expression */
{ 167, -1 }, /* (129) column_reference ::= column_name */
{ 167, -3 }, /* (130) column_reference ::= table_name NK_DOT column_name */
{ 170, -3 }, /* (131) predicate ::= expression compare_op expression */
{ 170, -5 }, /* (132) predicate ::= expression BETWEEN expression AND expression */
{ 170, -6 }, /* (133) predicate ::= expression NOT BETWEEN expression AND expression */
{ 170, -3 }, /* (134) predicate ::= expression IS NULL */
{ 170, -4 }, /* (135) predicate ::= expression IS NOT NULL */
{ 170, -3 }, /* (136) predicate ::= expression in_op in_predicate_value */
{ 171, -1 }, /* (137) compare_op ::= NK_LT */
{ 171, -1 }, /* (138) compare_op ::= NK_GT */
{ 171, -1 }, /* (139) compare_op ::= NK_LE */
{ 171, -1 }, /* (140) compare_op ::= NK_GE */
{ 171, -1 }, /* (141) compare_op ::= NK_NE */
{ 171, -1 }, /* (142) compare_op ::= NK_EQ */
{ 171, -1 }, /* (143) compare_op ::= LIKE */
{ 171, -2 }, /* (144) compare_op ::= NOT LIKE */
{ 171, -1 }, /* (145) compare_op ::= MATCH */
{ 171, -1 }, /* (146) compare_op ::= NMATCH */
{ 172, -1 }, /* (147) in_op ::= IN */
{ 172, -2 }, /* (148) in_op ::= NOT IN */
{ 173, -3 }, /* (149) in_predicate_value ::= NK_LP expression_list NK_RP */
{ 174, -1 }, /* (150) boolean_value_expression ::= boolean_primary */
{ 174, -2 }, /* (151) boolean_value_expression ::= NOT boolean_primary */
{ 174, -3 }, /* (152) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
{ 174, -3 }, /* (153) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
{ 175, -1 }, /* (154) boolean_primary ::= predicate */
{ 175, -3 }, /* (155) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
{ 176, -1 }, /* (156) common_expression ::= expression */
{ 176, -1 }, /* (157) common_expression ::= boolean_value_expression */
{ 177, -2 }, /* (158) from_clause ::= FROM table_reference_list */
{ 178, -1 }, /* (159) table_reference_list ::= table_reference */
{ 178, -3 }, /* (160) table_reference_list ::= table_reference_list NK_COMMA table_reference */
{ 179, -1 }, /* (161) table_reference ::= table_primary */
{ 179, -1 }, /* (162) table_reference ::= joined_table */
{ 180, -2 }, /* (163) table_primary ::= table_name alias_opt */
{ 180, -4 }, /* (164) table_primary ::= db_name NK_DOT table_name alias_opt */
{ 180, -2 }, /* (165) table_primary ::= subquery alias_opt */
{ 180, -1 }, /* (166) table_primary ::= parenthesized_joined_table */
{ 182, 0 }, /* (167) alias_opt ::= */
{ 182, -1 }, /* (168) alias_opt ::= table_alias */
{ 182, -2 }, /* (169) alias_opt ::= AS table_alias */
{ 183, -3 }, /* (170) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
{ 183, -3 }, /* (171) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
{ 181, -6 }, /* (172) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
{ 184, 0 }, /* (173) join_type ::= */
{ 184, -1 }, /* (174) join_type ::= INNER */
{ 186, -9 }, /* (175) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
{ 187, 0 }, /* (176) set_quantifier_opt ::= */
{ 187, -1 }, /* (177) set_quantifier_opt ::= DISTINCT */
{ 187, -1 }, /* (178) set_quantifier_opt ::= ALL */
{ 188, -1 }, /* (179) select_list ::= NK_STAR */
{ 188, -1 }, /* (180) select_list ::= select_sublist */
{ 194, -1 }, /* (181) select_sublist ::= select_item */
{ 194, -3 }, /* (182) select_sublist ::= select_sublist NK_COMMA select_item */
{ 195, -1 }, /* (183) select_item ::= common_expression */
{ 195, -2 }, /* (184) select_item ::= common_expression column_alias */
{ 195, -3 }, /* (185) select_item ::= common_expression AS column_alias */
{ 195, -3 }, /* (186) select_item ::= table_name NK_DOT NK_STAR */
{ 189, 0 }, /* (187) where_clause_opt ::= */
{ 189, -2 }, /* (188) where_clause_opt ::= WHERE search_condition */
{ 190, 0 }, /* (189) partition_by_clause_opt ::= */
{ 190, -3 }, /* (190) partition_by_clause_opt ::= PARTITION BY expression_list */
{ 191, 0 }, /* (191) twindow_clause_opt ::= */
{ 191, -6 }, /* (192) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA NK_INTEGER NK_RP */
{ 191, -4 }, /* (193) twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP */
{ 191, -6 }, /* (194) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
{ 191, -8 }, /* (195) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
{ 196, 0 }, /* (196) sliding_opt ::= */
{ 196, -4 }, /* (197) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
{ 197, 0 }, /* (198) fill_opt ::= */
{ 197, -4 }, /* (199) fill_opt ::= FILL NK_LP fill_mode NK_RP */
{ 197, -6 }, /* (200) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
{ 198, -1 }, /* (201) fill_mode ::= NONE */
{ 198, -1 }, /* (202) fill_mode ::= PREV */
{ 198, -1 }, /* (203) fill_mode ::= NULL */
{ 198, -1 }, /* (204) fill_mode ::= LINEAR */
{ 198, -1 }, /* (205) fill_mode ::= NEXT */
{ 192, 0 }, /* (206) group_by_clause_opt ::= */
{ 192, -3 }, /* (207) group_by_clause_opt ::= GROUP BY group_by_list */
{ 199, -1 }, /* (208) group_by_list ::= expression */
{ 199, -3 }, /* (209) group_by_list ::= group_by_list NK_COMMA expression */
{ 193, 0 }, /* (210) having_clause_opt ::= */
{ 193, -2 }, /* (211) having_clause_opt ::= HAVING search_condition */
{ 160, -4 }, /* (212) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
{ 200, -1 }, /* (213) query_expression_body ::= query_primary */
{ 200, -4 }, /* (214) query_expression_body ::= query_expression_body UNION ALL query_expression_body */
{ 204, -1 }, /* (215) query_primary ::= query_specification */
{ 201, 0 }, /* (216) order_by_clause_opt ::= */
{ 201, -3 }, /* (217) order_by_clause_opt ::= ORDER BY sort_specification_list */
{ 202, 0 }, /* (218) slimit_clause_opt ::= */
{ 202, -2 }, /* (219) slimit_clause_opt ::= SLIMIT NK_INTEGER */
{ 202, -4 }, /* (220) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
{ 202, -4 }, /* (221) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
{ 203, 0 }, /* (222) limit_clause_opt ::= */
{ 203, -2 }, /* (223) limit_clause_opt ::= LIMIT NK_INTEGER */
{ 203, -4 }, /* (224) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
{ 203, -4 }, /* (225) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
{ 169, -3 }, /* (226) subquery ::= NK_LP query_expression NK_RP */
{ 185, -1 }, /* (227) search_condition ::= common_expression */
{ 205, -1 }, /* (228) sort_specification_list ::= sort_specification */
{ 205, -3 }, /* (229) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
{ 206, -3 }, /* (230) sort_specification ::= expression ordering_specification_opt null_ordering_opt */
{ 207, 0 }, /* (231) ordering_specification_opt ::= */
{ 207, -1 }, /* (232) ordering_specification_opt ::= ASC */
{ 207, -1 }, /* (233) ordering_specification_opt ::= DESC */
{ 208, 0 }, /* (234) null_ordering_opt ::= */
{ 208, -2 }, /* (235) null_ordering_opt ::= NULLS FIRST */
{ 208, -2 }, /* (236) null_ordering_opt ::= NULLS LAST */
{ 138, -5 }, /* (0) cmd ::= CREATE USER user_name PASS NK_STRING */
{ 138, -5 }, /* (1) cmd ::= ALTER USER user_name PASS NK_STRING */
{ 138, -5 }, /* (2) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */
{ 138, -3 }, /* (3) cmd ::= DROP USER user_name */
{ 138, -2 }, /* (4) cmd ::= SHOW USERS */
{ 138, -3 }, /* (5) cmd ::= CREATE DNODE dnode_endpoint */
{ 138, -5 }, /* (6) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */
{ 138, -3 }, /* (7) cmd ::= DROP DNODE NK_INTEGER */
{ 138, -3 }, /* (8) cmd ::= DROP DNODE dnode_endpoint */
{ 138, -2 }, /* (9) cmd ::= SHOW DNODES */
{ 140, -1 }, /* (10) dnode_endpoint ::= NK_STRING */
{ 141, -1 }, /* (11) dnode_host_name ::= NK_ID */
{ 141, -1 }, /* (12) dnode_host_name ::= NK_IPTOKEN */
{ 138, -5 }, /* (13) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
{ 138, -4 }, /* (14) cmd ::= DROP DATABASE exists_opt db_name */
{ 138, -2 }, /* (15) cmd ::= SHOW DATABASES */
{ 138, -2 }, /* (16) cmd ::= USE db_name */
{ 142, -3 }, /* (17) not_exists_opt ::= IF NOT EXISTS */
{ 142, 0 }, /* (18) not_exists_opt ::= */
{ 145, -2 }, /* (19) exists_opt ::= IF EXISTS */
{ 145, 0 }, /* (20) exists_opt ::= */
{ 144, 0 }, /* (21) db_options ::= */
{ 144, -3 }, /* (22) db_options ::= db_options BLOCKS NK_INTEGER */
{ 144, -3 }, /* (23) db_options ::= db_options CACHE NK_INTEGER */
{ 144, -3 }, /* (24) db_options ::= db_options CACHELAST NK_INTEGER */
{ 144, -3 }, /* (25) db_options ::= db_options COMP NK_INTEGER */
{ 144, -3 }, /* (26) db_options ::= db_options DAYS NK_INTEGER */
{ 144, -3 }, /* (27) db_options ::= db_options FSYNC NK_INTEGER */
{ 144, -3 }, /* (28) db_options ::= db_options MAXROWS NK_INTEGER */
{ 144, -3 }, /* (29) db_options ::= db_options MINROWS NK_INTEGER */
{ 144, -3 }, /* (30) db_options ::= db_options KEEP NK_INTEGER */
{ 144, -3 }, /* (31) db_options ::= db_options PRECISION NK_STRING */
{ 144, -3 }, /* (32) db_options ::= db_options QUORUM NK_INTEGER */
{ 144, -3 }, /* (33) db_options ::= db_options REPLICA NK_INTEGER */
{ 144, -3 }, /* (34) db_options ::= db_options TTL NK_INTEGER */
{ 144, -3 }, /* (35) db_options ::= db_options WAL NK_INTEGER */
{ 144, -3 }, /* (36) db_options ::= db_options VGROUPS NK_INTEGER */
{ 144, -3 }, /* (37) db_options ::= db_options SINGLE_STABLE NK_INTEGER */
{ 144, -3 }, /* (38) db_options ::= db_options STREAM_MODE NK_INTEGER */
{ 138, -9 }, /* (39) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
{ 138, -3 }, /* (40) cmd ::= CREATE TABLE multi_create_clause */
{ 138, -9 }, /* (41) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */
{ 138, -3 }, /* (42) cmd ::= DROP TABLE multi_drop_clause */
{ 138, -4 }, /* (43) cmd ::= DROP STABLE exists_opt full_table_name */
{ 138, -2 }, /* (44) cmd ::= SHOW TABLES */
{ 138, -2 }, /* (45) cmd ::= SHOW STABLES */
{ 150, -1 }, /* (46) multi_create_clause ::= create_subtable_clause */
{ 150, -2 }, /* (47) multi_create_clause ::= multi_create_clause create_subtable_clause */
{ 153, -9 }, /* (48) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP */
{ 152, -1 }, /* (49) multi_drop_clause ::= drop_table_clause */
{ 152, -2 }, /* (50) multi_drop_clause ::= multi_drop_clause drop_table_clause */
{ 156, -2 }, /* (51) drop_table_clause ::= exists_opt full_table_name */
{ 154, 0 }, /* (52) specific_tags_opt ::= */
{ 154, -3 }, /* (53) specific_tags_opt ::= NK_LP col_name_list NK_RP */
{ 146, -1 }, /* (54) full_table_name ::= table_name */
{ 146, -3 }, /* (55) full_table_name ::= db_name NK_DOT table_name */
{ 147, -1 }, /* (56) column_def_list ::= column_def */
{ 147, -3 }, /* (57) column_def_list ::= column_def_list NK_COMMA column_def */
{ 159, -2 }, /* (58) column_def ::= column_name type_name */
{ 159, -4 }, /* (59) column_def ::= column_name type_name COMMENT NK_STRING */
{ 161, -1 }, /* (60) type_name ::= BOOL */
{ 161, -1 }, /* (61) type_name ::= TINYINT */
{ 161, -1 }, /* (62) type_name ::= SMALLINT */
{ 161, -1 }, /* (63) type_name ::= INT */
{ 161, -1 }, /* (64) type_name ::= INTEGER */
{ 161, -1 }, /* (65) type_name ::= BIGINT */
{ 161, -1 }, /* (66) type_name ::= FLOAT */
{ 161, -1 }, /* (67) type_name ::= DOUBLE */
{ 161, -4 }, /* (68) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
{ 161, -1 }, /* (69) type_name ::= TIMESTAMP */
{ 161, -4 }, /* (70) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
{ 161, -2 }, /* (71) type_name ::= TINYINT UNSIGNED */
{ 161, -2 }, /* (72) type_name ::= SMALLINT UNSIGNED */
{ 161, -2 }, /* (73) type_name ::= INT UNSIGNED */
{ 161, -2 }, /* (74) type_name ::= BIGINT UNSIGNED */
{ 161, -1 }, /* (75) type_name ::= JSON */
{ 161, -4 }, /* (76) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
{ 161, -1 }, /* (77) type_name ::= MEDIUMBLOB */
{ 161, -1 }, /* (78) type_name ::= BLOB */
{ 161, -4 }, /* (79) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
{ 161, -1 }, /* (80) type_name ::= DECIMAL */
{ 161, -4 }, /* (81) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
{ 161, -6 }, /* (82) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
{ 148, 0 }, /* (83) tags_def_opt ::= */
{ 148, -1 }, /* (84) tags_def_opt ::= tags_def */
{ 151, -4 }, /* (85) tags_def ::= TAGS NK_LP column_def_list NK_RP */
{ 149, 0 }, /* (86) table_options ::= */
{ 149, -3 }, /* (87) table_options ::= table_options COMMENT NK_STRING */
{ 149, -3 }, /* (88) table_options ::= table_options KEEP NK_INTEGER */
{ 149, -3 }, /* (89) table_options ::= table_options TTL NK_INTEGER */
{ 149, -5 }, /* (90) table_options ::= table_options SMA NK_LP col_name_list NK_RP */
{ 157, -1 }, /* (91) col_name_list ::= col_name */
{ 157, -3 }, /* (92) col_name_list ::= col_name_list NK_COMMA col_name */
{ 162, -1 }, /* (93) col_name ::= column_name */
{ 138, -7 }, /* (94) cmd ::= CREATE SMA INDEX index_name ON table_name index_options */
{ 138, -9 }, /* (95) cmd ::= CREATE FULLTEXT INDEX index_name ON table_name NK_LP col_name_list NK_RP */
{ 164, 0 }, /* (96) index_options ::= */
{ 164, -9 }, /* (97) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */
{ 164, -11 }, /* (98) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */
{ 165, -1 }, /* (99) func_list ::= func */
{ 165, -3 }, /* (100) func_list ::= func_list NK_COMMA func */
{ 168, -4 }, /* (101) func ::= function_name NK_LP expression_list NK_RP */
{ 138, -2 }, /* (102) cmd ::= SHOW VGROUPS */
{ 138, -4 }, /* (103) cmd ::= SHOW db_name NK_DOT VGROUPS */
{ 138, -2 }, /* (104) cmd ::= SHOW MNODES */
{ 138, -1 }, /* (105) cmd ::= query_expression */
{ 172, -1 }, /* (106) literal ::= NK_INTEGER */
{ 172, -1 }, /* (107) literal ::= NK_FLOAT */
{ 172, -1 }, /* (108) literal ::= NK_STRING */
{ 172, -1 }, /* (109) literal ::= NK_BOOL */
{ 172, -2 }, /* (110) literal ::= TIMESTAMP NK_STRING */
{ 172, -1 }, /* (111) literal ::= duration_literal */
{ 166, -1 }, /* (112) duration_literal ::= NK_VARIABLE */
{ 155, -1 }, /* (113) literal_list ::= literal */
{ 155, -3 }, /* (114) literal_list ::= literal_list NK_COMMA literal */
{ 143, -1 }, /* (115) db_name ::= NK_ID */
{ 158, -1 }, /* (116) table_name ::= NK_ID */
{ 160, -1 }, /* (117) column_name ::= NK_ID */
{ 169, -1 }, /* (118) function_name ::= NK_ID */
{ 173, -1 }, /* (119) table_alias ::= NK_ID */
{ 174, -1 }, /* (120) column_alias ::= NK_ID */
{ 139, -1 }, /* (121) user_name ::= NK_ID */
{ 163, -1 }, /* (122) index_name ::= NK_ID */
{ 175, -1 }, /* (123) expression ::= literal */
{ 175, -1 }, /* (124) expression ::= column_reference */
{ 175, -4 }, /* (125) expression ::= function_name NK_LP expression_list NK_RP */
{ 175, -4 }, /* (126) expression ::= function_name NK_LP NK_STAR NK_RP */
{ 175, -1 }, /* (127) expression ::= subquery */
{ 175, -3 }, /* (128) expression ::= NK_LP expression NK_RP */
{ 175, -2 }, /* (129) expression ::= NK_PLUS expression */
{ 175, -2 }, /* (130) expression ::= NK_MINUS expression */
{ 175, -3 }, /* (131) expression ::= expression NK_PLUS expression */
{ 175, -3 }, /* (132) expression ::= expression NK_MINUS expression */
{ 175, -3 }, /* (133) expression ::= expression NK_STAR expression */
{ 175, -3 }, /* (134) expression ::= expression NK_SLASH expression */
{ 175, -3 }, /* (135) expression ::= expression NK_REM expression */
{ 170, -1 }, /* (136) expression_list ::= expression */
{ 170, -3 }, /* (137) expression_list ::= expression_list NK_COMMA expression */
{ 176, -1 }, /* (138) column_reference ::= column_name */
{ 176, -3 }, /* (139) column_reference ::= table_name NK_DOT column_name */
{ 178, -3 }, /* (140) predicate ::= expression compare_op expression */
{ 178, -5 }, /* (141) predicate ::= expression BETWEEN expression AND expression */
{ 178, -6 }, /* (142) predicate ::= expression NOT BETWEEN expression AND expression */
{ 178, -3 }, /* (143) predicate ::= expression IS NULL */
{ 178, -4 }, /* (144) predicate ::= expression IS NOT NULL */
{ 178, -3 }, /* (145) predicate ::= expression in_op in_predicate_value */
{ 179, -1 }, /* (146) compare_op ::= NK_LT */
{ 179, -1 }, /* (147) compare_op ::= NK_GT */
{ 179, -1 }, /* (148) compare_op ::= NK_LE */
{ 179, -1 }, /* (149) compare_op ::= NK_GE */
{ 179, -1 }, /* (150) compare_op ::= NK_NE */
{ 179, -1 }, /* (151) compare_op ::= NK_EQ */
{ 179, -1 }, /* (152) compare_op ::= LIKE */
{ 179, -2 }, /* (153) compare_op ::= NOT LIKE */
{ 179, -1 }, /* (154) compare_op ::= MATCH */
{ 179, -1 }, /* (155) compare_op ::= NMATCH */
{ 180, -1 }, /* (156) in_op ::= IN */
{ 180, -2 }, /* (157) in_op ::= NOT IN */
{ 181, -3 }, /* (158) in_predicate_value ::= NK_LP expression_list NK_RP */
{ 182, -1 }, /* (159) boolean_value_expression ::= boolean_primary */
{ 182, -2 }, /* (160) boolean_value_expression ::= NOT boolean_primary */
{ 182, -3 }, /* (161) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
{ 182, -3 }, /* (162) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
{ 183, -1 }, /* (163) boolean_primary ::= predicate */
{ 183, -3 }, /* (164) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
{ 184, -1 }, /* (165) common_expression ::= expression */
{ 184, -1 }, /* (166) common_expression ::= boolean_value_expression */
{ 185, -2 }, /* (167) from_clause ::= FROM table_reference_list */
{ 186, -1 }, /* (168) table_reference_list ::= table_reference */
{ 186, -3 }, /* (169) table_reference_list ::= table_reference_list NK_COMMA table_reference */
{ 187, -1 }, /* (170) table_reference ::= table_primary */
{ 187, -1 }, /* (171) table_reference ::= joined_table */
{ 188, -2 }, /* (172) table_primary ::= table_name alias_opt */
{ 188, -4 }, /* (173) table_primary ::= db_name NK_DOT table_name alias_opt */
{ 188, -2 }, /* (174) table_primary ::= subquery alias_opt */
{ 188, -1 }, /* (175) table_primary ::= parenthesized_joined_table */
{ 190, 0 }, /* (176) alias_opt ::= */
{ 190, -1 }, /* (177) alias_opt ::= table_alias */
{ 190, -2 }, /* (178) alias_opt ::= AS table_alias */
{ 191, -3 }, /* (179) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
{ 191, -3 }, /* (180) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
{ 189, -6 }, /* (181) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
{ 192, 0 }, /* (182) join_type ::= */
{ 192, -1 }, /* (183) join_type ::= INNER */
{ 194, -9 }, /* (184) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
{ 195, 0 }, /* (185) set_quantifier_opt ::= */
{ 195, -1 }, /* (186) set_quantifier_opt ::= DISTINCT */
{ 195, -1 }, /* (187) set_quantifier_opt ::= ALL */
{ 196, -1 }, /* (188) select_list ::= NK_STAR */
{ 196, -1 }, /* (189) select_list ::= select_sublist */
{ 202, -1 }, /* (190) select_sublist ::= select_item */
{ 202, -3 }, /* (191) select_sublist ::= select_sublist NK_COMMA select_item */
{ 203, -1 }, /* (192) select_item ::= common_expression */
{ 203, -2 }, /* (193) select_item ::= common_expression column_alias */
{ 203, -3 }, /* (194) select_item ::= common_expression AS column_alias */
{ 203, -3 }, /* (195) select_item ::= table_name NK_DOT NK_STAR */
{ 197, 0 }, /* (196) where_clause_opt ::= */
{ 197, -2 }, /* (197) where_clause_opt ::= WHERE search_condition */
{ 198, 0 }, /* (198) partition_by_clause_opt ::= */
{ 198, -3 }, /* (199) partition_by_clause_opt ::= PARTITION BY expression_list */
{ 199, 0 }, /* (200) twindow_clause_opt ::= */
{ 199, -6 }, /* (201) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA NK_INTEGER NK_RP */
{ 199, -4 }, /* (202) twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP */
{ 199, -6 }, /* (203) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
{ 199, -8 }, /* (204) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
{ 167, 0 }, /* (205) sliding_opt ::= */
{ 167, -4 }, /* (206) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
{ 204, 0 }, /* (207) fill_opt ::= */
{ 204, -4 }, /* (208) fill_opt ::= FILL NK_LP fill_mode NK_RP */
{ 204, -6 }, /* (209) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
{ 205, -1 }, /* (210) fill_mode ::= NONE */
{ 205, -1 }, /* (211) fill_mode ::= PREV */
{ 205, -1 }, /* (212) fill_mode ::= NULL */
{ 205, -1 }, /* (213) fill_mode ::= LINEAR */
{ 205, -1 }, /* (214) fill_mode ::= NEXT */
{ 200, 0 }, /* (215) group_by_clause_opt ::= */
{ 200, -3 }, /* (216) group_by_clause_opt ::= GROUP BY group_by_list */
{ 206, -1 }, /* (217) group_by_list ::= expression */
{ 206, -3 }, /* (218) group_by_list ::= group_by_list NK_COMMA expression */
{ 201, 0 }, /* (219) having_clause_opt ::= */
{ 201, -2 }, /* (220) having_clause_opt ::= HAVING search_condition */
{ 171, -4 }, /* (221) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
{ 207, -1 }, /* (222) query_expression_body ::= query_primary */
{ 207, -4 }, /* (223) query_expression_body ::= query_expression_body UNION ALL query_expression_body */
{ 211, -1 }, /* (224) query_primary ::= query_specification */
{ 208, 0 }, /* (225) order_by_clause_opt ::= */
{ 208, -3 }, /* (226) order_by_clause_opt ::= ORDER BY sort_specification_list */
{ 209, 0 }, /* (227) slimit_clause_opt ::= */
{ 209, -2 }, /* (228) slimit_clause_opt ::= SLIMIT NK_INTEGER */
{ 209, -4 }, /* (229) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
{ 209, -4 }, /* (230) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
{ 210, 0 }, /* (231) limit_clause_opt ::= */
{ 210, -2 }, /* (232) limit_clause_opt ::= LIMIT NK_INTEGER */
{ 210, -4 }, /* (233) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
{ 210, -4 }, /* (234) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
{ 177, -3 }, /* (235) subquery ::= NK_LP query_expression NK_RP */
{ 193, -1 }, /* (236) search_condition ::= common_expression */
{ 212, -1 }, /* (237) sort_specification_list ::= sort_specification */
{ 212, -3 }, /* (238) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
{ 213, -3 }, /* (239) sort_specification ::= expression ordering_specification_opt null_ordering_opt */
{ 214, 0 }, /* (240) ordering_specification_opt ::= */
{ 214, -1 }, /* (241) ordering_specification_opt ::= ASC */
{ 214, -1 }, /* (242) ordering_specification_opt ::= DESC */
{ 215, 0 }, /* (243) null_ordering_opt ::= */
{ 215, -2 }, /* (244) null_ordering_opt ::= NULLS FIRST */
{ 215, -2 }, /* (245) null_ordering_opt ::= NULLS LAST */
};
static void yy_accept(yyParser*); /* Forward Declaration */
......@@ -1912,31 +1964,31 @@ static YYACTIONTYPE yy_reduce(
/********** Begin reduce actions **********************************************/
YYMINORTYPE yylhsminor;
case 0: /* cmd ::= CREATE USER user_name PASS NK_STRING */
{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy0);}
{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy0);}
break;
case 1: /* cmd ::= ALTER USER user_name PASS NK_STRING */
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy129, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0);}
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy209, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0);}
break;
case 2: /* cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy129, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0);}
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy209, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0);}
break;
case 3: /* cmd ::= DROP USER user_name */
{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy129); }
{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy209); }
break;
case 4: /* cmd ::= SHOW USERS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT, NULL); }
break;
case 5: /* cmd ::= CREATE DNODE dnode_endpoint */
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy129, NULL);}
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy209, NULL);}
break;
case 6: /* cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy0);}
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy0);}
break;
case 7: /* cmd ::= DROP DNODE NK_INTEGER */
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy0);}
break;
case 8: /* cmd ::= DROP DNODE dnode_endpoint */
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy129);}
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy209);}
break;
case 9: /* cmd ::= SHOW DNODES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT, NULL); }
......@@ -1944,122 +1996,123 @@ static YYACTIONTYPE yy_reduce(
case 10: /* dnode_endpoint ::= NK_STRING */
case 11: /* dnode_host_name ::= NK_ID */ yytestcase(yyruleno==11);
case 12: /* dnode_host_name ::= NK_IPTOKEN */ yytestcase(yyruleno==12);
case 107: /* db_name ::= NK_ID */ yytestcase(yyruleno==107);
case 108: /* table_name ::= NK_ID */ yytestcase(yyruleno==108);
case 109: /* column_name ::= NK_ID */ yytestcase(yyruleno==109);
case 110: /* function_name ::= NK_ID */ yytestcase(yyruleno==110);
case 111: /* table_alias ::= NK_ID */ yytestcase(yyruleno==111);
case 112: /* column_alias ::= NK_ID */ yytestcase(yyruleno==112);
case 113: /* user_name ::= NK_ID */ yytestcase(yyruleno==113);
{ yylhsminor.yy129 = yymsp[0].minor.yy0; }
yymsp[0].minor.yy129 = yylhsminor.yy129;
case 115: /* db_name ::= NK_ID */ yytestcase(yyruleno==115);
case 116: /* table_name ::= NK_ID */ yytestcase(yyruleno==116);
case 117: /* column_name ::= NK_ID */ yytestcase(yyruleno==117);
case 118: /* function_name ::= NK_ID */ yytestcase(yyruleno==118);
case 119: /* table_alias ::= NK_ID */ yytestcase(yyruleno==119);
case 120: /* column_alias ::= NK_ID */ yytestcase(yyruleno==120);
case 121: /* user_name ::= NK_ID */ yytestcase(yyruleno==121);
case 122: /* index_name ::= NK_ID */ yytestcase(yyruleno==122);
{ yylhsminor.yy209 = yymsp[0].minor.yy0; }
yymsp[0].minor.yy209 = yylhsminor.yy209;
break;
case 13: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy185, &yymsp[-1].minor.yy129, yymsp[0].minor.yy391);}
{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy281, &yymsp[-1].minor.yy209, yymsp[0].minor.yy344);}
break;
case 14: /* cmd ::= DROP DATABASE exists_opt db_name */
{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy185, &yymsp[0].minor.yy129); }
{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy281, &yymsp[0].minor.yy209); }
break;
case 15: /* cmd ::= SHOW DATABASES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT, NULL); }
break;
case 16: /* cmd ::= USE db_name */
{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy129);}
{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy209);}
break;
case 17: /* not_exists_opt ::= IF NOT EXISTS */
{ yymsp[-2].minor.yy185 = true; }
{ yymsp[-2].minor.yy281 = true; }
break;
case 18: /* not_exists_opt ::= */
case 20: /* exists_opt ::= */ yytestcase(yyruleno==20);
case 176: /* set_quantifier_opt ::= */ yytestcase(yyruleno==176);
{ yymsp[1].minor.yy185 = false; }
case 185: /* set_quantifier_opt ::= */ yytestcase(yyruleno==185);
{ yymsp[1].minor.yy281 = false; }
break;
case 19: /* exists_opt ::= IF EXISTS */
{ yymsp[-1].minor.yy185 = true; }
{ yymsp[-1].minor.yy281 = true; }
break;
case 21: /* db_options ::= */
{ yymsp[1].minor.yy391 = createDefaultDatabaseOptions(pCxt); }
{ yymsp[1].minor.yy344 = createDefaultDatabaseOptions(pCxt); }
break;
case 22: /* db_options ::= db_options BLOCKS NK_INTEGER */
{ yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_BLOCKS, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy391 = yylhsminor.yy391;
{ yylhsminor.yy344 = setDatabaseOption(pCxt, yymsp[-2].minor.yy344, DB_OPTION_BLOCKS, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 23: /* db_options ::= db_options CACHE NK_INTEGER */
{ yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_CACHE, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy391 = yylhsminor.yy391;
{ yylhsminor.yy344 = setDatabaseOption(pCxt, yymsp[-2].minor.yy344, DB_OPTION_CACHE, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 24: /* db_options ::= db_options CACHELAST NK_INTEGER */
{ yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy391 = yylhsminor.yy391;
{ yylhsminor.yy344 = setDatabaseOption(pCxt, yymsp[-2].minor.yy344, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 25: /* db_options ::= db_options COMP NK_INTEGER */
{ yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_COMP, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy391 = yylhsminor.yy391;
{ yylhsminor.yy344 = setDatabaseOption(pCxt, yymsp[-2].minor.yy344, DB_OPTION_COMP, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 26: /* db_options ::= db_options DAYS NK_INTEGER */
{ yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_DAYS, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy391 = yylhsminor.yy391;
{ yylhsminor.yy344 = setDatabaseOption(pCxt, yymsp[-2].minor.yy344, DB_OPTION_DAYS, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 27: /* db_options ::= db_options FSYNC NK_INTEGER */
{ yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy391 = yylhsminor.yy391;
{ yylhsminor.yy344 = setDatabaseOption(pCxt, yymsp[-2].minor.yy344, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 28: /* db_options ::= db_options MAXROWS NK_INTEGER */
{ yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy391 = yylhsminor.yy391;
{ yylhsminor.yy344 = setDatabaseOption(pCxt, yymsp[-2].minor.yy344, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 29: /* db_options ::= db_options MINROWS NK_INTEGER */
{ yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy391 = yylhsminor.yy391;
{ yylhsminor.yy344 = setDatabaseOption(pCxt, yymsp[-2].minor.yy344, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 30: /* db_options ::= db_options KEEP NK_INTEGER */
{ yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_KEEP, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy391 = yylhsminor.yy391;
{ yylhsminor.yy344 = setDatabaseOption(pCxt, yymsp[-2].minor.yy344, DB_OPTION_KEEP, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 31: /* db_options ::= db_options PRECISION NK_STRING */
{ yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy391 = yylhsminor.yy391;
{ yylhsminor.yy344 = setDatabaseOption(pCxt, yymsp[-2].minor.yy344, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 32: /* db_options ::= db_options QUORUM NK_INTEGER */
{ yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_QUORUM, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy391 = yylhsminor.yy391;
{ yylhsminor.yy344 = setDatabaseOption(pCxt, yymsp[-2].minor.yy344, DB_OPTION_QUORUM, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 33: /* db_options ::= db_options REPLICA NK_INTEGER */
{ yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy391 = yylhsminor.yy391;
{ yylhsminor.yy344 = setDatabaseOption(pCxt, yymsp[-2].minor.yy344, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 34: /* db_options ::= db_options TTL NK_INTEGER */
{ yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_TTL, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy391 = yylhsminor.yy391;
{ yylhsminor.yy344 = setDatabaseOption(pCxt, yymsp[-2].minor.yy344, DB_OPTION_TTL, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 35: /* db_options ::= db_options WAL NK_INTEGER */
{ yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_WAL, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy391 = yylhsminor.yy391;
{ yylhsminor.yy344 = setDatabaseOption(pCxt, yymsp[-2].minor.yy344, DB_OPTION_WAL, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 36: /* db_options ::= db_options VGROUPS NK_INTEGER */
{ yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy391 = yylhsminor.yy391;
{ yylhsminor.yy344 = setDatabaseOption(pCxt, yymsp[-2].minor.yy344, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 37: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */
{ yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_SINGLESTABLE, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy391 = yylhsminor.yy391;
{ yylhsminor.yy344 = setDatabaseOption(pCxt, yymsp[-2].minor.yy344, DB_OPTION_SINGLESTABLE, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 38: /* db_options ::= db_options STREAM_MODE NK_INTEGER */
{ yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_STREAMMODE, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy391 = yylhsminor.yy391;
{ yylhsminor.yy344 = setDatabaseOption(pCxt, yymsp[-2].minor.yy344, DB_OPTION_STREAMMODE, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 39: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
case 41: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==41);
{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy185, yymsp[-5].minor.yy256, yymsp[-3].minor.yy46, yymsp[-1].minor.yy46, yymsp[0].minor.yy340);}
{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy281, yymsp[-5].minor.yy344, yymsp[-3].minor.yy280, yymsp[-1].minor.yy280, yymsp[0].minor.yy344);}
break;
case 40: /* cmd ::= CREATE TABLE multi_create_clause */
{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy46);}
{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy280);}
break;
case 42: /* cmd ::= DROP TABLE multi_drop_clause */
{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy46); }
{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy280); }
break;
case 43: /* cmd ::= DROP STABLE exists_opt full_table_name */
{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy185, yymsp[0].minor.yy256); }
{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy281, yymsp[0].minor.yy344); }
break;
case 44: /* cmd ::= SHOW TABLES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, NULL); }
......@@ -2071,589 +2124,608 @@ static YYACTIONTYPE yy_reduce(
case 49: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==49);
case 56: /* column_def_list ::= column_def */ yytestcase(yyruleno==56);
case 91: /* col_name_list ::= col_name */ yytestcase(yyruleno==91);
case 181: /* select_sublist ::= select_item */ yytestcase(yyruleno==181);
case 228: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==228);
{ yylhsminor.yy46 = createNodeList(pCxt, yymsp[0].minor.yy256); }
yymsp[0].minor.yy46 = yylhsminor.yy46;
case 99: /* func_list ::= func */ yytestcase(yyruleno==99);
case 190: /* select_sublist ::= select_item */ yytestcase(yyruleno==190);
case 237: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==237);
{ yylhsminor.yy280 = createNodeList(pCxt, yymsp[0].minor.yy344); }
yymsp[0].minor.yy280 = yylhsminor.yy280;
break;
case 47: /* multi_create_clause ::= multi_create_clause create_subtable_clause */
case 50: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==50);
{ yylhsminor.yy46 = addNodeToList(pCxt, yymsp[-1].minor.yy46, yymsp[0].minor.yy256); }
yymsp[-1].minor.yy46 = yylhsminor.yy46;
{ yylhsminor.yy280 = addNodeToList(pCxt, yymsp[-1].minor.yy280, yymsp[0].minor.yy344); }
yymsp[-1].minor.yy280 = yylhsminor.yy280;
break;
case 48: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP */
{ yylhsminor.yy256 = createCreateSubTableClause(pCxt, yymsp[-8].minor.yy185, yymsp[-7].minor.yy256, yymsp[-5].minor.yy256, yymsp[-4].minor.yy46, yymsp[-1].minor.yy46); }
yymsp[-8].minor.yy256 = yylhsminor.yy256;
{ yylhsminor.yy344 = createCreateSubTableClause(pCxt, yymsp[-8].minor.yy281, yymsp[-7].minor.yy344, yymsp[-5].minor.yy344, yymsp[-4].minor.yy280, yymsp[-1].minor.yy280); }
yymsp[-8].minor.yy344 = yylhsminor.yy344;
break;
case 51: /* drop_table_clause ::= exists_opt full_table_name */
{ yylhsminor.yy256 = createDropTableClause(pCxt, yymsp[-1].minor.yy185, yymsp[0].minor.yy256); }
yymsp[-1].minor.yy256 = yylhsminor.yy256;
{ yylhsminor.yy344 = createDropTableClause(pCxt, yymsp[-1].minor.yy281, yymsp[0].minor.yy344); }
yymsp[-1].minor.yy344 = yylhsminor.yy344;
break;
case 52: /* specific_tags_opt ::= */
case 83: /* tags_def_opt ::= */ yytestcase(yyruleno==83);
case 189: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==189);
case 206: /* group_by_clause_opt ::= */ yytestcase(yyruleno==206);
case 216: /* order_by_clause_opt ::= */ yytestcase(yyruleno==216);
{ yymsp[1].minor.yy46 = NULL; }
case 198: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==198);
case 215: /* group_by_clause_opt ::= */ yytestcase(yyruleno==215);
case 225: /* order_by_clause_opt ::= */ yytestcase(yyruleno==225);
{ yymsp[1].minor.yy280 = NULL; }
break;
case 53: /* specific_tags_opt ::= NK_LP col_name_list NK_RP */
{ yymsp[-2].minor.yy46 = yymsp[-1].minor.yy46; }
{ yymsp[-2].minor.yy280 = yymsp[-1].minor.yy280; }
break;
case 54: /* full_table_name ::= table_name */
{ yylhsminor.yy256 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy129, NULL); }
yymsp[0].minor.yy256 = yylhsminor.yy256;
{ yylhsminor.yy344 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy209, NULL); }
yymsp[0].minor.yy344 = yylhsminor.yy344;
break;
case 55: /* full_table_name ::= db_name NK_DOT table_name */
{ yylhsminor.yy256 = createRealTableNode(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy129, NULL); }
yymsp[-2].minor.yy256 = yylhsminor.yy256;
{ yylhsminor.yy344 = createRealTableNode(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy209, NULL); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 57: /* column_def_list ::= column_def_list NK_COMMA column_def */
case 92: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==92);
case 182: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==182);
case 229: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==229);
{ yylhsminor.yy46 = addNodeToList(pCxt, yymsp[-2].minor.yy46, yymsp[0].minor.yy256); }
yymsp[-2].minor.yy46 = yylhsminor.yy46;
case 100: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==100);
case 191: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==191);
case 238: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==238);
{ yylhsminor.yy280 = addNodeToList(pCxt, yymsp[-2].minor.yy280, yymsp[0].minor.yy344); }
yymsp[-2].minor.yy280 = yylhsminor.yy280;
break;
case 58: /* column_def ::= column_name type_name */
{ yylhsminor.yy256 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy129, yymsp[0].minor.yy70, NULL); }
yymsp[-1].minor.yy256 = yylhsminor.yy256;
{ yylhsminor.yy344 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy209, yymsp[0].minor.yy304, NULL); }
yymsp[-1].minor.yy344 = yylhsminor.yy344;
break;
case 59: /* column_def ::= column_name type_name COMMENT NK_STRING */
{ yylhsminor.yy256 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy129, yymsp[-2].minor.yy70, &yymsp[0].minor.yy0); }
yymsp[-3].minor.yy256 = yylhsminor.yy256;
{ yylhsminor.yy344 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy209, yymsp[-2].minor.yy304, &yymsp[0].minor.yy0); }
yymsp[-3].minor.yy344 = yylhsminor.yy344;
break;
case 60: /* type_name ::= BOOL */
{ yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_BOOL); }
{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_BOOL); }
break;
case 61: /* type_name ::= TINYINT */
{ yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_TINYINT); }
{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_TINYINT); }
break;
case 62: /* type_name ::= SMALLINT */
{ yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_SMALLINT); }
{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_SMALLINT); }
break;
case 63: /* type_name ::= INT */
case 64: /* type_name ::= INTEGER */ yytestcase(yyruleno==64);
{ yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_INT); }
{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_INT); }
break;
case 65: /* type_name ::= BIGINT */
{ yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_BIGINT); }
{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_BIGINT); }
break;
case 66: /* type_name ::= FLOAT */
{ yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_FLOAT); }
{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_FLOAT); }
break;
case 67: /* type_name ::= DOUBLE */
{ yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_DOUBLE); }
{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_DOUBLE); }
break;
case 68: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
{ yymsp[-3].minor.yy70 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); }
{ yymsp[-3].minor.yy304 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); }
break;
case 69: /* type_name ::= TIMESTAMP */
{ yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); }
{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); }
break;
case 70: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
{ yymsp[-3].minor.yy70 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); }
{ yymsp[-3].minor.yy304 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); }
break;
case 71: /* type_name ::= TINYINT UNSIGNED */
{ yymsp[-1].minor.yy70 = createDataType(TSDB_DATA_TYPE_UTINYINT); }
{ yymsp[-1].minor.yy304 = createDataType(TSDB_DATA_TYPE_UTINYINT); }
break;
case 72: /* type_name ::= SMALLINT UNSIGNED */
{ yymsp[-1].minor.yy70 = createDataType(TSDB_DATA_TYPE_USMALLINT); }
{ yymsp[-1].minor.yy304 = createDataType(TSDB_DATA_TYPE_USMALLINT); }
break;
case 73: /* type_name ::= INT UNSIGNED */
{ yymsp[-1].minor.yy70 = createDataType(TSDB_DATA_TYPE_UINT); }
{ yymsp[-1].minor.yy304 = createDataType(TSDB_DATA_TYPE_UINT); }
break;
case 74: /* type_name ::= BIGINT UNSIGNED */
{ yymsp[-1].minor.yy70 = createDataType(TSDB_DATA_TYPE_UBIGINT); }
{ yymsp[-1].minor.yy304 = createDataType(TSDB_DATA_TYPE_UBIGINT); }
break;
case 75: /* type_name ::= JSON */
{ yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_JSON); }
{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_JSON); }
break;
case 76: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
{ yymsp[-3].minor.yy70 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); }
{ yymsp[-3].minor.yy304 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); }
break;
case 77: /* type_name ::= MEDIUMBLOB */
{ yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); }
{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); }
break;
case 78: /* type_name ::= BLOB */
{ yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_BLOB); }
{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_BLOB); }
break;
case 79: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
{ yymsp[-3].minor.yy70 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); }
{ yymsp[-3].minor.yy304 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); }
break;
case 80: /* type_name ::= DECIMAL */
{ yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
break;
case 81: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
{ yymsp[-3].minor.yy70 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
{ yymsp[-3].minor.yy304 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
break;
case 82: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
{ yymsp[-5].minor.yy70 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
{ yymsp[-5].minor.yy304 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
break;
case 84: /* tags_def_opt ::= tags_def */
case 180: /* select_list ::= select_sublist */ yytestcase(yyruleno==180);
{ yylhsminor.yy46 = yymsp[0].minor.yy46; }
yymsp[0].minor.yy46 = yylhsminor.yy46;
case 189: /* select_list ::= select_sublist */ yytestcase(yyruleno==189);
{ yylhsminor.yy280 = yymsp[0].minor.yy280; }
yymsp[0].minor.yy280 = yylhsminor.yy280;
break;
case 85: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */
{ yymsp[-3].minor.yy46 = yymsp[-1].minor.yy46; }
{ yymsp[-3].minor.yy280 = yymsp[-1].minor.yy280; }
break;
case 86: /* table_options ::= */
{ yymsp[1].minor.yy340 = createDefaultTableOptions(pCxt);}
{ yymsp[1].minor.yy344 = createDefaultTableOptions(pCxt);}
break;
case 87: /* table_options ::= table_options COMMENT NK_STRING */
{ yylhsminor.yy340 = setTableOption(pCxt, yymsp[-2].minor.yy340, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy340 = yylhsminor.yy340;
{ yylhsminor.yy344 = setTableOption(pCxt, yymsp[-2].minor.yy344, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 88: /* table_options ::= table_options KEEP NK_INTEGER */
{ yylhsminor.yy340 = setTableOption(pCxt, yymsp[-2].minor.yy340, TABLE_OPTION_KEEP, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy340 = yylhsminor.yy340;
{ yylhsminor.yy344 = setTableOption(pCxt, yymsp[-2].minor.yy344, TABLE_OPTION_KEEP, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 89: /* table_options ::= table_options TTL NK_INTEGER */
{ yylhsminor.yy340 = setTableOption(pCxt, yymsp[-2].minor.yy340, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy340 = yylhsminor.yy340;
{ yylhsminor.yy344 = setTableOption(pCxt, yymsp[-2].minor.yy344, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 90: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */
{ yylhsminor.yy340 = setTableSmaOption(pCxt, yymsp[-4].minor.yy340, yymsp[-1].minor.yy46); }
yymsp[-4].minor.yy340 = yylhsminor.yy340;
{ yylhsminor.yy344 = setTableSmaOption(pCxt, yymsp[-4].minor.yy344, yymsp[-1].minor.yy280); }
yymsp[-4].minor.yy344 = yylhsminor.yy344;
break;
case 93: /* col_name ::= column_name */
{ yylhsminor.yy256 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy129); }
yymsp[0].minor.yy256 = yylhsminor.yy256;
{ yylhsminor.yy344 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy209); }
yymsp[0].minor.yy344 = yylhsminor.yy344;
break;
case 94: /* cmd ::= CREATE SMA INDEX index_name ON table_name index_options */
{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, &yymsp[-3].minor.yy209, &yymsp[-1].minor.yy209, NULL, yymsp[0].minor.yy344); }
break;
case 94: /* cmd ::= SHOW VGROUPS */
case 95: /* cmd ::= CREATE FULLTEXT INDEX index_name ON table_name NK_LP col_name_list NK_RP */
{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_FULLTEXT, &yymsp[-5].minor.yy209, &yymsp[-3].minor.yy209, yymsp[-1].minor.yy280, NULL); }
break;
case 96: /* index_options ::= */
case 196: /* where_clause_opt ::= */ yytestcase(yyruleno==196);
case 200: /* twindow_clause_opt ::= */ yytestcase(yyruleno==200);
case 205: /* sliding_opt ::= */ yytestcase(yyruleno==205);
case 207: /* fill_opt ::= */ yytestcase(yyruleno==207);
case 219: /* having_clause_opt ::= */ yytestcase(yyruleno==219);
case 227: /* slimit_clause_opt ::= */ yytestcase(yyruleno==227);
case 231: /* limit_clause_opt ::= */ yytestcase(yyruleno==231);
{ yymsp[1].minor.yy344 = NULL; }
break;
case 97: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */
{ yymsp[-8].minor.yy344 = createIndexOption(pCxt, yymsp[-6].minor.yy280, yymsp[-2].minor.yy344, NULL, yymsp[0].minor.yy344); }
break;
case 98: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */
{ yymsp[-10].minor.yy344 = createIndexOption(pCxt, yymsp[-8].minor.yy280, yymsp[-4].minor.yy344, yymsp[-2].minor.yy344, yymsp[0].minor.yy344); }
break;
case 101: /* func ::= function_name NK_LP expression_list NK_RP */
{ yylhsminor.yy344 = createFunctionNode(pCxt, &yymsp[-3].minor.yy209, yymsp[-1].minor.yy280); }
yymsp[-3].minor.yy344 = yylhsminor.yy344;
break;
case 102: /* cmd ::= SHOW VGROUPS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, NULL); }
break;
case 95: /* cmd ::= SHOW db_name NK_DOT VGROUPS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, &yymsp[-2].minor.yy129); }
case 103: /* cmd ::= SHOW db_name NK_DOT VGROUPS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, &yymsp[-2].minor.yy209); }
break;
case 96: /* cmd ::= SHOW MNODES */
case 104: /* cmd ::= SHOW MNODES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT, NULL); }
break;
case 97: /* cmd ::= query_expression */
{ pCxt->pRootNode = yymsp[0].minor.yy256; }
break;
case 98: /* literal ::= NK_INTEGER */
{ yylhsminor.yy256 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy256 = yylhsminor.yy256;
break;
case 99: /* literal ::= NK_FLOAT */
{ yylhsminor.yy256 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy256 = yylhsminor.yy256;
break;
case 100: /* literal ::= NK_STRING */
{ yylhsminor.yy256 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy256 = yylhsminor.yy256;
break;
case 101: /* literal ::= NK_BOOL */
{ yylhsminor.yy256 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy256 = yylhsminor.yy256;
break;
case 102: /* literal ::= TIMESTAMP NK_STRING */
{ yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
yymsp[-1].minor.yy256 = yylhsminor.yy256;
break;
case 103: /* literal ::= duration_literal */
case 114: /* expression ::= literal */ yytestcase(yyruleno==114);
case 115: /* expression ::= column_reference */ yytestcase(yyruleno==115);
case 118: /* expression ::= subquery */ yytestcase(yyruleno==118);
case 150: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==150);
case 154: /* boolean_primary ::= predicate */ yytestcase(yyruleno==154);
case 156: /* common_expression ::= expression */ yytestcase(yyruleno==156);
case 157: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==157);
case 159: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==159);
case 161: /* table_reference ::= table_primary */ yytestcase(yyruleno==161);
case 162: /* table_reference ::= joined_table */ yytestcase(yyruleno==162);
case 166: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==166);
case 213: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==213);
case 215: /* query_primary ::= query_specification */ yytestcase(yyruleno==215);
{ yylhsminor.yy256 = yymsp[0].minor.yy256; }
yymsp[0].minor.yy256 = yylhsminor.yy256;
break;
case 104: /* duration_literal ::= NK_VARIABLE */
{ yylhsminor.yy256 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy256 = yylhsminor.yy256;
break;
case 105: /* literal_list ::= literal */
case 127: /* expression_list ::= expression */ yytestcase(yyruleno==127);
{ yylhsminor.yy46 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy256)); }
yymsp[0].minor.yy46 = yylhsminor.yy46;
break;
case 106: /* literal_list ::= literal_list NK_COMMA literal */
case 128: /* expression_list ::= expression_list NK_COMMA expression */ yytestcase(yyruleno==128);
{ yylhsminor.yy46 = addNodeToList(pCxt, yymsp[-2].minor.yy46, releaseRawExprNode(pCxt, yymsp[0].minor.yy256)); }
yymsp[-2].minor.yy46 = yylhsminor.yy46;
break;
case 116: /* expression ::= function_name NK_LP expression_list NK_RP */
{ yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy129, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy129, yymsp[-1].minor.yy46)); }
yymsp[-3].minor.yy256 = yylhsminor.yy256;
break;
case 117: /* expression ::= function_name NK_LP NK_STAR NK_RP */
{ yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy129, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy129, createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy0)))); }
yymsp[-3].minor.yy256 = yylhsminor.yy256;
break;
case 119: /* expression ::= NK_LP expression NK_RP */
case 155: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==155);
{ yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy256)); }
yymsp[-2].minor.yy256 = yylhsminor.yy256;
break;
case 120: /* expression ::= NK_PLUS expression */
case 105: /* cmd ::= query_expression */
{ pCxt->pRootNode = yymsp[0].minor.yy344; }
break;
case 106: /* literal ::= NK_INTEGER */
{ yylhsminor.yy344 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy344 = yylhsminor.yy344;
break;
case 107: /* literal ::= NK_FLOAT */
{ yylhsminor.yy344 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy344 = yylhsminor.yy344;
break;
case 108: /* literal ::= NK_STRING */
{ yylhsminor.yy344 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy344 = yylhsminor.yy344;
break;
case 109: /* literal ::= NK_BOOL */
{ yylhsminor.yy344 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy344 = yylhsminor.yy344;
break;
case 110: /* literal ::= TIMESTAMP NK_STRING */
{ yylhsminor.yy344 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
yymsp[-1].minor.yy344 = yylhsminor.yy344;
break;
case 111: /* literal ::= duration_literal */
case 123: /* expression ::= literal */ yytestcase(yyruleno==123);
case 124: /* expression ::= column_reference */ yytestcase(yyruleno==124);
case 127: /* expression ::= subquery */ yytestcase(yyruleno==127);
case 159: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==159);
case 163: /* boolean_primary ::= predicate */ yytestcase(yyruleno==163);
case 165: /* common_expression ::= expression */ yytestcase(yyruleno==165);
case 166: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==166);
case 168: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==168);
case 170: /* table_reference ::= table_primary */ yytestcase(yyruleno==170);
case 171: /* table_reference ::= joined_table */ yytestcase(yyruleno==171);
case 175: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==175);
case 222: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==222);
case 224: /* query_primary ::= query_specification */ yytestcase(yyruleno==224);
{ yylhsminor.yy344 = yymsp[0].minor.yy344; }
yymsp[0].minor.yy344 = yylhsminor.yy344;
break;
case 112: /* duration_literal ::= NK_VARIABLE */
{ yylhsminor.yy344 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy344 = yylhsminor.yy344;
break;
case 113: /* literal_list ::= literal */
case 136: /* expression_list ::= expression */ yytestcase(yyruleno==136);
{ yylhsminor.yy280 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy344)); }
yymsp[0].minor.yy280 = yylhsminor.yy280;
break;
case 114: /* literal_list ::= literal_list NK_COMMA literal */
case 137: /* expression_list ::= expression_list NK_COMMA expression */ yytestcase(yyruleno==137);
{ yylhsminor.yy280 = addNodeToList(pCxt, yymsp[-2].minor.yy280, releaseRawExprNode(pCxt, yymsp[0].minor.yy344)); }
yymsp[-2].minor.yy280 = yylhsminor.yy280;
break;
case 125: /* expression ::= function_name NK_LP expression_list NK_RP */
{ yylhsminor.yy344 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy209, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy209, yymsp[-1].minor.yy280)); }
yymsp[-3].minor.yy344 = yylhsminor.yy344;
break;
case 126: /* expression ::= function_name NK_LP NK_STAR NK_RP */
{ yylhsminor.yy344 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy209, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy209, createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy0)))); }
yymsp[-3].minor.yy344 = yylhsminor.yy344;
break;
case 128: /* expression ::= NK_LP expression NK_RP */
case 164: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==164);
{ yylhsminor.yy344 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy344)); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 129: /* expression ::= NK_PLUS expression */
{
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy256));
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy344);
yylhsminor.yy344 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy344));
}
yymsp[-1].minor.yy256 = yylhsminor.yy256;
yymsp[-1].minor.yy344 = yylhsminor.yy344;
break;
case 121: /* expression ::= NK_MINUS expression */
case 130: /* expression ::= NK_MINUS expression */
{
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[0].minor.yy256), NULL));
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy344);
yylhsminor.yy344 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[0].minor.yy344), NULL));
}
yymsp[-1].minor.yy256 = yylhsminor.yy256;
yymsp[-1].minor.yy344 = yylhsminor.yy344;
break;
case 122: /* expression ::= expression NK_PLUS expression */
case 131: /* expression ::= expression NK_PLUS expression */
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy344);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy344);
yylhsminor.yy344 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy344), releaseRawExprNode(pCxt, yymsp[0].minor.yy344)));
}
yymsp[-2].minor.yy256 = yylhsminor.yy256;
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 123: /* expression ::= expression NK_MINUS expression */
case 132: /* expression ::= expression NK_MINUS expression */
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy344);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy344);
yylhsminor.yy344 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy344), releaseRawExprNode(pCxt, yymsp[0].minor.yy344)));
}
yymsp[-2].minor.yy256 = yylhsminor.yy256;
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 124: /* expression ::= expression NK_STAR expression */
case 133: /* expression ::= expression NK_STAR expression */
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy344);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy344);
yylhsminor.yy344 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy344), releaseRawExprNode(pCxt, yymsp[0].minor.yy344)));
}
yymsp[-2].minor.yy256 = yylhsminor.yy256;
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 125: /* expression ::= expression NK_SLASH expression */
case 134: /* expression ::= expression NK_SLASH expression */
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy344);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy344);
yylhsminor.yy344 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy344), releaseRawExprNode(pCxt, yymsp[0].minor.yy344)));
}
yymsp[-2].minor.yy256 = yylhsminor.yy256;
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 126: /* expression ::= expression NK_REM expression */
case 135: /* expression ::= expression NK_REM expression */
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy344);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy344);
yylhsminor.yy344 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy344), releaseRawExprNode(pCxt, yymsp[0].minor.yy344)));
}
yymsp[-2].minor.yy256 = yylhsminor.yy256;
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 129: /* column_reference ::= column_name */
{ yylhsminor.yy256 = createRawExprNode(pCxt, &yymsp[0].minor.yy129, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy129)); }
yymsp[0].minor.yy256 = yylhsminor.yy256;
case 138: /* column_reference ::= column_name */
{ yylhsminor.yy344 = createRawExprNode(pCxt, &yymsp[0].minor.yy209, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy209)); }
yymsp[0].minor.yy344 = yylhsminor.yy344;
break;
case 130: /* column_reference ::= table_name NK_DOT column_name */
{ yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy129, createColumnNode(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy129)); }
yymsp[-2].minor.yy256 = yylhsminor.yy256;
case 139: /* column_reference ::= table_name NK_DOT column_name */
{ yylhsminor.yy344 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy209, createColumnNode(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy209)); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 131: /* predicate ::= expression compare_op expression */
case 136: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==136);
case 140: /* predicate ::= expression compare_op expression */
case 145: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==145);
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy326, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy344);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy344);
yylhsminor.yy344 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy236, releaseRawExprNode(pCxt, yymsp[-2].minor.yy344), releaseRawExprNode(pCxt, yymsp[0].minor.yy344)));
}
yymsp[-2].minor.yy256 = yylhsminor.yy256;
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 132: /* predicate ::= expression BETWEEN expression AND expression */
case 141: /* predicate ::= expression BETWEEN expression AND expression */
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy256), releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy344);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy344);
yylhsminor.yy344 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy344), releaseRawExprNode(pCxt, yymsp[-2].minor.yy344), releaseRawExprNode(pCxt, yymsp[0].minor.yy344)));
}
yymsp[-4].minor.yy256 = yylhsminor.yy256;
yymsp[-4].minor.yy344 = yylhsminor.yy344;
break;
case 133: /* predicate ::= expression NOT BETWEEN expression AND expression */
case 142: /* predicate ::= expression NOT BETWEEN expression AND expression */
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[-5].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy344);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy344);
yylhsminor.yy344 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy344), releaseRawExprNode(pCxt, yymsp[-5].minor.yy344), releaseRawExprNode(pCxt, yymsp[0].minor.yy344)));
}
yymsp[-5].minor.yy256 = yylhsminor.yy256;
yymsp[-5].minor.yy344 = yylhsminor.yy344;
break;
case 134: /* predicate ::= expression IS NULL */
case 143: /* predicate ::= expression IS NULL */
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy256);
yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), NULL));
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy344);
yylhsminor.yy344 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy344), NULL));
}
yymsp[-2].minor.yy256 = yylhsminor.yy256;
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 135: /* predicate ::= expression IS NOT NULL */
case 144: /* predicate ::= expression IS NOT NULL */
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy256);
yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy256), NULL));
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy344);
yylhsminor.yy344 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy344), NULL));
}
yymsp[-3].minor.yy256 = yylhsminor.yy256;
yymsp[-3].minor.yy344 = yylhsminor.yy344;
break;
case 137: /* compare_op ::= NK_LT */
{ yymsp[0].minor.yy326 = OP_TYPE_LOWER_THAN; }
case 146: /* compare_op ::= NK_LT */
{ yymsp[0].minor.yy236 = OP_TYPE_LOWER_THAN; }
break;
case 138: /* compare_op ::= NK_GT */
{ yymsp[0].minor.yy326 = OP_TYPE_GREATER_THAN; }
case 147: /* compare_op ::= NK_GT */
{ yymsp[0].minor.yy236 = OP_TYPE_GREATER_THAN; }
break;
case 139: /* compare_op ::= NK_LE */
{ yymsp[0].minor.yy326 = OP_TYPE_LOWER_EQUAL; }
case 148: /* compare_op ::= NK_LE */
{ yymsp[0].minor.yy236 = OP_TYPE_LOWER_EQUAL; }
break;
case 140: /* compare_op ::= NK_GE */
{ yymsp[0].minor.yy326 = OP_TYPE_GREATER_EQUAL; }
case 149: /* compare_op ::= NK_GE */
{ yymsp[0].minor.yy236 = OP_TYPE_GREATER_EQUAL; }
break;
case 141: /* compare_op ::= NK_NE */
{ yymsp[0].minor.yy326 = OP_TYPE_NOT_EQUAL; }
case 150: /* compare_op ::= NK_NE */
{ yymsp[0].minor.yy236 = OP_TYPE_NOT_EQUAL; }
break;
case 142: /* compare_op ::= NK_EQ */
{ yymsp[0].minor.yy326 = OP_TYPE_EQUAL; }
case 151: /* compare_op ::= NK_EQ */
{ yymsp[0].minor.yy236 = OP_TYPE_EQUAL; }
break;
case 143: /* compare_op ::= LIKE */
{ yymsp[0].minor.yy326 = OP_TYPE_LIKE; }
case 152: /* compare_op ::= LIKE */
{ yymsp[0].minor.yy236 = OP_TYPE_LIKE; }
break;
case 144: /* compare_op ::= NOT LIKE */
{ yymsp[-1].minor.yy326 = OP_TYPE_NOT_LIKE; }
case 153: /* compare_op ::= NOT LIKE */
{ yymsp[-1].minor.yy236 = OP_TYPE_NOT_LIKE; }
break;
case 145: /* compare_op ::= MATCH */
{ yymsp[0].minor.yy326 = OP_TYPE_MATCH; }
case 154: /* compare_op ::= MATCH */
{ yymsp[0].minor.yy236 = OP_TYPE_MATCH; }
break;
case 146: /* compare_op ::= NMATCH */
{ yymsp[0].minor.yy326 = OP_TYPE_NMATCH; }
case 155: /* compare_op ::= NMATCH */
{ yymsp[0].minor.yy236 = OP_TYPE_NMATCH; }
break;
case 147: /* in_op ::= IN */
{ yymsp[0].minor.yy326 = OP_TYPE_IN; }
case 156: /* in_op ::= IN */
{ yymsp[0].minor.yy236 = OP_TYPE_IN; }
break;
case 148: /* in_op ::= NOT IN */
{ yymsp[-1].minor.yy326 = OP_TYPE_NOT_IN; }
case 157: /* in_op ::= NOT IN */
{ yymsp[-1].minor.yy236 = OP_TYPE_NOT_IN; }
break;
case 149: /* in_predicate_value ::= NK_LP expression_list NK_RP */
{ yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy46)); }
yymsp[-2].minor.yy256 = yylhsminor.yy256;
case 158: /* in_predicate_value ::= NK_LP expression_list NK_RP */
{ yylhsminor.yy344 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy280)); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 151: /* boolean_value_expression ::= NOT boolean_primary */
case 160: /* boolean_value_expression ::= NOT boolean_primary */
{
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy256), NULL));
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy344);
yylhsminor.yy344 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy344), NULL));
}
yymsp[-1].minor.yy256 = yylhsminor.yy256;
yymsp[-1].minor.yy344 = yylhsminor.yy344;
break;
case 152: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
case 161: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy344);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy344);
yylhsminor.yy344 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy344), releaseRawExprNode(pCxt, yymsp[0].minor.yy344)));
}
yymsp[-2].minor.yy256 = yylhsminor.yy256;
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 153: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
case 162: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy344);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy344);
yylhsminor.yy344 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy344), releaseRawExprNode(pCxt, yymsp[0].minor.yy344)));
}
yymsp[-2].minor.yy256 = yylhsminor.yy256;
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 158: /* from_clause ::= FROM table_reference_list */
case 188: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==188);
case 211: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==211);
{ yymsp[-1].minor.yy256 = yymsp[0].minor.yy256; }
case 167: /* from_clause ::= FROM table_reference_list */
case 197: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==197);
case 220: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==220);
{ yymsp[-1].minor.yy344 = yymsp[0].minor.yy344; }
break;
case 160: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
{ yylhsminor.yy256 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy256, yymsp[0].minor.yy256, NULL); }
yymsp[-2].minor.yy256 = yylhsminor.yy256;
case 169: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
{ yylhsminor.yy344 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy344, yymsp[0].minor.yy344, NULL); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 163: /* table_primary ::= table_name alias_opt */
{ yylhsminor.yy256 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy129, &yymsp[0].minor.yy129); }
yymsp[-1].minor.yy256 = yylhsminor.yy256;
case 172: /* table_primary ::= table_name alias_opt */
{ yylhsminor.yy344 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy209, &yymsp[0].minor.yy209); }
yymsp[-1].minor.yy344 = yylhsminor.yy344;
break;
case 164: /* table_primary ::= db_name NK_DOT table_name alias_opt */
{ yylhsminor.yy256 = createRealTableNode(pCxt, &yymsp[-3].minor.yy129, &yymsp[-1].minor.yy129, &yymsp[0].minor.yy129); }
yymsp[-3].minor.yy256 = yylhsminor.yy256;
case 173: /* table_primary ::= db_name NK_DOT table_name alias_opt */
{ yylhsminor.yy344 = createRealTableNode(pCxt, &yymsp[-3].minor.yy209, &yymsp[-1].minor.yy209, &yymsp[0].minor.yy209); }
yymsp[-3].minor.yy344 = yylhsminor.yy344;
break;
case 165: /* table_primary ::= subquery alias_opt */
{ yylhsminor.yy256 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy256), &yymsp[0].minor.yy129); }
yymsp[-1].minor.yy256 = yylhsminor.yy256;
case 174: /* table_primary ::= subquery alias_opt */
{ yylhsminor.yy344 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy344), &yymsp[0].minor.yy209); }
yymsp[-1].minor.yy344 = yylhsminor.yy344;
break;
case 167: /* alias_opt ::= */
{ yymsp[1].minor.yy129 = nil_token; }
case 176: /* alias_opt ::= */
{ yymsp[1].minor.yy209 = nil_token; }
break;
case 168: /* alias_opt ::= table_alias */
{ yylhsminor.yy129 = yymsp[0].minor.yy129; }
yymsp[0].minor.yy129 = yylhsminor.yy129;
case 177: /* alias_opt ::= table_alias */
{ yylhsminor.yy209 = yymsp[0].minor.yy209; }
yymsp[0].minor.yy209 = yylhsminor.yy209;
break;
case 169: /* alias_opt ::= AS table_alias */
{ yymsp[-1].minor.yy129 = yymsp[0].minor.yy129; }
case 178: /* alias_opt ::= AS table_alias */
{ yymsp[-1].minor.yy209 = yymsp[0].minor.yy209; }
break;
case 170: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
case 171: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==171);
{ yymsp[-2].minor.yy256 = yymsp[-1].minor.yy256; }
case 179: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
case 180: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==180);
{ yymsp[-2].minor.yy344 = yymsp[-1].minor.yy344; }
break;
case 172: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
{ yylhsminor.yy256 = createJoinTableNode(pCxt, yymsp[-4].minor.yy266, yymsp[-5].minor.yy256, yymsp[-2].minor.yy256, yymsp[0].minor.yy256); }
yymsp[-5].minor.yy256 = yylhsminor.yy256;
case 181: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
{ yylhsminor.yy344 = createJoinTableNode(pCxt, yymsp[-4].minor.yy36, yymsp[-5].minor.yy344, yymsp[-2].minor.yy344, yymsp[0].minor.yy344); }
yymsp[-5].minor.yy344 = yylhsminor.yy344;
break;
case 173: /* join_type ::= */
{ yymsp[1].minor.yy266 = JOIN_TYPE_INNER; }
case 182: /* join_type ::= */
{ yymsp[1].minor.yy36 = JOIN_TYPE_INNER; }
break;
case 174: /* join_type ::= INNER */
{ yymsp[0].minor.yy266 = JOIN_TYPE_INNER; }
case 183: /* join_type ::= INNER */
{ yymsp[0].minor.yy36 = JOIN_TYPE_INNER; }
break;
case 175: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
case 184: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
{
yymsp[-8].minor.yy256 = createSelectStmt(pCxt, yymsp[-7].minor.yy185, yymsp[-6].minor.yy46, yymsp[-5].minor.yy256);
yymsp[-8].minor.yy256 = addWhereClause(pCxt, yymsp[-8].minor.yy256, yymsp[-4].minor.yy256);
yymsp[-8].minor.yy256 = addPartitionByClause(pCxt, yymsp[-8].minor.yy256, yymsp[-3].minor.yy46);
yymsp[-8].minor.yy256 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy256, yymsp[-2].minor.yy256);
yymsp[-8].minor.yy256 = addGroupByClause(pCxt, yymsp[-8].minor.yy256, yymsp[-1].minor.yy46);
yymsp[-8].minor.yy256 = addHavingClause(pCxt, yymsp[-8].minor.yy256, yymsp[0].minor.yy256);
yymsp[-8].minor.yy344 = createSelectStmt(pCxt, yymsp[-7].minor.yy281, yymsp[-6].minor.yy280, yymsp[-5].minor.yy344);
yymsp[-8].minor.yy344 = addWhereClause(pCxt, yymsp[-8].minor.yy344, yymsp[-4].minor.yy344);
yymsp[-8].minor.yy344 = addPartitionByClause(pCxt, yymsp[-8].minor.yy344, yymsp[-3].minor.yy280);
yymsp[-8].minor.yy344 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy344, yymsp[-2].minor.yy344);
yymsp[-8].minor.yy344 = addGroupByClause(pCxt, yymsp[-8].minor.yy344, yymsp[-1].minor.yy280);
yymsp[-8].minor.yy344 = addHavingClause(pCxt, yymsp[-8].minor.yy344, yymsp[0].minor.yy344);
}
break;
case 177: /* set_quantifier_opt ::= DISTINCT */
{ yymsp[0].minor.yy185 = true; }
case 186: /* set_quantifier_opt ::= DISTINCT */
{ yymsp[0].minor.yy281 = true; }
break;
case 178: /* set_quantifier_opt ::= ALL */
{ yymsp[0].minor.yy185 = false; }
case 187: /* set_quantifier_opt ::= ALL */
{ yymsp[0].minor.yy281 = false; }
break;
case 179: /* select_list ::= NK_STAR */
{ yymsp[0].minor.yy46 = NULL; }
case 188: /* select_list ::= NK_STAR */
{ yymsp[0].minor.yy280 = NULL; }
break;
case 183: /* select_item ::= common_expression */
case 192: /* select_item ::= common_expression */
{
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy256 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy256), &t);
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy344);
yylhsminor.yy344 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy344), &t);
}
yymsp[0].minor.yy256 = yylhsminor.yy256;
break;
case 184: /* select_item ::= common_expression column_alias */
{ yylhsminor.yy256 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy256), &yymsp[0].minor.yy129); }
yymsp[-1].minor.yy256 = yylhsminor.yy256;
yymsp[0].minor.yy344 = yylhsminor.yy344;
break;
case 185: /* select_item ::= common_expression AS column_alias */
{ yylhsminor.yy256 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), &yymsp[0].minor.yy129); }
yymsp[-2].minor.yy256 = yylhsminor.yy256;
case 193: /* select_item ::= common_expression column_alias */
{ yylhsminor.yy344 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy344), &yymsp[0].minor.yy209); }
yymsp[-1].minor.yy344 = yylhsminor.yy344;
break;
case 186: /* select_item ::= table_name NK_DOT NK_STAR */
{ yylhsminor.yy256 = createColumnNode(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy256 = yylhsminor.yy256;
case 194: /* select_item ::= common_expression AS column_alias */
{ yylhsminor.yy344 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy344), &yymsp[0].minor.yy209); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 187: /* where_clause_opt ::= */
case 191: /* twindow_clause_opt ::= */ yytestcase(yyruleno==191);
case 196: /* sliding_opt ::= */ yytestcase(yyruleno==196);
case 198: /* fill_opt ::= */ yytestcase(yyruleno==198);
case 210: /* having_clause_opt ::= */ yytestcase(yyruleno==210);
case 218: /* slimit_clause_opt ::= */ yytestcase(yyruleno==218);
case 222: /* limit_clause_opt ::= */ yytestcase(yyruleno==222);
{ yymsp[1].minor.yy256 = NULL; }
case 195: /* select_item ::= table_name NK_DOT NK_STAR */
{ yylhsminor.yy344 = createColumnNode(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 190: /* partition_by_clause_opt ::= PARTITION BY expression_list */
case 207: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==207);
case 217: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==217);
{ yymsp[-2].minor.yy46 = yymsp[0].minor.yy46; }
case 199: /* partition_by_clause_opt ::= PARTITION BY expression_list */
case 216: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==216);
case 226: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==226);
{ yymsp[-2].minor.yy280 = yymsp[0].minor.yy280; }
break;
case 192: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA NK_INTEGER NK_RP */
{ yymsp[-5].minor.yy256 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy256), &yymsp[-1].minor.yy0); }
case 201: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA NK_INTEGER NK_RP */
{ yymsp[-5].minor.yy344 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy344), &yymsp[-1].minor.yy0); }
break;
case 193: /* twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP */
{ yymsp[-3].minor.yy256 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy256)); }
case 202: /* twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP */
{ yymsp[-3].minor.yy344 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy344)); }
break;
case 194: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
{ yymsp[-5].minor.yy256 = createIntervalWindowNode(pCxt, yymsp[-3].minor.yy256, NULL, yymsp[-1].minor.yy256, yymsp[0].minor.yy256); }
case 203: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
{ yymsp[-5].minor.yy344 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy344), NULL, yymsp[-1].minor.yy344, yymsp[0].minor.yy344); }
break;
case 195: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
{ yymsp[-7].minor.yy256 = createIntervalWindowNode(pCxt, yymsp[-5].minor.yy256, yymsp[-3].minor.yy256, yymsp[-1].minor.yy256, yymsp[0].minor.yy256); }
case 204: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
{ yymsp[-7].minor.yy344 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy344), releaseRawExprNode(pCxt, yymsp[-3].minor.yy344), yymsp[-1].minor.yy344, yymsp[0].minor.yy344); }
break;
case 197: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
{ yymsp[-3].minor.yy256 = yymsp[-1].minor.yy256; }
case 206: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
{ yymsp[-3].minor.yy344 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy344); }
break;
case 199: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
{ yymsp[-3].minor.yy256 = createFillNode(pCxt, yymsp[-1].minor.yy360, NULL); }
case 208: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
{ yymsp[-3].minor.yy344 = createFillNode(pCxt, yymsp[-1].minor.yy342, NULL); }
break;
case 200: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
{ yymsp[-5].minor.yy256 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy46)); }
case 209: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
{ yymsp[-5].minor.yy344 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy280)); }
break;
case 201: /* fill_mode ::= NONE */
{ yymsp[0].minor.yy360 = FILL_MODE_NONE; }
case 210: /* fill_mode ::= NONE */
{ yymsp[0].minor.yy342 = FILL_MODE_NONE; }
break;
case 202: /* fill_mode ::= PREV */
{ yymsp[0].minor.yy360 = FILL_MODE_PREV; }
case 211: /* fill_mode ::= PREV */
{ yymsp[0].minor.yy342 = FILL_MODE_PREV; }
break;
case 203: /* fill_mode ::= NULL */
{ yymsp[0].minor.yy360 = FILL_MODE_NULL; }
case 212: /* fill_mode ::= NULL */
{ yymsp[0].minor.yy342 = FILL_MODE_NULL; }
break;
case 204: /* fill_mode ::= LINEAR */
{ yymsp[0].minor.yy360 = FILL_MODE_LINEAR; }
case 213: /* fill_mode ::= LINEAR */
{ yymsp[0].minor.yy342 = FILL_MODE_LINEAR; }
break;
case 205: /* fill_mode ::= NEXT */
{ yymsp[0].minor.yy360 = FILL_MODE_NEXT; }
case 214: /* fill_mode ::= NEXT */
{ yymsp[0].minor.yy342 = FILL_MODE_NEXT; }
break;
case 208: /* group_by_list ::= expression */
{ yylhsminor.yy46 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy256))); }
yymsp[0].minor.yy46 = yylhsminor.yy46;
case 217: /* group_by_list ::= expression */
{ yylhsminor.yy280 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy344))); }
yymsp[0].minor.yy280 = yylhsminor.yy280;
break;
case 209: /* group_by_list ::= group_by_list NK_COMMA expression */
{ yylhsminor.yy46 = addNodeToList(pCxt, yymsp[-2].minor.yy46, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy256))); }
yymsp[-2].minor.yy46 = yylhsminor.yy46;
case 218: /* group_by_list ::= group_by_list NK_COMMA expression */
{ yylhsminor.yy280 = addNodeToList(pCxt, yymsp[-2].minor.yy280, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy344))); }
yymsp[-2].minor.yy280 = yylhsminor.yy280;
break;
case 212: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
case 221: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
{
yylhsminor.yy256 = addOrderByClause(pCxt, yymsp[-3].minor.yy256, yymsp[-2].minor.yy46);
yylhsminor.yy256 = addSlimitClause(pCxt, yylhsminor.yy256, yymsp[-1].minor.yy256);
yylhsminor.yy256 = addLimitClause(pCxt, yylhsminor.yy256, yymsp[0].minor.yy256);
yylhsminor.yy344 = addOrderByClause(pCxt, yymsp[-3].minor.yy344, yymsp[-2].minor.yy280);
yylhsminor.yy344 = addSlimitClause(pCxt, yylhsminor.yy344, yymsp[-1].minor.yy344);
yylhsminor.yy344 = addLimitClause(pCxt, yylhsminor.yy344, yymsp[0].minor.yy344);
}
yymsp[-3].minor.yy256 = yylhsminor.yy256;
yymsp[-3].minor.yy344 = yylhsminor.yy344;
break;
case 214: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */
{ yylhsminor.yy256 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy256, yymsp[0].minor.yy256); }
yymsp[-3].minor.yy256 = yylhsminor.yy256;
case 223: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */
{ yylhsminor.yy344 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy344, yymsp[0].minor.yy344); }
yymsp[-3].minor.yy344 = yylhsminor.yy344;
break;
case 219: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
case 223: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==223);
{ yymsp[-1].minor.yy256 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
case 228: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
case 232: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==232);
{ yymsp[-1].minor.yy344 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
break;
case 220: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
case 224: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==224);
{ yymsp[-3].minor.yy256 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
case 229: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
case 233: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==233);
{ yymsp[-3].minor.yy344 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
break;
case 221: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
case 225: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==225);
{ yymsp[-3].minor.yy256 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
case 230: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
case 234: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==234);
{ yymsp[-3].minor.yy344 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
break;
case 226: /* subquery ::= NK_LP query_expression NK_RP */
{ yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy256); }
yymsp[-2].minor.yy256 = yylhsminor.yy256;
case 235: /* subquery ::= NK_LP query_expression NK_RP */
{ yylhsminor.yy344 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy344); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 227: /* search_condition ::= common_expression */
{ yylhsminor.yy256 = releaseRawExprNode(pCxt, yymsp[0].minor.yy256); }
yymsp[0].minor.yy256 = yylhsminor.yy256;
case 236: /* search_condition ::= common_expression */
{ yylhsminor.yy344 = releaseRawExprNode(pCxt, yymsp[0].minor.yy344); }
yymsp[0].minor.yy344 = yylhsminor.yy344;
break;
case 230: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */
{ yylhsminor.yy256 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), yymsp[-1].minor.yy202, yymsp[0].minor.yy147); }
yymsp[-2].minor.yy256 = yylhsminor.yy256;
case 239: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */
{ yylhsminor.yy344 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy344), yymsp[-1].minor.yy2, yymsp[0].minor.yy217); }
yymsp[-2].minor.yy344 = yylhsminor.yy344;
break;
case 231: /* ordering_specification_opt ::= */
{ yymsp[1].minor.yy202 = ORDER_ASC; }
case 240: /* ordering_specification_opt ::= */
{ yymsp[1].minor.yy2 = ORDER_ASC; }
break;
case 232: /* ordering_specification_opt ::= ASC */
{ yymsp[0].minor.yy202 = ORDER_ASC; }
case 241: /* ordering_specification_opt ::= ASC */
{ yymsp[0].minor.yy2 = ORDER_ASC; }
break;
case 233: /* ordering_specification_opt ::= DESC */
{ yymsp[0].minor.yy202 = ORDER_DESC; }
case 242: /* ordering_specification_opt ::= DESC */
{ yymsp[0].minor.yy2 = ORDER_DESC; }
break;
case 234: /* null_ordering_opt ::= */
{ yymsp[1].minor.yy147 = NULL_ORDER_DEFAULT; }
case 243: /* null_ordering_opt ::= */
{ yymsp[1].minor.yy217 = NULL_ORDER_DEFAULT; }
break;
case 235: /* null_ordering_opt ::= NULLS FIRST */
{ yymsp[-1].minor.yy147 = NULL_ORDER_FIRST; }
case 244: /* null_ordering_opt ::= NULLS FIRST */
{ yymsp[-1].minor.yy217 = NULL_ORDER_FIRST; }
break;
case 236: /* null_ordering_opt ::= NULLS LAST */
{ yymsp[-1].minor.yy147 = NULL_ORDER_LAST; }
case 245: /* null_ordering_opt ::= NULLS LAST */
{ yymsp[-1].minor.yy217 = NULL_ORDER_LAST; }
break;
default:
break;
......
......@@ -398,3 +398,10 @@ TEST_F(ParserTest, createTable) {
);
ASSERT_TRUE(run());
}
TEST_F(ParserTest, createSmaIndex) {
setDatabase("root", "test");
bind("create sma index index1 on t1 function(max(c1), min(c3 + 10), sum(c4))");
ASSERT_TRUE(run());
}
......@@ -26,6 +26,14 @@ SJson* tjsonCreateObject() {
return pJson;
}
SJson* tjsonCreateArray() {
SJson* pJson = cJSON_CreateArray();
if (pJson == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
}
return pJson;
}
void tjsonDelete(SJson* pJson) {
if (pJson != NULL) {
cJSON_Delete((cJSON*)pJson);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册