From 3bbfb26e093345260ecccea72c48edd852b29990 Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao> Date: Wed, 17 Jan 2024 14:22:19 +0800 Subject: [PATCH] stream count window --- include/common/tcommon.h | 2 + include/common/tmsg.h | 5 +- include/common/ttokendef.h | 140 +- include/libs/executor/storageapi.h | 3 + include/libs/nodes/plannodes.h | 11 +- include/libs/nodes/querynodes.h | 6 + include/libs/stream/streamState.h | 8 +- include/libs/stream/tstreamFileState.h | 3 + source/dnode/snode/src/snodeInitApi.c | 3 + source/dnode/vnode/src/vnd/vnodeInitApi.c | 3 + source/libs/executor/inc/executorInt.h | 26 +- source/libs/executor/inc/operator.h | 2 + source/libs/executor/src/executil.c | 2 + source/libs/executor/src/operator.c | 2 + source/libs/executor/src/scanoperator.c | 69 +- .../executor/src/streamcountwindowoperator.c | 563 ++ .../executor/src/streamtimewindowoperator.c | 2 +- source/libs/nodes/src/nodesCloneFuncs.c | 10 + source/libs/nodes/src/nodesCodeFuncs.c | 62 + source/libs/nodes/src/nodesMsgFuncs.c | 42 + source/libs/nodes/src/nodesTraverseFuncs.c | 10 + source/libs/nodes/src/nodesUtilFuncs.c | 17 + source/libs/parser/inc/parAst.h | 1 + source/libs/parser/inc/sql.y | 2 + source/libs/parser/src/parAstCreater.c | 13 + source/libs/parser/src/parTokenizer.c | 1 + source/libs/parser/src/parTranslater.c | 37 + source/libs/parser/src/sql.c | 6486 +++++++---------- source/libs/planner/src/planLogicCreater.c | 24 + source/libs/planner/src/planPhysiCreater.c | 22 + source/libs/planner/src/planSpliter.c | 14 + source/libs/planner/src/planUtil.c | 11 + source/libs/stream/src/streamSessionState.c | 92 +- source/libs/stream/src/streamState.c | 95 +- source/libs/stream/src/tstreamFileState.c | 9 + tests/script/tsim/stream/count0.sim | 183 + tests/script/tsim/stream/count1.sim | 31 + tests/script/tsim/stream/count2.sim | 302 + tests/script/tsim/stream/count3.sim | 116 + 39 files changed, 4549 insertions(+), 3881 deletions(-) create mode 100644 source/libs/executor/src/streamcountwindowoperator.c create mode 100644 tests/script/tsim/stream/count0.sim create mode 100644 tests/script/tsim/stream/count1.sim create mode 100644 tests/script/tsim/stream/count2.sim create mode 100644 tests/script/tsim/stream/count3.sim diff --git a/include/common/tcommon.h b/include/common/tcommon.h index 24e5d186b9..1775f507ca 100644 --- a/include/common/tcommon.h +++ b/include/common/tcommon.h @@ -54,6 +54,8 @@ typedef struct SSessionKey { uint64_t groupId; } SSessionKey; +typedef int64_t COUNT_TYPE; + typedef struct SVersionRange { int64_t minVer; int64_t maxVer; diff --git a/include/common/tmsg.h b/include/common/tmsg.h index c314d82036..e60ed0cd5b 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -244,6 +244,7 @@ typedef enum ENodeType { QUERY_NODE_EVENT_WINDOW, QUERY_NODE_HINT, QUERY_NODE_VIEW, + QUERY_NODE_COUNT_WINDOW, // Statement nodes are used in parser and planner module. QUERY_NODE_SET_OPERATOR = 100, @@ -424,7 +425,9 @@ typedef enum ENodeType { QUERY_NODE_PHYSICAL_PLAN_STREAM_EVENT, QUERY_NODE_PHYSICAL_PLAN_HASH_JOIN, QUERY_NODE_PHYSICAL_PLAN_GROUP_CACHE, - QUERY_NODE_PHYSICAL_PLAN_DYN_QUERY_CTRL + QUERY_NODE_PHYSICAL_PLAN_DYN_QUERY_CTRL, + QUERY_NODE_PHYSICAL_PLAN_MERGE_COUNT, + QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT, } ENodeType; typedef struct { diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 445fe0737b..67c1389430 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -294,75 +294,77 @@ #define TK_SESSION 275 #define TK_STATE_WINDOW 276 #define TK_EVENT_WINDOW 277 -#define TK_SLIDING 278 -#define TK_FILL 279 -#define TK_VALUE 280 -#define TK_VALUE_F 281 -#define TK_NONE 282 -#define TK_PREV 283 -#define TK_NULL_F 284 -#define TK_LINEAR 285 -#define TK_NEXT 286 -#define TK_HAVING 287 -#define TK_RANGE 288 -#define TK_EVERY 289 -#define TK_ORDER 290 -#define TK_SLIMIT 291 -#define TK_SOFFSET 292 -#define TK_LIMIT 293 -#define TK_OFFSET 294 -#define TK_ASC 295 -#define TK_NULLS 296 -#define TK_ABORT 297 -#define TK_AFTER 298 -#define TK_ATTACH 299 -#define TK_BEFORE 300 -#define TK_BEGIN 301 -#define TK_BITAND 302 -#define TK_BITNOT 303 -#define TK_BITOR 304 -#define TK_BLOCKS 305 -#define TK_CHANGE 306 -#define TK_COMMA 307 -#define TK_CONCAT 308 -#define TK_CONFLICT 309 -#define TK_COPY 310 -#define TK_DEFERRED 311 -#define TK_DELIMITERS 312 -#define TK_DETACH 313 -#define TK_DIVIDE 314 -#define TK_DOT 315 -#define TK_EACH 316 -#define TK_FAIL 317 -#define TK_FILE 318 -#define TK_FOR 319 -#define TK_GLOB 320 -#define TK_ID 321 -#define TK_IMMEDIATE 322 -#define TK_IMPORT 323 -#define TK_INITIALLY 324 -#define TK_INSTEAD 325 -#define TK_ISNULL 326 -#define TK_KEY 327 -#define TK_MODULES 328 -#define TK_NK_BITNOT 329 -#define TK_NK_SEMI 330 -#define TK_NOTNULL 331 -#define TK_OF 332 -#define TK_PLUS 333 -#define TK_PRIVILEGE 334 -#define TK_RAISE 335 -#define TK_RESTRICT 336 -#define TK_ROW 337 -#define TK_SEMI 338 -#define TK_STAR 339 -#define TK_STATEMENT 340 -#define TK_STRICT 341 -#define TK_STRING 342 -#define TK_TIMES 343 -#define TK_VALUES 344 -#define TK_VARIABLE 345 -#define TK_WAL 346 +#define TK_COUNT_WINDOW 278 +#define TK_SLIDING 279 +#define TK_FILL 280 +#define TK_VALUE 281 +#define TK_VALUE_F 282 +#define TK_NONE 283 +#define TK_PREV 284 +#define TK_NULL_F 285 +#define TK_LINEAR 286 +#define TK_NEXT 287 +#define TK_HAVING 288 +#define TK_RANGE 289 +#define TK_EVERY 290 +#define TK_ORDER 291 +#define TK_SLIMIT 292 +#define TK_SOFFSET 293 +#define TK_LIMIT 294 +#define TK_OFFSET 295 +#define TK_ASC 296 +#define TK_NULLS 297 +#define TK_ABORT 298 +#define TK_AFTER 299 +#define TK_ATTACH 300 +#define TK_BEFORE 301 +#define TK_BEGIN 302 +#define TK_BITAND 303 +#define TK_BITNOT 304 +#define TK_BITOR 305 +#define TK_BLOCKS 306 +#define TK_CHANGE 307 +#define TK_COMMA 308 +#define TK_CONCAT 309 +#define TK_CONFLICT 310 +#define TK_COPY 311 +#define TK_DEFERRED 312 +#define TK_DELIMITERS 313 +#define TK_DETACH 314 +#define TK_DIVIDE 315 +#define TK_DOT 316 +#define TK_EACH 317 +#define TK_FAIL 318 +#define TK_FILE 319 +#define TK_FOR 320 +#define TK_GLOB 321 +#define TK_ID 322 +#define TK_IMMEDIATE 323 +#define TK_IMPORT 324 +#define TK_INITIALLY 325 +#define TK_INSTEAD 326 +#define TK_ISNULL 327 +#define TK_KEY 328 +#define TK_MODULES 329 +#define TK_NK_BITNOT 330 +#define TK_NK_SEMI 331 +#define TK_NOTNULL 332 +#define TK_OF 333 +#define TK_PLUS 334 +#define TK_PRIVILEGE 335 +#define TK_RAISE 336 +#define TK_RESTRICT 337 +#define TK_ROW 338 +#define TK_SEMI 339 +#define TK_STAR 340 +#define TK_STATEMENT 341 +#define TK_STRICT 342 +#define TK_STRING 343 +#define TK_TIMES 344 +#define TK_VALUES 345 +#define TK_VARIABLE 346 +#define TK_WAL 347 + #define TK_NK_SPACE 600 #define TK_NK_COMMENT 601 diff --git a/include/libs/executor/storageapi.h b/include/libs/executor/storageapi.h index 669340f9e5..d489d33ee3 100644 --- a/include/libs/executor/storageapi.h +++ b/include/libs/executor/storageapi.h @@ -356,6 +356,7 @@ typedef struct SStateStore { int32_t (*streamStateSessionPut)(SStreamState* pState, const SSessionKey* key, void* value, int32_t vLen); int32_t (*streamStateSessionGet)(SStreamState* pState, SSessionKey* key, void** pVal, int32_t* pVLen); int32_t (*streamStateSessionDel)(SStreamState* pState, const SSessionKey* key); + int32_t (*streamStateSessionReset)(SStreamState* pState, void* pVal); int32_t (*streamStateSessionClear)(SStreamState* pState); int32_t (*streamStateSessionGetKVByCur)(SStreamStateCur* pCur, SSessionKey* pKey, void** pVal, int32_t* pVLen); int32_t (*streamStateStateAddIfNotExist)(SStreamState* pState, SSessionKey* key, char* pKeyData, int32_t keyDataLen, @@ -364,6 +365,8 @@ typedef struct SStateStore { int32_t (*streamStateSessionAllocWinBuffByNextPosition)(SStreamState* pState, SStreamStateCur* pCur, const SSessionKey* pKey, void** pVal, int32_t* pVLen); + int32_t (*streamStateCountWinAddIfNotExist)(SStreamState* pState, SSessionKey* pKey, COUNT_TYPE winCount, void** ppVal, int32_t* pVLen); + SUpdateInfo* (*updateInfoInit)(int64_t interval, int32_t precision, int64_t watermark, bool igUp); TSKEY (*updateInfoFillBlockData)(SUpdateInfo* pInfo, SSDataBlock* pBlock, int32_t primaryTsCol); bool (*updateInfoIsUpdated)(SUpdateInfo* pInfo, uint64_t tableId, TSKEY ts); diff --git a/include/libs/nodes/plannodes.h b/include/libs/nodes/plannodes.h index 6cb83ebb51..0be81bf025 100644 --- a/include/libs/nodes/plannodes.h +++ b/include/libs/nodes/plannodes.h @@ -243,7 +243,8 @@ typedef enum EWindowType { WINDOW_TYPE_INTERVAL = 1, WINDOW_TYPE_SESSION, WINDOW_TYPE_STATE, - WINDOW_TYPE_EVENT + WINDOW_TYPE_EVENT, + WINDOW_TYPE_COUNT } EWindowType; typedef enum EWindowAlgorithm { @@ -280,6 +281,7 @@ typedef struct SWindowLogicNode { int8_t igCheckUpdate; EWindowAlgorithm windowAlgo; bool isPartTb; + int64_t windowCount; } SWindowLogicNode; typedef struct SFillLogicNode { @@ -627,6 +629,13 @@ typedef struct SEventWinodwPhysiNode { typedef SEventWinodwPhysiNode SStreamEventWinodwPhysiNode; +typedef struct SCountWinodwPhysiNode { + SWindowPhysiNode window; + int64_t windowCount; +} SCountWinodwPhysiNode; + +typedef SCountWinodwPhysiNode SStreamCountWinodwPhysiNode; + typedef struct SSortPhysiNode { SPhysiNode node; SNodeList* pExprs; // these are expression list of order_by_clause and parameter expression of aggregate function diff --git a/include/libs/nodes/querynodes.h b/include/libs/nodes/querynodes.h index 9647c0adac..c915ff1e8e 100644 --- a/include/libs/nodes/querynodes.h +++ b/include/libs/nodes/querynodes.h @@ -278,6 +278,12 @@ typedef struct SEventWindowNode { SNode* pEndCond; } SEventWindowNode; +typedef struct SCountWindowNode { + ENodeType type; // QUERY_NODE_EVENT_WINDOW + SNode* pCol; // timestamp primary key + int64_t windowCount; +} SCountWindowNode; + typedef enum EFillMode { FILL_MODE_NONE = 1, FILL_MODE_VALUE, diff --git a/include/libs/stream/streamState.h b/include/libs/stream/streamState.h index 24222677a4..0ccfff13f6 100644 --- a/include/libs/stream/streamState.h +++ b/include/libs/stream/streamState.h @@ -55,6 +55,7 @@ int32_t streamStateSessionAddIfNotExist(SStreamState* pState, SSessionKey* key, int32_t streamStateSessionPut(SStreamState* pState, const SSessionKey* key, void* value, int32_t vLen); int32_t streamStateSessionGet(SStreamState* pState, SSessionKey* key, void** pVal, int32_t* pVLen); int32_t streamStateSessionDel(SStreamState* pState, const SSessionKey* key); +int32_t streamStateSessionReset(SStreamState* pState, void* pVal); int32_t streamStateSessionClear(SStreamState* pState); int32_t streamStateSessionGetKVByCur(SStreamStateCur* pCur, SSessionKey* pKey, void** pVal, int32_t* pVLen); int32_t streamStateSessionGetKeyByRange(SStreamState* pState, const SSessionKey* range, SSessionKey* curKey); @@ -79,6 +80,9 @@ int32_t streamStateReleaseBuf(SStreamState* pState, void* pVal, bool used); int32_t streamStateClearBuff(SStreamState* pState, void* pVal); void streamStateFreeVal(void* val); +// count window +int32_t streamStateCountWinAddIfNotExist(SStreamState* pState, SSessionKey* pKey, COUNT_TYPE winCount, void** ppVal, int32_t* pVLen); + SStreamStateCur* streamStateGetAndCheckCur(SStreamState* pState, SWinKey* key); SStreamStateCur* streamStateSeekKeyNext(SStreamState* pState, const SWinKey* key); SStreamStateCur* streamStateFillSeekKeyNext(SStreamState* pState, const SWinKey* key); @@ -128,10 +132,6 @@ int sessionRangeKeyCmpr(const SSessionKey* pWin1, const SSessionKey* pWin2); int sessionWinKeyCmpr(const SSessionKey* pWin1, const SSessionKey* pWin2); int stateSessionKeyCmpr(const void* pKey1, int kLen1, const void* pKey2, int kLen2); int stateKeyCmpr(const void* pKey1, int kLen1, const void* pKey2, int kLen2); -#if 0 -char* streamStateSessionDump(SStreamState* pState); -char* streamStateIntervalDump(SStreamState* pState); -#endif #ifdef __cplusplus } diff --git a/include/libs/stream/tstreamFileState.h b/include/libs/stream/tstreamFileState.h index 2a129c1830..9483adcf98 100644 --- a/include/libs/stream/tstreamFileState.h +++ b/include/libs/stream/tstreamFileState.h @@ -98,6 +98,9 @@ int32_t sessionWinStateGetKeyByRange(SStreamFileState* pFileState, const SSessio int32_t getStateWinResultBuff(SStreamFileState* pFileState, SSessionKey* key, char* pKeyData, int32_t keyDataLen, state_key_cmpr_fn fn, void** pVal, int32_t* pVLen); +// count window +int32_t getCountWinResultBuff(SStreamFileState* pFileState, SSessionKey* pKey, COUNT_TYPE winCount, void** pVal, int32_t* pVLen); + #ifdef __cplusplus } #endif diff --git a/source/dnode/snode/src/snodeInitApi.c b/source/dnode/snode/src/snodeInitApi.c index c605a8373e..b87ae86f61 100644 --- a/source/dnode/snode/src/snodeInitApi.c +++ b/source/dnode/snode/src/snodeInitApi.c @@ -67,12 +67,15 @@ void initStateStoreAPI(SStateStore* pStore) { pStore->streamStateSessionPut = streamStateSessionPut; pStore->streamStateSessionGet = streamStateSessionGet; pStore->streamStateSessionDel = streamStateSessionDel; + pStore->streamStateSessionReset = streamStateSessionReset; pStore->streamStateSessionClear = streamStateSessionClear; pStore->streamStateSessionGetKVByCur = streamStateSessionGetKVByCur; pStore->streamStateStateAddIfNotExist = streamStateStateAddIfNotExist; pStore->streamStateSessionGetKeyByRange = streamStateSessionGetKeyByRange; pStore->streamStateSessionAllocWinBuffByNextPosition = streamStateSessionAllocWinBuffByNextPosition; + pStore->streamStateCountWinAddIfNotExist = streamStateCountWinAddIfNotExist; + pStore->updateInfoInit = updateInfoInit; pStore->updateInfoFillBlockData = updateInfoFillBlockData; pStore->updateInfoIsUpdated = updateInfoIsUpdated; diff --git a/source/dnode/vnode/src/vnd/vnodeInitApi.c b/source/dnode/vnode/src/vnd/vnodeInitApi.c index c323a81093..7f7a2201a9 100644 --- a/source/dnode/vnode/src/vnd/vnodeInitApi.c +++ b/source/dnode/vnode/src/vnd/vnodeInitApi.c @@ -179,12 +179,15 @@ void initStateStoreAPI(SStateStore* pStore) { pStore->streamStateSessionPut = streamStateSessionPut; pStore->streamStateSessionGet = streamStateSessionGet; pStore->streamStateSessionDel = streamStateSessionDel; + pStore->streamStateSessionReset = streamStateSessionReset; pStore->streamStateSessionClear = streamStateSessionClear; pStore->streamStateSessionGetKVByCur = streamStateSessionGetKVByCur; pStore->streamStateStateAddIfNotExist = streamStateStateAddIfNotExist; pStore->streamStateSessionGetKeyByRange = streamStateSessionGetKeyByRange; pStore->streamStateSessionAllocWinBuffByNextPosition = streamStateSessionAllocWinBuffByNextPosition; + pStore->streamStateCountWinAddIfNotExist = streamStateCountWinAddIfNotExist; + pStore->updateInfoInit = updateInfoInit; pStore->updateInfoFillBlockData = updateInfoFillBlockData; pStore->updateInfoIsUpdated = updateInfoIsUpdated; diff --git a/source/libs/executor/inc/executorInt.h b/source/libs/executor/inc/executorInt.h index c3f47cde9d..34ffcc1f1a 100644 --- a/source/libs/executor/inc/executorInt.h +++ b/source/libs/executor/inc/executorInt.h @@ -370,6 +370,7 @@ typedef struct SStreamAggSupporter { STimeWindow winRange; SStorageAPI* pSessionAPI; struct SUpdateInfo* pUpdateInfo; + int32_t windowCount; } SStreamAggSupporter; typedef struct SWindowSupporter { @@ -657,6 +658,27 @@ typedef struct SStreamEventAggOperatorInfo { SFilterInfo* pEndCondInfo; } SStreamEventAggOperatorInfo; +typedef struct SStreamCountAggOperatorInfo { + SOptrBasicInfo binfo; + SStreamAggSupporter streamAggSup; + SExprSupp scalarSupp; // supporter for perform scalar function + SGroupResInfo groupResInfo; + int32_t primaryTsIndex; // primary timestamp slot id + STimeWindowAggSupp twAggSup; + SSDataBlock* pDelRes; + SSHashObj* pStDeleted; + void* pDelIterator; + bool ignoreExpiredData; + bool ignoreExpiredDataSaved; + SArray* pUpdated; + SSHashObj* pStUpdated; + int64_t dataVersion; + SArray* historyWins; + bool reCkBlock; + bool recvGetAll; + SSDataBlock* pCheckpointRes; +} SStreamCountAggOperatorInfo; + typedef struct SStreamPartitionOperatorInfo { SOptrBasicInfo binfo; SPartitionBySupporter partitionSup; @@ -855,7 +877,7 @@ void resetWinRange(STimeWindow* winRange); bool checkExpiredData(SStateStore* pAPI, SUpdateInfo* pUpdateInfo, STimeWindowAggSupp* pTwSup, uint64_t tableId, TSKEY ts); int64_t getDeleteMark(SWindowPhysiNode* pWinPhyNode, int64_t interval); void resetUnCloseSessionWinInfo(SSHashObj* winMap); -void setStreamOperatorCompleted(struct SOperatorInfo* pOperator); +void setStreamOperatorCompleted(struct SOperatorInfo* pOperator); void reloadAggSupFromDownStream(struct SOperatorInfo* downstream, SStreamAggSupporter* pAggSup); int32_t encodeSSessionKey(void** buf, SSessionKey* key); @@ -872,6 +894,8 @@ void freeExchangeGetBasicOperatorParam(void* pParam); void freeOperatorParam(SOperatorParam* pParam, SOperatorParamType type); void freeResetOperatorParams(struct SOperatorInfo* pOperator, SOperatorParamType type, bool allFree); SSDataBlock* getNextBlockFromDownstreamImpl(struct SOperatorInfo* pOperator, int32_t idx, bool clearParam); +void getCountWinRange(SStreamAggSupporter* pAggSup, const SSessionKey* pKey, EStreamType mode, SSessionKey* pDelRange); +bool doDeleteSessionWindow(SStreamAggSupporter* pAggSup, SSessionKey* pKey); bool inSlidingWindow(SInterval* pInterval, STimeWindow* pWin, SDataBlockInfo* pBlockInfo); bool inCalSlidingWindow(SInterval* pInterval, STimeWindow* pWin, TSKEY calStart, TSKEY calEnd, EStreamType blockType); diff --git a/source/libs/executor/inc/operator.h b/source/libs/executor/inc/operator.h index 0858a7e595..e1cdd94ec3 100644 --- a/source/libs/executor/inc/operator.h +++ b/source/libs/executor/inc/operator.h @@ -154,6 +154,8 @@ SOperatorInfo* createStreamFillOperatorInfo(SOperatorInfo* downstream, SStreamFi SOperatorInfo* createStreamEventAggOperatorInfo(SOperatorInfo* downstream, SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo, SReadHandle* pHandle); +SOperatorInfo* createStreamCountAggOperatorInfo(SOperatorInfo* downstream, SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo, SReadHandle* pHandle); + SOperatorInfo* createGroupSortOperatorInfo(SOperatorInfo* downstream, SGroupSortPhysiNode* pSortPhyNode, SExecTaskInfo* pTaskInfo); SOperatorInfo* createEventwindowOperatorInfo(SOperatorInfo* downstream, SPhysiNode* physiNode, SExecTaskInfo* pTaskInfo); diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index 1da7818c3c..0d2f351bdb 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -2243,6 +2243,8 @@ char* getStreamOpName(uint16_t opType) { return "stream partitionby"; case QUERY_NODE_PHYSICAL_PLAN_STREAM_EVENT: return "stream event"; + case QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT: + return "stream count"; } return ""; } diff --git a/source/libs/executor/src/operator.c b/source/libs/executor/src/operator.c index 69a8acb3d7..4c4e83fced 100644 --- a/source/libs/executor/src/operator.c +++ b/source/libs/executor/src/operator.c @@ -539,6 +539,8 @@ SOperatorInfo* createOperator(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo, SR pOptr = createGroupCacheOperatorInfo(ops, size, (SGroupCachePhysiNode*)pPhyNode, pTaskInfo); } else if (QUERY_NODE_PHYSICAL_PLAN_DYN_QUERY_CTRL == type) { pOptr = createDynQueryCtrlOperatorInfo(ops, size, (SDynQueryCtrlPhysiNode*)pPhyNode, pTaskInfo); + } else if (QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT == type) { + pOptr = createStreamCountAggOperatorInfo(ops[0], pPhyNode, pTaskInfo, pHandle); } else { terrno = TSDB_CODE_INVALID_PARA; pTaskInfo->code = terrno; diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 3ed5128858..964042ba40 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -1252,6 +1252,10 @@ static bool isSlidingWindow(SStreamScanInfo* pInfo) { return isIntervalWindow(pInfo) && pInfo->interval.interval != pInfo->interval.sliding; } +static bool isCountWindow(SStreamScanInfo* pInfo) { + return pInfo->windowSup.parentType == QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT; +} + static void setGroupId(SStreamScanInfo* pInfo, SSDataBlock* pBlock, int32_t groupColIndex, int32_t rowIndex) { SColumnInfoData* pColInfo = taosArrayGet(pBlock->pDataBlock, groupColIndex); uint64_t* groupCol = (uint64_t*)pColInfo->pData; @@ -1555,6 +1559,47 @@ static int32_t generateSessionScanRange(SStreamScanInfo* pInfo, SSDataBlock* pSr return TSDB_CODE_SUCCESS; } +static int32_t generateCountScanRange(SStreamScanInfo* pInfo, SSDataBlock* pSrcBlock, SSDataBlock* pDestBlock, EStreamScanMode mode) { + blockDataCleanup(pDestBlock); + if (pSrcBlock->info.rows == 0) { + return TSDB_CODE_SUCCESS; + } + int32_t code = blockDataEnsureCapacity(pDestBlock, pSrcBlock->info.rows); + if (code != TSDB_CODE_SUCCESS) { + return code; + } + ASSERT(taosArrayGetSize(pSrcBlock->pDataBlock) >= 3); + SColumnInfoData* pStartTsCol = taosArrayGet(pSrcBlock->pDataBlock, START_TS_COLUMN_INDEX); + TSKEY* startData = (TSKEY*)pStartTsCol->pData; + SColumnInfoData* pEndTsCol = taosArrayGet(pSrcBlock->pDataBlock, END_TS_COLUMN_INDEX); + TSKEY* endData = (TSKEY*)pEndTsCol->pData; + SColumnInfoData* pUidCol = taosArrayGet(pSrcBlock->pDataBlock, UID_COLUMN_INDEX); + uint64_t* uidCol = (uint64_t*)pUidCol->pData; + + SColumnInfoData* pDestStartCol = taosArrayGet(pDestBlock->pDataBlock, START_TS_COLUMN_INDEX); + SColumnInfoData* pDestEndCol = taosArrayGet(pDestBlock->pDataBlock, END_TS_COLUMN_INDEX); + SColumnInfoData* pDestUidCol = taosArrayGet(pDestBlock->pDataBlock, UID_COLUMN_INDEX); + SColumnInfoData* pDestGpCol = taosArrayGet(pDestBlock->pDataBlock, GROUPID_COLUMN_INDEX); + SColumnInfoData* pDestCalStartTsCol = taosArrayGet(pDestBlock->pDataBlock, CALCULATE_START_TS_COLUMN_INDEX); + SColumnInfoData* pDestCalEndTsCol = taosArrayGet(pDestBlock->pDataBlock, CALCULATE_END_TS_COLUMN_INDEX); + int64_t ver = pSrcBlock->info.version - 1; + for (int32_t i = 0; i < pSrcBlock->info.rows; i++) { + uint64_t groupId = getGroupIdByData(pInfo, uidCol[i], startData[i], ver); + SSessionKey startWin = {.win.skey = startData[i], .win.ekey = endData[i], .groupId = groupId}; + SSessionKey range = {0}; + getCountWinRange(pInfo->windowSup.pStreamAggSup, &startWin, mode, &range); + colDataSetVal(pDestStartCol, i, (const char*)&range.win.skey, false); + colDataSetVal(pDestEndCol, i, (const char*)&range.win.ekey, false); + + colDataSetNULL(pDestUidCol, i); + colDataSetVal(pDestGpCol, i, (const char*)&groupId, false); + colDataSetNULL(pDestCalStartTsCol, i); + colDataSetNULL(pDestCalEndTsCol, i); + pDestBlock->info.rows++; + } + return TSDB_CODE_SUCCESS; +} + static int32_t generateIntervalScanRange(SStreamScanInfo* pInfo, SSDataBlock* pSrcBlock, SSDataBlock* pDestBlock) { blockDataCleanup(pDestBlock); int32_t rows = pSrcBlock->info.rows; @@ -1691,12 +1736,14 @@ static int32_t generateDeleteResultBlock(SStreamScanInfo* pInfo, SSDataBlock* pS return TSDB_CODE_SUCCESS; } -static int32_t generateScanRange(SStreamScanInfo* pInfo, SSDataBlock* pSrcBlock, SSDataBlock* pDestBlock) { +static int32_t generateScanRange(SStreamScanInfo* pInfo, SSDataBlock* pSrcBlock, SSDataBlock* pDestBlock, EStreamType type) { int32_t code = TSDB_CODE_SUCCESS; if (isIntervalWindow(pInfo)) { code = generateIntervalScanRange(pInfo, pSrcBlock, pDestBlock); } else if (isSessionWindow(pInfo) || isStateWindow(pInfo)) { code = generateSessionScanRange(pInfo, pSrcBlock, pDestBlock); + } else if (isCountWindow(pInfo)) { + code = generateCountScanRange(pInfo, pSrcBlock, pDestBlock, type); } else { code = generateDeleteResultBlock(pInfo, pSrcBlock, pDestBlock); } @@ -2126,6 +2173,14 @@ void streamScanOperatorDecode(void* pBuff, int32_t len, SStreamScanInfo* pInfo) taosMemoryFree(pUpInfo); } } +static bool hasScanRange(SStreamScanInfo* pInfo) { + SStreamAggSupporter* pSup = pInfo->windowSup.pStreamAggSup; + return pSup && pSup->pScanBlock->info.rows > 0 && (isStateWindow(pInfo) || isCountWindow(pInfo)); +} + +static bool isStreamWindow(SStreamScanInfo* pInfo) { + return isIntervalWindow(pInfo) || isSessionWindow(pInfo) || isStateWindow(pInfo) || isCountWindow(pInfo); +} static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) { // NOTE: this operator does never check if current status is done or not @@ -2274,7 +2329,7 @@ FETCH_NEXT_BLOCK: goto FETCH_NEXT_BLOCK; } - if (!isIntervalWindow(pInfo) && !isSessionWindow(pInfo) && !isStateWindow(pInfo)) { + if (!isStreamWindow(pInfo)) { generateDeleteResultBlock(pInfo, pDelBlock, pInfo->pDeleteDataRes); pInfo->pDeleteDataRes->info.type = STREAM_DELETE_RESULT; printSpecDataBlock(pDelBlock, getStreamOpName(pOperator->operatorType), "delete result", GET_TASKID(pTaskInfo)); @@ -2288,7 +2343,7 @@ FETCH_NEXT_BLOCK: } else { pInfo->blockType = STREAM_INPUT__DATA_SUBMIT; pInfo->updateResIndex = 0; - generateScanRange(pInfo, pDelBlock, pInfo->pUpdateRes); + generateScanRange(pInfo, pDelBlock, pInfo->pUpdateRes, STREAM_DELETE_DATA); prepareRangeScan(pInfo, pInfo->pUpdateRes, &pInfo->updateResIndex); copyDataBlock(pInfo->pDeleteDataRes, pInfo->pUpdateRes); pInfo->pDeleteDataRes->info.type = STREAM_DELETE_DATA; @@ -2326,7 +2381,7 @@ FETCH_NEXT_BLOCK: } } break; case STREAM_SCAN_FROM_DELETE_DATA: { - generateScanRange(pInfo, pInfo->pUpdateDataRes, pInfo->pUpdateRes); + generateScanRange(pInfo, pInfo->pUpdateDataRes, pInfo->pUpdateRes, STREAM_DELETE_DATA); prepareRangeScan(pInfo, pInfo->pUpdateRes, &pInfo->updateResIndex); pInfo->scanMode = STREAM_SCAN_FROM_DATAREADER_RANGE; copyDataBlock(pInfo->pDeleteDataRes, pInfo->pUpdateRes); @@ -2334,7 +2389,7 @@ FETCH_NEXT_BLOCK: return pInfo->pDeleteDataRes; } break; case STREAM_SCAN_FROM_UPDATERES: { - generateScanRange(pInfo, pInfo->pUpdateDataRes, pInfo->pUpdateRes); + generateScanRange(pInfo, pInfo->pUpdateDataRes, pInfo->pUpdateRes, STREAM_CLEAR); prepareRangeScan(pInfo, pInfo->pUpdateRes, &pInfo->updateResIndex); pInfo->scanMode = STREAM_SCAN_FROM_DATAREADER_RANGE; return pInfo->pUpdateRes; @@ -2359,10 +2414,10 @@ FETCH_NEXT_BLOCK: break; } - SStreamAggSupporter* pSup = pInfo->windowSup.pStreamAggSup; - if (isStateWindow(pInfo) && pSup->pScanBlock->info.rows > 0) { + if (hasScanRange(pInfo)) { pInfo->scanMode = STREAM_SCAN_FROM_DATAREADER_RANGE; pInfo->updateResIndex = 0; + SStreamAggSupporter* pSup = pInfo->windowSup.pStreamAggSup; copyDataBlock(pInfo->pUpdateRes, pSup->pScanBlock); blockDataCleanup(pSup->pScanBlock); prepareRangeScan(pInfo, pInfo->pUpdateRes, &pInfo->updateResIndex); diff --git a/source/libs/executor/src/streamcountwindowoperator.c b/source/libs/executor/src/streamcountwindowoperator.c new file mode 100644 index 0000000000..577845ba4a --- /dev/null +++ b/source/libs/executor/src/streamcountwindowoperator.c @@ -0,0 +1,563 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +#include "executorInt.h" +#include "function.h" +#include "functionMgt.h" +#include "operator.h" +#include "querytask.h" +#include "tchecksum.h" +#include "tcommon.h" +#include "tdatablock.h" +#include "tglobal.h" +#include "tlog.h" +#include "ttime.h" + +#define IS_FINAL_COUNT_OP(op) ((op)->operatorType == QUERY_NODE_PHYSICAL_PLAN_STREAM_FINAL_COUNT) +#define STREAM_COUNT_OP_STATE_NAME "StreamCountHistoryState" +#define STREAM_COUNT_OP_CHECKPOINT_NAME "StreamCountOperator_Checkpoint" + +typedef struct SCountWindowInfo { + SResultWindowInfo winInfo; + COUNT_TYPE* pWindowCount; +} SCountWindowInfo; + +void destroyStreamCountAggOperatorInfo(void* param) { + SStreamCountAggOperatorInfo* pInfo = (SStreamCountAggOperatorInfo*)param; + cleanupBasicInfo(&pInfo->binfo); + destroyStreamAggSupporter(&pInfo->streamAggSup); + cleanupExprSupp(&pInfo->scalarSupp); + clearGroupResInfo(&pInfo->groupResInfo); + + colDataDestroy(&pInfo->twAggSup.timeWindowData); + blockDataDestroy(pInfo->pDelRes); + tSimpleHashCleanup(pInfo->pStUpdated); + tSimpleHashCleanup(pInfo->pStDeleted); + pInfo->pUpdated = taosArrayDestroy(pInfo->pUpdated); + cleanupGroupResInfo(&pInfo->groupResInfo); + + taosArrayDestroy(pInfo->historyWins); + blockDataDestroy(pInfo->pCheckpointRes); + + taosMemoryFreeClear(param); +} + +void setCountOutputBuf(SStreamAggSupporter* pAggSup, TSKEY ts, uint64_t groupId, SCountWindowInfo* pCurWin, + bool* pRebuild) { + int32_t code = TSDB_CODE_SUCCESS; + int32_t size = pAggSup->resultRowSize; + pCurWin->winInfo.sessionWin.groupId = groupId; + pCurWin->winInfo.sessionWin.win.skey = ts; + pCurWin->winInfo.sessionWin.win.ekey = ts; + + code = pAggSup->stateStore.streamStateCountWinAddIfNotExist( + pAggSup->pState, &pCurWin->winInfo.sessionWin, pAggSup->windowCount, (void**)&pCurWin->winInfo.pStatePos, &size); + // if (code == TSDB_CODE_SUCCESS && inWinRange(&pAggSup->winRange, &pCurWin->winInfo.sessionWin.win)) { + // pCurWin->pWindowCount= + // (COUNT_TYPE*) ((char*)pCurWin->winInfo.pStatePos->pRowBuff + (pAggSup->resultRowSize - sizeof(COUNT_TYPE))); + // } + if (code == TSDB_CODE_SUCCESS) { + pCurWin->winInfo.isOutput = true; + } + pCurWin->pWindowCount= + (COUNT_TYPE*) ((char*)pCurWin->winInfo.pStatePos->pRowBuff + (pAggSup->resultRowSize - sizeof(COUNT_TYPE))); + + if (*pCurWin->pWindowCount + 1 > pAggSup->windowCount) { + *pRebuild = true; + } +} + +int32_t updateCountWindowInfo(SStreamAggSupporter* pAggSup, SCountWindowInfo* pWinInfo, TSKEY* pTs, int32_t start, int32_t rows, int32_t maxRows, + SSHashObj* pStDeleted, bool* pRebuild) { + int32_t num = 0; + for (int32_t i = start; i < rows; i++) { + if (pTs[i] < pWinInfo->winInfo.sessionWin.win.ekey) { + num++; + } else { + break; + } + } + int32_t maxNum = TMIN(maxRows - *pWinInfo->pWindowCount, rows - start); + if (num > maxNum) { + *pRebuild = true; + } + *pWinInfo->pWindowCount += maxNum; + bool needDelState = false; + if (pWinInfo->winInfo.sessionWin.win.skey > pTs[start]) { + needDelState = true; + if (pStDeleted && pWinInfo->winInfo.isOutput) { + saveDeleteRes(pStDeleted, pWinInfo->winInfo.sessionWin); + } + + pWinInfo->winInfo.sessionWin.win.skey = pTs[start]; + } + + if (pWinInfo->winInfo.sessionWin.win.ekey < pTs[maxNum + start - 1]) { + needDelState = true; + pWinInfo->winInfo.sessionWin.win.ekey = pTs[maxNum + start - 1]; + } + + if (needDelState) { + memcpy(pWinInfo->winInfo.pStatePos->pKey, &pWinInfo->winInfo.sessionWin, sizeof(SSessionKey)); + if (pWinInfo->winInfo.pStatePos->needFree) { + pAggSup->stateStore.streamStateSessionDel(pAggSup->pState, &pWinInfo->winInfo.sessionWin); + } + } + + return maxNum; +} + +void getCountWinRange(SStreamAggSupporter* pAggSup, const SSessionKey* pKey, EStreamType mode, SSessionKey* pDelRange) { + *pDelRange = *pKey; + SStreamStateCur* pCur = pAggSup->stateStore.streamStateSessionSeekKeyCurrentNext(pAggSup->pState, pKey); + SSessionKey tmpKey = {0}; + int32_t code = pAggSup->stateStore.streamStateSessionGetKVByCur(pCur, &tmpKey, NULL, 0); + if (code != TSDB_CODE_SUCCESS) { + pAggSup->stateStore.streamStateFreeCur(pCur); + return; + } + pDelRange->win = tmpKey.win; + while (mode == STREAM_DELETE_DATA) { + pAggSup->stateStore.streamStateCurNext(pAggSup->pState, pCur); + code = pAggSup->stateStore.streamStateSessionGetKVByCur(pCur, &tmpKey, NULL, 0); + if (code != TSDB_CODE_SUCCESS) { + break; + } + pDelRange->win.ekey = TMAX(pDelRange->win.ekey, tmpKey.win.ekey); + } + pAggSup->stateStore.streamStateFreeCur(pCur); +} + +void getCurSessionWindowByKey(SStreamAggSupporter* pAggSup, const SSessionKey* pRange, SSessionKey* pKey) { + int32_t code = pAggSup->stateStore.streamStateSessionGetKeyByRange(pAggSup->pState, pRange, pKey); + if (code != TSDB_CODE_SUCCESS) { + SET_SESSION_WIN_KEY_INVALID(pKey); + } +} + +static void doStreamCountAggImpl(SOperatorInfo* pOperator, SSDataBlock* pSDataBlock, SSHashObj* pStUpdated, + SSHashObj* pStDeleted) { + SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; + SStreamCountAggOperatorInfo* pInfo = pOperator->info; + int32_t numOfOutput = pOperator->exprSupp.numOfExprs; + uint64_t groupId = pSDataBlock->info.id.groupId; + int64_t code = TSDB_CODE_SUCCESS; + SResultRow* pResult = NULL; + int32_t rows = pSDataBlock->info.rows; + int32_t winRows = 0; + SStreamAggSupporter* pAggSup = &pInfo->streamAggSup; + + pInfo->dataVersion = TMAX(pInfo->dataVersion, pSDataBlock->info.version); + pAggSup->winRange = pTaskInfo->streamInfo.fillHistoryWindow; + if (pAggSup->winRange.ekey <= 0) { + pAggSup->winRange.ekey = INT64_MAX; + } + + SColumnInfoData* pStartTsCol = taosArrayGet(pSDataBlock->pDataBlock, pInfo->primaryTsIndex); + TSKEY* startTsCols = (int64_t*)pStartTsCol->pData; + blockDataEnsureCapacity(pAggSup->pScanBlock, rows); + + for (int32_t i = 0; i < rows;) { + if (pInfo->ignoreExpiredData && + checkExpiredData(&pInfo->streamAggSup.stateStore, pInfo->streamAggSup.pUpdateInfo, &pInfo->twAggSup, + pSDataBlock->info.id.uid, startTsCols[i])) { + i++; + continue; + } + SCountWindowInfo curWin = {0}; + bool rebuild = false; + setCountOutputBuf(pAggSup, startTsCols[i], groupId, &curWin, &rebuild); + setSessionWinOutputInfo(pStUpdated, &curWin.winInfo); + if (!rebuild) { + winRows = updateCountWindowInfo(pAggSup, &curWin, startTsCols, i, rows, pAggSup->windowCount, pStDeleted, &rebuild); + } + if (rebuild) { + SSessionKey range = {0}; + getCountWinRange(pAggSup, &curWin.winInfo.sessionWin, STREAM_DELETE_DATA, &range); + range.win.skey = TMIN(startTsCols[i], range.win.skey); + range.win.ekey = TMAX(startTsCols[rows-1], range.win.ekey); + uint64_t uid = 0; + appendOneRowToStreamSpecialBlock(pAggSup->pScanBlock, &range.win.skey, &range.win.ekey, &uid, &range.groupId, + NULL); + break; + } + code = doOneWindowAggImpl(&pInfo->twAggSup.timeWindowData, &curWin.winInfo, &pResult, i, winRows, rows, numOfOutput, + pOperator, 0); + if (code != TSDB_CODE_SUCCESS || pResult == NULL) { + qError("%s do stream count aggregate impl error, code %s", GET_TASKID(pTaskInfo), tstrerror(code)); + T_LONG_JMP(pTaskInfo->env, TSDB_CODE_OUT_OF_MEMORY); + } + saveSessionOutputBuf(pAggSup, &curWin.winInfo); + + if (pInfo->twAggSup.calTrigger == STREAM_TRIGGER_AT_ONCE && pStUpdated) { + code = saveResult(curWin.winInfo, pStUpdated); + if (code != TSDB_CODE_SUCCESS) { + qError("%s do stream count aggregate impl, set result error, code %s", GET_TASKID(pTaskInfo), + tstrerror(code)); + T_LONG_JMP(pTaskInfo->env, TSDB_CODE_OUT_OF_MEMORY); + } + } + if (pInfo->twAggSup.calTrigger == STREAM_TRIGGER_WINDOW_CLOSE) { + SSessionKey key = {0}; + getSessionHashKey(&curWin.winInfo.sessionWin, &key); + tSimpleHashPut(pAggSup->pResultRows, &key, sizeof(SSessionKey), &curWin.winInfo, sizeof(SResultWindowInfo)); + } + + i += winRows; + } +} + +static SSDataBlock* buildCountResult(SOperatorInfo* pOperator) { + SStreamCountAggOperatorInfo* pInfo = pOperator->info; + SStreamAggSupporter* pAggSup = &pInfo->streamAggSup; + SOptrBasicInfo* pBInfo = &pInfo->binfo; + SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; + doBuildDeleteDataBlock(pOperator, pInfo->pStDeleted, pInfo->pDelRes, &pInfo->pDelIterator); + if (pInfo->pDelRes->info.rows > 0) { + printDataBlock(pInfo->pDelRes, getStreamOpName(pOperator->operatorType), GET_TASKID(pTaskInfo)); + return pInfo->pDelRes; + } + + doBuildSessionResult(pOperator, pAggSup->pState, &pInfo->groupResInfo, pBInfo->pRes); + if (pBInfo->pRes->info.rows > 0) { + printDataBlock(pBInfo->pRes, getStreamOpName(pOperator->operatorType), GET_TASKID(pTaskInfo)); + return pBInfo->pRes; + } + return NULL; +} + +int32_t doStreamCountEncodeOpState(void** buf, int32_t len, SOperatorInfo* pOperator, bool isParent) { + SStreamCountAggOperatorInfo* pInfo = pOperator->info; + if (!pInfo) { + return 0; + } + + void* pData = (buf == NULL) ? NULL : *buf; + + // 1.streamAggSup.pResultRows + int32_t tlen = 0; + int32_t mapSize = tSimpleHashGetSize(pInfo->streamAggSup.pResultRows); + tlen += taosEncodeFixedI32(buf, mapSize); + void* pIte = NULL; + size_t keyLen = 0; + int32_t iter = 0; + while ((pIte = tSimpleHashIterate(pInfo->streamAggSup.pResultRows, pIte, &iter)) != NULL) { + void* key = taosHashGetKey(pIte, &keyLen); + tlen += encodeSSessionKey(buf, key); + tlen += encodeSResultWindowInfo(buf, pIte, pInfo->streamAggSup.resultRowSize); + } + + // 2.twAggSup + tlen += encodeSTimeWindowAggSupp(buf, &pInfo->twAggSup); + + // 3.dataVersion + tlen += taosEncodeFixedI32(buf, pInfo->dataVersion); + + // 4.checksum + if (isParent) { + if (buf) { + uint32_t cksum = taosCalcChecksum(0, pData, len - sizeof(uint32_t)); + tlen += taosEncodeFixedU32(buf, cksum); + } else { + tlen += sizeof(uint32_t); + } + } + + return tlen; +} + +void* doStreamCountDecodeOpState(void* buf, int32_t len, SOperatorInfo* pOperator, bool isParent) { + SStreamCountAggOperatorInfo* pInfo = pOperator->info; + if (!pInfo) { + return buf; + } + + // 4.checksum + if (isParent) { + int32_t dataLen = len - sizeof(uint32_t); + void* pCksum = POINTER_SHIFT(buf, dataLen); + if (taosCheckChecksum(buf, dataLen, *(uint32_t*)pCksum) != TSDB_CODE_SUCCESS) { + qError("stream count state is invalid"); + return buf; + } + } + + // 1.streamAggSup.pResultRows + int32_t mapSize = 0; + buf = taosDecodeFixedI32(buf, &mapSize); + for (int32_t i = 0; i < mapSize; i++) { + SSessionKey key = {0}; + SResultWindowInfo winfo = {0}; + buf = decodeSSessionKey(buf, &key); + buf = decodeSResultWindowInfo(buf, &winfo, pInfo->streamAggSup.resultRowSize); + tSimpleHashPut(pInfo->streamAggSup.pResultRows, &key, sizeof(SSessionKey), &winfo, sizeof(SResultWindowInfo)); + } + + // 2.twAggSup + buf = decodeSTimeWindowAggSupp(buf, &pInfo->twAggSup); + + // 3.dataVersion + buf = taosDecodeFixedI64(buf, &pInfo->dataVersion); + return buf; +} + +void doStreamCountSaveCheckpoint(SOperatorInfo* pOperator) { + SStreamCountAggOperatorInfo* pInfo = pOperator->info; + int32_t len = doStreamCountEncodeOpState(NULL, 0, pOperator, true); + void* buf = taosMemoryCalloc(1, len); + void* pBuf = buf; + len = doStreamCountEncodeOpState(&pBuf, len, pOperator, true); + pInfo->streamAggSup.stateStore.streamStateSaveInfo(pInfo->streamAggSup.pState, STREAM_COUNT_OP_CHECKPOINT_NAME, + strlen(STREAM_COUNT_OP_CHECKPOINT_NAME), buf, len); + taosMemoryFree(buf); +} + +void doResetCountWindows(SStreamAggSupporter* pAggSup, SSDataBlock* pBlock) { + SColumnInfoData* pStartTsCol = taosArrayGet(pBlock->pDataBlock, START_TS_COLUMN_INDEX); + TSKEY* startDatas = (TSKEY*)pStartTsCol->pData; + SColumnInfoData* pEndTsCol = taosArrayGet(pBlock->pDataBlock, END_TS_COLUMN_INDEX); + TSKEY* endDatas = (TSKEY*)pEndTsCol->pData; + SColumnInfoData* pGroupCol = taosArrayGet(pBlock->pDataBlock, GROUPID_COLUMN_INDEX); + uint64_t* gpDatas = (uint64_t*)pGroupCol->pData; + + SRowBuffPos* pPos = NULL; + int32_t size = 0; + for (int32_t i = 0; i < pBlock->info.rows; i++) { + SSessionKey key = {.groupId = gpDatas[i], .win.skey = startDatas[i], .win.ekey = endDatas[i]}; + SStreamStateCur* pCur = pAggSup->stateStore.streamStateSessionSeekKeyCurrentNext(pAggSup->pState, &key); + while (1) { + SSessionKey tmpKey = {0}; + int32_t code = pAggSup->stateStore.streamStateSessionGetKVByCur(pCur, &tmpKey, (void **)&pPos, &size); + if (code != TSDB_CODE_SUCCESS || tmpKey.win.skey > endDatas[i]) { + pAggSup->stateStore.streamStateFreeCur(pCur); + break; + } + pAggSup->stateStore.streamStateSessionReset(pAggSup->pState, pPos->pRowBuff); + pAggSup->stateStore.streamStateCurNext(pAggSup->pState, pCur); + } + } +} + +static SSDataBlock* doStreamCountAgg(SOperatorInfo* pOperator) { + SExprSupp* pSup = &pOperator->exprSupp; + SStreamCountAggOperatorInfo* pInfo = pOperator->info; + SOptrBasicInfo* pBInfo = &pInfo->binfo; + SStreamAggSupporter* pAggSup = &pInfo->streamAggSup; + SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; + qDebug("stask:%s %s status: %d", GET_TASKID(pTaskInfo), getStreamOpName(pOperator->operatorType), pOperator->status); + if (pOperator->status == OP_EXEC_DONE) { + return NULL; + } else if (pOperator->status == OP_RES_TO_RETURN) { + SSDataBlock* opRes = buildCountResult(pOperator); + if (opRes) { + return opRes; + } + + if (pInfo->recvGetAll) { + pInfo->recvGetAll = false; + resetUnCloseSessionWinInfo(pInfo->streamAggSup.pResultRows); + } + + if (pInfo->reCkBlock) { + pInfo->reCkBlock = false; + printDataBlock(pInfo->pCheckpointRes, getStreamOpName(pOperator->operatorType), GET_TASKID(pTaskInfo)); + return pInfo->pCheckpointRes; + } + + setStreamOperatorCompleted(pOperator); + return NULL; + } + + SOperatorInfo* downstream = pOperator->pDownstream[0]; + if (!pInfo->pUpdated) { + pInfo->pUpdated = taosArrayInit(16, sizeof(SResultWindowInfo)); + } + if (!pInfo->pStUpdated) { + _hash_fn_t hashFn = taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY); + pInfo->pStUpdated = tSimpleHashInit(64, hashFn); + } + while (1) { + SSDataBlock* pBlock = downstream->fpSet.getNextFn(downstream); + if (pBlock == NULL) { + break; + } + printSpecDataBlock(pBlock, getStreamOpName(pOperator->operatorType), "recv", GET_TASKID(pTaskInfo)); + + if (pBlock->info.type == STREAM_DELETE_DATA || pBlock->info.type == STREAM_DELETE_RESULT) { + deleteSessionWinState(&pInfo->streamAggSup, pBlock, pInfo->pStUpdated, pInfo->pStDeleted); + continue; + } else if (pBlock->info.type == STREAM_CLEAR) { + doResetCountWindows(&pInfo->streamAggSup, pBlock); + continue; + } else if (pBlock->info.type == STREAM_GET_ALL) { + pInfo->recvGetAll = true; + getAllSessionWindow(pAggSup->pResultRows, pInfo->pStUpdated); + continue; + } else if (pBlock->info.type == STREAM_CREATE_CHILD_TABLE) { + return pBlock; + } else if (pBlock->info.type == STREAM_CHECKPOINT) { + pAggSup->stateStore.streamStateCommit(pAggSup->pState); + doStreamCountSaveCheckpoint(pOperator); + copyDataBlock(pInfo->pCheckpointRes, pBlock); + continue; + } else { + ASSERTS(pBlock->info.type == STREAM_NORMAL || pBlock->info.type == STREAM_INVALID, "invalid SSDataBlock type"); + } + + if (pInfo->scalarSupp.pExprInfo != NULL) { + SExprSupp* pExprSup = &pInfo->scalarSupp; + projectApplyFunctions(pExprSup->pExprInfo, pBlock, pBlock, pExprSup->pCtx, pExprSup->numOfExprs, NULL); + } + // the pDataBlock are always the same one, no need to call this again + setInputDataBlock(pSup, pBlock, TSDB_ORDER_ASC, MAIN_SCAN, true); + doStreamCountAggImpl(pOperator, pBlock, pInfo->pStUpdated, pInfo->pStDeleted); + pInfo->twAggSup.maxTs = TMAX(pInfo->twAggSup.maxTs, pBlock->info.window.ekey); + pInfo->twAggSup.maxTs = TMAX(pInfo->twAggSup.maxTs, pBlock->info.watermark); + } + // restore the value + pOperator->status = OP_RES_TO_RETURN; + + closeSessionWindow(pAggSup->pResultRows, &pInfo->twAggSup, pInfo->pStUpdated); + copyUpdateResult(&pInfo->pStUpdated, pInfo->pUpdated, sessionKeyCompareAsc); + removeSessionDeleteResults(pInfo->pStDeleted, pInfo->pUpdated); + initGroupResInfoFromArrayList(&pInfo->groupResInfo, pInfo->pUpdated); + pInfo->pUpdated = NULL; + blockDataEnsureCapacity(pInfo->binfo.pRes, pOperator->resultInfo.capacity); + + SSDataBlock* opRes = buildCountResult(pOperator); + if (opRes) { + return opRes; + } + + setStreamOperatorCompleted(pOperator); + return NULL; +} + +void streamCountReleaseState(SOperatorInfo* pOperator) { + //nothing + SOperatorInfo* downstream = pOperator->pDownstream[0]; + if (downstream->fpSet.releaseStreamStateFn) { + downstream->fpSet.releaseStreamStateFn(downstream); + } +} + +void streamCountReloadState(SOperatorInfo* pOperator) { + // nothing + SOperatorInfo* downstream = pOperator->pDownstream[0]; + if (downstream->fpSet.reloadStreamStateFn) { + downstream->fpSet.reloadStreamStateFn(downstream); + } +} + +SOperatorInfo* createStreamCountAggOperatorInfo(SOperatorInfo* downstream, SPhysiNode* pPhyNode, + SExecTaskInfo* pTaskInfo, SReadHandle* pHandle) { + SCountWinodwPhysiNode* pCountNode = (SCountWinodwPhysiNode*)pPhyNode; + int32_t numOfCols = 0; + int32_t code = TSDB_CODE_OUT_OF_MEMORY; + SStreamCountAggOperatorInfo* pInfo = taosMemoryCalloc(1, sizeof(SStreamCountAggOperatorInfo)); + SOperatorInfo* pOperator = taosMemoryCalloc(1, sizeof(SOperatorInfo)); + if (pInfo == NULL || pOperator == NULL) { + goto _error; + } + + pOperator->pTaskInfo = pTaskInfo; + + initResultSizeInfo(&pOperator->resultInfo, 4096); + if (pCountNode->window.pExprs != NULL) { + int32_t numOfScalar = 0; + SExprInfo* pScalarExprInfo = createExprInfo(pCountNode->window.pExprs, NULL, &numOfScalar); + code = initExprSupp(&pInfo->scalarSupp, pScalarExprInfo, numOfScalar, &pTaskInfo->storageAPI.functionStore); + if (code != TSDB_CODE_SUCCESS) { + goto _error; + } + } + SExprSupp* pExpSup = &pOperator->exprSupp; + + SExprInfo* pExprInfo = createExprInfo(pCountNode->window.pFuncs, NULL, &numOfCols); + SSDataBlock* pResBlock = createDataBlockFromDescNode(pPhyNode->pOutputDataBlockDesc); + code = initBasicInfoEx(&pInfo->binfo, pExpSup, pExprInfo, numOfCols, pResBlock, &pTaskInfo->storageAPI.functionStore); + if (code != TSDB_CODE_SUCCESS) { + goto _error; + } + + code = initStreamAggSupporter(&pInfo->streamAggSup, pExpSup, numOfCols, 0, + pTaskInfo->streamInfo.pState, sizeof(COUNT_TYPE), 0, &pTaskInfo->storageAPI.stateStore, pHandle, + &pInfo->twAggSup, GET_TASKID(pTaskInfo), &pTaskInfo->storageAPI); + if (code != TSDB_CODE_SUCCESS) { + goto _error; + } + pInfo->streamAggSup.windowCount = pCountNode->windowCount; + + pInfo->twAggSup = (STimeWindowAggSupp){ + .waterMark = pCountNode->window.watermark, + .calTrigger = pCountNode->window.triggerType, + .maxTs = INT64_MIN, + .minTs = INT64_MAX, + }; + + initExecTimeWindowInfo(&pInfo->twAggSup.timeWindowData, &pTaskInfo->window); + + pInfo->primaryTsIndex = ((SColumnNode*)pCountNode->window.pTspk)->slotId; + + pInfo->binfo.pRes = pResBlock; + _hash_fn_t hashFn = taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY); + pInfo->pStDeleted = tSimpleHashInit(64, hashFn); + pInfo->pDelIterator = NULL; + pInfo->pDelRes = createSpecialDataBlock(STREAM_DELETE_RESULT); + pInfo->ignoreExpiredData = pCountNode->window.igExpired; + pInfo->ignoreExpiredDataSaved = false; + pInfo->pUpdated = NULL; + pInfo->pStUpdated = NULL; + pInfo->dataVersion = 0; + pInfo->historyWins = taosArrayInit(4, sizeof(SSessionKey)); + if (!pInfo->historyWins) { + goto _error; + } + + pInfo->pCheckpointRes = createSpecialDataBlock(STREAM_CHECKPOINT); + pInfo->recvGetAll = false; + + pOperator->operatorType = QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT; + // for stream + void* buff = NULL; + int32_t len = 0; + int32_t res = + pInfo->streamAggSup.stateStore.streamStateGetInfo(pInfo->streamAggSup.pState, STREAM_COUNT_OP_CHECKPOINT_NAME, + strlen(STREAM_COUNT_OP_CHECKPOINT_NAME), &buff, &len); + if (res == TSDB_CODE_SUCCESS) { + doStreamCountDecodeOpState(buff, len, pOperator, true); + taosMemoryFree(buff); + } + setOperatorInfo(pOperator, getStreamOpName(pOperator->operatorType), QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT, true, + OP_NOT_OPENED, pInfo, pTaskInfo); + pOperator->fpSet = createOperatorFpSet(optrDummyOpenFn, doStreamCountAgg, NULL, destroyStreamCountAggOperatorInfo, + optrDefaultBufFn, NULL, optrDefaultGetNextExtFn, NULL); + setOperatorStreamStateFn(pOperator, streamCountReleaseState, streamCountReloadState); + + if (downstream) { + initDownStream(downstream, &pInfo->streamAggSup, pOperator->operatorType, pInfo->primaryTsIndex, &pInfo->twAggSup); + code = appendDownstream(pOperator, &downstream, 1); + } + return pOperator; + +_error: + if (pInfo != NULL) { + destroyStreamCountAggOperatorInfo(pInfo); + } + + taosMemoryFreeClear(pOperator); + pTaskInfo->code = code; + return NULL; +} + diff --git a/source/libs/executor/src/streamtimewindowoperator.c b/source/libs/executor/src/streamtimewindowoperator.c index 02f8b90864..d5bf0bd8fa 100644 --- a/source/libs/executor/src/streamtimewindowoperator.c +++ b/source/libs/executor/src/streamtimewindowoperator.c @@ -1898,7 +1898,7 @@ int32_t doOneWindowAggImpl(SColumnInfoData* pTimeWindowData, SResultWindowInfo* return TSDB_CODE_SUCCESS; } -static bool doDeleteSessionWindow(SStreamAggSupporter* pAggSup, SSessionKey* pKey) { +bool doDeleteSessionWindow(SStreamAggSupporter* pAggSup, SSessionKey* pKey) { pAggSup->stateStore.streamStateSessionDel(pAggSup->pState, pKey); SSessionKey hashKey = {0}; getSessionHashKey(pKey, &hashKey); diff --git a/source/libs/nodes/src/nodesCloneFuncs.c b/source/libs/nodes/src/nodesCloneFuncs.c index c090cb4b63..65c14e2654 100644 --- a/source/libs/nodes/src/nodesCloneFuncs.c +++ b/source/libs/nodes/src/nodesCloneFuncs.c @@ -329,6 +329,12 @@ static int32_t eventWindowNodeCopy(const SEventWindowNode* pSrc, SEventWindowNod return TSDB_CODE_SUCCESS; } +static int32_t countWindowNodeCopy(const SCountWindowNode* pSrc, SCountWindowNode* pDst) { + CLONE_NODE_FIELD(pCol); + COPY_SCALAR_FIELD(windowCount); + return TSDB_CODE_SUCCESS; +} + static int32_t sessionWindowNodeCopy(const SSessionWindowNode* pSrc, SSessionWindowNode* pDst) { CLONE_NODE_FIELD_EX(pCol, SColumnNode*); CLONE_NODE_FIELD_EX(pGap, SValueNode*); @@ -550,6 +556,7 @@ static int32_t logicWindowCopy(const SWindowLogicNode* pSrc, SWindowLogicNode* p COPY_SCALAR_FIELD(igExpired); COPY_SCALAR_FIELD(igCheckUpdate); COPY_SCALAR_FIELD(windowAlgo); + COPY_SCALAR_FIELD(windowCount); return TSDB_CODE_SUCCESS; } @@ -843,6 +850,9 @@ SNode* nodesCloneNode(const SNode* pNode) { case QUERY_NODE_EVENT_WINDOW: code = eventWindowNodeCopy((const SEventWindowNode*)pNode, (SEventWindowNode*)pDst); break; + case QUERY_NODE_COUNT_WINDOW: + code = countWindowNodeCopy((const SCountWindowNode*)pNode, (SCountWindowNode*)pDst); + break; case QUERY_NODE_SESSION_WINDOW: code = sessionWindowNodeCopy((const SSessionWindowNode*)pNode, (SSessionWindowNode*)pDst); break; diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 6696aab4c1..d6fbe12cea 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -91,6 +91,8 @@ const char* nodesNodeName(ENodeType type) { return "CaseWhen"; case QUERY_NODE_EVENT_WINDOW: return "EventWindow"; + case QUERY_NODE_COUNT_WINDOW: + return "CountWindow"; case QUERY_NODE_SET_OPERATOR: return "SetOperator"; case QUERY_NODE_SELECT_STMT: @@ -335,6 +337,10 @@ const char* nodesNodeName(ENodeType type) { return "PhysiMergeEventWindow"; case QUERY_NODE_PHYSICAL_PLAN_STREAM_EVENT: return "PhysiStreamEventWindow"; + case QUERY_NODE_PHYSICAL_PLAN_MERGE_COUNT: + return "PhysiMergeCountWindow"; + case QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT: + return "PhysiStreamCountWindow"; case QUERY_NODE_PHYSICAL_PLAN_PROJECT: return "PhysiProject"; case QUERY_NODE_PHYSICAL_PLAN_MERGE_JOIN: @@ -2724,6 +2730,29 @@ static int32_t jsonToPhysiEventWindowNode(const SJson* pJson, void* pObj) { return code; } +static const char* jkCountWindowPhysiPlanWindowCount = "WindowCount"; + +static int32_t physiCountWindowNodeToJson(const void* pObj, SJson* pJson) { + const SCountWinodwPhysiNode* pNode = (const SCountWinodwPhysiNode*)pObj; + + int32_t code = physiWindowNodeToJson(pObj, pJson); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkCountWindowPhysiPlanWindowCount, pNode->windowCount); + } + return code; +} + +static int32_t jsonToPhysiCountWindowNode(const SJson* pJson, void* pObj) { + SCountWinodwPhysiNode* pNode = (SCountWinodwPhysiNode*)pObj; + + int32_t code = jsonToPhysiWindowNode(pJson, pObj); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBigIntValue(pJson, jkCountWindowPhysiPlanWindowCount, &pNode->windowCount); + } + + return code; +} + static const char* jkPartitionPhysiPlanExprs = "Exprs"; static const char* jkPartitionPhysiPlanPartitionKeys = "PartitionKeys"; static const char* jkPartitionPhysiPlanTargets = "Targets"; @@ -4373,6 +4402,29 @@ static int32_t jsonToEventWindowNode(const SJson* pJson, void* pObj) { return code; } +static const char* jkCountWindowTsPrimaryKey = "CountTsPrimaryKey"; +static const char* jkCountWindowCount = "CountWindowCount"; + +static int32_t countWindowNodeToJson(const void* pObj, SJson* pJson) { + const SCountWindowNode* pNode = (const SCountWindowNode*)pObj; + + int32_t code = tjsonAddObject(pJson, jkCountWindowTsPrimaryKey, nodeToJson, pNode->pCol); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkCountWindowCount, pNode->windowCount); + } + return code; +} + +static int32_t jsonToCountWindowNode(const SJson* pJson, void* pObj) { + SCountWindowNode* pNode = (SCountWindowNode*)pObj; + + int32_t code = jsonToNodeObject(pJson, jkCountWindowTsPrimaryKey, &pNode->pCol); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBigIntValue(pJson, jkCountWindowCount, &pNode->windowCount); + } + return code; +} + static const char* jkIntervalWindowInterval = "Interval"; static const char* jkIntervalWindowOffset = "Offset"; static const char* jkIntervalWindowSliding = "Sliding"; @@ -6913,6 +6965,8 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return caseWhenNodeToJson(pObj, pJson); case QUERY_NODE_EVENT_WINDOW: return eventWindowNodeToJson(pObj, pJson); + case QUERY_NODE_COUNT_WINDOW: + return countWindowNodeToJson(pObj, pJson); case QUERY_NODE_SET_OPERATOR: return setOperatorToJson(pObj, pJson); case QUERY_NODE_SELECT_STMT: @@ -7143,6 +7197,9 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { case QUERY_NODE_PHYSICAL_PLAN_MERGE_EVENT: case QUERY_NODE_PHYSICAL_PLAN_STREAM_EVENT: return physiEventWindowNodeToJson(pObj, pJson); + case QUERY_NODE_PHYSICAL_PLAN_MERGE_COUNT: + case QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT: + return physiCountWindowNodeToJson(pObj, pJson); case QUERY_NODE_PHYSICAL_PLAN_PARTITION: return physiPartitionNodeToJson(pObj, pJson); case QUERY_NODE_PHYSICAL_PLAN_STREAM_PARTITION: @@ -7236,6 +7293,8 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToCaseWhenNode(pJson, pObj); case QUERY_NODE_EVENT_WINDOW: return jsonToEventWindowNode(pJson, pObj); + case QUERY_NODE_COUNT_WINDOW: + return jsonToCountWindowNode(pJson, pObj); case QUERY_NODE_SET_OPERATOR: return jsonToSetOperator(pJson, pObj); case QUERY_NODE_SELECT_STMT: @@ -7474,6 +7533,9 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { case QUERY_NODE_PHYSICAL_PLAN_MERGE_EVENT: case QUERY_NODE_PHYSICAL_PLAN_STREAM_EVENT: return jsonToPhysiEventWindowNode(pJson, pObj); + case QUERY_NODE_PHYSICAL_PLAN_MERGE_COUNT: + case QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT: + return jsonToPhysiCountWindowNode(pJson, pObj); case QUERY_NODE_PHYSICAL_PLAN_PARTITION: return jsonToPhysiPartitionNode(pJson, pObj); case QUERY_NODE_PHYSICAL_PLAN_STREAM_PARTITION: diff --git a/source/libs/nodes/src/nodesMsgFuncs.c b/source/libs/nodes/src/nodesMsgFuncs.c index 3cff7c76aa..a6959029d3 100644 --- a/source/libs/nodes/src/nodesMsgFuncs.c +++ b/source/libs/nodes/src/nodesMsgFuncs.c @@ -3203,6 +3203,40 @@ static int32_t msgToPhysiEventWindowNode(STlvDecoder* pDecoder, void* pObj) { return code; } +enum { PHY_COUNT_CODE_WINDOW = 1, PHY_COUNT_CODE_WINDOW_COUNT }; + +static int32_t physiCountWindowNodeToMsg(const void* pObj, STlvEncoder* pEncoder) { + const SCountWinodwPhysiNode* pNode = (const SCountWinodwPhysiNode*)pObj; + + int32_t code = tlvEncodeObj(pEncoder, PHY_COUNT_CODE_WINDOW, physiWindowNodeToMsg, &pNode->window); + if (TSDB_CODE_SUCCESS == code) { + code = tlvEncodeI64(pEncoder, PHY_COUNT_CODE_WINDOW_COUNT, pNode->windowCount); + } + + return code; +} + +static int32_t msgToPhysiCountWindowNode(STlvDecoder* pDecoder, void* pObj) { + SCountWinodwPhysiNode* pNode = (SCountWinodwPhysiNode*)pObj; + + int32_t code = TSDB_CODE_SUCCESS; + STlv* pTlv = NULL; + tlvForEach(pDecoder, pTlv, code) { + switch (pTlv->type) { + case PHY_COUNT_CODE_WINDOW: + code = tlvDecodeObjFromTlv(pTlv, msgToPhysiWindowNode, &pNode->window); + break; + case PHY_COUNT_CODE_WINDOW_COUNT: + code = tlvDecodeI64(pTlv, &pNode->windowCount); + break; + default: + break; + } + } + + return code; +} + enum { PHY_PARTITION_CODE_BASE_NODE = 1, PHY_PARTITION_CODE_EXPR, @@ -4181,6 +4215,10 @@ static int32_t specificNodeToMsg(const void* pObj, STlvEncoder* pEncoder) { case QUERY_NODE_PHYSICAL_PLAN_STREAM_EVENT: code = physiEventWindowNodeToMsg(pObj, pEncoder); break; + case QUERY_NODE_PHYSICAL_PLAN_MERGE_COUNT: + case QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT: + code = physiCountWindowNodeToMsg(pObj, pEncoder); + break; case QUERY_NODE_PHYSICAL_PLAN_PARTITION: code = physiPartitionNodeToMsg(pObj, pEncoder); break; @@ -4335,6 +4373,10 @@ static int32_t msgToSpecificNode(STlvDecoder* pDecoder, void* pObj) { case QUERY_NODE_PHYSICAL_PLAN_STREAM_EVENT: code = msgToPhysiEventWindowNode(pDecoder, pObj); break; + case QUERY_NODE_PHYSICAL_PLAN_MERGE_COUNT: + case QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT: + code = msgToPhysiCountWindowNode(pDecoder, pObj); + break; case QUERY_NODE_PHYSICAL_PLAN_PARTITION: code = msgToPhysiPartitionNode(pDecoder, pObj); break; diff --git a/source/libs/nodes/src/nodesTraverseFuncs.c b/source/libs/nodes/src/nodesTraverseFuncs.c index b3623a4b0a..664ebec2be 100644 --- a/source/libs/nodes/src/nodesTraverseFuncs.c +++ b/source/libs/nodes/src/nodesTraverseFuncs.c @@ -176,6 +176,11 @@ static EDealRes dispatchExpr(SNode* pNode, ETraversalOrder order, FNodeWalker wa } break; } + case QUERY_NODE_COUNT_WINDOW: { + SCountWindowNode* pEvent = (SCountWindowNode*)pNode; + res = walkExpr(pEvent->pCol, order, walker, pContext); + break; + } default: break; } @@ -366,6 +371,11 @@ static EDealRes rewriteExpr(SNode** pRawNode, ETraversalOrder order, FNodeRewrit } break; } + case QUERY_NODE_COUNT_WINDOW: { + SCountWindowNode* pEvent = (SCountWindowNode*)pNode; + res = rewriteExpr(&pEvent->pCol, order, rewriter, pContext); + break; + } default: break; } diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 8496feb4d6..99d7a8a348 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -302,6 +302,8 @@ SNode* nodesMakeNode(ENodeType type) { return makeNode(type, sizeof(SCaseWhenNode)); case QUERY_NODE_EVENT_WINDOW: return makeNode(type, sizeof(SEventWindowNode)); + case QUERY_NODE_COUNT_WINDOW: + return makeNode(type, sizeof(SCountWindowNode)); case QUERY_NODE_HINT: return makeNode(type, sizeof(SHintNode)); case QUERY_NODE_VIEW: @@ -578,6 +580,10 @@ SNode* nodesMakeNode(ENodeType type) { return makeNode(type, sizeof(SEventWinodwPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_STREAM_EVENT: return makeNode(type, sizeof(SStreamEventWinodwPhysiNode)); + case QUERY_NODE_PHYSICAL_PLAN_MERGE_COUNT: + return makeNode(type, sizeof(SCountWinodwPhysiNode)); + case QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT: + return makeNode(type, sizeof(SStreamCountWinodwPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_PARTITION: return makeNode(type, sizeof(SPartitionPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_STREAM_PARTITION: @@ -843,6 +849,11 @@ void nodesDestroyNode(SNode* pNode) { nodesDestroyNode(pEvent->pEndCond); break; } + case QUERY_NODE_COUNT_WINDOW: { + SCountWindowNode* pEvent = (SCountWindowNode*)pNode; + nodesDestroyNode(pEvent->pCol); + break; + } case QUERY_NODE_HINT: { SHintNode* pHint = (SHintNode*)pNode; destroyHintValue(pHint->option, pHint->value); @@ -1414,6 +1425,12 @@ void nodesDestroyNode(SNode* pNode) { nodesDestroyNode(pPhyNode->pEndCond); break; } + case QUERY_NODE_PHYSICAL_PLAN_MERGE_COUNT: + case QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT: { + SCountWinodwPhysiNode* pPhyNode = (SCountWinodwPhysiNode*)pNode; + destroyWinodwPhysiNode((SWindowPhysiNode*)pPhyNode); + break; + } case QUERY_NODE_PHYSICAL_PLAN_PARTITION: { destroyPartitionPhysiNode((SPartitionPhysiNode*)pNode); break; diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index c3f2a53f7b..719ba7eaee 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -131,6 +131,7 @@ SNode* createOrderByExprNode(SAstCreateContext* pCxt, SNode* pExpr, EOrder order SNode* createSessionWindowNode(SAstCreateContext* pCxt, SNode* pCol, SNode* pGap); SNode* createStateWindowNode(SAstCreateContext* pCxt, SNode* pExpr); SNode* createEventWindowNode(SAstCreateContext* pCxt, SNode* pStartCond, SNode* pEndCond); +SNode* createCountWindowNode(SAstCreateContext* pCxt, const SToken* pToken); SNode* createIntervalWindowNode(SAstCreateContext* pCxt, SNode* pInterval, SNode* pOffset, SNode* pSliding, SNode* pFill); SNode* createFillNode(SAstCreateContext* pCxt, EFillMode mode, SNode* pValues); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 0479fce255..ecca1a4dcd 100755 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -1152,6 +1152,8 @@ twindow_clause_opt(A) ::= sliding_opt(D) fill_opt(E). { A = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C), D, E); } twindow_clause_opt(A) ::= EVENT_WINDOW START WITH search_condition(B) END WITH search_condition(C). { A = createEventWindowNode(pCxt, B, C); } +twindow_clause_opt(A) ::= + COUNT_WINDOW NK_LP NK_INTEGER(B) NK_RP. { A = createCountWindowNode(pCxt, &B); } sliding_opt(A) ::= . { A = NULL; } sliding_opt(A) ::= SLIDING NK_LP interval_sliding_duration_literal(B) NK_RP. { A = releaseRawExprNode(pCxt, B); } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 8e89ae1f53..e3d11547ec 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -883,6 +883,19 @@ SNode* createEventWindowNode(SAstCreateContext* pCxt, SNode* pStartCond, SNode* return (SNode*)pEvent; } +SNode* createCountWindowNode(SAstCreateContext* pCxt, const SToken* pToken) { + CHECK_PARSER_STATUS(pCxt); + SCountWindowNode* pCount = (SCountWindowNode*)nodesMakeNode(QUERY_NODE_COUNT_WINDOW); + CHECK_OUT_OF_MEM(pCount); + pCount->pCol = createPrimaryKeyCol(pCxt, NULL); + if (NULL == pCount->pCol) { + nodesDestroyNode((SNode*)pCount); + CHECK_OUT_OF_MEM(NULL); + } + pCount->windowCount = taosStr2Int64(pToken->z, NULL, 10); + return (SNode*)pCount; +} + SNode* createIntervalWindowNode(SAstCreateContext* pCxt, SNode* pInterval, SNode* pOffset, SNode* pSliding, SNode* pFill) { CHECK_PARSER_STATUS(pCxt); diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 072892fe7f..795c7b2e0e 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -72,6 +72,7 @@ static SKeyword keywordTable[] = { {"CONSUMERS", TK_CONSUMERS}, {"CONTAINS", TK_CONTAINS}, {"COUNT", TK_COUNT}, + {"COUNT_WINDOW", TK_COUNT_WINDOW}, {"CREATE", TK_CREATE}, {"CURRENT_USER", TK_CURRENT_USER}, {"DATABASE", TK_DATABASE}, diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 4d7df17545..30693f6673 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -3955,6 +3955,15 @@ static int32_t translateEventWindow(STranslateContext* pCxt, SSelectStmt* pSelec return TSDB_CODE_SUCCESS; } +static int32_t translateCountWindow(STranslateContext* pCxt, SSelectStmt* pSelect) { + if (QUERY_NODE_TEMP_TABLE == nodeType(pSelect->pFromTable) && + !isGlobalTimeLineQuery(((STempTableNode*)pSelect->pFromTable)->pSubquery)) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TIMELINE_QUERY, + "COUNT_WINDOW requires valid time series input"); + } + return TSDB_CODE_SUCCESS; +} + static int32_t translateSpecificWindow(STranslateContext* pCxt, SSelectStmt* pSelect) { switch (nodeType(pSelect->pWindow)) { case QUERY_NODE_STATE_WINDOW: @@ -3965,6 +3974,8 @@ static int32_t translateSpecificWindow(STranslateContext* pCxt, SSelectStmt* pSe return translateIntervalWindow(pCxt, pSelect); case QUERY_NODE_EVENT_WINDOW: return translateEventWindow(pCxt, pSelect); + case QUERY_NODE_COUNT_WINDOW: + return translateCountWindow(pCxt, pSelect); default: break; } @@ -7682,6 +7693,32 @@ static int32_t checkStreamQuery(STranslateContext* pCxt, SCreateStreamStmt* pStm return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "The trigger mode of non window query can only be AT_ONCE"); } + + if (pSelect->pWindow != NULL && pSelect->pWindow->type == QUERY_NODE_COUNT_WINDOW) { + if ( (SRealTableNode*)pSelect->pFromTable && ((SRealTableNode*)pSelect->pFromTable)->pMeta + && TSDB_SUPER_TABLE == ((SRealTableNode*)pSelect->pFromTable)->pMeta->tableType + && !hasPartitionByTbname(pSelect->pPartitionByList) ) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, + "Count window for stream on super table must patitioned by table name"); + } + + int64_t watermark = 0; + if (pStmt->pOptions->pWatermark) { + translateValue(pCxt, (SValueNode*)pStmt->pOptions->pWatermark); + watermark =((SValueNode*)pStmt->pOptions->pWatermark)->datum.i; + } + if (watermark <= 0) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, + "Watermark of Count window must exceed 0."); + } + + if (pStmt->pOptions->ignoreExpired != 1) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, + "Ignore expired data of Count window must be 1."); + } + + } + return TSDB_CODE_SUCCESS; } diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 66258ba3a9..686bad2a06 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -25,8 +25,6 @@ ** input grammar file: */ /************ Begin %include sections from the grammar ************************/ -#line 11 "sql.y" - #include #include #include @@ -42,7 +40,6 @@ #include "parAst.h" #define YYSTACKDEPTH 0 -#line 46 "sql.c" /**************** End of %include directives **********************************/ /* These constants specify the various numeric values for terminal symbols. ***************** Begin token definitions *************************************/ @@ -324,75 +321,76 @@ #define TK_SESSION 275 #define TK_STATE_WINDOW 276 #define TK_EVENT_WINDOW 277 -#define TK_SLIDING 278 -#define TK_FILL 279 -#define TK_VALUE 280 -#define TK_VALUE_F 281 -#define TK_NONE 282 -#define TK_PREV 283 -#define TK_NULL_F 284 -#define TK_LINEAR 285 -#define TK_NEXT 286 -#define TK_HAVING 287 -#define TK_RANGE 288 -#define TK_EVERY 289 -#define TK_ORDER 290 -#define TK_SLIMIT 291 -#define TK_SOFFSET 292 -#define TK_LIMIT 293 -#define TK_OFFSET 294 -#define TK_ASC 295 -#define TK_NULLS 296 -#define TK_ABORT 297 -#define TK_AFTER 298 -#define TK_ATTACH 299 -#define TK_BEFORE 300 -#define TK_BEGIN 301 -#define TK_BITAND 302 -#define TK_BITNOT 303 -#define TK_BITOR 304 -#define TK_BLOCKS 305 -#define TK_CHANGE 306 -#define TK_COMMA 307 -#define TK_CONCAT 308 -#define TK_CONFLICT 309 -#define TK_COPY 310 -#define TK_DEFERRED 311 -#define TK_DELIMITERS 312 -#define TK_DETACH 313 -#define TK_DIVIDE 314 -#define TK_DOT 315 -#define TK_EACH 316 -#define TK_FAIL 317 -#define TK_FILE 318 -#define TK_FOR 319 -#define TK_GLOB 320 -#define TK_ID 321 -#define TK_IMMEDIATE 322 -#define TK_IMPORT 323 -#define TK_INITIALLY 324 -#define TK_INSTEAD 325 -#define TK_ISNULL 326 -#define TK_KEY 327 -#define TK_MODULES 328 -#define TK_NK_BITNOT 329 -#define TK_NK_SEMI 330 -#define TK_NOTNULL 331 -#define TK_OF 332 -#define TK_PLUS 333 -#define TK_PRIVILEGE 334 -#define TK_RAISE 335 -#define TK_RESTRICT 336 -#define TK_ROW 337 -#define TK_SEMI 338 -#define TK_STAR 339 -#define TK_STATEMENT 340 -#define TK_STRICT 341 -#define TK_STRING 342 -#define TK_TIMES 343 -#define TK_VALUES 344 -#define TK_VARIABLE 345 -#define TK_WAL 346 +#define TK_COUNT_WINDOW 278 +#define TK_SLIDING 279 +#define TK_FILL 280 +#define TK_VALUE 281 +#define TK_VALUE_F 282 +#define TK_NONE 283 +#define TK_PREV 284 +#define TK_NULL_F 285 +#define TK_LINEAR 286 +#define TK_NEXT 287 +#define TK_HAVING 288 +#define TK_RANGE 289 +#define TK_EVERY 290 +#define TK_ORDER 291 +#define TK_SLIMIT 292 +#define TK_SOFFSET 293 +#define TK_LIMIT 294 +#define TK_OFFSET 295 +#define TK_ASC 296 +#define TK_NULLS 297 +#define TK_ABORT 298 +#define TK_AFTER 299 +#define TK_ATTACH 300 +#define TK_BEFORE 301 +#define TK_BEGIN 302 +#define TK_BITAND 303 +#define TK_BITNOT 304 +#define TK_BITOR 305 +#define TK_BLOCKS 306 +#define TK_CHANGE 307 +#define TK_COMMA 308 +#define TK_CONCAT 309 +#define TK_CONFLICT 310 +#define TK_COPY 311 +#define TK_DEFERRED 312 +#define TK_DELIMITERS 313 +#define TK_DETACH 314 +#define TK_DIVIDE 315 +#define TK_DOT 316 +#define TK_EACH 317 +#define TK_FAIL 318 +#define TK_FILE 319 +#define TK_FOR 320 +#define TK_GLOB 321 +#define TK_ID 322 +#define TK_IMMEDIATE 323 +#define TK_IMPORT 324 +#define TK_INITIALLY 325 +#define TK_INSTEAD 326 +#define TK_ISNULL 327 +#define TK_KEY 328 +#define TK_MODULES 329 +#define TK_NK_BITNOT 330 +#define TK_NK_SEMI 331 +#define TK_NOTNULL 332 +#define TK_OF 333 +#define TK_PLUS 334 +#define TK_PRIVILEGE 335 +#define TK_RAISE 336 +#define TK_RESTRICT 337 +#define TK_ROW 338 +#define TK_SEMI 339 +#define TK_STAR 340 +#define TK_STATEMENT 341 +#define TK_STRICT 342 +#define TK_STRING 343 +#define TK_TIMES 344 +#define TK_VALUES 345 +#define TK_VARIABLE 346 +#define TK_WAL 347 #endif /**************** End token definitions ***************************************/ @@ -452,29 +450,29 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 508 +#define YYNOCODE 509 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - SNodeList* yy88; - int32_t yy92; - SAlterOption yy117; - SShowTablesOption yy133; - ENullOrder yy153; - int64_t yy221; - SNode* yy232; - STokenPair yy241; - EFillMode yy246; - int8_t yy279; - EShowKind yy281; - SDataType yy400; - EJoinType yy436; - EOperatorType yy708; - EOrder yy834; - bool yy985; - SToken yy993; + SDataType yy34; + SToken yy39; + ENullOrder yy89; + EJoinType yy90; + bool yy145; + SAlterOption yy187; + SNodeList* yy200; + int8_t yy211; + EOperatorType yy240; + int32_t yy474; + EFillMode yy624; + int64_t yy731; + SNode* yy890; + EOrder yy900; + EShowKind yy979; + STokenPair yy1011; + SShowTablesOption yy1013; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -490,18 +488,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 840 -#define YYNRULE 642 -#define YYNRULE_WITH_ACTION 642 -#define YYNTOKEN 347 -#define YY_MAX_SHIFT 839 -#define YY_MIN_SHIFTREDUCE 1242 -#define YY_MAX_SHIFTREDUCE 1883 -#define YY_ERROR_ACTION 1884 -#define YY_ACCEPT_ACTION 1885 -#define YY_NO_ACTION 1886 -#define YY_MIN_REDUCE 1887 -#define YY_MAX_REDUCE 2528 +#define YYNSTATE 843 +#define YYNRULE 643 +#define YYNRULE_WITH_ACTION 643 +#define YYNTOKEN 348 +#define YY_MAX_SHIFT 842 +#define YY_MIN_SHIFTREDUCE 1246 +#define YY_MAX_SHIFTREDUCE 1888 +#define YY_ERROR_ACTION 1889 +#define YY_ACCEPT_ACTION 1890 +#define YY_NO_ACTION 1891 +#define YY_MIN_REDUCE 1892 +#define YY_MAX_REDUCE 2534 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -568,874 +566,844 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (3071) +#define YY_ACTTAB_COUNT (2911) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 409, 561, 197, 418, 562, 1930, 569, 2064, 171, 562, - /* 10 */ 1930, 168, 48, 46, 1807, 2210, 2077, 34, 397, 2077, - /* 20 */ 415, 471, 1648, 41, 40, 1673, 2126, 47, 45, 44, - /* 30 */ 43, 42, 36, 2208, 712, 1733, 1971, 1646, 41, 40, - /* 40 */ 38, 320, 47, 45, 44, 43, 42, 2330, 41, 40, - /* 50 */ 480, 2186, 47, 45, 44, 43, 42, 704, 146, 1674, - /* 60 */ 707, 184, 2122, 2123, 1728, 1888, 528, 526, 420, 365, - /* 70 */ 19, 2121, 2123, 217, 41, 40, 173, 1654, 47, 45, - /* 80 */ 44, 43, 42, 383, 2014, 2190, 127, 95, 2348, 126, - /* 90 */ 125, 124, 123, 122, 121, 120, 119, 118, 1673, 219, - /* 100 */ 2296, 237, 741, 836, 385, 564, 15, 1938, 811, 810, - /* 110 */ 809, 808, 427, 2070, 807, 806, 151, 801, 800, 799, - /* 120 */ 798, 797, 796, 795, 150, 789, 788, 787, 426, 425, - /* 130 */ 784, 783, 782, 183, 182, 781, 692, 486, 2186, 2499, - /* 140 */ 1648, 2329, 1735, 1736, 2367, 686, 184, 114, 2331, 745, - /* 150 */ 2333, 2334, 740, 148, 735, 1646, 2391, 691, 203, 186, - /* 160 */ 581, 2420, 2500, 693, 1282, 411, 2416, 300, 2428, 703, - /* 170 */ 2191, 138, 702, 2348, 2499, 704, 146, 1708, 1718, 2435, - /* 180 */ 205, 1479, 1480, 1289, 1734, 1737, 221, 724, 2450, 2128, - /* 190 */ 1674, 724, 691, 203, 2210, 1654, 381, 2500, 693, 1649, - /* 200 */ 174, 1647, 1899, 2504, 2126, 2432, 1284, 1287, 1288, 408, - /* 210 */ 41, 40, 2207, 712, 47, 45, 44, 43, 42, 127, - /* 220 */ 1676, 836, 126, 125, 124, 123, 122, 121, 120, 119, - /* 230 */ 118, 1652, 1653, 1705, 685, 1707, 1710, 1711, 1712, 1713, - /* 240 */ 1714, 1715, 1716, 1717, 737, 733, 1726, 1727, 1729, 1730, - /* 250 */ 1731, 1732, 2, 48, 46, 1547, 1548, 1880, 364, 682, - /* 260 */ 1671, 415, 1308, 1648, 1307, 514, 2186, 512, 1830, 2330, - /* 270 */ 531, 724, 375, 51, 692, 530, 1733, 2499, 1646, 142, - /* 280 */ 2306, 650, 742, 1831, 706, 201, 2428, 2429, 272, 144, - /* 290 */ 2433, 494, 271, 532, 2066, 691, 203, 1309, 496, 2504, - /* 300 */ 2500, 693, 2499, 112, 2310, 1728, 1887, 1873, 474, 566, - /* 310 */ 2348, 19, 1567, 1568, 226, 563, 1762, 1649, 1654, 1647, - /* 320 */ 147, 2503, 2296, 1829, 741, 2500, 2502, 2330, 2067, 196, - /* 330 */ 136, 135, 134, 133, 132, 131, 130, 129, 128, 608, - /* 340 */ 742, 2115, 1940, 607, 836, 384, 687, 15, 2312, 1652, - /* 350 */ 1653, 688, 683, 676, 1566, 1569, 482, 51, 735, 98, - /* 360 */ 578, 1879, 370, 2329, 2051, 395, 2367, 641, 2348, 175, - /* 370 */ 2331, 745, 2333, 2334, 740, 577, 735, 666, 1763, 302, - /* 380 */ 2296, 106, 741, 1735, 1736, 1910, 2197, 2176, 1958, 519, + /* 0 */ 409, 561, 197, 418, 562, 1935, 569, 2069, 171, 562, + /* 10 */ 1935, 168, 48, 46, 1811, 2215, 2082, 34, 397, 2082, + /* 20 */ 415, 471, 1652, 41, 40, 1677, 2131, 47, 45, 44, + /* 30 */ 43, 42, 36, 2213, 715, 1737, 1976, 1650, 41, 40, + /* 40 */ 38, 320, 47, 45, 44, 43, 42, 2335, 41, 40, + /* 50 */ 480, 2191, 47, 45, 44, 43, 42, 707, 146, 1678, + /* 60 */ 710, 184, 2127, 2128, 1732, 1893, 528, 526, 420, 365, + /* 70 */ 19, 2126, 2128, 217, 41, 40, 173, 1658, 47, 45, + /* 80 */ 44, 43, 42, 383, 2019, 2195, 127, 95, 2353, 126, + /* 90 */ 125, 124, 123, 122, 121, 120, 119, 118, 1677, 219, + /* 100 */ 2301, 237, 744, 839, 385, 564, 15, 1943, 814, 813, + /* 110 */ 812, 811, 427, 2075, 810, 809, 151, 804, 803, 802, + /* 120 */ 801, 800, 799, 798, 150, 792, 791, 790, 426, 425, + /* 130 */ 787, 786, 785, 183, 182, 784, 695, 486, 2191, 2505, + /* 140 */ 1652, 2334, 1739, 1740, 2372, 1835, 184, 114, 2336, 748, + /* 150 */ 2338, 2339, 743, 148, 738, 1650, 2396, 694, 203, 186, + /* 160 */ 1836, 2425, 2506, 696, 1286, 411, 2421, 300, 2433, 706, + /* 170 */ 2196, 138, 705, 727, 2505, 707, 146, 1712, 1722, 558, + /* 180 */ 205, 1483, 1484, 1293, 1738, 1741, 221, 556, 2455, 2133, + /* 190 */ 552, 548, 694, 203, 2215, 1658, 381, 2506, 696, 1653, + /* 200 */ 1834, 1651, 797, 2510, 2131, 2041, 1288, 1291, 1292, 408, + /* 210 */ 41, 40, 2212, 715, 47, 45, 44, 43, 42, 127, + /* 220 */ 1680, 839, 126, 125, 124, 123, 122, 121, 120, 119, + /* 230 */ 118, 1656, 1657, 1709, 727, 1711, 1714, 1715, 1716, 1717, + /* 240 */ 1718, 1719, 1720, 1721, 740, 736, 1730, 1731, 1733, 1734, + /* 250 */ 1735, 1736, 2, 48, 46, 1551, 1552, 1885, 364, 51, + /* 260 */ 1675, 415, 1312, 1652, 1311, 1677, 2133, 512, 196, 2335, + /* 270 */ 531, 650, 375, 396, 695, 530, 1737, 2505, 1650, 142, + /* 280 */ 2120, 2131, 745, 2440, 709, 201, 2433, 2434, 239, 144, + /* 290 */ 2438, 494, 564, 532, 1943, 694, 203, 1313, 496, 2311, + /* 300 */ 2506, 696, 223, 514, 2191, 1732, 1892, 1878, 474, 2437, + /* 310 */ 2353, 19, 174, 2071, 1904, 68, 1766, 1653, 1658, 1651, + /* 320 */ 311, 312, 2301, 2315, 744, 310, 1768, 2335, 728, 2080, + /* 330 */ 136, 135, 134, 133, 132, 131, 130, 129, 128, 63, + /* 340 */ 745, 1391, 1945, 90, 839, 384, 89, 15, 137, 1656, + /* 350 */ 1657, 63, 226, 41, 40, 604, 482, 47, 45, 44, + /* 360 */ 43, 42, 1884, 2334, 611, 1681, 2372, 2317, 2353, 175, + /* 370 */ 2336, 748, 2338, 2339, 743, 448, 738, 738, 1767, 302, + /* 380 */ 2301, 1393, 744, 1739, 1740, 1915, 2202, 2181, 1388, 519, /* 390 */ 518, 517, 516, 511, 510, 509, 508, 507, 502, 501, - /* 400 */ 500, 499, 367, 491, 490, 489, 2068, 484, 483, 382, - /* 410 */ 624, 668, 2461, 475, 1535, 1536, 579, 2203, 1708, 1718, - /* 420 */ 1554, 2329, 1673, 648, 2367, 1734, 1737, 114, 2331, 745, - /* 430 */ 2333, 2334, 740, 780, 735, 1676, 304, 639, 2296, 2519, - /* 440 */ 1649, 2420, 1647, 41, 40, 411, 2416, 47, 45, 44, - /* 450 */ 43, 42, 637, 1654, 635, 269, 268, 2289, 37, 413, - /* 460 */ 1757, 1758, 1759, 1760, 1761, 1765, 1766, 1767, 1768, 780, - /* 470 */ 311, 312, 1652, 1653, 1705, 310, 1707, 1710, 1711, 1712, - /* 480 */ 1713, 1714, 1715, 1716, 1717, 737, 733, 1726, 1727, 1729, - /* 490 */ 1730, 1731, 1732, 2, 12, 48, 46, 255, 239, 2330, - /* 500 */ 1673, 1399, 564, 415, 1938, 1648, 61, 667, 63, 1909, - /* 510 */ 2499, 63, 742, 178, 664, 12, 1398, 68, 1733, 558, - /* 520 */ 1646, 598, 594, 590, 586, 223, 254, 556, 2505, 203, - /* 530 */ 552, 548, 1908, 2500, 693, 2330, 159, 623, 622, 621, - /* 540 */ 2348, 651, 1849, 522, 613, 143, 617, 1728, 707, 651, - /* 550 */ 616, 2052, 2296, 19, 741, 615, 620, 391, 390, 1705, - /* 560 */ 1654, 614, 2296, 3, 610, 2504, 90, 96, 2499, 89, - /* 570 */ 252, 1311, 1312, 41, 40, 54, 2348, 47, 45, 44, - /* 580 */ 43, 42, 533, 424, 423, 2296, 836, 2503, 2296, 15, - /* 590 */ 741, 2500, 2501, 2329, 302, 1308, 2367, 1307, 30, 114, - /* 600 */ 2331, 745, 2333, 2334, 740, 227, 735, 2306, 1655, 149, - /* 610 */ 55, 156, 2391, 2420, 1811, 571, 2249, 411, 2416, 63, - /* 620 */ 1673, 2315, 771, 653, 2249, 1735, 1736, 521, 520, 2329, - /* 630 */ 1309, 2310, 2367, 88, 242, 114, 2331, 745, 2333, 2334, - /* 640 */ 740, 2128, 735, 251, 244, 600, 599, 186, 396, 2420, - /* 650 */ 249, 575, 325, 411, 2416, 2435, 2126, 1709, 41, 40, - /* 660 */ 1708, 1718, 47, 45, 44, 43, 42, 1734, 1737, 241, - /* 670 */ 699, 304, 1850, 1743, 304, 2312, 2451, 1974, 2159, 1673, - /* 680 */ 1444, 2431, 1649, 2060, 1647, 735, 778, 161, 160, 775, - /* 690 */ 774, 773, 158, 52, 1435, 770, 769, 768, 1439, 767, - /* 700 */ 1441, 1442, 766, 763, 171, 1450, 760, 1452, 1453, 757, - /* 710 */ 754, 751, 2078, 1706, 1652, 1653, 1705, 99, 1707, 1710, - /* 720 */ 1711, 1712, 1713, 1714, 1715, 1716, 1717, 737, 733, 1726, - /* 730 */ 1727, 1729, 1730, 1731, 1732, 2, 48, 46, 1738, 2062, - /* 740 */ 2330, 44, 43, 42, 415, 2128, 1648, 1907, 1595, 623, - /* 750 */ 622, 621, 405, 742, 1838, 2458, 613, 143, 617, 1733, - /* 760 */ 2126, 1646, 616, 725, 2075, 725, 2075, 615, 620, 391, - /* 770 */ 390, 2330, 1658, 614, 725, 2075, 610, 1709, 1885, 2050, - /* 780 */ 9, 2348, 304, 137, 742, 137, 2471, 2058, 1728, 12, - /* 790 */ 604, 10, 609, 2296, 208, 741, 602, 601, 448, 2435, - /* 800 */ 2296, 1654, 1906, 679, 678, 1836, 1837, 1839, 1840, 1841, - /* 810 */ 464, 2079, 2348, 41, 40, 463, 2128, 47, 45, 44, - /* 820 */ 43, 42, 1291, 410, 2296, 2430, 741, 836, 1672, 170, - /* 830 */ 49, 2126, 280, 1706, 2329, 1905, 1709, 2367, 2330, 498, - /* 840 */ 114, 2331, 745, 2333, 2334, 740, 2128, 735, 497, 725, - /* 850 */ 2075, 739, 2519, 419, 2420, 2296, 304, 430, 411, 2416, - /* 860 */ 667, 2126, 429, 2499, 2503, 2329, 1735, 1736, 2367, 56, - /* 870 */ 736, 114, 2331, 745, 2333, 2334, 740, 2290, 735, 2348, - /* 880 */ 95, 2505, 203, 2519, 1904, 2420, 2500, 693, 2296, 411, - /* 890 */ 2416, 2296, 1706, 741, 778, 161, 160, 775, 774, 773, - /* 900 */ 158, 1708, 1718, 704, 146, 418, 2071, 667, 1734, 1737, - /* 910 */ 2499, 2128, 1823, 171, 778, 161, 160, 775, 774, 773, - /* 920 */ 158, 2077, 2317, 1649, 452, 1647, 711, 667, 2505, 203, - /* 930 */ 2499, 700, 2329, 2500, 693, 2367, 1949, 2296, 356, 2331, - /* 940 */ 745, 2333, 2334, 740, 738, 735, 726, 2385, 2505, 203, - /* 950 */ 1764, 454, 450, 2500, 693, 1652, 1653, 1705, 626, 1707, - /* 960 */ 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 737, 733, - /* 970 */ 1726, 1727, 1729, 1730, 1731, 1732, 2, 48, 46, 2319, - /* 980 */ 2330, 725, 2075, 1403, 646, 415, 1387, 1648, 1903, 649, - /* 990 */ 725, 2075, 727, 742, 2392, 674, 725, 2075, 1402, 273, - /* 1000 */ 1733, 468, 1646, 421, 725, 2075, 1796, 839, 619, 618, - /* 1010 */ 469, 171, 2330, 202, 2428, 2429, 488, 144, 2433, 2077, - /* 1020 */ 2169, 2348, 2306, 327, 275, 742, 1389, 2492, 1657, 1728, - /* 1030 */ 35, 725, 2075, 2296, 667, 741, 2314, 2499, 1804, 193, - /* 1040 */ 1769, 2296, 1654, 725, 2075, 284, 2310, 827, 823, 819, - /* 1050 */ 815, 503, 324, 2348, 791, 2505, 203, 2258, 725, 2075, - /* 1060 */ 2500, 693, 478, 504, 535, 2296, 2015, 741, 836, 704, - /* 1070 */ 146, 49, 1902, 628, 2329, 1616, 1617, 2367, 505, 1677, - /* 1080 */ 114, 2331, 745, 2333, 2334, 740, 652, 735, 640, 100, - /* 1090 */ 2312, 412, 2519, 113, 2420, 1677, 318, 1673, 411, 2416, - /* 1100 */ 735, 725, 2075, 2277, 270, 1900, 2329, 1735, 1736, 2367, - /* 1110 */ 1289, 274, 114, 2331, 745, 2333, 2334, 740, 793, 735, - /* 1120 */ 631, 580, 1677, 696, 2519, 2296, 2420, 625, 721, 794, - /* 1130 */ 411, 2416, 2036, 267, 1287, 1288, 667, 805, 803, 2499, - /* 1140 */ 41, 40, 1708, 1718, 47, 45, 44, 43, 42, 1734, - /* 1150 */ 1737, 695, 1677, 389, 388, 725, 2075, 2505, 203, 729, - /* 1160 */ 159, 2392, 2500, 693, 1649, 772, 1647, 2128, 2119, 307, - /* 1170 */ 1901, 725, 2075, 2128, 72, 2072, 306, 71, 111, 204, - /* 1180 */ 2428, 2429, 720, 144, 2433, 14, 13, 108, 2127, 708, - /* 1190 */ 63, 283, 1660, 1898, 1897, 277, 1652, 1653, 1705, 1896, - /* 1200 */ 1707, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 737, - /* 1210 */ 733, 1726, 1727, 1729, 1730, 1731, 1732, 2, 48, 46, - /* 1220 */ 725, 2075, 2330, 2296, 387, 386, 415, 606, 1648, 47, - /* 1230 */ 45, 44, 43, 42, 1611, 742, 1895, 2439, 194, 667, - /* 1240 */ 710, 1733, 2499, 1646, 725, 2075, 2296, 2296, 1894, 608, - /* 1250 */ 1893, 1892, 2296, 607, 725, 2075, 725, 2075, 725, 2075, - /* 1260 */ 2505, 203, 2280, 2348, 315, 2500, 693, 725, 2075, 776, - /* 1270 */ 1728, 76, 2119, 732, 722, 2296, 723, 741, 321, 1891, - /* 1280 */ 1890, 198, 462, 1654, 461, 777, 2464, 422, 2119, 2296, - /* 1290 */ 334, 1776, 1678, 2105, 1915, 831, 260, 2440, 1796, 258, - /* 1300 */ 643, 2296, 642, 2296, 2296, 1803, 139, 50, 1678, 836, - /* 1310 */ 1706, 199, 15, 437, 460, 1656, 2329, 2330, 86, 2367, - /* 1320 */ 611, 87, 114, 2331, 745, 2333, 2334, 740, 210, 735, - /* 1330 */ 742, 2053, 2296, 2296, 2519, 1678, 2420, 424, 423, 262, - /* 1340 */ 411, 2416, 261, 264, 1384, 612, 263, 1662, 1735, 1736, - /* 1350 */ 680, 266, 1947, 304, 265, 785, 159, 1342, 2348, 50, - /* 1360 */ 1733, 786, 1655, 297, 152, 1678, 50, 1882, 1883, 1382, - /* 1370 */ 2296, 141, 741, 2349, 629, 291, 14, 13, 2012, 1361, - /* 1380 */ 1941, 1719, 697, 1708, 1718, 1359, 2011, 187, 159, 1728, - /* 1390 */ 1734, 1737, 50, 309, 75, 2195, 157, 1343, 159, 66, - /* 1400 */ 50, 749, 1654, 157, 159, 1649, 140, 1647, 1931, 2454, - /* 1410 */ 157, 2329, 677, 401, 2367, 684, 714, 114, 2331, 745, - /* 1420 */ 2333, 2334, 740, 398, 735, 2196, 428, 1937, 731, 2395, - /* 1430 */ 1614, 2420, 829, 1835, 1754, 411, 2416, 1652, 1653, 1705, - /* 1440 */ 1834, 1707, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, - /* 1450 */ 737, 733, 1726, 1727, 1729, 1730, 1731, 1732, 2, 2116, - /* 1460 */ 172, 289, 709, 705, 660, 341, 1564, 313, 717, 2455, - /* 1470 */ 317, 2465, 1429, 1770, 333, 1457, 299, 1461, 1468, 1659, - /* 1480 */ 1466, 296, 338, 74, 162, 303, 73, 2037, 5, 431, - /* 1490 */ 436, 379, 444, 445, 1681, 455, 366, 211, 1588, 456, - /* 1500 */ 2330, 212, 214, 458, 1671, 328, 472, 235, 543, 541, - /* 1510 */ 538, 1672, 479, 742, 225, 485, 481, 487, 492, 524, - /* 1520 */ 506, 523, 513, 2188, 1663, 515, 1658, 525, 536, 537, - /* 1530 */ 534, 229, 230, 539, 232, 540, 542, 544, 1679, 4, - /* 1540 */ 559, 2348, 560, 567, 240, 568, 570, 92, 63, 1674, - /* 1550 */ 572, 243, 1680, 2296, 573, 741, 1666, 1668, 1682, 576, - /* 1560 */ 246, 574, 248, 1683, 93, 2204, 582, 94, 253, 603, - /* 1570 */ 733, 1726, 1727, 1729, 1730, 1731, 1732, 632, 360, 633, - /* 1580 */ 116, 2267, 2264, 605, 2263, 2065, 64, 645, 97, 257, - /* 1590 */ 2061, 259, 164, 165, 2329, 647, 2063, 2367, 2059, 166, - /* 1600 */ 114, 2331, 745, 2333, 2334, 740, 167, 735, 153, 329, - /* 1610 */ 276, 1675, 2393, 655, 2420, 654, 659, 656, 411, 2416, - /* 1620 */ 281, 662, 671, 681, 2470, 715, 2330, 2469, 8, 2442, - /* 1630 */ 690, 290, 293, 84, 83, 467, 402, 292, 216, 742, - /* 1640 */ 661, 286, 288, 179, 279, 672, 2250, 669, 294, 295, - /* 1650 */ 670, 459, 457, 1796, 145, 2522, 1676, 701, 1801, 1, - /* 1660 */ 2330, 2498, 363, 698, 1799, 446, 298, 2348, 443, 439, - /* 1670 */ 435, 432, 460, 742, 305, 190, 2436, 154, 330, 2296, - /* 1680 */ 713, 741, 2218, 2217, 331, 2216, 407, 718, 719, 332, - /* 1690 */ 155, 105, 206, 2076, 62, 2401, 107, 2120, 747, 335, - /* 1700 */ 1266, 2348, 833, 323, 830, 163, 835, 359, 371, 372, - /* 1710 */ 2288, 304, 344, 2296, 53, 741, 337, 2287, 2286, 81, - /* 1720 */ 2329, 358, 2281, 2367, 348, 433, 114, 2331, 745, 2333, - /* 1730 */ 2334, 740, 434, 735, 2330, 339, 1639, 1640, 728, 209, - /* 1740 */ 2420, 438, 2279, 440, 411, 2416, 441, 742, 442, 1638, - /* 1750 */ 2278, 2276, 380, 447, 2329, 2275, 449, 2367, 2274, 451, - /* 1760 */ 115, 2331, 745, 2333, 2334, 740, 2273, 735, 2330, 453, - /* 1770 */ 1627, 2254, 213, 2253, 2420, 2348, 215, 1591, 2419, 2416, - /* 1780 */ 82, 742, 1590, 2231, 2230, 2229, 466, 2296, 465, 741, - /* 1790 */ 2228, 2227, 2178, 470, 1534, 2175, 473, 2174, 2168, 476, - /* 1800 */ 477, 2330, 2165, 218, 2164, 85, 2163, 2162, 2167, 2348, - /* 1810 */ 220, 2166, 2161, 2160, 742, 2158, 2157, 2156, 222, 493, - /* 1820 */ 2155, 2296, 495, 741, 2171, 2154, 2153, 2152, 2329, 224, - /* 1830 */ 2139, 2367, 2151, 2150, 115, 2331, 745, 2333, 2334, 740, - /* 1840 */ 2173, 735, 2348, 2149, 2148, 2147, 2146, 2145, 2420, 527, - /* 1850 */ 91, 2138, 730, 2416, 2296, 2144, 741, 2143, 2142, 2141, - /* 1860 */ 2140, 2137, 743, 2136, 2172, 2367, 2170, 2135, 115, 2331, - /* 1870 */ 745, 2333, 2334, 740, 2134, 735, 1540, 2330, 2133, 2132, - /* 1880 */ 228, 2131, 2420, 529, 2130, 2129, 374, 2416, 368, 369, - /* 1890 */ 742, 1400, 1404, 1977, 1976, 2329, 1975, 1973, 2367, 231, - /* 1900 */ 233, 176, 2331, 745, 2333, 2334, 740, 2330, 735, 1970, - /* 1910 */ 1396, 1969, 234, 545, 549, 1962, 546, 547, 2348, 550, - /* 1920 */ 742, 1951, 551, 553, 1926, 555, 557, 1290, 185, 1925, - /* 1930 */ 2296, 2252, 741, 554, 78, 236, 2248, 2316, 2238, 2226, - /* 1940 */ 195, 2225, 238, 79, 245, 2202, 247, 565, 2348, 250, - /* 1950 */ 2054, 1972, 1968, 583, 584, 694, 2520, 1966, 588, 585, - /* 1960 */ 2296, 589, 741, 587, 1964, 591, 1961, 593, 1946, 592, - /* 1970 */ 595, 2329, 597, 596, 2367, 1335, 1944, 115, 2331, 745, - /* 1980 */ 2333, 2334, 740, 1945, 735, 2330, 1943, 1922, 2056, 1472, - /* 1990 */ 1473, 2420, 2055, 1386, 802, 1385, 2417, 1383, 742, 1381, - /* 2000 */ 1380, 2329, 2330, 804, 2367, 1959, 1379, 175, 2331, 745, - /* 2010 */ 2333, 2334, 740, 1372, 735, 742, 1378, 256, 1377, 2330, - /* 2020 */ 392, 1374, 65, 1950, 393, 627, 2348, 1373, 1948, 394, - /* 2030 */ 1371, 399, 742, 630, 1921, 1920, 1919, 634, 2296, 1918, - /* 2040 */ 741, 636, 1917, 2348, 638, 117, 1621, 1623, 400, 1620, - /* 2050 */ 2462, 1625, 29, 2251, 69, 2296, 1601, 741, 2247, 1599, - /* 2060 */ 2348, 1597, 278, 2237, 169, 657, 2224, 2223, 2504, 6, - /* 2070 */ 17, 20, 2296, 21, 741, 23, 7, 31, 673, 2329, - /* 2080 */ 1852, 285, 2367, 22, 2330, 357, 2331, 745, 2333, 2334, - /* 2090 */ 740, 57, 735, 58, 189, 177, 2329, 742, 200, 2367, - /* 2100 */ 2317, 287, 357, 2331, 745, 2333, 2334, 740, 675, 735, - /* 2110 */ 1833, 658, 33, 2329, 2330, 1822, 2367, 282, 1872, 350, - /* 2120 */ 2331, 745, 2333, 2334, 740, 2348, 735, 742, 1576, 663, - /* 2130 */ 67, 24, 1867, 1575, 1873, 188, 32, 2296, 80, 741, - /* 2140 */ 1866, 665, 403, 1871, 1870, 18, 404, 60, 1793, 301, - /* 2150 */ 180, 1792, 2222, 2201, 101, 2348, 2200, 102, 25, 103, - /* 2160 */ 406, 308, 1828, 191, 26, 689, 314, 2296, 716, 741, - /* 2170 */ 70, 108, 319, 1745, 104, 1744, 316, 59, 2329, 2330, - /* 2180 */ 13, 2367, 1664, 2370, 176, 2331, 745, 2333, 2334, 740, - /* 2190 */ 1755, 735, 739, 1723, 11, 734, 181, 1721, 39, 2330, - /* 2200 */ 1720, 1690, 16, 192, 1698, 27, 748, 746, 2329, 1458, - /* 2210 */ 28, 2367, 742, 417, 357, 2331, 745, 2333, 2334, 740, - /* 2220 */ 2348, 735, 2330, 1455, 750, 752, 753, 755, 1454, 1451, - /* 2230 */ 756, 744, 2296, 758, 741, 742, 759, 2330, 761, 2521, - /* 2240 */ 2348, 1445, 762, 764, 1443, 414, 1449, 765, 109, 322, - /* 2250 */ 742, 110, 2296, 1448, 741, 1447, 2330, 1467, 1463, 1446, - /* 2260 */ 1333, 77, 779, 2348, 1368, 1365, 1364, 1363, 416, 742, - /* 2270 */ 1394, 1362, 1360, 2329, 1358, 2296, 2367, 741, 2348, 356, - /* 2280 */ 2331, 745, 2333, 2334, 740, 1357, 735, 1356, 2386, 1393, - /* 2290 */ 2296, 790, 741, 2329, 792, 207, 2367, 2348, 1354, 357, - /* 2300 */ 2331, 745, 2333, 2334, 740, 1353, 735, 1352, 1351, 2296, - /* 2310 */ 1350, 741, 1349, 1967, 1348, 1390, 2329, 1388, 1345, 2367, - /* 2320 */ 1344, 1341, 357, 2331, 745, 2333, 2334, 740, 1339, 735, - /* 2330 */ 2330, 644, 1340, 1338, 2367, 812, 813, 352, 2331, 745, - /* 2340 */ 2333, 2334, 740, 742, 735, 814, 1965, 816, 817, 2330, - /* 2350 */ 2329, 818, 1963, 2367, 820, 821, 342, 2331, 745, 2333, - /* 2360 */ 2334, 740, 742, 735, 822, 2330, 1960, 824, 826, 825, - /* 2370 */ 1942, 2348, 828, 1279, 1916, 1267, 832, 326, 742, 834, - /* 2380 */ 1886, 1650, 336, 2296, 837, 741, 1886, 838, 1886, 1886, - /* 2390 */ 2348, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2400 */ 1886, 1886, 2296, 1886, 741, 1886, 2348, 1886, 1886, 1886, - /* 2410 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 2296, 1886, - /* 2420 */ 741, 1886, 1886, 2330, 2329, 1886, 1886, 2367, 1886, 1886, - /* 2430 */ 340, 2331, 745, 2333, 2334, 740, 742, 735, 1886, 1886, - /* 2440 */ 1886, 1886, 1886, 2329, 1886, 1886, 2367, 2330, 1886, 343, - /* 2450 */ 2331, 745, 2333, 2334, 740, 1886, 735, 1886, 1886, 2329, - /* 2460 */ 742, 1886, 2367, 1886, 2348, 349, 2331, 745, 2333, 2334, - /* 2470 */ 740, 1886, 735, 1886, 1886, 1886, 2296, 1886, 741, 1886, - /* 2480 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 2348, 1886, - /* 2490 */ 2330, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2500 */ 2296, 1886, 741, 742, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2510 */ 1886, 1886, 1886, 1886, 1886, 1886, 2330, 2329, 1886, 1886, - /* 2520 */ 2367, 1886, 1886, 353, 2331, 745, 2333, 2334, 740, 742, - /* 2530 */ 735, 2348, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2540 */ 1886, 2329, 1886, 2296, 2367, 741, 1886, 345, 2331, 745, - /* 2550 */ 2333, 2334, 740, 1886, 735, 1886, 1886, 2348, 1886, 2330, - /* 2560 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 2296, - /* 2570 */ 1886, 741, 742, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2580 */ 1886, 1886, 1886, 2330, 2329, 1886, 1886, 2367, 1886, 1886, - /* 2590 */ 354, 2331, 745, 2333, 2334, 740, 742, 735, 1886, 1886, - /* 2600 */ 2348, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2610 */ 2329, 1886, 2296, 2367, 741, 1886, 346, 2331, 745, 2333, - /* 2620 */ 2334, 740, 1886, 735, 2348, 1886, 2330, 1886, 1886, 1886, - /* 2630 */ 1886, 1886, 1886, 1886, 1886, 1886, 2296, 1886, 741, 742, - /* 2640 */ 1886, 2330, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2650 */ 1886, 1886, 1886, 2329, 742, 1886, 2367, 2330, 1886, 355, - /* 2660 */ 2331, 745, 2333, 2334, 740, 1886, 735, 2348, 1886, 1886, - /* 2670 */ 742, 1886, 1886, 1886, 1886, 1886, 1886, 2329, 1886, 2296, - /* 2680 */ 2367, 741, 2348, 347, 2331, 745, 2333, 2334, 740, 1886, - /* 2690 */ 735, 1886, 1886, 1886, 2296, 1886, 741, 1886, 2348, 1886, - /* 2700 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2710 */ 2296, 1886, 741, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2720 */ 2329, 1886, 1886, 2367, 1886, 1886, 361, 2331, 745, 2333, - /* 2730 */ 2334, 740, 1886, 735, 2330, 2329, 1886, 1886, 2367, 1886, - /* 2740 */ 1886, 362, 2331, 745, 2333, 2334, 740, 742, 735, 1886, - /* 2750 */ 1886, 2329, 1886, 2330, 2367, 1886, 1886, 2342, 2331, 745, - /* 2760 */ 2333, 2334, 740, 1886, 735, 1886, 742, 1886, 1886, 2330, - /* 2770 */ 1886, 1886, 1886, 1886, 1886, 2348, 1886, 1886, 1886, 1886, - /* 2780 */ 1886, 1886, 742, 1886, 1886, 1886, 1886, 2296, 1886, 741, - /* 2790 */ 1886, 1886, 1886, 1886, 2348, 1886, 1886, 1886, 1886, 1886, - /* 2800 */ 1886, 1886, 1886, 1886, 1886, 1886, 2296, 1886, 741, 1886, - /* 2810 */ 2348, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2820 */ 1886, 1886, 2296, 1886, 741, 1886, 1886, 2330, 2329, 1886, - /* 2830 */ 1886, 2367, 1886, 1886, 2341, 2331, 745, 2333, 2334, 740, - /* 2840 */ 742, 735, 1886, 1886, 1886, 1886, 1886, 2329, 1886, 1886, - /* 2850 */ 2367, 2330, 1886, 2340, 2331, 745, 2333, 2334, 740, 1886, - /* 2860 */ 735, 1886, 1886, 2329, 742, 1886, 2367, 1886, 2348, 376, - /* 2870 */ 2331, 745, 2333, 2334, 740, 1886, 735, 1886, 1886, 1886, - /* 2880 */ 2296, 1886, 741, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2890 */ 1886, 1886, 2348, 1886, 2330, 1886, 1886, 1886, 1886, 1886, - /* 2900 */ 1886, 1886, 1886, 1886, 2296, 1886, 741, 742, 1886, 1886, - /* 2910 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2920 */ 2330, 2329, 1886, 1886, 2367, 1886, 1886, 377, 2331, 745, - /* 2930 */ 2333, 2334, 740, 742, 735, 2348, 1886, 1886, 1886, 1886, - /* 2940 */ 1886, 1886, 1886, 1886, 1886, 2329, 1886, 2296, 2367, 741, - /* 2950 */ 1886, 373, 2331, 745, 2333, 2334, 740, 1886, 735, 1886, - /* 2960 */ 1886, 2348, 1886, 2330, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2970 */ 1886, 1886, 1886, 2296, 1886, 741, 742, 1886, 1886, 1886, - /* 2980 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 2329, 1886, - /* 2990 */ 1886, 2367, 1886, 1886, 378, 2331, 745, 2333, 2334, 740, - /* 3000 */ 1886, 735, 1886, 1886, 2348, 1886, 1886, 1886, 1886, 1886, - /* 3010 */ 1886, 1886, 1886, 1886, 743, 1886, 2296, 2367, 741, 1886, - /* 3020 */ 352, 2331, 745, 2333, 2334, 740, 1886, 735, 1886, 1886, - /* 3030 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 3040 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 3050 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 2329, 1886, 1886, - /* 3060 */ 2367, 1886, 1886, 351, 2331, 745, 2333, 2334, 740, 1886, - /* 3070 */ 735, + /* 400 */ 500, 499, 367, 491, 490, 489, 35, 484, 483, 382, + /* 410 */ 88, 668, 2466, 475, 1539, 1540, 1773, 63, 1712, 1722, + /* 420 */ 1558, 2334, 304, 1678, 2372, 1738, 1741, 114, 2336, 748, + /* 430 */ 2338, 2339, 743, 727, 738, 52, 651, 639, 2301, 2525, + /* 440 */ 1653, 2425, 1651, 41, 40, 411, 2421, 47, 45, 44, + /* 450 */ 43, 42, 637, 794, 635, 269, 268, 3, 37, 413, + /* 460 */ 1761, 1762, 1763, 1764, 1765, 1769, 1770, 1771, 1772, 54, + /* 470 */ 689, 685, 1656, 1657, 1709, 578, 1711, 1714, 1715, 1716, + /* 480 */ 1717, 1718, 1719, 1720, 1721, 740, 736, 1730, 1731, 1733, + /* 490 */ 1734, 1735, 1736, 2, 12, 48, 46, 775, 2353, 2335, + /* 500 */ 2124, 452, 304, 415, 690, 1652, 728, 2080, 2133, 255, + /* 510 */ 571, 2254, 745, 2311, 304, 405, 63, 796, 1737, 51, + /* 520 */ 1650, 728, 2080, 2131, 199, 179, 208, 2320, 454, 450, + /* 530 */ 2335, 579, 2208, 598, 594, 590, 586, 2315, 254, 577, + /* 540 */ 2353, 137, 1854, 710, 2294, 1571, 1572, 1732, 609, 623, + /* 550 */ 622, 621, 2301, 19, 744, 581, 613, 143, 617, 688, + /* 560 */ 1658, 783, 616, 691, 686, 679, 675, 615, 620, 391, + /* 570 */ 390, 2353, 648, 614, 522, 1914, 610, 2133, 1682, 96, + /* 580 */ 304, 2317, 252, 2301, 410, 744, 839, 1570, 1573, 15, + /* 590 */ 1681, 738, 2131, 2334, 667, 2056, 2372, 2505, 304, 114, + /* 600 */ 2336, 748, 2338, 2339, 743, 2311, 738, 2133, 462, 149, + /* 610 */ 461, 156, 2396, 2425, 419, 2511, 203, 411, 2421, 2319, + /* 620 */ 2506, 696, 2131, 12, 2334, 1739, 1740, 2372, 2301, 2315, + /* 630 */ 114, 2336, 748, 2338, 2339, 743, 227, 738, 2057, 566, + /* 640 */ 460, 1681, 186, 608, 2425, 563, 242, 607, 411, 2421, + /* 650 */ 728, 2080, 112, 707, 146, 251, 244, 1843, 521, 520, + /* 660 */ 1712, 1722, 249, 575, 783, 728, 2080, 1738, 1741, 147, + /* 670 */ 56, 2456, 1815, 2317, 412, 1448, 272, 2072, 1677, 304, + /* 680 */ 271, 241, 1653, 738, 1651, 468, 44, 43, 42, 1439, + /* 690 */ 773, 772, 771, 1443, 770, 1445, 1446, 769, 766, 1658, + /* 700 */ 1454, 763, 1456, 1457, 760, 757, 754, 682, 681, 1841, + /* 710 */ 1842, 1844, 1845, 1846, 1656, 1657, 1709, 1709, 1711, 1714, + /* 720 */ 1715, 1716, 1717, 1718, 1719, 1720, 1721, 740, 736, 1730, + /* 730 */ 1731, 1733, 1734, 1735, 1736, 2, 48, 46, 1742, 2335, + /* 740 */ 728, 2080, 728, 2080, 415, 2164, 1652, 98, 649, 194, + /* 750 */ 370, 1680, 745, 395, 2463, 641, 12, 651, 10, 1737, + /* 760 */ 469, 1650, 488, 202, 2433, 2434, 842, 144, 2438, 2510, + /* 770 */ 284, 2335, 2505, 781, 161, 160, 778, 777, 776, 158, + /* 780 */ 2353, 2055, 327, 730, 745, 2397, 2476, 779, 1732, 418, + /* 790 */ 2124, 2509, 2301, 2322, 744, 2506, 2508, 171, 193, 2440, + /* 800 */ 198, 1658, 421, 1682, 774, 2082, 830, 826, 822, 818, + /* 810 */ 171, 324, 2353, 1293, 100, 41, 40, 1913, 2082, 47, + /* 820 */ 45, 44, 43, 42, 2301, 2436, 744, 839, 707, 146, + /* 830 */ 49, 653, 2254, 2334, 1677, 1713, 2372, 1291, 1292, 114, + /* 840 */ 2336, 748, 2338, 2339, 743, 1912, 738, 1911, 1315, 1316, + /* 850 */ 2324, 2525, 113, 2425, 1682, 318, 1747, 411, 2421, 424, + /* 860 */ 423, 666, 1677, 600, 599, 2334, 1739, 1740, 2372, 1666, + /* 870 */ 2301, 114, 2336, 748, 2338, 2339, 743, 2510, 738, 732, + /* 880 */ 2505, 2397, 1737, 2525, 1659, 2425, 325, 724, 1910, 411, + /* 890 */ 2421, 1710, 2335, 47, 45, 44, 43, 42, 2301, 2509, + /* 900 */ 2301, 1712, 1722, 2506, 2507, 745, 498, 677, 1738, 1741, + /* 910 */ 302, 1732, 424, 423, 1827, 497, 781, 161, 160, 778, + /* 920 */ 777, 776, 158, 1653, 1658, 1651, 728, 2080, 307, 728, + /* 930 */ 2080, 728, 2080, 2353, 1890, 306, 171, 1659, 204, 2433, + /* 940 */ 2434, 2301, 144, 2438, 2083, 2301, 503, 744, 2509, 504, + /* 950 */ 734, 505, 1909, 2065, 277, 1656, 1657, 1709, 2067, 1711, + /* 960 */ 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 740, 736, + /* 970 */ 1730, 1731, 1733, 1734, 1735, 1736, 2, 48, 46, 1908, + /* 980 */ 1907, 728, 2080, 728, 2080, 415, 2334, 1652, 1906, 2372, + /* 990 */ 61, 1713, 114, 2336, 748, 2338, 2339, 743, 664, 738, + /* 1000 */ 1737, 580, 1650, 2077, 2525, 2301, 2425, 1403, 728, 2080, + /* 1010 */ 411, 2421, 2335, 430, 728, 2080, 619, 618, 429, 1713, + /* 1020 */ 728, 2080, 1402, 728, 2080, 745, 1808, 2498, 275, 1732, + /* 1030 */ 728, 2080, 2301, 2301, 283, 1312, 1681, 1311, 602, 601, + /* 1040 */ 713, 2301, 1658, 315, 728, 2080, 1667, 1710, 1662, 106, + /* 1050 */ 725, 41, 40, 2353, 1295, 47, 45, 44, 43, 42, + /* 1060 */ 1676, 728, 2080, 667, 726, 2301, 2505, 744, 839, 273, + /* 1070 */ 1313, 49, 14, 13, 2073, 1710, 1407, 2440, 1670, 1672, + /* 1080 */ 1979, 321, 728, 2080, 2511, 203, 2335, 1903, 533, 2506, + /* 1090 */ 696, 1406, 736, 1730, 1731, 1733, 1734, 1735, 1736, 742, + /* 1100 */ 2063, 1662, 422, 2435, 9, 1902, 2334, 1739, 1740, 2372, + /* 1110 */ 808, 806, 114, 2336, 748, 2338, 2339, 743, 95, 738, + /* 1120 */ 99, 1901, 780, 702, 2525, 2124, 2425, 2353, 1900, 1899, + /* 1130 */ 411, 2421, 781, 161, 160, 778, 777, 776, 158, 2301, + /* 1140 */ 2301, 744, 1712, 1722, 2076, 1620, 1621, 2133, 2133, 1738, + /* 1150 */ 1741, 1599, 623, 622, 621, 1920, 834, 535, 2301, 613, + /* 1160 */ 143, 617, 714, 723, 1653, 616, 1651, 1677, 1898, 2282, + /* 1170 */ 615, 620, 391, 390, 2301, 2263, 614, 159, 1780, 610, + /* 1180 */ 2334, 2301, 2301, 2372, 1897, 1896, 356, 2336, 748, 2338, + /* 1190 */ 2339, 743, 741, 738, 729, 2390, 1656, 1657, 1709, 1895, + /* 1200 */ 1711, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 740, + /* 1210 */ 736, 1730, 1731, 1733, 1734, 1735, 1736, 2, 48, 46, + /* 1220 */ 2335, 2301, 170, 2445, 1800, 628, 415, 2133, 1652, 274, + /* 1230 */ 2285, 334, 2174, 745, 2110, 2444, 698, 2301, 2301, 464, + /* 1240 */ 640, 1737, 2132, 1650, 463, 139, 76, 2058, 643, 1682, + /* 1250 */ 642, 55, 2301, 2335, 612, 260, 270, 86, 258, 262, + /* 1260 */ 264, 2353, 261, 263, 266, 1963, 745, 265, 1954, 1952, + /* 1270 */ 1732, 735, 631, 2301, 478, 744, 699, 159, 1386, 625, + /* 1280 */ 152, 437, 2084, 1658, 280, 267, 739, 624, 159, 667, + /* 1290 */ 626, 629, 2505, 1807, 2353, 50, 87, 14, 13, 50, + /* 1300 */ 187, 1887, 1888, 159, 50, 50, 2301, 309, 744, 839, + /* 1310 */ 2511, 203, 15, 75, 2334, 2506, 696, 2372, 1946, 157, + /* 1320 */ 114, 2336, 748, 2338, 2339, 743, 72, 738, 159, 71, + /* 1330 */ 1800, 1661, 2525, 2020, 2425, 66, 41, 40, 411, 2421, + /* 1340 */ 47, 45, 44, 43, 42, 2295, 1346, 2334, 1739, 1740, + /* 1350 */ 2372, 1615, 788, 114, 2336, 748, 2338, 2339, 743, 111, + /* 1360 */ 738, 30, 1618, 1905, 1660, 2400, 50, 2425, 108, 1840, + /* 1370 */ 832, 411, 2421, 1839, 289, 789, 1365, 712, 1568, 1723, + /* 1380 */ 1710, 313, 297, 1712, 1722, 703, 1347, 720, 752, 2469, + /* 1390 */ 1738, 1741, 683, 317, 210, 667, 157, 291, 2505, 1363, + /* 1400 */ 159, 141, 1433, 2017, 2354, 1653, 2016, 1651, 2200, 1774, + /* 1410 */ 1936, 2459, 680, 646, 140, 401, 2511, 203, 157, 687, + /* 1420 */ 2335, 2506, 696, 717, 398, 428, 2201, 652, 1942, 660, + /* 1430 */ 2121, 2460, 1758, 745, 2470, 1855, 708, 1656, 1657, 1709, + /* 1440 */ 333, 1711, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, + /* 1450 */ 740, 736, 1730, 1731, 1733, 1734, 1735, 1736, 2, 299, + /* 1460 */ 172, 2353, 1461, 667, 296, 341, 2505, 2042, 5, 303, + /* 1470 */ 1465, 436, 431, 2301, 1472, 744, 379, 667, 2335, 444, + /* 1480 */ 2505, 445, 338, 74, 2511, 203, 73, 711, 1470, 2506, + /* 1490 */ 696, 745, 162, 1685, 456, 1664, 366, 455, 2511, 203, + /* 1500 */ 211, 212, 458, 2506, 696, 214, 328, 235, 543, 541, + /* 1510 */ 538, 1592, 1675, 1676, 2334, 472, 2335, 2372, 479, 2353, + /* 1520 */ 114, 2336, 748, 2338, 2339, 743, 225, 738, 1663, 745, + /* 1530 */ 481, 2301, 2398, 744, 2425, 485, 700, 667, 411, 2421, + /* 1540 */ 2505, 487, 524, 506, 492, 513, 2193, 523, 63, 515, + /* 1550 */ 525, 536, 537, 2335, 534, 230, 539, 2353, 2511, 203, + /* 1560 */ 229, 540, 232, 2506, 696, 1683, 745, 542, 544, 2301, + /* 1570 */ 559, 744, 2334, 4, 567, 2372, 560, 568, 114, 2336, + /* 1580 */ 748, 2338, 2339, 743, 570, 738, 64, 2335, 1678, 1684, + /* 1590 */ 731, 240, 2425, 573, 2353, 92, 411, 2421, 243, 572, + /* 1600 */ 745, 1686, 574, 246, 389, 388, 2301, 576, 744, 248, + /* 1610 */ 2334, 1687, 93, 2372, 2209, 582, 175, 2336, 748, 2338, + /* 1620 */ 2339, 743, 94, 738, 116, 605, 253, 2070, 2353, 603, + /* 1630 */ 257, 2066, 632, 84, 83, 467, 633, 259, 216, 645, + /* 1640 */ 2301, 164, 744, 165, 360, 97, 647, 2334, 2068, 2064, + /* 1650 */ 2372, 459, 457, 176, 2336, 748, 2338, 2339, 743, 2467, + /* 1660 */ 738, 2335, 363, 2272, 2269, 446, 153, 166, 443, 439, + /* 1670 */ 435, 432, 460, 167, 745, 387, 386, 276, 606, 1679, + /* 1680 */ 2268, 2334, 655, 281, 2372, 329, 2255, 115, 2336, 748, + /* 1690 */ 2338, 2339, 743, 654, 738, 659, 671, 662, 279, 2335, + /* 1700 */ 608, 2425, 2353, 684, 607, 2424, 2421, 697, 2526, 718, + /* 1710 */ 2475, 304, 745, 656, 2301, 661, 744, 2474, 2447, 286, + /* 1720 */ 288, 8, 693, 670, 290, 672, 669, 295, 402, 1800, + /* 1730 */ 704, 701, 2528, 145, 1680, 2335, 1805, 1803, 190, 330, + /* 1740 */ 2353, 2441, 305, 331, 154, 716, 178, 2223, 745, 2222, + /* 1750 */ 2221, 292, 2301, 407, 744, 2334, 721, 155, 2372, 332, + /* 1760 */ 722, 115, 2336, 748, 2338, 2339, 743, 105, 738, 2081, + /* 1770 */ 293, 62, 2406, 1, 107, 2425, 2353, 335, 294, 733, + /* 1780 */ 2421, 2504, 206, 2125, 750, 323, 298, 1270, 2301, 833, + /* 1790 */ 744, 836, 53, 746, 359, 344, 2372, 163, 371, 115, + /* 1800 */ 2336, 748, 2338, 2339, 743, 838, 738, 2335, 358, 372, + /* 1810 */ 348, 339, 337, 2425, 81, 2286, 433, 374, 2421, 2293, + /* 1820 */ 745, 2292, 2291, 434, 1643, 1644, 209, 438, 2284, 2334, + /* 1830 */ 2335, 440, 2372, 441, 442, 115, 2336, 748, 2338, 2339, + /* 1840 */ 743, 1642, 738, 745, 2283, 380, 2281, 447, 2353, 2425, + /* 1850 */ 2280, 2279, 451, 399, 2422, 449, 2278, 453, 1631, 2259, + /* 1860 */ 2301, 213, 744, 2258, 215, 1595, 82, 2236, 1594, 2235, + /* 1870 */ 2234, 2353, 465, 466, 2233, 2232, 400, 2183, 470, 2180, + /* 1880 */ 1538, 2179, 473, 2301, 2173, 744, 476, 477, 2170, 218, + /* 1890 */ 2169, 2168, 85, 2167, 2172, 2171, 2166, 220, 2165, 2163, + /* 1900 */ 2335, 2334, 2162, 2161, 2372, 222, 2160, 357, 2336, 748, + /* 1910 */ 2338, 2339, 743, 745, 738, 493, 495, 2176, 2159, 2158, + /* 1920 */ 2157, 2156, 2155, 2335, 2334, 2178, 2154, 2372, 2153, 2152, + /* 1930 */ 357, 2336, 748, 2338, 2339, 743, 745, 738, 2335, 2151, + /* 1940 */ 2150, 2353, 2149, 2148, 2147, 2146, 2145, 2144, 2143, 224, + /* 1950 */ 91, 745, 1544, 2301, 2142, 744, 2141, 2177, 2335, 2175, + /* 1960 */ 2140, 2139, 2138, 228, 2353, 2137, 2136, 2135, 2134, 527, + /* 1970 */ 529, 742, 1404, 368, 369, 1408, 2301, 1982, 744, 2353, + /* 1980 */ 231, 1981, 1980, 1978, 406, 1975, 1400, 546, 545, 1974, + /* 1990 */ 1967, 2301, 549, 744, 2334, 233, 1956, 2372, 234, 2353, + /* 2000 */ 350, 2336, 748, 2338, 2339, 743, 547, 738, 553, 550, + /* 2010 */ 1931, 2301, 551, 744, 554, 555, 557, 2334, 78, 236, + /* 2020 */ 2372, 185, 1294, 176, 2336, 748, 2338, 2339, 743, 2321, + /* 2030 */ 738, 1930, 2334, 195, 238, 2372, 2335, 2257, 357, 2336, + /* 2040 */ 748, 2338, 2339, 743, 565, 738, 692, 79, 2253, 745, + /* 2050 */ 2243, 2335, 2334, 2231, 245, 2372, 247, 2230, 356, 2336, + /* 2060 */ 748, 2338, 2339, 743, 745, 738, 2335, 2391, 250, 2207, + /* 2070 */ 2059, 1339, 1977, 1973, 584, 583, 585, 2353, 2527, 745, + /* 2080 */ 1971, 587, 414, 588, 589, 1969, 591, 592, 593, 2301, + /* 2090 */ 1966, 744, 2353, 595, 596, 1951, 597, 416, 1949, 1950, + /* 2100 */ 1948, 1927, 2061, 1477, 2301, 256, 744, 2353, 65, 1476, + /* 2110 */ 2060, 1390, 1389, 1387, 1385, 1384, 1383, 805, 1382, 2301, + /* 2120 */ 627, 744, 807, 1381, 1964, 1378, 1376, 1955, 1377, 1375, + /* 2130 */ 2334, 2335, 1953, 2372, 392, 393, 357, 2336, 748, 2338, + /* 2140 */ 2339, 743, 1926, 738, 745, 2334, 630, 394, 2372, 1925, + /* 2150 */ 1924, 357, 2336, 748, 2338, 2339, 743, 1923, 738, 634, + /* 2160 */ 644, 1922, 1629, 2372, 117, 2335, 352, 2336, 748, 2338, + /* 2170 */ 2339, 743, 2353, 738, 636, 638, 1625, 29, 745, 2256, + /* 2180 */ 1627, 57, 1624, 278, 2301, 2252, 744, 1603, 2335, 1601, + /* 2190 */ 58, 2242, 1605, 657, 169, 658, 282, 2229, 2228, 69, + /* 2200 */ 1580, 745, 2510, 663, 665, 1579, 2353, 20, 6, 17, + /* 2210 */ 1857, 21, 31, 285, 673, 1831, 7, 674, 2301, 676, + /* 2220 */ 744, 678, 22, 287, 1838, 2334, 189, 177, 2372, 2353, + /* 2230 */ 1826, 342, 2336, 748, 2338, 2339, 743, 188, 738, 32, + /* 2240 */ 33, 2301, 80, 744, 200, 2322, 23, 67, 1877, 24, + /* 2250 */ 1872, 1871, 18, 1878, 403, 1876, 60, 1875, 404, 2334, + /* 2260 */ 2335, 1797, 2372, 1796, 301, 340, 2336, 748, 2338, 2339, + /* 2270 */ 743, 59, 738, 745, 180, 2227, 2206, 308, 101, 102, + /* 2280 */ 1833, 25, 2334, 2335, 2205, 2372, 191, 314, 343, 2336, + /* 2290 */ 748, 2338, 2339, 743, 70, 738, 745, 719, 103, 316, + /* 2300 */ 104, 2353, 108, 2335, 319, 26, 1749, 1748, 13, 1668, + /* 2310 */ 2375, 737, 11, 2301, 39, 744, 745, 1727, 1725, 1724, + /* 2320 */ 181, 1702, 192, 751, 2353, 1759, 417, 755, 16, 322, + /* 2330 */ 27, 747, 758, 1694, 28, 753, 2301, 1462, 744, 1459, + /* 2340 */ 756, 761, 759, 749, 2353, 1458, 1455, 762, 764, 1449, + /* 2350 */ 1447, 765, 767, 768, 2334, 109, 2301, 2372, 744, 110, + /* 2360 */ 349, 2336, 748, 2338, 2339, 743, 1471, 738, 77, 1467, + /* 2370 */ 1372, 1337, 782, 1453, 1369, 1452, 2335, 2334, 1451, 1450, + /* 2380 */ 2372, 1368, 1367, 353, 2336, 748, 2338, 2339, 743, 745, + /* 2390 */ 738, 1366, 1364, 1362, 1398, 1361, 1360, 2334, 2335, 1397, + /* 2400 */ 2372, 793, 207, 345, 2336, 748, 2338, 2339, 743, 795, + /* 2410 */ 738, 745, 1358, 2335, 1357, 1356, 1355, 2353, 1354, 1353, + /* 2420 */ 1352, 1392, 1349, 1394, 1343, 1348, 745, 1345, 1344, 2301, + /* 2430 */ 1342, 744, 1972, 815, 2335, 1970, 819, 816, 1968, 2353, + /* 2440 */ 817, 823, 821, 820, 1965, 825, 824, 745, 827, 829, + /* 2450 */ 1947, 2301, 828, 744, 2353, 831, 2335, 1283, 1921, 1271, + /* 2460 */ 835, 326, 837, 1891, 1654, 336, 2301, 840, 744, 745, + /* 2470 */ 2334, 2335, 1891, 2372, 841, 2353, 354, 2336, 748, 2338, + /* 2480 */ 2339, 743, 1891, 738, 745, 1891, 1891, 2301, 1891, 744, + /* 2490 */ 1891, 2335, 2334, 1891, 1891, 2372, 1891, 2353, 346, 2336, + /* 2500 */ 748, 2338, 2339, 743, 745, 738, 1891, 2334, 1891, 2301, + /* 2510 */ 2372, 744, 2353, 355, 2336, 748, 2338, 2339, 743, 1891, + /* 2520 */ 738, 1891, 1891, 1891, 2301, 1891, 744, 1891, 2334, 1891, + /* 2530 */ 1891, 2372, 2353, 1891, 347, 2336, 748, 2338, 2339, 743, + /* 2540 */ 1891, 738, 1891, 1891, 2301, 1891, 744, 1891, 1891, 1891, + /* 2550 */ 2334, 1891, 1891, 2372, 1891, 1891, 361, 2336, 748, 2338, + /* 2560 */ 2339, 743, 1891, 738, 1891, 2334, 1891, 1891, 2372, 1891, + /* 2570 */ 2335, 362, 2336, 748, 2338, 2339, 743, 1891, 738, 1891, + /* 2580 */ 1891, 1891, 1891, 745, 1891, 2334, 2335, 1891, 2372, 1891, + /* 2590 */ 1891, 2347, 2336, 748, 2338, 2339, 743, 1891, 738, 745, + /* 2600 */ 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, + /* 2610 */ 1891, 2353, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, + /* 2620 */ 1891, 1891, 1891, 2301, 1891, 744, 1891, 2353, 1891, 1891, + /* 2630 */ 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 2301, + /* 2640 */ 1891, 744, 1891, 2335, 1891, 1891, 1891, 1891, 1891, 1891, + /* 2650 */ 1891, 1891, 1891, 1891, 1891, 1891, 745, 1891, 1891, 1891, + /* 2660 */ 1891, 1891, 1891, 1891, 2334, 2335, 1891, 2372, 1891, 1891, + /* 2670 */ 2346, 2336, 748, 2338, 2339, 743, 1891, 738, 745, 1891, + /* 2680 */ 2334, 1891, 1891, 2372, 2353, 1891, 2345, 2336, 748, 2338, + /* 2690 */ 2339, 743, 1891, 738, 1891, 1891, 2301, 1891, 744, 1891, + /* 2700 */ 1891, 1891, 1891, 1891, 1891, 1891, 2353, 1891, 2335, 1891, + /* 2710 */ 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 2301, 1891, + /* 2720 */ 744, 745, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, + /* 2730 */ 1891, 1891, 1891, 1891, 1891, 1891, 1891, 2334, 2335, 1891, + /* 2740 */ 2372, 1891, 1891, 376, 2336, 748, 2338, 2339, 743, 2353, + /* 2750 */ 738, 745, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 2334, + /* 2760 */ 1891, 2301, 2372, 744, 1891, 377, 2336, 748, 2338, 2339, + /* 2770 */ 743, 1891, 738, 1891, 1891, 1891, 1891, 1891, 1891, 2353, + /* 2780 */ 1891, 2335, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, + /* 2790 */ 1891, 2301, 1891, 744, 745, 1891, 1891, 1891, 1891, 1891, + /* 2800 */ 1891, 1891, 2334, 2335, 1891, 2372, 1891, 1891, 373, 2336, + /* 2810 */ 748, 2338, 2339, 743, 1891, 738, 745, 1891, 1891, 1891, + /* 2820 */ 1891, 1891, 2353, 1891, 1891, 1891, 1891, 1891, 1891, 1891, + /* 2830 */ 1891, 1891, 2334, 1891, 2301, 2372, 744, 1891, 378, 2336, + /* 2840 */ 748, 2338, 2339, 743, 2353, 738, 1891, 1891, 1891, 1891, + /* 2850 */ 1891, 1891, 1891, 1891, 1891, 1891, 2301, 1891, 744, 1891, + /* 2860 */ 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, + /* 2870 */ 1891, 1891, 1891, 1891, 1891, 746, 1891, 1891, 2372, 1891, + /* 2880 */ 1891, 352, 2336, 748, 2338, 2339, 743, 1891, 738, 1891, + /* 2890 */ 1891, 1891, 1891, 1891, 1891, 1891, 1891, 2334, 1891, 1891, + /* 2900 */ 2372, 1891, 1891, 351, 2336, 748, 2338, 2339, 743, 1891, + /* 2910 */ 738, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 383, 357, 432, 383, 360, 361, 357, 392, 391, 360, - /* 10 */ 361, 391, 12, 13, 14, 405, 399, 2, 398, 399, - /* 20 */ 20, 362, 22, 8, 9, 20, 406, 12, 13, 14, - /* 30 */ 15, 16, 2, 423, 424, 35, 0, 37, 8, 9, - /* 40 */ 465, 466, 12, 13, 14, 15, 16, 350, 8, 9, - /* 50 */ 362, 363, 12, 13, 14, 15, 16, 362, 363, 20, - /* 60 */ 363, 391, 404, 405, 64, 0, 407, 408, 401, 410, - /* 70 */ 70, 404, 405, 414, 8, 9, 372, 77, 12, 13, - /* 80 */ 14, 15, 16, 413, 380, 415, 21, 371, 391, 24, - /* 90 */ 25, 26, 27, 28, 29, 30, 31, 32, 20, 411, - /* 100 */ 403, 358, 405, 103, 388, 362, 106, 364, 72, 73, - /* 110 */ 74, 75, 76, 397, 78, 79, 80, 81, 82, 83, + /* 0 */ 384, 358, 433, 384, 361, 362, 358, 393, 392, 361, + /* 10 */ 362, 392, 12, 13, 14, 406, 400, 2, 399, 400, + /* 20 */ 20, 363, 22, 8, 9, 20, 407, 12, 13, 14, + /* 30 */ 15, 16, 2, 424, 425, 35, 0, 37, 8, 9, + /* 40 */ 466, 467, 12, 13, 14, 15, 16, 351, 8, 9, + /* 50 */ 363, 364, 12, 13, 14, 15, 16, 363, 364, 20, + /* 60 */ 364, 392, 405, 406, 64, 0, 408, 409, 402, 411, + /* 70 */ 70, 405, 406, 415, 8, 9, 373, 77, 12, 13, + /* 80 */ 14, 15, 16, 414, 381, 416, 21, 372, 392, 24, + /* 90 */ 25, 26, 27, 28, 29, 30, 31, 32, 20, 412, + /* 100 */ 404, 359, 406, 103, 389, 363, 106, 365, 72, 73, + /* 110 */ 74, 75, 76, 398, 78, 79, 80, 81, 82, 83, /* 120 */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - /* 130 */ 94, 95, 96, 97, 98, 99, 476, 362, 363, 479, - /* 140 */ 22, 444, 142, 143, 447, 363, 391, 450, 451, 452, - /* 150 */ 453, 454, 455, 460, 457, 37, 463, 497, 498, 462, - /* 160 */ 69, 464, 502, 503, 4, 468, 469, 472, 473, 474, - /* 170 */ 415, 476, 477, 391, 479, 362, 363, 177, 178, 449, - /* 180 */ 483, 142, 143, 23, 184, 185, 411, 20, 491, 391, - /* 190 */ 20, 20, 497, 498, 405, 77, 398, 502, 503, 199, - /* 200 */ 349, 201, 351, 3, 406, 475, 46, 47, 48, 420, - /* 210 */ 8, 9, 423, 424, 12, 13, 14, 15, 16, 21, + /* 130 */ 94, 95, 96, 97, 98, 99, 477, 363, 364, 480, + /* 140 */ 22, 445, 142, 143, 448, 22, 392, 451, 452, 453, + /* 150 */ 454, 455, 456, 461, 458, 37, 464, 498, 499, 463, + /* 160 */ 37, 465, 503, 504, 4, 469, 470, 473, 474, 475, + /* 170 */ 416, 477, 478, 20, 480, 363, 364, 177, 178, 51, + /* 180 */ 484, 142, 143, 23, 184, 185, 412, 59, 492, 392, + /* 190 */ 62, 63, 498, 499, 406, 77, 399, 503, 504, 199, + /* 200 */ 77, 201, 379, 3, 407, 382, 46, 47, 48, 421, + /* 210 */ 8, 9, 424, 425, 12, 13, 14, 15, 16, 21, /* 220 */ 20, 103, 24, 25, 26, 27, 28, 29, 30, 31, - /* 230 */ 32, 231, 232, 233, 452, 235, 236, 237, 238, 239, + /* 230 */ 32, 231, 232, 233, 20, 235, 236, 237, 238, 239, /* 240 */ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, - /* 250 */ 250, 251, 252, 12, 13, 177, 178, 191, 18, 183, - /* 260 */ 20, 20, 20, 22, 22, 362, 363, 27, 22, 350, - /* 270 */ 30, 20, 70, 106, 476, 35, 35, 479, 37, 37, - /* 280 */ 379, 20, 363, 37, 471, 472, 473, 474, 137, 476, - /* 290 */ 477, 51, 141, 53, 393, 497, 498, 55, 58, 476, - /* 300 */ 502, 503, 479, 369, 403, 64, 0, 107, 68, 14, - /* 310 */ 391, 70, 142, 143, 411, 20, 114, 199, 77, 201, - /* 320 */ 386, 498, 403, 77, 405, 502, 503, 350, 394, 390, - /* 330 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 135, - /* 340 */ 363, 402, 365, 139, 103, 105, 20, 106, 447, 231, - /* 350 */ 232, 275, 276, 277, 184, 185, 116, 106, 457, 208, - /* 360 */ 362, 295, 211, 444, 0, 214, 447, 216, 391, 450, - /* 370 */ 451, 452, 453, 454, 455, 20, 457, 50, 176, 179, - /* 380 */ 403, 369, 405, 142, 143, 350, 146, 147, 0, 149, + /* 250 */ 250, 251, 252, 12, 13, 177, 178, 191, 18, 106, + /* 260 */ 20, 20, 20, 22, 22, 20, 392, 27, 391, 351, + /* 270 */ 30, 20, 70, 399, 477, 35, 35, 480, 37, 37, + /* 280 */ 403, 407, 364, 450, 472, 473, 474, 475, 359, 477, + /* 290 */ 478, 51, 363, 53, 365, 498, 499, 55, 58, 380, + /* 300 */ 503, 504, 64, 363, 364, 64, 0, 107, 68, 476, + /* 310 */ 392, 70, 350, 394, 352, 4, 114, 199, 77, 201, + /* 320 */ 136, 137, 404, 404, 406, 141, 176, 351, 363, 364, + /* 330 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 106, + /* 340 */ 364, 37, 366, 105, 103, 105, 108, 106, 383, 231, + /* 350 */ 232, 106, 412, 8, 9, 390, 116, 12, 13, 14, + /* 360 */ 15, 16, 296, 445, 13, 20, 448, 448, 392, 451, + /* 370 */ 452, 453, 454, 455, 456, 68, 458, 458, 176, 179, + /* 380 */ 404, 77, 406, 142, 143, 351, 146, 147, 37, 149, /* 390 */ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - /* 400 */ 160, 161, 162, 163, 164, 165, 394, 167, 168, 169, - /* 410 */ 22, 492, 493, 173, 174, 175, 418, 419, 177, 178, - /* 420 */ 180, 444, 20, 116, 447, 184, 185, 450, 451, 452, - /* 430 */ 453, 454, 455, 69, 457, 20, 269, 21, 403, 462, - /* 440 */ 199, 464, 201, 8, 9, 468, 469, 12, 13, 14, - /* 450 */ 15, 16, 36, 77, 38, 39, 40, 426, 256, 257, - /* 460 */ 258, 259, 260, 261, 262, 263, 264, 265, 266, 69, - /* 470 */ 136, 137, 231, 232, 233, 141, 235, 236, 237, 238, + /* 400 */ 160, 161, 162, 163, 164, 165, 256, 167, 168, 169, + /* 410 */ 172, 493, 494, 173, 174, 175, 266, 106, 177, 178, + /* 420 */ 180, 445, 269, 20, 448, 184, 185, 451, 452, 453, + /* 430 */ 454, 455, 456, 20, 458, 106, 363, 21, 404, 463, + /* 440 */ 199, 465, 201, 8, 9, 469, 470, 12, 13, 14, + /* 450 */ 15, 16, 36, 13, 38, 39, 40, 33, 256, 257, + /* 460 */ 258, 259, 260, 261, 262, 263, 264, 265, 266, 45, + /* 470 */ 364, 183, 231, 232, 233, 363, 235, 236, 237, 238, /* 480 */ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, - /* 490 */ 249, 250, 251, 252, 253, 12, 13, 35, 358, 350, - /* 500 */ 20, 22, 362, 20, 364, 22, 179, 476, 106, 350, - /* 510 */ 479, 106, 363, 51, 187, 253, 37, 4, 35, 51, - /* 520 */ 37, 59, 60, 61, 62, 64, 64, 59, 497, 498, - /* 530 */ 62, 63, 350, 502, 503, 350, 33, 72, 73, 74, - /* 540 */ 391, 362, 107, 86, 79, 80, 81, 64, 363, 362, - /* 550 */ 85, 0, 403, 70, 405, 90, 91, 92, 93, 233, - /* 560 */ 77, 96, 403, 33, 99, 476, 105, 105, 479, 108, - /* 570 */ 108, 56, 57, 8, 9, 45, 391, 12, 13, 14, - /* 580 */ 15, 16, 103, 12, 13, 403, 103, 498, 403, 106, - /* 590 */ 405, 502, 503, 444, 179, 20, 447, 22, 33, 450, - /* 600 */ 451, 452, 453, 454, 455, 148, 457, 379, 37, 460, - /* 610 */ 107, 462, 463, 464, 14, 436, 437, 468, 469, 106, - /* 620 */ 20, 393, 116, 436, 437, 142, 143, 170, 171, 444, - /* 630 */ 55, 403, 447, 172, 172, 450, 451, 452, 453, 454, - /* 640 */ 455, 391, 457, 181, 182, 367, 368, 462, 398, 464, - /* 650 */ 188, 189, 34, 468, 469, 449, 406, 177, 8, 9, - /* 660 */ 177, 178, 12, 13, 14, 15, 16, 184, 185, 207, - /* 670 */ 33, 269, 107, 14, 269, 447, 491, 0, 0, 20, - /* 680 */ 103, 475, 199, 392, 201, 457, 135, 136, 137, 138, - /* 690 */ 139, 140, 141, 106, 117, 118, 119, 120, 121, 122, - /* 700 */ 123, 124, 125, 126, 391, 128, 129, 130, 131, 132, - /* 710 */ 133, 134, 399, 233, 231, 232, 233, 172, 235, 236, + /* 490 */ 249, 250, 251, 252, 253, 12, 13, 401, 392, 351, + /* 500 */ 404, 194, 269, 20, 20, 22, 363, 364, 392, 35, + /* 510 */ 437, 438, 364, 380, 269, 399, 106, 77, 35, 106, + /* 520 */ 37, 363, 364, 407, 179, 51, 383, 394, 221, 222, + /* 530 */ 351, 419, 420, 59, 60, 61, 62, 404, 64, 20, + /* 540 */ 392, 383, 107, 364, 427, 142, 143, 64, 390, 72, + /* 550 */ 73, 74, 404, 70, 406, 69, 79, 80, 81, 453, + /* 560 */ 77, 69, 85, 275, 276, 277, 278, 90, 91, 92, + /* 570 */ 93, 392, 116, 96, 86, 351, 99, 392, 233, 105, + /* 580 */ 269, 448, 108, 404, 399, 406, 103, 184, 185, 106, + /* 590 */ 20, 458, 407, 445, 477, 0, 448, 480, 269, 451, + /* 600 */ 452, 453, 454, 455, 456, 380, 458, 392, 198, 461, + /* 610 */ 200, 463, 464, 465, 399, 498, 499, 469, 470, 394, + /* 620 */ 503, 504, 407, 253, 445, 142, 143, 448, 404, 404, + /* 630 */ 451, 452, 453, 454, 455, 456, 148, 458, 0, 14, + /* 640 */ 230, 20, 463, 135, 465, 20, 172, 139, 469, 470, + /* 650 */ 363, 364, 370, 363, 364, 181, 182, 231, 170, 171, + /* 660 */ 177, 178, 188, 189, 69, 363, 364, 184, 185, 387, + /* 670 */ 383, 492, 14, 448, 449, 103, 137, 395, 20, 269, + /* 680 */ 141, 207, 199, 458, 201, 383, 14, 15, 16, 117, + /* 690 */ 118, 119, 120, 121, 122, 123, 124, 125, 126, 77, + /* 700 */ 128, 129, 130, 131, 132, 133, 134, 281, 282, 283, + /* 710 */ 284, 285, 286, 287, 231, 232, 233, 233, 235, 236, /* 720 */ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, - /* 730 */ 247, 248, 249, 250, 251, 252, 12, 13, 14, 392, - /* 740 */ 350, 14, 15, 16, 20, 391, 22, 350, 203, 72, - /* 750 */ 73, 74, 398, 363, 231, 365, 79, 80, 81, 35, - /* 760 */ 406, 37, 85, 362, 363, 362, 363, 90, 91, 92, - /* 770 */ 93, 350, 201, 96, 362, 363, 99, 177, 347, 0, - /* 780 */ 42, 391, 269, 382, 363, 382, 365, 392, 64, 253, - /* 790 */ 389, 255, 389, 403, 382, 405, 367, 368, 68, 449, - /* 800 */ 403, 77, 350, 280, 281, 282, 283, 284, 285, 286, - /* 810 */ 426, 392, 391, 8, 9, 431, 391, 12, 13, 14, - /* 820 */ 15, 16, 14, 398, 403, 475, 405, 103, 20, 179, - /* 830 */ 106, 406, 392, 233, 444, 350, 177, 447, 350, 161, - /* 840 */ 450, 451, 452, 453, 454, 455, 391, 457, 170, 362, - /* 850 */ 363, 363, 462, 398, 464, 403, 269, 426, 468, 469, - /* 860 */ 476, 406, 431, 479, 3, 444, 142, 143, 447, 382, - /* 870 */ 392, 450, 451, 452, 453, 454, 455, 426, 457, 391, - /* 880 */ 371, 497, 498, 462, 350, 464, 502, 503, 403, 468, - /* 890 */ 469, 403, 233, 405, 135, 136, 137, 138, 139, 140, - /* 900 */ 141, 177, 178, 362, 363, 383, 397, 476, 184, 185, - /* 910 */ 479, 391, 107, 391, 135, 136, 137, 138, 139, 140, - /* 920 */ 141, 399, 49, 199, 194, 201, 406, 476, 497, 498, - /* 930 */ 479, 294, 444, 502, 503, 447, 0, 403, 450, 451, - /* 940 */ 452, 453, 454, 455, 456, 457, 458, 459, 497, 498, - /* 950 */ 176, 221, 222, 502, 503, 231, 232, 233, 22, 235, + /* 730 */ 247, 248, 249, 250, 251, 252, 12, 13, 14, 351, + /* 740 */ 363, 364, 363, 364, 20, 0, 22, 208, 1, 179, + /* 750 */ 211, 20, 364, 214, 366, 216, 253, 363, 255, 35, + /* 760 */ 383, 37, 383, 473, 474, 475, 19, 477, 478, 477, + /* 770 */ 64, 351, 480, 135, 136, 137, 138, 139, 140, 141, + /* 780 */ 392, 0, 35, 462, 364, 464, 366, 401, 64, 384, + /* 790 */ 404, 499, 404, 49, 406, 503, 504, 392, 51, 450, + /* 800 */ 179, 77, 384, 233, 116, 400, 59, 60, 61, 62, + /* 810 */ 392, 64, 392, 23, 108, 8, 9, 351, 400, 12, + /* 820 */ 13, 14, 15, 16, 404, 476, 406, 103, 363, 364, + /* 830 */ 106, 437, 438, 445, 20, 177, 448, 47, 48, 451, + /* 840 */ 452, 453, 454, 455, 456, 351, 458, 351, 56, 57, + /* 850 */ 106, 463, 105, 465, 233, 108, 14, 469, 470, 12, + /* 860 */ 13, 50, 20, 368, 369, 445, 142, 143, 448, 22, + /* 870 */ 404, 451, 452, 453, 454, 455, 456, 477, 458, 462, + /* 880 */ 480, 464, 35, 463, 37, 465, 34, 140, 351, 469, + /* 890 */ 470, 233, 351, 12, 13, 14, 15, 16, 404, 499, + /* 900 */ 404, 177, 178, 503, 504, 364, 161, 366, 184, 185, + /* 910 */ 179, 64, 12, 13, 107, 170, 135, 136, 137, 138, + /* 920 */ 139, 140, 141, 199, 77, 201, 363, 364, 181, 363, + /* 930 */ 364, 363, 364, 392, 348, 188, 392, 37, 473, 474, + /* 940 */ 475, 404, 477, 478, 400, 404, 383, 406, 3, 383, + /* 950 */ 103, 383, 351, 393, 207, 231, 232, 233, 393, 235, /* 960 */ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, - /* 970 */ 246, 247, 248, 249, 250, 251, 252, 12, 13, 106, - /* 980 */ 350, 362, 363, 22, 426, 20, 37, 22, 350, 1, - /* 990 */ 362, 363, 461, 363, 463, 365, 362, 363, 37, 136, - /* 1000 */ 35, 382, 37, 383, 362, 363, 268, 19, 376, 377, - /* 1010 */ 382, 391, 350, 472, 473, 474, 382, 476, 477, 399, - /* 1020 */ 0, 391, 379, 35, 382, 363, 77, 365, 37, 64, - /* 1030 */ 256, 362, 363, 403, 476, 405, 393, 479, 4, 51, - /* 1040 */ 266, 403, 77, 362, 363, 64, 403, 59, 60, 61, - /* 1050 */ 62, 382, 64, 391, 13, 497, 498, 387, 362, 363, - /* 1060 */ 502, 503, 42, 382, 103, 403, 380, 405, 103, 362, - /* 1070 */ 363, 106, 350, 4, 444, 212, 213, 447, 382, 20, - /* 1080 */ 450, 451, 452, 453, 454, 455, 426, 457, 19, 108, - /* 1090 */ 447, 448, 462, 105, 464, 20, 108, 20, 468, 469, - /* 1100 */ 457, 362, 363, 0, 35, 351, 444, 142, 143, 447, - /* 1110 */ 23, 441, 450, 451, 452, 453, 454, 455, 77, 457, - /* 1120 */ 51, 382, 20, 33, 462, 403, 464, 58, 140, 378, - /* 1130 */ 468, 469, 381, 64, 47, 48, 476, 376, 377, 479, - /* 1140 */ 8, 9, 177, 178, 12, 13, 14, 15, 16, 184, - /* 1150 */ 185, 290, 20, 39, 40, 362, 363, 497, 498, 461, - /* 1160 */ 33, 463, 502, 503, 199, 400, 201, 391, 403, 181, - /* 1170 */ 350, 362, 363, 391, 105, 382, 188, 108, 106, 472, - /* 1180 */ 473, 474, 406, 476, 477, 1, 2, 115, 406, 426, - /* 1190 */ 106, 382, 201, 350, 350, 207, 231, 232, 233, 350, + /* 970 */ 246, 247, 248, 249, 250, 251, 252, 12, 13, 351, + /* 980 */ 351, 363, 364, 363, 364, 20, 445, 22, 351, 448, + /* 990 */ 179, 177, 451, 452, 453, 454, 455, 456, 187, 458, + /* 1000 */ 35, 383, 37, 383, 463, 404, 465, 22, 363, 364, + /* 1010 */ 469, 470, 351, 427, 363, 364, 377, 378, 432, 177, + /* 1020 */ 363, 364, 37, 363, 364, 364, 4, 366, 383, 64, + /* 1030 */ 363, 364, 404, 404, 383, 20, 20, 22, 368, 369, + /* 1040 */ 383, 404, 77, 383, 363, 364, 199, 233, 201, 370, + /* 1050 */ 383, 8, 9, 392, 14, 12, 13, 14, 15, 16, + /* 1060 */ 20, 363, 364, 477, 383, 404, 480, 406, 103, 136, + /* 1070 */ 55, 106, 1, 2, 395, 233, 22, 450, 231, 232, + /* 1080 */ 0, 383, 363, 364, 498, 499, 351, 351, 103, 503, + /* 1090 */ 504, 37, 245, 246, 247, 248, 249, 250, 251, 364, + /* 1100 */ 393, 201, 383, 476, 42, 351, 445, 142, 143, 448, + /* 1110 */ 377, 378, 451, 452, 453, 454, 455, 456, 372, 458, + /* 1120 */ 172, 351, 401, 33, 463, 404, 465, 392, 351, 351, + /* 1130 */ 469, 470, 135, 136, 137, 138, 139, 140, 141, 404, + /* 1140 */ 404, 406, 177, 178, 398, 212, 213, 392, 392, 184, + /* 1150 */ 185, 203, 72, 73, 74, 354, 355, 103, 404, 79, + /* 1160 */ 80, 81, 407, 407, 199, 85, 201, 20, 351, 0, + /* 1170 */ 90, 91, 92, 93, 404, 388, 96, 33, 107, 99, + /* 1180 */ 445, 404, 404, 448, 351, 351, 451, 452, 453, 454, + /* 1190 */ 455, 456, 457, 458, 459, 460, 231, 232, 233, 351, /* 1200 */ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, /* 1210 */ 245, 246, 247, 248, 249, 250, 251, 252, 12, 13, - /* 1220 */ 362, 363, 350, 403, 110, 111, 20, 113, 22, 12, - /* 1230 */ 13, 14, 15, 16, 107, 363, 350, 365, 179, 476, - /* 1240 */ 382, 35, 479, 37, 362, 363, 403, 403, 350, 135, - /* 1250 */ 350, 350, 403, 139, 362, 363, 362, 363, 362, 363, - /* 1260 */ 497, 498, 0, 391, 382, 502, 503, 362, 363, 400, - /* 1270 */ 64, 116, 403, 70, 382, 403, 382, 405, 382, 350, - /* 1280 */ 350, 179, 198, 77, 200, 400, 416, 382, 403, 403, - /* 1290 */ 384, 107, 233, 387, 353, 354, 109, 267, 268, 112, - /* 1300 */ 215, 403, 217, 403, 403, 271, 33, 33, 233, 103, - /* 1310 */ 233, 179, 106, 51, 230, 37, 444, 350, 45, 447, - /* 1320 */ 13, 166, 450, 451, 452, 453, 454, 455, 225, 457, - /* 1330 */ 363, 0, 403, 403, 462, 233, 464, 12, 13, 109, - /* 1340 */ 468, 469, 112, 109, 37, 13, 112, 22, 142, 143, - /* 1350 */ 495, 109, 0, 269, 112, 13, 33, 37, 391, 33, - /* 1360 */ 35, 13, 37, 506, 33, 233, 33, 142, 143, 37, - /* 1370 */ 403, 366, 405, 391, 22, 488, 1, 2, 379, 37, - /* 1380 */ 0, 107, 292, 177, 178, 37, 379, 33, 33, 64, - /* 1390 */ 184, 185, 33, 33, 33, 416, 33, 77, 33, 33, - /* 1400 */ 33, 33, 77, 33, 33, 199, 33, 201, 361, 416, - /* 1410 */ 33, 444, 494, 494, 447, 494, 494, 450, 451, 452, - /* 1420 */ 453, 454, 455, 425, 457, 416, 366, 363, 103, 462, - /* 1430 */ 107, 464, 52, 107, 231, 468, 469, 231, 232, 233, + /* 1220 */ 351, 404, 179, 267, 268, 4, 20, 392, 22, 442, + /* 1230 */ 0, 385, 0, 364, 388, 366, 291, 404, 404, 427, + /* 1240 */ 19, 35, 407, 37, 432, 33, 116, 0, 215, 233, + /* 1250 */ 217, 107, 404, 351, 13, 109, 35, 45, 112, 109, + /* 1260 */ 109, 392, 112, 112, 109, 0, 364, 112, 0, 0, + /* 1270 */ 64, 70, 51, 404, 42, 406, 33, 33, 37, 58, + /* 1280 */ 33, 51, 393, 77, 393, 64, 393, 22, 33, 477, + /* 1290 */ 22, 22, 480, 271, 392, 33, 166, 1, 2, 33, + /* 1300 */ 33, 142, 143, 33, 33, 33, 404, 33, 406, 103, + /* 1310 */ 498, 499, 106, 33, 445, 503, 504, 448, 0, 33, + /* 1320 */ 451, 452, 453, 454, 455, 456, 105, 458, 33, 108, + /* 1330 */ 268, 37, 463, 381, 465, 33, 8, 9, 469, 470, + /* 1340 */ 12, 13, 14, 15, 16, 427, 37, 445, 142, 143, + /* 1350 */ 448, 107, 13, 451, 452, 453, 454, 455, 456, 106, + /* 1360 */ 458, 33, 107, 352, 37, 463, 33, 465, 115, 107, + /* 1370 */ 52, 469, 470, 107, 107, 13, 37, 107, 107, 107, + /* 1380 */ 233, 107, 507, 177, 178, 295, 77, 107, 33, 417, + /* 1390 */ 184, 185, 496, 107, 225, 477, 33, 489, 480, 37, + /* 1400 */ 33, 367, 107, 380, 392, 199, 380, 201, 417, 107, + /* 1410 */ 362, 417, 495, 427, 33, 495, 498, 499, 33, 495, + /* 1420 */ 351, 503, 504, 495, 426, 367, 417, 427, 364, 434, + /* 1430 */ 403, 417, 231, 364, 417, 107, 479, 231, 232, 233, /* 1440 */ 107, 235, 236, 237, 238, 239, 240, 241, 242, 243, - /* 1450 */ 244, 245, 246, 247, 248, 249, 250, 251, 252, 402, - /* 1460 */ 18, 107, 107, 478, 433, 23, 107, 107, 107, 416, - /* 1470 */ 107, 416, 107, 107, 107, 107, 499, 107, 107, 201, - /* 1480 */ 107, 470, 40, 41, 107, 481, 44, 381, 272, 427, - /* 1490 */ 51, 446, 42, 445, 20, 214, 54, 443, 197, 438, - /* 1500 */ 350, 371, 371, 438, 20, 429, 362, 65, 66, 67, - /* 1510 */ 68, 20, 363, 363, 45, 363, 412, 412, 409, 176, - /* 1520 */ 362, 409, 363, 362, 199, 412, 201, 409, 104, 375, - /* 1530 */ 102, 374, 362, 101, 362, 373, 362, 362, 20, 50, - /* 1540 */ 355, 391, 359, 355, 371, 359, 438, 371, 106, 20, - /* 1550 */ 405, 371, 20, 403, 364, 405, 231, 232, 20, 364, - /* 1560 */ 371, 428, 371, 20, 371, 419, 362, 371, 371, 355, - /* 1570 */ 245, 246, 247, 248, 249, 250, 251, 353, 355, 353, - /* 1580 */ 362, 403, 403, 391, 403, 391, 144, 218, 106, 391, - /* 1590 */ 391, 391, 391, 391, 444, 442, 391, 447, 391, 391, - /* 1600 */ 450, 451, 452, 453, 454, 455, 391, 457, 440, 438, - /* 1610 */ 369, 20, 462, 205, 464, 204, 405, 435, 468, 469, - /* 1620 */ 369, 362, 403, 279, 487, 278, 350, 487, 287, 490, - /* 1630 */ 190, 489, 485, 191, 192, 193, 296, 486, 196, 363, - /* 1640 */ 427, 421, 421, 487, 434, 289, 437, 273, 484, 427, - /* 1650 */ 288, 209, 210, 268, 363, 507, 20, 293, 116, 482, - /* 1660 */ 350, 501, 220, 291, 270, 223, 500, 391, 226, 227, - /* 1670 */ 228, 229, 230, 363, 369, 364, 449, 369, 421, 403, - /* 1680 */ 403, 405, 403, 403, 421, 403, 403, 182, 417, 387, - /* 1690 */ 369, 369, 480, 363, 106, 467, 106, 403, 395, 362, - /* 1700 */ 22, 391, 352, 369, 38, 356, 355, 439, 422, 422, - /* 1710 */ 0, 269, 385, 403, 430, 405, 370, 0, 0, 45, - /* 1720 */ 444, 385, 0, 447, 385, 37, 450, 451, 452, 453, - /* 1730 */ 454, 455, 224, 457, 350, 348, 37, 37, 462, 37, - /* 1740 */ 464, 224, 0, 37, 468, 469, 37, 363, 224, 37, - /* 1750 */ 0, 0, 224, 37, 444, 0, 37, 447, 0, 22, - /* 1760 */ 450, 451, 452, 453, 454, 455, 0, 457, 350, 37, - /* 1770 */ 219, 0, 207, 0, 464, 391, 207, 201, 468, 469, - /* 1780 */ 208, 363, 199, 0, 0, 0, 194, 403, 195, 405, - /* 1790 */ 0, 0, 147, 49, 49, 0, 37, 0, 0, 37, - /* 1800 */ 51, 350, 0, 49, 0, 45, 0, 0, 0, 391, - /* 1810 */ 49, 0, 0, 0, 363, 0, 0, 0, 161, 37, - /* 1820 */ 0, 403, 161, 405, 0, 0, 0, 0, 444, 49, - /* 1830 */ 0, 447, 0, 0, 450, 451, 452, 453, 454, 455, - /* 1840 */ 0, 457, 391, 0, 0, 0, 0, 0, 464, 146, - /* 1850 */ 45, 0, 468, 469, 403, 0, 405, 0, 0, 0, - /* 1860 */ 0, 0, 444, 0, 0, 447, 0, 0, 450, 451, - /* 1870 */ 452, 453, 454, 455, 0, 457, 22, 350, 0, 0, - /* 1880 */ 147, 0, 464, 145, 0, 0, 468, 469, 50, 50, - /* 1890 */ 363, 22, 22, 0, 0, 444, 0, 0, 447, 64, - /* 1900 */ 64, 450, 451, 452, 453, 454, 455, 350, 457, 0, - /* 1910 */ 37, 0, 64, 37, 37, 0, 51, 42, 391, 51, - /* 1920 */ 363, 0, 42, 37, 0, 42, 37, 14, 33, 0, - /* 1930 */ 403, 0, 405, 51, 42, 45, 0, 49, 0, 0, - /* 1940 */ 49, 0, 43, 42, 42, 0, 190, 49, 391, 49, - /* 1950 */ 0, 0, 0, 37, 51, 504, 505, 0, 51, 42, - /* 1960 */ 403, 42, 405, 37, 0, 37, 0, 42, 0, 51, - /* 1970 */ 37, 444, 42, 51, 447, 71, 0, 450, 451, 452, - /* 1980 */ 453, 454, 455, 0, 457, 350, 0, 0, 0, 22, - /* 1990 */ 37, 464, 0, 37, 33, 37, 469, 37, 363, 37, - /* 2000 */ 37, 444, 350, 33, 447, 0, 37, 450, 451, 452, - /* 2010 */ 453, 454, 455, 22, 457, 363, 37, 112, 37, 350, - /* 2020 */ 22, 37, 114, 0, 22, 53, 391, 37, 0, 22, - /* 2030 */ 37, 396, 363, 37, 0, 0, 0, 37, 403, 0, - /* 2040 */ 405, 37, 0, 391, 22, 20, 37, 37, 396, 37, - /* 2050 */ 493, 107, 106, 0, 106, 403, 206, 405, 0, 22, - /* 2060 */ 391, 37, 49, 0, 202, 22, 0, 0, 3, 50, - /* 2070 */ 274, 33, 403, 33, 405, 274, 50, 106, 104, 444, - /* 2080 */ 107, 106, 447, 33, 350, 450, 451, 452, 453, 454, - /* 2090 */ 455, 179, 457, 179, 33, 106, 444, 363, 49, 447, - /* 2100 */ 49, 107, 450, 451, 452, 453, 454, 455, 102, 457, - /* 2110 */ 107, 179, 33, 444, 350, 107, 447, 182, 107, 450, - /* 2120 */ 451, 452, 453, 454, 455, 391, 457, 363, 179, 186, - /* 2130 */ 3, 33, 37, 179, 107, 106, 106, 403, 106, 405, - /* 2140 */ 37, 186, 37, 37, 37, 274, 37, 33, 107, 49, - /* 2150 */ 49, 107, 0, 0, 106, 391, 0, 42, 106, 42, - /* 2160 */ 396, 107, 107, 106, 33, 496, 106, 403, 183, 405, - /* 2170 */ 106, 115, 49, 104, 106, 104, 181, 267, 444, 350, - /* 2180 */ 2, 447, 22, 106, 450, 451, 452, 453, 454, 455, - /* 2190 */ 231, 457, 363, 107, 254, 106, 49, 107, 106, 350, - /* 2200 */ 107, 107, 106, 49, 22, 106, 37, 116, 444, 107, - /* 2210 */ 106, 447, 363, 37, 450, 451, 452, 453, 454, 455, - /* 2220 */ 391, 457, 350, 107, 106, 37, 106, 37, 107, 107, - /* 2230 */ 106, 234, 403, 37, 405, 363, 106, 350, 37, 505, - /* 2240 */ 391, 107, 106, 37, 107, 396, 127, 106, 106, 33, - /* 2250 */ 363, 106, 403, 127, 405, 127, 350, 37, 22, 127, - /* 2260 */ 71, 106, 70, 391, 37, 37, 37, 37, 396, 363, - /* 2270 */ 77, 37, 37, 444, 37, 403, 447, 405, 391, 450, - /* 2280 */ 451, 452, 453, 454, 455, 37, 457, 37, 459, 77, - /* 2290 */ 403, 100, 405, 444, 100, 33, 447, 391, 37, 450, - /* 2300 */ 451, 452, 453, 454, 455, 37, 457, 37, 22, 403, - /* 2310 */ 37, 405, 37, 0, 37, 77, 444, 37, 37, 447, - /* 2320 */ 37, 37, 450, 451, 452, 453, 454, 455, 22, 457, - /* 2330 */ 350, 444, 37, 37, 447, 37, 51, 450, 451, 452, - /* 2340 */ 453, 454, 455, 363, 457, 42, 0, 37, 51, 350, - /* 2350 */ 444, 42, 0, 447, 37, 51, 450, 451, 452, 453, - /* 2360 */ 454, 455, 363, 457, 42, 350, 0, 37, 42, 51, - /* 2370 */ 0, 391, 37, 37, 0, 22, 33, 22, 363, 21, - /* 2380 */ 508, 22, 22, 403, 21, 405, 508, 20, 508, 508, - /* 2390 */ 391, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2400 */ 508, 508, 403, 508, 405, 508, 391, 508, 508, 508, - /* 2410 */ 508, 508, 508, 508, 508, 508, 508, 508, 403, 508, - /* 2420 */ 405, 508, 508, 350, 444, 508, 508, 447, 508, 508, - /* 2430 */ 450, 451, 452, 453, 454, 455, 363, 457, 508, 508, - /* 2440 */ 508, 508, 508, 444, 508, 508, 447, 350, 508, 450, - /* 2450 */ 451, 452, 453, 454, 455, 508, 457, 508, 508, 444, - /* 2460 */ 363, 508, 447, 508, 391, 450, 451, 452, 453, 454, - /* 2470 */ 455, 508, 457, 508, 508, 508, 403, 508, 405, 508, - /* 2480 */ 508, 508, 508, 508, 508, 508, 508, 508, 391, 508, - /* 2490 */ 350, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2500 */ 403, 508, 405, 363, 508, 508, 508, 508, 508, 508, - /* 2510 */ 508, 508, 508, 508, 508, 508, 350, 444, 508, 508, - /* 2520 */ 447, 508, 508, 450, 451, 452, 453, 454, 455, 363, - /* 2530 */ 457, 391, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2540 */ 508, 444, 508, 403, 447, 405, 508, 450, 451, 452, - /* 2550 */ 453, 454, 455, 508, 457, 508, 508, 391, 508, 350, - /* 2560 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 403, - /* 2570 */ 508, 405, 363, 508, 508, 508, 508, 508, 508, 508, - /* 2580 */ 508, 508, 508, 350, 444, 508, 508, 447, 508, 508, - /* 2590 */ 450, 451, 452, 453, 454, 455, 363, 457, 508, 508, - /* 2600 */ 391, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2610 */ 444, 508, 403, 447, 405, 508, 450, 451, 452, 453, - /* 2620 */ 454, 455, 508, 457, 391, 508, 350, 508, 508, 508, - /* 2630 */ 508, 508, 508, 508, 508, 508, 403, 508, 405, 363, - /* 2640 */ 508, 350, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2650 */ 508, 508, 508, 444, 363, 508, 447, 350, 508, 450, - /* 2660 */ 451, 452, 453, 454, 455, 508, 457, 391, 508, 508, - /* 2670 */ 363, 508, 508, 508, 508, 508, 508, 444, 508, 403, - /* 2680 */ 447, 405, 391, 450, 451, 452, 453, 454, 455, 508, - /* 2690 */ 457, 508, 508, 508, 403, 508, 405, 508, 391, 508, - /* 2700 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2710 */ 403, 508, 405, 508, 508, 508, 508, 508, 508, 508, - /* 2720 */ 444, 508, 508, 447, 508, 508, 450, 451, 452, 453, - /* 2730 */ 454, 455, 508, 457, 350, 444, 508, 508, 447, 508, - /* 2740 */ 508, 450, 451, 452, 453, 454, 455, 363, 457, 508, - /* 2750 */ 508, 444, 508, 350, 447, 508, 508, 450, 451, 452, - /* 2760 */ 453, 454, 455, 508, 457, 508, 363, 508, 508, 350, - /* 2770 */ 508, 508, 508, 508, 508, 391, 508, 508, 508, 508, - /* 2780 */ 508, 508, 363, 508, 508, 508, 508, 403, 508, 405, - /* 2790 */ 508, 508, 508, 508, 391, 508, 508, 508, 508, 508, - /* 2800 */ 508, 508, 508, 508, 508, 508, 403, 508, 405, 508, - /* 2810 */ 391, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2820 */ 508, 508, 403, 508, 405, 508, 508, 350, 444, 508, - /* 2830 */ 508, 447, 508, 508, 450, 451, 452, 453, 454, 455, - /* 2840 */ 363, 457, 508, 508, 508, 508, 508, 444, 508, 508, - /* 2850 */ 447, 350, 508, 450, 451, 452, 453, 454, 455, 508, - /* 2860 */ 457, 508, 508, 444, 363, 508, 447, 508, 391, 450, - /* 2870 */ 451, 452, 453, 454, 455, 508, 457, 508, 508, 508, - /* 2880 */ 403, 508, 405, 508, 508, 508, 508, 508, 508, 508, - /* 2890 */ 508, 508, 391, 508, 350, 508, 508, 508, 508, 508, - /* 2900 */ 508, 508, 508, 508, 403, 508, 405, 363, 508, 508, - /* 2910 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2920 */ 350, 444, 508, 508, 447, 508, 508, 450, 451, 452, - /* 2930 */ 453, 454, 455, 363, 457, 391, 508, 508, 508, 508, - /* 2940 */ 508, 508, 508, 508, 508, 444, 508, 403, 447, 405, - /* 2950 */ 508, 450, 451, 452, 453, 454, 455, 508, 457, 508, - /* 2960 */ 508, 391, 508, 350, 508, 508, 508, 508, 508, 508, - /* 2970 */ 508, 508, 508, 403, 508, 405, 363, 508, 508, 508, - /* 2980 */ 508, 508, 508, 508, 508, 508, 508, 508, 444, 508, - /* 2990 */ 508, 447, 508, 508, 450, 451, 452, 453, 454, 455, - /* 3000 */ 508, 457, 508, 508, 391, 508, 508, 508, 508, 508, - /* 3010 */ 508, 508, 508, 508, 444, 508, 403, 447, 405, 508, - /* 3020 */ 450, 451, 452, 453, 454, 455, 508, 457, 508, 508, - /* 3030 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 3040 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 3050 */ 508, 508, 508, 508, 508, 508, 508, 444, 508, 508, - /* 3060 */ 447, 508, 508, 450, 451, 452, 453, 454, 455, 508, - /* 3070 */ 457, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3080 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3090 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3100 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3110 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3120 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3130 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3140 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3150 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3160 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3170 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3180 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3190 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3200 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3210 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3220 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3230 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3240 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3250 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3260 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3270 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3280 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3290 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3300 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3310 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3320 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3330 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3340 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3350 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3360 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3370 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3380 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3390 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3400 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3410 */ 347, 347, 347, 347, 347, 347, 347, 347, + /* 1450 */ 244, 245, 246, 247, 248, 249, 250, 251, 252, 500, + /* 1460 */ 18, 392, 107, 477, 471, 23, 480, 382, 272, 482, + /* 1470 */ 107, 51, 428, 404, 107, 406, 447, 477, 351, 42, + /* 1480 */ 480, 446, 40, 41, 498, 499, 44, 427, 107, 503, + /* 1490 */ 504, 364, 107, 20, 439, 201, 54, 214, 498, 499, + /* 1500 */ 444, 372, 439, 503, 504, 372, 430, 65, 66, 67, + /* 1510 */ 68, 197, 20, 20, 445, 363, 351, 448, 364, 392, + /* 1520 */ 451, 452, 453, 454, 455, 456, 45, 458, 201, 364, + /* 1530 */ 413, 404, 463, 406, 465, 364, 293, 477, 469, 470, + /* 1540 */ 480, 413, 176, 363, 410, 364, 363, 410, 106, 413, + /* 1550 */ 410, 104, 376, 351, 102, 363, 101, 392, 498, 499, + /* 1560 */ 375, 374, 363, 503, 504, 20, 364, 363, 363, 404, + /* 1570 */ 356, 406, 445, 50, 356, 448, 360, 360, 451, 452, + /* 1580 */ 453, 454, 455, 456, 439, 458, 144, 351, 20, 20, + /* 1590 */ 463, 372, 465, 365, 392, 372, 469, 470, 372, 406, + /* 1600 */ 364, 20, 429, 372, 39, 40, 404, 365, 406, 372, + /* 1610 */ 445, 20, 372, 448, 420, 363, 451, 452, 453, 454, + /* 1620 */ 455, 456, 372, 458, 363, 392, 372, 392, 392, 356, + /* 1630 */ 392, 392, 354, 191, 192, 193, 354, 392, 196, 218, + /* 1640 */ 404, 392, 406, 392, 356, 106, 443, 445, 392, 392, + /* 1650 */ 448, 209, 210, 451, 452, 453, 454, 455, 456, 494, + /* 1660 */ 458, 351, 220, 404, 404, 223, 441, 392, 226, 227, + /* 1670 */ 228, 229, 230, 392, 364, 110, 111, 370, 113, 20, + /* 1680 */ 404, 445, 205, 370, 448, 439, 438, 451, 452, 453, + /* 1690 */ 454, 455, 456, 204, 458, 406, 404, 363, 435, 351, + /* 1700 */ 135, 465, 392, 280, 139, 469, 470, 505, 506, 279, + /* 1710 */ 488, 269, 364, 436, 404, 428, 406, 488, 491, 422, + /* 1720 */ 422, 288, 190, 289, 490, 290, 273, 428, 297, 268, + /* 1730 */ 294, 292, 508, 364, 20, 351, 116, 270, 365, 422, + /* 1740 */ 392, 450, 370, 422, 370, 404, 488, 404, 364, 404, + /* 1750 */ 404, 487, 404, 404, 406, 445, 182, 370, 448, 388, + /* 1760 */ 418, 451, 452, 453, 454, 455, 456, 370, 458, 364, + /* 1770 */ 486, 106, 468, 483, 106, 465, 392, 363, 485, 469, + /* 1780 */ 470, 502, 481, 404, 396, 370, 501, 22, 404, 38, + /* 1790 */ 406, 353, 431, 445, 440, 386, 448, 357, 423, 451, + /* 1800 */ 452, 453, 454, 455, 456, 356, 458, 351, 386, 423, + /* 1810 */ 386, 349, 371, 465, 45, 0, 37, 469, 470, 0, + /* 1820 */ 364, 0, 0, 224, 37, 37, 37, 224, 0, 445, + /* 1830 */ 351, 37, 448, 37, 224, 451, 452, 453, 454, 455, + /* 1840 */ 456, 37, 458, 364, 0, 224, 0, 37, 392, 465, + /* 1850 */ 0, 0, 22, 397, 470, 37, 0, 37, 219, 0, + /* 1860 */ 404, 207, 406, 0, 207, 201, 208, 0, 199, 0, + /* 1870 */ 0, 392, 195, 194, 0, 0, 397, 147, 49, 0, + /* 1880 */ 49, 0, 37, 404, 0, 406, 37, 51, 0, 49, + /* 1890 */ 0, 0, 45, 0, 0, 0, 0, 49, 0, 0, + /* 1900 */ 351, 445, 0, 0, 448, 161, 0, 451, 452, 453, + /* 1910 */ 454, 455, 456, 364, 458, 37, 161, 0, 0, 0, + /* 1920 */ 0, 0, 0, 351, 445, 0, 0, 448, 0, 0, + /* 1930 */ 451, 452, 453, 454, 455, 456, 364, 458, 351, 0, + /* 1940 */ 0, 392, 0, 0, 0, 0, 0, 0, 0, 49, + /* 1950 */ 45, 364, 22, 404, 0, 406, 0, 0, 351, 0, + /* 1960 */ 0, 0, 0, 147, 392, 0, 0, 0, 0, 146, + /* 1970 */ 145, 364, 22, 50, 50, 22, 404, 0, 406, 392, + /* 1980 */ 64, 0, 0, 0, 397, 0, 37, 51, 37, 0, + /* 1990 */ 0, 404, 37, 406, 445, 64, 0, 448, 64, 392, + /* 2000 */ 451, 452, 453, 454, 455, 456, 42, 458, 37, 51, + /* 2010 */ 0, 404, 42, 406, 51, 42, 37, 445, 42, 45, + /* 2020 */ 448, 33, 14, 451, 452, 453, 454, 455, 456, 49, + /* 2030 */ 458, 0, 445, 49, 43, 448, 351, 0, 451, 452, + /* 2040 */ 453, 454, 455, 456, 49, 458, 497, 42, 0, 364, + /* 2050 */ 0, 351, 445, 0, 42, 448, 190, 0, 451, 452, + /* 2060 */ 453, 454, 455, 456, 364, 458, 351, 460, 49, 0, + /* 2070 */ 0, 71, 0, 0, 51, 37, 42, 392, 506, 364, + /* 2080 */ 0, 37, 397, 51, 42, 0, 37, 51, 42, 404, + /* 2090 */ 0, 406, 392, 37, 51, 0, 42, 397, 0, 0, + /* 2100 */ 0, 0, 0, 37, 404, 112, 406, 392, 114, 22, + /* 2110 */ 0, 37, 37, 37, 37, 37, 37, 33, 37, 404, + /* 2120 */ 53, 406, 33, 37, 0, 37, 22, 0, 37, 37, + /* 2130 */ 445, 351, 0, 448, 22, 22, 451, 452, 453, 454, + /* 2140 */ 455, 456, 0, 458, 364, 445, 37, 22, 448, 0, + /* 2150 */ 0, 451, 452, 453, 454, 455, 456, 0, 458, 37, + /* 2160 */ 445, 0, 107, 448, 20, 351, 451, 452, 453, 454, + /* 2170 */ 455, 456, 392, 458, 37, 22, 37, 106, 364, 0, + /* 2180 */ 37, 179, 37, 49, 404, 0, 406, 22, 351, 37, + /* 2190 */ 179, 0, 206, 22, 202, 179, 182, 0, 0, 106, + /* 2200 */ 179, 364, 3, 186, 186, 179, 392, 33, 50, 274, + /* 2210 */ 107, 33, 106, 106, 37, 107, 50, 106, 404, 104, + /* 2220 */ 406, 102, 33, 107, 107, 445, 33, 106, 448, 392, + /* 2230 */ 107, 451, 452, 453, 454, 455, 456, 106, 458, 106, + /* 2240 */ 33, 404, 106, 406, 49, 49, 274, 3, 107, 33, + /* 2250 */ 37, 37, 274, 107, 37, 37, 33, 37, 37, 445, + /* 2260 */ 351, 107, 448, 107, 49, 451, 452, 453, 454, 455, + /* 2270 */ 456, 267, 458, 364, 49, 0, 0, 107, 106, 42, + /* 2280 */ 107, 106, 445, 351, 0, 448, 106, 106, 451, 452, + /* 2290 */ 453, 454, 455, 456, 106, 458, 364, 183, 42, 181, + /* 2300 */ 106, 392, 115, 351, 49, 33, 104, 104, 2, 22, + /* 2310 */ 106, 106, 254, 404, 106, 406, 364, 107, 107, 107, + /* 2320 */ 49, 22, 49, 37, 392, 231, 37, 37, 106, 33, + /* 2330 */ 106, 234, 37, 107, 106, 106, 404, 107, 406, 107, + /* 2340 */ 106, 37, 106, 116, 392, 107, 107, 106, 37, 107, + /* 2350 */ 107, 106, 37, 106, 445, 106, 404, 448, 406, 106, + /* 2360 */ 451, 452, 453, 454, 455, 456, 37, 458, 106, 22, + /* 2370 */ 37, 71, 70, 127, 37, 127, 351, 445, 127, 127, + /* 2380 */ 448, 37, 37, 451, 452, 453, 454, 455, 456, 364, + /* 2390 */ 458, 37, 37, 37, 77, 37, 37, 445, 351, 77, + /* 2400 */ 448, 100, 33, 451, 452, 453, 454, 455, 456, 100, + /* 2410 */ 458, 364, 37, 351, 37, 37, 22, 392, 37, 37, + /* 2420 */ 37, 37, 37, 77, 22, 37, 364, 37, 37, 404, + /* 2430 */ 37, 406, 0, 37, 351, 0, 37, 51, 0, 392, + /* 2440 */ 42, 37, 42, 51, 0, 42, 51, 364, 37, 42, + /* 2450 */ 0, 404, 51, 406, 392, 37, 351, 37, 0, 22, + /* 2460 */ 33, 22, 21, 509, 22, 22, 404, 21, 406, 364, + /* 2470 */ 445, 351, 509, 448, 20, 392, 451, 452, 453, 454, + /* 2480 */ 455, 456, 509, 458, 364, 509, 509, 404, 509, 406, + /* 2490 */ 509, 351, 445, 509, 509, 448, 509, 392, 451, 452, + /* 2500 */ 453, 454, 455, 456, 364, 458, 509, 445, 509, 404, + /* 2510 */ 448, 406, 392, 451, 452, 453, 454, 455, 456, 509, + /* 2520 */ 458, 509, 509, 509, 404, 509, 406, 509, 445, 509, + /* 2530 */ 509, 448, 392, 509, 451, 452, 453, 454, 455, 456, + /* 2540 */ 509, 458, 509, 509, 404, 509, 406, 509, 509, 509, + /* 2550 */ 445, 509, 509, 448, 509, 509, 451, 452, 453, 454, + /* 2560 */ 455, 456, 509, 458, 509, 445, 509, 509, 448, 509, + /* 2570 */ 351, 451, 452, 453, 454, 455, 456, 509, 458, 509, + /* 2580 */ 509, 509, 509, 364, 509, 445, 351, 509, 448, 509, + /* 2590 */ 509, 451, 452, 453, 454, 455, 456, 509, 458, 364, + /* 2600 */ 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + /* 2610 */ 509, 392, 509, 509, 509, 509, 509, 509, 509, 509, + /* 2620 */ 509, 509, 509, 404, 509, 406, 509, 392, 509, 509, + /* 2630 */ 509, 509, 509, 509, 509, 509, 509, 509, 509, 404, + /* 2640 */ 509, 406, 509, 351, 509, 509, 509, 509, 509, 509, + /* 2650 */ 509, 509, 509, 509, 509, 509, 364, 509, 509, 509, + /* 2660 */ 509, 509, 509, 509, 445, 351, 509, 448, 509, 509, + /* 2670 */ 451, 452, 453, 454, 455, 456, 509, 458, 364, 509, + /* 2680 */ 445, 509, 509, 448, 392, 509, 451, 452, 453, 454, + /* 2690 */ 455, 456, 509, 458, 509, 509, 404, 509, 406, 509, + /* 2700 */ 509, 509, 509, 509, 509, 509, 392, 509, 351, 509, + /* 2710 */ 509, 509, 509, 509, 509, 509, 509, 509, 404, 509, + /* 2720 */ 406, 364, 509, 509, 509, 509, 509, 509, 509, 509, + /* 2730 */ 509, 509, 509, 509, 509, 509, 509, 445, 351, 509, + /* 2740 */ 448, 509, 509, 451, 452, 453, 454, 455, 456, 392, + /* 2750 */ 458, 364, 509, 509, 509, 509, 509, 509, 509, 445, + /* 2760 */ 509, 404, 448, 406, 509, 451, 452, 453, 454, 455, + /* 2770 */ 456, 509, 458, 509, 509, 509, 509, 509, 509, 392, + /* 2780 */ 509, 351, 509, 509, 509, 509, 509, 509, 509, 509, + /* 2790 */ 509, 404, 509, 406, 364, 509, 509, 509, 509, 509, + /* 2800 */ 509, 509, 445, 351, 509, 448, 509, 509, 451, 452, + /* 2810 */ 453, 454, 455, 456, 509, 458, 364, 509, 509, 509, + /* 2820 */ 509, 509, 392, 509, 509, 509, 509, 509, 509, 509, + /* 2830 */ 509, 509, 445, 509, 404, 448, 406, 509, 451, 452, + /* 2840 */ 453, 454, 455, 456, 392, 458, 509, 509, 509, 509, + /* 2850 */ 509, 509, 509, 509, 509, 509, 404, 509, 406, 509, + /* 2860 */ 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + /* 2870 */ 509, 509, 509, 509, 509, 445, 509, 509, 448, 509, + /* 2880 */ 509, 451, 452, 453, 454, 455, 456, 509, 458, 509, + /* 2890 */ 509, 509, 509, 509, 509, 509, 509, 445, 509, 509, + /* 2900 */ 448, 509, 509, 451, 452, 453, 454, 455, 456, 509, + /* 2910 */ 458, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 2920 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 2930 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 2940 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 2950 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 2960 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 2970 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 2980 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 2990 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3000 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3010 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3020 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3030 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3040 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3050 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3060 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3070 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3080 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3090 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3100 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3110 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3120 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3130 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3140 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3150 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3160 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3170 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3180 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3190 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3200 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3210 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3220 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3230 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3240 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, + /* 3250 */ 348, 348, 348, 348, 348, 348, 348, 348, 348, }; -#define YY_SHIFT_COUNT (839) +#define YY_SHIFT_COUNT (842) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2374) +#define YY_SHIFT_MAX (2458) static const unsigned short int yy_shift_ofst[] = { /* 0 */ 1442, 0, 241, 0, 483, 483, 483, 483, 483, 483, /* 10 */ 483, 483, 483, 483, 483, 483, 724, 965, 965, 1206, /* 20 */ 965, 965, 965, 965, 965, 965, 965, 965, 965, 965, /* 30 */ 965, 965, 965, 965, 965, 965, 965, 965, 965, 965, /* 40 */ 965, 965, 965, 965, 965, 965, 965, 965, 965, 965, - /* 50 */ 965, 167, 402, 1084, 251, 405, 587, 405, 405, 251, - /* 60 */ 251, 405, 1325, 405, 240, 1325, 1325, 513, 405, 5, - /* 70 */ 170, 171, 171, 160, 160, 170, 78, 39, 295, 295, - /* 80 */ 326, 171, 171, 171, 171, 171, 171, 171, 171, 171, - /* 90 */ 171, 171, 261, 355, 171, 171, 91, 5, 171, 261, - /* 100 */ 171, 5, 171, 171, 5, 171, 171, 5, 171, 5, - /* 110 */ 5, 5, 171, 400, 202, 202, 465, 198, 118, 118, + /* 50 */ 965, 153, 245, 410, 413, 233, 329, 233, 233, 413, + /* 60 */ 413, 233, 847, 233, 240, 847, 847, 311, 233, 5, + /* 70 */ 403, 214, 214, 160, 160, 403, 78, 39, 625, 625, + /* 80 */ 484, 214, 214, 214, 214, 214, 214, 214, 214, 214, + /* 90 */ 214, 214, 251, 519, 214, 214, 486, 5, 214, 251, + /* 100 */ 214, 5, 214, 214, 5, 214, 214, 5, 214, 5, + /* 110 */ 5, 5, 214, 492, 202, 202, 477, 198, 118, 118, /* 120 */ 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, - /* 130 */ 118, 118, 118, 118, 118, 118, 118, 1114, 200, 78, - /* 140 */ 39, 515, 515, 949, 415, 415, 415, 364, 536, 536, - /* 150 */ 1041, 949, 91, 307, 5, 5, 262, 5, 376, 5, - /* 160 */ 376, 376, 506, 618, 577, 577, 577, 577, 577, 577, - /* 170 */ 577, 577, 988, 677, 65, 1132, 66, 523, 242, 76, - /* 180 */ 600, 659, 571, 571, 1059, 1087, 1102, 246, 246, 246, - /* 190 */ 327, 246, 480, 575, 1075, 808, 204, 545, 1075, 1075, - /* 200 */ 1077, 1030, 738, 861, 1030, 530, 1034, 1041, 1216, 1439, - /* 210 */ 1450, 1474, 1281, 91, 1474, 91, 1301, 1484, 1491, 1469, - /* 220 */ 1491, 1469, 1343, 1484, 1491, 1484, 1469, 1343, 1343, 1424, - /* 230 */ 1428, 1484, 1432, 1484, 1484, 1484, 1518, 1489, 1518, 1489, - /* 240 */ 1474, 91, 91, 1529, 91, 1532, 1538, 91, 1532, 91, - /* 250 */ 1543, 91, 91, 1484, 91, 1518, 5, 5, 5, 5, - /* 260 */ 5, 5, 5, 5, 5, 5, 5, 1484, 618, 618, - /* 270 */ 1518, 376, 376, 376, 1369, 1482, 1474, 400, 1591, 1408, - /* 280 */ 1411, 1529, 400, 1216, 1484, 376, 1344, 1347, 1344, 1347, - /* 290 */ 1341, 1440, 1344, 1356, 1362, 1374, 1216, 1340, 1364, 1372, - /* 300 */ 1385, 1491, 1636, 1542, 1394, 1532, 400, 400, 1347, 376, - /* 310 */ 376, 376, 376, 1347, 376, 1505, 400, 506, 400, 1491, - /* 320 */ 1588, 1590, 376, 1484, 400, 1678, 1666, 1518, 3071, 3071, - /* 330 */ 3071, 3071, 3071, 3071, 3071, 3071, 3071, 36, 462, 306, - /* 340 */ 565, 1069, 435, 805, 551, 15, 30, 650, 779, 40, - /* 350 */ 40, 40, 40, 40, 40, 40, 40, 40, 759, 151, - /* 360 */ 416, 1217, 1217, 730, 461, 457, 468, 678, 479, 961, - /* 370 */ 863, 334, 334, 727, 1184, 774, 727, 727, 727, 1262, - /* 380 */ 1103, 503, 1020, 1273, 1155, 1331, 1187, 1230, 1234, 1242, - /* 390 */ 1307, 1332, 388, 936, 1352, 1085, 1127, 1323, 981, 1326, - /* 400 */ 1333, 1354, 1225, 1090, 637, 1355, 1359, 1360, 1361, 1363, - /* 410 */ 1365, 1375, 1366, 1203, 1274, 873, 1367, 1368, 1370, 1371, - /* 420 */ 1373, 1377, 1072, 991, 1278, 1342, 1348, 1320, 1380, 1710, - /* 430 */ 1717, 1718, 1674, 1722, 1688, 1508, 1699, 1700, 1702, 1517, - /* 440 */ 1742, 1706, 1709, 1524, 1712, 1750, 1528, 1751, 1716, 1755, - /* 450 */ 1719, 1758, 1737, 1766, 1732, 1551, 1771, 1565, 1773, 1569, - /* 460 */ 1572, 1576, 1583, 1783, 1784, 1785, 1593, 1592, 1790, 1791, - /* 470 */ 1645, 1744, 1745, 1795, 1759, 1797, 1798, 1762, 1749, 1802, - /* 480 */ 1754, 1804, 1760, 1806, 1807, 1808, 1761, 1811, 1812, 1813, - /* 490 */ 1815, 1816, 1817, 1657, 1782, 1820, 1661, 1824, 1825, 1826, - /* 500 */ 1827, 1832, 1833, 1840, 1843, 1844, 1845, 1846, 1847, 1855, - /* 510 */ 1857, 1858, 1859, 1860, 1780, 1830, 1805, 1851, 1861, 1863, - /* 520 */ 1864, 1866, 1867, 1874, 1854, 1878, 1733, 1879, 1703, 1881, - /* 530 */ 1738, 1884, 1885, 1869, 1838, 1870, 1839, 1893, 1835, 1873, - /* 540 */ 1894, 1836, 1896, 1848, 1897, 1909, 1876, 1865, 1875, 1911, - /* 550 */ 1877, 1868, 1880, 1915, 1886, 1882, 1883, 1921, 1889, 1924, - /* 560 */ 1890, 1892, 1895, 1888, 1891, 1913, 1898, 1929, 1899, 1901, - /* 570 */ 1931, 1936, 1938, 1939, 1902, 1756, 1941, 1888, 1900, 1945, - /* 580 */ 1950, 1904, 1951, 1952, 1916, 1903, 1917, 1957, 1926, 1907, - /* 590 */ 1919, 1964, 1928, 1918, 1925, 1966, 1933, 1922, 1930, 1968, - /* 600 */ 1976, 1983, 1986, 1987, 1988, 1908, 1905, 1953, 1967, 1992, - /* 610 */ 1956, 1958, 1960, 1962, 1963, 1969, 1979, 1981, 1961, 1970, - /* 620 */ 1984, 1990, 1991, 1993, 2005, 1998, 2023, 2002, 1972, 2028, - /* 630 */ 2007, 1996, 2034, 2035, 2036, 2000, 2039, 2004, 2042, 2022, - /* 640 */ 2025, 2009, 2010, 2012, 1944, 1946, 2053, 1912, 1948, 1850, - /* 650 */ 1888, 2013, 2058, 1914, 2024, 2037, 2063, 1862, 2043, 1932, - /* 660 */ 1935, 2066, 2067, 1949, 1943, 1954, 1955, 2065, 2038, 1796, - /* 670 */ 1971, 1973, 1975, 2019, 1974, 2026, 2006, 1994, 2040, 2050, - /* 680 */ 2003, 1989, 2029, 2030, 2008, 2061, 2049, 2051, 2032, 2079, - /* 690 */ 1801, 2011, 2027, 2127, 2098, 1871, 2095, 2103, 2105, 2106, - /* 700 */ 2107, 2109, 2041, 2044, 2100, 1910, 2114, 2101, 2152, 2153, - /* 710 */ 2048, 2115, 2052, 2054, 2055, 2057, 2060, 1985, 2064, 2156, - /* 720 */ 2117, 1995, 2068, 2056, 1888, 2123, 2131, 2069, 1940, 2071, - /* 730 */ 2178, 2160, 1959, 2077, 2086, 2089, 2090, 2092, 2093, 2147, - /* 740 */ 2096, 2099, 2154, 2094, 2182, 1997, 2104, 2091, 2102, 2169, - /* 750 */ 2176, 2118, 2116, 2188, 2120, 2121, 2190, 2124, 2122, 2196, - /* 760 */ 2130, 2134, 2201, 2136, 2137, 2206, 2141, 2119, 2126, 2128, - /* 770 */ 2132, 2142, 2216, 2145, 2220, 2155, 2216, 2216, 2236, 2189, - /* 780 */ 2192, 2227, 2228, 2229, 2230, 2234, 2235, 2237, 2248, 2250, - /* 790 */ 2193, 2191, 2212, 2194, 2262, 2261, 2268, 2270, 2286, 2273, - /* 800 */ 2275, 2277, 2238, 1961, 2280, 1970, 2281, 2283, 2284, 2295, - /* 810 */ 2306, 2296, 2313, 2298, 2285, 2303, 2346, 2310, 2297, 2309, - /* 820 */ 2352, 2317, 2304, 2322, 2366, 2330, 2318, 2326, 2370, 2335, - /* 830 */ 2336, 2374, 2353, 2343, 2355, 2358, 2359, 2360, 2363, 2367, + /* 130 */ 118, 118, 118, 118, 118, 118, 118, 1565, 200, 78, + /* 140 */ 39, 792, 792, 304, 731, 731, 731, 595, 503, 503, + /* 150 */ 440, 304, 486, 456, 5, 5, 370, 5, 622, 5, + /* 160 */ 622, 622, 688, 852, 572, 572, 572, 572, 572, 572, + /* 170 */ 572, 572, 747, 1080, 65, 345, 66, 426, 288, 242, + /* 180 */ 658, 842, 900, 900, 570, 790, 621, 123, 123, 123, + /* 190 */ 811, 123, 814, 1015, 1016, 1040, 508, 948, 1016, 1016, + /* 200 */ 1147, 956, 1062, 945, 956, 424, 1022, 440, 1196, 1420, + /* 210 */ 1437, 1473, 1283, 486, 1473, 486, 1314, 1492, 1493, 1481, + /* 220 */ 1493, 1481, 1366, 1492, 1493, 1492, 1481, 1366, 1366, 1447, + /* 230 */ 1452, 1492, 1455, 1492, 1492, 1492, 1545, 1523, 1545, 1523, + /* 240 */ 1473, 486, 486, 1568, 486, 1569, 1581, 486, 1569, 486, + /* 250 */ 1591, 486, 486, 1492, 486, 1545, 5, 5, 5, 5, + /* 260 */ 5, 5, 5, 5, 5, 5, 5, 1492, 852, 852, + /* 270 */ 1545, 622, 622, 622, 1421, 1539, 1473, 492, 1659, 1477, + /* 280 */ 1489, 1568, 492, 1196, 1492, 622, 1423, 1430, 1423, 1430, + /* 290 */ 1433, 1532, 1423, 1435, 1434, 1453, 1196, 1431, 1436, 1439, + /* 300 */ 1461, 1493, 1714, 1620, 1467, 1569, 492, 492, 1430, 622, + /* 310 */ 622, 622, 622, 1430, 622, 1574, 492, 688, 492, 1493, + /* 320 */ 1665, 1668, 622, 1492, 492, 1765, 1751, 1545, 2911, 2911, + /* 330 */ 2911, 2911, 2911, 2911, 2911, 2911, 2911, 36, 474, 306, + /* 340 */ 1328, 1221, 435, 807, 638, 15, 30, 1043, 781, 40, + /* 350 */ 40, 40, 40, 40, 40, 40, 40, 40, 997, 539, + /* 360 */ 416, 881, 881, 307, 238, 488, 128, 745, 985, 1054, + /* 370 */ 933, 184, 184, 672, 1071, 150, 672, 672, 672, 1230, + /* 380 */ 1169, 1144, 1232, 1212, 1130, 1247, 1146, 1150, 1151, 1155, + /* 390 */ 351, 1241, 1265, 1268, 1269, 1033, 1244, 1255, 706, 1262, + /* 400 */ 1266, 1267, 1159, 1243, 1090, 1270, 1271, 1274, 1280, 1286, + /* 410 */ 1295, 1296, 1302, 1201, 1272, 744, 1333, 1355, 1363, 1367, + /* 420 */ 1381, 1385, 1253, 1294, 1327, 1339, 1362, 1309, 1318, 1819, + /* 430 */ 1821, 1822, 1769, 1815, 1779, 1599, 1787, 1788, 1789, 1603, + /* 440 */ 1828, 1794, 1796, 1610, 1804, 1844, 1621, 1846, 1810, 1850, + /* 450 */ 1818, 1851, 1830, 1856, 1820, 1639, 1859, 1654, 1863, 1657, + /* 460 */ 1658, 1664, 1669, 1867, 1869, 1870, 1677, 1679, 1874, 1875, + /* 470 */ 1730, 1829, 1831, 1879, 1845, 1881, 1884, 1849, 1836, 1888, + /* 480 */ 1840, 1890, 1847, 1891, 1893, 1894, 1848, 1895, 1896, 1898, + /* 490 */ 1899, 1902, 1903, 1744, 1878, 1906, 1755, 1917, 1918, 1919, + /* 500 */ 1920, 1921, 1922, 1925, 1926, 1928, 1929, 1939, 1940, 1942, + /* 510 */ 1943, 1944, 1945, 1946, 1900, 1947, 1905, 1948, 1954, 1956, + /* 520 */ 1957, 1959, 1960, 1961, 1930, 1962, 1816, 1965, 1823, 1966, + /* 530 */ 1825, 1967, 1968, 1950, 1923, 1953, 1924, 1977, 1916, 1949, + /* 540 */ 1981, 1931, 1982, 1934, 1983, 1985, 1951, 1936, 1964, 1989, + /* 550 */ 1955, 1958, 1970, 1990, 1971, 1963, 1973, 1996, 1979, 2010, + /* 560 */ 1974, 1976, 1988, 1980, 1984, 2008, 1995, 2031, 1991, 2005, + /* 570 */ 2037, 2048, 2050, 2053, 2012, 1866, 2057, 1980, 2019, 2069, + /* 580 */ 2070, 2000, 2072, 2073, 2038, 2023, 2034, 2080, 2044, 2032, + /* 590 */ 2042, 2085, 2049, 2036, 2046, 2090, 2056, 2043, 2054, 2095, + /* 600 */ 2098, 2099, 2100, 2101, 2102, 1994, 1993, 2066, 2087, 2110, + /* 610 */ 2074, 2075, 2076, 2077, 2078, 2079, 2081, 2086, 2084, 2089, + /* 620 */ 2088, 2091, 2104, 2092, 2124, 2112, 2127, 2113, 2067, 2132, + /* 630 */ 2125, 2109, 2142, 2149, 2150, 2122, 2157, 2137, 2161, 2153, + /* 640 */ 2144, 2139, 2143, 2145, 2055, 2071, 2179, 2002, 2093, 1986, + /* 650 */ 1980, 2134, 2185, 2011, 2152, 2165, 2191, 1992, 2171, 2016, + /* 660 */ 2014, 2197, 2198, 2021, 2017, 2026, 2018, 2199, 2174, 1935, + /* 670 */ 2106, 2103, 2107, 2108, 2177, 2111, 2158, 2115, 2166, 2119, + /* 680 */ 2116, 2178, 2189, 2117, 2121, 2131, 2133, 2123, 2193, 2195, + /* 690 */ 2196, 2136, 2207, 1972, 2141, 2146, 2244, 2216, 1978, 2213, + /* 700 */ 2214, 2217, 2218, 2220, 2221, 2154, 2156, 2215, 2004, 2223, + /* 710 */ 2225, 2275, 2276, 2172, 2237, 2175, 2170, 2173, 2180, 2181, + /* 720 */ 2114, 2188, 2284, 2256, 2118, 2194, 2187, 1980, 2255, 2272, + /* 730 */ 2202, 2058, 2203, 2306, 2287, 2094, 2204, 2210, 2205, 2211, + /* 740 */ 2208, 2212, 2271, 2222, 2224, 2273, 2226, 2299, 2097, 2228, + /* 750 */ 2227, 2230, 2286, 2289, 2229, 2232, 2290, 2234, 2238, 2295, + /* 760 */ 2236, 2239, 2304, 2241, 2242, 2311, 2245, 2243, 2315, 2247, + /* 770 */ 2246, 2248, 2251, 2252, 2249, 2296, 2253, 2329, 2262, 2296, + /* 780 */ 2296, 2347, 2300, 2302, 2333, 2337, 2344, 2345, 2354, 2355, + /* 790 */ 2356, 2358, 2359, 2317, 2301, 2322, 2309, 2369, 2375, 2377, + /* 800 */ 2378, 2394, 2381, 2382, 2383, 2346, 2084, 2384, 2089, 2385, + /* 810 */ 2388, 2390, 2391, 2402, 2393, 2432, 2396, 2386, 2398, 2435, + /* 820 */ 2399, 2392, 2400, 2438, 2404, 2395, 2403, 2444, 2411, 2401, + /* 830 */ 2407, 2450, 2418, 2420, 2458, 2437, 2427, 2439, 2441, 2442, + /* 840 */ 2443, 2446, 2454, }; #define YY_REDUCE_COUNT (336) -#define YY_REDUCE_MIN (-430) -#define YY_REDUCE_MAX (2613) +#define YY_REDUCE_MIN (-431) +#define YY_REDUCE_MAX (2452) static const short yy_reduce_ofst[] = { - /* 0 */ 431, -303, 149, 185, -23, 390, 421, 630, 662, 872, - /* 10 */ 967, 1150, 1276, 1310, 1384, 1418, 488, -81, 1451, 1527, - /* 20 */ 1557, 1635, 1652, 1669, 1734, 1764, 1829, 1849, 1872, 1887, - /* 30 */ 1906, 1980, 1999, 2015, 2073, 2097, 2140, 2166, 2209, 2233, - /* 40 */ 2276, 2291, 2307, 2384, 2403, 2419, 2477, 2501, 2544, 2570, - /* 50 */ 2613, -305, -202, 384, -187, 31, 451, 558, 660, 541, - /* 60 */ 707, 763, 643, -340, -341, -99, 228, -177, 89, -380, - /* 70 */ -211, 401, 403, -356, -351, -390, -330, -333, -257, 140, - /* 80 */ -218, 412, 487, 619, 628, -312, -225, 634, 669, 681, - /* 90 */ 696, -97, 179, -2, 739, 793, -284, 250, 642, 187, - /* 100 */ 809, 354, 858, 882, -383, 892, 894, 425, 896, 522, - /* 110 */ 455, 620, 905, -66, -425, -425, -296, -149, 35, 159, - /* 120 */ 182, 397, 452, 485, 534, 638, 722, 820, 843, 844, - /* 130 */ 849, 886, 898, 900, 901, 929, 930, -61, -270, -245, - /* 140 */ -342, 278, 429, 632, -270, 206, 350, 12, 531, 698, - /* 150 */ 751, 761, 509, 670, 520, 776, -307, 313, 765, 782, - /* 160 */ 869, 885, 906, 941, -385, 291, 347, 395, 419, 440, - /* 170 */ 478, 419, -430, 686, 754, 870, 857, 855, 1005, 887, - /* 180 */ 982, 982, 999, 1007, 979, 1047, 993, 918, 919, 921, - /* 190 */ 998, 922, 982, 1060, 1009, 1064, 1057, 1031, 1053, 1055, - /* 200 */ 982, 985, 985, 977, 985, 1011, 1004, 1106, 1062, 1045, - /* 210 */ 1048, 1061, 1054, 1130, 1065, 1131, 1076, 1144, 1149, 1104, - /* 220 */ 1152, 1105, 1109, 1158, 1159, 1161, 1113, 1112, 1118, 1154, - /* 230 */ 1157, 1170, 1162, 1172, 1174, 1175, 1185, 1183, 1188, 1186, - /* 240 */ 1108, 1173, 1176, 1145, 1180, 1190, 1133, 1189, 1195, 1191, - /* 250 */ 1146, 1193, 1196, 1204, 1197, 1214, 1192, 1194, 1198, 1199, - /* 260 */ 1200, 1201, 1202, 1205, 1207, 1208, 1215, 1218, 1224, 1226, - /* 270 */ 1223, 1178, 1179, 1181, 1153, 1168, 1171, 1241, 1209, 1182, - /* 280 */ 1210, 1211, 1251, 1213, 1259, 1219, 1137, 1220, 1140, 1221, - /* 290 */ 1139, 1142, 1156, 1151, 1147, 1164, 1222, 1148, 1160, 1166, - /* 300 */ 985, 1291, 1227, 1177, 1212, 1311, 1305, 1308, 1257, 1277, - /* 310 */ 1279, 1280, 1282, 1263, 1283, 1271, 1321, 1302, 1322, 1330, - /* 320 */ 1228, 1303, 1294, 1337, 1334, 1350, 1349, 1351, 1284, 1268, - /* 330 */ 1286, 1287, 1327, 1336, 1339, 1346, 1387, + /* 0 */ 586, -304, 148, 179, -24, 388, 420, 541, 661, 869, + /* 10 */ 902, 1069, 1127, 1236, 1310, 1348, 735, -82, 1202, 1384, + /* 20 */ 1165, 1456, 1479, 1549, 1572, 1587, 1607, 1685, 1700, 1715, + /* 30 */ 1780, 1814, 1837, 1909, 1932, 1952, 2025, 2047, 2062, 2083, + /* 40 */ 2105, 2120, 2140, 2219, 2235, 2292, 2314, 2357, 2387, 2430, + /* 50 */ 2452, -306, -203, 812, -188, 117, 918, 986, 1000, 290, + /* 60 */ 465, 1060, 225, -341, -342, -81, 133, 292, 400, -381, + /* 70 */ -212, -35, 158, -357, -352, -391, -331, -334, -258, -71, + /* 80 */ 106, 143, 287, 302, 377, -313, -226, 379, 563, 566, + /* 90 */ 568, -60, 73, 112, 618, 620, -285, -126, 645, 394, + /* 100 */ 651, 116, 657, 660, -384, 667, 681, 185, 698, 405, + /* 110 */ 215, 418, 719, 282, -426, -426, -297, -38, 34, 224, + /* 120 */ 466, 494, 496, 537, 601, 628, 629, 637, 736, 754, + /* 130 */ 770, 777, 778, 817, 833, 834, 848, -123, -167, -246, + /* 140 */ -343, 495, 670, 639, -167, 349, 627, 679, 321, 417, + /* 150 */ -177, 733, 746, 787, 755, 756, -308, 544, 96, 835, + /* 160 */ 386, 721, 846, 801, -386, 560, 565, 707, 889, 891, + /* 170 */ 893, 889, -431, 952, 1011, 972, 875, 896, 908, 1034, + /* 180 */ 1012, 1012, 1023, 1026, 991, 1048, 994, 917, 920, 924, + /* 190 */ 998, 928, 1012, 1058, 1009, 1064, 1027, 995, 1014, 1017, + /* 200 */ 1012, 957, 957, 959, 957, 993, 987, 1085, 1044, 1029, + /* 210 */ 1035, 1055, 1056, 1129, 1063, 1133, 1076, 1152, 1154, 1117, + /* 220 */ 1171, 1128, 1134, 1180, 1181, 1183, 1136, 1137, 1140, 1176, + /* 230 */ 1185, 1192, 1187, 1199, 1204, 1205, 1214, 1216, 1218, 1217, + /* 240 */ 1145, 1219, 1223, 1193, 1226, 1228, 1173, 1231, 1242, 1237, + /* 250 */ 1194, 1240, 1250, 1252, 1254, 1273, 1233, 1235, 1238, 1239, + /* 260 */ 1245, 1249, 1251, 1256, 1257, 1275, 1281, 1261, 1278, 1282, + /* 270 */ 1288, 1259, 1260, 1276, 1203, 1225, 1246, 1307, 1248, 1277, + /* 280 */ 1263, 1289, 1313, 1287, 1334, 1292, 1222, 1297, 1229, 1298, + /* 290 */ 1227, 1234, 1258, 1264, 1284, 1293, 1299, 1224, 1279, 1285, + /* 300 */ 957, 1369, 1291, 1290, 1301, 1373, 1372, 1374, 1317, 1341, + /* 310 */ 1343, 1345, 1346, 1321, 1349, 1342, 1387, 1371, 1397, 1405, + /* 320 */ 1304, 1388, 1379, 1414, 1415, 1438, 1440, 1449, 1361, 1354, + /* 330 */ 1375, 1386, 1409, 1422, 1424, 1441, 1462, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 10 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 20 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 30 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 40 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 50 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 60 */ 1884, 2219, 1884, 1884, 2182, 1884, 1884, 1884, 1884, 1884, - /* 70 */ 1884, 1884, 1884, 1884, 1884, 1884, 2189, 1884, 1884, 1884, - /* 80 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 90 */ 1884, 1884, 1884, 1884, 1884, 1884, 1981, 1884, 1884, 1884, - /* 100 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 110 */ 1884, 1884, 1884, 1979, 2422, 1884, 1884, 1884, 1884, 1884, - /* 120 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 130 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2434, 1884, - /* 140 */ 1884, 1955, 1955, 1884, 2434, 2434, 2434, 1979, 2394, 2394, - /* 150 */ 1884, 1884, 1981, 2257, 1884, 1884, 1884, 1884, 1884, 1884, - /* 160 */ 1884, 1884, 2104, 1914, 1884, 1884, 1884, 1884, 2128, 1884, - /* 170 */ 1884, 1884, 2245, 1884, 1884, 2463, 2523, 1884, 1884, 2466, - /* 180 */ 1884, 1884, 1884, 1884, 2194, 1884, 2453, 1884, 1884, 1884, - /* 190 */ 1884, 1884, 1884, 1884, 1884, 1884, 2057, 2239, 1884, 1884, - /* 200 */ 1884, 2426, 2440, 2507, 2427, 2424, 2447, 1884, 2457, 1884, - /* 210 */ 2282, 1884, 2271, 1981, 1884, 1981, 2232, 2177, 1884, 2187, - /* 220 */ 1884, 2187, 2184, 1884, 1884, 1884, 2187, 2184, 2184, 2046, - /* 230 */ 2042, 1884, 2040, 1884, 1884, 1884, 1884, 1939, 1884, 1939, - /* 240 */ 1884, 1981, 1981, 1884, 1981, 1884, 1884, 1981, 1884, 1981, - /* 250 */ 1884, 1981, 1981, 1884, 1981, 1884, 1884, 1884, 1884, 1884, - /* 260 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 270 */ 1884, 1884, 1884, 1884, 2269, 2255, 1884, 1979, 1884, 2243, - /* 280 */ 2241, 1884, 1979, 2457, 1884, 1884, 2477, 2472, 2477, 2472, - /* 290 */ 2491, 2487, 2477, 2496, 2493, 2459, 2457, 2526, 2513, 2509, - /* 300 */ 2440, 1884, 1884, 2445, 2443, 1884, 1979, 1979, 2472, 1884, - /* 310 */ 1884, 1884, 1884, 2472, 1884, 1884, 1979, 1884, 1979, 1884, - /* 320 */ 1884, 2073, 1884, 1884, 1979, 1884, 1923, 1884, 2234, 2260, - /* 330 */ 2215, 2215, 2107, 2107, 2107, 1982, 1889, 1884, 1884, 1884, - /* 340 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2490, - /* 350 */ 2489, 2347, 1884, 2398, 2397, 2396, 2387, 2346, 2069, 1884, - /* 360 */ 1884, 2345, 2344, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 370 */ 1884, 2206, 2205, 2338, 1884, 1884, 2339, 2337, 2336, 1884, - /* 380 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 390 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 400 */ 1884, 1884, 1884, 2510, 2514, 1884, 1884, 1884, 1884, 1884, - /* 410 */ 1884, 2423, 1884, 1884, 1884, 2318, 1884, 1884, 1884, 1884, - /* 420 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 430 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 440 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 450 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 460 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 470 */ 2183, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 480 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 490 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 500 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 510 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 520 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 530 */ 2198, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 540 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 550 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 560 */ 1884, 1884, 1928, 2325, 1884, 1884, 1884, 1884, 1884, 1884, - /* 570 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2328, 1884, 1884, - /* 580 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 590 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 600 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 610 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2021, 2020, - /* 620 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 630 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 640 */ 1884, 1884, 1884, 1884, 2329, 1884, 1884, 1884, 1884, 1884, - /* 650 */ 2320, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 660 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2506, 2460, 1884, - /* 670 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 680 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2318, 1884, 2488, - /* 690 */ 1884, 1884, 2504, 1884, 2508, 1884, 1884, 1884, 1884, 1884, - /* 700 */ 1884, 1884, 2433, 2429, 1884, 1884, 2425, 1884, 1884, 1884, - /* 710 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 720 */ 1884, 1884, 1884, 1884, 2317, 1884, 2384, 1884, 1884, 1884, - /* 730 */ 2418, 1884, 1884, 2369, 1884, 1884, 1884, 1884, 1884, 1884, - /* 740 */ 1884, 1884, 1884, 2329, 1884, 2332, 1884, 1884, 1884, 1884, - /* 750 */ 1884, 2101, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 760 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2085, 2083, 2082, - /* 770 */ 2081, 1884, 2114, 1884, 1884, 1884, 2110, 2109, 1884, 1884, - /* 780 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 790 */ 1884, 1884, 1884, 1884, 2000, 1884, 1884, 1884, 1884, 1884, - /* 800 */ 1884, 1884, 1884, 1992, 1884, 1991, 1884, 1884, 1884, 1884, - /* 810 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 820 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 830 */ 1884, 1884, 1884, 1913, 1884, 1884, 1884, 1884, 1884, 1884, + /* 0 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 10 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 20 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 30 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 40 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 50 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 60 */ 1889, 2224, 1889, 1889, 2187, 1889, 1889, 1889, 1889, 1889, + /* 70 */ 1889, 1889, 1889, 1889, 1889, 1889, 2194, 1889, 1889, 1889, + /* 80 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 90 */ 1889, 1889, 1889, 1889, 1889, 1889, 1986, 1889, 1889, 1889, + /* 100 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 110 */ 1889, 1889, 1889, 1984, 2427, 1889, 1889, 1889, 1889, 1889, + /* 120 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 130 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2439, 1889, + /* 140 */ 1889, 1960, 1960, 1889, 2439, 2439, 2439, 1984, 2399, 2399, + /* 150 */ 1889, 1889, 1986, 2262, 1889, 1889, 1889, 1889, 1889, 1889, + /* 160 */ 1889, 1889, 2109, 1919, 1889, 1889, 1889, 1889, 2133, 1889, + /* 170 */ 1889, 1889, 2250, 1889, 1889, 2468, 2529, 1889, 2471, 1889, + /* 180 */ 1889, 1889, 1889, 1889, 2199, 1889, 2458, 1889, 1889, 1889, + /* 190 */ 1889, 1889, 1889, 1889, 1889, 1889, 2062, 2244, 1889, 1889, + /* 200 */ 1889, 2431, 2445, 2513, 2432, 2429, 2452, 1889, 2462, 1889, + /* 210 */ 2287, 1889, 2276, 1986, 1889, 1986, 2237, 2182, 1889, 2192, + /* 220 */ 1889, 2192, 2189, 1889, 1889, 1889, 2192, 2189, 2189, 2051, + /* 230 */ 2047, 1889, 2045, 1889, 1889, 1889, 1889, 1944, 1889, 1944, + /* 240 */ 1889, 1986, 1986, 1889, 1986, 1889, 1889, 1986, 1889, 1986, + /* 250 */ 1889, 1986, 1986, 1889, 1986, 1889, 1889, 1889, 1889, 1889, + /* 260 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 270 */ 1889, 1889, 1889, 1889, 2274, 2260, 1889, 1984, 1889, 2248, + /* 280 */ 2246, 1889, 1984, 2462, 1889, 1889, 2483, 2478, 2483, 2478, + /* 290 */ 2497, 2493, 2483, 2502, 2499, 2464, 2462, 2532, 2519, 2515, + /* 300 */ 2445, 1889, 1889, 2450, 2448, 1889, 1984, 1984, 2478, 1889, + /* 310 */ 1889, 1889, 1889, 2478, 1889, 1889, 1984, 1889, 1984, 1889, + /* 320 */ 1889, 2078, 1889, 1889, 1984, 1889, 1928, 1889, 2239, 2265, + /* 330 */ 2220, 2220, 2112, 2112, 2112, 1987, 1894, 1889, 1889, 1889, + /* 340 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2496, + /* 350 */ 2495, 2352, 1889, 2403, 2402, 2401, 2392, 2351, 2074, 1889, + /* 360 */ 1889, 2350, 2349, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 370 */ 1889, 2211, 2210, 2343, 1889, 1889, 2344, 2342, 2341, 1889, + /* 380 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 390 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 400 */ 1889, 1889, 1889, 2516, 2520, 1889, 1889, 1889, 1889, 1889, + /* 410 */ 1889, 2428, 1889, 1889, 1889, 2323, 1889, 1889, 1889, 1889, + /* 420 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 430 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 440 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 450 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 460 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 470 */ 2188, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 480 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 490 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 500 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 510 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 520 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 530 */ 2203, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 540 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 550 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 560 */ 1889, 1889, 1933, 2330, 1889, 1889, 1889, 1889, 1889, 1889, + /* 570 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2333, 1889, 1889, + /* 580 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 590 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 600 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 610 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2026, 2025, + /* 620 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 630 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 640 */ 1889, 1889, 1889, 1889, 2334, 1889, 1889, 1889, 1889, 1889, + /* 650 */ 2325, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 660 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2512, 2465, 1889, + /* 670 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 680 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 690 */ 2323, 1889, 2494, 1889, 1889, 2510, 1889, 2514, 1889, 1889, + /* 700 */ 1889, 1889, 1889, 1889, 1889, 2438, 2434, 1889, 1889, 2430, + /* 710 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 720 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2322, 1889, 2389, + /* 730 */ 1889, 1889, 1889, 2423, 1889, 1889, 2374, 1889, 1889, 1889, + /* 740 */ 1889, 1889, 1889, 1889, 1889, 1889, 2334, 1889, 2337, 1889, + /* 750 */ 1889, 1889, 1889, 1889, 2106, 1889, 1889, 1889, 1889, 1889, + /* 760 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 770 */ 2090, 2088, 2087, 2086, 1889, 2119, 1889, 1889, 1889, 2115, + /* 780 */ 2114, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 790 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2005, 1889, 1889, + /* 800 */ 1889, 1889, 1889, 1889, 1889, 1889, 1997, 1889, 1996, 1889, + /* 810 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 820 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 830 */ 1889, 1889, 1889, 1889, 1889, 1889, 1918, 1889, 1889, 1889, + /* 840 */ 1889, 1889, 1889, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1559,7 +1527,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* BWLIMIT => nothing */ 0, /* START => nothing */ 0, /* TIMESTAMP => nothing */ - 297, /* END => ABORT */ + 298, /* END => ABORT */ 0, /* TABLE => nothing */ 0, /* NK_LP => nothing */ 0, /* NK_RP => nothing */ @@ -1627,7 +1595,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* VNODES => nothing */ 0, /* ALIVE => nothing */ 0, /* VIEWS => nothing */ - 297, /* VIEW => ABORT */ + 298, /* VIEW => ABORT */ 0, /* COMPACTS => nothing */ 0, /* NORMAL => nothing */ 0, /* CHILD => nothing */ @@ -1733,6 +1701,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* SESSION => nothing */ 0, /* STATE_WINDOW => nothing */ 0, /* EVENT_WINDOW => nothing */ + 0, /* COUNT_WINDOW => nothing */ 0, /* SLIDING => nothing */ 0, /* FILL => nothing */ 0, /* VALUE => nothing */ @@ -1753,55 +1722,55 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ABORT => nothing */ - 297, /* AFTER => ABORT */ - 297, /* ATTACH => ABORT */ - 297, /* BEFORE => ABORT */ - 297, /* BEGIN => ABORT */ - 297, /* BITAND => ABORT */ - 297, /* BITNOT => ABORT */ - 297, /* BITOR => ABORT */ - 297, /* BLOCKS => ABORT */ - 297, /* CHANGE => ABORT */ - 297, /* COMMA => ABORT */ - 297, /* CONCAT => ABORT */ - 297, /* CONFLICT => ABORT */ - 297, /* COPY => ABORT */ - 297, /* DEFERRED => ABORT */ - 297, /* DELIMITERS => ABORT */ - 297, /* DETACH => ABORT */ - 297, /* DIVIDE => ABORT */ - 297, /* DOT => ABORT */ - 297, /* EACH => ABORT */ - 297, /* FAIL => ABORT */ - 297, /* FILE => ABORT */ - 297, /* FOR => ABORT */ - 297, /* GLOB => ABORT */ - 297, /* ID => ABORT */ - 297, /* IMMEDIATE => ABORT */ - 297, /* IMPORT => ABORT */ - 297, /* INITIALLY => ABORT */ - 297, /* INSTEAD => ABORT */ - 297, /* ISNULL => ABORT */ - 297, /* KEY => ABORT */ - 297, /* MODULES => ABORT */ - 297, /* NK_BITNOT => ABORT */ - 297, /* NK_SEMI => ABORT */ - 297, /* NOTNULL => ABORT */ - 297, /* OF => ABORT */ - 297, /* PLUS => ABORT */ - 297, /* PRIVILEGE => ABORT */ - 297, /* RAISE => ABORT */ - 297, /* RESTRICT => ABORT */ - 297, /* ROW => ABORT */ - 297, /* SEMI => ABORT */ - 297, /* STAR => ABORT */ - 297, /* STATEMENT => ABORT */ - 297, /* STRICT => ABORT */ - 297, /* STRING => ABORT */ - 297, /* TIMES => ABORT */ - 297, /* VALUES => ABORT */ - 297, /* VARIABLE => ABORT */ - 297, /* WAL => ABORT */ + 298, /* AFTER => ABORT */ + 298, /* ATTACH => ABORT */ + 298, /* BEFORE => ABORT */ + 298, /* BEGIN => ABORT */ + 298, /* BITAND => ABORT */ + 298, /* BITNOT => ABORT */ + 298, /* BITOR => ABORT */ + 298, /* BLOCKS => ABORT */ + 298, /* CHANGE => ABORT */ + 298, /* COMMA => ABORT */ + 298, /* CONCAT => ABORT */ + 298, /* CONFLICT => ABORT */ + 298, /* COPY => ABORT */ + 298, /* DEFERRED => ABORT */ + 298, /* DELIMITERS => ABORT */ + 298, /* DETACH => ABORT */ + 298, /* DIVIDE => ABORT */ + 298, /* DOT => ABORT */ + 298, /* EACH => ABORT */ + 298, /* FAIL => ABORT */ + 298, /* FILE => ABORT */ + 298, /* FOR => ABORT */ + 298, /* GLOB => ABORT */ + 298, /* ID => ABORT */ + 298, /* IMMEDIATE => ABORT */ + 298, /* IMPORT => ABORT */ + 298, /* INITIALLY => ABORT */ + 298, /* INSTEAD => ABORT */ + 298, /* ISNULL => ABORT */ + 298, /* KEY => ABORT */ + 298, /* MODULES => ABORT */ + 298, /* NK_BITNOT => ABORT */ + 298, /* NK_SEMI => ABORT */ + 298, /* NOTNULL => ABORT */ + 298, /* OF => ABORT */ + 298, /* PLUS => ABORT */ + 298, /* PRIVILEGE => ABORT */ + 298, /* RAISE => ABORT */ + 298, /* RESTRICT => ABORT */ + 298, /* ROW => ABORT */ + 298, /* SEMI => ABORT */ + 298, /* STAR => ABORT */ + 298, /* STATEMENT => ABORT */ + 298, /* STRICT => ABORT */ + 298, /* STRING => ABORT */ + 298, /* TIMES => ABORT */ + 298, /* VALUES => ABORT */ + 298, /* VARIABLE => ABORT */ + 298, /* WAL => ABORT */ }; #endif /* YYFALLBACK */ @@ -2168,236 +2137,237 @@ static const char *const yyTokenName[] = { /* 275 */ "SESSION", /* 276 */ "STATE_WINDOW", /* 277 */ "EVENT_WINDOW", - /* 278 */ "SLIDING", - /* 279 */ "FILL", - /* 280 */ "VALUE", - /* 281 */ "VALUE_F", - /* 282 */ "NONE", - /* 283 */ "PREV", - /* 284 */ "NULL_F", - /* 285 */ "LINEAR", - /* 286 */ "NEXT", - /* 287 */ "HAVING", - /* 288 */ "RANGE", - /* 289 */ "EVERY", - /* 290 */ "ORDER", - /* 291 */ "SLIMIT", - /* 292 */ "SOFFSET", - /* 293 */ "LIMIT", - /* 294 */ "OFFSET", - /* 295 */ "ASC", - /* 296 */ "NULLS", - /* 297 */ "ABORT", - /* 298 */ "AFTER", - /* 299 */ "ATTACH", - /* 300 */ "BEFORE", - /* 301 */ "BEGIN", - /* 302 */ "BITAND", - /* 303 */ "BITNOT", - /* 304 */ "BITOR", - /* 305 */ "BLOCKS", - /* 306 */ "CHANGE", - /* 307 */ "COMMA", - /* 308 */ "CONCAT", - /* 309 */ "CONFLICT", - /* 310 */ "COPY", - /* 311 */ "DEFERRED", - /* 312 */ "DELIMITERS", - /* 313 */ "DETACH", - /* 314 */ "DIVIDE", - /* 315 */ "DOT", - /* 316 */ "EACH", - /* 317 */ "FAIL", - /* 318 */ "FILE", - /* 319 */ "FOR", - /* 320 */ "GLOB", - /* 321 */ "ID", - /* 322 */ "IMMEDIATE", - /* 323 */ "IMPORT", - /* 324 */ "INITIALLY", - /* 325 */ "INSTEAD", - /* 326 */ "ISNULL", - /* 327 */ "KEY", - /* 328 */ "MODULES", - /* 329 */ "NK_BITNOT", - /* 330 */ "NK_SEMI", - /* 331 */ "NOTNULL", - /* 332 */ "OF", - /* 333 */ "PLUS", - /* 334 */ "PRIVILEGE", - /* 335 */ "RAISE", - /* 336 */ "RESTRICT", - /* 337 */ "ROW", - /* 338 */ "SEMI", - /* 339 */ "STAR", - /* 340 */ "STATEMENT", - /* 341 */ "STRICT", - /* 342 */ "STRING", - /* 343 */ "TIMES", - /* 344 */ "VALUES", - /* 345 */ "VARIABLE", - /* 346 */ "WAL", - /* 347 */ "cmd", - /* 348 */ "account_options", - /* 349 */ "alter_account_options", - /* 350 */ "literal", - /* 351 */ "alter_account_option", - /* 352 */ "ip_range_list", - /* 353 */ "white_list", - /* 354 */ "white_list_opt", - /* 355 */ "user_name", - /* 356 */ "sysinfo_opt", - /* 357 */ "privileges", - /* 358 */ "priv_level", - /* 359 */ "with_opt", - /* 360 */ "priv_type_list", - /* 361 */ "priv_type", - /* 362 */ "db_name", - /* 363 */ "table_name", - /* 364 */ "topic_name", - /* 365 */ "search_condition", - /* 366 */ "dnode_endpoint", - /* 367 */ "force_opt", - /* 368 */ "unsafe_opt", - /* 369 */ "not_exists_opt", - /* 370 */ "db_options", - /* 371 */ "exists_opt", - /* 372 */ "alter_db_options", - /* 373 */ "speed_opt", - /* 374 */ "start_opt", - /* 375 */ "end_opt", - /* 376 */ "integer_list", - /* 377 */ "variable_list", - /* 378 */ "retention_list", - /* 379 */ "signed", - /* 380 */ "alter_db_option", - /* 381 */ "retention", - /* 382 */ "full_table_name", - /* 383 */ "column_def_list", - /* 384 */ "tags_def_opt", - /* 385 */ "table_options", - /* 386 */ "multi_create_clause", - /* 387 */ "tags_def", - /* 388 */ "multi_drop_clause", - /* 389 */ "alter_table_clause", - /* 390 */ "alter_table_options", - /* 391 */ "column_name", - /* 392 */ "type_name", - /* 393 */ "signed_literal", - /* 394 */ "create_subtable_clause", - /* 395 */ "specific_cols_opt", - /* 396 */ "expression_list", - /* 397 */ "drop_table_clause", - /* 398 */ "col_name_list", - /* 399 */ "column_def", - /* 400 */ "duration_list", - /* 401 */ "rollup_func_list", - /* 402 */ "alter_table_option", - /* 403 */ "duration_literal", - /* 404 */ "rollup_func_name", - /* 405 */ "function_name", - /* 406 */ "col_name", - /* 407 */ "db_kind_opt", - /* 408 */ "table_kind_db_name_cond_opt", - /* 409 */ "like_pattern_opt", - /* 410 */ "db_name_cond_opt", - /* 411 */ "table_name_cond", - /* 412 */ "from_db_opt", - /* 413 */ "tag_list_opt", - /* 414 */ "table_kind", - /* 415 */ "tag_item", - /* 416 */ "column_alias", - /* 417 */ "index_options", - /* 418 */ "full_index_name", - /* 419 */ "index_name", - /* 420 */ "func_list", - /* 421 */ "sliding_opt", - /* 422 */ "sma_stream_opt", - /* 423 */ "func", - /* 424 */ "sma_func_name", - /* 425 */ "with_meta", - /* 426 */ "query_or_subquery", - /* 427 */ "where_clause_opt", - /* 428 */ "cgroup_name", - /* 429 */ "analyze_opt", - /* 430 */ "explain_options", - /* 431 */ "insert_query", - /* 432 */ "or_replace_opt", - /* 433 */ "agg_func_opt", - /* 434 */ "bufsize_opt", - /* 435 */ "language_opt", - /* 436 */ "full_view_name", - /* 437 */ "view_name", - /* 438 */ "stream_name", - /* 439 */ "stream_options", - /* 440 */ "col_list_opt", - /* 441 */ "tag_def_or_ref_opt", - /* 442 */ "subtable_opt", - /* 443 */ "ignore_opt", - /* 444 */ "expression", - /* 445 */ "on_vgroup_id", - /* 446 */ "dnode_list", - /* 447 */ "literal_func", - /* 448 */ "literal_list", - /* 449 */ "table_alias", - /* 450 */ "expr_or_subquery", - /* 451 */ "pseudo_column", - /* 452 */ "column_reference", - /* 453 */ "function_expression", - /* 454 */ "case_when_expression", - /* 455 */ "star_func", - /* 456 */ "star_func_para_list", - /* 457 */ "noarg_func", - /* 458 */ "other_para_list", - /* 459 */ "star_func_para", - /* 460 */ "when_then_list", - /* 461 */ "case_when_else_opt", - /* 462 */ "common_expression", - /* 463 */ "when_then_expr", - /* 464 */ "predicate", - /* 465 */ "compare_op", - /* 466 */ "in_op", - /* 467 */ "in_predicate_value", - /* 468 */ "boolean_value_expression", - /* 469 */ "boolean_primary", - /* 470 */ "from_clause_opt", - /* 471 */ "table_reference_list", - /* 472 */ "table_reference", - /* 473 */ "table_primary", - /* 474 */ "joined_table", - /* 475 */ "alias_opt", - /* 476 */ "subquery", - /* 477 */ "parenthesized_joined_table", - /* 478 */ "join_type", - /* 479 */ "query_specification", - /* 480 */ "hint_list", - /* 481 */ "set_quantifier_opt", - /* 482 */ "tag_mode_opt", - /* 483 */ "select_list", - /* 484 */ "partition_by_clause_opt", - /* 485 */ "range_opt", - /* 486 */ "every_opt", - /* 487 */ "fill_opt", - /* 488 */ "twindow_clause_opt", - /* 489 */ "group_by_clause_opt", - /* 490 */ "having_clause_opt", - /* 491 */ "select_item", - /* 492 */ "partition_list", - /* 493 */ "partition_item", - /* 494 */ "interval_sliding_duration_literal", - /* 495 */ "fill_mode", - /* 496 */ "group_by_list", - /* 497 */ "query_expression", - /* 498 */ "query_simple", - /* 499 */ "order_by_clause_opt", - /* 500 */ "slimit_clause_opt", - /* 501 */ "limit_clause_opt", - /* 502 */ "union_query_expression", - /* 503 */ "query_simple_or_subquery", - /* 504 */ "sort_specification_list", - /* 505 */ "sort_specification", - /* 506 */ "ordering_specification_opt", - /* 507 */ "null_ordering_opt", + /* 278 */ "COUNT_WINDOW", + /* 279 */ "SLIDING", + /* 280 */ "FILL", + /* 281 */ "VALUE", + /* 282 */ "VALUE_F", + /* 283 */ "NONE", + /* 284 */ "PREV", + /* 285 */ "NULL_F", + /* 286 */ "LINEAR", + /* 287 */ "NEXT", + /* 288 */ "HAVING", + /* 289 */ "RANGE", + /* 290 */ "EVERY", + /* 291 */ "ORDER", + /* 292 */ "SLIMIT", + /* 293 */ "SOFFSET", + /* 294 */ "LIMIT", + /* 295 */ "OFFSET", + /* 296 */ "ASC", + /* 297 */ "NULLS", + /* 298 */ "ABORT", + /* 299 */ "AFTER", + /* 300 */ "ATTACH", + /* 301 */ "BEFORE", + /* 302 */ "BEGIN", + /* 303 */ "BITAND", + /* 304 */ "BITNOT", + /* 305 */ "BITOR", + /* 306 */ "BLOCKS", + /* 307 */ "CHANGE", + /* 308 */ "COMMA", + /* 309 */ "CONCAT", + /* 310 */ "CONFLICT", + /* 311 */ "COPY", + /* 312 */ "DEFERRED", + /* 313 */ "DELIMITERS", + /* 314 */ "DETACH", + /* 315 */ "DIVIDE", + /* 316 */ "DOT", + /* 317 */ "EACH", + /* 318 */ "FAIL", + /* 319 */ "FILE", + /* 320 */ "FOR", + /* 321 */ "GLOB", + /* 322 */ "ID", + /* 323 */ "IMMEDIATE", + /* 324 */ "IMPORT", + /* 325 */ "INITIALLY", + /* 326 */ "INSTEAD", + /* 327 */ "ISNULL", + /* 328 */ "KEY", + /* 329 */ "MODULES", + /* 330 */ "NK_BITNOT", + /* 331 */ "NK_SEMI", + /* 332 */ "NOTNULL", + /* 333 */ "OF", + /* 334 */ "PLUS", + /* 335 */ "PRIVILEGE", + /* 336 */ "RAISE", + /* 337 */ "RESTRICT", + /* 338 */ "ROW", + /* 339 */ "SEMI", + /* 340 */ "STAR", + /* 341 */ "STATEMENT", + /* 342 */ "STRICT", + /* 343 */ "STRING", + /* 344 */ "TIMES", + /* 345 */ "VALUES", + /* 346 */ "VARIABLE", + /* 347 */ "WAL", + /* 348 */ "cmd", + /* 349 */ "account_options", + /* 350 */ "alter_account_options", + /* 351 */ "literal", + /* 352 */ "alter_account_option", + /* 353 */ "ip_range_list", + /* 354 */ "white_list", + /* 355 */ "white_list_opt", + /* 356 */ "user_name", + /* 357 */ "sysinfo_opt", + /* 358 */ "privileges", + /* 359 */ "priv_level", + /* 360 */ "with_opt", + /* 361 */ "priv_type_list", + /* 362 */ "priv_type", + /* 363 */ "db_name", + /* 364 */ "table_name", + /* 365 */ "topic_name", + /* 366 */ "search_condition", + /* 367 */ "dnode_endpoint", + /* 368 */ "force_opt", + /* 369 */ "unsafe_opt", + /* 370 */ "not_exists_opt", + /* 371 */ "db_options", + /* 372 */ "exists_opt", + /* 373 */ "alter_db_options", + /* 374 */ "speed_opt", + /* 375 */ "start_opt", + /* 376 */ "end_opt", + /* 377 */ "integer_list", + /* 378 */ "variable_list", + /* 379 */ "retention_list", + /* 380 */ "signed", + /* 381 */ "alter_db_option", + /* 382 */ "retention", + /* 383 */ "full_table_name", + /* 384 */ "column_def_list", + /* 385 */ "tags_def_opt", + /* 386 */ "table_options", + /* 387 */ "multi_create_clause", + /* 388 */ "tags_def", + /* 389 */ "multi_drop_clause", + /* 390 */ "alter_table_clause", + /* 391 */ "alter_table_options", + /* 392 */ "column_name", + /* 393 */ "type_name", + /* 394 */ "signed_literal", + /* 395 */ "create_subtable_clause", + /* 396 */ "specific_cols_opt", + /* 397 */ "expression_list", + /* 398 */ "drop_table_clause", + /* 399 */ "col_name_list", + /* 400 */ "column_def", + /* 401 */ "duration_list", + /* 402 */ "rollup_func_list", + /* 403 */ "alter_table_option", + /* 404 */ "duration_literal", + /* 405 */ "rollup_func_name", + /* 406 */ "function_name", + /* 407 */ "col_name", + /* 408 */ "db_kind_opt", + /* 409 */ "table_kind_db_name_cond_opt", + /* 410 */ "like_pattern_opt", + /* 411 */ "db_name_cond_opt", + /* 412 */ "table_name_cond", + /* 413 */ "from_db_opt", + /* 414 */ "tag_list_opt", + /* 415 */ "table_kind", + /* 416 */ "tag_item", + /* 417 */ "column_alias", + /* 418 */ "index_options", + /* 419 */ "full_index_name", + /* 420 */ "index_name", + /* 421 */ "func_list", + /* 422 */ "sliding_opt", + /* 423 */ "sma_stream_opt", + /* 424 */ "func", + /* 425 */ "sma_func_name", + /* 426 */ "with_meta", + /* 427 */ "query_or_subquery", + /* 428 */ "where_clause_opt", + /* 429 */ "cgroup_name", + /* 430 */ "analyze_opt", + /* 431 */ "explain_options", + /* 432 */ "insert_query", + /* 433 */ "or_replace_opt", + /* 434 */ "agg_func_opt", + /* 435 */ "bufsize_opt", + /* 436 */ "language_opt", + /* 437 */ "full_view_name", + /* 438 */ "view_name", + /* 439 */ "stream_name", + /* 440 */ "stream_options", + /* 441 */ "col_list_opt", + /* 442 */ "tag_def_or_ref_opt", + /* 443 */ "subtable_opt", + /* 444 */ "ignore_opt", + /* 445 */ "expression", + /* 446 */ "on_vgroup_id", + /* 447 */ "dnode_list", + /* 448 */ "literal_func", + /* 449 */ "literal_list", + /* 450 */ "table_alias", + /* 451 */ "expr_or_subquery", + /* 452 */ "pseudo_column", + /* 453 */ "column_reference", + /* 454 */ "function_expression", + /* 455 */ "case_when_expression", + /* 456 */ "star_func", + /* 457 */ "star_func_para_list", + /* 458 */ "noarg_func", + /* 459 */ "other_para_list", + /* 460 */ "star_func_para", + /* 461 */ "when_then_list", + /* 462 */ "case_when_else_opt", + /* 463 */ "common_expression", + /* 464 */ "when_then_expr", + /* 465 */ "predicate", + /* 466 */ "compare_op", + /* 467 */ "in_op", + /* 468 */ "in_predicate_value", + /* 469 */ "boolean_value_expression", + /* 470 */ "boolean_primary", + /* 471 */ "from_clause_opt", + /* 472 */ "table_reference_list", + /* 473 */ "table_reference", + /* 474 */ "table_primary", + /* 475 */ "joined_table", + /* 476 */ "alias_opt", + /* 477 */ "subquery", + /* 478 */ "parenthesized_joined_table", + /* 479 */ "join_type", + /* 480 */ "query_specification", + /* 481 */ "hint_list", + /* 482 */ "set_quantifier_opt", + /* 483 */ "tag_mode_opt", + /* 484 */ "select_list", + /* 485 */ "partition_by_clause_opt", + /* 486 */ "range_opt", + /* 487 */ "every_opt", + /* 488 */ "fill_opt", + /* 489 */ "twindow_clause_opt", + /* 490 */ "group_by_clause_opt", + /* 491 */ "having_clause_opt", + /* 492 */ "select_item", + /* 493 */ "partition_list", + /* 494 */ "partition_item", + /* 495 */ "interval_sliding_duration_literal", + /* 496 */ "fill_mode", + /* 497 */ "group_by_list", + /* 498 */ "query_expression", + /* 499 */ "query_simple", + /* 500 */ "order_by_clause_opt", + /* 501 */ "slimit_clause_opt", + /* 502 */ "limit_clause_opt", + /* 503 */ "union_query_expression", + /* 504 */ "query_simple_or_subquery", + /* 505 */ "sort_specification_list", + /* 506 */ "sort_specification", + /* 507 */ "ordering_specification_opt", + /* 508 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -2990,63 +2960,64 @@ static const char *const yyRuleName[] = { /* 582 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", /* 583 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", /* 584 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 585 */ "sliding_opt ::=", - /* 586 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", - /* 587 */ "interval_sliding_duration_literal ::= NK_VARIABLE", - /* 588 */ "interval_sliding_duration_literal ::= NK_STRING", - /* 589 */ "interval_sliding_duration_literal ::= NK_INTEGER", - /* 590 */ "fill_opt ::=", - /* 591 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 592 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", - /* 593 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", - /* 594 */ "fill_mode ::= NONE", - /* 595 */ "fill_mode ::= PREV", - /* 596 */ "fill_mode ::= NULL", - /* 597 */ "fill_mode ::= NULL_F", - /* 598 */ "fill_mode ::= LINEAR", - /* 599 */ "fill_mode ::= NEXT", - /* 600 */ "group_by_clause_opt ::=", - /* 601 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 602 */ "group_by_list ::= expr_or_subquery", - /* 603 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 604 */ "having_clause_opt ::=", - /* 605 */ "having_clause_opt ::= HAVING search_condition", - /* 606 */ "range_opt ::=", - /* 607 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 608 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", - /* 609 */ "every_opt ::=", - /* 610 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 611 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 612 */ "query_simple ::= query_specification", - /* 613 */ "query_simple ::= union_query_expression", - /* 614 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 615 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 616 */ "query_simple_or_subquery ::= query_simple", - /* 617 */ "query_simple_or_subquery ::= subquery", - /* 618 */ "query_or_subquery ::= query_expression", - /* 619 */ "query_or_subquery ::= subquery", - /* 620 */ "order_by_clause_opt ::=", - /* 621 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 622 */ "slimit_clause_opt ::=", - /* 623 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 624 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 625 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 626 */ "limit_clause_opt ::=", - /* 627 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 628 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 629 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 630 */ "subquery ::= NK_LP query_expression NK_RP", - /* 631 */ "subquery ::= NK_LP subquery NK_RP", - /* 632 */ "search_condition ::= common_expression", - /* 633 */ "sort_specification_list ::= sort_specification", - /* 634 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 635 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 636 */ "ordering_specification_opt ::=", - /* 637 */ "ordering_specification_opt ::= ASC", - /* 638 */ "ordering_specification_opt ::= DESC", - /* 639 */ "null_ordering_opt ::=", - /* 640 */ "null_ordering_opt ::= NULLS FIRST", - /* 641 */ "null_ordering_opt ::= NULLS LAST", + /* 585 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", + /* 586 */ "sliding_opt ::=", + /* 587 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", + /* 588 */ "interval_sliding_duration_literal ::= NK_VARIABLE", + /* 589 */ "interval_sliding_duration_literal ::= NK_STRING", + /* 590 */ "interval_sliding_duration_literal ::= NK_INTEGER", + /* 591 */ "fill_opt ::=", + /* 592 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 593 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", + /* 594 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", + /* 595 */ "fill_mode ::= NONE", + /* 596 */ "fill_mode ::= PREV", + /* 597 */ "fill_mode ::= NULL", + /* 598 */ "fill_mode ::= NULL_F", + /* 599 */ "fill_mode ::= LINEAR", + /* 600 */ "fill_mode ::= NEXT", + /* 601 */ "group_by_clause_opt ::=", + /* 602 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 603 */ "group_by_list ::= expr_or_subquery", + /* 604 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 605 */ "having_clause_opt ::=", + /* 606 */ "having_clause_opt ::= HAVING search_condition", + /* 607 */ "range_opt ::=", + /* 608 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 609 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", + /* 610 */ "every_opt ::=", + /* 611 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 612 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 613 */ "query_simple ::= query_specification", + /* 614 */ "query_simple ::= union_query_expression", + /* 615 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 616 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 617 */ "query_simple_or_subquery ::= query_simple", + /* 618 */ "query_simple_or_subquery ::= subquery", + /* 619 */ "query_or_subquery ::= query_expression", + /* 620 */ "query_or_subquery ::= subquery", + /* 621 */ "order_by_clause_opt ::=", + /* 622 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 623 */ "slimit_clause_opt ::=", + /* 624 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 625 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 626 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 627 */ "limit_clause_opt ::=", + /* 628 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 629 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 630 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 631 */ "subquery ::= NK_LP query_expression NK_RP", + /* 632 */ "subquery ::= NK_LP subquery NK_RP", + /* 633 */ "search_condition ::= common_expression", + /* 634 */ "sort_specification_list ::= sort_specification", + /* 635 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 636 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 637 */ "ordering_specification_opt ::=", + /* 638 */ "ordering_specification_opt ::= ASC", + /* 639 */ "ordering_specification_opt ::= DESC", + /* 640 */ "null_ordering_opt ::=", + /* 641 */ "null_ordering_opt ::= NULLS FIRST", + /* 642 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -3173,267 +3144,233 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 347: /* cmd */ - case 350: /* literal */ - case 359: /* with_opt */ - case 365: /* search_condition */ - case 370: /* db_options */ - case 372: /* alter_db_options */ - case 374: /* start_opt */ - case 375: /* end_opt */ - case 379: /* signed */ - case 381: /* retention */ - case 382: /* full_table_name */ - case 385: /* table_options */ - case 389: /* alter_table_clause */ - case 390: /* alter_table_options */ - case 393: /* signed_literal */ - case 394: /* create_subtable_clause */ - case 397: /* drop_table_clause */ - case 399: /* column_def */ - case 403: /* duration_literal */ - case 404: /* rollup_func_name */ - case 406: /* col_name */ - case 409: /* like_pattern_opt */ - case 410: /* db_name_cond_opt */ - case 411: /* table_name_cond */ - case 412: /* from_db_opt */ - case 415: /* tag_item */ - case 417: /* index_options */ - case 418: /* full_index_name */ - case 421: /* sliding_opt */ - case 422: /* sma_stream_opt */ - case 423: /* func */ - case 426: /* query_or_subquery */ - case 427: /* where_clause_opt */ - case 430: /* explain_options */ - case 431: /* insert_query */ - case 436: /* full_view_name */ - case 439: /* stream_options */ - case 442: /* subtable_opt */ - case 444: /* expression */ - case 447: /* literal_func */ - case 450: /* expr_or_subquery */ - case 451: /* pseudo_column */ - case 452: /* column_reference */ - case 453: /* function_expression */ - case 454: /* case_when_expression */ - case 459: /* star_func_para */ - case 461: /* case_when_else_opt */ - case 462: /* common_expression */ - case 463: /* when_then_expr */ - case 464: /* predicate */ - case 467: /* in_predicate_value */ - case 468: /* boolean_value_expression */ - case 469: /* boolean_primary */ - case 470: /* from_clause_opt */ - case 471: /* table_reference_list */ - case 472: /* table_reference */ - case 473: /* table_primary */ - case 474: /* joined_table */ - case 476: /* subquery */ - case 477: /* parenthesized_joined_table */ - case 479: /* query_specification */ - case 485: /* range_opt */ - case 486: /* every_opt */ - case 487: /* fill_opt */ - case 488: /* twindow_clause_opt */ - case 490: /* having_clause_opt */ - case 491: /* select_item */ - case 493: /* partition_item */ - case 494: /* interval_sliding_duration_literal */ - case 497: /* query_expression */ - case 498: /* query_simple */ - case 500: /* slimit_clause_opt */ - case 501: /* limit_clause_opt */ - case 502: /* union_query_expression */ - case 503: /* query_simple_or_subquery */ - case 505: /* sort_specification */ + case 348: /* cmd */ + case 351: /* literal */ + case 360: /* with_opt */ + case 366: /* search_condition */ + case 371: /* db_options */ + case 373: /* alter_db_options */ + case 375: /* start_opt */ + case 376: /* end_opt */ + case 380: /* signed */ + case 382: /* retention */ + case 383: /* full_table_name */ + case 386: /* table_options */ + case 390: /* alter_table_clause */ + case 391: /* alter_table_options */ + case 394: /* signed_literal */ + case 395: /* create_subtable_clause */ + case 398: /* drop_table_clause */ + case 400: /* column_def */ + case 404: /* duration_literal */ + case 405: /* rollup_func_name */ + case 407: /* col_name */ + case 410: /* like_pattern_opt */ + case 411: /* db_name_cond_opt */ + case 412: /* table_name_cond */ + case 413: /* from_db_opt */ + case 416: /* tag_item */ + case 418: /* index_options */ + case 419: /* full_index_name */ + case 422: /* sliding_opt */ + case 423: /* sma_stream_opt */ + case 424: /* func */ + case 427: /* query_or_subquery */ + case 428: /* where_clause_opt */ + case 431: /* explain_options */ + case 432: /* insert_query */ + case 437: /* full_view_name */ + case 440: /* stream_options */ + case 443: /* subtable_opt */ + case 445: /* expression */ + case 448: /* literal_func */ + case 451: /* expr_or_subquery */ + case 452: /* pseudo_column */ + case 453: /* column_reference */ + case 454: /* function_expression */ + case 455: /* case_when_expression */ + case 460: /* star_func_para */ + case 462: /* case_when_else_opt */ + case 463: /* common_expression */ + case 464: /* when_then_expr */ + case 465: /* predicate */ + case 468: /* in_predicate_value */ + case 469: /* boolean_value_expression */ + case 470: /* boolean_primary */ + case 471: /* from_clause_opt */ + case 472: /* table_reference_list */ + case 473: /* table_reference */ + case 474: /* table_primary */ + case 475: /* joined_table */ + case 477: /* subquery */ + case 478: /* parenthesized_joined_table */ + case 480: /* query_specification */ + case 486: /* range_opt */ + case 487: /* every_opt */ + case 488: /* fill_opt */ + case 489: /* twindow_clause_opt */ + case 491: /* having_clause_opt */ + case 492: /* select_item */ + case 494: /* partition_item */ + case 495: /* interval_sliding_duration_literal */ + case 498: /* query_expression */ + case 499: /* query_simple */ + case 501: /* slimit_clause_opt */ + case 502: /* limit_clause_opt */ + case 503: /* union_query_expression */ + case 504: /* query_simple_or_subquery */ + case 506: /* sort_specification */ { -#line 7 "sql.y" - nodesDestroyNode((yypminor->yy232)); -#line 3255 "sql.c" + nodesDestroyNode((yypminor->yy890)); } break; - case 348: /* account_options */ - case 349: /* alter_account_options */ - case 351: /* alter_account_option */ - case 373: /* speed_opt */ - case 425: /* with_meta */ - case 434: /* bufsize_opt */ + case 349: /* account_options */ + case 350: /* alter_account_options */ + case 352: /* alter_account_option */ + case 374: /* speed_opt */ + case 426: /* with_meta */ + case 435: /* bufsize_opt */ { -#line 54 "sql.y" -#line 3267 "sql.c" } break; - case 352: /* ip_range_list */ - case 353: /* white_list */ - case 354: /* white_list_opt */ - case 376: /* integer_list */ - case 377: /* variable_list */ - case 378: /* retention_list */ - case 383: /* column_def_list */ - case 384: /* tags_def_opt */ - case 386: /* multi_create_clause */ - case 387: /* tags_def */ - case 388: /* multi_drop_clause */ - case 395: /* specific_cols_opt */ - case 396: /* expression_list */ - case 398: /* col_name_list */ - case 400: /* duration_list */ - case 401: /* rollup_func_list */ - case 413: /* tag_list_opt */ - case 420: /* func_list */ - case 440: /* col_list_opt */ - case 441: /* tag_def_or_ref_opt */ - case 446: /* dnode_list */ - case 448: /* literal_list */ - case 456: /* star_func_para_list */ - case 458: /* other_para_list */ - case 460: /* when_then_list */ - case 480: /* hint_list */ - case 483: /* select_list */ - case 484: /* partition_by_clause_opt */ - case 489: /* group_by_clause_opt */ - case 492: /* partition_list */ - case 496: /* group_by_list */ - case 499: /* order_by_clause_opt */ - case 504: /* sort_specification_list */ + case 353: /* ip_range_list */ + case 354: /* white_list */ + case 355: /* white_list_opt */ + case 377: /* integer_list */ + case 378: /* variable_list */ + case 379: /* retention_list */ + case 384: /* column_def_list */ + case 385: /* tags_def_opt */ + case 387: /* multi_create_clause */ + case 388: /* tags_def */ + case 389: /* multi_drop_clause */ + case 396: /* specific_cols_opt */ + case 397: /* expression_list */ + case 399: /* col_name_list */ + case 401: /* duration_list */ + case 402: /* rollup_func_list */ + case 414: /* tag_list_opt */ + case 421: /* func_list */ + case 441: /* col_list_opt */ + case 442: /* tag_def_or_ref_opt */ + case 447: /* dnode_list */ + case 449: /* literal_list */ + case 457: /* star_func_para_list */ + case 459: /* other_para_list */ + case 461: /* when_then_list */ + case 481: /* hint_list */ + case 484: /* select_list */ + case 485: /* partition_by_clause_opt */ + case 490: /* group_by_clause_opt */ + case 493: /* partition_list */ + case 497: /* group_by_list */ + case 500: /* order_by_clause_opt */ + case 505: /* sort_specification_list */ { -#line 85 "sql.y" - nodesDestroyList((yypminor->yy88)); -#line 3306 "sql.c" + nodesDestroyList((yypminor->yy200)); } break; - case 355: /* user_name */ - case 362: /* db_name */ - case 363: /* table_name */ - case 364: /* topic_name */ - case 366: /* dnode_endpoint */ - case 391: /* column_name */ - case 405: /* function_name */ - case 416: /* column_alias */ - case 419: /* index_name */ - case 424: /* sma_func_name */ - case 428: /* cgroup_name */ - case 435: /* language_opt */ - case 437: /* view_name */ - case 438: /* stream_name */ - case 445: /* on_vgroup_id */ - case 449: /* table_alias */ - case 455: /* star_func */ - case 457: /* noarg_func */ - case 475: /* alias_opt */ + case 356: /* user_name */ + case 363: /* db_name */ + case 364: /* table_name */ + case 365: /* topic_name */ + case 367: /* dnode_endpoint */ + case 392: /* column_name */ + case 406: /* function_name */ + case 417: /* column_alias */ + case 420: /* index_name */ + case 425: /* sma_func_name */ + case 429: /* cgroup_name */ + case 436: /* language_opt */ + case 438: /* view_name */ + case 439: /* stream_name */ + case 446: /* on_vgroup_id */ + case 450: /* table_alias */ + case 456: /* star_func */ + case 458: /* noarg_func */ + case 476: /* alias_opt */ { -#line 812 "sql.y" -#line 3331 "sql.c" } break; - case 356: /* sysinfo_opt */ + case 357: /* sysinfo_opt */ { -#line 112 "sql.y" -#line 3338 "sql.c" } break; - case 357: /* privileges */ - case 360: /* priv_type_list */ - case 361: /* priv_type */ + case 358: /* privileges */ + case 361: /* priv_type_list */ + case 362: /* priv_type */ { -#line 121 "sql.y" -#line 3347 "sql.c" } break; - case 358: /* priv_level */ + case 359: /* priv_level */ { -#line 138 "sql.y" -#line 3354 "sql.c" } break; - case 367: /* force_opt */ - case 368: /* unsafe_opt */ - case 369: /* not_exists_opt */ - case 371: /* exists_opt */ - case 429: /* analyze_opt */ - case 432: /* or_replace_opt */ - case 433: /* agg_func_opt */ - case 443: /* ignore_opt */ - case 481: /* set_quantifier_opt */ - case 482: /* tag_mode_opt */ + case 368: /* force_opt */ + case 369: /* unsafe_opt */ + case 370: /* not_exists_opt */ + case 372: /* exists_opt */ + case 430: /* analyze_opt */ + case 433: /* or_replace_opt */ + case 434: /* agg_func_opt */ + case 444: /* ignore_opt */ + case 482: /* set_quantifier_opt */ + case 483: /* tag_mode_opt */ { -#line 167 "sql.y" -#line 3370 "sql.c" } break; - case 380: /* alter_db_option */ - case 402: /* alter_table_option */ + case 381: /* alter_db_option */ + case 403: /* alter_table_option */ { -#line 265 "sql.y" -#line 3378 "sql.c" } break; - case 392: /* type_name */ + case 393: /* type_name */ { -#line 388 "sql.y" -#line 3385 "sql.c" } break; - case 407: /* db_kind_opt */ - case 414: /* table_kind */ + case 408: /* db_kind_opt */ + case 415: /* table_kind */ { -#line 553 "sql.y" -#line 3393 "sql.c" } break; - case 408: /* table_kind_db_name_cond_opt */ + case 409: /* table_kind_db_name_cond_opt */ { -#line 518 "sql.y" -#line 3400 "sql.c" } break; - case 465: /* compare_op */ - case 466: /* in_op */ + case 466: /* compare_op */ + case 467: /* in_op */ { -#line 1002 "sql.y" -#line 3408 "sql.c" } break; - case 478: /* join_type */ + case 479: /* join_type */ { -#line 1078 "sql.y" -#line 3415 "sql.c" } break; - case 495: /* fill_mode */ + case 496: /* fill_mode */ { -#line 1169 "sql.y" -#line 3422 "sql.c" } break; - case 506: /* ordering_specification_opt */ + case 507: /* ordering_specification_opt */ { -#line 1254 "sql.y" -#line 3429 "sql.c" } break; - case 507: /* null_ordering_opt */ + case 508: /* null_ordering_opt */ { -#line 1260 "sql.y" -#line 3436 "sql.c" } break; /********* End destructor definitions *****************************************/ @@ -3722,648 +3659,649 @@ static void yy_shift( /* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side ** of that rule */ static const YYCODETYPE yyRuleInfoLhs[] = { - 347, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - 347, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - 348, /* (2) account_options ::= */ - 348, /* (3) account_options ::= account_options PPS literal */ - 348, /* (4) account_options ::= account_options TSERIES literal */ - 348, /* (5) account_options ::= account_options STORAGE literal */ - 348, /* (6) account_options ::= account_options STREAMS literal */ - 348, /* (7) account_options ::= account_options QTIME literal */ - 348, /* (8) account_options ::= account_options DBS literal */ - 348, /* (9) account_options ::= account_options USERS literal */ - 348, /* (10) account_options ::= account_options CONNS literal */ - 348, /* (11) account_options ::= account_options STATE literal */ - 349, /* (12) alter_account_options ::= alter_account_option */ - 349, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - 351, /* (14) alter_account_option ::= PASS literal */ - 351, /* (15) alter_account_option ::= PPS literal */ - 351, /* (16) alter_account_option ::= TSERIES literal */ - 351, /* (17) alter_account_option ::= STORAGE literal */ - 351, /* (18) alter_account_option ::= STREAMS literal */ - 351, /* (19) alter_account_option ::= QTIME literal */ - 351, /* (20) alter_account_option ::= DBS literal */ - 351, /* (21) alter_account_option ::= USERS literal */ - 351, /* (22) alter_account_option ::= CONNS literal */ - 351, /* (23) alter_account_option ::= STATE literal */ - 352, /* (24) ip_range_list ::= NK_STRING */ - 352, /* (25) ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ - 353, /* (26) white_list ::= HOST ip_range_list */ - 354, /* (27) white_list_opt ::= */ - 354, /* (28) white_list_opt ::= white_list */ - 347, /* (29) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ - 347, /* (30) cmd ::= ALTER USER user_name PASS NK_STRING */ - 347, /* (31) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ - 347, /* (32) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ - 347, /* (33) cmd ::= ALTER USER user_name ADD white_list */ - 347, /* (34) cmd ::= ALTER USER user_name DROP white_list */ - 347, /* (35) cmd ::= DROP USER user_name */ - 356, /* (36) sysinfo_opt ::= */ - 356, /* (37) sysinfo_opt ::= SYSINFO NK_INTEGER */ - 347, /* (38) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ - 347, /* (39) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ - 357, /* (40) privileges ::= ALL */ - 357, /* (41) privileges ::= priv_type_list */ - 357, /* (42) privileges ::= SUBSCRIBE */ - 360, /* (43) priv_type_list ::= priv_type */ - 360, /* (44) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - 361, /* (45) priv_type ::= READ */ - 361, /* (46) priv_type ::= WRITE */ - 361, /* (47) priv_type ::= ALTER */ - 358, /* (48) priv_level ::= NK_STAR NK_DOT NK_STAR */ - 358, /* (49) priv_level ::= db_name NK_DOT NK_STAR */ - 358, /* (50) priv_level ::= db_name NK_DOT table_name */ - 358, /* (51) priv_level ::= topic_name */ - 359, /* (52) with_opt ::= */ - 359, /* (53) with_opt ::= WITH search_condition */ - 347, /* (54) cmd ::= CREATE DNODE dnode_endpoint */ - 347, /* (55) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ - 347, /* (56) cmd ::= DROP DNODE NK_INTEGER force_opt */ - 347, /* (57) cmd ::= DROP DNODE dnode_endpoint force_opt */ - 347, /* (58) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ - 347, /* (59) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ - 347, /* (60) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - 347, /* (61) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - 347, /* (62) cmd ::= ALTER ALL DNODES NK_STRING */ - 347, /* (63) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - 347, /* (64) cmd ::= RESTORE DNODE NK_INTEGER */ - 366, /* (65) dnode_endpoint ::= NK_STRING */ - 366, /* (66) dnode_endpoint ::= NK_ID */ - 366, /* (67) dnode_endpoint ::= NK_IPTOKEN */ - 367, /* (68) force_opt ::= */ - 367, /* (69) force_opt ::= FORCE */ - 368, /* (70) unsafe_opt ::= UNSAFE */ - 347, /* (71) cmd ::= ALTER LOCAL NK_STRING */ - 347, /* (72) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - 347, /* (73) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - 347, /* (74) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - 347, /* (75) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ - 347, /* (76) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - 347, /* (77) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - 347, /* (78) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - 347, /* (79) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - 347, /* (80) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - 347, /* (81) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - 347, /* (82) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ - 347, /* (83) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ - 347, /* (84) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - 347, /* (85) cmd ::= DROP DATABASE exists_opt db_name */ - 347, /* (86) cmd ::= USE db_name */ - 347, /* (87) cmd ::= ALTER DATABASE db_name alter_db_options */ - 347, /* (88) cmd ::= FLUSH DATABASE db_name */ - 347, /* (89) cmd ::= TRIM DATABASE db_name speed_opt */ - 347, /* (90) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ - 369, /* (91) not_exists_opt ::= IF NOT EXISTS */ - 369, /* (92) not_exists_opt ::= */ - 371, /* (93) exists_opt ::= IF EXISTS */ - 371, /* (94) exists_opt ::= */ - 370, /* (95) db_options ::= */ - 370, /* (96) db_options ::= db_options BUFFER NK_INTEGER */ - 370, /* (97) db_options ::= db_options CACHEMODEL NK_STRING */ - 370, /* (98) db_options ::= db_options CACHESIZE NK_INTEGER */ - 370, /* (99) db_options ::= db_options COMP NK_INTEGER */ - 370, /* (100) db_options ::= db_options DURATION NK_INTEGER */ - 370, /* (101) db_options ::= db_options DURATION NK_VARIABLE */ - 370, /* (102) db_options ::= db_options MAXROWS NK_INTEGER */ - 370, /* (103) db_options ::= db_options MINROWS NK_INTEGER */ - 370, /* (104) db_options ::= db_options KEEP integer_list */ - 370, /* (105) db_options ::= db_options KEEP variable_list */ - 370, /* (106) db_options ::= db_options PAGES NK_INTEGER */ - 370, /* (107) db_options ::= db_options PAGESIZE NK_INTEGER */ - 370, /* (108) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - 370, /* (109) db_options ::= db_options PRECISION NK_STRING */ - 370, /* (110) db_options ::= db_options REPLICA NK_INTEGER */ - 370, /* (111) db_options ::= db_options VGROUPS NK_INTEGER */ - 370, /* (112) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - 370, /* (113) db_options ::= db_options RETENTIONS retention_list */ - 370, /* (114) db_options ::= db_options SCHEMALESS NK_INTEGER */ - 370, /* (115) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - 370, /* (116) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - 370, /* (117) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - 370, /* (118) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 370, /* (119) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - 370, /* (120) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 370, /* (121) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - 370, /* (122) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - 370, /* (123) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - 370, /* (124) db_options ::= db_options TABLE_PREFIX signed */ - 370, /* (125) db_options ::= db_options TABLE_SUFFIX signed */ - 370, /* (126) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ - 372, /* (127) alter_db_options ::= alter_db_option */ - 372, /* (128) alter_db_options ::= alter_db_options alter_db_option */ - 380, /* (129) alter_db_option ::= BUFFER NK_INTEGER */ - 380, /* (130) alter_db_option ::= CACHEMODEL NK_STRING */ - 380, /* (131) alter_db_option ::= CACHESIZE NK_INTEGER */ - 380, /* (132) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - 380, /* (133) alter_db_option ::= KEEP integer_list */ - 380, /* (134) alter_db_option ::= KEEP variable_list */ - 380, /* (135) alter_db_option ::= PAGES NK_INTEGER */ - 380, /* (136) alter_db_option ::= REPLICA NK_INTEGER */ - 380, /* (137) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - 380, /* (138) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - 380, /* (139) alter_db_option ::= MINROWS NK_INTEGER */ - 380, /* (140) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ - 380, /* (141) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 380, /* (142) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ - 380, /* (143) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 380, /* (144) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ - 376, /* (145) integer_list ::= NK_INTEGER */ - 376, /* (146) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - 377, /* (147) variable_list ::= NK_VARIABLE */ - 377, /* (148) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - 378, /* (149) retention_list ::= retention */ - 378, /* (150) retention_list ::= retention_list NK_COMMA retention */ - 381, /* (151) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - 381, /* (152) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ - 373, /* (153) speed_opt ::= */ - 373, /* (154) speed_opt ::= BWLIMIT NK_INTEGER */ - 374, /* (155) start_opt ::= */ - 374, /* (156) start_opt ::= START WITH NK_INTEGER */ - 374, /* (157) start_opt ::= START WITH NK_STRING */ - 374, /* (158) start_opt ::= START WITH TIMESTAMP NK_STRING */ - 375, /* (159) end_opt ::= */ - 375, /* (160) end_opt ::= END WITH NK_INTEGER */ - 375, /* (161) end_opt ::= END WITH NK_STRING */ - 375, /* (162) end_opt ::= END WITH TIMESTAMP NK_STRING */ - 347, /* (163) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - 347, /* (164) cmd ::= CREATE TABLE multi_create_clause */ - 347, /* (165) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - 347, /* (166) cmd ::= DROP TABLE multi_drop_clause */ - 347, /* (167) cmd ::= DROP STABLE exists_opt full_table_name */ - 347, /* (168) cmd ::= ALTER TABLE alter_table_clause */ - 347, /* (169) cmd ::= ALTER STABLE alter_table_clause */ - 389, /* (170) alter_table_clause ::= full_table_name alter_table_options */ - 389, /* (171) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - 389, /* (172) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - 389, /* (173) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - 389, /* (174) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - 389, /* (175) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - 389, /* (176) alter_table_clause ::= full_table_name DROP TAG column_name */ - 389, /* (177) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - 389, /* (178) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - 389, /* (179) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - 386, /* (180) multi_create_clause ::= create_subtable_clause */ - 386, /* (181) multi_create_clause ::= multi_create_clause create_subtable_clause */ - 394, /* (182) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ - 388, /* (183) multi_drop_clause ::= drop_table_clause */ - 388, /* (184) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ - 397, /* (185) drop_table_clause ::= exists_opt full_table_name */ - 395, /* (186) specific_cols_opt ::= */ - 395, /* (187) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - 382, /* (188) full_table_name ::= table_name */ - 382, /* (189) full_table_name ::= db_name NK_DOT table_name */ - 383, /* (190) column_def_list ::= column_def */ - 383, /* (191) column_def_list ::= column_def_list NK_COMMA column_def */ - 399, /* (192) column_def ::= column_name type_name */ - 392, /* (193) type_name ::= BOOL */ - 392, /* (194) type_name ::= TINYINT */ - 392, /* (195) type_name ::= SMALLINT */ - 392, /* (196) type_name ::= INT */ - 392, /* (197) type_name ::= INTEGER */ - 392, /* (198) type_name ::= BIGINT */ - 392, /* (199) type_name ::= FLOAT */ - 392, /* (200) type_name ::= DOUBLE */ - 392, /* (201) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - 392, /* (202) type_name ::= TIMESTAMP */ - 392, /* (203) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - 392, /* (204) type_name ::= TINYINT UNSIGNED */ - 392, /* (205) type_name ::= SMALLINT UNSIGNED */ - 392, /* (206) type_name ::= INT UNSIGNED */ - 392, /* (207) type_name ::= BIGINT UNSIGNED */ - 392, /* (208) type_name ::= JSON */ - 392, /* (209) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - 392, /* (210) type_name ::= MEDIUMBLOB */ - 392, /* (211) type_name ::= BLOB */ - 392, /* (212) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - 392, /* (213) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ - 392, /* (214) type_name ::= DECIMAL */ - 392, /* (215) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - 392, /* (216) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 384, /* (217) tags_def_opt ::= */ - 384, /* (218) tags_def_opt ::= tags_def */ - 387, /* (219) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - 385, /* (220) table_options ::= */ - 385, /* (221) table_options ::= table_options COMMENT NK_STRING */ - 385, /* (222) table_options ::= table_options MAX_DELAY duration_list */ - 385, /* (223) table_options ::= table_options WATERMARK duration_list */ - 385, /* (224) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - 385, /* (225) table_options ::= table_options TTL NK_INTEGER */ - 385, /* (226) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - 385, /* (227) table_options ::= table_options DELETE_MARK duration_list */ - 390, /* (228) alter_table_options ::= alter_table_option */ - 390, /* (229) alter_table_options ::= alter_table_options alter_table_option */ - 402, /* (230) alter_table_option ::= COMMENT NK_STRING */ - 402, /* (231) alter_table_option ::= TTL NK_INTEGER */ - 400, /* (232) duration_list ::= duration_literal */ - 400, /* (233) duration_list ::= duration_list NK_COMMA duration_literal */ - 401, /* (234) rollup_func_list ::= rollup_func_name */ - 401, /* (235) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - 404, /* (236) rollup_func_name ::= function_name */ - 404, /* (237) rollup_func_name ::= FIRST */ - 404, /* (238) rollup_func_name ::= LAST */ - 398, /* (239) col_name_list ::= col_name */ - 398, /* (240) col_name_list ::= col_name_list NK_COMMA col_name */ - 406, /* (241) col_name ::= column_name */ - 347, /* (242) cmd ::= SHOW DNODES */ - 347, /* (243) cmd ::= SHOW USERS */ - 347, /* (244) cmd ::= SHOW USER PRIVILEGES */ - 347, /* (245) cmd ::= SHOW db_kind_opt DATABASES */ - 347, /* (246) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ - 347, /* (247) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - 347, /* (248) cmd ::= SHOW db_name_cond_opt VGROUPS */ - 347, /* (249) cmd ::= SHOW MNODES */ - 347, /* (250) cmd ::= SHOW QNODES */ - 347, /* (251) cmd ::= SHOW FUNCTIONS */ - 347, /* (252) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - 347, /* (253) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ - 347, /* (254) cmd ::= SHOW STREAMS */ - 347, /* (255) cmd ::= SHOW ACCOUNTS */ - 347, /* (256) cmd ::= SHOW APPS */ - 347, /* (257) cmd ::= SHOW CONNECTIONS */ - 347, /* (258) cmd ::= SHOW LICENCES */ - 347, /* (259) cmd ::= SHOW GRANTS */ - 347, /* (260) cmd ::= SHOW CREATE DATABASE db_name */ - 347, /* (261) cmd ::= SHOW CREATE TABLE full_table_name */ - 347, /* (262) cmd ::= SHOW CREATE STABLE full_table_name */ - 347, /* (263) cmd ::= SHOW QUERIES */ - 347, /* (264) cmd ::= SHOW SCORES */ - 347, /* (265) cmd ::= SHOW TOPICS */ - 347, /* (266) cmd ::= SHOW VARIABLES */ - 347, /* (267) cmd ::= SHOW CLUSTER VARIABLES */ - 347, /* (268) cmd ::= SHOW LOCAL VARIABLES */ - 347, /* (269) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - 347, /* (270) cmd ::= SHOW BNODES */ - 347, /* (271) cmd ::= SHOW SNODES */ - 347, /* (272) cmd ::= SHOW CLUSTER */ - 347, /* (273) cmd ::= SHOW TRANSACTIONS */ - 347, /* (274) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - 347, /* (275) cmd ::= SHOW CONSUMERS */ - 347, /* (276) cmd ::= SHOW SUBSCRIPTIONS */ - 347, /* (277) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - 347, /* (278) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ - 347, /* (279) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - 347, /* (280) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ - 347, /* (281) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ - 347, /* (282) cmd ::= SHOW VNODES */ - 347, /* (283) cmd ::= SHOW db_name_cond_opt ALIVE */ - 347, /* (284) cmd ::= SHOW CLUSTER ALIVE */ - 347, /* (285) cmd ::= SHOW db_name_cond_opt VIEWS */ - 347, /* (286) cmd ::= SHOW CREATE VIEW full_table_name */ - 347, /* (287) cmd ::= SHOW COMPACTS */ - 347, /* (288) cmd ::= SHOW COMPACT NK_INTEGER */ - 408, /* (289) table_kind_db_name_cond_opt ::= */ - 408, /* (290) table_kind_db_name_cond_opt ::= table_kind */ - 408, /* (291) table_kind_db_name_cond_opt ::= db_name NK_DOT */ - 408, /* (292) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ - 414, /* (293) table_kind ::= NORMAL */ - 414, /* (294) table_kind ::= CHILD */ - 410, /* (295) db_name_cond_opt ::= */ - 410, /* (296) db_name_cond_opt ::= db_name NK_DOT */ - 409, /* (297) like_pattern_opt ::= */ - 409, /* (298) like_pattern_opt ::= LIKE NK_STRING */ - 411, /* (299) table_name_cond ::= table_name */ - 412, /* (300) from_db_opt ::= */ - 412, /* (301) from_db_opt ::= FROM db_name */ - 413, /* (302) tag_list_opt ::= */ - 413, /* (303) tag_list_opt ::= tag_item */ - 413, /* (304) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - 415, /* (305) tag_item ::= TBNAME */ - 415, /* (306) tag_item ::= QTAGS */ - 415, /* (307) tag_item ::= column_name */ - 415, /* (308) tag_item ::= column_name column_alias */ - 415, /* (309) tag_item ::= column_name AS column_alias */ - 407, /* (310) db_kind_opt ::= */ - 407, /* (311) db_kind_opt ::= USER */ - 407, /* (312) db_kind_opt ::= SYSTEM */ - 347, /* (313) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - 347, /* (314) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - 347, /* (315) cmd ::= DROP INDEX exists_opt full_index_name */ - 418, /* (316) full_index_name ::= index_name */ - 418, /* (317) full_index_name ::= db_name NK_DOT index_name */ - 417, /* (318) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - 417, /* (319) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ - 420, /* (320) func_list ::= func */ - 420, /* (321) func_list ::= func_list NK_COMMA func */ - 423, /* (322) func ::= sma_func_name NK_LP expression_list NK_RP */ - 424, /* (323) sma_func_name ::= function_name */ - 424, /* (324) sma_func_name ::= COUNT */ - 424, /* (325) sma_func_name ::= FIRST */ - 424, /* (326) sma_func_name ::= LAST */ - 424, /* (327) sma_func_name ::= LAST_ROW */ - 422, /* (328) sma_stream_opt ::= */ - 422, /* (329) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - 422, /* (330) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - 422, /* (331) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - 425, /* (332) with_meta ::= AS */ - 425, /* (333) with_meta ::= WITH META AS */ - 425, /* (334) with_meta ::= ONLY META AS */ - 347, /* (335) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - 347, /* (336) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - 347, /* (337) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - 347, /* (338) cmd ::= DROP TOPIC exists_opt topic_name */ - 347, /* (339) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - 347, /* (340) cmd ::= DESC full_table_name */ - 347, /* (341) cmd ::= DESCRIBE full_table_name */ - 347, /* (342) cmd ::= RESET QUERY CACHE */ - 347, /* (343) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - 347, /* (344) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - 429, /* (345) analyze_opt ::= */ - 429, /* (346) analyze_opt ::= ANALYZE */ - 430, /* (347) explain_options ::= */ - 430, /* (348) explain_options ::= explain_options VERBOSE NK_BOOL */ - 430, /* (349) explain_options ::= explain_options RATIO NK_FLOAT */ - 347, /* (350) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ - 347, /* (351) cmd ::= DROP FUNCTION exists_opt function_name */ - 433, /* (352) agg_func_opt ::= */ - 433, /* (353) agg_func_opt ::= AGGREGATE */ - 434, /* (354) bufsize_opt ::= */ - 434, /* (355) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 435, /* (356) language_opt ::= */ - 435, /* (357) language_opt ::= LANGUAGE NK_STRING */ - 432, /* (358) or_replace_opt ::= */ - 432, /* (359) or_replace_opt ::= OR REPLACE */ - 347, /* (360) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - 347, /* (361) cmd ::= DROP VIEW exists_opt full_view_name */ - 436, /* (362) full_view_name ::= view_name */ - 436, /* (363) full_view_name ::= db_name NK_DOT view_name */ - 347, /* (364) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ - 347, /* (365) cmd ::= DROP STREAM exists_opt stream_name */ - 347, /* (366) cmd ::= PAUSE STREAM exists_opt stream_name */ - 347, /* (367) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ - 440, /* (368) col_list_opt ::= */ - 440, /* (369) col_list_opt ::= NK_LP col_name_list NK_RP */ - 441, /* (370) tag_def_or_ref_opt ::= */ - 441, /* (371) tag_def_or_ref_opt ::= tags_def */ - 441, /* (372) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ - 439, /* (373) stream_options ::= */ - 439, /* (374) stream_options ::= stream_options TRIGGER AT_ONCE */ - 439, /* (375) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - 439, /* (376) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - 439, /* (377) stream_options ::= stream_options WATERMARK duration_literal */ - 439, /* (378) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - 439, /* (379) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - 439, /* (380) stream_options ::= stream_options DELETE_MARK duration_literal */ - 439, /* (381) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - 442, /* (382) subtable_opt ::= */ - 442, /* (383) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - 443, /* (384) ignore_opt ::= */ - 443, /* (385) ignore_opt ::= IGNORE UNTREATED */ - 347, /* (386) cmd ::= KILL CONNECTION NK_INTEGER */ - 347, /* (387) cmd ::= KILL QUERY NK_STRING */ - 347, /* (388) cmd ::= KILL TRANSACTION NK_INTEGER */ - 347, /* (389) cmd ::= KILL COMPACT NK_INTEGER */ - 347, /* (390) cmd ::= BALANCE VGROUP */ - 347, /* (391) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - 347, /* (392) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - 347, /* (393) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - 347, /* (394) cmd ::= SPLIT VGROUP NK_INTEGER */ - 445, /* (395) on_vgroup_id ::= */ - 445, /* (396) on_vgroup_id ::= ON NK_INTEGER */ - 446, /* (397) dnode_list ::= DNODE NK_INTEGER */ - 446, /* (398) dnode_list ::= dnode_list DNODE NK_INTEGER */ - 347, /* (399) cmd ::= DELETE FROM full_table_name where_clause_opt */ - 347, /* (400) cmd ::= query_or_subquery */ - 347, /* (401) cmd ::= insert_query */ - 431, /* (402) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - 431, /* (403) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - 350, /* (404) literal ::= NK_INTEGER */ - 350, /* (405) literal ::= NK_FLOAT */ - 350, /* (406) literal ::= NK_STRING */ - 350, /* (407) literal ::= NK_BOOL */ - 350, /* (408) literal ::= TIMESTAMP NK_STRING */ - 350, /* (409) literal ::= duration_literal */ - 350, /* (410) literal ::= NULL */ - 350, /* (411) literal ::= NK_QUESTION */ - 403, /* (412) duration_literal ::= NK_VARIABLE */ - 379, /* (413) signed ::= NK_INTEGER */ - 379, /* (414) signed ::= NK_PLUS NK_INTEGER */ - 379, /* (415) signed ::= NK_MINUS NK_INTEGER */ - 379, /* (416) signed ::= NK_FLOAT */ - 379, /* (417) signed ::= NK_PLUS NK_FLOAT */ - 379, /* (418) signed ::= NK_MINUS NK_FLOAT */ - 393, /* (419) signed_literal ::= signed */ - 393, /* (420) signed_literal ::= NK_STRING */ - 393, /* (421) signed_literal ::= NK_BOOL */ - 393, /* (422) signed_literal ::= TIMESTAMP NK_STRING */ - 393, /* (423) signed_literal ::= duration_literal */ - 393, /* (424) signed_literal ::= NULL */ - 393, /* (425) signed_literal ::= literal_func */ - 393, /* (426) signed_literal ::= NK_QUESTION */ - 448, /* (427) literal_list ::= signed_literal */ - 448, /* (428) literal_list ::= literal_list NK_COMMA signed_literal */ - 362, /* (429) db_name ::= NK_ID */ - 363, /* (430) table_name ::= NK_ID */ - 391, /* (431) column_name ::= NK_ID */ - 405, /* (432) function_name ::= NK_ID */ - 437, /* (433) view_name ::= NK_ID */ - 449, /* (434) table_alias ::= NK_ID */ - 416, /* (435) column_alias ::= NK_ID */ - 416, /* (436) column_alias ::= NK_ALIAS */ - 355, /* (437) user_name ::= NK_ID */ - 364, /* (438) topic_name ::= NK_ID */ - 438, /* (439) stream_name ::= NK_ID */ - 428, /* (440) cgroup_name ::= NK_ID */ - 419, /* (441) index_name ::= NK_ID */ - 450, /* (442) expr_or_subquery ::= expression */ - 444, /* (443) expression ::= literal */ - 444, /* (444) expression ::= pseudo_column */ - 444, /* (445) expression ::= column_reference */ - 444, /* (446) expression ::= function_expression */ - 444, /* (447) expression ::= case_when_expression */ - 444, /* (448) expression ::= NK_LP expression NK_RP */ - 444, /* (449) expression ::= NK_PLUS expr_or_subquery */ - 444, /* (450) expression ::= NK_MINUS expr_or_subquery */ - 444, /* (451) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - 444, /* (452) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - 444, /* (453) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - 444, /* (454) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - 444, /* (455) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - 444, /* (456) expression ::= column_reference NK_ARROW NK_STRING */ - 444, /* (457) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - 444, /* (458) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - 396, /* (459) expression_list ::= expr_or_subquery */ - 396, /* (460) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - 452, /* (461) column_reference ::= column_name */ - 452, /* (462) column_reference ::= table_name NK_DOT column_name */ - 452, /* (463) column_reference ::= NK_ALIAS */ - 452, /* (464) column_reference ::= table_name NK_DOT NK_ALIAS */ - 451, /* (465) pseudo_column ::= ROWTS */ - 451, /* (466) pseudo_column ::= TBNAME */ - 451, /* (467) pseudo_column ::= table_name NK_DOT TBNAME */ - 451, /* (468) pseudo_column ::= QSTART */ - 451, /* (469) pseudo_column ::= QEND */ - 451, /* (470) pseudo_column ::= QDURATION */ - 451, /* (471) pseudo_column ::= WSTART */ - 451, /* (472) pseudo_column ::= WEND */ - 451, /* (473) pseudo_column ::= WDURATION */ - 451, /* (474) pseudo_column ::= IROWTS */ - 451, /* (475) pseudo_column ::= ISFILLED */ - 451, /* (476) pseudo_column ::= QTAGS */ - 453, /* (477) function_expression ::= function_name NK_LP expression_list NK_RP */ - 453, /* (478) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - 453, /* (479) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - 453, /* (480) function_expression ::= literal_func */ - 447, /* (481) literal_func ::= noarg_func NK_LP NK_RP */ - 447, /* (482) literal_func ::= NOW */ - 457, /* (483) noarg_func ::= NOW */ - 457, /* (484) noarg_func ::= TODAY */ - 457, /* (485) noarg_func ::= TIMEZONE */ - 457, /* (486) noarg_func ::= DATABASE */ - 457, /* (487) noarg_func ::= CLIENT_VERSION */ - 457, /* (488) noarg_func ::= SERVER_VERSION */ - 457, /* (489) noarg_func ::= SERVER_STATUS */ - 457, /* (490) noarg_func ::= CURRENT_USER */ - 457, /* (491) noarg_func ::= USER */ - 455, /* (492) star_func ::= COUNT */ - 455, /* (493) star_func ::= FIRST */ - 455, /* (494) star_func ::= LAST */ - 455, /* (495) star_func ::= LAST_ROW */ - 456, /* (496) star_func_para_list ::= NK_STAR */ - 456, /* (497) star_func_para_list ::= other_para_list */ - 458, /* (498) other_para_list ::= star_func_para */ - 458, /* (499) other_para_list ::= other_para_list NK_COMMA star_func_para */ - 459, /* (500) star_func_para ::= expr_or_subquery */ - 459, /* (501) star_func_para ::= table_name NK_DOT NK_STAR */ - 454, /* (502) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - 454, /* (503) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - 460, /* (504) when_then_list ::= when_then_expr */ - 460, /* (505) when_then_list ::= when_then_list when_then_expr */ - 463, /* (506) when_then_expr ::= WHEN common_expression THEN common_expression */ - 461, /* (507) case_when_else_opt ::= */ - 461, /* (508) case_when_else_opt ::= ELSE common_expression */ - 464, /* (509) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - 464, /* (510) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - 464, /* (511) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - 464, /* (512) predicate ::= expr_or_subquery IS NULL */ - 464, /* (513) predicate ::= expr_or_subquery IS NOT NULL */ - 464, /* (514) predicate ::= expr_or_subquery in_op in_predicate_value */ - 465, /* (515) compare_op ::= NK_LT */ - 465, /* (516) compare_op ::= NK_GT */ - 465, /* (517) compare_op ::= NK_LE */ - 465, /* (518) compare_op ::= NK_GE */ - 465, /* (519) compare_op ::= NK_NE */ - 465, /* (520) compare_op ::= NK_EQ */ - 465, /* (521) compare_op ::= LIKE */ - 465, /* (522) compare_op ::= NOT LIKE */ - 465, /* (523) compare_op ::= MATCH */ - 465, /* (524) compare_op ::= NMATCH */ - 465, /* (525) compare_op ::= CONTAINS */ - 466, /* (526) in_op ::= IN */ - 466, /* (527) in_op ::= NOT IN */ - 467, /* (528) in_predicate_value ::= NK_LP literal_list NK_RP */ - 468, /* (529) boolean_value_expression ::= boolean_primary */ - 468, /* (530) boolean_value_expression ::= NOT boolean_primary */ - 468, /* (531) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - 468, /* (532) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - 469, /* (533) boolean_primary ::= predicate */ - 469, /* (534) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - 462, /* (535) common_expression ::= expr_or_subquery */ - 462, /* (536) common_expression ::= boolean_value_expression */ - 470, /* (537) from_clause_opt ::= */ - 470, /* (538) from_clause_opt ::= FROM table_reference_list */ - 471, /* (539) table_reference_list ::= table_reference */ - 471, /* (540) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - 472, /* (541) table_reference ::= table_primary */ - 472, /* (542) table_reference ::= joined_table */ - 473, /* (543) table_primary ::= table_name alias_opt */ - 473, /* (544) table_primary ::= db_name NK_DOT table_name alias_opt */ - 473, /* (545) table_primary ::= subquery alias_opt */ - 473, /* (546) table_primary ::= parenthesized_joined_table */ - 475, /* (547) alias_opt ::= */ - 475, /* (548) alias_opt ::= table_alias */ - 475, /* (549) alias_opt ::= AS table_alias */ - 477, /* (550) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - 477, /* (551) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - 474, /* (552) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - 478, /* (553) join_type ::= */ - 478, /* (554) join_type ::= INNER */ - 479, /* (555) query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ - 480, /* (556) hint_list ::= */ - 480, /* (557) hint_list ::= NK_HINT */ - 482, /* (558) tag_mode_opt ::= */ - 482, /* (559) tag_mode_opt ::= TAGS */ - 481, /* (560) set_quantifier_opt ::= */ - 481, /* (561) set_quantifier_opt ::= DISTINCT */ - 481, /* (562) set_quantifier_opt ::= ALL */ - 483, /* (563) select_list ::= select_item */ - 483, /* (564) select_list ::= select_list NK_COMMA select_item */ - 491, /* (565) select_item ::= NK_STAR */ - 491, /* (566) select_item ::= common_expression */ - 491, /* (567) select_item ::= common_expression column_alias */ - 491, /* (568) select_item ::= common_expression AS column_alias */ - 491, /* (569) select_item ::= table_name NK_DOT NK_STAR */ - 427, /* (570) where_clause_opt ::= */ - 427, /* (571) where_clause_opt ::= WHERE search_condition */ - 484, /* (572) partition_by_clause_opt ::= */ - 484, /* (573) partition_by_clause_opt ::= PARTITION BY partition_list */ - 492, /* (574) partition_list ::= partition_item */ - 492, /* (575) partition_list ::= partition_list NK_COMMA partition_item */ - 493, /* (576) partition_item ::= expr_or_subquery */ - 493, /* (577) partition_item ::= expr_or_subquery column_alias */ - 493, /* (578) partition_item ::= expr_or_subquery AS column_alias */ - 488, /* (579) twindow_clause_opt ::= */ - 488, /* (580) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - 488, /* (581) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - 488, /* (582) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 488, /* (583) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 488, /* (584) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - 421, /* (585) sliding_opt ::= */ - 421, /* (586) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - 494, /* (587) interval_sliding_duration_literal ::= NK_VARIABLE */ - 494, /* (588) interval_sliding_duration_literal ::= NK_STRING */ - 494, /* (589) interval_sliding_duration_literal ::= NK_INTEGER */ - 487, /* (590) fill_opt ::= */ - 487, /* (591) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - 487, /* (592) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - 487, /* (593) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - 495, /* (594) fill_mode ::= NONE */ - 495, /* (595) fill_mode ::= PREV */ - 495, /* (596) fill_mode ::= NULL */ - 495, /* (597) fill_mode ::= NULL_F */ - 495, /* (598) fill_mode ::= LINEAR */ - 495, /* (599) fill_mode ::= NEXT */ - 489, /* (600) group_by_clause_opt ::= */ - 489, /* (601) group_by_clause_opt ::= GROUP BY group_by_list */ - 496, /* (602) group_by_list ::= expr_or_subquery */ - 496, /* (603) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 490, /* (604) having_clause_opt ::= */ - 490, /* (605) having_clause_opt ::= HAVING search_condition */ - 485, /* (606) range_opt ::= */ - 485, /* (607) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - 485, /* (608) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 486, /* (609) every_opt ::= */ - 486, /* (610) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - 497, /* (611) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - 498, /* (612) query_simple ::= query_specification */ - 498, /* (613) query_simple ::= union_query_expression */ - 502, /* (614) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - 502, /* (615) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - 503, /* (616) query_simple_or_subquery ::= query_simple */ - 503, /* (617) query_simple_or_subquery ::= subquery */ - 426, /* (618) query_or_subquery ::= query_expression */ - 426, /* (619) query_or_subquery ::= subquery */ - 499, /* (620) order_by_clause_opt ::= */ - 499, /* (621) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 500, /* (622) slimit_clause_opt ::= */ - 500, /* (623) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - 500, /* (624) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - 500, /* (625) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 501, /* (626) limit_clause_opt ::= */ - 501, /* (627) limit_clause_opt ::= LIMIT NK_INTEGER */ - 501, /* (628) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - 501, /* (629) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 476, /* (630) subquery ::= NK_LP query_expression NK_RP */ - 476, /* (631) subquery ::= NK_LP subquery NK_RP */ - 365, /* (632) search_condition ::= common_expression */ - 504, /* (633) sort_specification_list ::= sort_specification */ - 504, /* (634) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - 505, /* (635) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 506, /* (636) ordering_specification_opt ::= */ - 506, /* (637) ordering_specification_opt ::= ASC */ - 506, /* (638) ordering_specification_opt ::= DESC */ - 507, /* (639) null_ordering_opt ::= */ - 507, /* (640) null_ordering_opt ::= NULLS FIRST */ - 507, /* (641) null_ordering_opt ::= NULLS LAST */ + 348, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + 348, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + 349, /* (2) account_options ::= */ + 349, /* (3) account_options ::= account_options PPS literal */ + 349, /* (4) account_options ::= account_options TSERIES literal */ + 349, /* (5) account_options ::= account_options STORAGE literal */ + 349, /* (6) account_options ::= account_options STREAMS literal */ + 349, /* (7) account_options ::= account_options QTIME literal */ + 349, /* (8) account_options ::= account_options DBS literal */ + 349, /* (9) account_options ::= account_options USERS literal */ + 349, /* (10) account_options ::= account_options CONNS literal */ + 349, /* (11) account_options ::= account_options STATE literal */ + 350, /* (12) alter_account_options ::= alter_account_option */ + 350, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + 352, /* (14) alter_account_option ::= PASS literal */ + 352, /* (15) alter_account_option ::= PPS literal */ + 352, /* (16) alter_account_option ::= TSERIES literal */ + 352, /* (17) alter_account_option ::= STORAGE literal */ + 352, /* (18) alter_account_option ::= STREAMS literal */ + 352, /* (19) alter_account_option ::= QTIME literal */ + 352, /* (20) alter_account_option ::= DBS literal */ + 352, /* (21) alter_account_option ::= USERS literal */ + 352, /* (22) alter_account_option ::= CONNS literal */ + 352, /* (23) alter_account_option ::= STATE literal */ + 353, /* (24) ip_range_list ::= NK_STRING */ + 353, /* (25) ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ + 354, /* (26) white_list ::= HOST ip_range_list */ + 355, /* (27) white_list_opt ::= */ + 355, /* (28) white_list_opt ::= white_list */ + 348, /* (29) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ + 348, /* (30) cmd ::= ALTER USER user_name PASS NK_STRING */ + 348, /* (31) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ + 348, /* (32) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ + 348, /* (33) cmd ::= ALTER USER user_name ADD white_list */ + 348, /* (34) cmd ::= ALTER USER user_name DROP white_list */ + 348, /* (35) cmd ::= DROP USER user_name */ + 357, /* (36) sysinfo_opt ::= */ + 357, /* (37) sysinfo_opt ::= SYSINFO NK_INTEGER */ + 348, /* (38) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ + 348, /* (39) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ + 358, /* (40) privileges ::= ALL */ + 358, /* (41) privileges ::= priv_type_list */ + 358, /* (42) privileges ::= SUBSCRIBE */ + 361, /* (43) priv_type_list ::= priv_type */ + 361, /* (44) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + 362, /* (45) priv_type ::= READ */ + 362, /* (46) priv_type ::= WRITE */ + 362, /* (47) priv_type ::= ALTER */ + 359, /* (48) priv_level ::= NK_STAR NK_DOT NK_STAR */ + 359, /* (49) priv_level ::= db_name NK_DOT NK_STAR */ + 359, /* (50) priv_level ::= db_name NK_DOT table_name */ + 359, /* (51) priv_level ::= topic_name */ + 360, /* (52) with_opt ::= */ + 360, /* (53) with_opt ::= WITH search_condition */ + 348, /* (54) cmd ::= CREATE DNODE dnode_endpoint */ + 348, /* (55) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + 348, /* (56) cmd ::= DROP DNODE NK_INTEGER force_opt */ + 348, /* (57) cmd ::= DROP DNODE dnode_endpoint force_opt */ + 348, /* (58) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ + 348, /* (59) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ + 348, /* (60) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + 348, /* (61) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + 348, /* (62) cmd ::= ALTER ALL DNODES NK_STRING */ + 348, /* (63) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + 348, /* (64) cmd ::= RESTORE DNODE NK_INTEGER */ + 367, /* (65) dnode_endpoint ::= NK_STRING */ + 367, /* (66) dnode_endpoint ::= NK_ID */ + 367, /* (67) dnode_endpoint ::= NK_IPTOKEN */ + 368, /* (68) force_opt ::= */ + 368, /* (69) force_opt ::= FORCE */ + 369, /* (70) unsafe_opt ::= UNSAFE */ + 348, /* (71) cmd ::= ALTER LOCAL NK_STRING */ + 348, /* (72) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + 348, /* (73) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + 348, /* (74) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + 348, /* (75) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ + 348, /* (76) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + 348, /* (77) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + 348, /* (78) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + 348, /* (79) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + 348, /* (80) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + 348, /* (81) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + 348, /* (82) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ + 348, /* (83) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ + 348, /* (84) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + 348, /* (85) cmd ::= DROP DATABASE exists_opt db_name */ + 348, /* (86) cmd ::= USE db_name */ + 348, /* (87) cmd ::= ALTER DATABASE db_name alter_db_options */ + 348, /* (88) cmd ::= FLUSH DATABASE db_name */ + 348, /* (89) cmd ::= TRIM DATABASE db_name speed_opt */ + 348, /* (90) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ + 370, /* (91) not_exists_opt ::= IF NOT EXISTS */ + 370, /* (92) not_exists_opt ::= */ + 372, /* (93) exists_opt ::= IF EXISTS */ + 372, /* (94) exists_opt ::= */ + 371, /* (95) db_options ::= */ + 371, /* (96) db_options ::= db_options BUFFER NK_INTEGER */ + 371, /* (97) db_options ::= db_options CACHEMODEL NK_STRING */ + 371, /* (98) db_options ::= db_options CACHESIZE NK_INTEGER */ + 371, /* (99) db_options ::= db_options COMP NK_INTEGER */ + 371, /* (100) db_options ::= db_options DURATION NK_INTEGER */ + 371, /* (101) db_options ::= db_options DURATION NK_VARIABLE */ + 371, /* (102) db_options ::= db_options MAXROWS NK_INTEGER */ + 371, /* (103) db_options ::= db_options MINROWS NK_INTEGER */ + 371, /* (104) db_options ::= db_options KEEP integer_list */ + 371, /* (105) db_options ::= db_options KEEP variable_list */ + 371, /* (106) db_options ::= db_options PAGES NK_INTEGER */ + 371, /* (107) db_options ::= db_options PAGESIZE NK_INTEGER */ + 371, /* (108) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + 371, /* (109) db_options ::= db_options PRECISION NK_STRING */ + 371, /* (110) db_options ::= db_options REPLICA NK_INTEGER */ + 371, /* (111) db_options ::= db_options VGROUPS NK_INTEGER */ + 371, /* (112) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + 371, /* (113) db_options ::= db_options RETENTIONS retention_list */ + 371, /* (114) db_options ::= db_options SCHEMALESS NK_INTEGER */ + 371, /* (115) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + 371, /* (116) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + 371, /* (117) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + 371, /* (118) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 371, /* (119) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + 371, /* (120) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 371, /* (121) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + 371, /* (122) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + 371, /* (123) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + 371, /* (124) db_options ::= db_options TABLE_PREFIX signed */ + 371, /* (125) db_options ::= db_options TABLE_SUFFIX signed */ + 371, /* (126) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ + 373, /* (127) alter_db_options ::= alter_db_option */ + 373, /* (128) alter_db_options ::= alter_db_options alter_db_option */ + 381, /* (129) alter_db_option ::= BUFFER NK_INTEGER */ + 381, /* (130) alter_db_option ::= CACHEMODEL NK_STRING */ + 381, /* (131) alter_db_option ::= CACHESIZE NK_INTEGER */ + 381, /* (132) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + 381, /* (133) alter_db_option ::= KEEP integer_list */ + 381, /* (134) alter_db_option ::= KEEP variable_list */ + 381, /* (135) alter_db_option ::= PAGES NK_INTEGER */ + 381, /* (136) alter_db_option ::= REPLICA NK_INTEGER */ + 381, /* (137) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + 381, /* (138) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + 381, /* (139) alter_db_option ::= MINROWS NK_INTEGER */ + 381, /* (140) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ + 381, /* (141) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 381, /* (142) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ + 381, /* (143) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 381, /* (144) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ + 377, /* (145) integer_list ::= NK_INTEGER */ + 377, /* (146) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + 378, /* (147) variable_list ::= NK_VARIABLE */ + 378, /* (148) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + 379, /* (149) retention_list ::= retention */ + 379, /* (150) retention_list ::= retention_list NK_COMMA retention */ + 382, /* (151) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + 382, /* (152) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ + 374, /* (153) speed_opt ::= */ + 374, /* (154) speed_opt ::= BWLIMIT NK_INTEGER */ + 375, /* (155) start_opt ::= */ + 375, /* (156) start_opt ::= START WITH NK_INTEGER */ + 375, /* (157) start_opt ::= START WITH NK_STRING */ + 375, /* (158) start_opt ::= START WITH TIMESTAMP NK_STRING */ + 376, /* (159) end_opt ::= */ + 376, /* (160) end_opt ::= END WITH NK_INTEGER */ + 376, /* (161) end_opt ::= END WITH NK_STRING */ + 376, /* (162) end_opt ::= END WITH TIMESTAMP NK_STRING */ + 348, /* (163) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + 348, /* (164) cmd ::= CREATE TABLE multi_create_clause */ + 348, /* (165) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + 348, /* (166) cmd ::= DROP TABLE multi_drop_clause */ + 348, /* (167) cmd ::= DROP STABLE exists_opt full_table_name */ + 348, /* (168) cmd ::= ALTER TABLE alter_table_clause */ + 348, /* (169) cmd ::= ALTER STABLE alter_table_clause */ + 390, /* (170) alter_table_clause ::= full_table_name alter_table_options */ + 390, /* (171) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + 390, /* (172) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + 390, /* (173) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + 390, /* (174) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + 390, /* (175) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + 390, /* (176) alter_table_clause ::= full_table_name DROP TAG column_name */ + 390, /* (177) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + 390, /* (178) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + 390, /* (179) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + 387, /* (180) multi_create_clause ::= create_subtable_clause */ + 387, /* (181) multi_create_clause ::= multi_create_clause create_subtable_clause */ + 395, /* (182) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ + 389, /* (183) multi_drop_clause ::= drop_table_clause */ + 389, /* (184) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ + 398, /* (185) drop_table_clause ::= exists_opt full_table_name */ + 396, /* (186) specific_cols_opt ::= */ + 396, /* (187) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + 383, /* (188) full_table_name ::= table_name */ + 383, /* (189) full_table_name ::= db_name NK_DOT table_name */ + 384, /* (190) column_def_list ::= column_def */ + 384, /* (191) column_def_list ::= column_def_list NK_COMMA column_def */ + 400, /* (192) column_def ::= column_name type_name */ + 393, /* (193) type_name ::= BOOL */ + 393, /* (194) type_name ::= TINYINT */ + 393, /* (195) type_name ::= SMALLINT */ + 393, /* (196) type_name ::= INT */ + 393, /* (197) type_name ::= INTEGER */ + 393, /* (198) type_name ::= BIGINT */ + 393, /* (199) type_name ::= FLOAT */ + 393, /* (200) type_name ::= DOUBLE */ + 393, /* (201) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + 393, /* (202) type_name ::= TIMESTAMP */ + 393, /* (203) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + 393, /* (204) type_name ::= TINYINT UNSIGNED */ + 393, /* (205) type_name ::= SMALLINT UNSIGNED */ + 393, /* (206) type_name ::= INT UNSIGNED */ + 393, /* (207) type_name ::= BIGINT UNSIGNED */ + 393, /* (208) type_name ::= JSON */ + 393, /* (209) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + 393, /* (210) type_name ::= MEDIUMBLOB */ + 393, /* (211) type_name ::= BLOB */ + 393, /* (212) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + 393, /* (213) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + 393, /* (214) type_name ::= DECIMAL */ + 393, /* (215) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + 393, /* (216) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 385, /* (217) tags_def_opt ::= */ + 385, /* (218) tags_def_opt ::= tags_def */ + 388, /* (219) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + 386, /* (220) table_options ::= */ + 386, /* (221) table_options ::= table_options COMMENT NK_STRING */ + 386, /* (222) table_options ::= table_options MAX_DELAY duration_list */ + 386, /* (223) table_options ::= table_options WATERMARK duration_list */ + 386, /* (224) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + 386, /* (225) table_options ::= table_options TTL NK_INTEGER */ + 386, /* (226) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + 386, /* (227) table_options ::= table_options DELETE_MARK duration_list */ + 391, /* (228) alter_table_options ::= alter_table_option */ + 391, /* (229) alter_table_options ::= alter_table_options alter_table_option */ + 403, /* (230) alter_table_option ::= COMMENT NK_STRING */ + 403, /* (231) alter_table_option ::= TTL NK_INTEGER */ + 401, /* (232) duration_list ::= duration_literal */ + 401, /* (233) duration_list ::= duration_list NK_COMMA duration_literal */ + 402, /* (234) rollup_func_list ::= rollup_func_name */ + 402, /* (235) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + 405, /* (236) rollup_func_name ::= function_name */ + 405, /* (237) rollup_func_name ::= FIRST */ + 405, /* (238) rollup_func_name ::= LAST */ + 399, /* (239) col_name_list ::= col_name */ + 399, /* (240) col_name_list ::= col_name_list NK_COMMA col_name */ + 407, /* (241) col_name ::= column_name */ + 348, /* (242) cmd ::= SHOW DNODES */ + 348, /* (243) cmd ::= SHOW USERS */ + 348, /* (244) cmd ::= SHOW USER PRIVILEGES */ + 348, /* (245) cmd ::= SHOW db_kind_opt DATABASES */ + 348, /* (246) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + 348, /* (247) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + 348, /* (248) cmd ::= SHOW db_name_cond_opt VGROUPS */ + 348, /* (249) cmd ::= SHOW MNODES */ + 348, /* (250) cmd ::= SHOW QNODES */ + 348, /* (251) cmd ::= SHOW FUNCTIONS */ + 348, /* (252) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + 348, /* (253) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ + 348, /* (254) cmd ::= SHOW STREAMS */ + 348, /* (255) cmd ::= SHOW ACCOUNTS */ + 348, /* (256) cmd ::= SHOW APPS */ + 348, /* (257) cmd ::= SHOW CONNECTIONS */ + 348, /* (258) cmd ::= SHOW LICENCES */ + 348, /* (259) cmd ::= SHOW GRANTS */ + 348, /* (260) cmd ::= SHOW CREATE DATABASE db_name */ + 348, /* (261) cmd ::= SHOW CREATE TABLE full_table_name */ + 348, /* (262) cmd ::= SHOW CREATE STABLE full_table_name */ + 348, /* (263) cmd ::= SHOW QUERIES */ + 348, /* (264) cmd ::= SHOW SCORES */ + 348, /* (265) cmd ::= SHOW TOPICS */ + 348, /* (266) cmd ::= SHOW VARIABLES */ + 348, /* (267) cmd ::= SHOW CLUSTER VARIABLES */ + 348, /* (268) cmd ::= SHOW LOCAL VARIABLES */ + 348, /* (269) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + 348, /* (270) cmd ::= SHOW BNODES */ + 348, /* (271) cmd ::= SHOW SNODES */ + 348, /* (272) cmd ::= SHOW CLUSTER */ + 348, /* (273) cmd ::= SHOW TRANSACTIONS */ + 348, /* (274) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + 348, /* (275) cmd ::= SHOW CONSUMERS */ + 348, /* (276) cmd ::= SHOW SUBSCRIPTIONS */ + 348, /* (277) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + 348, /* (278) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + 348, /* (279) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + 348, /* (280) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + 348, /* (281) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + 348, /* (282) cmd ::= SHOW VNODES */ + 348, /* (283) cmd ::= SHOW db_name_cond_opt ALIVE */ + 348, /* (284) cmd ::= SHOW CLUSTER ALIVE */ + 348, /* (285) cmd ::= SHOW db_name_cond_opt VIEWS */ + 348, /* (286) cmd ::= SHOW CREATE VIEW full_table_name */ + 348, /* (287) cmd ::= SHOW COMPACTS */ + 348, /* (288) cmd ::= SHOW COMPACT NK_INTEGER */ + 409, /* (289) table_kind_db_name_cond_opt ::= */ + 409, /* (290) table_kind_db_name_cond_opt ::= table_kind */ + 409, /* (291) table_kind_db_name_cond_opt ::= db_name NK_DOT */ + 409, /* (292) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + 415, /* (293) table_kind ::= NORMAL */ + 415, /* (294) table_kind ::= CHILD */ + 411, /* (295) db_name_cond_opt ::= */ + 411, /* (296) db_name_cond_opt ::= db_name NK_DOT */ + 410, /* (297) like_pattern_opt ::= */ + 410, /* (298) like_pattern_opt ::= LIKE NK_STRING */ + 412, /* (299) table_name_cond ::= table_name */ + 413, /* (300) from_db_opt ::= */ + 413, /* (301) from_db_opt ::= FROM db_name */ + 414, /* (302) tag_list_opt ::= */ + 414, /* (303) tag_list_opt ::= tag_item */ + 414, /* (304) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + 416, /* (305) tag_item ::= TBNAME */ + 416, /* (306) tag_item ::= QTAGS */ + 416, /* (307) tag_item ::= column_name */ + 416, /* (308) tag_item ::= column_name column_alias */ + 416, /* (309) tag_item ::= column_name AS column_alias */ + 408, /* (310) db_kind_opt ::= */ + 408, /* (311) db_kind_opt ::= USER */ + 408, /* (312) db_kind_opt ::= SYSTEM */ + 348, /* (313) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + 348, /* (314) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + 348, /* (315) cmd ::= DROP INDEX exists_opt full_index_name */ + 419, /* (316) full_index_name ::= index_name */ + 419, /* (317) full_index_name ::= db_name NK_DOT index_name */ + 418, /* (318) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + 418, /* (319) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ + 421, /* (320) func_list ::= func */ + 421, /* (321) func_list ::= func_list NK_COMMA func */ + 424, /* (322) func ::= sma_func_name NK_LP expression_list NK_RP */ + 425, /* (323) sma_func_name ::= function_name */ + 425, /* (324) sma_func_name ::= COUNT */ + 425, /* (325) sma_func_name ::= FIRST */ + 425, /* (326) sma_func_name ::= LAST */ + 425, /* (327) sma_func_name ::= LAST_ROW */ + 423, /* (328) sma_stream_opt ::= */ + 423, /* (329) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + 423, /* (330) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + 423, /* (331) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + 426, /* (332) with_meta ::= AS */ + 426, /* (333) with_meta ::= WITH META AS */ + 426, /* (334) with_meta ::= ONLY META AS */ + 348, /* (335) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + 348, /* (336) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + 348, /* (337) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + 348, /* (338) cmd ::= DROP TOPIC exists_opt topic_name */ + 348, /* (339) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + 348, /* (340) cmd ::= DESC full_table_name */ + 348, /* (341) cmd ::= DESCRIBE full_table_name */ + 348, /* (342) cmd ::= RESET QUERY CACHE */ + 348, /* (343) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + 348, /* (344) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + 430, /* (345) analyze_opt ::= */ + 430, /* (346) analyze_opt ::= ANALYZE */ + 431, /* (347) explain_options ::= */ + 431, /* (348) explain_options ::= explain_options VERBOSE NK_BOOL */ + 431, /* (349) explain_options ::= explain_options RATIO NK_FLOAT */ + 348, /* (350) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ + 348, /* (351) cmd ::= DROP FUNCTION exists_opt function_name */ + 434, /* (352) agg_func_opt ::= */ + 434, /* (353) agg_func_opt ::= AGGREGATE */ + 435, /* (354) bufsize_opt ::= */ + 435, /* (355) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 436, /* (356) language_opt ::= */ + 436, /* (357) language_opt ::= LANGUAGE NK_STRING */ + 433, /* (358) or_replace_opt ::= */ + 433, /* (359) or_replace_opt ::= OR REPLACE */ + 348, /* (360) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + 348, /* (361) cmd ::= DROP VIEW exists_opt full_view_name */ + 437, /* (362) full_view_name ::= view_name */ + 437, /* (363) full_view_name ::= db_name NK_DOT view_name */ + 348, /* (364) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ + 348, /* (365) cmd ::= DROP STREAM exists_opt stream_name */ + 348, /* (366) cmd ::= PAUSE STREAM exists_opt stream_name */ + 348, /* (367) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + 441, /* (368) col_list_opt ::= */ + 441, /* (369) col_list_opt ::= NK_LP col_name_list NK_RP */ + 442, /* (370) tag_def_or_ref_opt ::= */ + 442, /* (371) tag_def_or_ref_opt ::= tags_def */ + 442, /* (372) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ + 440, /* (373) stream_options ::= */ + 440, /* (374) stream_options ::= stream_options TRIGGER AT_ONCE */ + 440, /* (375) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + 440, /* (376) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + 440, /* (377) stream_options ::= stream_options WATERMARK duration_literal */ + 440, /* (378) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + 440, /* (379) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + 440, /* (380) stream_options ::= stream_options DELETE_MARK duration_literal */ + 440, /* (381) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + 443, /* (382) subtable_opt ::= */ + 443, /* (383) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + 444, /* (384) ignore_opt ::= */ + 444, /* (385) ignore_opt ::= IGNORE UNTREATED */ + 348, /* (386) cmd ::= KILL CONNECTION NK_INTEGER */ + 348, /* (387) cmd ::= KILL QUERY NK_STRING */ + 348, /* (388) cmd ::= KILL TRANSACTION NK_INTEGER */ + 348, /* (389) cmd ::= KILL COMPACT NK_INTEGER */ + 348, /* (390) cmd ::= BALANCE VGROUP */ + 348, /* (391) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + 348, /* (392) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + 348, /* (393) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + 348, /* (394) cmd ::= SPLIT VGROUP NK_INTEGER */ + 446, /* (395) on_vgroup_id ::= */ + 446, /* (396) on_vgroup_id ::= ON NK_INTEGER */ + 447, /* (397) dnode_list ::= DNODE NK_INTEGER */ + 447, /* (398) dnode_list ::= dnode_list DNODE NK_INTEGER */ + 348, /* (399) cmd ::= DELETE FROM full_table_name where_clause_opt */ + 348, /* (400) cmd ::= query_or_subquery */ + 348, /* (401) cmd ::= insert_query */ + 432, /* (402) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + 432, /* (403) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + 351, /* (404) literal ::= NK_INTEGER */ + 351, /* (405) literal ::= NK_FLOAT */ + 351, /* (406) literal ::= NK_STRING */ + 351, /* (407) literal ::= NK_BOOL */ + 351, /* (408) literal ::= TIMESTAMP NK_STRING */ + 351, /* (409) literal ::= duration_literal */ + 351, /* (410) literal ::= NULL */ + 351, /* (411) literal ::= NK_QUESTION */ + 404, /* (412) duration_literal ::= NK_VARIABLE */ + 380, /* (413) signed ::= NK_INTEGER */ + 380, /* (414) signed ::= NK_PLUS NK_INTEGER */ + 380, /* (415) signed ::= NK_MINUS NK_INTEGER */ + 380, /* (416) signed ::= NK_FLOAT */ + 380, /* (417) signed ::= NK_PLUS NK_FLOAT */ + 380, /* (418) signed ::= NK_MINUS NK_FLOAT */ + 394, /* (419) signed_literal ::= signed */ + 394, /* (420) signed_literal ::= NK_STRING */ + 394, /* (421) signed_literal ::= NK_BOOL */ + 394, /* (422) signed_literal ::= TIMESTAMP NK_STRING */ + 394, /* (423) signed_literal ::= duration_literal */ + 394, /* (424) signed_literal ::= NULL */ + 394, /* (425) signed_literal ::= literal_func */ + 394, /* (426) signed_literal ::= NK_QUESTION */ + 449, /* (427) literal_list ::= signed_literal */ + 449, /* (428) literal_list ::= literal_list NK_COMMA signed_literal */ + 363, /* (429) db_name ::= NK_ID */ + 364, /* (430) table_name ::= NK_ID */ + 392, /* (431) column_name ::= NK_ID */ + 406, /* (432) function_name ::= NK_ID */ + 438, /* (433) view_name ::= NK_ID */ + 450, /* (434) table_alias ::= NK_ID */ + 417, /* (435) column_alias ::= NK_ID */ + 417, /* (436) column_alias ::= NK_ALIAS */ + 356, /* (437) user_name ::= NK_ID */ + 365, /* (438) topic_name ::= NK_ID */ + 439, /* (439) stream_name ::= NK_ID */ + 429, /* (440) cgroup_name ::= NK_ID */ + 420, /* (441) index_name ::= NK_ID */ + 451, /* (442) expr_or_subquery ::= expression */ + 445, /* (443) expression ::= literal */ + 445, /* (444) expression ::= pseudo_column */ + 445, /* (445) expression ::= column_reference */ + 445, /* (446) expression ::= function_expression */ + 445, /* (447) expression ::= case_when_expression */ + 445, /* (448) expression ::= NK_LP expression NK_RP */ + 445, /* (449) expression ::= NK_PLUS expr_or_subquery */ + 445, /* (450) expression ::= NK_MINUS expr_or_subquery */ + 445, /* (451) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + 445, /* (452) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + 445, /* (453) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + 445, /* (454) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + 445, /* (455) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + 445, /* (456) expression ::= column_reference NK_ARROW NK_STRING */ + 445, /* (457) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + 445, /* (458) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + 397, /* (459) expression_list ::= expr_or_subquery */ + 397, /* (460) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + 453, /* (461) column_reference ::= column_name */ + 453, /* (462) column_reference ::= table_name NK_DOT column_name */ + 453, /* (463) column_reference ::= NK_ALIAS */ + 453, /* (464) column_reference ::= table_name NK_DOT NK_ALIAS */ + 452, /* (465) pseudo_column ::= ROWTS */ + 452, /* (466) pseudo_column ::= TBNAME */ + 452, /* (467) pseudo_column ::= table_name NK_DOT TBNAME */ + 452, /* (468) pseudo_column ::= QSTART */ + 452, /* (469) pseudo_column ::= QEND */ + 452, /* (470) pseudo_column ::= QDURATION */ + 452, /* (471) pseudo_column ::= WSTART */ + 452, /* (472) pseudo_column ::= WEND */ + 452, /* (473) pseudo_column ::= WDURATION */ + 452, /* (474) pseudo_column ::= IROWTS */ + 452, /* (475) pseudo_column ::= ISFILLED */ + 452, /* (476) pseudo_column ::= QTAGS */ + 454, /* (477) function_expression ::= function_name NK_LP expression_list NK_RP */ + 454, /* (478) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + 454, /* (479) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + 454, /* (480) function_expression ::= literal_func */ + 448, /* (481) literal_func ::= noarg_func NK_LP NK_RP */ + 448, /* (482) literal_func ::= NOW */ + 458, /* (483) noarg_func ::= NOW */ + 458, /* (484) noarg_func ::= TODAY */ + 458, /* (485) noarg_func ::= TIMEZONE */ + 458, /* (486) noarg_func ::= DATABASE */ + 458, /* (487) noarg_func ::= CLIENT_VERSION */ + 458, /* (488) noarg_func ::= SERVER_VERSION */ + 458, /* (489) noarg_func ::= SERVER_STATUS */ + 458, /* (490) noarg_func ::= CURRENT_USER */ + 458, /* (491) noarg_func ::= USER */ + 456, /* (492) star_func ::= COUNT */ + 456, /* (493) star_func ::= FIRST */ + 456, /* (494) star_func ::= LAST */ + 456, /* (495) star_func ::= LAST_ROW */ + 457, /* (496) star_func_para_list ::= NK_STAR */ + 457, /* (497) star_func_para_list ::= other_para_list */ + 459, /* (498) other_para_list ::= star_func_para */ + 459, /* (499) other_para_list ::= other_para_list NK_COMMA star_func_para */ + 460, /* (500) star_func_para ::= expr_or_subquery */ + 460, /* (501) star_func_para ::= table_name NK_DOT NK_STAR */ + 455, /* (502) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + 455, /* (503) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + 461, /* (504) when_then_list ::= when_then_expr */ + 461, /* (505) when_then_list ::= when_then_list when_then_expr */ + 464, /* (506) when_then_expr ::= WHEN common_expression THEN common_expression */ + 462, /* (507) case_when_else_opt ::= */ + 462, /* (508) case_when_else_opt ::= ELSE common_expression */ + 465, /* (509) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + 465, /* (510) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + 465, /* (511) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + 465, /* (512) predicate ::= expr_or_subquery IS NULL */ + 465, /* (513) predicate ::= expr_or_subquery IS NOT NULL */ + 465, /* (514) predicate ::= expr_or_subquery in_op in_predicate_value */ + 466, /* (515) compare_op ::= NK_LT */ + 466, /* (516) compare_op ::= NK_GT */ + 466, /* (517) compare_op ::= NK_LE */ + 466, /* (518) compare_op ::= NK_GE */ + 466, /* (519) compare_op ::= NK_NE */ + 466, /* (520) compare_op ::= NK_EQ */ + 466, /* (521) compare_op ::= LIKE */ + 466, /* (522) compare_op ::= NOT LIKE */ + 466, /* (523) compare_op ::= MATCH */ + 466, /* (524) compare_op ::= NMATCH */ + 466, /* (525) compare_op ::= CONTAINS */ + 467, /* (526) in_op ::= IN */ + 467, /* (527) in_op ::= NOT IN */ + 468, /* (528) in_predicate_value ::= NK_LP literal_list NK_RP */ + 469, /* (529) boolean_value_expression ::= boolean_primary */ + 469, /* (530) boolean_value_expression ::= NOT boolean_primary */ + 469, /* (531) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + 469, /* (532) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + 470, /* (533) boolean_primary ::= predicate */ + 470, /* (534) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + 463, /* (535) common_expression ::= expr_or_subquery */ + 463, /* (536) common_expression ::= boolean_value_expression */ + 471, /* (537) from_clause_opt ::= */ + 471, /* (538) from_clause_opt ::= FROM table_reference_list */ + 472, /* (539) table_reference_list ::= table_reference */ + 472, /* (540) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + 473, /* (541) table_reference ::= table_primary */ + 473, /* (542) table_reference ::= joined_table */ + 474, /* (543) table_primary ::= table_name alias_opt */ + 474, /* (544) table_primary ::= db_name NK_DOT table_name alias_opt */ + 474, /* (545) table_primary ::= subquery alias_opt */ + 474, /* (546) table_primary ::= parenthesized_joined_table */ + 476, /* (547) alias_opt ::= */ + 476, /* (548) alias_opt ::= table_alias */ + 476, /* (549) alias_opt ::= AS table_alias */ + 478, /* (550) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + 478, /* (551) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + 475, /* (552) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + 479, /* (553) join_type ::= */ + 479, /* (554) join_type ::= INNER */ + 480, /* (555) query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + 481, /* (556) hint_list ::= */ + 481, /* (557) hint_list ::= NK_HINT */ + 483, /* (558) tag_mode_opt ::= */ + 483, /* (559) tag_mode_opt ::= TAGS */ + 482, /* (560) set_quantifier_opt ::= */ + 482, /* (561) set_quantifier_opt ::= DISTINCT */ + 482, /* (562) set_quantifier_opt ::= ALL */ + 484, /* (563) select_list ::= select_item */ + 484, /* (564) select_list ::= select_list NK_COMMA select_item */ + 492, /* (565) select_item ::= NK_STAR */ + 492, /* (566) select_item ::= common_expression */ + 492, /* (567) select_item ::= common_expression column_alias */ + 492, /* (568) select_item ::= common_expression AS column_alias */ + 492, /* (569) select_item ::= table_name NK_DOT NK_STAR */ + 428, /* (570) where_clause_opt ::= */ + 428, /* (571) where_clause_opt ::= WHERE search_condition */ + 485, /* (572) partition_by_clause_opt ::= */ + 485, /* (573) partition_by_clause_opt ::= PARTITION BY partition_list */ + 493, /* (574) partition_list ::= partition_item */ + 493, /* (575) partition_list ::= partition_list NK_COMMA partition_item */ + 494, /* (576) partition_item ::= expr_or_subquery */ + 494, /* (577) partition_item ::= expr_or_subquery column_alias */ + 494, /* (578) partition_item ::= expr_or_subquery AS column_alias */ + 489, /* (579) twindow_clause_opt ::= */ + 489, /* (580) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + 489, /* (581) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + 489, /* (582) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 489, /* (583) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 489, /* (584) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + 489, /* (585) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ + 422, /* (586) sliding_opt ::= */ + 422, /* (587) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + 495, /* (588) interval_sliding_duration_literal ::= NK_VARIABLE */ + 495, /* (589) interval_sliding_duration_literal ::= NK_STRING */ + 495, /* (590) interval_sliding_duration_literal ::= NK_INTEGER */ + 488, /* (591) fill_opt ::= */ + 488, /* (592) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + 488, /* (593) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + 488, /* (594) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + 496, /* (595) fill_mode ::= NONE */ + 496, /* (596) fill_mode ::= PREV */ + 496, /* (597) fill_mode ::= NULL */ + 496, /* (598) fill_mode ::= NULL_F */ + 496, /* (599) fill_mode ::= LINEAR */ + 496, /* (600) fill_mode ::= NEXT */ + 490, /* (601) group_by_clause_opt ::= */ + 490, /* (602) group_by_clause_opt ::= GROUP BY group_by_list */ + 497, /* (603) group_by_list ::= expr_or_subquery */ + 497, /* (604) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 491, /* (605) having_clause_opt ::= */ + 491, /* (606) having_clause_opt ::= HAVING search_condition */ + 486, /* (607) range_opt ::= */ + 486, /* (608) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + 486, /* (609) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 487, /* (610) every_opt ::= */ + 487, /* (611) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + 498, /* (612) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + 499, /* (613) query_simple ::= query_specification */ + 499, /* (614) query_simple ::= union_query_expression */ + 503, /* (615) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + 503, /* (616) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + 504, /* (617) query_simple_or_subquery ::= query_simple */ + 504, /* (618) query_simple_or_subquery ::= subquery */ + 427, /* (619) query_or_subquery ::= query_expression */ + 427, /* (620) query_or_subquery ::= subquery */ + 500, /* (621) order_by_clause_opt ::= */ + 500, /* (622) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 501, /* (623) slimit_clause_opt ::= */ + 501, /* (624) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + 501, /* (625) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + 501, /* (626) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 502, /* (627) limit_clause_opt ::= */ + 502, /* (628) limit_clause_opt ::= LIMIT NK_INTEGER */ + 502, /* (629) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + 502, /* (630) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 477, /* (631) subquery ::= NK_LP query_expression NK_RP */ + 477, /* (632) subquery ::= NK_LP subquery NK_RP */ + 366, /* (633) search_condition ::= common_expression */ + 505, /* (634) sort_specification_list ::= sort_specification */ + 505, /* (635) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + 506, /* (636) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 507, /* (637) ordering_specification_opt ::= */ + 507, /* (638) ordering_specification_opt ::= ASC */ + 507, /* (639) ordering_specification_opt ::= DESC */ + 508, /* (640) null_ordering_opt ::= */ + 508, /* (641) null_ordering_opt ::= NULLS FIRST */ + 508, /* (642) null_ordering_opt ::= NULLS LAST */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -4954,63 +4892,64 @@ static const signed char yyRuleInfoNRhs[] = { -6, /* (582) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ -8, /* (583) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ -7, /* (584) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - 0, /* (585) sliding_opt ::= */ - -4, /* (586) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - -1, /* (587) interval_sliding_duration_literal ::= NK_VARIABLE */ - -1, /* (588) interval_sliding_duration_literal ::= NK_STRING */ - -1, /* (589) interval_sliding_duration_literal ::= NK_INTEGER */ - 0, /* (590) fill_opt ::= */ - -4, /* (591) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - -6, /* (592) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - -6, /* (593) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - -1, /* (594) fill_mode ::= NONE */ - -1, /* (595) fill_mode ::= PREV */ - -1, /* (596) fill_mode ::= NULL */ - -1, /* (597) fill_mode ::= NULL_F */ - -1, /* (598) fill_mode ::= LINEAR */ - -1, /* (599) fill_mode ::= NEXT */ - 0, /* (600) group_by_clause_opt ::= */ - -3, /* (601) group_by_clause_opt ::= GROUP BY group_by_list */ - -1, /* (602) group_by_list ::= expr_or_subquery */ - -3, /* (603) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 0, /* (604) having_clause_opt ::= */ - -2, /* (605) having_clause_opt ::= HAVING search_condition */ - 0, /* (606) range_opt ::= */ - -6, /* (607) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - -4, /* (608) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 0, /* (609) every_opt ::= */ - -4, /* (610) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - -4, /* (611) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - -1, /* (612) query_simple ::= query_specification */ - -1, /* (613) query_simple ::= union_query_expression */ - -4, /* (614) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - -3, /* (615) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - -1, /* (616) query_simple_or_subquery ::= query_simple */ - -1, /* (617) query_simple_or_subquery ::= subquery */ - -1, /* (618) query_or_subquery ::= query_expression */ - -1, /* (619) query_or_subquery ::= subquery */ - 0, /* (620) order_by_clause_opt ::= */ - -3, /* (621) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 0, /* (622) slimit_clause_opt ::= */ - -2, /* (623) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - -4, /* (624) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - -4, /* (625) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 0, /* (626) limit_clause_opt ::= */ - -2, /* (627) limit_clause_opt ::= LIMIT NK_INTEGER */ - -4, /* (628) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - -4, /* (629) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - -3, /* (630) subquery ::= NK_LP query_expression NK_RP */ - -3, /* (631) subquery ::= NK_LP subquery NK_RP */ - -1, /* (632) search_condition ::= common_expression */ - -1, /* (633) sort_specification_list ::= sort_specification */ - -3, /* (634) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - -3, /* (635) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 0, /* (636) ordering_specification_opt ::= */ - -1, /* (637) ordering_specification_opt ::= ASC */ - -1, /* (638) ordering_specification_opt ::= DESC */ - 0, /* (639) null_ordering_opt ::= */ - -2, /* (640) null_ordering_opt ::= NULLS FIRST */ - -2, /* (641) null_ordering_opt ::= NULLS LAST */ + -4, /* (585) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ + 0, /* (586) sliding_opt ::= */ + -4, /* (587) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + -1, /* (588) interval_sliding_duration_literal ::= NK_VARIABLE */ + -1, /* (589) interval_sliding_duration_literal ::= NK_STRING */ + -1, /* (590) interval_sliding_duration_literal ::= NK_INTEGER */ + 0, /* (591) fill_opt ::= */ + -4, /* (592) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + -6, /* (593) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + -6, /* (594) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + -1, /* (595) fill_mode ::= NONE */ + -1, /* (596) fill_mode ::= PREV */ + -1, /* (597) fill_mode ::= NULL */ + -1, /* (598) fill_mode ::= NULL_F */ + -1, /* (599) fill_mode ::= LINEAR */ + -1, /* (600) fill_mode ::= NEXT */ + 0, /* (601) group_by_clause_opt ::= */ + -3, /* (602) group_by_clause_opt ::= GROUP BY group_by_list */ + -1, /* (603) group_by_list ::= expr_or_subquery */ + -3, /* (604) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 0, /* (605) having_clause_opt ::= */ + -2, /* (606) having_clause_opt ::= HAVING search_condition */ + 0, /* (607) range_opt ::= */ + -6, /* (608) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + -4, /* (609) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 0, /* (610) every_opt ::= */ + -4, /* (611) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + -4, /* (612) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + -1, /* (613) query_simple ::= query_specification */ + -1, /* (614) query_simple ::= union_query_expression */ + -4, /* (615) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + -3, /* (616) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + -1, /* (617) query_simple_or_subquery ::= query_simple */ + -1, /* (618) query_simple_or_subquery ::= subquery */ + -1, /* (619) query_or_subquery ::= query_expression */ + -1, /* (620) query_or_subquery ::= subquery */ + 0, /* (621) order_by_clause_opt ::= */ + -3, /* (622) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 0, /* (623) slimit_clause_opt ::= */ + -2, /* (624) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + -4, /* (625) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + -4, /* (626) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 0, /* (627) limit_clause_opt ::= */ + -2, /* (628) limit_clause_opt ::= LIMIT NK_INTEGER */ + -4, /* (629) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + -4, /* (630) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + -3, /* (631) subquery ::= NK_LP query_expression NK_RP */ + -3, /* (632) subquery ::= NK_LP subquery NK_RP */ + -1, /* (633) search_condition ::= common_expression */ + -1, /* (634) sort_specification_list ::= sort_specification */ + -3, /* (635) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + -3, /* (636) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 0, /* (637) ordering_specification_opt ::= */ + -1, /* (638) ordering_specification_opt ::= ASC */ + -1, /* (639) ordering_specification_opt ::= DESC */ + 0, /* (640) null_ordering_opt ::= */ + -2, /* (641) null_ordering_opt ::= NULLS FIRST */ + -2, /* (642) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -5053,21 +4992,15 @@ static YYACTIONTYPE yy_reduce( /********** Begin reduce actions **********************************************/ YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ -#line 50 "sql.y" { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } -#line 5058 "sql.c" - yy_destructor(yypParser,348,&yymsp[0].minor); - break; - case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ -#line 51 "sql.y" -{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } -#line 5064 "sql.c" yy_destructor(yypParser,349,&yymsp[0].minor); break; + case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ +{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } + yy_destructor(yypParser,350,&yymsp[0].minor); + break; case 2: /* account_options ::= */ -#line 55 "sql.y" { } -#line 5070 "sql.c" break; case 3: /* account_options ::= account_options PPS literal */ case 4: /* account_options ::= account_options TSERIES literal */ yytestcase(yyruleno==4); @@ -5078,26 +5011,20 @@ static YYACTIONTYPE yy_reduce( case 9: /* account_options ::= account_options USERS literal */ yytestcase(yyruleno==9); case 10: /* account_options ::= account_options CONNS literal */ yytestcase(yyruleno==10); case 11: /* account_options ::= account_options STATE literal */ yytestcase(yyruleno==11); -{ yy_destructor(yypParser,348,&yymsp[-2].minor); -#line 56 "sql.y" +{ yy_destructor(yypParser,349,&yymsp[-2].minor); { } -#line 5084 "sql.c" - yy_destructor(yypParser,350,&yymsp[0].minor); + yy_destructor(yypParser,351,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,351,&yymsp[0].minor); -#line 68 "sql.y" +{ yy_destructor(yypParser,352,&yymsp[0].minor); { } -#line 5092 "sql.c" } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,349,&yymsp[-1].minor); -#line 69 "sql.y" +{ yy_destructor(yypParser,350,&yymsp[-1].minor); { } -#line 5099 "sql.c" - yy_destructor(yypParser,351,&yymsp[0].minor); + yy_destructor(yypParser,352,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -5110,27 +5037,19 @@ static YYACTIONTYPE yy_reduce( case 21: /* alter_account_option ::= USERS literal */ yytestcase(yyruleno==21); case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); -#line 73 "sql.y" { } -#line 5115 "sql.c" - yy_destructor(yypParser,350,&yymsp[0].minor); + yy_destructor(yypParser,351,&yymsp[0].minor); break; case 24: /* ip_range_list ::= NK_STRING */ -#line 86 "sql.y" -{ yylhsminor.yy88 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } -#line 5121 "sql.c" - yymsp[0].minor.yy88 = yylhsminor.yy88; +{ yylhsminor.yy200 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy200 = yylhsminor.yy200; break; case 25: /* ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ -#line 87 "sql.y" -{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } -#line 5127 "sql.c" - yymsp[-2].minor.yy88 = yylhsminor.yy88; +{ yylhsminor.yy200 = addNodeToList(pCxt, yymsp[-2].minor.yy200, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy200 = yylhsminor.yy200; break; case 26: /* white_list ::= HOST ip_range_list */ -#line 91 "sql.y" -{ yymsp[-1].minor.yy88 = yymsp[0].minor.yy88; } -#line 5133 "sql.c" +{ yymsp[-1].minor.yy200 = yymsp[0].minor.yy200; } break; case 27: /* white_list_opt ::= */ case 186: /* specific_cols_opt ::= */ yytestcase(yyruleno==186); @@ -5139,140 +5058,92 @@ static YYACTIONTYPE yy_reduce( case 368: /* col_list_opt ::= */ yytestcase(yyruleno==368); case 370: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==370); case 572: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==572); - case 600: /* group_by_clause_opt ::= */ yytestcase(yyruleno==600); - case 620: /* order_by_clause_opt ::= */ yytestcase(yyruleno==620); -#line 95 "sql.y" -{ yymsp[1].minor.yy88 = NULL; } -#line 5146 "sql.c" + case 601: /* group_by_clause_opt ::= */ yytestcase(yyruleno==601); + case 621: /* order_by_clause_opt ::= */ yytestcase(yyruleno==621); +{ yymsp[1].minor.yy200 = NULL; } break; case 28: /* white_list_opt ::= white_list */ case 218: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==218); case 371: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==371); case 497: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==497); -#line 96 "sql.y" -{ yylhsminor.yy88 = yymsp[0].minor.yy88; } -#line 5154 "sql.c" - yymsp[0].minor.yy88 = yylhsminor.yy88; +{ yylhsminor.yy200 = yymsp[0].minor.yy200; } + yymsp[0].minor.yy200 = yylhsminor.yy200; break; case 29: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ -#line 100 "sql.y" { - pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-4].minor.yy993, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy279); - pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy88); + pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-4].minor.yy39, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy211); + pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy200); } -#line 5163 "sql.c" break; case 30: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -#line 104 "sql.y" -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } -#line 5168 "sql.c" +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy39, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 31: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ -#line 105 "sql.y" -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } -#line 5173 "sql.c" +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy39, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } break; case 32: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ -#line 106 "sql.y" -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } -#line 5178 "sql.c" +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy39, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } break; case 33: /* cmd ::= ALTER USER user_name ADD white_list */ -#line 107 "sql.y" -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy88); } -#line 5183 "sql.c" +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy39, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy200); } break; case 34: /* cmd ::= ALTER USER user_name DROP white_list */ -#line 108 "sql.y" -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy88); } -#line 5188 "sql.c" +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy39, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy200); } break; case 35: /* cmd ::= DROP USER user_name */ -#line 109 "sql.y" -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy993); } -#line 5193 "sql.c" +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy39); } break; case 36: /* sysinfo_opt ::= */ -#line 113 "sql.y" -{ yymsp[1].minor.yy279 = 1; } -#line 5198 "sql.c" +{ yymsp[1].minor.yy211 = 1; } break; case 37: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ -#line 114 "sql.y" -{ yymsp[-1].minor.yy279 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } -#line 5203 "sql.c" +{ yymsp[-1].minor.yy211 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } break; case 38: /* cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ -#line 117 "sql.y" -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy221, &yymsp[-3].minor.yy241, &yymsp[0].minor.yy993, yymsp[-2].minor.yy232); } -#line 5208 "sql.c" +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy731, &yymsp[-3].minor.yy1011, &yymsp[0].minor.yy39, yymsp[-2].minor.yy890); } break; case 39: /* cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ -#line 118 "sql.y" -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy221, &yymsp[-3].minor.yy241, &yymsp[0].minor.yy993, yymsp[-2].minor.yy232); } -#line 5213 "sql.c" +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy731, &yymsp[-3].minor.yy1011, &yymsp[0].minor.yy39, yymsp[-2].minor.yy890); } break; case 40: /* privileges ::= ALL */ -#line 122 "sql.y" -{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_ALL; } -#line 5218 "sql.c" +{ yymsp[0].minor.yy731 = PRIVILEGE_TYPE_ALL; } break; case 41: /* privileges ::= priv_type_list */ case 43: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==43); -#line 123 "sql.y" -{ yylhsminor.yy221 = yymsp[0].minor.yy221; } -#line 5224 "sql.c" - yymsp[0].minor.yy221 = yylhsminor.yy221; +{ yylhsminor.yy731 = yymsp[0].minor.yy731; } + yymsp[0].minor.yy731 = yylhsminor.yy731; break; case 42: /* privileges ::= SUBSCRIBE */ -#line 124 "sql.y" -{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_SUBSCRIBE; } -#line 5230 "sql.c" +{ yymsp[0].minor.yy731 = PRIVILEGE_TYPE_SUBSCRIBE; } break; case 44: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -#line 129 "sql.y" -{ yylhsminor.yy221 = yymsp[-2].minor.yy221 | yymsp[0].minor.yy221; } -#line 5235 "sql.c" - yymsp[-2].minor.yy221 = yylhsminor.yy221; +{ yylhsminor.yy731 = yymsp[-2].minor.yy731 | yymsp[0].minor.yy731; } + yymsp[-2].minor.yy731 = yylhsminor.yy731; break; case 45: /* priv_type ::= READ */ -#line 133 "sql.y" -{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_READ; } -#line 5241 "sql.c" +{ yymsp[0].minor.yy731 = PRIVILEGE_TYPE_READ; } break; case 46: /* priv_type ::= WRITE */ -#line 134 "sql.y" -{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_WRITE; } -#line 5246 "sql.c" +{ yymsp[0].minor.yy731 = PRIVILEGE_TYPE_WRITE; } break; case 47: /* priv_type ::= ALTER */ -#line 135 "sql.y" -{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_ALTER; } -#line 5251 "sql.c" +{ yymsp[0].minor.yy731 = PRIVILEGE_TYPE_ALTER; } break; case 48: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -#line 139 "sql.y" -{ yylhsminor.yy241.first = yymsp[-2].minor.yy0; yylhsminor.yy241.second = yymsp[0].minor.yy0; } -#line 5256 "sql.c" - yymsp[-2].minor.yy241 = yylhsminor.yy241; +{ yylhsminor.yy1011.first = yymsp[-2].minor.yy0; yylhsminor.yy1011.second = yymsp[0].minor.yy0; } + yymsp[-2].minor.yy1011 = yylhsminor.yy1011; break; case 49: /* priv_level ::= db_name NK_DOT NK_STAR */ -#line 140 "sql.y" -{ yylhsminor.yy241.first = yymsp[-2].minor.yy993; yylhsminor.yy241.second = yymsp[0].minor.yy0; } -#line 5262 "sql.c" - yymsp[-2].minor.yy241 = yylhsminor.yy241; +{ yylhsminor.yy1011.first = yymsp[-2].minor.yy39; yylhsminor.yy1011.second = yymsp[0].minor.yy0; } + yymsp[-2].minor.yy1011 = yylhsminor.yy1011; break; case 50: /* priv_level ::= db_name NK_DOT table_name */ -#line 141 "sql.y" -{ yylhsminor.yy241.first = yymsp[-2].minor.yy993; yylhsminor.yy241.second = yymsp[0].minor.yy993; } -#line 5268 "sql.c" - yymsp[-2].minor.yy241 = yylhsminor.yy241; +{ yylhsminor.yy1011.first = yymsp[-2].minor.yy39; yylhsminor.yy1011.second = yymsp[0].minor.yy39; } + yymsp[-2].minor.yy1011 = yylhsminor.yy1011; break; case 51: /* priv_level ::= topic_name */ -#line 142 "sql.y" -{ yylhsminor.yy241.first = yymsp[0].minor.yy993; yylhsminor.yy241.second = nil_token; } -#line 5274 "sql.c" - yymsp[0].minor.yy241 = yylhsminor.yy241; +{ yylhsminor.yy1011.first = yymsp[0].minor.yy39; yylhsminor.yy1011.second = nil_token; } + yymsp[0].minor.yy1011 = yylhsminor.yy1011; break; case 52: /* with_opt ::= */ case 155: /* start_opt ::= */ yytestcase(yyruleno==155); @@ -5283,79 +5154,53 @@ static YYACTIONTYPE yy_reduce( case 537: /* from_clause_opt ::= */ yytestcase(yyruleno==537); case 570: /* where_clause_opt ::= */ yytestcase(yyruleno==570); case 579: /* twindow_clause_opt ::= */ yytestcase(yyruleno==579); - case 585: /* sliding_opt ::= */ yytestcase(yyruleno==585); - case 590: /* fill_opt ::= */ yytestcase(yyruleno==590); - case 604: /* having_clause_opt ::= */ yytestcase(yyruleno==604); - case 606: /* range_opt ::= */ yytestcase(yyruleno==606); - case 609: /* every_opt ::= */ yytestcase(yyruleno==609); - case 622: /* slimit_clause_opt ::= */ yytestcase(yyruleno==622); - case 626: /* limit_clause_opt ::= */ yytestcase(yyruleno==626); -#line 144 "sql.y" -{ yymsp[1].minor.yy232 = NULL; } -#line 5295 "sql.c" + case 586: /* sliding_opt ::= */ yytestcase(yyruleno==586); + case 591: /* fill_opt ::= */ yytestcase(yyruleno==591); + case 605: /* having_clause_opt ::= */ yytestcase(yyruleno==605); + case 607: /* range_opt ::= */ yytestcase(yyruleno==607); + case 610: /* every_opt ::= */ yytestcase(yyruleno==610); + case 623: /* slimit_clause_opt ::= */ yytestcase(yyruleno==623); + case 627: /* limit_clause_opt ::= */ yytestcase(yyruleno==627); +{ yymsp[1].minor.yy890 = NULL; } break; case 53: /* with_opt ::= WITH search_condition */ case 538: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==538); case 571: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==571); - case 605: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==605); -#line 145 "sql.y" -{ yymsp[-1].minor.yy232 = yymsp[0].minor.yy232; } -#line 5303 "sql.c" + case 606: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==606); +{ yymsp[-1].minor.yy890 = yymsp[0].minor.yy890; } break; case 54: /* cmd ::= CREATE DNODE dnode_endpoint */ -#line 148 "sql.y" -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy993, NULL); } -#line 5308 "sql.c" +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy39, NULL); } break; case 55: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -#line 149 "sql.y" -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0); } -#line 5313 "sql.c" +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy39, &yymsp[0].minor.yy0); } break; case 56: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ -#line 150 "sql.y" -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy985, false); } -#line 5318 "sql.c" +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy145, false); } break; case 57: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -#line 151 "sql.y" -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy993, yymsp[0].minor.yy985, false); } -#line 5323 "sql.c" +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy39, yymsp[0].minor.yy145, false); } break; case 58: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ -#line 152 "sql.y" -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy985); } -#line 5328 "sql.c" +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy145); } break; case 59: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ -#line 153 "sql.y" -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy993, false, yymsp[0].minor.yy985); } -#line 5333 "sql.c" +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy39, false, yymsp[0].minor.yy145); } break; case 60: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ -#line 154 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } -#line 5338 "sql.c" break; case 61: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ -#line 155 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 5343 "sql.c" break; case 62: /* cmd ::= ALTER ALL DNODES NK_STRING */ -#line 156 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); } -#line 5348 "sql.c" break; case 63: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ -#line 157 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 5353 "sql.c" break; case 64: /* cmd ::= RESTORE DNODE NK_INTEGER */ -#line 158 "sql.y" { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_DNODE_STMT, &yymsp[0].minor.yy0); } -#line 5358 "sql.c" break; case 65: /* dnode_endpoint ::= NK_STRING */ case 66: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==66); @@ -5390,10 +5235,8 @@ static YYACTIONTYPE yy_reduce( case 493: /* star_func ::= FIRST */ yytestcase(yyruleno==493); case 494: /* star_func ::= LAST */ yytestcase(yyruleno==494); case 495: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==495); -#line 162 "sql.y" -{ yylhsminor.yy993 = yymsp[0].minor.yy0; } -#line 5395 "sql.c" - yymsp[0].minor.yy993 = yylhsminor.yy993; +{ yylhsminor.yy39 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy39 = yylhsminor.yy39; break; case 68: /* force_opt ::= */ case 92: /* not_exists_opt ::= */ yytestcase(yyruleno==92); @@ -5404,9 +5247,7 @@ static YYACTIONTYPE yy_reduce( case 384: /* ignore_opt ::= */ yytestcase(yyruleno==384); case 558: /* tag_mode_opt ::= */ yytestcase(yyruleno==558); case 560: /* set_quantifier_opt ::= */ yytestcase(yyruleno==560); -#line 168 "sql.y" -{ yymsp[1].minor.yy985 = false; } -#line 5409 "sql.c" +{ yymsp[1].minor.yy145 = false; } break; case 69: /* force_opt ::= FORCE */ case 70: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==70); @@ -5414,431 +5255,283 @@ static YYACTIONTYPE yy_reduce( case 353: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==353); case 559: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==559); case 561: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==561); -#line 169 "sql.y" -{ yymsp[0].minor.yy985 = true; } -#line 5419 "sql.c" +{ yymsp[0].minor.yy145 = true; } break; case 71: /* cmd ::= ALTER LOCAL NK_STRING */ -#line 176 "sql.y" { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } -#line 5424 "sql.c" break; case 72: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */ -#line 177 "sql.y" { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 5429 "sql.c" break; case 73: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ -#line 180 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); } -#line 5434 "sql.c" break; case 74: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */ -#line 181 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); } -#line 5439 "sql.c" break; case 75: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ -#line 182 "sql.y" { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_QNODE_STMT, &yymsp[0].minor.yy0); } -#line 5444 "sql.c" break; case 76: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ -#line 185 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); } -#line 5449 "sql.c" break; case 77: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */ -#line 186 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); } -#line 5454 "sql.c" break; case 78: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ -#line 189 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); } -#line 5459 "sql.c" break; case 79: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */ -#line 190 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); } -#line 5464 "sql.c" break; case 80: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ -#line 193 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); } -#line 5469 "sql.c" break; case 81: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */ -#line 194 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } -#line 5474 "sql.c" break; case 82: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ -#line 195 "sql.y" { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_MNODE_STMT, &yymsp[0].minor.yy0); } -#line 5479 "sql.c" break; case 83: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ -#line 198 "sql.y" { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_VNODE_STMT, &yymsp[0].minor.yy0); } -#line 5484 "sql.c" break; case 84: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -#line 201 "sql.y" -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy985, &yymsp[-1].minor.yy993, yymsp[0].minor.yy232); } -#line 5489 "sql.c" +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy145, &yymsp[-1].minor.yy39, yymsp[0].minor.yy890); } break; case 85: /* cmd ::= DROP DATABASE exists_opt db_name */ -#line 202 "sql.y" -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); } -#line 5494 "sql.c" +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy145, &yymsp[0].minor.yy39); } break; case 86: /* cmd ::= USE db_name */ -#line 203 "sql.y" -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy993); } -#line 5499 "sql.c" +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy39); } break; case 87: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -#line 204 "sql.y" -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy993, yymsp[0].minor.yy232); } -#line 5504 "sql.c" +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy39, yymsp[0].minor.yy890); } break; case 88: /* cmd ::= FLUSH DATABASE db_name */ -#line 205 "sql.y" -{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy993); } -#line 5509 "sql.c" +{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy39); } break; case 89: /* cmd ::= TRIM DATABASE db_name speed_opt */ -#line 206 "sql.y" -{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy993, yymsp[0].minor.yy92); } -#line 5514 "sql.c" +{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy39, yymsp[0].minor.yy474); } break; case 90: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ -#line 207 "sql.y" -{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy993, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } -#line 5519 "sql.c" +{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy39, yymsp[-1].minor.yy890, yymsp[0].minor.yy890); } break; case 91: /* not_exists_opt ::= IF NOT EXISTS */ -#line 211 "sql.y" -{ yymsp[-2].minor.yy985 = true; } -#line 5524 "sql.c" +{ yymsp[-2].minor.yy145 = true; } break; case 93: /* exists_opt ::= IF EXISTS */ case 359: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==359); case 385: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==385); -#line 216 "sql.y" -{ yymsp[-1].minor.yy985 = true; } -#line 5531 "sql.c" +{ yymsp[-1].minor.yy145 = true; } break; case 95: /* db_options ::= */ -#line 219 "sql.y" -{ yymsp[1].minor.yy232 = createDefaultDatabaseOptions(pCxt); } -#line 5536 "sql.c" +{ yymsp[1].minor.yy890 = createDefaultDatabaseOptions(pCxt); } break; case 96: /* db_options ::= db_options BUFFER NK_INTEGER */ -#line 220 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } -#line 5541 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 97: /* db_options ::= db_options CACHEMODEL NK_STRING */ -#line 221 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } -#line 5547 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 98: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -#line 222 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } -#line 5553 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 99: /* db_options ::= db_options COMP NK_INTEGER */ -#line 223 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_COMP, &yymsp[0].minor.yy0); } -#line 5559 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 100: /* db_options ::= db_options DURATION NK_INTEGER */ case 101: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==101); -#line 224 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } -#line 5566 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 102: /* db_options ::= db_options MAXROWS NK_INTEGER */ -#line 226 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } -#line 5572 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 103: /* db_options ::= db_options MINROWS NK_INTEGER */ -#line 227 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } -#line 5578 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 104: /* db_options ::= db_options KEEP integer_list */ case 105: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==105); -#line 228 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_KEEP, yymsp[0].minor.yy88); } -#line 5585 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_KEEP, yymsp[0].minor.yy200); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 106: /* db_options ::= db_options PAGES NK_INTEGER */ -#line 230 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } -#line 5591 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 107: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -#line 231 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } -#line 5597 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 108: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -#line 232 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } -#line 5603 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 109: /* db_options ::= db_options PRECISION NK_STRING */ -#line 233 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } -#line 5609 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 110: /* db_options ::= db_options REPLICA NK_INTEGER */ -#line 234 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } -#line 5615 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 111: /* db_options ::= db_options VGROUPS NK_INTEGER */ -#line 236 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } -#line 5621 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 112: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -#line 237 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } -#line 5627 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 113: /* db_options ::= db_options RETENTIONS retention_list */ -#line 238 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_RETENTIONS, yymsp[0].minor.yy88); } -#line 5633 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_RETENTIONS, yymsp[0].minor.yy200); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 114: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -#line 239 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } -#line 5639 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 115: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -#line 240 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL, &yymsp[0].minor.yy0); } -#line 5645 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 116: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -#line 241 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } -#line 5651 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 117: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -#line 242 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } -#line 5657 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 118: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ -#line 243 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-3].minor.yy232, DB_OPTION_WAL_RETENTION_PERIOD, &t); + yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-3].minor.yy890, DB_OPTION_WAL_RETENTION_PERIOD, &t); } -#line 5667 "sql.c" - yymsp[-3].minor.yy232 = yylhsminor.yy232; + yymsp[-3].minor.yy890 = yylhsminor.yy890; break; case 119: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -#line 248 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } -#line 5673 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 120: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ -#line 249 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-3].minor.yy232, DB_OPTION_WAL_RETENTION_SIZE, &t); + yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-3].minor.yy890, DB_OPTION_WAL_RETENTION_SIZE, &t); } -#line 5683 "sql.c" - yymsp[-3].minor.yy232 = yylhsminor.yy232; + yymsp[-3].minor.yy890 = yylhsminor.yy890; break; case 121: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -#line 254 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } -#line 5689 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 122: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -#line 255 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } -#line 5695 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 123: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -#line 256 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } -#line 5701 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 124: /* db_options ::= db_options TABLE_PREFIX signed */ -#line 257 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy232); } -#line 5707 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy890); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 125: /* db_options ::= db_options TABLE_SUFFIX signed */ -#line 258 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy232); } -#line 5713 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy890); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 126: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ -#line 259 "sql.y" -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } -#line 5719 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setDatabaseOption(pCxt, yymsp[-2].minor.yy890, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 127: /* alter_db_options ::= alter_db_option */ -#line 261 "sql.y" -{ yylhsminor.yy232 = createAlterDatabaseOptions(pCxt); yylhsminor.yy232 = setAlterDatabaseOption(pCxt, yylhsminor.yy232, &yymsp[0].minor.yy117); } -#line 5725 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createAlterDatabaseOptions(pCxt); yylhsminor.yy890 = setAlterDatabaseOption(pCxt, yylhsminor.yy890, &yymsp[0].minor.yy187); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 128: /* alter_db_options ::= alter_db_options alter_db_option */ -#line 262 "sql.y" -{ yylhsminor.yy232 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy232, &yymsp[0].minor.yy117); } -#line 5731 "sql.c" - yymsp[-1].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy890, &yymsp[0].minor.yy187); } + yymsp[-1].minor.yy890 = yylhsminor.yy890; break; case 129: /* alter_db_option ::= BUFFER NK_INTEGER */ -#line 266 "sql.y" -{ yymsp[-1].minor.yy117.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5737 "sql.c" +{ yymsp[-1].minor.yy187.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy187.val = yymsp[0].minor.yy0; } break; case 130: /* alter_db_option ::= CACHEMODEL NK_STRING */ -#line 267 "sql.y" -{ yymsp[-1].minor.yy117.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5742 "sql.c" +{ yymsp[-1].minor.yy187.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy187.val = yymsp[0].minor.yy0; } break; case 131: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -#line 268 "sql.y" -{ yymsp[-1].minor.yy117.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5747 "sql.c" +{ yymsp[-1].minor.yy187.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy187.val = yymsp[0].minor.yy0; } break; case 132: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -#line 269 "sql.y" -{ yymsp[-1].minor.yy117.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5752 "sql.c" +{ yymsp[-1].minor.yy187.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy187.val = yymsp[0].minor.yy0; } break; case 133: /* alter_db_option ::= KEEP integer_list */ case 134: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==134); -#line 270 "sql.y" -{ yymsp[-1].minor.yy117.type = DB_OPTION_KEEP; yymsp[-1].minor.yy117.pList = yymsp[0].minor.yy88; } -#line 5758 "sql.c" +{ yymsp[-1].minor.yy187.type = DB_OPTION_KEEP; yymsp[-1].minor.yy187.pList = yymsp[0].minor.yy200; } break; case 135: /* alter_db_option ::= PAGES NK_INTEGER */ -#line 272 "sql.y" -{ yymsp[-1].minor.yy117.type = DB_OPTION_PAGES; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5763 "sql.c" +{ yymsp[-1].minor.yy187.type = DB_OPTION_PAGES; yymsp[-1].minor.yy187.val = yymsp[0].minor.yy0; } break; case 136: /* alter_db_option ::= REPLICA NK_INTEGER */ -#line 273 "sql.y" -{ yymsp[-1].minor.yy117.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5768 "sql.c" +{ yymsp[-1].minor.yy187.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy187.val = yymsp[0].minor.yy0; } break; case 137: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -#line 275 "sql.y" -{ yymsp[-1].minor.yy117.type = DB_OPTION_WAL; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5773 "sql.c" +{ yymsp[-1].minor.yy187.type = DB_OPTION_WAL; yymsp[-1].minor.yy187.val = yymsp[0].minor.yy0; } break; case 138: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -#line 276 "sql.y" -{ yymsp[-1].minor.yy117.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5778 "sql.c" +{ yymsp[-1].minor.yy187.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy187.val = yymsp[0].minor.yy0; } break; case 139: /* alter_db_option ::= MINROWS NK_INTEGER */ -#line 277 "sql.y" -{ yymsp[-1].minor.yy117.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5783 "sql.c" +{ yymsp[-1].minor.yy187.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy187.val = yymsp[0].minor.yy0; } break; case 140: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ -#line 278 "sql.y" -{ yymsp[-1].minor.yy117.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5788 "sql.c" +{ yymsp[-1].minor.yy187.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy187.val = yymsp[0].minor.yy0; } break; case 141: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ -#line 279 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yymsp[-2].minor.yy117.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy117.val = t; + yymsp[-2].minor.yy187.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy187.val = t; } -#line 5797 "sql.c" break; case 142: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ -#line 284 "sql.y" -{ yymsp[-1].minor.yy117.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5802 "sql.c" +{ yymsp[-1].minor.yy187.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy187.val = yymsp[0].minor.yy0; } break; case 143: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ -#line 285 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yymsp[-2].minor.yy117.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy117.val = t; + yymsp[-2].minor.yy187.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy187.val = t; } -#line 5811 "sql.c" break; case 144: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ -#line 290 "sql.y" -{ yymsp[-1].minor.yy117.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5816 "sql.c" +{ yymsp[-1].minor.yy187.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy187.val = yymsp[0].minor.yy0; } break; case 145: /* integer_list ::= NK_INTEGER */ -#line 294 "sql.y" -{ yylhsminor.yy88 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 5821 "sql.c" - yymsp[0].minor.yy88 = yylhsminor.yy88; +{ yylhsminor.yy200 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy200 = yylhsminor.yy200; break; case 146: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ case 398: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==398); -#line 295 "sql.y" -{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 5828 "sql.c" - yymsp[-2].minor.yy88 = yylhsminor.yy88; +{ yylhsminor.yy200 = addNodeToList(pCxt, yymsp[-2].minor.yy200, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy200 = yylhsminor.yy200; break; case 147: /* variable_list ::= NK_VARIABLE */ -#line 299 "sql.y" -{ yylhsminor.yy88 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 5834 "sql.c" - yymsp[0].minor.yy88 = yylhsminor.yy88; +{ yylhsminor.yy200 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy200 = yylhsminor.yy200; break; case 148: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -#line 300 "sql.y" -{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 5840 "sql.c" - yymsp[-2].minor.yy88 = yylhsminor.yy88; +{ yylhsminor.yy200 = addNodeToList(pCxt, yymsp[-2].minor.yy200, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy200 = yylhsminor.yy200; break; case 149: /* retention_list ::= retention */ case 180: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==180); @@ -5853,11 +5546,9 @@ static YYACTIONTYPE yy_reduce( case 504: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==504); case 563: /* select_list ::= select_item */ yytestcase(yyruleno==563); case 574: /* partition_list ::= partition_item */ yytestcase(yyruleno==574); - case 633: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==633); -#line 304 "sql.y" -{ yylhsminor.yy88 = createNodeList(pCxt, yymsp[0].minor.yy232); } -#line 5859 "sql.c" - yymsp[0].minor.yy88 = yylhsminor.yy88; + case 634: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==634); +{ yylhsminor.yy200 = createNodeList(pCxt, yymsp[0].minor.yy890); } + yymsp[0].minor.yy200 = yylhsminor.yy200; break; case 150: /* retention_list ::= retention_list NK_COMMA retention */ case 184: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==184); @@ -5870,1093 +5561,697 @@ static YYACTIONTYPE yy_reduce( case 499: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==499); case 564: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==564); case 575: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==575); - case 634: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==634); -#line 305 "sql.y" -{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, yymsp[0].minor.yy232); } -#line 5876 "sql.c" - yymsp[-2].minor.yy88 = yylhsminor.yy88; + case 635: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==635); +{ yylhsminor.yy200 = addNodeToList(pCxt, yymsp[-2].minor.yy200, yymsp[0].minor.yy890); } + yymsp[-2].minor.yy200 = yylhsminor.yy200; break; case 151: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ case 152: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==152); -#line 307 "sql.y" -{ yylhsminor.yy232 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 5883 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 153: /* speed_opt ::= */ case 354: /* bufsize_opt ::= */ yytestcase(yyruleno==354); -#line 312 "sql.y" -{ yymsp[1].minor.yy92 = 0; } -#line 5890 "sql.c" +{ yymsp[1].minor.yy474 = 0; } break; case 154: /* speed_opt ::= BWLIMIT NK_INTEGER */ case 355: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==355); -#line 313 "sql.y" -{ yymsp[-1].minor.yy92 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } -#line 5896 "sql.c" +{ yymsp[-1].minor.yy474 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; case 156: /* start_opt ::= START WITH NK_INTEGER */ case 160: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==160); -#line 316 "sql.y" -{ yymsp[-2].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } -#line 5902 "sql.c" +{ yymsp[-2].minor.yy890 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 157: /* start_opt ::= START WITH NK_STRING */ case 161: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==161); -#line 317 "sql.y" -{ yymsp[-2].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } -#line 5908 "sql.c" +{ yymsp[-2].minor.yy890 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; case 158: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ case 162: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==162); -#line 318 "sql.y" -{ yymsp[-3].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } -#line 5914 "sql.c" +{ yymsp[-3].minor.yy890 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; case 163: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 165: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==165); -#line 327 "sql.y" -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy985, yymsp[-5].minor.yy232, yymsp[-3].minor.yy88, yymsp[-1].minor.yy88, yymsp[0].minor.yy232); } -#line 5920 "sql.c" +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy145, yymsp[-5].minor.yy890, yymsp[-3].minor.yy200, yymsp[-1].minor.yy200, yymsp[0].minor.yy890); } break; case 164: /* cmd ::= CREATE TABLE multi_create_clause */ -#line 328 "sql.y" -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy88); } -#line 5925 "sql.c" +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy200); } break; case 166: /* cmd ::= DROP TABLE multi_drop_clause */ -#line 331 "sql.y" -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy88); } -#line 5930 "sql.c" +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy200); } break; case 167: /* cmd ::= DROP STABLE exists_opt full_table_name */ -#line 332 "sql.y" -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy232); } -#line 5935 "sql.c" +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy145, yymsp[0].minor.yy890); } break; case 168: /* cmd ::= ALTER TABLE alter_table_clause */ case 400: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==400); case 401: /* cmd ::= insert_query */ yytestcase(yyruleno==401); -#line 334 "sql.y" -{ pCxt->pRootNode = yymsp[0].minor.yy232; } -#line 5942 "sql.c" +{ pCxt->pRootNode = yymsp[0].minor.yy890; } break; case 169: /* cmd ::= ALTER STABLE alter_table_clause */ -#line 335 "sql.y" -{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy232); } -#line 5947 "sql.c" +{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy890); } break; case 170: /* alter_table_clause ::= full_table_name alter_table_options */ -#line 337 "sql.y" -{ yylhsminor.yy232 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } -#line 5952 "sql.c" - yymsp[-1].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy890, yymsp[0].minor.yy890); } + yymsp[-1].minor.yy890 = yylhsminor.yy890; break; case 171: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -#line 339 "sql.y" -{ yylhsminor.yy232 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400); } -#line 5958 "sql.c" - yymsp[-4].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy890, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy39, yymsp[0].minor.yy34); } + yymsp[-4].minor.yy890 = yylhsminor.yy890; break; case 172: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -#line 340 "sql.y" -{ yylhsminor.yy232 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy232, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy993); } -#line 5964 "sql.c" - yymsp[-3].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy890, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy39); } + yymsp[-3].minor.yy890 = yylhsminor.yy890; break; case 173: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -#line 342 "sql.y" -{ yylhsminor.yy232 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400); } -#line 5970 "sql.c" - yymsp[-4].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy890, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy39, yymsp[0].minor.yy34); } + yymsp[-4].minor.yy890 = yylhsminor.yy890; break; case 174: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -#line 344 "sql.y" -{ yylhsminor.yy232 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy993, &yymsp[0].minor.yy993); } -#line 5976 "sql.c" - yymsp[-4].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy890, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy39, &yymsp[0].minor.yy39); } + yymsp[-4].minor.yy890 = yylhsminor.yy890; break; case 175: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -#line 346 "sql.y" -{ yylhsminor.yy232 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400); } -#line 5982 "sql.c" - yymsp[-4].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy890, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy39, yymsp[0].minor.yy34); } + yymsp[-4].minor.yy890 = yylhsminor.yy890; break; case 176: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -#line 347 "sql.y" -{ yylhsminor.yy232 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy232, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy993); } -#line 5988 "sql.c" - yymsp[-3].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy890, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy39); } + yymsp[-3].minor.yy890 = yylhsminor.yy890; break; case 177: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -#line 349 "sql.y" -{ yylhsminor.yy232 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400); } -#line 5994 "sql.c" - yymsp[-4].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy890, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy39, yymsp[0].minor.yy34); } + yymsp[-4].minor.yy890 = yylhsminor.yy890; break; case 178: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -#line 351 "sql.y" -{ yylhsminor.yy232 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy993, &yymsp[0].minor.yy993); } -#line 6000 "sql.c" - yymsp[-4].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy890, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy39, &yymsp[0].minor.yy39); } + yymsp[-4].minor.yy890 = yylhsminor.yy890; break; case 179: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -#line 353 "sql.y" -{ yylhsminor.yy232 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy232, &yymsp[-2].minor.yy993, yymsp[0].minor.yy232); } -#line 6006 "sql.c" - yymsp[-5].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy890, &yymsp[-2].minor.yy39, yymsp[0].minor.yy890); } + yymsp[-5].minor.yy890 = yylhsminor.yy890; break; case 181: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ case 505: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==505); -#line 358 "sql.y" -{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-1].minor.yy88, yymsp[0].minor.yy232); } -#line 6013 "sql.c" - yymsp[-1].minor.yy88 = yylhsminor.yy88; +{ yylhsminor.yy200 = addNodeToList(pCxt, yymsp[-1].minor.yy200, yymsp[0].minor.yy890); } + yymsp[-1].minor.yy200 = yylhsminor.yy200; break; case 182: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ -#line 362 "sql.y" -{ yylhsminor.yy232 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy985, yymsp[-8].minor.yy232, yymsp[-6].minor.yy232, yymsp[-5].minor.yy88, yymsp[-2].minor.yy88, yymsp[0].minor.yy232); } -#line 6019 "sql.c" - yymsp[-9].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy145, yymsp[-8].minor.yy890, yymsp[-6].minor.yy890, yymsp[-5].minor.yy200, yymsp[-2].minor.yy200, yymsp[0].minor.yy890); } + yymsp[-9].minor.yy890 = yylhsminor.yy890; break; case 185: /* drop_table_clause ::= exists_opt full_table_name */ -#line 369 "sql.y" -{ yylhsminor.yy232 = createDropTableClause(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy232); } -#line 6025 "sql.c" - yymsp[-1].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createDropTableClause(pCxt, yymsp[-1].minor.yy145, yymsp[0].minor.yy890); } + yymsp[-1].minor.yy890 = yylhsminor.yy890; break; case 187: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ case 369: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==369); -#line 374 "sql.y" -{ yymsp[-2].minor.yy88 = yymsp[-1].minor.yy88; } -#line 6032 "sql.c" +{ yymsp[-2].minor.yy200 = yymsp[-1].minor.yy200; } break; case 188: /* full_table_name ::= table_name */ -#line 376 "sql.y" -{ yylhsminor.yy232 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy993, NULL); } -#line 6037 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy39, NULL); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 189: /* full_table_name ::= db_name NK_DOT table_name */ -#line 377 "sql.y" -{ yylhsminor.yy232 = createRealTableNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993, NULL); } -#line 6043 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRealTableNode(pCxt, &yymsp[-2].minor.yy39, &yymsp[0].minor.yy39, NULL); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 192: /* column_def ::= column_name type_name */ -#line 384 "sql.y" -{ yylhsminor.yy232 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400, NULL); } -#line 6049 "sql.c" - yymsp[-1].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy39, yymsp[0].minor.yy34, NULL); } + yymsp[-1].minor.yy890 = yylhsminor.yy890; break; case 193: /* type_name ::= BOOL */ -#line 389 "sql.y" -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_BOOL); } -#line 6055 "sql.c" +{ yymsp[0].minor.yy34 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 194: /* type_name ::= TINYINT */ -#line 390 "sql.y" -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_TINYINT); } -#line 6060 "sql.c" +{ yymsp[0].minor.yy34 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 195: /* type_name ::= SMALLINT */ -#line 391 "sql.y" -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_SMALLINT); } -#line 6065 "sql.c" +{ yymsp[0].minor.yy34 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 196: /* type_name ::= INT */ case 197: /* type_name ::= INTEGER */ yytestcase(yyruleno==197); -#line 392 "sql.y" -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_INT); } -#line 6071 "sql.c" +{ yymsp[0].minor.yy34 = createDataType(TSDB_DATA_TYPE_INT); } break; case 198: /* type_name ::= BIGINT */ -#line 394 "sql.y" -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_BIGINT); } -#line 6076 "sql.c" +{ yymsp[0].minor.yy34 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 199: /* type_name ::= FLOAT */ -#line 395 "sql.y" -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_FLOAT); } -#line 6081 "sql.c" +{ yymsp[0].minor.yy34 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 200: /* type_name ::= DOUBLE */ -#line 396 "sql.y" -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_DOUBLE); } -#line 6086 "sql.c" +{ yymsp[0].minor.yy34 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 201: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -#line 397 "sql.y" -{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } -#line 6091 "sql.c" +{ yymsp[-3].minor.yy34 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 202: /* type_name ::= TIMESTAMP */ -#line 398 "sql.y" -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } -#line 6096 "sql.c" +{ yymsp[0].minor.yy34 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 203: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -#line 399 "sql.y" -{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } -#line 6101 "sql.c" +{ yymsp[-3].minor.yy34 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 204: /* type_name ::= TINYINT UNSIGNED */ -#line 400 "sql.y" -{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_UTINYINT); } -#line 6106 "sql.c" +{ yymsp[-1].minor.yy34 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 205: /* type_name ::= SMALLINT UNSIGNED */ -#line 401 "sql.y" -{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_USMALLINT); } -#line 6111 "sql.c" +{ yymsp[-1].minor.yy34 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 206: /* type_name ::= INT UNSIGNED */ -#line 402 "sql.y" -{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_UINT); } -#line 6116 "sql.c" +{ yymsp[-1].minor.yy34 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 207: /* type_name ::= BIGINT UNSIGNED */ -#line 403 "sql.y" -{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_UBIGINT); } -#line 6121 "sql.c" +{ yymsp[-1].minor.yy34 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 208: /* type_name ::= JSON */ -#line 404 "sql.y" -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_JSON); } -#line 6126 "sql.c" +{ yymsp[0].minor.yy34 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 209: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -#line 405 "sql.y" -{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } -#line 6131 "sql.c" +{ yymsp[-3].minor.yy34 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 210: /* type_name ::= MEDIUMBLOB */ -#line 406 "sql.y" -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } -#line 6136 "sql.c" +{ yymsp[0].minor.yy34 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 211: /* type_name ::= BLOB */ -#line 407 "sql.y" -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_BLOB); } -#line 6141 "sql.c" +{ yymsp[0].minor.yy34 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 212: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -#line 408 "sql.y" -{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } -#line 6146 "sql.c" +{ yymsp[-3].minor.yy34 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 213: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ -#line 409 "sql.y" -{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } -#line 6151 "sql.c" +{ yymsp[-3].minor.yy34 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } break; case 214: /* type_name ::= DECIMAL */ -#line 410 "sql.y" -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_DECIMAL); } -#line 6156 "sql.c" +{ yymsp[0].minor.yy34 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 215: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -#line 411 "sql.y" -{ yymsp[-3].minor.yy400 = createDataType(TSDB_DATA_TYPE_DECIMAL); } -#line 6161 "sql.c" +{ yymsp[-3].minor.yy34 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 216: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -#line 412 "sql.y" -{ yymsp[-5].minor.yy400 = createDataType(TSDB_DATA_TYPE_DECIMAL); } -#line 6166 "sql.c" +{ yymsp[-5].minor.yy34 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 219: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ case 372: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==372); -#line 421 "sql.y" -{ yymsp[-3].minor.yy88 = yymsp[-1].minor.yy88; } -#line 6172 "sql.c" +{ yymsp[-3].minor.yy200 = yymsp[-1].minor.yy200; } break; case 220: /* table_options ::= */ -#line 423 "sql.y" -{ yymsp[1].minor.yy232 = createDefaultTableOptions(pCxt); } -#line 6177 "sql.c" +{ yymsp[1].minor.yy890 = createDefaultTableOptions(pCxt); } break; case 221: /* table_options ::= table_options COMMENT NK_STRING */ -#line 424 "sql.y" -{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } -#line 6182 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setTableOption(pCxt, yymsp[-2].minor.yy890, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 222: /* table_options ::= table_options MAX_DELAY duration_list */ -#line 425 "sql.y" -{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy88); } -#line 6188 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setTableOption(pCxt, yymsp[-2].minor.yy890, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy200); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 223: /* table_options ::= table_options WATERMARK duration_list */ -#line 426 "sql.y" -{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy88); } -#line 6194 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setTableOption(pCxt, yymsp[-2].minor.yy890, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy200); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 224: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -#line 427 "sql.y" -{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-4].minor.yy232, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy88); } -#line 6200 "sql.c" - yymsp[-4].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setTableOption(pCxt, yymsp[-4].minor.yy890, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy200); } + yymsp[-4].minor.yy890 = yylhsminor.yy890; break; case 225: /* table_options ::= table_options TTL NK_INTEGER */ -#line 428 "sql.y" -{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } -#line 6206 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setTableOption(pCxt, yymsp[-2].minor.yy890, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 226: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -#line 429 "sql.y" -{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-4].minor.yy232, TABLE_OPTION_SMA, yymsp[-1].minor.yy88); } -#line 6212 "sql.c" - yymsp[-4].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setTableOption(pCxt, yymsp[-4].minor.yy890, TABLE_OPTION_SMA, yymsp[-1].minor.yy200); } + yymsp[-4].minor.yy890 = yylhsminor.yy890; break; case 227: /* table_options ::= table_options DELETE_MARK duration_list */ -#line 430 "sql.y" -{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy88); } -#line 6218 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setTableOption(pCxt, yymsp[-2].minor.yy890, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy200); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 228: /* alter_table_options ::= alter_table_option */ -#line 432 "sql.y" -{ yylhsminor.yy232 = createAlterTableOptions(pCxt); yylhsminor.yy232 = setTableOption(pCxt, yylhsminor.yy232, yymsp[0].minor.yy117.type, &yymsp[0].minor.yy117.val); } -#line 6224 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createAlterTableOptions(pCxt); yylhsminor.yy890 = setTableOption(pCxt, yylhsminor.yy890, yymsp[0].minor.yy187.type, &yymsp[0].minor.yy187.val); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 229: /* alter_table_options ::= alter_table_options alter_table_option */ -#line 433 "sql.y" -{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-1].minor.yy232, yymsp[0].minor.yy117.type, &yymsp[0].minor.yy117.val); } -#line 6230 "sql.c" - yymsp[-1].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setTableOption(pCxt, yymsp[-1].minor.yy890, yymsp[0].minor.yy187.type, &yymsp[0].minor.yy187.val); } + yymsp[-1].minor.yy890 = yylhsminor.yy890; break; case 230: /* alter_table_option ::= COMMENT NK_STRING */ -#line 437 "sql.y" -{ yymsp[-1].minor.yy117.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 6236 "sql.c" +{ yymsp[-1].minor.yy187.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy187.val = yymsp[0].minor.yy0; } break; case 231: /* alter_table_option ::= TTL NK_INTEGER */ -#line 438 "sql.y" -{ yymsp[-1].minor.yy117.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 6241 "sql.c" +{ yymsp[-1].minor.yy187.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy187.val = yymsp[0].minor.yy0; } break; case 232: /* duration_list ::= duration_literal */ case 459: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==459); -#line 442 "sql.y" -{ yylhsminor.yy88 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } -#line 6247 "sql.c" - yymsp[0].minor.yy88 = yylhsminor.yy88; +{ yylhsminor.yy200 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy890)); } + yymsp[0].minor.yy200 = yylhsminor.yy200; break; case 233: /* duration_list ::= duration_list NK_COMMA duration_literal */ case 460: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==460); -#line 443 "sql.y" -{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } -#line 6254 "sql.c" - yymsp[-2].minor.yy88 = yylhsminor.yy88; +{ yylhsminor.yy200 = addNodeToList(pCxt, yymsp[-2].minor.yy200, releaseRawExprNode(pCxt, yymsp[0].minor.yy890)); } + yymsp[-2].minor.yy200 = yylhsminor.yy200; break; case 236: /* rollup_func_name ::= function_name */ -#line 450 "sql.y" -{ yylhsminor.yy232 = createFunctionNode(pCxt, &yymsp[0].minor.yy993, NULL); } -#line 6260 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createFunctionNode(pCxt, &yymsp[0].minor.yy39, NULL); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 237: /* rollup_func_name ::= FIRST */ case 238: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==238); case 306: /* tag_item ::= QTAGS */ yytestcase(yyruleno==306); -#line 451 "sql.y" -{ yylhsminor.yy232 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } -#line 6268 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 241: /* col_name ::= column_name */ case 307: /* tag_item ::= column_name */ yytestcase(yyruleno==307); -#line 459 "sql.y" -{ yylhsminor.yy232 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy993); } -#line 6275 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy39); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 242: /* cmd ::= SHOW DNODES */ -#line 462 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } -#line 6281 "sql.c" break; case 243: /* cmd ::= SHOW USERS */ -#line 463 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } -#line 6286 "sql.c" break; case 244: /* cmd ::= SHOW USER PRIVILEGES */ -#line 464 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); } -#line 6291 "sql.c" break; case 245: /* cmd ::= SHOW db_kind_opt DATABASES */ -#line 465 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); - setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy281); + setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy979); } -#line 6299 "sql.c" break; case 246: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ -#line 469 "sql.y" { - pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy133, yymsp[0].minor.yy232, OP_TYPE_LIKE); + pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy1013, yymsp[0].minor.yy890, OP_TYPE_LIKE); } -#line 6306 "sql.c" break; case 247: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -#line 472 "sql.y" -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy232, yymsp[0].minor.yy232, OP_TYPE_LIKE); } -#line 6311 "sql.c" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy890, yymsp[0].minor.yy890, OP_TYPE_LIKE); } break; case 248: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -#line 473 "sql.y" -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy232, NULL, OP_TYPE_LIKE); } -#line 6316 "sql.c" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy890, NULL, OP_TYPE_LIKE); } break; case 249: /* cmd ::= SHOW MNODES */ -#line 474 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } -#line 6321 "sql.c" break; case 250: /* cmd ::= SHOW QNODES */ -#line 476 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } -#line 6326 "sql.c" break; case 251: /* cmd ::= SHOW FUNCTIONS */ -#line 477 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } -#line 6331 "sql.c" break; case 252: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -#line 478 "sql.y" -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy232, yymsp[-1].minor.yy232, OP_TYPE_EQUAL); } -#line 6336 "sql.c" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy890, yymsp[-1].minor.yy890, OP_TYPE_EQUAL); } break; case 253: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ -#line 479 "sql.y" -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy993), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993), OP_TYPE_EQUAL); } -#line 6341 "sql.c" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy39), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy39), OP_TYPE_EQUAL); } break; case 254: /* cmd ::= SHOW STREAMS */ -#line 480 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } -#line 6346 "sql.c" break; case 255: /* cmd ::= SHOW ACCOUNTS */ -#line 481 "sql.y" { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } -#line 6351 "sql.c" break; case 256: /* cmd ::= SHOW APPS */ -#line 482 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } -#line 6356 "sql.c" break; case 257: /* cmd ::= SHOW CONNECTIONS */ -#line 483 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } -#line 6361 "sql.c" break; case 258: /* cmd ::= SHOW LICENCES */ case 259: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==259); -#line 484 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } -#line 6367 "sql.c" break; case 260: /* cmd ::= SHOW CREATE DATABASE db_name */ -#line 486 "sql.y" -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy993); } -#line 6372 "sql.c" +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy39); } break; case 261: /* cmd ::= SHOW CREATE TABLE full_table_name */ -#line 487 "sql.y" -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy232); } -#line 6377 "sql.c" +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy890); } break; case 262: /* cmd ::= SHOW CREATE STABLE full_table_name */ -#line 488 "sql.y" -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy232); } -#line 6382 "sql.c" +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy890); } break; case 263: /* cmd ::= SHOW QUERIES */ -#line 489 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } -#line 6387 "sql.c" break; case 264: /* cmd ::= SHOW SCORES */ -#line 490 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } -#line 6392 "sql.c" break; case 265: /* cmd ::= SHOW TOPICS */ -#line 491 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } -#line 6397 "sql.c" break; case 266: /* cmd ::= SHOW VARIABLES */ case 267: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==267); -#line 492 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } -#line 6403 "sql.c" break; case 268: /* cmd ::= SHOW LOCAL VARIABLES */ -#line 494 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } -#line 6408 "sql.c" break; case 269: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ -#line 495 "sql.y" -{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy232); } -#line 6413 "sql.c" +{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy890); } break; case 270: /* cmd ::= SHOW BNODES */ -#line 496 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } -#line 6418 "sql.c" break; case 271: /* cmd ::= SHOW SNODES */ -#line 497 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } -#line 6423 "sql.c" break; case 272: /* cmd ::= SHOW CLUSTER */ -#line 498 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } -#line 6428 "sql.c" break; case 273: /* cmd ::= SHOW TRANSACTIONS */ -#line 499 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } -#line 6433 "sql.c" break; case 274: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -#line 500 "sql.y" -{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy232); } -#line 6438 "sql.c" +{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy890); } break; case 275: /* cmd ::= SHOW CONSUMERS */ -#line 501 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } -#line 6443 "sql.c" break; case 276: /* cmd ::= SHOW SUBSCRIPTIONS */ -#line 502 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } -#line 6448 "sql.c" break; case 277: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -#line 503 "sql.y" -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy232, yymsp[-1].minor.yy232, OP_TYPE_EQUAL); } -#line 6453 "sql.c" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy890, yymsp[-1].minor.yy890, OP_TYPE_EQUAL); } break; case 278: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ -#line 504 "sql.y" -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy993), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993), OP_TYPE_EQUAL); } -#line 6458 "sql.c" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy39), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy39), OP_TYPE_EQUAL); } break; case 279: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ -#line 505 "sql.y" -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy232, yymsp[0].minor.yy232, yymsp[-3].minor.yy88); } -#line 6463 "sql.c" +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy890, yymsp[0].minor.yy890, yymsp[-3].minor.yy200); } break; case 280: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ -#line 506 "sql.y" -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy993), yymsp[-4].minor.yy88); } -#line 6468 "sql.c" +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy39), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy39), yymsp[-4].minor.yy200); } break; case 281: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ -#line 507 "sql.y" { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } -#line 6473 "sql.c" break; case 282: /* cmd ::= SHOW VNODES */ -#line 508 "sql.y" { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, NULL); } -#line 6478 "sql.c" break; case 283: /* cmd ::= SHOW db_name_cond_opt ALIVE */ -#line 510 "sql.y" -{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy232, QUERY_NODE_SHOW_DB_ALIVE_STMT); } -#line 6483 "sql.c" +{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy890, QUERY_NODE_SHOW_DB_ALIVE_STMT); } break; case 284: /* cmd ::= SHOW CLUSTER ALIVE */ -#line 511 "sql.y" { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } -#line 6488 "sql.c" break; case 285: /* cmd ::= SHOW db_name_cond_opt VIEWS */ -#line 512 "sql.y" -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-1].minor.yy232, NULL, OP_TYPE_LIKE); } -#line 6493 "sql.c" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-1].minor.yy890, NULL, OP_TYPE_LIKE); } break; case 286: /* cmd ::= SHOW CREATE VIEW full_table_name */ -#line 513 "sql.y" -{ pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy232); } -#line 6498 "sql.c" +{ pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy890); } break; case 287: /* cmd ::= SHOW COMPACTS */ -#line 514 "sql.y" { pCxt->pRootNode = createShowCompactsStmt(pCxt, QUERY_NODE_SHOW_COMPACTS_STMT); } -#line 6503 "sql.c" break; case 288: /* cmd ::= SHOW COMPACT NK_INTEGER */ -#line 515 "sql.y" { pCxt->pRootNode = createShowCompactDetailsStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 6508 "sql.c" break; case 289: /* table_kind_db_name_cond_opt ::= */ -#line 519 "sql.y" -{ yymsp[1].minor.yy133.kind = SHOW_KIND_ALL; yymsp[1].minor.yy133.dbName = nil_token; } -#line 6513 "sql.c" +{ yymsp[1].minor.yy1013.kind = SHOW_KIND_ALL; yymsp[1].minor.yy1013.dbName = nil_token; } break; case 290: /* table_kind_db_name_cond_opt ::= table_kind */ -#line 520 "sql.y" -{ yylhsminor.yy133.kind = yymsp[0].minor.yy281; yylhsminor.yy133.dbName = nil_token; } -#line 6518 "sql.c" - yymsp[0].minor.yy133 = yylhsminor.yy133; +{ yylhsminor.yy1013.kind = yymsp[0].minor.yy979; yylhsminor.yy1013.dbName = nil_token; } + yymsp[0].minor.yy1013 = yylhsminor.yy1013; break; case 291: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ -#line 521 "sql.y" -{ yylhsminor.yy133.kind = SHOW_KIND_ALL; yylhsminor.yy133.dbName = yymsp[-1].minor.yy993; } -#line 6524 "sql.c" - yymsp[-1].minor.yy133 = yylhsminor.yy133; +{ yylhsminor.yy1013.kind = SHOW_KIND_ALL; yylhsminor.yy1013.dbName = yymsp[-1].minor.yy39; } + yymsp[-1].minor.yy1013 = yylhsminor.yy1013; break; case 292: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ -#line 522 "sql.y" -{ yylhsminor.yy133.kind = yymsp[-2].minor.yy281; yylhsminor.yy133.dbName = yymsp[-1].minor.yy993; } -#line 6530 "sql.c" - yymsp[-2].minor.yy133 = yylhsminor.yy133; +{ yylhsminor.yy1013.kind = yymsp[-2].minor.yy979; yylhsminor.yy1013.dbName = yymsp[-1].minor.yy39; } + yymsp[-2].minor.yy1013 = yylhsminor.yy1013; break; case 293: /* table_kind ::= NORMAL */ -#line 526 "sql.y" -{ yymsp[0].minor.yy281 = SHOW_KIND_TABLES_NORMAL; } -#line 6536 "sql.c" +{ yymsp[0].minor.yy979 = SHOW_KIND_TABLES_NORMAL; } break; case 294: /* table_kind ::= CHILD */ -#line 527 "sql.y" -{ yymsp[0].minor.yy281 = SHOW_KIND_TABLES_CHILD; } -#line 6541 "sql.c" +{ yymsp[0].minor.yy979 = SHOW_KIND_TABLES_CHILD; } break; case 295: /* db_name_cond_opt ::= */ case 300: /* from_db_opt ::= */ yytestcase(yyruleno==300); -#line 529 "sql.y" -{ yymsp[1].minor.yy232 = createDefaultDatabaseCondValue(pCxt); } -#line 6547 "sql.c" +{ yymsp[1].minor.yy890 = createDefaultDatabaseCondValue(pCxt); } break; case 296: /* db_name_cond_opt ::= db_name NK_DOT */ -#line 530 "sql.y" -{ yylhsminor.yy232 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy993); } -#line 6552 "sql.c" - yymsp[-1].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy39); } + yymsp[-1].minor.yy890 = yylhsminor.yy890; break; case 298: /* like_pattern_opt ::= LIKE NK_STRING */ -#line 533 "sql.y" -{ yymsp[-1].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } -#line 6558 "sql.c" +{ yymsp[-1].minor.yy890 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; case 299: /* table_name_cond ::= table_name */ -#line 535 "sql.y" -{ yylhsminor.yy232 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993); } -#line 6563 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy39); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 301: /* from_db_opt ::= FROM db_name */ -#line 538 "sql.y" -{ yymsp[-1].minor.yy232 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993); } -#line 6569 "sql.c" +{ yymsp[-1].minor.yy890 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy39); } break; case 305: /* tag_item ::= TBNAME */ -#line 546 "sql.y" -{ yylhsminor.yy232 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } -#line 6574 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 308: /* tag_item ::= column_name column_alias */ -#line 549 "sql.y" -{ yylhsminor.yy232 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy993), &yymsp[0].minor.yy993); } -#line 6580 "sql.c" - yymsp[-1].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy39), &yymsp[0].minor.yy39); } + yymsp[-1].minor.yy890 = yylhsminor.yy890; break; case 309: /* tag_item ::= column_name AS column_alias */ -#line 550 "sql.y" -{ yylhsminor.yy232 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy993), &yymsp[0].minor.yy993); } -#line 6586 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy39), &yymsp[0].minor.yy39); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 310: /* db_kind_opt ::= */ -#line 554 "sql.y" -{ yymsp[1].minor.yy281 = SHOW_KIND_ALL; } -#line 6592 "sql.c" +{ yymsp[1].minor.yy979 = SHOW_KIND_ALL; } break; case 311: /* db_kind_opt ::= USER */ -#line 555 "sql.y" -{ yymsp[0].minor.yy281 = SHOW_KIND_DATABASES_USER; } -#line 6597 "sql.c" +{ yymsp[0].minor.yy979 = SHOW_KIND_DATABASES_USER; } break; case 312: /* db_kind_opt ::= SYSTEM */ -#line 556 "sql.y" -{ yymsp[0].minor.yy281 = SHOW_KIND_DATABASES_SYSTEM; } -#line 6602 "sql.c" +{ yymsp[0].minor.yy979 = SHOW_KIND_DATABASES_SYSTEM; } break; case 313: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ -#line 560 "sql.y" -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy985, yymsp[-3].minor.yy232, yymsp[-1].minor.yy232, NULL, yymsp[0].minor.yy232); } -#line 6607 "sql.c" +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy145, yymsp[-3].minor.yy890, yymsp[-1].minor.yy890, NULL, yymsp[0].minor.yy890); } break; case 314: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ -#line 562 "sql.y" -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy985, yymsp[-5].minor.yy232, yymsp[-3].minor.yy232, yymsp[-1].minor.yy88, NULL); } -#line 6612 "sql.c" +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy145, yymsp[-5].minor.yy890, yymsp[-3].minor.yy890, yymsp[-1].minor.yy200, NULL); } break; case 315: /* cmd ::= DROP INDEX exists_opt full_index_name */ -#line 563 "sql.y" -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy232); } -#line 6617 "sql.c" +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy145, yymsp[0].minor.yy890); } break; case 316: /* full_index_name ::= index_name */ -#line 565 "sql.y" -{ yylhsminor.yy232 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy993); } -#line 6622 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy39); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 317: /* full_index_name ::= db_name NK_DOT index_name */ -#line 566 "sql.y" -{ yylhsminor.yy232 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993); } -#line 6628 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy39, &yymsp[0].minor.yy39); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 318: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -#line 569 "sql.y" -{ yymsp[-9].minor.yy232 = createIndexOption(pCxt, yymsp[-7].minor.yy88, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), NULL, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } -#line 6634 "sql.c" +{ yymsp[-9].minor.yy890 = createIndexOption(pCxt, yymsp[-7].minor.yy200, releaseRawExprNode(pCxt, yymsp[-3].minor.yy890), NULL, yymsp[-1].minor.yy890, yymsp[0].minor.yy890); } break; case 319: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ -#line 572 "sql.y" -{ yymsp[-11].minor.yy232 = createIndexOption(pCxt, yymsp[-9].minor.yy88, releaseRawExprNode(pCxt, yymsp[-5].minor.yy232), releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } -#line 6639 "sql.c" +{ yymsp[-11].minor.yy890 = createIndexOption(pCxt, yymsp[-9].minor.yy200, releaseRawExprNode(pCxt, yymsp[-5].minor.yy890), releaseRawExprNode(pCxt, yymsp[-3].minor.yy890), yymsp[-1].minor.yy890, yymsp[0].minor.yy890); } break; case 322: /* func ::= sma_func_name NK_LP expression_list NK_RP */ -#line 579 "sql.y" -{ yylhsminor.yy232 = createFunctionNode(pCxt, &yymsp[-3].minor.yy993, yymsp[-1].minor.yy88); } -#line 6644 "sql.c" - yymsp[-3].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createFunctionNode(pCxt, &yymsp[-3].minor.yy39, yymsp[-1].minor.yy200); } + yymsp[-3].minor.yy890 = yylhsminor.yy890; break; case 323: /* sma_func_name ::= function_name */ case 548: /* alias_opt ::= table_alias */ yytestcase(yyruleno==548); -#line 583 "sql.y" -{ yylhsminor.yy993 = yymsp[0].minor.yy993; } -#line 6651 "sql.c" - yymsp[0].minor.yy993 = yylhsminor.yy993; +{ yylhsminor.yy39 = yymsp[0].minor.yy39; } + yymsp[0].minor.yy39 = yylhsminor.yy39; break; case 328: /* sma_stream_opt ::= */ case 373: /* stream_options ::= */ yytestcase(yyruleno==373); -#line 589 "sql.y" -{ yymsp[1].minor.yy232 = createStreamOptions(pCxt); } -#line 6658 "sql.c" +{ yymsp[1].minor.yy890 = createStreamOptions(pCxt); } break; case 329: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ -#line 590 "sql.y" -{ ((SStreamOptions*)yymsp[-2].minor.yy232)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = yymsp[-2].minor.yy232; } -#line 6663 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ ((SStreamOptions*)yymsp[-2].minor.yy890)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy890); yylhsminor.yy890 = yymsp[-2].minor.yy890; } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 330: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -#line 591 "sql.y" -{ ((SStreamOptions*)yymsp[-2].minor.yy232)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = yymsp[-2].minor.yy232; } -#line 6669 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ ((SStreamOptions*)yymsp[-2].minor.yy890)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy890); yylhsminor.yy890 = yymsp[-2].minor.yy890; } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 331: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -#line 592 "sql.y" -{ ((SStreamOptions*)yymsp[-2].minor.yy232)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = yymsp[-2].minor.yy232; } -#line 6675 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ ((SStreamOptions*)yymsp[-2].minor.yy890)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy890); yylhsminor.yy890 = yymsp[-2].minor.yy890; } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 332: /* with_meta ::= AS */ -#line 597 "sql.y" -{ yymsp[0].minor.yy92 = 0; } -#line 6681 "sql.c" +{ yymsp[0].minor.yy474 = 0; } break; case 333: /* with_meta ::= WITH META AS */ -#line 598 "sql.y" -{ yymsp[-2].minor.yy92 = 1; } -#line 6686 "sql.c" +{ yymsp[-2].minor.yy474 = 1; } break; case 334: /* with_meta ::= ONLY META AS */ -#line 599 "sql.y" -{ yymsp[-2].minor.yy92 = 2; } -#line 6691 "sql.c" +{ yymsp[-2].minor.yy474 = 2; } break; case 335: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -#line 601 "sql.y" -{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy985, &yymsp[-2].minor.yy993, yymsp[0].minor.yy232); } -#line 6696 "sql.c" +{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy145, &yymsp[-2].minor.yy39, yymsp[0].minor.yy890); } break; case 336: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ -#line 603 "sql.y" -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy985, &yymsp[-3].minor.yy993, &yymsp[0].minor.yy993, yymsp[-2].minor.yy92); } -#line 6701 "sql.c" +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy145, &yymsp[-3].minor.yy39, &yymsp[0].minor.yy39, yymsp[-2].minor.yy474); } break; case 337: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ -#line 605 "sql.y" -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy985, &yymsp[-4].minor.yy993, yymsp[-1].minor.yy232, yymsp[-3].minor.yy92, yymsp[0].minor.yy232); } -#line 6706 "sql.c" +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy145, &yymsp[-4].minor.yy39, yymsp[-1].minor.yy890, yymsp[-3].minor.yy474, yymsp[0].minor.yy890); } break; case 338: /* cmd ::= DROP TOPIC exists_opt topic_name */ -#line 607 "sql.y" -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); } -#line 6711 "sql.c" +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy145, &yymsp[0].minor.yy39); } break; case 339: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -#line 608 "sql.y" -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy985, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993); } -#line 6716 "sql.c" +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy145, &yymsp[-2].minor.yy39, &yymsp[0].minor.yy39); } break; case 340: /* cmd ::= DESC full_table_name */ case 341: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==341); -#line 611 "sql.y" -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy232); } -#line 6722 "sql.c" +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy890); } break; case 342: /* cmd ::= RESET QUERY CACHE */ -#line 615 "sql.y" { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } -#line 6727 "sql.c" break; case 343: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ case 344: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==344); -#line 618 "sql.y" -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy985, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } -#line 6733 "sql.c" +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy145, yymsp[-1].minor.yy890, yymsp[0].minor.yy890); } break; case 347: /* explain_options ::= */ -#line 626 "sql.y" -{ yymsp[1].minor.yy232 = createDefaultExplainOptions(pCxt); } -#line 6738 "sql.c" +{ yymsp[1].minor.yy890 = createDefaultExplainOptions(pCxt); } break; case 348: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -#line 627 "sql.y" -{ yylhsminor.yy232 = setExplainVerbose(pCxt, yymsp[-2].minor.yy232, &yymsp[0].minor.yy0); } -#line 6743 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setExplainVerbose(pCxt, yymsp[-2].minor.yy890, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 349: /* explain_options ::= explain_options RATIO NK_FLOAT */ -#line 628 "sql.y" -{ yylhsminor.yy232 = setExplainRatio(pCxt, yymsp[-2].minor.yy232, &yymsp[0].minor.yy0); } -#line 6749 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setExplainRatio(pCxt, yymsp[-2].minor.yy890, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 350: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ -#line 633 "sql.y" -{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy985, yymsp[-9].minor.yy985, &yymsp[-6].minor.yy993, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy400, yymsp[-1].minor.yy92, &yymsp[0].minor.yy993, yymsp[-10].minor.yy985); } -#line 6755 "sql.c" +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy145, yymsp[-9].minor.yy145, &yymsp[-6].minor.yy39, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy34, yymsp[-1].minor.yy474, &yymsp[0].minor.yy39, yymsp[-10].minor.yy145); } break; case 351: /* cmd ::= DROP FUNCTION exists_opt function_name */ -#line 634 "sql.y" -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); } -#line 6760 "sql.c" +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy145, &yymsp[0].minor.yy39); } break; case 356: /* language_opt ::= */ case 395: /* on_vgroup_id ::= */ yytestcase(yyruleno==395); -#line 648 "sql.y" -{ yymsp[1].minor.yy993 = nil_token; } -#line 6766 "sql.c" +{ yymsp[1].minor.yy39 = nil_token; } break; case 357: /* language_opt ::= LANGUAGE NK_STRING */ case 396: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==396); -#line 649 "sql.y" -{ yymsp[-1].minor.yy993 = yymsp[0].minor.yy0; } -#line 6772 "sql.c" +{ yymsp[-1].minor.yy39 = yymsp[0].minor.yy0; } break; case 360: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ -#line 658 "sql.y" -{ pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy985, yymsp[-2].minor.yy232, &yymsp[-1].minor.yy0, yymsp[0].minor.yy232); } -#line 6777 "sql.c" +{ pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy145, yymsp[-2].minor.yy890, &yymsp[-1].minor.yy0, yymsp[0].minor.yy890); } break; case 361: /* cmd ::= DROP VIEW exists_opt full_view_name */ -#line 659 "sql.y" -{ pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy232); } -#line 6782 "sql.c" +{ pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy145, yymsp[0].minor.yy890); } break; case 362: /* full_view_name ::= view_name */ -#line 661 "sql.y" -{ yylhsminor.yy232 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy993); } -#line 6787 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy39); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 363: /* full_view_name ::= db_name NK_DOT view_name */ -#line 662 "sql.y" -{ yylhsminor.yy232 = createViewNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993); } -#line 6793 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createViewNode(pCxt, &yymsp[-2].minor.yy39, &yymsp[0].minor.yy39); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 364: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ -#line 667 "sql.y" -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy985, &yymsp[-8].minor.yy993, yymsp[-5].minor.yy232, yymsp[-7].minor.yy232, yymsp[-3].minor.yy88, yymsp[-2].minor.yy232, yymsp[0].minor.yy232, yymsp[-4].minor.yy88); } -#line 6799 "sql.c" +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy145, &yymsp[-8].minor.yy39, yymsp[-5].minor.yy890, yymsp[-7].minor.yy890, yymsp[-3].minor.yy200, yymsp[-2].minor.yy890, yymsp[0].minor.yy890, yymsp[-4].minor.yy200); } break; case 365: /* cmd ::= DROP STREAM exists_opt stream_name */ -#line 668 "sql.y" -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); } -#line 6804 "sql.c" +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy145, &yymsp[0].minor.yy39); } break; case 366: /* cmd ::= PAUSE STREAM exists_opt stream_name */ -#line 669 "sql.y" -{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); } -#line 6809 "sql.c" +{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy145, &yymsp[0].minor.yy39); } break; case 367: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ -#line 670 "sql.y" -{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy985, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); } -#line 6814 "sql.c" +{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy145, yymsp[-1].minor.yy145, &yymsp[0].minor.yy39); } break; case 374: /* stream_options ::= stream_options TRIGGER AT_ONCE */ case 375: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==375); -#line 684 "sql.y" -{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-2].minor.yy232, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } -#line 6820 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setStreamOptions(pCxt, yymsp[-2].minor.yy890, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 376: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -#line 686 "sql.y" -{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-3].minor.yy232, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } -#line 6826 "sql.c" - yymsp[-3].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setStreamOptions(pCxt, yymsp[-3].minor.yy890, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy890)); } + yymsp[-3].minor.yy890 = yylhsminor.yy890; break; case 377: /* stream_options ::= stream_options WATERMARK duration_literal */ -#line 687 "sql.y" -{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-2].minor.yy232, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } -#line 6832 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setStreamOptions(pCxt, yymsp[-2].minor.yy890, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy890)); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 378: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -#line 688 "sql.y" -{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-3].minor.yy232, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } -#line 6838 "sql.c" - yymsp[-3].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setStreamOptions(pCxt, yymsp[-3].minor.yy890, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-3].minor.yy890 = yylhsminor.yy890; break; case 379: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -#line 689 "sql.y" -{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-2].minor.yy232, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } -#line 6844 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setStreamOptions(pCxt, yymsp[-2].minor.yy890, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 380: /* stream_options ::= stream_options DELETE_MARK duration_literal */ -#line 690 "sql.y" -{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-2].minor.yy232, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } -#line 6850 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setStreamOptions(pCxt, yymsp[-2].minor.yy890, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy890)); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 381: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ -#line 691 "sql.y" -{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-3].minor.yy232, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } -#line 6856 "sql.c" - yymsp[-3].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setStreamOptions(pCxt, yymsp[-3].minor.yy890, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-3].minor.yy890 = yylhsminor.yy890; break; case 383: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 586: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==586); - case 610: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==610); -#line 694 "sql.y" -{ yymsp[-3].minor.yy232 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy232); } -#line 6864 "sql.c" + case 587: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==587); + case 611: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==611); +{ yymsp[-3].minor.yy890 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy890); } break; case 386: /* cmd ::= KILL CONNECTION NK_INTEGER */ -#line 702 "sql.y" { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } -#line 6869 "sql.c" break; case 387: /* cmd ::= KILL QUERY NK_STRING */ -#line 703 "sql.y" { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } -#line 6874 "sql.c" break; case 388: /* cmd ::= KILL TRANSACTION NK_INTEGER */ -#line 704 "sql.y" { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } -#line 6879 "sql.c" break; case 389: /* cmd ::= KILL COMPACT NK_INTEGER */ -#line 705 "sql.y" { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_COMPACT_STMT, &yymsp[0].minor.yy0); } -#line 6884 "sql.c" break; case 390: /* cmd ::= BALANCE VGROUP */ -#line 708 "sql.y" { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } -#line 6889 "sql.c" break; case 391: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ -#line 709 "sql.y" -{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy993); } -#line 6894 "sql.c" +{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy39); } break; case 392: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ -#line 710 "sql.y" { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 6899 "sql.c" break; case 393: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -#line 711 "sql.y" -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy88); } -#line 6904 "sql.c" +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy200); } break; case 394: /* cmd ::= SPLIT VGROUP NK_INTEGER */ -#line 712 "sql.y" { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } -#line 6909 "sql.c" break; case 397: /* dnode_list ::= DNODE NK_INTEGER */ -#line 721 "sql.y" -{ yymsp[-1].minor.yy88 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 6914 "sql.c" +{ yymsp[-1].minor.yy200 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; case 399: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -#line 728 "sql.y" -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } -#line 6919 "sql.c" +{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy890, yymsp[0].minor.yy890); } break; case 402: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -#line 737 "sql.y" -{ yymsp[-6].minor.yy232 = createInsertStmt(pCxt, yymsp[-4].minor.yy232, yymsp[-2].minor.yy88, yymsp[0].minor.yy232); } -#line 6924 "sql.c" +{ yymsp[-6].minor.yy890 = createInsertStmt(pCxt, yymsp[-4].minor.yy890, yymsp[-2].minor.yy200, yymsp[0].minor.yy890); } break; case 403: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ -#line 738 "sql.y" -{ yymsp[-3].minor.yy232 = createInsertStmt(pCxt, yymsp[-1].minor.yy232, NULL, yymsp[0].minor.yy232); } -#line 6929 "sql.c" +{ yymsp[-3].minor.yy890 = createInsertStmt(pCxt, yymsp[-1].minor.yy890, NULL, yymsp[0].minor.yy890); } break; case 404: /* literal ::= NK_INTEGER */ -#line 741 "sql.y" -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } -#line 6934 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 405: /* literal ::= NK_FLOAT */ -#line 742 "sql.y" -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } -#line 6940 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 406: /* literal ::= NK_STRING */ -#line 743 "sql.y" -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } -#line 6946 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 407: /* literal ::= NK_BOOL */ -#line 744 "sql.y" -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } -#line 6952 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 408: /* literal ::= TIMESTAMP NK_STRING */ -#line 745 "sql.y" -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } -#line 6958 "sql.c" - yymsp[-1].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy890 = yylhsminor.yy890; break; case 409: /* literal ::= duration_literal */ case 419: /* signed_literal ::= signed */ yytestcase(yyruleno==419); @@ -6974,254 +6269,190 @@ static YYACTIONTYPE yy_reduce( case 541: /* table_reference ::= table_primary */ yytestcase(yyruleno==541); case 542: /* table_reference ::= joined_table */ yytestcase(yyruleno==542); case 546: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==546); - case 612: /* query_simple ::= query_specification */ yytestcase(yyruleno==612); - case 613: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==613); - case 616: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==616); - case 618: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==618); -#line 746 "sql.y" -{ yylhsminor.yy232 = yymsp[0].minor.yy232; } -#line 6983 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 613: /* query_simple ::= query_specification */ yytestcase(yyruleno==613); + case 614: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==614); + case 617: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==617); + case 619: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==619); +{ yylhsminor.yy890 = yymsp[0].minor.yy890; } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 410: /* literal ::= NULL */ -#line 747 "sql.y" -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } -#line 6989 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 411: /* literal ::= NK_QUESTION */ -#line 748 "sql.y" -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 6995 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 412: /* duration_literal ::= NK_VARIABLE */ - case 587: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==587); - case 588: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==588); - case 589: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==589); -#line 750 "sql.y" -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 7004 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 588: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==588); + case 589: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==589); + case 590: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==590); +{ yylhsminor.yy890 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 413: /* signed ::= NK_INTEGER */ -#line 752 "sql.y" -{ yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } -#line 7010 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 414: /* signed ::= NK_PLUS NK_INTEGER */ -#line 753 "sql.y" -{ yymsp[-1].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } -#line 7016 "sql.c" +{ yymsp[-1].minor.yy890 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; case 415: /* signed ::= NK_MINUS NK_INTEGER */ -#line 754 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy890 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } -#line 7025 "sql.c" - yymsp[-1].minor.yy232 = yylhsminor.yy232; + yymsp[-1].minor.yy890 = yylhsminor.yy890; break; case 416: /* signed ::= NK_FLOAT */ -#line 759 "sql.y" -{ yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } -#line 7031 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 417: /* signed ::= NK_PLUS NK_FLOAT */ -#line 760 "sql.y" -{ yymsp[-1].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } -#line 7037 "sql.c" +{ yymsp[-1].minor.yy890 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; case 418: /* signed ::= NK_MINUS NK_FLOAT */ -#line 761 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy890 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } -#line 7046 "sql.c" - yymsp[-1].minor.yy232 = yylhsminor.yy232; + yymsp[-1].minor.yy890 = yylhsminor.yy890; break; case 420: /* signed_literal ::= NK_STRING */ -#line 768 "sql.y" -{ yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } -#line 7052 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 421: /* signed_literal ::= NK_BOOL */ -#line 769 "sql.y" -{ yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } -#line 7058 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 422: /* signed_literal ::= TIMESTAMP NK_STRING */ -#line 770 "sql.y" -{ yymsp[-1].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } -#line 7064 "sql.c" +{ yymsp[-1].minor.yy890 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; case 423: /* signed_literal ::= duration_literal */ case 425: /* signed_literal ::= literal_func */ yytestcase(yyruleno==425); case 500: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==500); case 566: /* select_item ::= common_expression */ yytestcase(yyruleno==566); case 576: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==576); - case 617: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==617); - case 619: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==619); - case 632: /* search_condition ::= common_expression */ yytestcase(yyruleno==632); -#line 771 "sql.y" -{ yylhsminor.yy232 = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); } -#line 7076 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 618: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==618); + case 620: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==620); + case 633: /* search_condition ::= common_expression */ yytestcase(yyruleno==633); +{ yylhsminor.yy890 = releaseRawExprNode(pCxt, yymsp[0].minor.yy890); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 424: /* signed_literal ::= NULL */ -#line 772 "sql.y" -{ yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } -#line 7082 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 426: /* signed_literal ::= NK_QUESTION */ -#line 774 "sql.y" -{ yylhsminor.yy232 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } -#line 7088 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 444: /* expression ::= pseudo_column */ -#line 836 "sql.y" -{ yylhsminor.yy232 = yymsp[0].minor.yy232; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy232, true); } -#line 7094 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = yymsp[0].minor.yy890; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy890, true); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 448: /* expression ::= NK_LP expression NK_RP */ case 534: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==534); - case 631: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==631); -#line 840 "sql.y" -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); } -#line 7102 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 632: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==632); +{ yylhsminor.yy890 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy890)); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 449: /* expression ::= NK_PLUS expr_or_subquery */ -#line 841 "sql.y" { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy890); + yylhsminor.yy890 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy890)); } -#line 7111 "sql.c" - yymsp[-1].minor.yy232 = yylhsminor.yy232; + yymsp[-1].minor.yy890 = yylhsminor.yy890; break; case 450: /* expression ::= NK_MINUS expr_or_subquery */ -#line 845 "sql.y" { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy232), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy890); + yylhsminor.yy890 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy890), NULL)); } -#line 7120 "sql.c" - yymsp[-1].minor.yy232 = yylhsminor.yy232; + yymsp[-1].minor.yy890 = yylhsminor.yy890; break; case 451: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ -#line 849 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy890); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy890); + yylhsminor.yy890 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy890), releaseRawExprNode(pCxt, yymsp[0].minor.yy890))); } -#line 7130 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 452: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ -#line 854 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy890); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy890); + yylhsminor.yy890 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy890), releaseRawExprNode(pCxt, yymsp[0].minor.yy890))); } -#line 7140 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 453: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ -#line 859 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy890); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy890); + yylhsminor.yy890 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy890), releaseRawExprNode(pCxt, yymsp[0].minor.yy890))); } -#line 7150 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 454: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ -#line 864 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy890); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy890); + yylhsminor.yy890 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy890), releaseRawExprNode(pCxt, yymsp[0].minor.yy890))); } -#line 7160 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 455: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ -#line 869 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy890); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy890); + yylhsminor.yy890 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy890), releaseRawExprNode(pCxt, yymsp[0].minor.yy890))); } -#line 7170 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 456: /* expression ::= column_reference NK_ARROW NK_STRING */ -#line 874 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy890); + yylhsminor.yy890 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy890), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } -#line 7179 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 457: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ -#line 878 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy890); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy890); + yylhsminor.yy890 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy890), releaseRawExprNode(pCxt, yymsp[0].minor.yy890))); } -#line 7189 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 458: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ -#line 883 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy890); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy890); + yylhsminor.yy890 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy890), releaseRawExprNode(pCxt, yymsp[0].minor.yy890))); } -#line 7199 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 461: /* column_reference ::= column_name */ -#line 894 "sql.y" -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy993, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy993)); } -#line 7205 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNode(pCxt, &yymsp[0].minor.yy39, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy39)); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 462: /* column_reference ::= table_name NK_DOT column_name */ -#line 895 "sql.y" -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993, createColumnNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993)); } -#line 7211 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy39, &yymsp[0].minor.yy39, createColumnNode(pCxt, &yymsp[-2].minor.yy39, &yymsp[0].minor.yy39)); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 463: /* column_reference ::= NK_ALIAS */ -#line 896 "sql.y" -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } -#line 7217 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 464: /* column_reference ::= table_name NK_DOT NK_ALIAS */ -#line 897 "sql.y" -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0)); } -#line 7223 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy39, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy39, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 465: /* pseudo_column ::= ROWTS */ case 466: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==466); @@ -7235,508 +6466,345 @@ static YYACTIONTYPE yy_reduce( case 475: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==475); case 476: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==476); case 482: /* literal_func ::= NOW */ yytestcase(yyruleno==482); -#line 899 "sql.y" -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } -#line 7240 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 467: /* pseudo_column ::= table_name NK_DOT TBNAME */ -#line 901 "sql.y" -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy993)))); } -#line 7246 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy39, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy39)))); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 477: /* function_expression ::= function_name NK_LP expression_list NK_RP */ case 478: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==478); -#line 912 "sql.y" -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy993, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy993, yymsp[-1].minor.yy88)); } -#line 7253 "sql.c" - yymsp[-3].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy39, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy39, yymsp[-1].minor.yy200)); } + yymsp[-3].minor.yy890 = yylhsminor.yy890; break; case 479: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ -#line 915 "sql.y" -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), yymsp[-1].minor.yy400)); } -#line 7259 "sql.c" - yymsp[-5].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy890), yymsp[-1].minor.yy34)); } + yymsp[-5].minor.yy890 = yylhsminor.yy890; break; case 481: /* literal_func ::= noarg_func NK_LP NK_RP */ -#line 918 "sql.y" -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy993, NULL)); } -#line 7265 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy39, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy39, NULL)); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 496: /* star_func_para_list ::= NK_STAR */ -#line 942 "sql.y" -{ yylhsminor.yy88 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } -#line 7271 "sql.c" - yymsp[0].minor.yy88 = yylhsminor.yy88; +{ yylhsminor.yy200 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy200 = yylhsminor.yy200; break; case 501: /* star_func_para ::= table_name NK_DOT NK_STAR */ case 569: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==569); -#line 951 "sql.y" -{ yylhsminor.yy232 = createColumnNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0); } -#line 7278 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createColumnNode(pCxt, &yymsp[-2].minor.yy39, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 502: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ -#line 954 "sql.y" -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy88, yymsp[-1].minor.yy232)); } -#line 7284 "sql.c" - yymsp[-3].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy200, yymsp[-1].minor.yy890)); } + yymsp[-3].minor.yy890 = yylhsminor.yy890; break; case 503: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ -#line 956 "sql.y" -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), yymsp[-2].minor.yy88, yymsp[-1].minor.yy232)); } -#line 7290 "sql.c" - yymsp[-4].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy890), yymsp[-2].minor.yy200, yymsp[-1].minor.yy890)); } + yymsp[-4].minor.yy890 = yylhsminor.yy890; break; case 506: /* when_then_expr ::= WHEN common_expression THEN common_expression */ -#line 963 "sql.y" -{ yymsp[-3].minor.yy232 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } -#line 7296 "sql.c" +{ yymsp[-3].minor.yy890 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy890), releaseRawExprNode(pCxt, yymsp[0].minor.yy890)); } break; case 508: /* case_when_else_opt ::= ELSE common_expression */ -#line 966 "sql.y" -{ yymsp[-1].minor.yy232 = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); } -#line 7301 "sql.c" +{ yymsp[-1].minor.yy890 = releaseRawExprNode(pCxt, yymsp[0].minor.yy890); } break; case 509: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ case 514: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==514); -#line 969 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy708, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy890); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy890); + yylhsminor.yy890 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy240, releaseRawExprNode(pCxt, yymsp[-2].minor.yy890), releaseRawExprNode(pCxt, yymsp[0].minor.yy890))); } -#line 7311 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 510: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ -#line 976 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy232), releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy890); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy890); + yylhsminor.yy890 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy890), releaseRawExprNode(pCxt, yymsp[-2].minor.yy890), releaseRawExprNode(pCxt, yymsp[0].minor.yy890))); } -#line 7321 "sql.c" - yymsp[-4].minor.yy232 = yylhsminor.yy232; + yymsp[-4].minor.yy890 = yylhsminor.yy890; break; case 511: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ -#line 982 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy232), releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy890); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy890); + yylhsminor.yy890 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy890), releaseRawExprNode(pCxt, yymsp[-2].minor.yy890), releaseRawExprNode(pCxt, yymsp[0].minor.yy890))); } -#line 7331 "sql.c" - yymsp[-5].minor.yy232 = yylhsminor.yy232; + yymsp[-5].minor.yy890 = yylhsminor.yy890; break; case 512: /* predicate ::= expr_or_subquery IS NULL */ -#line 987 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy890); + yylhsminor.yy890 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy890), NULL)); } -#line 7340 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 513: /* predicate ::= expr_or_subquery IS NOT NULL */ -#line 991 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy890); + yylhsminor.yy890 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy890), NULL)); } -#line 7349 "sql.c" - yymsp[-3].minor.yy232 = yylhsminor.yy232; + yymsp[-3].minor.yy890 = yylhsminor.yy890; break; case 515: /* compare_op ::= NK_LT */ -#line 1003 "sql.y" -{ yymsp[0].minor.yy708 = OP_TYPE_LOWER_THAN; } -#line 7355 "sql.c" +{ yymsp[0].minor.yy240 = OP_TYPE_LOWER_THAN; } break; case 516: /* compare_op ::= NK_GT */ -#line 1004 "sql.y" -{ yymsp[0].minor.yy708 = OP_TYPE_GREATER_THAN; } -#line 7360 "sql.c" +{ yymsp[0].minor.yy240 = OP_TYPE_GREATER_THAN; } break; case 517: /* compare_op ::= NK_LE */ -#line 1005 "sql.y" -{ yymsp[0].minor.yy708 = OP_TYPE_LOWER_EQUAL; } -#line 7365 "sql.c" +{ yymsp[0].minor.yy240 = OP_TYPE_LOWER_EQUAL; } break; case 518: /* compare_op ::= NK_GE */ -#line 1006 "sql.y" -{ yymsp[0].minor.yy708 = OP_TYPE_GREATER_EQUAL; } -#line 7370 "sql.c" +{ yymsp[0].minor.yy240 = OP_TYPE_GREATER_EQUAL; } break; case 519: /* compare_op ::= NK_NE */ -#line 1007 "sql.y" -{ yymsp[0].minor.yy708 = OP_TYPE_NOT_EQUAL; } -#line 7375 "sql.c" +{ yymsp[0].minor.yy240 = OP_TYPE_NOT_EQUAL; } break; case 520: /* compare_op ::= NK_EQ */ -#line 1008 "sql.y" -{ yymsp[0].minor.yy708 = OP_TYPE_EQUAL; } -#line 7380 "sql.c" +{ yymsp[0].minor.yy240 = OP_TYPE_EQUAL; } break; case 521: /* compare_op ::= LIKE */ -#line 1009 "sql.y" -{ yymsp[0].minor.yy708 = OP_TYPE_LIKE; } -#line 7385 "sql.c" +{ yymsp[0].minor.yy240 = OP_TYPE_LIKE; } break; case 522: /* compare_op ::= NOT LIKE */ -#line 1010 "sql.y" -{ yymsp[-1].minor.yy708 = OP_TYPE_NOT_LIKE; } -#line 7390 "sql.c" +{ yymsp[-1].minor.yy240 = OP_TYPE_NOT_LIKE; } break; case 523: /* compare_op ::= MATCH */ -#line 1011 "sql.y" -{ yymsp[0].minor.yy708 = OP_TYPE_MATCH; } -#line 7395 "sql.c" +{ yymsp[0].minor.yy240 = OP_TYPE_MATCH; } break; case 524: /* compare_op ::= NMATCH */ -#line 1012 "sql.y" -{ yymsp[0].minor.yy708 = OP_TYPE_NMATCH; } -#line 7400 "sql.c" +{ yymsp[0].minor.yy240 = OP_TYPE_NMATCH; } break; case 525: /* compare_op ::= CONTAINS */ -#line 1013 "sql.y" -{ yymsp[0].minor.yy708 = OP_TYPE_JSON_CONTAINS; } -#line 7405 "sql.c" +{ yymsp[0].minor.yy240 = OP_TYPE_JSON_CONTAINS; } break; case 526: /* in_op ::= IN */ -#line 1017 "sql.y" -{ yymsp[0].minor.yy708 = OP_TYPE_IN; } -#line 7410 "sql.c" +{ yymsp[0].minor.yy240 = OP_TYPE_IN; } break; case 527: /* in_op ::= NOT IN */ -#line 1018 "sql.y" -{ yymsp[-1].minor.yy708 = OP_TYPE_NOT_IN; } -#line 7415 "sql.c" +{ yymsp[-1].minor.yy240 = OP_TYPE_NOT_IN; } break; case 528: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -#line 1020 "sql.y" -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy88)); } -#line 7420 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy200)); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 530: /* boolean_value_expression ::= NOT boolean_primary */ -#line 1024 "sql.y" { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy232), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy890); + yylhsminor.yy890 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy890), NULL)); } -#line 7429 "sql.c" - yymsp[-1].minor.yy232 = yylhsminor.yy232; + yymsp[-1].minor.yy890 = yylhsminor.yy890; break; case 531: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ -#line 1029 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy890); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy890); + yylhsminor.yy890 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy890), releaseRawExprNode(pCxt, yymsp[0].minor.yy890))); } -#line 7439 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 532: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ -#line 1035 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy890); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy890); + yylhsminor.yy890 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy890), releaseRawExprNode(pCxt, yymsp[0].minor.yy890))); } -#line 7449 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 540: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -#line 1053 "sql.y" -{ yylhsminor.yy232 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy232, yymsp[0].minor.yy232, NULL); } -#line 7455 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy890, yymsp[0].minor.yy890, NULL); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 543: /* table_primary ::= table_name alias_opt */ -#line 1059 "sql.y" -{ yylhsminor.yy232 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy993, &yymsp[0].minor.yy993); } -#line 7461 "sql.c" - yymsp[-1].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy39, &yymsp[0].minor.yy39); } + yymsp[-1].minor.yy890 = yylhsminor.yy890; break; case 544: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -#line 1060 "sql.y" -{ yylhsminor.yy232 = createRealTableNode(pCxt, &yymsp[-3].minor.yy993, &yymsp[-1].minor.yy993, &yymsp[0].minor.yy993); } -#line 7467 "sql.c" - yymsp[-3].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createRealTableNode(pCxt, &yymsp[-3].minor.yy39, &yymsp[-1].minor.yy39, &yymsp[0].minor.yy39); } + yymsp[-3].minor.yy890 = yylhsminor.yy890; break; case 545: /* table_primary ::= subquery alias_opt */ -#line 1061 "sql.y" -{ yylhsminor.yy232 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232), &yymsp[0].minor.yy993); } -#line 7473 "sql.c" - yymsp[-1].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy890), &yymsp[0].minor.yy39); } + yymsp[-1].minor.yy890 = yylhsminor.yy890; break; case 547: /* alias_opt ::= */ -#line 1066 "sql.y" -{ yymsp[1].minor.yy993 = nil_token; } -#line 7479 "sql.c" +{ yymsp[1].minor.yy39 = nil_token; } break; case 549: /* alias_opt ::= AS table_alias */ -#line 1068 "sql.y" -{ yymsp[-1].minor.yy993 = yymsp[0].minor.yy993; } -#line 7484 "sql.c" +{ yymsp[-1].minor.yy39 = yymsp[0].minor.yy39; } break; case 550: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ case 551: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==551); -#line 1070 "sql.y" -{ yymsp[-2].minor.yy232 = yymsp[-1].minor.yy232; } -#line 7490 "sql.c" +{ yymsp[-2].minor.yy890 = yymsp[-1].minor.yy890; } break; case 552: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -#line 1075 "sql.y" -{ yylhsminor.yy232 = createJoinTableNode(pCxt, yymsp[-4].minor.yy436, yymsp[-5].minor.yy232, yymsp[-2].minor.yy232, yymsp[0].minor.yy232); } -#line 7495 "sql.c" - yymsp[-5].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createJoinTableNode(pCxt, yymsp[-4].minor.yy90, yymsp[-5].minor.yy890, yymsp[-2].minor.yy890, yymsp[0].minor.yy890); } + yymsp[-5].minor.yy890 = yylhsminor.yy890; break; case 553: /* join_type ::= */ -#line 1079 "sql.y" -{ yymsp[1].minor.yy436 = JOIN_TYPE_INNER; } -#line 7501 "sql.c" +{ yymsp[1].minor.yy90 = JOIN_TYPE_INNER; } break; case 554: /* join_type ::= INNER */ -#line 1080 "sql.y" -{ yymsp[0].minor.yy436 = JOIN_TYPE_INNER; } -#line 7506 "sql.c" +{ yymsp[0].minor.yy90 = JOIN_TYPE_INNER; } break; case 555: /* query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ -#line 1086 "sql.y" { - yymsp[-13].minor.yy232 = createSelectStmt(pCxt, yymsp[-11].minor.yy985, yymsp[-9].minor.yy88, yymsp[-8].minor.yy232, yymsp[-12].minor.yy88); - yymsp[-13].minor.yy232 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy232, yymsp[-10].minor.yy985); - yymsp[-13].minor.yy232 = addWhereClause(pCxt, yymsp[-13].minor.yy232, yymsp[-7].minor.yy232); - yymsp[-13].minor.yy232 = addPartitionByClause(pCxt, yymsp[-13].minor.yy232, yymsp[-6].minor.yy88); - yymsp[-13].minor.yy232 = addWindowClauseClause(pCxt, yymsp[-13].minor.yy232, yymsp[-2].minor.yy232); - yymsp[-13].minor.yy232 = addGroupByClause(pCxt, yymsp[-13].minor.yy232, yymsp[-1].minor.yy88); - yymsp[-13].minor.yy232 = addHavingClause(pCxt, yymsp[-13].minor.yy232, yymsp[0].minor.yy232); - yymsp[-13].minor.yy232 = addRangeClause(pCxt, yymsp[-13].minor.yy232, yymsp[-5].minor.yy232); - yymsp[-13].minor.yy232 = addEveryClause(pCxt, yymsp[-13].minor.yy232, yymsp[-4].minor.yy232); - yymsp[-13].minor.yy232 = addFillClause(pCxt, yymsp[-13].minor.yy232, yymsp[-3].minor.yy232); + yymsp[-13].minor.yy890 = createSelectStmt(pCxt, yymsp[-11].minor.yy145, yymsp[-9].minor.yy200, yymsp[-8].minor.yy890, yymsp[-12].minor.yy200); + yymsp[-13].minor.yy890 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy890, yymsp[-10].minor.yy145); + yymsp[-13].minor.yy890 = addWhereClause(pCxt, yymsp[-13].minor.yy890, yymsp[-7].minor.yy890); + yymsp[-13].minor.yy890 = addPartitionByClause(pCxt, yymsp[-13].minor.yy890, yymsp[-6].minor.yy200); + yymsp[-13].minor.yy890 = addWindowClauseClause(pCxt, yymsp[-13].minor.yy890, yymsp[-2].minor.yy890); + yymsp[-13].minor.yy890 = addGroupByClause(pCxt, yymsp[-13].minor.yy890, yymsp[-1].minor.yy200); + yymsp[-13].minor.yy890 = addHavingClause(pCxt, yymsp[-13].minor.yy890, yymsp[0].minor.yy890); + yymsp[-13].minor.yy890 = addRangeClause(pCxt, yymsp[-13].minor.yy890, yymsp[-5].minor.yy890); + yymsp[-13].minor.yy890 = addEveryClause(pCxt, yymsp[-13].minor.yy890, yymsp[-4].minor.yy890); + yymsp[-13].minor.yy890 = addFillClause(pCxt, yymsp[-13].minor.yy890, yymsp[-3].minor.yy890); } -#line 7522 "sql.c" break; case 556: /* hint_list ::= */ -#line 1101 "sql.y" -{ yymsp[1].minor.yy88 = createHintNodeList(pCxt, NULL); } -#line 7527 "sql.c" +{ yymsp[1].minor.yy200 = createHintNodeList(pCxt, NULL); } break; case 557: /* hint_list ::= NK_HINT */ -#line 1102 "sql.y" -{ yylhsminor.yy88 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } -#line 7532 "sql.c" - yymsp[0].minor.yy88 = yylhsminor.yy88; +{ yylhsminor.yy200 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy200 = yylhsminor.yy200; break; case 562: /* set_quantifier_opt ::= ALL */ -#line 1113 "sql.y" -{ yymsp[0].minor.yy985 = false; } -#line 7538 "sql.c" +{ yymsp[0].minor.yy145 = false; } break; case 565: /* select_item ::= NK_STAR */ -#line 1120 "sql.y" -{ yylhsminor.yy232 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } -#line 7543 "sql.c" - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy890 = yylhsminor.yy890; break; case 567: /* select_item ::= common_expression column_alias */ case 577: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==577); -#line 1122 "sql.y" -{ yylhsminor.yy232 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232), &yymsp[0].minor.yy993); } -#line 7550 "sql.c" - yymsp[-1].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy890), &yymsp[0].minor.yy39); } + yymsp[-1].minor.yy890 = yylhsminor.yy890; break; case 568: /* select_item ::= common_expression AS column_alias */ case 578: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==578); -#line 1123 "sql.y" -{ yylhsminor.yy232 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), &yymsp[0].minor.yy993); } -#line 7557 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy890 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy890), &yymsp[0].minor.yy39); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; case 573: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 601: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==601); - case 621: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==621); -#line 1132 "sql.y" -{ yymsp[-2].minor.yy88 = yymsp[0].minor.yy88; } -#line 7565 "sql.c" + case 602: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==602); + case 622: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==622); +{ yymsp[-2].minor.yy200 = yymsp[0].minor.yy200; } break; case 580: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ -#line 1145 "sql.y" -{ yymsp[-5].minor.yy232 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); } -#line 7570 "sql.c" +{ yymsp[-5].minor.yy890 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy890), releaseRawExprNode(pCxt, yymsp[-1].minor.yy890)); } break; case 581: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -#line 1146 "sql.y" -{ yymsp[-3].minor.yy232 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); } -#line 7575 "sql.c" +{ yymsp[-3].minor.yy890 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy890)); } break; case 582: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ -#line 1148 "sql.y" -{ yymsp[-5].minor.yy232 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), NULL, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } -#line 7580 "sql.c" +{ yymsp[-5].minor.yy890 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy890), NULL, yymsp[-1].minor.yy890, yymsp[0].minor.yy890); } break; case 583: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ -#line 1152 "sql.y" -{ yymsp[-7].minor.yy232 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy232), releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } -#line 7585 "sql.c" +{ yymsp[-7].minor.yy890 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy890), releaseRawExprNode(pCxt, yymsp[-3].minor.yy890), yymsp[-1].minor.yy890, yymsp[0].minor.yy890); } break; case 584: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ -#line 1154 "sql.y" -{ yymsp[-6].minor.yy232 = createEventWindowNode(pCxt, yymsp[-3].minor.yy232, yymsp[0].minor.yy232); } -#line 7590 "sql.c" +{ yymsp[-6].minor.yy890 = createEventWindowNode(pCxt, yymsp[-3].minor.yy890, yymsp[0].minor.yy890); } break; - case 591: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -#line 1164 "sql.y" -{ yymsp[-3].minor.yy232 = createFillNode(pCxt, yymsp[-1].minor.yy246, NULL); } -#line 7595 "sql.c" + case 585: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy890 = createCountWindowNode(pCxt, &yymsp[-1].minor.yy0); } break; - case 592: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ -#line 1165 "sql.y" -{ yymsp[-5].minor.yy232 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy88)); } -#line 7600 "sql.c" + case 592: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy890 = createFillNode(pCxt, yymsp[-1].minor.yy624, NULL); } break; - case 593: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ -#line 1166 "sql.y" -{ yymsp[-5].minor.yy232 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy88)); } -#line 7605 "sql.c" + case 593: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ +{ yymsp[-5].minor.yy890 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy200)); } break; - case 594: /* fill_mode ::= NONE */ -#line 1170 "sql.y" -{ yymsp[0].minor.yy246 = FILL_MODE_NONE; } -#line 7610 "sql.c" + case 594: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ +{ yymsp[-5].minor.yy890 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy200)); } break; - case 595: /* fill_mode ::= PREV */ -#line 1171 "sql.y" -{ yymsp[0].minor.yy246 = FILL_MODE_PREV; } -#line 7615 "sql.c" + case 595: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy624 = FILL_MODE_NONE; } break; - case 596: /* fill_mode ::= NULL */ -#line 1172 "sql.y" -{ yymsp[0].minor.yy246 = FILL_MODE_NULL; } -#line 7620 "sql.c" + case 596: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy624 = FILL_MODE_PREV; } break; - case 597: /* fill_mode ::= NULL_F */ -#line 1173 "sql.y" -{ yymsp[0].minor.yy246 = FILL_MODE_NULL_F; } -#line 7625 "sql.c" + case 597: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy624 = FILL_MODE_NULL; } break; - case 598: /* fill_mode ::= LINEAR */ -#line 1174 "sql.y" -{ yymsp[0].minor.yy246 = FILL_MODE_LINEAR; } -#line 7630 "sql.c" + case 598: /* fill_mode ::= NULL_F */ +{ yymsp[0].minor.yy624 = FILL_MODE_NULL_F; } break; - case 599: /* fill_mode ::= NEXT */ -#line 1175 "sql.y" -{ yymsp[0].minor.yy246 = FILL_MODE_NEXT; } -#line 7635 "sql.c" + case 599: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy624 = FILL_MODE_LINEAR; } break; - case 602: /* group_by_list ::= expr_or_subquery */ -#line 1184 "sql.y" -{ yylhsminor.yy88 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); } -#line 7640 "sql.c" - yymsp[0].minor.yy88 = yylhsminor.yy88; + case 600: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy624 = FILL_MODE_NEXT; } break; - case 603: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ -#line 1185 "sql.y" -{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); } -#line 7646 "sql.c" - yymsp[-2].minor.yy88 = yylhsminor.yy88; + case 603: /* group_by_list ::= expr_or_subquery */ +{ yylhsminor.yy200 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy890))); } + yymsp[0].minor.yy200 = yylhsminor.yy200; break; - case 607: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ -#line 1192 "sql.y" -{ yymsp[-5].minor.yy232 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); } -#line 7652 "sql.c" + case 604: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ +{ yylhsminor.yy200 = addNodeToList(pCxt, yymsp[-2].minor.yy200, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy890))); } + yymsp[-2].minor.yy200 = yylhsminor.yy200; break; - case 608: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ -#line 1194 "sql.y" -{ yymsp[-3].minor.yy232 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); } -#line 7657 "sql.c" + case 608: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ +{ yymsp[-5].minor.yy890 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy890), releaseRawExprNode(pCxt, yymsp[-1].minor.yy890)); } break; - case 611: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ -#line 1201 "sql.y" + case 609: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ +{ yymsp[-3].minor.yy890 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy890)); } + break; + case 612: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy232 = addOrderByClause(pCxt, yymsp[-3].minor.yy232, yymsp[-2].minor.yy88); - yylhsminor.yy232 = addSlimitClause(pCxt, yylhsminor.yy232, yymsp[-1].minor.yy232); - yylhsminor.yy232 = addLimitClause(pCxt, yylhsminor.yy232, yymsp[0].minor.yy232); + yylhsminor.yy890 = addOrderByClause(pCxt, yymsp[-3].minor.yy890, yymsp[-2].minor.yy200); + yylhsminor.yy890 = addSlimitClause(pCxt, yylhsminor.yy890, yymsp[-1].minor.yy890); + yylhsminor.yy890 = addLimitClause(pCxt, yylhsminor.yy890, yymsp[0].minor.yy890); } -#line 7666 "sql.c" - yymsp[-3].minor.yy232 = yylhsminor.yy232; + yymsp[-3].minor.yy890 = yylhsminor.yy890; break; - case 614: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ -#line 1211 "sql.y" -{ yylhsminor.yy232 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy232, yymsp[0].minor.yy232); } -#line 7672 "sql.c" - yymsp[-3].minor.yy232 = yylhsminor.yy232; + case 615: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ +{ yylhsminor.yy890 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy890, yymsp[0].minor.yy890); } + yymsp[-3].minor.yy890 = yylhsminor.yy890; break; - case 615: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ -#line 1213 "sql.y" -{ yylhsminor.yy232 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy232, yymsp[0].minor.yy232); } -#line 7678 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 616: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ +{ yylhsminor.yy890 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy890, yymsp[0].minor.yy890); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; - case 623: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 627: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==627); -#line 1227 "sql.y" -{ yymsp[-1].minor.yy232 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } -#line 7685 "sql.c" + case 624: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 628: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==628); +{ yymsp[-1].minor.yy890 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 624: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 628: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==628); -#line 1228 "sql.y" -{ yymsp[-3].minor.yy232 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } -#line 7691 "sql.c" + case 625: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 629: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==629); +{ yymsp[-3].minor.yy890 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 625: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 629: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==629); -#line 1229 "sql.y" -{ yymsp[-3].minor.yy232 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } -#line 7697 "sql.c" + case 626: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 630: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==630); +{ yymsp[-3].minor.yy890 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 630: /* subquery ::= NK_LP query_expression NK_RP */ -#line 1237 "sql.y" -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy232); } -#line 7702 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 631: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy890 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy890); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; - case 635: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ -#line 1251 "sql.y" -{ yylhsminor.yy232 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), yymsp[-1].minor.yy834, yymsp[0].minor.yy153); } -#line 7708 "sql.c" - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 636: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy890 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy890), yymsp[-1].minor.yy900, yymsp[0].minor.yy89); } + yymsp[-2].minor.yy890 = yylhsminor.yy890; break; - case 636: /* ordering_specification_opt ::= */ -#line 1255 "sql.y" -{ yymsp[1].minor.yy834 = ORDER_ASC; } -#line 7714 "sql.c" + case 637: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy900 = ORDER_ASC; } break; - case 637: /* ordering_specification_opt ::= ASC */ -#line 1256 "sql.y" -{ yymsp[0].minor.yy834 = ORDER_ASC; } -#line 7719 "sql.c" + case 638: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy900 = ORDER_ASC; } break; - case 638: /* ordering_specification_opt ::= DESC */ -#line 1257 "sql.y" -{ yymsp[0].minor.yy834 = ORDER_DESC; } -#line 7724 "sql.c" + case 639: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy900 = ORDER_DESC; } break; - case 639: /* null_ordering_opt ::= */ -#line 1261 "sql.y" -{ yymsp[1].minor.yy153 = NULL_ORDER_DEFAULT; } -#line 7729 "sql.c" + case 640: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy89 = NULL_ORDER_DEFAULT; } break; - case 640: /* null_ordering_opt ::= NULLS FIRST */ -#line 1262 "sql.y" -{ yymsp[-1].minor.yy153 = NULL_ORDER_FIRST; } -#line 7734 "sql.c" + case 641: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy89 = NULL_ORDER_FIRST; } break; - case 641: /* null_ordering_opt ::= NULLS LAST */ -#line 1263 "sql.y" -{ yymsp[-1].minor.yy153 = NULL_ORDER_LAST; } -#line 7739 "sql.c" + case 642: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy89 = NULL_ORDER_LAST; } break; default: break; @@ -7798,7 +6866,6 @@ static void yy_syntax_error( ParseCTX_FETCH #define TOKEN yyminor /************ Begin %syntax_error code ****************************************/ -#line 29 "sql.y" if (TSDB_CODE_SUCCESS == pCxt->errCode) { if(TOKEN.z) { @@ -7809,7 +6876,6 @@ static void yy_syntax_error( } else if (TSDB_CODE_PAR_DB_NOT_SPECIFIED == pCxt->errCode && TK_NK_FLOAT == TOKEN.type) { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z); } -#line 7812 "sql.c" /************ End %syntax_error code ******************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument variable */ ParseCTX_STORE diff --git a/source/libs/planner/src/planLogicCreater.c b/source/libs/planner/src/planLogicCreater.c index 12b7360165..37685114af 100644 --- a/source/libs/planner/src/planLogicCreater.c +++ b/source/libs/planner/src/planLogicCreater.c @@ -1008,6 +1008,28 @@ static int32_t createWindowLogicNodeByEvent(SLogicPlanContext* pCxt, SEventWindo return createWindowLogicNodeFinalize(pCxt, pSelect, pWindow, pLogicNode); } +static int32_t createWindowLogicNodeByCount(SLogicPlanContext* pCxt, SCountWindowNode* pCount, SSelectStmt* pSelect, + SLogicNode** pLogicNode) { + SWindowLogicNode* pWindow = (SWindowLogicNode*)nodesMakeNode(QUERY_NODE_LOGIC_PLAN_WINDOW); + if (NULL == pWindow) { + return TSDB_CODE_OUT_OF_MEMORY; + } + + pWindow->winType = WINDOW_TYPE_COUNT; + pWindow->node.groupAction = getGroupAction(pCxt, pSelect); + pWindow->node.requireDataOrder = + pCxt->pPlanCxt->streamQuery ? DATA_ORDER_LEVEL_IN_BLOCK : getRequireDataOrder(true, pSelect); + pWindow->node.resultDataOrder = + pCxt->pPlanCxt->streamQuery ? DATA_ORDER_LEVEL_GLOBAL : pWindow->node.requireDataOrder; + pWindow->windowCount = pCount->windowCount; + pWindow->pTspk = nodesCloneNode(pCount->pCol); + if (NULL == pWindow->pTspk) { + nodesDestroyNode((SNode*)pWindow); + return TSDB_CODE_OUT_OF_MEMORY; + } + return createWindowLogicNodeFinalize(pCxt, pSelect, pWindow, pLogicNode); +} + static int32_t createWindowLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelect, SLogicNode** pLogicNode) { if (NULL == pSelect->pWindow) { return TSDB_CODE_SUCCESS; @@ -1021,6 +1043,8 @@ static int32_t createWindowLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSele return createWindowLogicNodeByInterval(pCxt, (SIntervalWindowNode*)pSelect->pWindow, pSelect, pLogicNode); case QUERY_NODE_EVENT_WINDOW: return createWindowLogicNodeByEvent(pCxt, (SEventWindowNode*)pSelect->pWindow, pSelect, pLogicNode); + case QUERY_NODE_COUNT_WINDOW: + return createWindowLogicNodeByCount(pCxt, (SCountWindowNode*)pSelect->pWindow, pSelect, pLogicNode); default: break; } diff --git a/source/libs/planner/src/planPhysiCreater.c b/source/libs/planner/src/planPhysiCreater.c index 21c698fda5..2081a11003 100644 --- a/source/libs/planner/src/planPhysiCreater.c +++ b/source/libs/planner/src/planPhysiCreater.c @@ -1748,6 +1748,26 @@ static int32_t createEventWindowPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pC return code; } +static int32_t createCountWindowPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pChildren, + SWindowLogicNode* pWindowLogicNode, SPhysiNode** pPhyNode) { + SCountWinodwPhysiNode* pCount = (SCountWinodwPhysiNode*)makePhysiNode( + pCxt, (SLogicNode*)pWindowLogicNode, + (pCxt->pPlanCxt->streamQuery ? QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT : QUERY_NODE_PHYSICAL_PLAN_MERGE_COUNT)); + if (NULL == pCount) { + return TSDB_CODE_OUT_OF_MEMORY; + } + pCount->windowCount = pWindowLogicNode->windowCount; + + int32_t code = createWindowPhysiNodeFinalize(pCxt, pChildren, &pCount->window, pWindowLogicNode); + if (TSDB_CODE_SUCCESS == code) { + *pPhyNode = (SPhysiNode*)pCount; + } else { + nodesDestroyNode((SNode*)pCount); + } + + return code; +} + static int32_t createWindowPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pChildren, SWindowLogicNode* pWindowLogicNode, SPhysiNode** pPhyNode) { switch (pWindowLogicNode->winType) { @@ -1759,6 +1779,8 @@ static int32_t createWindowPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pChildr return createStateWindowPhysiNode(pCxt, pChildren, pWindowLogicNode, pPhyNode); case WINDOW_TYPE_EVENT: return createEventWindowPhysiNode(pCxt, pChildren, pWindowLogicNode, pPhyNode); + case WINDOW_TYPE_COUNT: + return createCountWindowPhysiNode(pCxt, pChildren, pWindowLogicNode, pPhyNode); default: break; } diff --git a/source/libs/planner/src/planSpliter.c b/source/libs/planner/src/planSpliter.c index ad0031f815..a270e9ff44 100644 --- a/source/libs/planner/src/planSpliter.c +++ b/source/libs/planner/src/planSpliter.c @@ -764,6 +764,18 @@ static int32_t stbSplSplitEvent(SSplitContext* pCxt, SStableSplitInfo* pInfo) { } } +static int32_t stbSplSplitCountForStream(SSplitContext* pCxt, SStableSplitInfo* pInfo) { + return TSDB_CODE_PLAN_INTERNAL_ERROR; +} + +static int32_t stbSplSplitCount(SSplitContext* pCxt, SStableSplitInfo* pInfo) { + if (pCxt->pPlanCxt->streamQuery) { + return stbSplSplitCountForStream(pCxt, pInfo); + } else { + return stbSplSplitSessionOrStateForBatch(pCxt, pInfo); + } +} + static int32_t stbSplSplitWindowForCrossTable(SSplitContext* pCxt, SStableSplitInfo* pInfo) { switch (((SWindowLogicNode*)pInfo->pSplitNode)->winType) { case WINDOW_TYPE_INTERVAL: @@ -774,6 +786,8 @@ static int32_t stbSplSplitWindowForCrossTable(SSplitContext* pCxt, SStableSplitI return stbSplSplitState(pCxt, pInfo); case WINDOW_TYPE_EVENT: return stbSplSplitEvent(pCxt, pInfo); + case WINDOW_TYPE_COUNT: + return stbSplSplitCount(pCxt, pInfo); default: break; } diff --git a/source/libs/planner/src/planUtil.c b/source/libs/planner/src/planUtil.c index aeef3f2487..74b325a298 100644 --- a/source/libs/planner/src/planUtil.c +++ b/source/libs/planner/src/planUtil.c @@ -237,6 +237,15 @@ static int32_t adjustEventDataRequirement(SWindowLogicNode* pWindow, EDataOrderL return TSDB_CODE_SUCCESS; } +static int32_t adjustCountDataRequirement(SWindowLogicNode* pWindow, EDataOrderLevel requirement) { + if (requirement <= pWindow->node.resultDataOrder) { + return TSDB_CODE_SUCCESS; + } + pWindow->node.resultDataOrder = requirement; + pWindow->node.requireDataOrder = requirement; + return TSDB_CODE_SUCCESS; +} + static int32_t adjustWindowDataRequirement(SWindowLogicNode* pWindow, EDataOrderLevel requirement) { switch (pWindow->winType) { case WINDOW_TYPE_INTERVAL: @@ -247,6 +256,8 @@ static int32_t adjustWindowDataRequirement(SWindowLogicNode* pWindow, EDataOrder return adjustStateDataRequirement(pWindow, requirement); case WINDOW_TYPE_EVENT: return adjustEventDataRequirement(pWindow, requirement); + case WINDOW_TYPE_COUNT: + return adjustCountDataRequirement(pWindow, requirement); default: break; } diff --git a/source/libs/stream/src/streamSessionState.c b/source/libs/stream/src/streamSessionState.c index 2cb77c60dc..4881f78c2b 100644 --- a/source/libs/stream/src/streamSessionState.c +++ b/source/libs/stream/src/streamSessionState.c @@ -28,6 +28,12 @@ int sessionStateKeyCompare(const SSessionKey* pWin1, const void* pDatas, int pos return sessionWinKeyCmpr(pWin1, pWin2); } +int sessionStateRangeKeyCompare(const SSessionKey* pWin1, const void* pDatas, int pos) { + SRowBuffPos* pPos2 = taosArrayGetP(pDatas, pos); + SSessionKey* pWin2 = (SSessionKey*)pPos2->pKey; + return sessionRangeKeyCmpr(pWin1, pWin2); +} + int32_t binarySearch(void* keyList, int num, const void* key, __session_compare_fn_t cmpFn) { int firstPos = 0, lastPos = num - 1, midPos = -1; int numOfRows = 0; @@ -416,7 +422,7 @@ SStreamStateCur* sessionWinStateSeekKeyCurrentNext(SStreamFileState* pFileState, int32_t index = -1; SStreamStateCur* pCur = seekKeyCurrentPrev_buff(pFileState, pWinKey, &pWinStates, &index); if (pCur) { - if (sessionStateKeyCompare(pWinKey, pWinStates, index) > 0) { + if (sessionStateRangeKeyCompare(pWinKey, pWinStates, index) > 0) { sessionWinStateMoveToNext(pCur); } return pCur; @@ -632,3 +638,87 @@ int32_t getStateWinResultBuff(SStreamFileState* pFileState, SSessionKey* key, ch _end: return code; } + +int32_t getCountWinResultBuff(SStreamFileState* pFileState, SSessionKey* pKey, COUNT_TYPE winCount, void** pVal, int32_t* pVLen) { + SSessionKey* pWinKey = pKey; + const TSKEY gap = 0; + int32_t code = TSDB_CODE_SUCCESS; + SSHashObj* pSessionBuff = getRowStateBuff(pFileState); + SArray* pWinStates = NULL; + void** ppBuff = tSimpleHashGet(pSessionBuff, &pWinKey->groupId, sizeof(uint64_t)); + if (ppBuff) { + pWinStates = (SArray*)(*ppBuff); + } else { + pWinStates = taosArrayInit(16, POINTER_BYTES); + tSimpleHashPut(pSessionBuff, &pWinKey->groupId, sizeof(uint64_t), &pWinStates, POINTER_BYTES); + } + + TSKEY startTs = pWinKey->win.skey; + TSKEY endTs = pWinKey->win.ekey; + + int32_t size = taosArrayGetSize(pWinStates); + if (size == 0) { + void* pFileStore = getStateFileStore(pFileState); + void* p = NULL; + int32_t code_file = streamStateSessionAddIfNotExist_rocksdb(pFileStore, pWinKey, gap, &p, pVLen); + if (code_file == TSDB_CODE_SUCCESS || isFlushedState(pFileState, endTs, 0)) { + (*pVal) = createSessionWinBuff(pFileState, pWinKey, p, pVLen); + code = code_file; + qDebug("===stream===0 get state win:%" PRId64 ",%" PRId64 " from disc, res %d", pWinKey->win.skey, pWinKey->win.ekey, code_file); + } else { + (*pVal) = addNewSessionWindow(pFileState, pWinStates, pWinKey); + code = TSDB_CODE_FAILED; + taosMemoryFree(p); + } + goto _end; + } + + // find the first position which is smaller than the pWinKey + int32_t index = binarySearch(pWinStates, size, pWinKey, sessionStateKeyCompare); + SRowBuffPos* pPos = NULL; + int32_t valSize = *pVLen; + + if (index >= 0) { + pPos = taosArrayGetP(pWinStates, index); + COUNT_TYPE* pWinStateCout = (COUNT_TYPE*)( (char*)(pPos->pRowBuff) + (valSize - sizeof(COUNT_TYPE)) ); + if (inSessionWindow(pPos->pKey, startTs, gap) || (index == size - 1 && (*pWinStateCout) < winCount) ) { + (*pVal) = pPos; + SSessionKey* pDestWinKey = (SSessionKey*)pPos->pKey; + pPos->beUsed = true; + *pWinKey = *pDestWinKey; + goto _end; + } + } + + if (index == -1) { + if (!isDeteled(pFileState, endTs)) { + void* p = NULL; + void* pFileStore = getStateFileStore(pFileState); + int32_t code_file = + streamStateSessionAddIfNotExist_rocksdb(pFileStore, pWinKey, gap, &p, pVLen); + if (code_file == TSDB_CODE_SUCCESS) { + (*pVal) = createSessionWinBuff(pFileState, pWinKey, p, pVLen); + code = code_file; + qDebug("===stream===1 get state win:%" PRId64 ",%" PRId64 " from disc, res %d", pWinKey->win.skey, pWinKey->win.ekey, code_file); + goto _end; + } else { + taosMemoryFree(p); + } + } + } + + if (index + 1 < size) { + pPos = taosArrayGetP(pWinStates, index + 1); + (*pVal) = pPos; + SSessionKey* pDestWinKey = (SSessionKey*)pPos->pKey; + pPos->beUsed = true; + *pWinKey = *pDestWinKey; + goto _end; + } + + (*pVal) = addNewSessionWindow(pFileState, pWinStates, pWinKey); + code = TSDB_CODE_FAILED; + +_end: + return code; +} diff --git a/source/libs/stream/src/streamState.c b/source/libs/stream/src/streamState.c index 19b7359981..6d1c86f9e6 100644 --- a/source/libs/stream/src/streamState.c +++ b/source/libs/stream/src/streamState.c @@ -752,6 +752,12 @@ int32_t streamStateSessionDel(SStreamState* pState, const SSessionKey* key) { #endif } +int32_t streamStateSessionReset(SStreamState* pState, void* pVal) { + int32_t len = getRowStateRowSize(pState->pFileState); + memset(pVal, 0, len); + return TSDB_CODE_SUCCESS; +} + SStreamStateCur* streamStateSessionSeekKeyCurrentPrev(SStreamState* pState, const SSessionKey* key) { #ifdef USE_ROCKSDB return sessionWinStateSeekKeyCurrentPrev(pState->pFileState, key); @@ -1135,90 +1141,7 @@ SStreamStateCur* createStreamStateCursor() { return pCur; } -#if 0 -char* streamStateSessionDump(SStreamState* pState) { - SStreamStateCur* pCur = taosMemoryCalloc(1, sizeof(SStreamStateCur)); - if (pCur == NULL) { - return NULL; - } - pCur->number = pState->number; - if (tdbTbcOpen(pState->pTdbState->pSessionStateDb, &pCur->pCur, NULL) < 0) { - streamStateFreeCur(pCur); - return NULL; - } - tdbTbcMoveToFirst(pCur->pCur); - - SSessionKey key = {0}; - void* buf = NULL; - int32_t bufSize = 0; - int32_t code = streamStateSessionGetKVByCur(pCur, &key, &buf, &bufSize); - if (code != 0) { - streamStateFreeCur(pCur); - return NULL; - } - - int32_t size = 2048; - char* dumpBuf = taosMemoryCalloc(size, 1); - int64_t len = 0; - len += snprintf(dumpBuf + len, size - len, "||s:%15" PRId64 ",", key.win.skey); - len += snprintf(dumpBuf + len, size - len, "e:%15" PRId64 ",", key.win.ekey); - len += snprintf(dumpBuf + len, size - len, "g:%15" PRId64 "||", key.groupId); - while (1) { - tdbTbcMoveToNext(pCur->pCur); - key = (SSessionKey){0}; - code = streamStateSessionGetKVByCur(pCur, &key, NULL, 0); - if (code != 0) { - streamStateFreeCur(pCur); - return dumpBuf; - } - len += snprintf(dumpBuf + len, size - len, "||s:%15" PRId64 ",", key.win.skey); - len += snprintf(dumpBuf + len, size - len, "e:%15" PRId64 ",", key.win.ekey); - len += snprintf(dumpBuf + len, size - len, "g:%15" PRId64 "||", key.groupId); - } - streamStateFreeCur(pCur); - return dumpBuf; +// count window +int32_t streamStateCountWinAddIfNotExist(SStreamState* pState, SSessionKey* pKey, COUNT_TYPE winCount, void** ppVal, int32_t* pVLen) { + return getCountWinResultBuff(pState->pFileState, pKey, winCount, ppVal, pVLen); } - -char* streamStateIntervalDump(SStreamState* pState) { - SStreamStateCur* pCur = taosMemoryCalloc(1, sizeof(SStreamStateCur)); - if (pCur == NULL) { - return NULL; - } - pCur->number = pState->number; - if (tdbTbcOpen(pState->pTdbState->pStateDb, &pCur->pCur, NULL) < 0) { - streamStateFreeCur(pCur); - return NULL; - } - tdbTbcMoveToFirst(pCur->pCur); - - SWinKey key = {0}; - void* buf = NULL; - int32_t bufSize = 0; - int32_t code = streamStateGetKVByCur(pCur, &key, (const void **)&buf, &bufSize); - if (code != 0) { - streamStateFreeCur(pCur); - return NULL; - } - - int32_t size = 2048; - char* dumpBuf = taosMemoryCalloc(size, 1); - int64_t len = 0; - len += snprintf(dumpBuf + len, size - len, "||s:%15" PRId64 ",", key.ts); - // len += snprintf(dumpBuf + len, size - len, "e:%15" PRId64 ",", key.win.ekey); - len += snprintf(dumpBuf + len, size - len, "g:%15" PRId64 "||", key.groupId); - while (1) { - tdbTbcMoveToNext(pCur->pCur); - key = (SWinKey){0}; - code = streamStateGetKVByCur(pCur, &key, NULL, 0); - if (code != 0) { - streamStateFreeCur(pCur); - return dumpBuf; - } - len += snprintf(dumpBuf + len, size - len, "||s:%15" PRId64 ",", key.ts); - // len += snprintf(dumpBuf + len, size - len, "e:%15" PRId64 ",", key.win.ekey); - len += snprintf(dumpBuf + len, size - len, "g:%15" PRId64 "||", key.groupId); - } - streamStateFreeCur(pCur); - return dumpBuf; -} -#endif \ No newline at end of file diff --git a/source/libs/stream/src/tstreamFileState.c b/source/libs/stream/src/tstreamFileState.c index fb5e02c827..a6548266ed 100644 --- a/source/libs/stream/src/tstreamFileState.c +++ b/source/libs/stream/src/tstreamFileState.c @@ -480,6 +480,15 @@ int32_t deleteRowBuff(SStreamFileState* pFileState, const void* pKey, int32_t ke return TSDB_CODE_FAILED; } +int32_t resetRowBuff(SStreamFileState* pFileState, const void* pKey, int32_t keyLen) { + int32_t code_buff = pFileState->stateBuffRemoveFn(pFileState->rowStateBuff, pKey, keyLen); + int32_t code_file = pFileState->stateFileRemoveFn(pFileState, pKey); + if (code_buff == TSDB_CODE_SUCCESS || code_file == TSDB_CODE_SUCCESS) { + return TSDB_CODE_SUCCESS; + } + return TSDB_CODE_FAILED; +} + static void recoverSessionRowBuff(SStreamFileState* pFileState, SRowBuffPos* pPos) { int32_t len = 0; void* pBuff = NULL; diff --git a/tests/script/tsim/stream/count0.sim b/tests/script/tsim/stream/count0.sim new file mode 100644 index 0000000000..9a5d604f48 --- /dev/null +++ b/tests/script/tsim/stream/count0.sim @@ -0,0 +1,183 @@ +system sh/stop_dnodes.sh +system sh/deploy.sh -n dnode1 -i 1 +system sh/exec.sh -n dnode1 -s start +sleep 50 +sql connect + +print step1 +print =============== create database +sql create database test vgroups 1; +sql use test; + +sql create table t1(ts timestamp, a int, b int , c int, d double); +sql create stream streams1 trigger at_once IGNORE EXPIRED 1 IGNORE UPDATE 0 WATERMARK 100s into streamt as select _wstart as s, count(*) c1, sum(b), max(c) from t1 count_window(3); +sleep 1000 + +sql insert into t1 values(1648791213000,0,1,1,1.0); +sql insert into t1 values(1648791213001,9,2,2,1.1); +sql insert into t1 values(1648791213009,0,3,3,1.0); + + +sql insert into t1 values(1648791223000,0,1,1,1.0); +sql insert into t1 values(1648791223001,9,2,2,1.1); +sql insert into t1 values(1648791223009,0,3,3,1.0); + +$loop_count = 0 +loop2: + +sleep 300 +print 1 sql select * from streamt; +sql select * from streamt; + +print $data00 $data01 $data02 $data03 +print $data10 $data11 $data12 $data13 + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +# row 0 +if $data01 != 3 then + print ======data01=$data01 + goto loop2 +endi + +if $data02 != 6 then + print ======data02=$data02 + goto loop2 +endi + +if $data03 != 3 then + print ======data03=$data03 + goto loop2 +endi + +# row 1 +if $data11 != 3 then + print ======data11=$data11 + goto loop2 +endi + +if $data12 != 6 then + print ======data12=$data12 + goto loop2 +endi + +if $data13 != 3 then + print ======data13=$data13 + goto loop2 +endi + + + +print step2 +print =============== create database +sql create database test2 vgroups 4; +sql use test2; + +sql create stable st(ts timestamp, a int, b int , c int, d double) tags(ta int,tb int,tc int); +sql create table t1 using st tags(1,1,1); +sql create table t2 using st tags(2,2,2); +sql create stream streams2 trigger at_once IGNORE EXPIRED 1 IGNORE UPDATE 0 WATERMARK 100s into streamt2 as select _wstart as s, count(*) c1, sum(b), max(c) from st partition by tbname count_window(3) +sleep 1000 + +sql insert into t1 values(1648791213000,0,1,1,1.0); +sql insert into t1 values(1648791213001,9,2,2,1.1); +sql insert into t1 values(1648791213009,0,3,3,1.0); + +sql insert into t2 values(1648791213000,0,1,1,1.0); +sql insert into t2 values(1648791213001,9,2,2,1.1); +sql insert into t2 values(1648791213009,0,3,3,1.0); + +sql insert into t1 values(1648791223000,0,1,1,1.0); +sql insert into t1 values(1648791223001,9,2,2,1.1); +sql insert into t1 values(1648791223009,0,3,3,1.0); + +sql insert into t2 values(1648791223000,0,1,1,1.0); +sql insert into t2 values(1648791223001,9,2,2,1.1); +sql insert into t2 values(1648791223009,0,3,3,1.0); + +$loop_count = 0 +loop3: + +sleep 300 +print 1 sql select * from streamt; +sql select * from streamt2 order by 1,2; + +print $data00 $data01 $data02 $data03 +print $data10 $data11 $data12 $data13 +print $data20 $data21 $data22 $data23 +print $data30 $data31 $data32 $data33 + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +# row 0 +if $data01 != 3 then + print ======data01=$data01 + goto loop3 +endi + +if $data02 != 6 then + print ======data02=$data02 + goto loop3 +endi + +if $data03 != 3 then + print ======data03=$data03 + goto loop3 +endi + +# row 1 +if $data11 != 3 then + print ======data11=$data11 + goto loop3 +endi + +if $data12 != 6 then + print ======data12=$data12 + goto loop3 +endi + +if $data13 != 3 then + print ======data13=$data13 + goto loop3 +endi + +# row 2 +if $data21 != 3 then + print ======data21=$data21 + goto loop3 +endi + +if $data22 != 6 then + print ======data22=$data22 + goto loop3 +endi + +if $data23 != 3 then + print ======data23=$data23 + goto loop3 +endi + +# row 3 +if $data31 != 3 then + print ======data31=$data31 + goto loop3 +endi + +if $data32 != 6 then + print ======data32=$data32 + goto loop3 +endi + +if $data33 != 3 then + print ======data33=$data33 + goto loop3 +endi + +print count0 end +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stream/count1.sim b/tests/script/tsim/stream/count1.sim new file mode 100644 index 0000000000..70ea357ca1 --- /dev/null +++ b/tests/script/tsim/stream/count1.sim @@ -0,0 +1,31 @@ +system sh/stop_dnodes.sh +system sh/deploy.sh -n dnode1 -i 1 +system sh/exec.sh -n dnode1 -s start +sleep 50 +sql connect + +print step1 +print =============== create database +sql create database test vgroups 1; +sql use test; + +sql create stable st(ts timestamp,a int,b int,c int) tags(ta int,tb int,tc int); +sql create table t1 using st tags(1,1,1); +sql create table t2 using st tags(2,2,2); + +# stable +sql_error create stream streams1 trigger at_once IGNORE EXPIRED 1 IGNORE UPDATE 0 WATERMARK 10s into streamt as select _wstart as s, count(*) c1, sum(b), max(c) from st count_window(3); + +# IGNORE EXPIRED 0 +sql_error create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 WATERMARK 10s into streamt as select _wstart as s, count(*) c1, sum(b), max(c) from t1 count_window(3); + +# WATERMARK 0 +sql_error create stream streams1 trigger at_once IGNORE EXPIRED 1 IGNORE UPDATE 0 into streamt as select _wstart as s, count(*) c1, sum(b), max(c) from t1 count_window(3); + +# All +sql_error create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart as s, count(*) c1, sum(b), max(c) from st count_window(3); + + + +print count1 end +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stream/count2.sim b/tests/script/tsim/stream/count2.sim new file mode 100644 index 0000000000..2558bd1072 --- /dev/null +++ b/tests/script/tsim/stream/count2.sim @@ -0,0 +1,302 @@ +system sh/stop_dnodes.sh +system sh/deploy.sh -n dnode1 -i 1 +system sh/exec.sh -n dnode1 -s start +sleep 50 +sql connect + +print step1 +print =============== create database +sql create database test vgroups 1; +sql use test; + +sql create table t1(ts timestamp, a int, b int , c int, d double); +sql create stream streams1 trigger at_once IGNORE EXPIRED 1 IGNORE UPDATE 0 WATERMARK 100s into streamt as select _wstart as s, count(*) c1, sum(b), max(c) from t1 count_window(3); +sleep 1000 + +sql insert into t1 values(1648791213001,9,2,2,1.1); +sql insert into t1 values(1648791213009,0,3,3,1.0); + +$loop_count = 0 +loop0: + +sleep 300 +print 0 sql select * from streamt; +sql select * from streamt; + +print $data00 $data01 $data02 $data03 +print $data10 $data11 $data12 $data13 + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +# row 0 +if $data01 != 2 then + print ======data01=$data01 + goto loop0 +endi + +sql insert into t1 values(1648791213000,0,1,1,1.0); + +$loop_count = 0 +loop1: + +sleep 300 +print 1 sql select * from streamt; +sql select * from streamt; + +print $data00 $data01 $data02 $data03 +print $data10 $data11 $data12 $data13 + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +# row 0 + +if $rows != 1 then + print ======rows=$rows + goto loop1 +endi + +if $data01 != 3 then + print ======data01=$data01 + goto loop1 +endi + +sql insert into t1 values(1648791223000,0,1,1,1.0); +sql insert into t1 values(1648791223001,9,2,2,1.1); +sql insert into t1 values(1648791223009,0,3,3,1.0); + +$loop_count = 0 +loop2: + +sleep 300 +print 2 sql select * from streamt order by 1; +sql select * from streamt order by 1; + +print $data00 $data01 $data02 $data03 +print $data10 $data11 $data12 $data13 +print $data20 $data21 $data22 $data23 +print $data30 $data31 $data32 $data33 + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +if $rows != 2 then + print ======rows=$rows + goto loop2 +endi + +sql insert into t1 values(1648791212000,0,1,1,1.0); + +$loop_count = 0 +loop3: + +sleep 300 +print 3 sql select * from streamt order by 1; +sql select * from streamt order by 1; + +print $data00 $data01 $data02 $data03 +print $data10 $data11 $data12 $data13 +print $data20 $data21 $data22 $data23 +print $data30 $data31 $data32 $data33 + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +if $rows != 3 then + print ======rows=$rows + goto loop3 +endi + +if $data01 != 3 then + print ======data01=$data01 + goto loop3 +endi + +if $data11 != 3 then + print ======data11=$data11 + goto loop3 +endi + +if $data21 != 1 then + print ======data21=$data21 + goto loop3 +endi + +print step2 +print =============== create database +sql create database test2 vgroups 1; +sql use test2; + +sql create stable st(ts timestamp, a int, b int , c int, d double) tags(ta int,tb int,tc int); +sql create table t1 using st tags(1,1,1); +sql create table t2 using st tags(2,2,2); +sql create stream streams2 trigger at_once IGNORE EXPIRED 1 IGNORE UPDATE 0 WATERMARK 100s into streamt2 as select _wstart as s, count(*) c1, sum(b), max(c) from st partition by tbname count_window(3) +sleep 1000 + + +sql insert into t1 values(1648791213001,9,2,2,1.1); +sql insert into t1 values(1648791213009,0,3,3,1.0); + +sql insert into t2 values(1648791213001,9,2,2,1.1); +sql insert into t2 values(1648791213009,0,3,3,1.0); + +$loop_count = 0 +loop4: + +sleep 300 +print 0 sql select * from streamt2 order by 1;; +sql select * from streamt2 order by 1;; + +print $data00 $data01 $data02 $data03 +print $data10 $data11 $data12 $data13 +print $data20 $data21 $data22 $data23 + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +# row 0 +if $data01 != 2 then + print ======data01=$data01 + goto loop4 +endi + +if $data11 != 2 then + print ======data11=$data11 + goto loop4 +endi + +sql insert into t1 values(1648791213000,0,1,1,1.0); +sql insert into t2 values(1648791213000,0,1,1,1.0); + +$loop_count = 0 +loop5: + +sleep 300 +print 1 sql select * from streamt2 order by 1;; +sql select * from streamt2 order by 1;; + +print $data00 $data01 $data02 $data03 +print $data10 $data11 $data12 $data13 +print $data20 $data21 $data22 $data23 + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +# row 0 + +if $rows != 2 then + print ======rows=$rows + goto loop5 +endi + +if $data01 != 3 then + print ======data01=$data01 + goto loop5 +endi + +if $data11 != 3 then + print ======data11=$data11 + goto loop5 +endi + +sql insert into t1 values(1648791223000,0,1,1,1.0); +sql insert into t1 values(1648791223001,9,2,2,1.1); +sql insert into t1 values(1648791223009,0,3,3,1.0); + +sql insert into t2 values(1648791223000,0,1,1,1.0); +sql insert into t2 values(1648791223001,9,2,2,1.1); +sql insert into t2 values(1648791223009,0,3,3,1.0); + +$loop_count = 0 +loop6: + +sleep 300 +print 2 sql select * from streamt2 order by 1; +sql select * from streamt2 order by 1; + +print $data00 $data01 $data02 $data03 +print $data10 $data11 $data12 $data13 +print $data20 $data21 $data22 $data23 +print $data30 $data31 $data32 $data33 +print $data40 $data41 $data42 $data43 + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +if $rows != 4 then + print ======rows=$rows + goto loop6 +endi + +sql insert into t1 values(1648791212000,0,1,1,1.0); +sql insert into t2 values(1648791212000,0,1,1,1.0); + +$loop_count = 0 +loop7: + +sleep 300 +print 3 sql select * from streamt2 order by 1; +sql select * from streamt2 order by 1; + +print $data00 $data01 $data02 $data03 +print $data10 $data11 $data12 $data13 +print $data20 $data21 $data22 $data23 +print $data30 $data31 $data32 $data33 + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +if $rows != 6 then + print ======rows=$rows + goto loop7 +endi + +if $data01 != 3 then + print ======data01=$data01 + goto loop7 +endi + +if $data11 != 3 then + print ======data11=$data11 + goto loop7 +endi + +if $data21 != 3 then + print ======data21=$data21 + goto loop7 +endi + +if $data31 != 3 then + print ======data31=$data31 + goto loop7 +endi + +if $data41 != 1 then + print ======data41=$data41 + goto loop7 +endi + +if $data51 != 1 then + print ======data51=$data51 + goto loop7 +endi + +print count2 end +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stream/count3.sim b/tests/script/tsim/stream/count3.sim new file mode 100644 index 0000000000..f04996cdaa --- /dev/null +++ b/tests/script/tsim/stream/count3.sim @@ -0,0 +1,116 @@ +system sh/stop_dnodes.sh +system sh/deploy.sh -n dnode1 -i 1 +system sh/exec.sh -n dnode1 -s start +sleep 50 +sql connect + +print step1 +print =============== create database +sql create database test vgroups 1; +sql use test; + +sql create table t1(ts timestamp, a int, b int , c int, d double); +sql create stream streams1 trigger at_once IGNORE EXPIRED 1 IGNORE UPDATE 0 WATERMARK 100s into streamt as select _wstart as s, count(*) c1, sum(b), max(c) from t1 count_window(3); +sleep 1000 + +sql insert into t1 values(1648791213000,0,1,1,1.0); +sql insert into t1 values(1648791213001,9,2,2,1.1); +sql insert into t1 values(1648791213009,0,3,3,1.0); + +sql insert into t1 values(1648791223000,0,1,1,1.0); +sql insert into t1 values(1648791223001,9,2,2,1.1); +sql insert into t1 values(1648791223009,0,3,3,1.0); + +$loop_count = 0 +loop2: + +sleep 300 +print 2 sql select * from streamt order by 1; +sql select * from streamt order by 1; + +print $data00 $data01 $data02 $data03 +print $data10 $data11 $data12 $data13 +print $data20 $data21 $data22 $data23 +print $data30 $data31 $data32 $data33 + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +if $rows != 2 then + print ======rows=$rows + goto loop2 +endi + +sql insert into t1 values(1648791213000,4,4,4,4.0); + +$loop_count = 0 +loop3: + +sleep 300 +print 3 sql select * from streamt order by 1; +sql select * from streamt order by 1; + +print $data00 $data01 $data02 $data03 +print $data10 $data11 $data12 $data13 +print $data20 $data21 $data22 $data23 +print $data30 $data31 $data32 $data33 + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +if $rows != 2 then + print ======rows=$rows + goto loop3 +endi + +if $data01 != 3 then + print ======data01=$data01 + goto loop3 +endi + +if $data11 != 3 then + print ======data11=$data11 + goto loop3 +endi + +sql delete from t1 where ts = 1648791223001; + +$loop_count = 0 +loop4: + +sleep 300 +print 3 sql select * from streamt order by 1; +sql select * from streamt order by 1; + +print $data00 $data01 $data02 $data03 +print $data10 $data11 $data12 $data13 +print $data20 $data21 $data22 $data23 +print $data30 $data31 $data32 $data33 + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +if $rows != 2 then + print ======rows=$rows + goto loop4 +endi + +if $data01 != 3 then + print ======data01=$data01 + goto loop4 +endi + +if $data11 != 2 then + print ======data11=$data11 + goto loop4 +endi + + +print count3 end +system sh/exec.sh -n dnode1 -s stop -x SIGINT