From 0e8aaf4c9e6ee7a13941bf7bbcdd39e85aec33d4 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Wed, 28 Sep 2022 10:38:49 +0800 Subject: [PATCH 01/40] feat(tmq): push optimization --- include/libs/executor/executor.h | 14 ++-- source/dnode/vnode/inc/vnode.h | 2 +- source/dnode/vnode/src/inc/tq.h | 18 ++++- source/dnode/vnode/src/tq/tq.c | 96 +++++++++++++++++++++++-- source/dnode/vnode/src/tq/tqExec.c | 6 +- source/dnode/vnode/src/tq/tqPush.c | 74 +++++++++++++++++++ source/dnode/vnode/src/tq/tqRead.c | 63 ++++++++-------- source/dnode/vnode/src/vnd/vnodeSvr.c | 4 +- source/libs/executor/inc/executorimpl.h | 1 + source/libs/executor/src/executor.c | 10 ++- source/libs/executor/src/scanoperator.c | 35 +++++++++ 11 files changed, 271 insertions(+), 52 deletions(-) diff --git a/include/libs/executor/executor.h b/include/libs/executor/executor.h index 8c1d957381..1049599a56 100644 --- a/include/libs/executor/executor.h +++ b/include/libs/executor/executor.h @@ -29,13 +29,13 @@ typedef void* DataSinkHandle; struct SRpcMsg; struct SSubplan; -typedef int32_t (*localFetchFp)(void *, uint64_t, uint64_t, uint64_t, int64_t, int32_t, void**, SArray*); +typedef int32_t (*localFetchFp)(void*, uint64_t, uint64_t, uint64_t, int64_t, int32_t, void**, SArray*); typedef struct { - void *handle; + void* handle; bool localExec; localFetchFp fp; - SArray *explainRes; + SArray* explainRes; } SLocalFetch; typedef struct { @@ -51,9 +51,9 @@ typedef struct { bool initTqReader; int32_t numOfVgroups; - void* sContext; // SSnapContext* + void* sContext; // SSnapContext* - void* pStateBackend; + void* pStateBackend; } SReadHandle; // in queue mode, data streams are seperated by msg @@ -136,7 +136,7 @@ int32_t qGetQueryTableSchemaVersion(qTaskInfo_t tinfo, char* dbName, char* table * @param handle * @return */ -int32_t qExecTaskOpt(qTaskInfo_t tinfo, SArray* pResList, uint64_t* useconds, SLocalFetch *pLocal); +int32_t qExecTaskOpt(qTaskInfo_t tinfo, SArray* pResList, uint64_t* useconds, SLocalFetch* pLocal); int32_t qExecTask(qTaskInfo_t tinfo, SSDataBlock** pBlock, uint64_t* useconds); /** @@ -195,6 +195,8 @@ int32_t qStreamPrepareTsdbScan(qTaskInfo_t tinfo, uint64_t uid, int64_t ts); int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subType); +int32_t qStreamScanMemData(qTaskInfo_t tinfo, const SSubmitReq* pReq); + int32_t qStreamExtractOffset(qTaskInfo_t tinfo, STqOffsetVal* pOffset); SMqMetaRsp* qStreamExtractMetaMsg(qTaskInfo_t tinfo); diff --git a/source/dnode/vnode/inc/vnode.h b/source/dnode/vnode/inc/vnode.h index 6ba10641f5..f0fb8d4b02 100644 --- a/source/dnode/vnode/inc/vnode.h +++ b/source/dnode/vnode/inc/vnode.h @@ -217,7 +217,7 @@ int32_t tqReaderRemoveTbUidList(STqReader *pReader, const SArray *tbUidList); int32_t tqSeekVer(STqReader *pReader, int64_t ver); int32_t tqNextBlock(STqReader *pReader, SFetchRet *ret); -int32_t tqReaderSetDataMsg(STqReader *pReader, SSubmitReq *pMsg, int64_t ver); +int32_t tqReaderSetDataMsg(STqReader *pReader, const SSubmitReq *pMsg, int64_t ver); bool tqNextDataBlock(STqReader *pReader); bool tqNextDataBlockFilterOut(STqReader *pReader, SHashObj *filterOutUids); int32_t tqRetrieveDataBlock(SSDataBlock *pBlock, STqReader *pReader); diff --git a/source/dnode/vnode/src/inc/tq.h b/source/dnode/vnode/src/inc/tq.h index c3441a43f0..04b0813445 100644 --- a/source/dnode/vnode/src/inc/tq.h +++ b/source/dnode/vnode/src/inc/tq.h @@ -113,10 +113,20 @@ typedef struct { } STqHandle; +typedef struct { + SMqDataRsp dataRsp; + SMqRspHead rspHead; + STqHandle* pHandle; + SRpcHandleInfo pInfo; +} STqPushEntry; + struct STQ { - SVnode* pVnode; - char* path; - SHashObj* pPushMgr; // consumerId -> STqHandle* + SVnode* pVnode; + char* path; + + SRWLatch pushLock; + + SHashObj* pPushMgr; // consumerId -> STqPushEntry SHashObj* pHandle; // subKey -> STqHandle SHashObj* pCheckInfo; // topic -> SAlterCheckInfo @@ -146,7 +156,9 @@ int64_t tqFetchLog(STQ* pTq, STqHandle* pHandle, int64_t* fetchOffset, SWalCkHea // tqExec int32_t tqTaosxScanLog(STQ* pTq, STqHandle* pHandle, SSubmitReq* pReq, STaosxRsp* pRsp); +int32_t tqAddBlockDataToRsp(const SSDataBlock* pBlock, SMqDataRsp* pRsp, int32_t numOfCols); int32_t tqSendDataRsp(STQ* pTq, const SRpcMsg* pMsg, const SMqPollReq* pReq, const SMqDataRsp* pRsp); +int32_t tqPushDataRsp(STQ* pTq, STqPushEntry* pPushEntry); // tqMeta int32_t tqMetaOpen(STQ* pTq); diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 76f3c1b12d..21136405cb 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -78,7 +78,9 @@ STQ* tqOpen(const char* path, SVnode* pVnode) { taosHashSetFreeFp(pTq->pHandle, destroySTqHandle); - pTq->pPushMgr = taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), true, HASH_ENTRY_LOCK); + taosInitRWLatch(&pTq->pushLock); + pTq->pPushMgr = taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), true, HASH_NO_LOCK); + taosHashSetFreeFp(pTq->pPushMgr, taosMemoryFree); pTq->pCheckInfo = taosHashInit(64, MurmurHash3_32, true, HASH_ENTRY_LOCK); @@ -153,6 +155,65 @@ int32_t tqSendMetaPollRsp(STQ* pTq, const SRpcMsg* pMsg, const SMqPollReq* pReq, return 0; } +int32_t tqPushDataRsp(STQ* pTq, STqPushEntry* pPushEntry) { + SMqDataRsp* pRsp = &pPushEntry->dataRsp; + + ASSERT(taosArrayGetSize(pRsp->blockData) == pRsp->blockNum); + ASSERT(taosArrayGetSize(pRsp->blockDataLen) == pRsp->blockNum); + + ASSERT(!pRsp->withSchema); + ASSERT(taosArrayGetSize(pRsp->blockSchema) == 0); + + if (pRsp->reqOffset.type == TMQ_OFFSET__LOG) { + if (pRsp->blockNum > 0) { + ASSERT(pRsp->rspOffset.version > pRsp->reqOffset.version); + } else { + ASSERT(pRsp->rspOffset.version >= pRsp->reqOffset.version); + } + } + + int32_t len = 0; + int32_t code = 0; + tEncodeSize(tEncodeSMqDataRsp, pRsp, len, code); + + if (code < 0) { + return -1; + } + + int32_t tlen = sizeof(SMqRspHead) + len; + void* buf = rpcMallocCont(tlen); + if (buf == NULL) { + return -1; + } + + memcpy(buf, &pPushEntry->rspHead, sizeof(SMqRspHead)); + + void* abuf = POINTER_SHIFT(buf, sizeof(SMqRspHead)); + + SEncoder encoder = {0}; + tEncoderInit(&encoder, abuf, len); + tEncodeSMqDataRsp(&encoder, pRsp); + tEncoderClear(&encoder); + + SRpcMsg rsp = { + .info = pPushEntry->pInfo, + .pCont = buf, + .contLen = tlen, + .code = 0, + }; + + tmsgSendRsp(&rsp); + + char buf1[80] = {0}; + char buf2[80] = {0}; + tFormatOffset(buf1, 80, &pRsp->reqOffset); + tFormatOffset(buf2, 80, &pRsp->rspOffset); + tqDebug("vgId:%d, from consumer:%" PRId64 ", (epoch %d) push rsp, block num: %d, reqOffset:%s, rspOffset:%s", + TD_VID(pTq->pVnode), pRsp->head.consumerId, pRsp->head.epoch, pRsp->blockNum, buf1, buf2); + + return 0; +} + int32_t tqSendDataRsp(STQ* pTq, const SRpcMsg* pMsg, const SMqPollReq* pReq, const SMqDataRsp* pRsp) { ASSERT(taosArrayGetSize(pRsp->blockData) == pRsp->blockNum); ASSERT(taosArrayGetSize(pRsp->blockDataLen) == pRsp->blockNum); @@ -477,11 +538,31 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) { if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) { SMqDataRsp dataRsp = {0}; tqInitDataRsp(&dataRsp, pReq, pHandle->execHandle.subType); + // lock + taosWLockLatch(&pTq->pushLock); tqScanData(pTq, pHandle, &dataRsp, &fetchOffsetNew); #if 1 - + if (dataRsp.blockNum == 0) { + STqPushEntry* pPushEntry = taosMemoryCalloc(1, sizeof(STqPushEntry)); + if (pPushEntry != NULL) { + pPushEntry->pHandle = pHandle; + pPushEntry->pInfo = pMsg->info; + memcpy(&pPushEntry->dataRsp, &dataRsp, sizeof(SMqDataRsp)); + pPushEntry->rspHead.consumerId = consumerId; + pPushEntry->rspHead.epoch = reqEpoch; + pPushEntry->rspHead.mqMsgType = TMQ_MSG_TYPE__POLL_RSP; + taosHashPut(pTq->pPushMgr, pHandle->subKey, strlen(pHandle->subKey) + 1, &pPushEntry, sizeof(void*)); + tqDebug("tmq poll: consumer %ld, subkey %s, vg %d save handle to push mgr", consumerId, pHandle->subKey, + TD_VID(pTq->pVnode)); + // unlock + taosWUnLockLatch(&pTq->pushLock); + return 0; + } + } + taosWUnLockLatch(&pTq->pushLock); #endif + if (tqSendDataRsp(pTq, pMsg, pReq, &dataRsp) < 0) { code = -1; } @@ -615,9 +696,14 @@ int32_t tqProcessVgDeleteReq(STQ* pTq, int64_t version, char* msg, int32_t msgLe SMqVDeleteReq* pReq = (SMqVDeleteReq*)msg; int32_t code = taosHashRemove(pTq->pHandle, pReq->subKey, strlen(pReq->subKey)); - ASSERT(code == 0); + if (code != 0) { + tqError("cannot process tq delete req %s, since no such handle", pReq->subKey); + } - tqOffsetDelete(pTq->pOffsetStore, pReq->subKey); + code = tqOffsetDelete(pTq->pOffsetStore, pReq->subKey); + if (code != 0) { + tqError("cannot process tq delete req %s, since no such offset", pReq->subKey); + } if (tqMetaDeleteHandle(pTq, pReq->subKey) < 0) { ASSERT(0); @@ -756,7 +842,9 @@ int32_t tqProcessVgChangeReq(STQ* pTq, int64_t version, char* msg, int32_t msgLe atomic_add_fetch_32(&pHandle->epoch, 1); if (tqMetaSaveHandle(pTq, req.subKey, pHandle) < 0) { // TODO + ASSERT(0); } + // close handle } return 0; diff --git a/source/dnode/vnode/src/tq/tqExec.c b/source/dnode/vnode/src/tq/tqExec.c index a24f920235..58d051bec1 100644 --- a/source/dnode/vnode/src/tq/tqExec.c +++ b/source/dnode/vnode/src/tq/tqExec.c @@ -15,7 +15,7 @@ #include "tq.h" -static int32_t tqAddBlockDataToRsp(const SSDataBlock* pBlock, SMqDataRsp* pRsp, int32_t numOfCols) { +int32_t tqAddBlockDataToRsp(const SSDataBlock* pBlock, SMqDataRsp* pRsp, int32_t numOfCols) { int32_t dataStrLen = sizeof(SRetrieveTableRsp) + blockGetEncodeSize(pBlock); void* buf = taosMemoryCalloc(1, dataStrLen); if (buf == NULL) return -1; @@ -243,7 +243,7 @@ int32_t tqTaosxScanLog(STQ* pTq, STqHandle* pHandle, SSubmitReq* pReq, STaosxRsp } if (pHandle->fetchMeta) { SSubmitBlk* pBlk = pReader->pBlock; - int32_t schemaLen = htonl(pBlk->schemaLen); + int32_t schemaLen = htonl(pBlk->schemaLen); if (schemaLen > 0) { if (pRsp->createTableNum == 0) { pRsp->createTableLen = taosArrayInit(0, sizeof(int32_t)); @@ -278,7 +278,7 @@ int32_t tqTaosxScanLog(STQ* pTq, STqHandle* pHandle, SSubmitReq* pReq, STaosxRsp } if (pHandle->fetchMeta) { SSubmitBlk* pBlk = pReader->pBlock; - int32_t schemaLen = htonl(pBlk->schemaLen); + int32_t schemaLen = htonl(pBlk->schemaLen); if (schemaLen > 0) { if (pRsp->createTableNum == 0) { pRsp->createTableLen = taosArrayInit(0, sizeof(int32_t)); diff --git a/source/dnode/vnode/src/tq/tqPush.c b/source/dnode/vnode/src/tq/tqPush.c index a57e8174fe..c42cfeb7b8 100644 --- a/source/dnode/vnode/src/tq/tqPush.c +++ b/source/dnode/vnode/src/tq/tqPush.c @@ -213,6 +213,80 @@ int32_t tqPushMsgNew(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_ #endif int tqPushMsg(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_t ver) { + if (msgType == TDMT_VND_SUBMIT) { + // lock push mgr to avoid potential msg lost + taosWLockLatch(&pTq->pushLock); + if (taosHashGetSize(pTq->pPushMgr) != 0) { + SArray* cachedKeys = taosArrayInit(0, sizeof(void*)); + SArray* cachedKeyLens = taosArrayInit(0, sizeof(size_t)); + void* data = taosMemoryMalloc(msgLen); + if (data == NULL) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + tqError("failed to copy data for stream since out of memory"); + return -1; + } + memcpy(data, msg, msgLen); + SSubmitReq* pReq = (SSubmitReq*)data; + pReq->version = ver; + + void* pIter = NULL; + while (1) { + pIter = taosHashIterate(pTq->pPushMgr, pIter); + if (pIter == NULL) break; + STqPushEntry* pPushEntry = *(STqPushEntry**)pIter; + STqExecHandle* pExec = &pPushEntry->pHandle->execHandle; + qTaskInfo_t task = pExec->task; + SMqDataRsp* pRsp = &pPushEntry->dataRsp; + + // prepare scan mem data + qStreamScanMemData(task, pReq); + + // exec + while (1) { + SSDataBlock* pDataBlock = NULL; + uint64_t ts = 0; + if (qExecTask(task, NULL, &ts) < 0) { + ASSERT(0); + } + + if (pDataBlock == NULL) { + break; + } + + tqAddBlockDataToRsp(pDataBlock, pRsp, pExec->numOfCols); + pRsp->blockNum++; + } + if (pRsp->blockNum > 0) { + // set offset + tqOffsetResetToLog(&pRsp->rspOffset, ver); + // remove from hash + size_t kLen; + void* key = taosHashGetKey(pPushEntry, &kLen); + void* keyCopy = taosMemoryMalloc(kLen); + memcpy(keyCopy, key, kLen); + + taosArrayPush(cachedKeys, &keyCopy); + taosArrayPush(cachedKeyLens, &kLen); + + if (taosHashRemove(pTq->pPushMgr, key, kLen) != 0) { + ASSERT(0); + } + tqPushDataRsp(pTq, pPushEntry); + } + } + // delete entry + for (int32_t i = 0; i < taosArrayGetSize(cachedKeys); i++) { + void* key = taosArrayGetP(cachedKeys, i); + size_t kLen = *(size_t*)taosArrayGet(cachedKeyLens, i); + taosHashRemove(pTq->pPushMgr, key, kLen); + } + taosArrayDestroyP(cachedKeys, (FDelete)taosMemoryFree); + taosArrayDestroy(cachedKeyLens); + } + // unlock + taosWUnLockLatch(&pTq->pushLock); + } + if (vnodeIsRoleLeader(pTq->pVnode)) { if (msgType == TDMT_VND_SUBMIT) { if (taosHashGetSize(pTq->pStreamMeta->pTasks) == 0) return 0; diff --git a/source/dnode/vnode/src/tq/tqRead.c b/source/dnode/vnode/src/tq/tqRead.c index 8e5f328efa..d93a8fe030 100644 --- a/source/dnode/vnode/src/tq/tqRead.c +++ b/source/dnode/vnode/src/tq/tqRead.c @@ -15,21 +15,20 @@ #include "tq.h" - -bool isValValidForTable(STqHandle* pHandle, SWalCont *pHead){ - if(pHandle->execHandle.subType != TOPIC_SUB_TYPE__TABLE){ +bool isValValidForTable(STqHandle* pHandle, SWalCont* pHead) { + if (pHandle->execHandle.subType != TOPIC_SUB_TYPE__TABLE) { return true; } - int16_t msgType = pHead->msgType; - char* body = pHead->body; - int32_t bodyLen = pHead->bodyLen; + int16_t msgType = pHead->msgType; + char* body = pHead->body; + int32_t bodyLen = pHead->bodyLen; - int64_t tbSuid = pHandle->execHandle.execTb.suid; - int64_t realTbSuid = 0; - SDecoder coder; - void* data = POINTER_SHIFT(body, sizeof(SMsgHead)); - int32_t len = bodyLen - sizeof(SMsgHead); + int64_t tbSuid = pHandle->execHandle.execTb.suid; + int64_t realTbSuid = 0; + SDecoder coder; + void* data = POINTER_SHIFT(body, sizeof(SMsgHead)); + int32_t len = bodyLen - sizeof(SMsgHead); tDecoderInit(&coder, data, len); if (msgType == TDMT_VND_CREATE_STB || msgType == TDMT_VND_ALTER_STB) { @@ -43,38 +42,38 @@ bool isValValidForTable(STqHandle* pHandle, SWalCont *pHead){ if (tDecodeSVDropStbReq(&coder, &req) < 0) { goto end; } - realTbSuid = req.suid; + realTbSuid = req.suid; } else if (msgType == TDMT_VND_CREATE_TABLE) { SVCreateTbBatchReq req = {0}; if (tDecodeSVCreateTbBatchReq(&coder, &req) < 0) { goto end; } - int32_t needRebuild = 0; + int32_t needRebuild = 0; SVCreateTbReq* pCreateReq = NULL; for (int32_t iReq = 0; iReq < req.nReqs; iReq++) { pCreateReq = req.pReqs + iReq; - if(pCreateReq->type == TSDB_CHILD_TABLE && pCreateReq->ctb.suid == tbSuid){ + if (pCreateReq->type == TSDB_CHILD_TABLE && pCreateReq->ctb.suid == tbSuid) { needRebuild++; } } - if(needRebuild == 0){ + if (needRebuild == 0) { // do nothing - }else if(needRebuild == req.nReqs){ + } else if (needRebuild == req.nReqs) { realTbSuid = tbSuid; - }else{ + } else { realTbSuid = tbSuid; SVCreateTbBatchReq reqNew = {0}; reqNew.pArray = taosArrayInit(req.nReqs, sizeof(struct SVCreateTbReq)); for (int32_t iReq = 0; iReq < req.nReqs; iReq++) { pCreateReq = req.pReqs + iReq; - if(pCreateReq->type == TSDB_CHILD_TABLE && pCreateReq->ctb.suid == tbSuid){ + if (pCreateReq->type == TSDB_CHILD_TABLE && pCreateReq->ctb.suid == tbSuid) { reqNew.nReqs++; taosArrayPush(reqNew.pArray, pCreateReq); } } - int tlen; + int tlen; int32_t ret = 0; tEncodeSize(tEncodeSVCreateTbBatchReq, &reqNew, tlen, ret); void* buf = taosMemoryMalloc(tlen); @@ -107,7 +106,7 @@ bool isValValidForTable(STqHandle* pHandle, SWalCont *pHead){ } } } else if (msgType == TDMT_VND_ALTER_TABLE) { - SVAlterTbReq req = {0}; + SVAlterTbReq req = {0}; if (tDecodeSVAlterTbReq(&coder, &req) < 0) { goto end; @@ -129,32 +128,32 @@ bool isValValidForTable(STqHandle* pHandle, SWalCont *pHead){ goto end; } - int32_t needRebuild = 0; + int32_t needRebuild = 0; SVDropTbReq* pDropReq = NULL; for (int32_t iReq = 0; iReq < req.nReqs; iReq++) { pDropReq = req.pReqs + iReq; - if(pDropReq->suid == tbSuid){ + if (pDropReq->suid == tbSuid) { needRebuild++; } } - if(needRebuild == 0){ + if (needRebuild == 0) { // do nothing - }else if(needRebuild == req.nReqs){ + } else if (needRebuild == req.nReqs) { realTbSuid = tbSuid; - }else{ + } else { realTbSuid = tbSuid; SVDropTbBatchReq reqNew = {0}; reqNew.pArray = taosArrayInit(req.nReqs, sizeof(SVDropTbReq)); for (int32_t iReq = 0; iReq < req.nReqs; iReq++) { pDropReq = req.pReqs + iReq; - if(pDropReq->suid == tbSuid){ + if (pDropReq->suid == tbSuid) { reqNew.nReqs++; taosArrayPush(reqNew.pArray, pDropReq); } } - int tlen; + int tlen; int32_t ret = 0; tEncodeSize(tEncodeSVDropTbBatchReq, &reqNew, tlen, ret); void* buf = taosMemoryMalloc(tlen); @@ -177,11 +176,11 @@ bool isValValidForTable(STqHandle* pHandle, SWalCont *pHead){ goto end; } realTbSuid = req.suid; - } else{ + } else { ASSERT(0); } - end: +end: tDecoderClear(&coder); return tbSuid == realTbSuid; } @@ -224,7 +223,7 @@ int64_t tqFetchLog(STQ* pTq, STqHandle* pHandle, int64_t* fetchOffset, SWalCkHea code = -1; goto END; } - if(isValValidForTable(pHandle, pHead)){ + if (isValValidForTable(pHandle, pHead)) { *fetchOffset = offset; code = 0; goto END; @@ -241,7 +240,7 @@ int64_t tqFetchLog(STQ* pTq, STqHandle* pHandle, int64_t* fetchOffset, SWalCkHea offset++; } } - END: +END: taosThreadMutexUnlock(&pHandle->pWalReader->mutex); return code; } @@ -348,7 +347,7 @@ int32_t tqNextBlock(STqReader* pReader, SFetchRet* ret) { } } -int32_t tqReaderSetDataMsg(STqReader* pReader, SSubmitReq* pMsg, int64_t ver) { +int32_t tqReaderSetDataMsg(STqReader* pReader, const SSubmitReq* pMsg, int64_t ver) { pReader->pMsg = pMsg; if (tInitSubmitMsgIter(pMsg, &pReader->msgIter) < 0) return -1; diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index 6e9eba306a..b62a4dfbdc 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -808,7 +808,6 @@ static int32_t vnodeProcessSubmitReq(SVnode *pVnode, int64_t version, void *pReq SSubmitRsp submitRsp = {0}; SSubmitMsgIter msgIter = {0}; SSubmitBlk *pBlock; - SSubmitRsp rsp = {0}; SVCreateTbReq createTbReq = {0}; SDecoder decoder = {0}; int32_t nRows; @@ -921,7 +920,8 @@ static int32_t vnodeProcessSubmitReq(SVnode *pVnode, int64_t version, void *pReq } if (taosArrayGetSize(newTbUids) > 0) { - vDebug("vgId:%d, add %d table into query table list in handling submit", TD_VID(pVnode), (int32_t)taosArrayGetSize(newTbUids)); + vDebug("vgId:%d, add %d table into query table list in handling submit", TD_VID(pVnode), + (int32_t)taosArrayGetSize(newTbUids)); } tqUpdateTbUidList(pVnode->pTq, newTbUids, true); diff --git a/source/libs/executor/inc/executorimpl.h b/source/libs/executor/inc/executorimpl.h index dc98b05479..f47855c2d0 100644 --- a/source/libs/executor/inc/executorimpl.h +++ b/source/libs/executor/inc/executorimpl.h @@ -145,6 +145,7 @@ typedef struct { SMqMetaRsp metaRsp; // for tmq fetching meta int8_t returned; int64_t snapshotVer; + const SSubmitReq* pReq; SSchemaWrapper* schema; char tbName[TSDB_TABLE_NAME_LEN]; diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c index 373cb451f4..4db9338bd9 100644 --- a/source/libs/executor/src/executor.c +++ b/source/libs/executor/src/executor.c @@ -486,7 +486,7 @@ int32_t qExecTaskOpt(qTaskInfo_t tinfo, SArray* pResList, uint64_t* useconds, SL if (pLocal) { memcpy(&pTaskInfo->localFetch, pLocal, sizeof(*pLocal)); } - + taosArrayClearEx(pResList, freeBlock); int64_t curOwner = 0; @@ -773,6 +773,14 @@ int32_t initQueryTableDataCondForTmq(SQueryTableDataCond* pCond, SSnapContext* s return TSDB_CODE_SUCCESS; } +int32_t qStreamScanMemData(qTaskInfo_t tinfo, const SSubmitReq* pReq) { + SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo; + ASSERT(pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE); + ASSERT(pTaskInfo->streamInfo.pReq == NULL); + pTaskInfo->streamInfo.pReq = pReq; + return 0; +} + int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subType) { SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo; SOperatorInfo* pOperator = pTaskInfo->pRoot; diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 6c5c33ae29..5f54d56ca7 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -1430,6 +1430,41 @@ static SSDataBlock* doQueueScan(SOperatorInfo* pOperator) { SStreamScanInfo* pInfo = pOperator->info; qDebug("queue scan called"); + + if (pTaskInfo->streamInfo.pReq != NULL) { + if (pInfo->tqReader->pMsg == NULL) { + pInfo->tqReader->pMsg = pTaskInfo->streamInfo.pReq; + const SSubmitReq* pSubmit = pInfo->tqReader->pMsg; + if (tqReaderSetDataMsg(pInfo->tqReader, pSubmit, 0) < 0) { + qError("submit msg messed up when initing stream submit block %p", pSubmit); + pInfo->tqReader->pMsg = NULL; + ASSERT(0); + } + } + + blockDataCleanup(pInfo->pRes); + SDataBlockInfo* pBlockInfo = &pInfo->pRes->info; + + while (tqNextDataBlock(pInfo->tqReader)) { + SSDataBlock block = {0}; + + int32_t code = tqRetrieveDataBlock(&block, pInfo->tqReader); + + if (code != TSDB_CODE_SUCCESS || block.info.rows == 0) { + continue; + } + + setBlockIntoRes(pInfo, &block); + + if (pBlockInfo->rows > 0) { + return pInfo->pRes; + } + } + + pInfo->tqReader->pMsg = NULL; + pTaskInfo->streamInfo.pReq = NULL; + } + if (pTaskInfo->streamInfo.prepareStatus.type == TMQ_OFFSET__SNAPSHOT_DATA) { SSDataBlock* pResult = doTableScan(pInfo->pTableScanOp); if (pResult && pResult->info.rows > 0) { From 01c94a775b6779e501454cddef459cc958c12a62 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Wed, 28 Sep 2022 14:17:26 +0800 Subject: [PATCH 02/40] feat(tmq): push optimization --- source/client/src/clientTmq.c | 18 +++++++++--------- source/dnode/mnode/impl/src/mndConsumer.c | 1 + source/dnode/mnode/impl/src/mndTopic.c | 2 ++ source/dnode/vnode/src/tq/tq.c | 8 +++++++- source/dnode/vnode/src/tq/tqPush.c | 12 ++++++------ source/libs/executor/src/projectoperator.c | 10 +++++++--- source/libs/executor/src/scanoperator.c | 2 ++ 7 files changed, 34 insertions(+), 19 deletions(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index c9c02a77e1..e0f48a4534 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -515,7 +515,7 @@ int32_t tmqCommitMsgImpl(tmq_t* tmq, const TAOS_RES* msg, int8_t async, tmq_comm SMqMetaRspObj* pMetaRspObj = (SMqMetaRspObj*)msg; topic = pMetaRspObj->topic; vgId = pMetaRspObj->vgId; - } else if(TD_RES_TMQ_METADATA(msg)) { + } else if (TD_RES_TMQ_METADATA(msg)) { SMqTaosxRspObj* pRspObj = (SMqTaosxRspObj*)msg; topic = pRspObj->topic; vgId = pRspObj->vgId; @@ -715,7 +715,7 @@ void tmqSendHbReq(void* param, void* tmrId) { int32_t epoch = tmq->epoch; SMqHbReq* pReq = taosMemoryMalloc(sizeof(SMqHbReq)); if (pReq == NULL) goto OVER; - pReq->consumerId = consumerId; + pReq->consumerId = htobe64(consumerId); pReq->epoch = epoch; SMsgSendInfo* sendInfo = taosMemoryCalloc(1, sizeof(SMsgSendInfo)); @@ -1661,9 +1661,9 @@ void* tmqHandleAllRsp(tmq_t* tmq, int64_t timeout, bool pollIfReset) { // build rsp void* pRsp = NULL; - if(pollRspWrapper->taosxRsp.createTableNum == 0){ + if (pollRspWrapper->taosxRsp.createTableNum == 0) { pRsp = tmqBuildRspFromWrapper(pollRspWrapper); - }else{ + } else { pRsp = tmqBuildTaosxRspFromWrapper(pollRspWrapper); } taosFreeQitem(pollRspWrapper); @@ -1850,12 +1850,12 @@ const char* tmq_get_table_name(TAOS_RES* res) { return (const char*)taosArrayGetP(pRspObj->rsp.blockTbName, pRspObj->resIter); } else if (TD_RES_TMQ_METADATA(res)) { SMqTaosxRspObj* pRspObj = (SMqTaosxRspObj*)res; - if (!pRspObj->rsp.withTbName || pRspObj->rsp.blockTbName == NULL || pRspObj->resIter < 0 || - pRspObj->resIter >= pRspObj->rsp.blockNum) { - return NULL; - } - return (const char*)taosArrayGetP(pRspObj->rsp.blockTbName, pRspObj->resIter); + if (!pRspObj->rsp.withTbName || pRspObj->rsp.blockTbName == NULL || pRspObj->resIter < 0 || + pRspObj->resIter >= pRspObj->rsp.blockNum) { + return NULL; } + return (const char*)taosArrayGetP(pRspObj->rsp.blockTbName, pRspObj->resIter); + } return NULL; } diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index abc23e3d95..3dfc10e554 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -272,6 +272,7 @@ static int32_t mndProcessMqHbReq(SRpcMsg *pMsg) { SMqConsumerObj *pConsumer = mndAcquireConsumer(pMnode, consumerId); if (pConsumer == NULL) { + mError("consumer %ld not exist", consumerId); terrno = TSDB_CODE_MND_CONSUMER_NOT_EXIST; return -1; } diff --git a/source/dnode/mnode/impl/src/mndTopic.c b/source/dnode/mnode/impl/src/mndTopic.c index b9647a28fb..7308dc375e 100644 --- a/source/dnode/mnode/impl/src/mndTopic.c +++ b/source/dnode/mnode/impl/src/mndTopic.c @@ -379,6 +379,8 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq * topicObj.ast = strdup(pCreate->ast); topicObj.astLen = strlen(pCreate->ast) + 1; + qDebugL("ast %s", topicObj.ast); + SNode *pAst = NULL; if (nodesStringToNode(pCreate->ast, &pAst) != 0) { taosMemoryFree(topicObj.ast); diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 21136405cb..490a313cd4 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -65,6 +65,11 @@ static void destroySTqHandle(void* data) { } } +static void tqPushEntryFree(void* data) { + void* p = *(void**)data; + taosMemoryFree(p); +} + STQ* tqOpen(const char* path, SVnode* pVnode) { STQ* pTq = taosMemoryCalloc(1, sizeof(STQ)); if (pTq == NULL) { @@ -80,7 +85,7 @@ STQ* tqOpen(const char* path, SVnode* pVnode) { taosInitRWLatch(&pTq->pushLock); pTq->pPushMgr = taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), true, HASH_NO_LOCK); - taosHashSetFreeFp(pTq->pPushMgr, taosMemoryFree); + taosHashSetFreeFp(pTq->pPushMgr, tqPushEntryFree); pTq->pCheckInfo = taosHashInit(64, MurmurHash3_32, true, HASH_ENTRY_LOCK); @@ -548,6 +553,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) { if (pPushEntry != NULL) { pPushEntry->pHandle = pHandle; pPushEntry->pInfo = pMsg->info; + dataRsp.withTbName = 0; memcpy(&pPushEntry->dataRsp, &dataRsp, sizeof(SMqDataRsp)); pPushEntry->rspHead.consumerId = consumerId; pPushEntry->rspHead.epoch = reqEpoch; diff --git a/source/dnode/vnode/src/tq/tqPush.c b/source/dnode/vnode/src/tq/tqPush.c index c42cfeb7b8..13ed36e2bc 100644 --- a/source/dnode/vnode/src/tq/tqPush.c +++ b/source/dnode/vnode/src/tq/tqPush.c @@ -245,7 +245,7 @@ int tqPushMsg(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_t ver) while (1) { SSDataBlock* pDataBlock = NULL; uint64_t ts = 0; - if (qExecTask(task, NULL, &ts) < 0) { + if (qExecTask(task, &pDataBlock, &ts) < 0) { ASSERT(0); } @@ -256,21 +256,19 @@ int tqPushMsg(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_t ver) tqAddBlockDataToRsp(pDataBlock, pRsp, pExec->numOfCols); pRsp->blockNum++; } + if (pRsp->blockNum > 0) { // set offset tqOffsetResetToLog(&pRsp->rspOffset, ver); // remove from hash size_t kLen; - void* key = taosHashGetKey(pPushEntry, &kLen); + void* key = taosHashGetKey(pIter, &kLen); void* keyCopy = taosMemoryMalloc(kLen); memcpy(keyCopy, key, kLen); taosArrayPush(cachedKeys, &keyCopy); taosArrayPush(cachedKeyLens, &kLen); - if (taosHashRemove(pTq->pPushMgr, key, kLen) != 0) { - ASSERT(0); - } tqPushDataRsp(pTq, pPushEntry); } } @@ -278,7 +276,9 @@ int tqPushMsg(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_t ver) for (int32_t i = 0; i < taosArrayGetSize(cachedKeys); i++) { void* key = taosArrayGetP(cachedKeys, i); size_t kLen = *(size_t*)taosArrayGet(cachedKeyLens, i); - taosHashRemove(pTq->pPushMgr, key, kLen); + if (taosHashRemove(pTq->pPushMgr, key, kLen) != 0) { + ASSERT(0); + } } taosArrayDestroyP(cachedKeys, (FDelete)taosMemoryFree); taosArrayDestroy(cachedKeyLens); diff --git a/source/libs/executor/src/projectoperator.c b/source/libs/executor/src/projectoperator.c index 2f12a0d19b..b7c5b5634e 100644 --- a/source/libs/executor/src/projectoperator.c +++ b/source/libs/executor/src/projectoperator.c @@ -53,7 +53,7 @@ static void destroyIndefinitOperatorInfo(void* param) { SOperatorInfo* createProjectOperatorInfo(SOperatorInfo* downstream, SProjectPhysiNode* pProjPhyNode, SExecTaskInfo* pTaskInfo) { - int32_t code = TSDB_CODE_SUCCESS; + int32_t code = TSDB_CODE_SUCCESS; SProjectOperatorInfo* pInfo = taosMemoryCalloc(1, sizeof(SProjectOperatorInfo)); SOperatorInfo* pOperator = taosMemoryCalloc(1, sizeof(SOperatorInfo)); if (pInfo == NULL || pOperator == NULL) { @@ -184,7 +184,7 @@ static int32_t doIngroupLimitOffset(SLimitInfo* pLimitInfo, uint64_t groupId, SS if (pLimitInfo->limit.limit >= 0 && pLimitInfo->numOfOutputRows + pBlock->info.rows >= pLimitInfo->limit.limit) { int32_t keepRows = (int32_t)(pLimitInfo->limit.limit - pLimitInfo->numOfOutputRows); blockDataKeepFirstNRows(pBlock, keepRows); - //TODO: optimize it later when partition by + limit + // TODO: optimize it later when partition by + limit if ((pLimitInfo->slimit.limit == -1 && pLimitInfo->currentGroupId == 0) || (pLimitInfo->slimit.limit > 0 && pLimitInfo->slimit.limit <= pLimitInfo->numOfOutputGroups)) { doSetOperatorCompleted(pOperator); @@ -206,6 +206,10 @@ SSDataBlock* doProjectOperation(SOperatorInfo* pOperator) { blockDataCleanup(pFinalRes); SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; + if (pTaskInfo->streamInfo.pReq) { + pOperator->status = OP_OPENED; + } + if (pOperator->status == OP_EXEC_DONE) { if (pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE) { pOperator->status = OP_OPENED; @@ -254,7 +258,7 @@ SSDataBlock* doProjectOperation(SOperatorInfo* pOperator) { } setInfoForNewGroup(pBlock, pLimitInfo, pOperator); - if (pOperator->status == OP_EXEC_DONE) { + if (pTaskInfo->execModel == OPTR_EXEC_MODEL_BATCH && pOperator->status == OP_EXEC_DONE) { break; } diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index fa05608ced..46280295b9 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -1443,6 +1443,7 @@ static SSDataBlock* doQueueScan(SOperatorInfo* pOperator) { if (tqReaderSetDataMsg(pInfo->tqReader, pSubmit, 0) < 0) { qError("submit msg messed up when initing stream submit block %p", pSubmit); pInfo->tqReader->pMsg = NULL; + pTaskInfo->streamInfo.pReq = NULL; ASSERT(0); } } @@ -1468,6 +1469,7 @@ static SSDataBlock* doQueueScan(SOperatorInfo* pOperator) { pInfo->tqReader->pMsg = NULL; pTaskInfo->streamInfo.pReq = NULL; + return NULL; } if (pTaskInfo->streamInfo.prepareStatus.type == TMQ_OFFSET__SNAPSHOT_DATA) { From 99bc329384916e0597c2ec743a7b904b0b83ff13 Mon Sep 17 00:00:00 2001 From: slzhou Date: Wed, 28 Sep 2022 16:30:40 +0800 Subject: [PATCH 03/40] enhance: optimize select from ins_tags where table_name='tablename' without iterating through meta tdb --- source/dnode/vnode/inc/vnode.h | 1 + source/dnode/vnode/src/inc/vnodeInt.h | 1 - source/libs/executor/src/scanoperator.c | 290 +++++++++++++++--------- 3 files changed, 184 insertions(+), 108 deletions(-) diff --git a/source/dnode/vnode/inc/vnode.h b/source/dnode/vnode/inc/vnode.h index 6ba10641f5..69b3652b50 100644 --- a/source/dnode/vnode/inc/vnode.h +++ b/source/dnode/vnode/inc/vnode.h @@ -92,6 +92,7 @@ typedef struct SMetaEntry SMetaEntry; void metaReaderInit(SMetaReader *pReader, SMeta *pMeta, int32_t flags); void metaReaderClear(SMetaReader *pReader); int32_t metaGetTableEntryByUid(SMetaReader *pReader, tb_uid_t uid); +int metaGetTableEntryByName(SMetaReader *pReader, const char *name); int32_t metaGetTableTags(SMeta *pMeta, uint64_t suid, SArray *uidList, SHashObj *tags); int32_t metaReadNext(SMetaReader *pReader); const void *metaGetTableTagVal(void *tag, int16_t type, STagVal *tagVal); diff --git a/source/dnode/vnode/src/inc/vnodeInt.h b/source/dnode/vnode/src/inc/vnodeInt.h index 4c8045d651..079efd7097 100644 --- a/source/dnode/vnode/src/inc/vnodeInt.h +++ b/source/dnode/vnode/src/inc/vnodeInt.h @@ -110,7 +110,6 @@ int metaAlterTable(SMeta* pMeta, int64_t version, SVAlterTbReq* pReq SSchemaWrapper* metaGetTableSchema(SMeta* pMeta, tb_uid_t uid, int32_t sver, bool isinline); STSchema* metaGetTbTSchema(SMeta* pMeta, tb_uid_t uid, int32_t sver); int32_t metaGetTbTSchemaEx(SMeta* pMeta, tb_uid_t suid, tb_uid_t uid, int32_t sver, STSchema** ppTSchema); -int metaGetTableEntryByName(SMetaReader* pReader, const char* name); tb_uid_t metaGetTableEntryUidByName(SMeta* pMeta, const char* name); int64_t metaGetTbNum(SMeta* pMeta); int64_t metaGetTimeSeriesNum(SMeta* pMeta); diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 6c5c33ae29..de3e66bf65 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -41,7 +41,12 @@ static int32_t buildDbTableInfoBlock(bool sysInfo, const SSDataBlock* p, const S static bool processBlockWithProbability(const SSampleExecInfo* pInfo); -bool processBlockWithProbability(const SSampleExecInfo* pInfo) { +static int32_t sysTableUserTagsFillOneTableTags(const SSysTableScanInfo* pInfo, SMetaReader* smr, const char* dbname, + const char* tableName, int32_t* pNumOfRows, + const SSDataBlock* dataBlock); + +static void relocateAndFilterSysTagsScanResult(SSysTableScanInfo* pInfo, int32_t numOfRows, SSDataBlock* dataBlock); +bool processBlockWithProbability(const SSampleExecInfo* pInfo) { #if 0 if (pInfo->sampleRatio == 1) { return true; @@ -2330,6 +2335,47 @@ int32_t convertTagDataToStr(char* str, int type, void* buf, int32_t bufSize, int return TSDB_CODE_SUCCESS; } +static bool sysTableIsOperatorCondOnOneTable(SNode* pCond, char* condTable) { + SOperatorNode* node = (SOperatorNode*)pCond; + if (node->opType == OP_TYPE_EQUAL) { + if (nodeType(node->pLeft) == QUERY_NODE_COLUMN && + strcasecmp(nodesGetNameFromColumnNode(node->pLeft), "table_name") == 0 && + nodeType(node->pRight) == QUERY_NODE_VALUE) { + SValueNode* pValue = (SValueNode*)node->pRight; + if (pValue->node.type == TSDB_DATA_TYPE_NCHAR || pValue->node.type == TSDB_DATA_TYPE_VARCHAR || + pValue->node.type == TSDB_DATA_TYPE_BINARY) { + char* value = nodesGetStrValueFromNode(pValue); + strncpy(condTable, value, TSDB_TABLE_NAME_LEN); + taosMemoryFree(value); + return true; + } + } + } + return false; +} + +static bool sysTableIsCondOnOneTable(SNode* pCond, char* condTable) { + if (nodeType(pCond) == QUERY_NODE_LOGIC_CONDITION) { + SLogicConditionNode* node = (SLogicConditionNode*)pCond; + if (LOGIC_COND_TYPE_AND == node->condType) { + SListCell* cell = node->pParameterList->pHead; + for (int32_t i = 0; i < node->pParameterList->length; ++i) { + SNode* pChild = cell->pNode; + if (QUERY_NODE_OPERATOR == nodeType(pChild)) { + if (sysTableIsOperatorCondOnOneTable(pChild, condTable)) { + return true; + } + } + cell = cell->pNext; + } + } + } + if (QUERY_NODE_OPERATOR == nodeType(pCond)) { + return sysTableIsOperatorCondOnOneTable(pCond, condTable); + } + return false; +} + static SSDataBlock* sysTableScanUserTags(SOperatorInfo* pOperator) { SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; SSysTableScanInfo* pInfo = pOperator->info; @@ -2337,13 +2383,12 @@ static SSDataBlock* sysTableScanUserTags(SOperatorInfo* pOperator) { return NULL; } - if (pInfo->pCur == NULL) { - pInfo->pCur = metaOpenTbCursor(pInfo->readHandle.meta); - } - blockDataCleanup(pInfo->pRes); int32_t numOfRows = 0; + SSDataBlock* dataBlock = buildInfoSchemaTableMetaBlock(TSDB_INS_TABLE_TAGS); + blockDataEnsureCapacity(dataBlock, pOperator->resultInfo.capacity); + const char* db = NULL; int32_t vgId = 0; vnodeGetInfo(pInfo->readHandle.vnode, &db, &vgId); @@ -2355,10 +2400,32 @@ static SSDataBlock* sysTableScanUserTags(SOperatorInfo* pOperator) { tNameGetDbName(&sn, varDataVal(dbname)); varDataSetLen(dbname, strlen(varDataVal(dbname))); - SSDataBlock* p = buildInfoSchemaTableMetaBlock(TSDB_INS_TABLE_TAGS); - blockDataEnsureCapacity(p, pOperator->resultInfo.capacity); + char condTableName[TSDB_TABLE_NAME_LEN] = {0}; + // optimize when sql like where table_name='tablename' and xxx. + if (sysTableIsCondOnOneTable(pInfo->pCondition, condTableName)) { + char tableName[TSDB_TABLE_NAME_LEN + VARSTR_HEADER_SIZE] = {0}; + STR_TO_VARSTR(tableName, condTableName); + + SMetaReader smr = {0}; + metaReaderInit(&smr, pInfo->readHandle.meta, 0); + metaGetTableEntryByName(&smr, condTableName); + sysTableUserTagsFillOneTableTags(pInfo, &smr, dbname, tableName, &numOfRows, dataBlock); + metaReaderClear(&smr); + if (numOfRows > 0) { + relocateAndFilterSysTagsScanResult(pInfo, numOfRows, dataBlock); + numOfRows = 0; + } + blockDataDestroy(dataBlock); + + pInfo->loadInfo.totalRows += pInfo->pRes->info.rows; + return (pInfo->pRes->info.rows == 0) ? NULL : pInfo->pRes; + } int32_t ret = 0; + if (pInfo->pCur == NULL) { + pInfo->pCur = metaOpenTbCursor(pInfo->readHandle.meta); + } + while ((ret = metaTbCursorNext(pInfo->pCur)) == 0) { if (pInfo->pCur->mr.me.type != TSDB_CHILD_TABLE) { continue; @@ -2381,100 +2448,12 @@ static SSDataBlock* sysTableScanUserTags(SOperatorInfo* pOperator) { T_LONG_JMP(pTaskInfo->env, terrno); } - char stableName[TSDB_TABLE_NAME_LEN + VARSTR_HEADER_SIZE] = {0}; - STR_TO_VARSTR(stableName, smr.me.name); + sysTableUserTagsFillOneTableTags(pInfo, &smr, dbname, tableName, &numOfRows, dataBlock); - int32_t numOfTags = smr.me.stbEntry.schemaTag.nCols; - for (int32_t i = 0; i < numOfTags; ++i) { - SColumnInfoData* pColInfoData = NULL; - - // table name - pColInfoData = taosArrayGet(p->pDataBlock, 0); - colDataAppend(pColInfoData, numOfRows, tableName, false); - - // database name - pColInfoData = taosArrayGet(p->pDataBlock, 1); - colDataAppend(pColInfoData, numOfRows, dbname, false); - - // super table name - pColInfoData = taosArrayGet(p->pDataBlock, 2); - colDataAppend(pColInfoData, numOfRows, stableName, false); - - // tag name - char tagName[TSDB_COL_NAME_LEN + VARSTR_HEADER_SIZE] = {0}; - STR_TO_VARSTR(tagName, smr.me.stbEntry.schemaTag.pSchema[i].name); - pColInfoData = taosArrayGet(p->pDataBlock, 3); - colDataAppend(pColInfoData, numOfRows, tagName, false); - - // tag type - int8_t tagType = smr.me.stbEntry.schemaTag.pSchema[i].type; - pColInfoData = taosArrayGet(p->pDataBlock, 4); - char tagTypeStr[VARSTR_HEADER_SIZE + 32]; - int tagTypeLen = sprintf(varDataVal(tagTypeStr), "%s", tDataTypes[tagType].name); - if (tagType == TSDB_DATA_TYPE_VARCHAR) { - tagTypeLen += sprintf(varDataVal(tagTypeStr) + tagTypeLen, "(%d)", - (int32_t)(smr.me.stbEntry.schemaTag.pSchema[i].bytes - VARSTR_HEADER_SIZE)); - } else if (tagType == TSDB_DATA_TYPE_NCHAR) { - tagTypeLen += - sprintf(varDataVal(tagTypeStr) + tagTypeLen, "(%d)", - (int32_t)((smr.me.stbEntry.schemaTag.pSchema[i].bytes - VARSTR_HEADER_SIZE) / TSDB_NCHAR_SIZE)); - } - varDataSetLen(tagTypeStr, tagTypeLen); - colDataAppend(pColInfoData, numOfRows, (char*)tagTypeStr, false); - - STagVal tagVal = {0}; - tagVal.cid = smr.me.stbEntry.schemaTag.pSchema[i].colId; - char* tagData = NULL; - uint32_t tagLen = 0; - - if (tagType == TSDB_DATA_TYPE_JSON) { - tagData = (char*)pInfo->pCur->mr.me.ctbEntry.pTags; - } else { - bool exist = tTagGet((STag*)pInfo->pCur->mr.me.ctbEntry.pTags, &tagVal); - if (exist) { - if (IS_VAR_DATA_TYPE(tagType)) { - tagData = (char*)tagVal.pData; - tagLen = tagVal.nData; - } else { - tagData = (char*)&tagVal.i64; - tagLen = tDataTypes[tagType].bytes; - } - } - } - - char* tagVarChar = NULL; - if (tagData != NULL) { - if (tagType == TSDB_DATA_TYPE_JSON) { - char* tagJson = parseTagDatatoJson(tagData); - tagVarChar = taosMemoryMalloc(strlen(tagJson) + VARSTR_HEADER_SIZE); - memcpy(varDataVal(tagVarChar), tagJson, strlen(tagJson)); - varDataSetLen(tagVarChar, strlen(tagJson)); - taosMemoryFree(tagJson); - } else { - int32_t bufSize = IS_VAR_DATA_TYPE(tagType) ? (tagLen + VARSTR_HEADER_SIZE) - : (3 + DBL_MANT_DIG - DBL_MIN_EXP + VARSTR_HEADER_SIZE); - tagVarChar = taosMemoryMalloc(bufSize); - int32_t len = -1; - convertTagDataToStr(varDataVal(tagVarChar), tagType, tagData, tagLen, &len); - varDataSetLen(tagVarChar, len); - } - } - pColInfoData = taosArrayGet(p->pDataBlock, 5); - colDataAppend(pColInfoData, numOfRows, tagVarChar, - (tagData == NULL) || (tagType == TSDB_DATA_TYPE_JSON && tTagIsJsonNull(tagData))); - taosMemoryFree(tagVarChar); - ++numOfRows; - } metaReaderClear(&smr); if (numOfRows >= pOperator->resultInfo.capacity) { - p->info.rows = numOfRows; - pInfo->pRes->info.rows = numOfRows; - - relocateColumnData(pInfo->pRes, pInfo->scanCols, p->pDataBlock, false); - doFilterResult(pInfo); - - blockDataCleanup(p); + relocateAndFilterSysTagsScanResult(pInfo, numOfRows, dataBlock); numOfRows = 0; if (pInfo->pRes->info.rows > 0) { @@ -2484,19 +2463,11 @@ static SSDataBlock* sysTableScanUserTags(SOperatorInfo* pOperator) { } if (numOfRows > 0) { - p->info.rows = numOfRows; - pInfo->pRes->info.rows = numOfRows; - - relocateColumnData(pInfo->pRes, pInfo->scanCols, p->pDataBlock, false); - doFilterResult(pInfo); - - blockDataCleanup(p); + relocateAndFilterSysTagsScanResult(pInfo, numOfRows, dataBlock); numOfRows = 0; } - blockDataDestroy(p); - - // todo temporarily free the cursor here, the true reason why the free is not valid needs to be found + blockDataDestroy(dataBlock); if (ret != 0) { metaCloseTbCursor(pInfo->pCur); pInfo->pCur = NULL; @@ -2507,6 +2478,111 @@ static SSDataBlock* sysTableScanUserTags(SOperatorInfo* pOperator) { return (pInfo->pRes->info.rows == 0) ? NULL : pInfo->pRes; } +static void relocateAndFilterSysTagsScanResult(SSysTableScanInfo* pInfo, int32_t numOfRows, SSDataBlock* dataBlock) { + dataBlock->info.rows = numOfRows; + pInfo->pRes->info.rows = numOfRows; + + relocateColumnData(pInfo->pRes, pInfo->scanCols, dataBlock->pDataBlock, false); + doFilterResult(pInfo); + + blockDataCleanup(dataBlock); +} + +static int32_t sysTableUserTagsFillOneTableTags(const SSysTableScanInfo* pInfo, SMetaReader* smr, const char* dbname, + const char* tableName, int32_t* pNumOfRows, + const SSDataBlock* dataBlock) { + char stableName[TSDB_TABLE_NAME_LEN + VARSTR_HEADER_SIZE] = {0}; + STR_TO_VARSTR(stableName, (*smr).me.name); + + int32_t numOfRows = *pNumOfRows; + + int32_t numOfTags = (*smr).me.stbEntry.schemaTag.nCols; + for (int32_t i = 0; i < numOfTags; ++i) { + SColumnInfoData* pColInfoData = NULL; + + // table name + pColInfoData = taosArrayGet(dataBlock->pDataBlock, 0); + colDataAppend(pColInfoData, numOfRows, tableName, false); + + // database name + pColInfoData = taosArrayGet(dataBlock->pDataBlock, 1); + colDataAppend(pColInfoData, numOfRows, dbname, false); + + // super table name + pColInfoData = taosArrayGet(dataBlock->pDataBlock, 2); + colDataAppend(pColInfoData, numOfRows, stableName, false); + + // tag name + char tagName[TSDB_COL_NAME_LEN + VARSTR_HEADER_SIZE] = {0}; + STR_TO_VARSTR(tagName, (*smr).me.stbEntry.schemaTag.pSchema[i].name); + pColInfoData = taosArrayGet(dataBlock->pDataBlock, 3); + colDataAppend(pColInfoData, numOfRows, tagName, false); + + // tag type + int8_t tagType = (*smr).me.stbEntry.schemaTag.pSchema[i].type; + pColInfoData = taosArrayGet(dataBlock->pDataBlock, 4); + char tagTypeStr[VARSTR_HEADER_SIZE + 32]; + int tagTypeLen = sprintf(varDataVal(tagTypeStr), "%s", tDataTypes[tagType].name); + if (tagType == TSDB_DATA_TYPE_VARCHAR) { + tagTypeLen += sprintf(varDataVal(tagTypeStr) + tagTypeLen, "(%d)", + (int32_t)((*smr).me.stbEntry.schemaTag.pSchema[i].bytes - VARSTR_HEADER_SIZE)); + } else if (tagType == TSDB_DATA_TYPE_NCHAR) { + tagTypeLen += + sprintf(varDataVal(tagTypeStr) + tagTypeLen, "(%d)", + (int32_t)(((*smr).me.stbEntry.schemaTag.pSchema[i].bytes - VARSTR_HEADER_SIZE) / TSDB_NCHAR_SIZE)); + } + varDataSetLen(tagTypeStr, tagTypeLen); + colDataAppend(pColInfoData, numOfRows, (char*)tagTypeStr, false); + + STagVal tagVal = {0}; + tagVal.cid = (*smr).me.stbEntry.schemaTag.pSchema[i].colId; + char* tagData = NULL; + uint32_t tagLen = 0; + + if (tagType == TSDB_DATA_TYPE_JSON) { + tagData = (char*)pInfo->pCur->mr.me.ctbEntry.pTags; + } else { + bool exist = tTagGet((STag*)pInfo->pCur->mr.me.ctbEntry.pTags, &tagVal); + if (exist) { + if (IS_VAR_DATA_TYPE(tagType)) { + tagData = (char*)tagVal.pData; + tagLen = tagVal.nData; + } else { + tagData = (char*)&tagVal.i64; + tagLen = tDataTypes[tagType].bytes; + } + } + } + + char* tagVarChar = NULL; + if (tagData != NULL) { + if (tagType == TSDB_DATA_TYPE_JSON) { + char* tagJson = parseTagDatatoJson(tagData); + tagVarChar = taosMemoryMalloc(strlen(tagJson) + VARSTR_HEADER_SIZE); + memcpy(varDataVal(tagVarChar), tagJson, strlen(tagJson)); + varDataSetLen(tagVarChar, strlen(tagJson)); + taosMemoryFree(tagJson); + } else { + int32_t bufSize = IS_VAR_DATA_TYPE(tagType) ? (tagLen + VARSTR_HEADER_SIZE) + : (3 + DBL_MANT_DIG - DBL_MIN_EXP + VARSTR_HEADER_SIZE); + tagVarChar = taosMemoryMalloc(bufSize); + int32_t len = -1; + convertTagDataToStr(varDataVal(tagVarChar), tagType, tagData, tagLen, &len); + varDataSetLen(tagVarChar, len); + } + } + pColInfoData = taosArrayGet(dataBlock->pDataBlock, 5); + colDataAppend(pColInfoData, numOfRows, tagVarChar, + (tagData == NULL) || (tagType == TSDB_DATA_TYPE_JSON && tTagIsJsonNull(tagData))); + taosMemoryFree(tagVarChar); + ++numOfRows; + } + + *pNumOfRows = numOfRows; + + return TSDB_CODE_SUCCESS; +} + static SSDataBlock* sysTableScanUserTables(SOperatorInfo* pOperator) { SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; SSysTableScanInfo* pInfo = pOperator->info; From ed0d08192da06af1491c92a15fe7a40184dcf9d6 Mon Sep 17 00:00:00 2001 From: slzhou Date: Wed, 28 Sep 2022 16:39:06 +0800 Subject: [PATCH 04/40] fix: fix bugs of condition is null --- source/libs/executor/src/scanoperator.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index de3e66bf65..12b9a459f7 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -2355,24 +2355,25 @@ static bool sysTableIsOperatorCondOnOneTable(SNode* pCond, char* condTable) { } static bool sysTableIsCondOnOneTable(SNode* pCond, char* condTable) { + if (pCond == NULL) { + return false; + } if (nodeType(pCond) == QUERY_NODE_LOGIC_CONDITION) { SLogicConditionNode* node = (SLogicConditionNode*)pCond; if (LOGIC_COND_TYPE_AND == node->condType) { - SListCell* cell = node->pParameterList->pHead; - for (int32_t i = 0; i < node->pParameterList->length; ++i) { - SNode* pChild = cell->pNode; - if (QUERY_NODE_OPERATOR == nodeType(pChild)) { - if (sysTableIsOperatorCondOnOneTable(pChild, condTable)) { - return true; - } + SNode* pChild = NULL; + FOREACH(pChild, node->pParameterList) { + if (QUERY_NODE_OPERATOR == nodeType(pChild) && sysTableIsOperatorCondOnOneTable(pChild, condTable)) { + return true; } - cell = cell->pNext; } } } + if (QUERY_NODE_OPERATOR == nodeType(pCond)) { return sysTableIsOperatorCondOnOneTable(pCond, condTable); } + return false; } @@ -2401,8 +2402,8 @@ static SSDataBlock* sysTableScanUserTags(SOperatorInfo* pOperator) { varDataSetLen(dbname, strlen(varDataVal(dbname))); char condTableName[TSDB_TABLE_NAME_LEN] = {0}; - // optimize when sql like where table_name='tablename' and xxx. - if (sysTableIsCondOnOneTable(pInfo->pCondition, condTableName)) { + // optimize when sql like where table_name='tablename' and xxx. + if (pInfo->pCondition && sysTableIsCondOnOneTable(pInfo->pCondition, condTableName)) { char tableName[TSDB_TABLE_NAME_LEN + VARSTR_HEADER_SIZE] = {0}; STR_TO_VARSTR(tableName, condTableName); From 45fb658cec54b1c377c31d04fb70f90b98d5b9ee Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Wed, 28 Sep 2022 19:06:43 +0800 Subject: [PATCH 05/40] fix: fix rows missed in query result issue --- source/dnode/vnode/src/tsdb/tsdbRead.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c index 2ea6a57b9e..c3cb5f9eb8 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead.c @@ -486,7 +486,7 @@ static int32_t tsdbReaderCreate(SVnode* pVnode, SQueryTableDataCond* pCond, STsd pReader->pTsdb = getTsdbByRetentions(pVnode, pCond->twindows.skey, pVnode->config.tsdbCfg.retentions, idstr, &level); pReader->suid = pCond->suid; pReader->order = pCond->order; - pReader->capacity = 4096; + pReader->capacity = capacity; pReader->idStr = (idstr != NULL) ? strdup(idstr) : NULL; pReader->verRange = getQueryVerRange(pVnode, pCond, level); pReader->type = pCond->type; @@ -841,14 +841,18 @@ static int32_t copyBlockDataToSDataBlock(STsdbReader* pReader, STableBlockScanIn bool asc = ASCENDING_TRAVERSE(pReader->order); int32_t step = asc ? 1 : -1; - if (asc && pReader->window.skey <= pBlock->minKey.ts) { - pDumpInfo->rowIndex = 0; - } else if (!asc && pReader->window.ekey >= pBlock->maxKey.ts) { - pDumpInfo->rowIndex = pBlock->nRow - 1; - } else { - int32_t pos = asc ? pBlock->nRow - 1 : 0; - int32_t order = (pReader->order == TSDB_ORDER_ASC) ? TSDB_ORDER_DESC : TSDB_ORDER_ASC; - pDumpInfo->rowIndex = doBinarySearchKey(pBlockData->aTSKEY, pBlock->nRow, pos, pReader->window.skey, order); + + if ((pDumpInfo->rowIndex == 0 && asc) || (pDumpInfo->rowIndex == pBlock->nRow - 1 && (!asc))) { + if (asc && pReader->window.skey <= pBlock->minKey.ts) { + //pDumpInfo->rowIndex = 0; + } else + if (!asc && pReader->window.ekey >= pBlock->maxKey.ts) { + //pDumpInfo->rowIndex = pBlock->nRow - 1; + } else { + int32_t pos = asc ? pBlock->nRow - 1 : 0; + int32_t order = (pReader->order == TSDB_ORDER_ASC) ? TSDB_ORDER_DESC : TSDB_ORDER_ASC; + pDumpInfo->rowIndex = doBinarySearchKey(pBlockData->aTSKEY, pBlock->nRow, pos, pReader->window.skey, order); + } } // time window check @@ -932,8 +936,8 @@ static int32_t copyBlockDataToSDataBlock(STsdbReader* pReader, STableBlockScanIn pDumpInfo->rowIndex += step * remain; if (pDumpInfo->rowIndex >= 0 && pDumpInfo->rowIndex < pBlock->nRow) { - int64_t ts = pBlockData->aTSKEY[pDumpInfo->rowIndex]; - setBlockAllDumped(pDumpInfo, ts, pReader->order); +// int64_t ts = pBlockData->aTSKEY[pDumpInfo->rowIndex]; +// setBlockAllDumped(pDumpInfo, ts, pReader->order); } else { int64_t k = asc ? pBlock->maxKey.ts : pBlock->minKey.ts; setBlockAllDumped(pDumpInfo, k, pReader->order); From cde4085a6d43ea2825233244fbb8d6c2a41962b6 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Wed, 28 Sep 2022 20:24:02 +0800 Subject: [PATCH 06/40] optimize msg batch --- include/common/tcommon.h | 1 + source/client/src/clientTmq.c | 6 +++++- source/dnode/vnode/src/tq/tq.c | 3 +++ source/dnode/vnode/src/tq/tqPush.c | 4 ++++ source/dnode/vnode/src/tq/tqRead.c | 9 +++++++-- source/libs/executor/inc/executorimpl.h | 1 + source/libs/executor/src/projectoperator.c | 14 +++++++++++++- source/libs/executor/src/scanoperator.c | 10 ++++++---- 8 files changed, 40 insertions(+), 8 deletions(-) diff --git a/include/common/tcommon.h b/include/common/tcommon.h index 2544cedda7..2add3332ab 100644 --- a/include/common/tcommon.h +++ b/include/common/tcommon.h @@ -177,6 +177,7 @@ typedef struct SSDataBlock { enum { FETCH_TYPE__DATA = 1, FETCH_TYPE__META, + FETCH_TYPE__SEP, FETCH_TYPE__NONE, }; diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index e0f48a4534..66f992f05f 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1603,6 +1603,7 @@ void* tmqHandleAllRsp(tmq_t* tmq, int64_t timeout, bool pollIfReset) { return NULL; } else if (rspWrapper->tmqRspType == TMQ_MSG_TYPE__POLL_RSP) { SMqPollRspWrapper* pollRspWrapper = (SMqPollRspWrapper*)rspWrapper; + tscDebug("consumer %ld actual process poll rsp", tmq->consumerId); /*atomic_sub_fetch_32(&tmq->readyRequest, 1);*/ int32_t consumerEpoch = atomic_load_32(&tmq->epoch); if (pollRspWrapper->dataRsp.head.epoch == consumerEpoch) { @@ -1718,7 +1719,10 @@ TAOS_RES* tmq_consumer_poll(tmq_t* tmq, int64_t timeout) { while (1) { tmqHandleAllDelayedTask(tmq); - if (tmqPollImpl(tmq, timeout) < 0) return NULL; + if (tmqPollImpl(tmq, timeout) < 0) { + tscDebug("return since poll err"); + /*return NULL;*/ + } rspObj = tmqHandleAllRsp(tmq, timeout, false); if (rspObj) { diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 490a313cd4..070abadee2 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -420,6 +420,8 @@ static int32_t tqInitDataRsp(SMqDataRsp* pRsp, const SMqPollReq* pReq, int8_t su return -1; } + pRsp->withTbName = 0; +#if 0 pRsp->withTbName = pReq->withTbName; if (pRsp->withTbName) { pRsp->blockTbName = taosArrayInit(0, sizeof(void*)); @@ -428,6 +430,7 @@ static int32_t tqInitDataRsp(SMqDataRsp* pRsp, const SMqPollReq* pReq, int8_t su return -1; } } +#endif if (subType == TOPIC_SUB_TYPE__COLUMN) { pRsp->withSchema = false; diff --git a/source/dnode/vnode/src/tq/tqPush.c b/source/dnode/vnode/src/tq/tqPush.c index 13ed36e2bc..e7d6c1eb47 100644 --- a/source/dnode/vnode/src/tq/tqPush.c +++ b/source/dnode/vnode/src/tq/tqPush.c @@ -213,6 +213,8 @@ int32_t tqPushMsgNew(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_ #endif int tqPushMsg(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_t ver) { + tqDebug("vgId:%d tq push msg ver %ld", pTq->pVnode->config.vgId, ver); + if (msgType == TDMT_VND_SUBMIT) { // lock push mgr to avoid potential msg lost taosWLockLatch(&pTq->pushLock); @@ -257,6 +259,8 @@ int tqPushMsg(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_t ver) pRsp->blockNum++; } + tqDebug("vgId:%d tq handle push, subkey: %s, block num: %d", pTq->pVnode->config.vgId, + pPushEntry->pHandle->subKey, pRsp->blockNum); if (pRsp->blockNum > 0) { // set offset tqOffsetResetToLog(&pRsp->rspOffset, ver); diff --git a/source/dnode/vnode/src/tq/tqRead.c b/source/dnode/vnode/src/tq/tqRead.c index d93a8fe030..3bd31e6660 100644 --- a/source/dnode/vnode/src/tq/tqRead.c +++ b/source/dnode/vnode/src/tq/tqRead.c @@ -314,14 +314,18 @@ int32_t tqNextBlock(STqReader* pReader, SFetchRet* ret) { return -1; } void* body = pReader->pWalReader->pHead->head.body; +#if 0 if (pReader->pWalReader->pHead->head.msgType != TDMT_VND_SUBMIT) { // TODO do filter ret->fetchType = FETCH_TYPE__META; ret->meta = pReader->pWalReader->pHead->head.body; return 0; } else { - tqReaderSetDataMsg(pReader, body, pReader->pWalReader->pHead->head.version); +#endif + tqReaderSetDataMsg(pReader, body, pReader->pWalReader->pHead->head.version); +#if 0 } +#endif } while (tqNextDataBlock(pReader)) { @@ -333,6 +337,7 @@ int32_t tqNextBlock(STqReader* pReader, SFetchRet* ret) { continue; } ret->fetchType = FETCH_TYPE__DATA; + tqDebug("return data rows %d", ret->data.info.rows); return 0; } @@ -340,7 +345,7 @@ int32_t tqNextBlock(STqReader* pReader, SFetchRet* ret) { ret->offset.type = TMQ_OFFSET__LOG; ret->offset.version = pReader->ver; ASSERT(pReader->ver >= 0); - ret->fetchType = FETCH_TYPE__NONE; + ret->fetchType = FETCH_TYPE__SEP; tqDebug("return offset %" PRId64 ", processed finish", ret->offset.version); return 0; } diff --git a/source/libs/executor/inc/executorimpl.h b/source/libs/executor/inc/executorimpl.h index 27760d7969..56470f0668 100644 --- a/source/libs/executor/inc/executorimpl.h +++ b/source/libs/executor/inc/executorimpl.h @@ -193,6 +193,7 @@ enum { OP_OPENED = 0x1, OP_RES_TO_RETURN = 0x5, OP_EXEC_DONE = 0x9, + OP_EXEC_RECV = 0x11, }; typedef struct SOperatorFpSet { diff --git a/source/libs/executor/src/projectoperator.c b/source/libs/executor/src/projectoperator.c index b7c5b5634e..8d40824cc4 100644 --- a/source/libs/executor/src/projectoperator.c +++ b/source/libs/executor/src/projectoperator.c @@ -241,9 +241,20 @@ SSDataBlock* doProjectOperation(SOperatorInfo* pOperator) { // The downstream exec may change the value of the newgroup, so use a local variable instead. SSDataBlock* pBlock = downstream->fpSet.getNextFn(downstream); if (pBlock == NULL) { + if (pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE && pOperator->status == OP_EXEC_RECV && + pFinalRes->info.rows == 0) { + pOperator->status = OP_OPENED; + continue; + } + qDebug("set op close, exec %d, status %d rows %d", pTaskInfo->execModel, pOperator->status, + pFinalRes->info.rows); doSetOperatorCompleted(pOperator); break; } + if (pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE) { + qDebug("set status recv"); + pOperator->status = OP_EXEC_RECV; + } // for stream interval if (pBlock->info.type == STREAM_RETRIEVE || pBlock->info.type == STREAM_DELETE_RESULT || @@ -258,7 +269,7 @@ SSDataBlock* doProjectOperation(SOperatorInfo* pOperator) { } setInfoForNewGroup(pBlock, pLimitInfo, pOperator); - if (pTaskInfo->execModel == OPTR_EXEC_MODEL_BATCH && pOperator->status == OP_EXEC_DONE) { + if (pOperator->status == OP_EXEC_DONE) { break; } @@ -302,6 +313,7 @@ SSDataBlock* doProjectOperation(SOperatorInfo* pOperator) { // when apply the limit/offset for each group, pRes->info.rows may be 0, due to limit constraint. if (pFinalRes->info.rows > 0 || (pOperator->status == OP_EXEC_DONE)) { + qDebug("project return %d rows, status %d", pFinalRes->info.rows, pOperator->status); break; } } else { diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 46280295b9..927ef2c64d 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -1504,8 +1504,8 @@ static SSDataBlock* doQueueScan(SOperatorInfo* pOperator) { if (setBlockIntoRes(pInfo, &ret.data) < 0) { ASSERT(0); } - // TODO clean data block if (pInfo->pRes->info.rows > 0) { + pOperator->status = OP_EXEC_RECV; qDebug("queue scan log return %d rows", pInfo->pRes->info.rows); return pInfo->pRes; } @@ -1514,18 +1514,19 @@ static SSDataBlock* doQueueScan(SOperatorInfo* pOperator) { // pTaskInfo->streamInfo.lastStatus = ret.offset; // pTaskInfo->streamInfo.metaBlk = ret.meta; // return NULL; - } else if (ret.fetchType == FETCH_TYPE__NONE) { + } else if (ret.fetchType == FETCH_TYPE__NONE || + (ret.fetchType == FETCH_TYPE__SEP && pOperator->status == OP_EXEC_RECV)) { pTaskInfo->streamInfo.lastStatus = ret.offset; ASSERT(pTaskInfo->streamInfo.lastStatus.version >= pTaskInfo->streamInfo.prepareStatus.version); ASSERT(pTaskInfo->streamInfo.lastStatus.version + 1 == pInfo->tqReader->pWalReader->curVersion); char formatBuf[80]; tFormatOffset(formatBuf, 80, &ret.offset); qDebug("queue scan log return null, offset %s", formatBuf); + pOperator->status = OP_OPENED; return NULL; - } else { - ASSERT(0); } } +#if 0 } else if (pTaskInfo->streamInfo.prepareStatus.type == TMQ_OFFSET__SNAPSHOT_DATA) { SSDataBlock* pResult = doTableScan(pInfo->pTableScanOp); if (pResult && pResult->info.rows > 0) { @@ -1534,6 +1535,7 @@ static SSDataBlock* doQueueScan(SOperatorInfo* pOperator) { } qDebug("stream scan tsdb return null"); return NULL; +#endif } else { ASSERT(0); return NULL; From fab0adde99fda3dbeb3a7eed1bdac2b8fa32825d Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Wed, 28 Sep 2022 21:44:37 +0800 Subject: [PATCH 07/40] fix memory error --- source/dnode/vnode/src/inc/tq.h | 2 +- source/dnode/vnode/src/tq/tq.c | 11 +++++++++-- source/dnode/vnode/src/tq/tqPush.c | 20 ++++++++++++++------ 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/source/dnode/vnode/src/inc/tq.h b/source/dnode/vnode/src/inc/tq.h index 04b0813445..f96afe6fba 100644 --- a/source/dnode/vnode/src/inc/tq.h +++ b/source/dnode/vnode/src/inc/tq.h @@ -116,7 +116,7 @@ typedef struct { typedef struct { SMqDataRsp dataRsp; SMqRspHead rspHead; - STqHandle* pHandle; + char subKey[TSDB_SUBSCRIBE_KEY_LEN]; SRpcHandleInfo pInfo; } STqPushEntry; diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 070abadee2..d0e7d2c766 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -554,8 +554,8 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) { if (dataRsp.blockNum == 0) { STqPushEntry* pPushEntry = taosMemoryCalloc(1, sizeof(STqPushEntry)); if (pPushEntry != NULL) { - pPushEntry->pHandle = pHandle; pPushEntry->pInfo = pMsg->info; + memcpy(pPushEntry->subKey, pHandle->subKey, TSDB_SUBSCRIBE_KEY_LEN); dataRsp.withTbName = 0; memcpy(&pPushEntry->dataRsp, &dataRsp, sizeof(SMqDataRsp)); pPushEntry->rspHead.consumerId = consumerId; @@ -704,7 +704,14 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) { int32_t tqProcessVgDeleteReq(STQ* pTq, int64_t version, char* msg, int32_t msgLen) { SMqVDeleteReq* pReq = (SMqVDeleteReq*)msg; - int32_t code = taosHashRemove(pTq->pHandle, pReq->subKey, strlen(pReq->subKey)); + taosWLockLatch(&pTq->pushLock); + int32_t code = taosHashRemove(pTq->pPushMgr, pReq->subKey, strlen(pReq->subKey)); + if (code != 0) { + tqDebug("vgId:%d, tq remove push handle %s", pTq->pVnode->config.vgId, pReq->subKey); + } + taosWUnLockLatch(&pTq->pushLock); + + code = taosHashRemove(pTq->pHandle, pReq->subKey, strlen(pReq->subKey)); if (code != 0) { tqError("cannot process tq delete req %s, since no such handle", pReq->subKey); } diff --git a/source/dnode/vnode/src/tq/tqPush.c b/source/dnode/vnode/src/tq/tqPush.c index e7d6c1eb47..4bd47f4e83 100644 --- a/source/dnode/vnode/src/tq/tqPush.c +++ b/source/dnode/vnode/src/tq/tqPush.c @@ -213,11 +213,12 @@ int32_t tqPushMsgNew(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_ #endif int tqPushMsg(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_t ver) { - tqDebug("vgId:%d tq push msg ver %ld", pTq->pVnode->config.vgId, ver); + tqDebug("vgId:%d tq push msg ver %ld, type: %s", pTq->pVnode->config.vgId, ver, TMSG_INFO(msgType)); if (msgType == TDMT_VND_SUBMIT) { // lock push mgr to avoid potential msg lost taosWLockLatch(&pTq->pushLock); + tqDebug("vgId:%d push handle num %d", pTq->pVnode->config.vgId, taosHashGetSize(pTq->pPushMgr)); if (taosHashGetSize(pTq->pPushMgr) != 0) { SArray* cachedKeys = taosArrayInit(0, sizeof(void*)); SArray* cachedKeyLens = taosArrayInit(0, sizeof(size_t)); @@ -235,10 +236,17 @@ int tqPushMsg(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_t ver) while (1) { pIter = taosHashIterate(pTq->pPushMgr, pIter); if (pIter == NULL) break; - STqPushEntry* pPushEntry = *(STqPushEntry**)pIter; - STqExecHandle* pExec = &pPushEntry->pHandle->execHandle; + STqPushEntry* pPushEntry = *(STqPushEntry**)pIter; + + STqHandle* pHandle = taosHashGet(pTq->pHandle, pPushEntry->subKey, strlen(pPushEntry->subKey)); + if (pHandle == NULL) { + tqDebug("vgId:%d cannot find handle %s", pTq->pVnode->config.vgId, pPushEntry->subKey); + continue; + } + STqExecHandle* pExec = &pHandle->execHandle; qTaskInfo_t task = pExec->task; - SMqDataRsp* pRsp = &pPushEntry->dataRsp; + + SMqDataRsp* pRsp = &pPushEntry->dataRsp; // prepare scan mem data qStreamScanMemData(task, pReq); @@ -259,8 +267,8 @@ int tqPushMsg(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_t ver) pRsp->blockNum++; } - tqDebug("vgId:%d tq handle push, subkey: %s, block num: %d", pTq->pVnode->config.vgId, - pPushEntry->pHandle->subKey, pRsp->blockNum); + tqDebug("vgId:%d tq handle push, subkey: %s, block num: %d", pTq->pVnode->config.vgId, pPushEntry->subKey, + pRsp->blockNum); if (pRsp->blockNum > 0) { // set offset tqOffsetResetToLog(&pRsp->rspOffset, ver); From b0a46942c2a61168aa8899c8ec62a5aaf67b18ad Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Wed, 28 Sep 2022 23:47:47 +0800 Subject: [PATCH 08/40] rsp to consumer if offset move forward --- source/dnode/vnode/src/tq/tq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index d0e7d2c766..b08d2d52e0 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -551,7 +551,8 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) { tqScanData(pTq, pHandle, &dataRsp, &fetchOffsetNew); #if 1 - if (dataRsp.blockNum == 0) { + if (dataRsp.blockNum == 0 && dataRsp.rspOffset.type == TMQ_OFFSET__LOG && + dataRsp.reqOffset.version == dataRsp.rspOffset.version) { STqPushEntry* pPushEntry = taosMemoryCalloc(1, sizeof(STqPushEntry)); if (pPushEntry != NULL) { pPushEntry->pInfo = pMsg->info; From a2a8fe02113e6c21f8848d99e529f2a769d85743 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Thu, 29 Sep 2022 01:06:42 +0800 Subject: [PATCH 09/40] rsp consumer when taosd stop --- source/dnode/vnode/src/tq/tq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index b08d2d52e0..e7eab7ab73 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -66,7 +66,7 @@ static void destroySTqHandle(void* data) { } static void tqPushEntryFree(void* data) { - void* p = *(void**)data; + STqPushEntry* p = *(void**)data; taosMemoryFree(p); } From 7aa2ffc4a8d7ac63a66ed8b99b843b35a9150244 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 29 Sep 2022 11:09:23 +0800 Subject: [PATCH 10/40] docs: remove influx_max_line_bytes for 3.0 (#17137) --- docs/en/14-reference/_telegraf.mdx | 1 - docs/en/25-application/01-telegraf.md | 1 - docs/zh/14-reference/_telegraf.mdx | 1 - docs/zh/25-application/01-telegraf.md | 1 - 4 files changed, 4 deletions(-) diff --git a/docs/en/14-reference/_telegraf.mdx b/docs/en/14-reference/_telegraf.mdx index e32fb25693..bcf1a0893f 100644 --- a/docs/en/14-reference/_telegraf.mdx +++ b/docs/en/14-reference/_telegraf.mdx @@ -22,5 +22,4 @@ An example is as follows. username = "root" password = "taosdata" data_format = "influx" - influx_max_line_bytes = 250 ``` diff --git a/docs/en/25-application/01-telegraf.md b/docs/en/25-application/01-telegraf.md index 59491152bc..f700326449 100644 --- a/docs/en/25-application/01-telegraf.md +++ b/docs/en/25-application/01-telegraf.md @@ -60,7 +60,6 @@ For the configuration method, add the following text to `/etc/telegraf/telegraf. username = "" password = "" data_format = "influx" - influx_max_line_bytes = 250 ``` Then restart telegraf: diff --git a/docs/zh/14-reference/_telegraf.mdx b/docs/zh/14-reference/_telegraf.mdx index bae46d6606..3f92e5dde0 100644 --- a/docs/zh/14-reference/_telegraf.mdx +++ b/docs/zh/14-reference/_telegraf.mdx @@ -22,6 +22,5 @@ username = "root" password = "taosdata" data_format = "influx" - influx_max_line_bytes = 250 ``` diff --git a/docs/zh/25-application/01-telegraf.md b/docs/zh/25-application/01-telegraf.md index 4e9597f964..6338264d17 100644 --- a/docs/zh/25-application/01-telegraf.md +++ b/docs/zh/25-application/01-telegraf.md @@ -61,7 +61,6 @@ IT 运维监测数据通常都是对时间特性比较敏感的数据,例如 username = "" password = "" data_format = "influx" - influx_max_line_bytes = 250 ``` 然后重启 Telegraf: From 5d0357fc4741c7665539a4a6d0e1a36e2db85013 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 29 Sep 2022 11:14:35 +0800 Subject: [PATCH 11/40] fix: very long string serialization problem --- source/libs/nodes/src/nodesMsgFuncs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/nodes/src/nodesMsgFuncs.c b/source/libs/nodes/src/nodesMsgFuncs.c index 8d1d332ac7..cdc4e66e42 100644 --- a/source/libs/nodes/src/nodesMsgFuncs.c +++ b/source/libs/nodes/src/nodesMsgFuncs.c @@ -90,12 +90,12 @@ static void endTlvEncode(STlvEncoder* pEncoder, char** pMsg, int32_t* pLen) { static int32_t tlvEncodeImpl(STlvEncoder* pEncoder, int16_t type, const void* pValue, int32_t len) { int32_t tlvLen = sizeof(STlv) + len; if (pEncoder->offset + tlvLen > pEncoder->allocSize) { - void* pNewBuf = taosMemoryRealloc(pEncoder->pBuf, pEncoder->allocSize * 2); + pEncoder->allocSize = TMAX(pEncoder->allocSize * 2, pEncoder->allocSize + pEncoder->offset + tlvLen); + void* pNewBuf = taosMemoryRealloc(pEncoder->pBuf, pEncoder->allocSize); if (NULL == pNewBuf) { return TSDB_CODE_OUT_OF_MEMORY; } pEncoder->pBuf = pNewBuf; - pEncoder->allocSize = pEncoder->allocSize * 2; } STlv* pTlv = (STlv*)(pEncoder->pBuf + pEncoder->offset); pTlv->type = htons(type); From 4c00225e9fe24c07f59048e7762fe7eb53d04753 Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Thu, 29 Sep 2022 11:26:58 +0800 Subject: [PATCH 12/40] fix: fix coverity scan issue in tudf.c and udfd.c --- source/libs/function/src/tudf.c | 2 ++ source/libs/function/src/udfd.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/libs/function/src/tudf.c b/source/libs/function/src/tudf.c index 62427e0488..060a92f864 100644 --- a/source/libs/function/src/tudf.c +++ b/source/libs/function/src/tudf.c @@ -1656,6 +1656,8 @@ int32_t doSetupUdf(char udfName[], UdfcFuncHandle *funcHandle) { int32_t errCode = udfcRunUdfUvTask(task, UV_TASK_CONNECT); if (errCode != 0) { fnError("failed to connect to pipe. udfName: %s, pipe: %s", udfName, (&gUdfdProxy)->udfdPipeName); + taosMemoryFree(task->session); + taosMemoryFree(task); return TSDB_CODE_UDF_PIPE_CONNECT_ERR; } diff --git a/source/libs/function/src/udfd.c b/source/libs/function/src/udfd.c index 636f006d6e..8ff0dc15a5 100644 --- a/source/libs/function/src/udfd.c +++ b/source/libs/function/src/udfd.c @@ -960,7 +960,7 @@ int32_t udfdInitResidentFuncs() { char* token; while ((token = strtok_r(pSave, ",", &pSave)) != NULL) { char func[TSDB_FUNC_NAME_LEN] = {0}; - strncpy(func, token, strlen(token)); + strncpy(func, token, sizeof(func)); taosArrayPush(global.residentFuncs, func); } From bb1165f1e95404b128e1f12692361aaa8107bd06 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Thu, 29 Sep 2022 12:14:41 +0800 Subject: [PATCH 13/40] optimize projection return --- source/dnode/vnode/src/tq/tq.c | 4 ++-- source/libs/executor/src/projectoperator.c | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index e7eab7ab73..ed5a894416 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -214,7 +214,7 @@ int32_t tqPushDataRsp(STQ* pTq, STqPushEntry* pPushEntry) { tFormatOffset(buf1, 80, &pRsp->reqOffset); tFormatOffset(buf2, 80, &pRsp->rspOffset); tqDebug("vgId:%d, from consumer:%" PRId64 ", (epoch %d) push rsp, block num: %d, reqOffset:%s, rspOffset:%s", - TD_VID(pTq->pVnode), pRsp->head.consumerId, pRsp->head.epoch, pRsp->blockNum, buf1, buf2); + TD_VID(pTq->pVnode), pPushEntry->rspHead.consumerId, pRsp->head.epoch, pRsp->blockNum, buf1, buf2); return 0; } @@ -551,7 +551,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) { tqScanData(pTq, pHandle, &dataRsp, &fetchOffsetNew); #if 1 - if (dataRsp.blockNum == 0 && dataRsp.rspOffset.type == TMQ_OFFSET__LOG && + if (dataRsp.blockNum == 0 && dataRsp.reqOffset.type == TMQ_OFFSET__LOG && dataRsp.reqOffset.version == dataRsp.rspOffset.version) { STqPushEntry* pPushEntry = taosMemoryCalloc(1, sizeof(STqPushEntry)); if (pPushEntry != NULL) { diff --git a/source/libs/executor/src/projectoperator.c b/source/libs/executor/src/projectoperator.c index 8d40824cc4..e9e6fed66a 100644 --- a/source/libs/executor/src/projectoperator.c +++ b/source/libs/executor/src/projectoperator.c @@ -210,9 +210,12 @@ SSDataBlock* doProjectOperation(SOperatorInfo* pOperator) { pOperator->status = OP_OPENED; } + qDebug("enter project"); + if (pOperator->status == OP_EXEC_DONE) { if (pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE) { pOperator->status = OP_OPENED; + qDebug("projection in queue model, set status open and return null"); return NULL; } @@ -241,10 +244,13 @@ SSDataBlock* doProjectOperation(SOperatorInfo* pOperator) { // The downstream exec may change the value of the newgroup, so use a local variable instead. SSDataBlock* pBlock = downstream->fpSet.getNextFn(downstream); if (pBlock == NULL) { - if (pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE && pOperator->status == OP_EXEC_RECV && - pFinalRes->info.rows == 0) { + if (pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE && pFinalRes->info.rows == 0) { pOperator->status = OP_OPENED; - continue; + if (pOperator->status == OP_EXEC_RECV) { + continue; + } else { + return NULL; + } } qDebug("set op close, exec %d, status %d rows %d", pTaskInfo->execModel, pOperator->status, pFinalRes->info.rows); From aaf325489be5b4386d749c06f3e90217a08ff259 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 29 Sep 2022 12:53:06 +0800 Subject: [PATCH 14/40] docs: remove influx_max_line_bytes for 3.0 (#17139) From 1d9ed1134f779dd6fa86265618625913eb61ea1e Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Thu, 29 Sep 2022 13:46:37 +0800 Subject: [PATCH 15/40] build: release ver-3.0.1.4 --- cmake/cmake.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/cmake.version b/cmake/cmake.version index 2d86335b3c..05094f10cc 100644 --- a/cmake/cmake.version +++ b/cmake/cmake.version @@ -2,7 +2,7 @@ IF (DEFINED VERNUMBER) SET(TD_VER_NUMBER ${VERNUMBER}) ELSE () - SET(TD_VER_NUMBER "3.0.1.3") + SET(TD_VER_NUMBER "3.0.1.4") ENDIF () IF (DEFINED VERCOMPATIBLE) From 0c48581c86b12ed56e5597165d4dc5d1b2db75c2 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Thu, 29 Sep 2022 13:52:09 +0800 Subject: [PATCH 16/40] check push ver --- source/dnode/vnode/src/tq/tqPush.c | 5 +++++ tests/script/jenkins/basic.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/tq/tqPush.c b/source/dnode/vnode/src/tq/tqPush.c index 4bd47f4e83..dcfb07f0ff 100644 --- a/source/dnode/vnode/src/tq/tqPush.c +++ b/source/dnode/vnode/src/tq/tqPush.c @@ -243,6 +243,11 @@ int tqPushMsg(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_t ver) tqDebug("vgId:%d cannot find handle %s", pTq->pVnode->config.vgId, pPushEntry->subKey); continue; } + if (pPushEntry->dataRsp.reqOffset.version > ver) { + tqDebug("vgId:%d push entry req version %ld, while push version %ld, skip", pTq->pVnode->config.vgId, + pPushEntry->dataRsp.reqOffset.version, ver); + continue; + } STqExecHandle* pExec = &pHandle->execHandle; qTaskInfo_t task = pExec->task; diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 161c878440..82f73a4fdd 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -303,7 +303,7 @@ ./test.sh -f tsim/insert/backquote.sim -m # unsupport ./test.sh -f tsim/parser/fourArithmetic-basic.sim -m ./test.sh -f tsim/query/interval-offset.sim -m -./test.sh -f tsim/tmq/basic3.sim -m +# unsupport ./test.sh -f tsim/tmq/basic3.sim -m ./test.sh -f tsim/stable/vnode3.sim -m ./test.sh -f tsim/qnode/basic1.sim -m # unsupport ./test.sh -f tsim/mnode/basic1.sim -m From b8c088b5f2156773e0e534014e1c73ed9e41aa3b Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Thu, 29 Sep 2022 13:59:37 +0800 Subject: [PATCH 17/40] temporarily disable node case --- tests/docs-examples-test/node.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/docs-examples-test/node.sh b/tests/docs-examples-test/node.sh index 0283904815..41acf7c7b4 100644 --- a/tests/docs-examples-test/node.sh +++ b/tests/docs-examples-test/node.sh @@ -23,7 +23,7 @@ node query_example.js node async_query_example.js -node subscribe_demo.js +# node subscribe_demo.js taos -s "drop topic if exists topic_name_example" taos -s "drop database if exists power" @@ -39,4 +39,4 @@ taos -s "drop database if exists test" node opentsdb_telnet_example.js taos -s "drop database if exists test" -node opentsdb_json_example.js \ No newline at end of file +node opentsdb_json_example.js From ee484470f3946ab9768759e217acb959979cfb8d Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 29 Sep 2022 14:13:44 +0800 Subject: [PATCH 18/40] fix: do not process query and fetch msg until vnode restore finished --- source/dnode/vnode/src/vnd/vnodeSync.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/vnd/vnodeSync.c b/source/dnode/vnode/src/vnd/vnodeSync.c index 2c3808a703..fe13ba303c 100644 --- a/source/dnode/vnode/src/vnd/vnodeSync.c +++ b/source/dnode/vnode/src/vnd/vnodeSync.c @@ -240,7 +240,7 @@ void vnodeProposeWriteMsg(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfMsgs) isWeak, isBlock, msg, numOfMsgs, arrayPos, pMsg->info.handle); if (!pVnode->restored) { - vGError("vgId:%d, msg:%p failed to process since not leader", vgId, pMsg); + vGError("vgId:%d, msg:%p failed to process since restore not finished", vgId, pMsg); terrno = TSDB_CODE_APP_NOT_READY; vnodeHandleProposeError(pVnode, pMsg, TSDB_CODE_APP_NOT_READY); rpcFreeCont(pMsg->pCont); @@ -805,6 +805,12 @@ bool vnodeIsReadyForRead(SVnode *pVnode) { return true; } + if (pVnode->restored) { + vDebug("vgId:%d, vnode not restore finished", pVnode->config.vgId); + terrno = TSDB_CODE_APP_NOT_READY; + return false; + } + vDebug("vgId:%d, vnode not ready for read, state:%s, last:%ld, cmt:%ld", pVnode->config.vgId, syncGetMyRoleStr(pVnode->sync), syncGetLastIndex(pVnode->sync), syncGetCommitIndex(pVnode->sync)); return false; From 4223be379a98facb73063daf4296d576db3fea7d Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 29 Sep 2022 14:15:26 +0800 Subject: [PATCH 19/40] fix: do not process query and fetch msg until vnode restore finished --- source/dnode/vnode/src/vnd/vnodeSync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/vnd/vnodeSync.c b/source/dnode/vnode/src/vnd/vnodeSync.c index fe13ba303c..f334c47b1b 100644 --- a/source/dnode/vnode/src/vnd/vnodeSync.c +++ b/source/dnode/vnode/src/vnd/vnodeSync.c @@ -806,7 +806,7 @@ bool vnodeIsReadyForRead(SVnode *pVnode) { } if (pVnode->restored) { - vDebug("vgId:%d, vnode not restore finished", pVnode->config.vgId); + vDebug("vgId:%d, vnode restore not finished", pVnode->config.vgId); terrno = TSDB_CODE_APP_NOT_READY; return false; } From 7e85a15c31cd8b5ae7875cf8d6c26f41f86397c9 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 29 Sep 2022 14:18:20 +0800 Subject: [PATCH 20/40] fix: do not process query and fetch msg until vnode restore finished --- source/dnode/vnode/src/vnd/vnodeSync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/vnd/vnodeSync.c b/source/dnode/vnode/src/vnd/vnodeSync.c index f334c47b1b..119fa02e05 100644 --- a/source/dnode/vnode/src/vnd/vnodeSync.c +++ b/source/dnode/vnode/src/vnd/vnodeSync.c @@ -805,7 +805,7 @@ bool vnodeIsReadyForRead(SVnode *pVnode) { return true; } - if (pVnode->restored) { + if (!pVnode->restored) { vDebug("vgId:%d, vnode restore not finished", pVnode->config.vgId); terrno = TSDB_CODE_APP_NOT_READY; return false; From f14d00a5d68074f7c105e45b6263766445bf8316 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 29 Sep 2022 14:19:43 +0800 Subject: [PATCH 21/40] fix: do not process query and fetch msg until vnode restore finished --- source/dnode/vnode/src/vnd/vnodeSync.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/dnode/vnode/src/vnd/vnodeSync.c b/source/dnode/vnode/src/vnd/vnodeSync.c index 119fa02e05..e15783d92b 100644 --- a/source/dnode/vnode/src/vnd/vnodeSync.c +++ b/source/dnode/vnode/src/vnd/vnodeSync.c @@ -797,6 +797,12 @@ bool vnodeIsLeader(SVnode *pVnode) { } bool vnodeIsReadyForRead(SVnode *pVnode) { + if (!pVnode->restored) { + vDebug("vgId:%d, vnode restore not finished", pVnode->config.vgId); + terrno = TSDB_CODE_APP_NOT_READY; + return false; + } + if (syncIsReady(pVnode->sync)) { return true; } @@ -805,12 +811,6 @@ bool vnodeIsReadyForRead(SVnode *pVnode) { return true; } - if (!pVnode->restored) { - vDebug("vgId:%d, vnode restore not finished", pVnode->config.vgId); - terrno = TSDB_CODE_APP_NOT_READY; - return false; - } - vDebug("vgId:%d, vnode not ready for read, state:%s, last:%ld, cmt:%ld", pVnode->config.vgId, syncGetMyRoleStr(pVnode->sync), syncGetLastIndex(pVnode->sync), syncGetCommitIndex(pVnode->sync)); return false; From 4df330351490a5ef867eb73b03f8092e481ecdd1 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 29 Sep 2022 14:24:45 +0800 Subject: [PATCH 22/40] fix: do not process query and fetch msg until vnode restore finished --- source/dnode/vnode/src/vnd/vnodeSync.c | 14 +++----------- source/libs/sync/src/syncMain.c | 5 ++++- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/source/dnode/vnode/src/vnd/vnodeSync.c b/source/dnode/vnode/src/vnd/vnodeSync.c index e15783d92b..a5e2726bbf 100644 --- a/source/dnode/vnode/src/vnd/vnodeSync.c +++ b/source/dnode/vnode/src/vnd/vnodeSync.c @@ -797,18 +797,10 @@ bool vnodeIsLeader(SVnode *pVnode) { } bool vnodeIsReadyForRead(SVnode *pVnode) { - if (!pVnode->restored) { - vDebug("vgId:%d, vnode restore not finished", pVnode->config.vgId); - terrno = TSDB_CODE_APP_NOT_READY; - return false; - } - - if (syncIsReady(pVnode->sync)) { - return true; - } - if (syncIsReadyForRead(pVnode->sync)) { - return true; + if (pVnode->restored) { + return true; + } } vDebug("vgId:%d, vnode not ready for read, state:%s, last:%ld, cmt:%ld", pVnode->config.vgId, diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 3d79c6c464..dc9bc6cbdc 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -405,7 +405,10 @@ bool syncIsReadyForRead(int64_t rid) { // TODO: last not noop? SyncIndex lastIndex = syncNodeGetLastIndex(pSyncNode); - bool b = (pSyncNode->state == TAOS_SYNC_STATE_LEADER) && (pSyncNode->commitIndex >= lastIndex - SYNC_MAX_READ_RANGE); + bool b = (pSyncNode->state == TAOS_SYNC_STATE_LEADER) && pSyncNode->restoreFinish; + if (!b) { + b = (pSyncNode->state == TAOS_SYNC_STATE_LEADER) && (pSyncNode->commitIndex >= lastIndex - SYNC_MAX_READ_RANGE); + } taosReleaseRef(tsNodeRefId, pSyncNode->rid); // if false, set error code From 586175ecfa6b573df63fe8808ff69cd53f8c013c Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Thu, 29 Sep 2022 14:25:56 +0800 Subject: [PATCH 23/40] check vnode status for poll msg --- source/dnode/vnode/src/vnd/vnodeSvr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index b62a4dfbdc..1040000363 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -316,6 +316,11 @@ int32_t vnodeProcessFetchMsg(SVnode *pVnode, SRpcMsg *pMsg, SQueueInfo *pInfo) { return 0; } + if (pMsg->msgType == TDMT_VND_CONSUME && !pVnode->restored) { + vnodeRedirectRpcMsg(pVnode, pMsg); + return 0; + } + char *msgstr = POINTER_SHIFT(pMsg->pCont, sizeof(SMsgHead)); int32_t msgLen = pMsg->contLen - sizeof(SMsgHead); From c56dd863998a4b07d93ac99e340aa46dbebd78aa Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 29 Sep 2022 14:29:30 +0800 Subject: [PATCH 24/40] fix: do not process query and fetch msg until vnode restore finished --- source/dnode/vnode/src/inc/vnd.h | 1 - source/dnode/vnode/src/vnd/vnodeSvr.c | 4 ++-- source/dnode/vnode/src/vnd/vnodeSync.c | 11 ----------- source/libs/sync/src/syncMain.c | 26 -------------------------- 4 files changed, 2 insertions(+), 40 deletions(-) diff --git a/source/dnode/vnode/src/inc/vnd.h b/source/dnode/vnode/src/inc/vnd.h index 898e79928b..900d29b97e 100644 --- a/source/dnode/vnode/src/inc/vnd.h +++ b/source/dnode/vnode/src/inc/vnd.h @@ -99,7 +99,6 @@ void vnodeSyncStart(SVnode* pVnode); void vnodeSyncClose(SVnode* pVnode); void vnodeRedirectRpcMsg(SVnode* pVnode, SRpcMsg* pMsg); bool vnodeIsLeader(SVnode* pVnode); -bool vnodeIsReadyForRead(SVnode* pVnode); bool vnodeIsRoleLeader(SVnode* pVnode); #ifdef __cplusplus diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index 6e9eba306a..a9bc3ef875 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -289,7 +289,7 @@ int32_t vnodePreprocessQueryMsg(SVnode *pVnode, SRpcMsg *pMsg) { int32_t vnodeProcessQueryMsg(SVnode *pVnode, SRpcMsg *pMsg) { vTrace("message in vnode query queue is processing"); - if ((pMsg->msgType == TDMT_SCH_QUERY) && !vnodeIsReadyForRead(pVnode)) { + if ((pMsg->msgType == TDMT_SCH_QUERY) && !vnodeIsLeader(pVnode)) { vnodeRedirectRpcMsg(pVnode, pMsg); return 0; } @@ -311,7 +311,7 @@ int32_t vnodeProcessFetchMsg(SVnode *pVnode, SRpcMsg *pMsg, SQueueInfo *pInfo) { vTrace("vgId:%d, msg:%p in fetch queue is processing", pVnode->config.vgId, pMsg); if ((pMsg->msgType == TDMT_SCH_FETCH || pMsg->msgType == TDMT_VND_TABLE_META || pMsg->msgType == TDMT_VND_TABLE_CFG || pMsg->msgType == TDMT_VND_BATCH_META) && - !vnodeIsReadyForRead(pVnode)) { + !vnodeIsLeader(pVnode)) { vnodeRedirectRpcMsg(pVnode, pMsg); return 0; } diff --git a/source/dnode/vnode/src/vnd/vnodeSync.c b/source/dnode/vnode/src/vnd/vnodeSync.c index a5e2726bbf..980761cd14 100644 --- a/source/dnode/vnode/src/vnd/vnodeSync.c +++ b/source/dnode/vnode/src/vnd/vnodeSync.c @@ -796,14 +796,3 @@ bool vnodeIsLeader(SVnode *pVnode) { return true; } -bool vnodeIsReadyForRead(SVnode *pVnode) { - if (syncIsReadyForRead(pVnode->sync)) { - if (pVnode->restored) { - return true; - } - } - - vDebug("vgId:%d, vnode not ready for read, state:%s, last:%ld, cmt:%ld", pVnode->config.vgId, - syncGetMyRoleStr(pVnode->sync), syncGetLastIndex(pVnode->sync), syncGetCommitIndex(pVnode->sync)); - return false; -} diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index dc9bc6cbdc..52feb625a8 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -396,32 +396,6 @@ bool syncIsReady(int64_t rid) { return b; } -bool syncIsReadyForRead(int64_t rid) { - SSyncNode* pSyncNode = (SSyncNode*)taosAcquireRef(tsNodeRefId, rid); - if (pSyncNode == NULL) { - return false; - } - ASSERT(rid == pSyncNode->rid); - - // TODO: last not noop? - SyncIndex lastIndex = syncNodeGetLastIndex(pSyncNode); - bool b = (pSyncNode->state == TAOS_SYNC_STATE_LEADER) && pSyncNode->restoreFinish; - if (!b) { - b = (pSyncNode->state == TAOS_SYNC_STATE_LEADER) && (pSyncNode->commitIndex >= lastIndex - SYNC_MAX_READ_RANGE); - } - taosReleaseRef(tsNodeRefId, pSyncNode->rid); - - // if false, set error code - if (false == b) { - if (pSyncNode->state != TAOS_SYNC_STATE_LEADER) { - terrno = TSDB_CODE_SYN_NOT_LEADER; - } else { - terrno = TSDB_CODE_APP_NOT_READY; - } - } - return b; -} - bool syncIsRestoreFinish(int64_t rid) { SSyncNode* pSyncNode = (SSyncNode*)taosAcquireRef(tsNodeRefId, rid); if (pSyncNode == NULL) { From 6abc13e843bd0be391077a2d730be4a7d9743fa0 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 29 Sep 2022 14:57:15 +0800 Subject: [PATCH 25/40] refactor(query): do some internal refactor. --- source/client/src/clientImpl.c | 3 --- source/client/src/clientMain.c | 2 +- source/libs/catalog/src/ctgAsync.c | 8 +++++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 7852a01bfb..8d5441b847 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -874,8 +874,6 @@ void schedulerExecCb(SExecResult* pResult, void* param, int32_t code) { STscObj* pTscObj = pRequest->pTscObj; pRequest->code = code; - pRequest->metric.resultReady = taosGetTimestampUs(); - if (pResult) { destroyQueryExecRes(&pRequest->body.resInfo.execRes); memcpy(&pRequest->body.resInfo.execRes, pResult, sizeof(*pResult)); @@ -1059,7 +1057,6 @@ void launchAsyncQuery(SRequestObj* pRequest, SQuery* pQuery, SMetaData* pResultM } pRequest->metric.planEnd = taosGetTimestampUs(); - if (TSDB_CODE_SUCCESS == code && !pRequest->validateOnly) { SArray* pNodeList = NULL; buildAsyncExecNodeList(pRequest, &pNodeList, pMnodeList, pResultMeta); diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index dd2046121e..61fbceb2bc 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -817,7 +817,6 @@ void doAsyncQuery(SRequestObj *pRequest, bool updateMetaForce) { pRequest->metric.syntaxEnd = taosGetTimestampUs(); if (!updateMetaForce) { - STscObj *pTscObj = pRequest->pTscObj; SAppClusterSummary *pActivity = &pTscObj->pAppInfo->summary; if (NULL == pRequest->pQuery->pRoot) { atomic_add_fetch_64((int64_t *)&pActivity->numOfInsertsReq, 1); @@ -864,6 +863,7 @@ static void fetchCallback(void *pResult, void *param, int32_t code) { SRequestObj *pRequest = (SRequestObj *)param; SReqResultInfo *pResultInfo = &pRequest->body.resInfo; + pRequest->metric.resultReady = taosGetTimestampUs(); tscDebug("0x%" PRIx64 " enter scheduler fetch cb, code:%d - %s, reqId:0x%" PRIx64, pRequest->self, code, tstrerror(code), pRequest->requestId); diff --git a/source/libs/catalog/src/ctgAsync.c b/source/libs/catalog/src/ctgAsync.c index 3c4cc9f7a2..463ea9340a 100644 --- a/source/libs/catalog/src/ctgAsync.c +++ b/source/libs/catalog/src/ctgAsync.c @@ -487,6 +487,8 @@ int32_t ctgInitTask(SCtgJob* pJob, CTG_TASK_TYPE type, void* param, int32_t* tas int32_t ctgInitJob(SCatalog* pCtg, SRequestConnInfo* pConn, SCtgJob** job, const SCatalogReq* pReq, catalogCallback fp, void* param) { int32_t code = 0; + int64_t st = taosGetTimestampUs(); + int32_t tbMetaNum = (int32_t)ctgGetTablesReqNum(pReq->pTableMeta); int32_t dbVgNum = (int32_t)taosArrayGetSize(pReq->pDbVgroup); int32_t tbHashNum = (int32_t)ctgGetTablesReqNum(pReq->pTableHash); @@ -634,12 +636,12 @@ int32_t ctgInitJob(SCatalog* pCtg, SRequestConnInfo* pConn, SCtgJob** job, const taosAcquireRef(gCtgMgmt.jobPool, pJob->refId); - qDebug("QID:0x%" PRIx64 ", jobId: 0x%" PRIx64 " initialized, task num %d, forceUpdate %d", pJob->queryId, pJob->refId, - taskNum, pReq->forceUpdate); + double el = (taosGetTimestampUs() - st)/1000.0; + qDebug("QID:0x%" PRIx64 ", jobId: 0x%" PRIx64 " initialized, task num %d, forceUpdate %d, elapsed time:%.2f ms", + pJob->queryId, pJob->refId, taskNum, pReq->forceUpdate, el); return TSDB_CODE_SUCCESS; _return: - ctgFreeJob(*job); CTG_RET(code); } From 73642ac3a2e5e63a2821aecd97b2bcf2648be3f5 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 29 Sep 2022 16:16:49 +0800 Subject: [PATCH 26/40] feat: sql command 'show table tags from table_name' --- include/common/ttokendef.h | 209 +- include/libs/function/functionMgt.h | 1 + include/libs/nodes/nodes.h | 8 +- include/util/taoserror.h | 1 + source/libs/function/src/builtins.c | 15 + source/libs/nodes/src/nodesUtilFuncs.c | 4 +- source/libs/parser/inc/sql.y | 2 + source/libs/parser/src/parAstCreater.c | 2 +- source/libs/parser/src/parAstParser.c | 7 + source/libs/parser/src/parTokenizer.c | 1 + source/libs/parser/src/parTranslater.c | 136 +- source/libs/parser/src/sql.c | 5639 ++++++++++---------- source/libs/planner/test/planBasicTest.cpp | 2 + source/libs/planner/test/planOtherTest.cpp | 2 + 14 files changed, 3087 insertions(+), 2942 deletions(-) diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 94128a4999..d061da7aaf 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -227,110 +227,111 @@ #define TK_WEND 209 #define TK_WDURATION 210 #define TK_IROWTS 211 -#define TK_CAST 212 -#define TK_NOW 213 -#define TK_TODAY 214 -#define TK_TIMEZONE 215 -#define TK_CLIENT_VERSION 216 -#define TK_SERVER_VERSION 217 -#define TK_SERVER_STATUS 218 -#define TK_CURRENT_USER 219 -#define TK_COUNT 220 -#define TK_LAST_ROW 221 -#define TK_CASE 222 -#define TK_END 223 -#define TK_WHEN 224 -#define TK_THEN 225 -#define TK_ELSE 226 -#define TK_BETWEEN 227 -#define TK_IS 228 -#define TK_NK_LT 229 -#define TK_NK_GT 230 -#define TK_NK_LE 231 -#define TK_NK_GE 232 -#define TK_NK_NE 233 -#define TK_MATCH 234 -#define TK_NMATCH 235 -#define TK_CONTAINS 236 -#define TK_IN 237 -#define TK_JOIN 238 -#define TK_INNER 239 -#define TK_SELECT 240 -#define TK_DISTINCT 241 -#define TK_WHERE 242 -#define TK_PARTITION 243 -#define TK_BY 244 -#define TK_SESSION 245 -#define TK_STATE_WINDOW 246 -#define TK_SLIDING 247 -#define TK_FILL 248 -#define TK_VALUE 249 -#define TK_NONE 250 -#define TK_PREV 251 -#define TK_LINEAR 252 -#define TK_NEXT 253 -#define TK_HAVING 254 -#define TK_RANGE 255 -#define TK_EVERY 256 -#define TK_ORDER 257 -#define TK_SLIMIT 258 -#define TK_SOFFSET 259 -#define TK_LIMIT 260 -#define TK_OFFSET 261 -#define TK_ASC 262 -#define TK_NULLS 263 -#define TK_ABORT 264 -#define TK_AFTER 265 -#define TK_ATTACH 266 -#define TK_BEFORE 267 -#define TK_BEGIN 268 -#define TK_BITAND 269 -#define TK_BITNOT 270 -#define TK_BITOR 271 -#define TK_BLOCKS 272 -#define TK_CHANGE 273 -#define TK_COMMA 274 -#define TK_COMPACT 275 -#define TK_CONCAT 276 -#define TK_CONFLICT 277 -#define TK_COPY 278 -#define TK_DEFERRED 279 -#define TK_DELIMITERS 280 -#define TK_DETACH 281 -#define TK_DIVIDE 282 -#define TK_DOT 283 -#define TK_EACH 284 -#define TK_FAIL 285 -#define TK_FILE 286 -#define TK_FOR 287 -#define TK_GLOB 288 -#define TK_ID 289 -#define TK_IMMEDIATE 290 -#define TK_IMPORT 291 -#define TK_INITIALLY 292 -#define TK_INSTEAD 293 -#define TK_ISNULL 294 -#define TK_KEY 295 -#define TK_NK_BITNOT 296 -#define TK_NK_SEMI 297 -#define TK_NOTNULL 298 -#define TK_OF 299 -#define TK_PLUS 300 -#define TK_PRIVILEGE 301 -#define TK_RAISE 302 -#define TK_REPLACE 303 -#define TK_RESTRICT 304 -#define TK_ROW 305 -#define TK_SEMI 306 -#define TK_STAR 307 -#define TK_STATEMENT 308 -#define TK_STRING 309 -#define TK_TIMES 310 -#define TK_UPDATE 311 -#define TK_VALUES 312 -#define TK_VARIABLE 313 -#define TK_VIEW 314 -#define TK_WAL 315 +#define TK_QTAGS 212 +#define TK_CAST 213 +#define TK_NOW 214 +#define TK_TODAY 215 +#define TK_TIMEZONE 216 +#define TK_CLIENT_VERSION 217 +#define TK_SERVER_VERSION 218 +#define TK_SERVER_STATUS 219 +#define TK_CURRENT_USER 220 +#define TK_COUNT 221 +#define TK_LAST_ROW 222 +#define TK_CASE 223 +#define TK_END 224 +#define TK_WHEN 225 +#define TK_THEN 226 +#define TK_ELSE 227 +#define TK_BETWEEN 228 +#define TK_IS 229 +#define TK_NK_LT 230 +#define TK_NK_GT 231 +#define TK_NK_LE 232 +#define TK_NK_GE 233 +#define TK_NK_NE 234 +#define TK_MATCH 235 +#define TK_NMATCH 236 +#define TK_CONTAINS 237 +#define TK_IN 238 +#define TK_JOIN 239 +#define TK_INNER 240 +#define TK_SELECT 241 +#define TK_DISTINCT 242 +#define TK_WHERE 243 +#define TK_PARTITION 244 +#define TK_BY 245 +#define TK_SESSION 246 +#define TK_STATE_WINDOW 247 +#define TK_SLIDING 248 +#define TK_FILL 249 +#define TK_VALUE 250 +#define TK_NONE 251 +#define TK_PREV 252 +#define TK_LINEAR 253 +#define TK_NEXT 254 +#define TK_HAVING 255 +#define TK_RANGE 256 +#define TK_EVERY 257 +#define TK_ORDER 258 +#define TK_SLIMIT 259 +#define TK_SOFFSET 260 +#define TK_LIMIT 261 +#define TK_OFFSET 262 +#define TK_ASC 263 +#define TK_NULLS 264 +#define TK_ABORT 265 +#define TK_AFTER 266 +#define TK_ATTACH 267 +#define TK_BEFORE 268 +#define TK_BEGIN 269 +#define TK_BITAND 270 +#define TK_BITNOT 271 +#define TK_BITOR 272 +#define TK_BLOCKS 273 +#define TK_CHANGE 274 +#define TK_COMMA 275 +#define TK_COMPACT 276 +#define TK_CONCAT 277 +#define TK_CONFLICT 278 +#define TK_COPY 279 +#define TK_DEFERRED 280 +#define TK_DELIMITERS 281 +#define TK_DETACH 282 +#define TK_DIVIDE 283 +#define TK_DOT 284 +#define TK_EACH 285 +#define TK_FAIL 286 +#define TK_FILE 287 +#define TK_FOR 288 +#define TK_GLOB 289 +#define TK_ID 290 +#define TK_IMMEDIATE 291 +#define TK_IMPORT 292 +#define TK_INITIALLY 293 +#define TK_INSTEAD 294 +#define TK_ISNULL 295 +#define TK_KEY 296 +#define TK_NK_BITNOT 297 +#define TK_NK_SEMI 298 +#define TK_NOTNULL 299 +#define TK_OF 300 +#define TK_PLUS 301 +#define TK_PRIVILEGE 302 +#define TK_RAISE 303 +#define TK_REPLACE 304 +#define TK_RESTRICT 305 +#define TK_ROW 306 +#define TK_SEMI 307 +#define TK_STAR 308 +#define TK_STATEMENT 309 +#define TK_STRING 310 +#define TK_TIMES 311 +#define TK_UPDATE 312 +#define TK_VALUES 313 +#define TK_VARIABLE 314 +#define TK_VIEW 315 +#define TK_WAL 316 #define TK_NK_SPACE 300 #define TK_NK_COMMENT 301 diff --git a/include/libs/function/functionMgt.h b/include/libs/function/functionMgt.h index cb4960707b..569c16675d 100644 --- a/include/libs/function/functionMgt.h +++ b/include/libs/function/functionMgt.h @@ -120,6 +120,7 @@ typedef enum EFunctionType { FUNCTION_TYPE_WEND, FUNCTION_TYPE_WDURATION, FUNCTION_TYPE_IROWTS, + FUNCTION_TYPE_TAGS, // internal function FUNCTION_TYPE_SELECT_VALUE = 3750, diff --git a/include/libs/nodes/nodes.h b/include/libs/nodes/nodes.h index 560832cd74..00e896f586 100644 --- a/include/libs/nodes/nodes.h +++ b/include/libs/nodes/nodes.h @@ -27,9 +27,10 @@ extern "C" { #define LIST_LENGTH(l) (NULL != (l) ? (l)->length : 0) -#define FOREACH(node, list) \ - for (SListCell *cell = (NULL != (list) ? (list)->pHead : NULL), *pNext; \ - (NULL != cell ? (node = cell->pNode, pNext = cell->pNext, true) : (node = NULL, pNext = NULL, false)); cell = pNext) +#define FOREACH(node, list) \ + for (SListCell* cell = (NULL != (list) ? (list)->pHead : NULL), *pNext; \ + (NULL != cell ? (node = cell->pNode, pNext = cell->pNext, true) : (node = NULL, pNext = NULL, false)); \ + cell = pNext) #define REPLACE_NODE(newNode) cell->pNode = (SNode*)(newNode) @@ -192,6 +193,7 @@ typedef enum ENodeType { QUERY_NODE_SHOW_TABLE_DISTRIBUTED_STMT, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT, QUERY_NODE_SHOW_SCORES_STMT, + QUERY_NODE_SHOW_TABLE_TAGS_STMT, QUERY_NODE_KILL_CONNECTION_STMT, QUERY_NODE_KILL_QUERY_STMT, QUERY_NODE_KILL_TRANSACTION_STMT, diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 837d0c6303..f6940b2895 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -565,6 +565,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_PAR_GET_META_ERROR TAOS_DEF_ERROR_CODE(0, 0x2662) #define TSDB_CODE_PAR_NOT_UNIQUE_TABLE_ALIAS TAOS_DEF_ERROR_CODE(0, 0x2663) #define TSDB_CODE_PAR_NOT_SUPPORT_JOIN TAOS_DEF_ERROR_CODE(0, 0x2664) +#define TSDB_CODE_PAR_INVALID_TAGS_PC TAOS_DEF_ERROR_CODE(0, 0x2665) #define TSDB_CODE_PAR_INTERNAL_ERROR TAOS_DEF_ERROR_CODE(0, 0x26FF) //planner diff --git a/source/libs/function/src/builtins.c b/source/libs/function/src/builtins.c index 54455415b8..e9415dc879 100644 --- a/source/libs/function/src/builtins.c +++ b/source/libs/function/src/builtins.c @@ -2020,6 +2020,11 @@ static int32_t translateUserFunc(SFunctionNode* pFunc, char* pErrBuf, int32_t le return TSDB_CODE_SUCCESS; } +static int32_t translateTagsPseudoColumn(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + // The _tags pseudo-column will be expanded to the actual tags on the client side + return TSDB_CODE_SUCCESS; +} + // clang-format off const SBuiltinFuncDefinition funcMgtBuiltins[] = { { @@ -3156,6 +3161,16 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .sprocessFunc = NULL, .finalizeFunc = NULL }, + { + .name = "_tags", + .type = FUNCTION_TYPE_TAGS, + .classification = FUNC_MGT_PSEUDO_COLUMN_FUNC | FUNC_MGT_MULTI_RES_FUNC, + .translateFunc = translateTagsPseudoColumn, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = NULL, + .finalizeFunc = NULL + }, }; // clang-format on diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index f8dda501e9..6e964fb53a 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -419,6 +419,7 @@ SNode* nodesMakeNode(ENodeType type) { case QUERY_NODE_SHOW_TRANSACTIONS_STMT: case QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT: case QUERY_NODE_SHOW_TAGS_STMT: + case QUERY_NODE_SHOW_TABLE_TAGS_STMT: return makeNode(type, sizeof(SShowStmt)); case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT: return makeNode(type, sizeof(SShowDnodeVariablesStmt)); @@ -921,7 +922,8 @@ void nodesDestroyNode(SNode* pNode) { case QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT: case QUERY_NODE_SHOW_TRANSACTIONS_STMT: case QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT: - case QUERY_NODE_SHOW_TAGS_STMT: { + case QUERY_NODE_SHOW_TAGS_STMT: + case QUERY_NODE_SHOW_TABLE_TAGS_STMT: { SShowStmt* pStmt = (SShowStmt*)pNode; nodesDestroyNode(pStmt->pDbName); nodesDestroyNode(pStmt->pTbName); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 225f169289..83fa92041e 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -420,6 +420,7 @@ cmd ::= SHOW TABLE DISTRIBUTED full_table_name(A). cmd ::= SHOW CONSUMERS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } cmd ::= SHOW SUBSCRIPTIONS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } cmd ::= SHOW TAGS FROM table_name_cond(A) from_db_opt(B). { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, B, A, OP_TYPE_EQUAL); } +cmd ::= SHOW TABLE TAGS FROM table_name_cond(A) from_db_opt(B). { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLE_TAGS_STMT, B, A, OP_TYPE_EQUAL); } cmd ::= SHOW VNODES NK_INTEGER(A). { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &A), NULL); } cmd ::= SHOW VNODES NK_STRING(A). { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, createValueNode(pCxt, TSDB_DATA_TYPE_VARCHAR, &A)); } @@ -708,6 +709,7 @@ pseudo_column(A) ::= WSTART(B). pseudo_column(A) ::= WEND(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } pseudo_column(A) ::= WDURATION(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } pseudo_column(A) ::= IROWTS(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } +pseudo_column(A) ::= QTAGS(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } function_expression(A) ::= function_name(B) NK_LP expression_list(C) NK_RP(D). { A = createRawExprNodeExt(pCxt, &B, &D, createFunctionNode(pCxt, &B, C)); } function_expression(A) ::= star_func(B) NK_LP star_func_para_list(C) NK_RP(D). { A = createRawExprNodeExt(pCxt, &B, &D, createFunctionNode(pCxt, &B, C)); } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 10a066db40..8998ffdbf3 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -1310,7 +1310,7 @@ SNode* createUseDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName) { static bool needDbShowStmt(ENodeType type) { return QUERY_NODE_SHOW_TABLES_STMT == type || QUERY_NODE_SHOW_STABLES_STMT == type || QUERY_NODE_SHOW_VGROUPS_STMT == type || QUERY_NODE_SHOW_INDEXES_STMT == type || - QUERY_NODE_SHOW_TAGS_STMT == type; + QUERY_NODE_SHOW_TAGS_STMT == type || QUERY_NODE_SHOW_TABLE_TAGS_STMT == type; } SNode* createShowStmt(SAstCreateContext* pCxt, ENodeType type) { diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c index 968e03f97e..ce90bd3da0 100644 --- a/source/libs/parser/src/parAstParser.c +++ b/source/libs/parser/src/parAstParser.c @@ -414,6 +414,11 @@ static int32_t collectMetaKeyFromShowTags(SCollectMetaKeyCxt* pCxt, SShowStmt* p return code; } +static int32_t collectMetaKeyFromShowStableTags(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { + return collectMetaKeyFromRealTableImpl(pCxt, ((SValueNode*)pStmt->pDbName)->literal, + ((SValueNode*)pStmt->pTbName)->literal, AUTH_TYPE_READ); +} + static int32_t collectMetaKeyFromShowUsers(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_USERS, pCxt->pMetaCache); @@ -595,6 +600,8 @@ static int32_t collectMetaKeyFromQuery(SCollectMetaKeyCxt* pCxt, SNode* pStmt) { return collectMetaKeyFromShowTables(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_TAGS_STMT: return collectMetaKeyFromShowTags(pCxt, (SShowStmt*)pStmt); + case QUERY_NODE_SHOW_TABLE_TAGS_STMT: + return collectMetaKeyFromShowStableTags(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_USERS_STMT: return collectMetaKeyFromShowUsers(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_LICENCES_STMT: diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 64510773a2..345b9cc5b9 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -257,6 +257,7 @@ static SKeyword keywordTable[] = { {"_QEND", TK_QEND}, {"_QSTART", TK_QSTART}, {"_ROWTS", TK_ROWTS}, + {"_TAGS", TK_QTAGS}, {"_WDURATION", TK_WDURATION}, {"_WEND", TK_WEND}, {"_WSTART", TK_WSTART}, diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index eb63630dbf..9d805b8e33 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -1215,6 +1215,9 @@ static bool isMultiResFunc(SNode* pNode) { if (QUERY_NODE_FUNCTION != nodeType(pNode) || !fmIsMultiResFunc(((SFunctionNode*)pNode)->funcId)) { return false; } + if (FUNCTION_TYPE_TAGS == ((SFunctionNode*)pNode)->funcType) { + return true; + } SNodeList* pParameterList = ((SFunctionNode*)pNode)->pParameterList; if (LIST_LENGTH(pParameterList) > 1) { return true; @@ -1556,7 +1559,7 @@ static int32_t translateMultiResFunc(STranslateContext* pCxt, SFunctionNode* pFu "%s(*) is only supported in SELECTed list", pFunc->functionName); } } - if (tsKeepColumnName) { + if (tsKeepColumnName && 1 == LIST_LENGTH(pFunc->pParameterList)) { strcpy(pFunc->node.userAlias, ((SExprNode*)nodesListGetNode(pFunc->pParameterList, 0))->userAlias); } return TSDB_CODE_SUCCESS; @@ -1842,17 +1845,46 @@ static EDealRes translateWhenThen(STranslateContext* pCxt, SWhenThenNode* pWhenT return DEAL_RES_CONTINUE; } +static bool isCondition(const SNode* pNode) { + if (QUERY_NODE_OPERATOR == nodeType(pNode)) { + return nodesIsComparisonOp((const SOperatorNode*)pNode); + } + return (QUERY_NODE_LOGIC_CONDITION == nodeType(pNode)); +} + +static int32_t rewriteIsTrue(SNode* pSrc, SNode** pIsTrue) { + SOperatorNode* pOp = (SOperatorNode*)nodesMakeNode(QUERY_NODE_OPERATOR); + if (NULL == pOp) { + return TSDB_CODE_OUT_OF_MEMORY; + } + pOp->opType = OP_TYPE_IS_TRUE; + pOp->pLeft = pSrc; + pOp->node.resType.type = TSDB_DATA_TYPE_BOOL; + pOp->node.resType.bytes = tDataTypes[TSDB_DATA_TYPE_BOOL].bytes; + *pIsTrue = (SNode*)pOp; + return TSDB_CODE_SUCCESS; +} + static EDealRes translateCaseWhen(STranslateContext* pCxt, SCaseWhenNode* pCaseWhen) { bool first = true; SNode* pNode = NULL; FOREACH(pNode, pCaseWhen->pWhenThenList) { + SWhenThenNode* pWhenThen = (SWhenThenNode*)pNode; + if (NULL == pCaseWhen->pCase && !isCondition(pWhenThen->pWhen)) { + SNode* pIsTrue = NULL; + pCxt->errCode = rewriteIsTrue(pWhenThen->pWhen, &pIsTrue); + if (TSDB_CODE_SUCCESS != pCxt->errCode) { + return DEAL_RES_ERROR; + } + pWhenThen->pWhen = pIsTrue; + } if (first) { pCaseWhen->node.resType = ((SExprNode*)pNode)->resType; } else if (!dataTypeEqual(&pCaseWhen->node.resType, &((SExprNode*)pNode)->resType)) { - SWhenThenNode* pWhenThen = (SWhenThenNode*)pNode; - SNode* pCastFunc = NULL; - if (TSDB_CODE_SUCCESS != createCastFunc(pCxt, pWhenThen->pThen, pCaseWhen->node.resType, &pCastFunc)) { - return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_WRONG_VALUE_TYPE, "CASE WHEN data type mismatch"); + SNode* pCastFunc = NULL; + pCxt->errCode = createCastFunc(pCxt, pWhenThen->pThen, pCaseWhen->node.resType, &pCastFunc); + if (TSDB_CODE_SUCCESS != pCxt->errCode) { + return DEAL_RES_ERROR; } pWhenThen->pThen = pCastFunc; pWhenThen->node.resType = pCaseWhen->node.resType; @@ -1860,8 +1892,9 @@ static EDealRes translateCaseWhen(STranslateContext* pCxt, SCaseWhenNode* pCaseW } if (NULL != pCaseWhen->pElse && !dataTypeEqual(&pCaseWhen->node.resType, &((SExprNode*)pCaseWhen->pElse)->resType)) { SNode* pCastFunc = NULL; - if (TSDB_CODE_SUCCESS != createCastFunc(pCxt, pCaseWhen->pElse, pCaseWhen->node.resType, &pCastFunc)) { - return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_WRONG_VALUE_TYPE, "CASE WHEN data type mismatch"); + pCxt->errCode = createCastFunc(pCxt, pCaseWhen->pElse, pCaseWhen->node.resType, &pCastFunc); + if (TSDB_CODE_SUCCESS != pCxt->errCode) { + return DEAL_RES_ERROR; } pCaseWhen->pElse = pCastFunc; ((SExprNode*)pCaseWhen->pElse)->resType = pCaseWhen->node.resType; @@ -2585,6 +2618,34 @@ static int32_t createMultiResFuncsFromStar(STranslateContext* pCxt, SFunctionNod return code; } +static int32_t createTags(STranslateContext* pCxt, SNodeList** pOutput) { + if (QUERY_NODE_REAL_TABLE != nodeType(((SSelectStmt*)pCxt->pCurrStmt)->pFromTable)) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TAGS_PC, + "The _TAGS pseudo column can only be used for subtable and supertable queries"); + } + + SRealTableNode* pTable = (SRealTableNode*)(((SSelectStmt*)pCxt->pCurrStmt)->pFromTable); + const STableMeta* pMeta = pTable->pMeta; + if (TSDB_SUPER_TABLE != pMeta->tableType && TSDB_CHILD_TABLE != pMeta->tableType) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TAGS_PC, + "The _TAGS pseudo column can only be used for subtable and supertable queries"); + } + + SSchema* pTagsSchema = getTableTagSchema(pMeta); + for (int32_t i = 0; i < pMeta->tableInfo.numOfTags; ++i) { + SColumnNode* pCol = (SColumnNode*)nodesMakeNode(QUERY_NODE_COLUMN); + if (NULL == pCol) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_OUT_OF_MEMORY); + } + setColumnInfoBySchema(pTable, pTagsSchema + i, 1, pCol); + if (TSDB_CODE_SUCCESS != nodesListMakeStrictAppend(pOutput, (SNode*)pCol)) { + NODES_DESTORY_LIST(*pOutput); + return TSDB_CODE_OUT_OF_MEMORY; + } + } + return TSDB_CODE_SUCCESS; +} + static int32_t translateStar(STranslateContext* pCxt, SSelectStmt* pSelect) { SNode* pNode = NULL; WHERE_EACH(pNode, pSelect->pProjectionList) { @@ -2598,10 +2659,14 @@ static int32_t translateStar(STranslateContext* pCxt, SSelectStmt* pSelect) { continue; } } else if (isMultiResFunc(pNode)) { - SNodeList* pFuncs = NULL; - code = createMultiResFuncsFromStar(pCxt, (SFunctionNode*)pNode, &pFuncs); + SNodeList* pNodeList = NULL; + if (FUNCTION_TYPE_TAGS == ((SFunctionNode*)pNode)->funcType) { + code = createTags(pCxt, &pNodeList); + } else { + code = createMultiResFuncsFromStar(pCxt, (SFunctionNode*)pNode, &pNodeList); + } if (TSDB_CODE_SUCCESS == code) { - INSERT_LIST(pSelect->pProjectionList, pFuncs); + INSERT_LIST(pSelect->pProjectionList, pNodeList); ERASE_NODE(pSelect->pProjectionList); continue; } @@ -4579,6 +4644,8 @@ static SNode* createTbnameFunction() { return NULL; } strcpy(pFunc->functionName, "tbname"); + strcpy(pFunc->node.aliasName, "tbname"); + strcpy(pFunc->node.userAlias, "tbname"); return (SNode*)pFunc; } @@ -6007,7 +6074,7 @@ static SNode* createProjectCol(const char* pProjCol) { static SNodeList* createProjectCols(int32_t ncols, const char* const pCols[]) { SNodeList* pProjections = NULL; - if (ncols <= 0) { + if (0 == ncols) { nodesListMakeStrictAppend(&pProjections, createStarCol()); return pProjections; } @@ -6039,10 +6106,12 @@ static int32_t createSimpleSelectStmt(const char* pDb, const char* pTable, int32 strcpy(pRealTable->table.tableAlias, pTable); pSelect->pFromTable = (SNode*)pRealTable; - pSelect->pProjectionList = createProjectCols(numOfProjs, pProjCol); - if (NULL == pSelect->pProjectionList) { - nodesDestroyNode((SNode*)pSelect); - return TSDB_CODE_OUT_OF_MEMORY; + if (numOfProjs >= 0) { + pSelect->pProjectionList = createProjectCols(numOfProjs, pProjCol); + if (NULL == pSelect->pProjectionList) { + nodesDestroyNode((SNode*)pSelect); + return TSDB_CODE_OUT_OF_MEMORY; + } } *pStmt = pSelect; @@ -6145,6 +6214,40 @@ static int32_t rewriteShow(STranslateContext* pCxt, SQuery* pQuery) { pQuery->showRewrite = true; nodesDestroyNode(pQuery->pRoot); pQuery->pRoot = (SNode*)pStmt; + } else { + nodesDestroyNode((SNode*)pStmt); + } + return code; +} + +static SNode* createTagsFunction() { + SFunctionNode* pFunc = (SFunctionNode*)nodesMakeNode(QUERY_NODE_FUNCTION); + if (NULL == pFunc) { + return NULL; + } + strcpy(pFunc->functionName, "_tags"); + return (SNode*)pFunc; +} + +static int32_t rewriteShowStableTags(STranslateContext* pCxt, SQuery* pQuery) { + const char* cols[] = {"tbname", "_tags"}; + SShowStmt* pShow = (SShowStmt*)pQuery->pRoot; + SSelectStmt* pSelect = NULL; + int32_t code = createSimpleSelectStmt(((SValueNode*)pShow->pDbName)->literal, ((SValueNode*)pShow->pTbName)->literal, + -1, NULL, &pSelect); + if (TSDB_CODE_SUCCESS == code) { + code = nodesListMakeStrictAppend(&pSelect->pProjectionList, createTbnameFunction()); + } + if (TSDB_CODE_SUCCESS == code) { + code = nodesListMakeStrictAppend(&pSelect->pProjectionList, createTagsFunction()); + } + if (TSDB_CODE_SUCCESS == code) { + pSelect->isDistinct = true; + pQuery->showRewrite = true; + nodesDestroyNode(pQuery->pRoot); + pQuery->pRoot = (SNode*)pSelect; + } else { + nodesDestroyNode((SNode*)pSelect); } return code; } @@ -7282,6 +7385,9 @@ static int32_t rewriteQuery(STranslateContext* pCxt, SQuery* pQuery) { case QUERY_NODE_SHOW_TAGS_STMT: code = rewriteShow(pCxt, pQuery); break; + case QUERY_NODE_SHOW_TABLE_TAGS_STMT: + code = rewriteShowStableTags(pCxt, pQuery); + break; case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT: code = rewriteShowDnodeVariables(pCxt, pQuery); break; diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 9acf6ffcdd..9711aed4ba 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -104,26 +104,26 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 448 +#define YYNOCODE 449 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - bool yy89; - EFillMode yy102; - SNodeList* yy152; - int64_t yy221; - EOperatorType yy380; - EOrder yy386; - int8_t yy439; - int32_t yy452; - ENullOrder yy585; - EJoinType yy596; - SNode* yy616; - SAlterOption yy669; - SToken yy673; - SDataType yy784; + EOrder yy14; + bool yy39; + SToken yy181; + EJoinType yy202; + int32_t yy276; + SNodeList* yy282; + int8_t yy293; + ENullOrder yy305; + SDataType yy380; + EFillMode yy381; + SAlterOption yy645; + EOperatorType yy682; + SNode* yy778; + int64_t yy831; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -139,17 +139,17 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 689 -#define YYNRULE 519 -#define YYNTOKEN 316 -#define YY_MAX_SHIFT 688 -#define YY_MIN_SHIFTREDUCE 1017 -#define YY_MAX_SHIFTREDUCE 1535 -#define YY_ERROR_ACTION 1536 -#define YY_ACCEPT_ACTION 1537 -#define YY_NO_ACTION 1538 -#define YY_MIN_REDUCE 1539 -#define YY_MAX_REDUCE 2057 +#define YYNSTATE 693 +#define YYNRULE 521 +#define YYNTOKEN 317 +#define YY_MAX_SHIFT 692 +#define YY_MIN_SHIFTREDUCE 1022 +#define YY_MAX_SHIFTREDUCE 1542 +#define YY_ERROR_ACTION 1543 +#define YY_ACCEPT_ACTION 1544 +#define YY_NO_ACTION 1545 +#define YY_MIN_REDUCE 1546 +#define YY_MAX_REDUCE 2066 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -216,798 +216,791 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (3046) +#define YY_ACTTAB_COUNT (2993) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 1860, 1789, 443, 1860, 444, 1574, 451, 1874, 444, 1574, - /* 10 */ 1677, 1856, 44, 42, 1856, 351, 540, 1675, 1731, 1733, - /* 20 */ 346, 1856, 1317, 43, 41, 40, 39, 38, 52, 2033, - /* 30 */ 40, 39, 38, 1396, 1050, 1315, 1892, 1852, 1858, 334, - /* 40 */ 1852, 1858, 340, 1343, 582, 1686, 1344, 1852, 1858, 1842, - /* 50 */ 588, 594, 30, 588, 442, 581, 1391, 446, 37, 36, - /* 60 */ 588, 17, 43, 41, 40, 39, 38, 1874, 1323, 44, - /* 70 */ 42, 1466, 1872, 1130, 1054, 1055, 1907, 346, 566, 1317, - /* 80 */ 97, 1873, 1875, 598, 1877, 1878, 593, 1067, 588, 1066, - /* 90 */ 1396, 1562, 1315, 167, 1, 1960, 1892, 1732, 1733, 339, - /* 100 */ 1956, 77, 479, 1738, 595, 578, 1132, 2028, 1470, 1842, - /* 110 */ 333, 594, 172, 1391, 1342, 125, 685, 1068, 17, 1736, - /* 120 */ 1986, 1525, 565, 170, 1681, 1323, 1663, 2029, 567, 46, - /* 130 */ 1398, 1399, 596, 1842, 132, 62, 1907, 1540, 1561, 225, - /* 140 */ 98, 345, 1875, 598, 1877, 1878, 593, 1975, 588, 1892, - /* 150 */ 87, 1, 581, 1212, 1213, 1960, 58, 560, 109, 312, - /* 160 */ 1956, 108, 107, 106, 105, 104, 103, 102, 101, 100, - /* 170 */ 2028, 130, 1679, 685, 527, 1972, 1318, 58, 1316, 81, - /* 180 */ 1842, 331, 34, 265, 1786, 565, 170, 1398, 1399, 264, - /* 190 */ 2029, 567, 580, 168, 1968, 1969, 559, 1973, 556, 450, - /* 200 */ 1321, 1322, 446, 1372, 1373, 1375, 1376, 1377, 1378, 1379, - /* 210 */ 1380, 1381, 590, 586, 1389, 1390, 1392, 1393, 1394, 1395, - /* 220 */ 1397, 1400, 3, 581, 203, 58, 46, 94, 1427, 155, - /* 230 */ 578, 1551, 629, 1318, 1342, 1316, 58, 384, 160, 383, - /* 240 */ 173, 127, 1492, 477, 473, 469, 465, 202, 428, 1678, - /* 250 */ 448, 144, 143, 626, 625, 624, 1340, 1321, 1322, 132, - /* 260 */ 1372, 1373, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 590, - /* 270 */ 586, 1389, 1390, 1392, 1393, 1394, 1395, 1397, 1400, 3, - /* 280 */ 44, 42, 562, 557, 78, 490, 489, 200, 346, 1861, - /* 290 */ 1317, 553, 1490, 1491, 1493, 1494, 130, 31, 1374, 578, - /* 300 */ 1856, 1396, 173, 1315, 183, 182, 109, 1432, 58, 108, - /* 310 */ 107, 106, 105, 104, 103, 102, 101, 100, 169, 1968, - /* 320 */ 1969, 629, 1973, 173, 1391, 460, 1852, 1858, 132, 17, - /* 330 */ 2033, 11, 1874, 9, 540, 380, 1323, 44, 42, 588, - /* 340 */ 144, 143, 626, 625, 624, 346, 175, 1317, 578, 158, - /* 350 */ 199, 193, 47, 198, 1643, 382, 378, 456, 1396, 2028, - /* 360 */ 1315, 1892, 1, 1686, 1343, 130, 540, 2033, 542, 582, - /* 370 */ 1932, 173, 173, 191, 1842, 2032, 594, 132, 119, 2029, - /* 380 */ 2031, 1391, 173, 391, 685, 481, 17, 171, 1968, 1969, - /* 390 */ 217, 1973, 1067, 1323, 1066, 1686, 2028, 1872, 1398, 1399, - /* 400 */ 1342, 1907, 1539, 231, 232, 97, 1873, 1875, 598, 1877, - /* 410 */ 1878, 593, 2032, 588, 121, 561, 2029, 2030, 167, 1, - /* 420 */ 1960, 308, 1068, 540, 339, 1956, 118, 117, 116, 115, - /* 430 */ 114, 113, 112, 111, 110, 119, 262, 1968, 577, 1975, - /* 440 */ 576, 685, 486, 2028, 1318, 1987, 1316, 79, 310, 631, - /* 450 */ 1738, 530, 1686, 1341, 173, 1398, 1399, 350, 565, 170, - /* 460 */ 13, 12, 310, 2029, 567, 530, 1736, 1971, 1321, 1322, - /* 470 */ 1661, 1372, 1373, 1375, 1376, 1377, 1378, 1379, 1380, 1381, - /* 480 */ 590, 586, 1389, 1390, 1392, 1393, 1394, 1395, 1397, 1400, - /* 490 */ 3, 230, 11, 1406, 544, 1537, 1932, 322, 173, 1342, - /* 500 */ 77, 1318, 1785, 1316, 305, 1170, 620, 619, 618, 1174, - /* 510 */ 617, 1176, 1177, 616, 1179, 613, 142, 1185, 610, 1187, - /* 520 */ 1188, 607, 604, 1682, 623, 1321, 1322, 179, 1372, 1373, - /* 530 */ 1375, 1376, 1377, 1378, 1379, 1380, 1381, 590, 586, 1389, - /* 540 */ 1390, 1392, 1393, 1394, 1395, 1397, 1400, 3, 44, 42, - /* 550 */ 392, 1295, 1296, 332, 1439, 361, 346, 323, 1317, 321, - /* 560 */ 320, 153, 483, 393, 74, 540, 485, 73, 51, 1396, - /* 570 */ 1688, 1315, 523, 1664, 385, 1975, 629, 389, 37, 36, - /* 580 */ 166, 1874, 43, 41, 40, 39, 38, 1344, 484, 11, - /* 590 */ 1345, 523, 1391, 1725, 1686, 144, 143, 626, 625, 624, - /* 600 */ 1874, 2028, 540, 1970, 1323, 44, 42, 1401, 656, 654, - /* 610 */ 1892, 1560, 1323, 346, 390, 1317, 2034, 170, 595, 643, - /* 620 */ 2028, 2029, 567, 1842, 224, 594, 1396, 1738, 1315, 1892, - /* 630 */ 8, 1686, 507, 460, 317, 2034, 170, 595, 2032, 540, - /* 640 */ 2029, 567, 1842, 1736, 594, 505, 596, 503, 1662, 1391, - /* 650 */ 1907, 398, 685, 1842, 292, 345, 1875, 598, 1877, 1878, - /* 660 */ 593, 1323, 588, 349, 80, 1872, 1398, 1399, 1686, 1907, - /* 670 */ 1671, 153, 566, 97, 1873, 1875, 598, 1877, 1878, 593, - /* 680 */ 1688, 588, 218, 1374, 2028, 1716, 2048, 8, 1960, 1559, - /* 690 */ 37, 36, 339, 1956, 43, 41, 40, 39, 38, 565, - /* 700 */ 170, 2028, 1994, 540, 2029, 567, 540, 45, 631, 685, - /* 710 */ 527, 1784, 1318, 305, 1316, 413, 565, 170, 414, 1552, - /* 720 */ 1787, 2029, 567, 1398, 1399, 153, 627, 1779, 1558, 1729, - /* 730 */ 264, 1842, 1686, 241, 1689, 1686, 1321, 1322, 178, 1372, - /* 740 */ 1373, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 590, 586, - /* 750 */ 1389, 1390, 1392, 1393, 1394, 1395, 1397, 1400, 3, 1266, - /* 760 */ 37, 36, 540, 540, 43, 41, 40, 39, 38, 1318, - /* 770 */ 1842, 1316, 352, 1673, 458, 459, 173, 1502, 37, 36, - /* 780 */ 153, 1557, 43, 41, 40, 39, 38, 128, 1556, 1688, - /* 790 */ 1931, 1686, 1686, 1321, 1322, 26, 1372, 1373, 1375, 1376, - /* 800 */ 1377, 1378, 1379, 1380, 1381, 590, 586, 1389, 1390, 1392, - /* 810 */ 1393, 1394, 1395, 1397, 1400, 3, 44, 42, 526, 1317, - /* 820 */ 1779, 1555, 1738, 1842, 346, 628, 1317, 1554, 1729, 2033, - /* 830 */ 1842, 181, 1315, 540, 1553, 523, 1669, 1396, 1737, 1315, - /* 840 */ 32, 359, 1054, 1055, 485, 1683, 37, 36, 1550, 1874, - /* 850 */ 43, 41, 40, 39, 38, 644, 7, 1656, 523, 540, - /* 860 */ 1391, 1463, 1686, 1842, 2028, 1323, 484, 1549, 1874, 1842, - /* 870 */ 540, 136, 1323, 44, 42, 570, 1842, 540, 1892, 2034, - /* 880 */ 170, 346, 519, 1317, 2029, 567, 595, 2028, 1686, 524, - /* 890 */ 1842, 1842, 569, 594, 1396, 1345, 1315, 1892, 8, 1686, - /* 900 */ 518, 277, 2034, 170, 1716, 595, 1686, 2029, 567, 1842, - /* 910 */ 1842, 1342, 594, 685, 1872, 1829, 1548, 1391, 1907, 540, - /* 920 */ 685, 1525, 156, 1873, 1875, 598, 1877, 1878, 593, 1323, - /* 930 */ 588, 235, 221, 1872, 1398, 1399, 1547, 1907, 1532, 48, - /* 940 */ 4, 97, 1873, 1875, 598, 1877, 1878, 593, 1686, 588, - /* 950 */ 493, 492, 1546, 585, 2048, 1, 1960, 126, 1842, 1591, - /* 960 */ 339, 1956, 368, 545, 1997, 1980, 1459, 540, 488, 491, - /* 970 */ 2022, 1604, 540, 1318, 487, 1316, 1326, 685, 1842, 536, - /* 980 */ 1318, 494, 1316, 358, 538, 1545, 208, 210, 1544, 206, - /* 990 */ 209, 1398, 1399, 589, 1842, 229, 1686, 1321, 1322, 1543, - /* 1000 */ 523, 1686, 50, 522, 1321, 1322, 1542, 1372, 1373, 1375, - /* 1010 */ 1376, 1377, 1378, 1379, 1380, 1381, 590, 586, 1389, 1390, - /* 1020 */ 1392, 1393, 1394, 1395, 1397, 1400, 3, 1842, 540, 2028, - /* 1030 */ 1842, 540, 1531, 1534, 1535, 493, 492, 1318, 240, 1316, - /* 1040 */ 539, 1842, 126, 266, 2034, 170, 573, 233, 1842, 2029, - /* 1050 */ 567, 622, 137, 488, 491, 212, 1459, 1686, 211, 487, - /* 1060 */ 1686, 1321, 1322, 1601, 1372, 1373, 1375, 1376, 1377, 1378, - /* 1070 */ 1379, 1380, 1381, 590, 586, 1389, 1390, 1392, 1393, 1394, - /* 1080 */ 1395, 1397, 1400, 3, 307, 540, 1340, 214, 13, 12, - /* 1090 */ 213, 571, 1417, 421, 1325, 1374, 433, 353, 1462, 1586, - /* 1100 */ 1584, 93, 37, 36, 533, 2000, 43, 41, 40, 39, - /* 1110 */ 38, 90, 1644, 406, 1686, 434, 141, 408, 142, 1329, - /* 1120 */ 60, 496, 499, 259, 245, 60, 662, 661, 660, 659, - /* 1130 */ 356, 45, 658, 657, 133, 652, 651, 650, 649, 648, - /* 1140 */ 647, 646, 645, 146, 641, 640, 639, 355, 354, 636, - /* 1150 */ 635, 634, 633, 632, 554, 154, 478, 37, 36, 399, - /* 1160 */ 283, 43, 41, 40, 39, 38, 253, 1094, 237, 637, - /* 1170 */ 1163, 395, 1489, 45, 281, 66, 248, 1433, 65, 1863, - /* 1180 */ 37, 36, 1893, 1382, 43, 41, 40, 39, 38, 1482, - /* 1190 */ 602, 1114, 357, 1575, 187, 439, 437, 141, 1990, 432, - /* 1200 */ 1095, 1874, 427, 426, 425, 424, 423, 420, 419, 418, - /* 1210 */ 417, 416, 412, 411, 410, 409, 403, 402, 401, 400, - /* 1220 */ 142, 397, 396, 319, 638, 276, 1726, 1865, 37, 36, - /* 1230 */ 1892, 58, 43, 41, 40, 39, 38, 1328, 595, 122, - /* 1240 */ 141, 579, 1191, 1842, 261, 594, 1112, 1580, 258, 1195, - /* 1250 */ 2, 362, 5, 367, 318, 273, 180, 1282, 394, 1340, - /* 1260 */ 415, 1781, 422, 430, 574, 429, 1872, 431, 435, 96, - /* 1270 */ 1907, 436, 1202, 184, 97, 1873, 1875, 598, 1877, 1878, - /* 1280 */ 593, 313, 588, 438, 1346, 129, 441, 140, 1931, 1960, - /* 1290 */ 440, 1200, 145, 339, 1956, 680, 449, 1348, 452, 190, - /* 1300 */ 511, 192, 453, 1347, 454, 71, 70, 388, 1349, 455, - /* 1310 */ 177, 1874, 152, 195, 197, 457, 498, 523, 75, 76, - /* 1320 */ 461, 201, 480, 1425, 482, 1676, 205, 306, 1672, 207, - /* 1330 */ 376, 508, 374, 370, 366, 363, 360, 309, 120, 147, - /* 1340 */ 1892, 510, 148, 1674, 1670, 216, 2028, 149, 595, 512, - /* 1350 */ 150, 274, 219, 1842, 513, 594, 222, 520, 1820, 501, - /* 1360 */ 514, 2034, 170, 495, 525, 226, 2029, 567, 215, 517, - /* 1370 */ 552, 138, 534, 328, 528, 1819, 1872, 173, 1426, 1791, - /* 1380 */ 1907, 531, 330, 139, 97, 1873, 1875, 598, 1877, 1878, - /* 1390 */ 593, 535, 588, 1874, 84, 275, 86, 2048, 1687, 1960, - /* 1400 */ 1345, 548, 2006, 339, 1956, 64, 1991, 555, 63, 243, - /* 1410 */ 2001, 550, 2005, 1979, 551, 247, 335, 558, 6, 564, - /* 1420 */ 336, 549, 1892, 547, 546, 257, 575, 2027, 572, 1459, - /* 1430 */ 595, 1344, 2051, 256, 252, 1842, 1982, 594, 1976, 57, - /* 1440 */ 131, 1941, 88, 600, 1657, 161, 1874, 33, 343, 1420, - /* 1450 */ 1421, 1422, 1423, 1424, 1428, 1429, 1430, 1431, 1872, 254, - /* 1460 */ 255, 278, 1907, 1730, 260, 269, 97, 1873, 1875, 598, - /* 1470 */ 1877, 1878, 593, 681, 588, 1892, 49, 682, 304, 1935, - /* 1480 */ 290, 1960, 684, 595, 301, 339, 1956, 300, 1842, 1836, - /* 1490 */ 594, 282, 280, 1835, 68, 1834, 1833, 69, 1830, 364, - /* 1500 */ 365, 1309, 1310, 176, 369, 1828, 371, 372, 373, 1827, - /* 1510 */ 375, 1872, 1826, 377, 1874, 1907, 1825, 1824, 381, 97, - /* 1520 */ 1873, 1875, 598, 1877, 1878, 593, 379, 588, 1285, 1284, - /* 1530 */ 1802, 1801, 1933, 386, 1960, 387, 1874, 1800, 339, 1956, - /* 1540 */ 342, 341, 1799, 1892, 134, 1254, 1774, 1773, 1772, 1771, - /* 1550 */ 1331, 595, 1770, 1769, 72, 1768, 1842, 1767, 594, 1766, - /* 1560 */ 1765, 1396, 1764, 1324, 404, 1892, 1763, 405, 407, 1762, - /* 1570 */ 1761, 1760, 1759, 595, 1758, 1757, 1756, 1755, 1842, 1872, - /* 1580 */ 594, 1754, 1753, 1907, 1391, 1752, 1751, 97, 1873, 1875, - /* 1590 */ 598, 1877, 1878, 593, 1874, 588, 1323, 1750, 1749, 1748, - /* 1600 */ 543, 1872, 1960, 135, 1747, 1907, 339, 1956, 1746, 98, - /* 1610 */ 1873, 1875, 598, 1877, 1878, 593, 1745, 588, 1744, 1743, - /* 1620 */ 688, 1742, 1256, 1892, 1960, 1741, 1740, 1739, 1959, 1956, - /* 1630 */ 1606, 595, 1605, 1603, 272, 185, 1842, 1138, 594, 186, - /* 1640 */ 1571, 1570, 1057, 1056, 584, 188, 123, 1815, 164, 165, - /* 1650 */ 189, 445, 124, 678, 674, 670, 666, 270, 1809, 1872, - /* 1660 */ 447, 1798, 194, 1907, 196, 1797, 1783, 98, 1873, 1875, - /* 1670 */ 598, 1877, 1878, 593, 1665, 588, 1602, 1087, 1600, 462, - /* 1680 */ 1598, 463, 1960, 466, 464, 467, 583, 1956, 468, 1596, - /* 1690 */ 470, 472, 1594, 471, 95, 474, 1874, 238, 475, 1583, - /* 1700 */ 1582, 476, 1567, 1667, 1332, 1206, 1327, 1205, 1666, 1123, - /* 1710 */ 1129, 653, 59, 1592, 1128, 655, 1125, 1124, 204, 1587, - /* 1720 */ 324, 1585, 497, 325, 1566, 1892, 326, 1565, 1335, 1337, - /* 1730 */ 537, 500, 1564, 592, 506, 1814, 99, 1301, 1842, 1808, - /* 1740 */ 594, 586, 1389, 1390, 1392, 1393, 1394, 1395, 25, 502, - /* 1750 */ 504, 53, 1291, 515, 516, 1874, 223, 151, 1796, 1794, - /* 1760 */ 2033, 1872, 1795, 227, 1793, 1907, 1792, 1790, 1299, 298, - /* 1770 */ 1873, 1875, 598, 1877, 1878, 593, 591, 588, 541, 1925, - /* 1780 */ 18, 1289, 529, 220, 1892, 327, 228, 234, 82, 521, - /* 1790 */ 1782, 83, 595, 239, 90, 236, 532, 1842, 19, 594, - /* 1800 */ 85, 27, 15, 1408, 20, 1504, 244, 21, 56, 10, - /* 1810 */ 1874, 250, 1407, 1486, 242, 251, 246, 1863, 1488, 159, - /* 1820 */ 1872, 1481, 249, 28, 1907, 29, 61, 22, 157, 1873, - /* 1830 */ 1875, 598, 1877, 1878, 593, 89, 588, 1524, 1525, 1892, - /* 1840 */ 1519, 1518, 337, 1523, 1522, 338, 1456, 595, 1455, 263, - /* 1850 */ 1862, 12, 1842, 1418, 594, 16, 55, 1333, 54, 1365, - /* 1860 */ 162, 163, 174, 1874, 1910, 597, 1169, 1386, 587, 601, - /* 1870 */ 1384, 35, 1184, 1383, 14, 1872, 1357, 23, 599, 1907, - /* 1880 */ 568, 2049, 24, 98, 1873, 1875, 598, 1877, 1878, 593, - /* 1890 */ 1192, 588, 1892, 348, 603, 605, 1189, 329, 1960, 608, - /* 1900 */ 595, 611, 621, 1957, 614, 1842, 606, 594, 1201, 1183, - /* 1910 */ 1182, 1181, 1186, 609, 1874, 1180, 612, 267, 1197, 1178, - /* 1920 */ 615, 91, 92, 67, 1085, 1120, 630, 1119, 1872, 1118, - /* 1930 */ 1117, 1874, 1907, 1116, 642, 1115, 299, 1873, 1875, 598, - /* 1940 */ 1877, 1878, 593, 1892, 588, 1113, 1111, 1110, 1109, 1136, - /* 1950 */ 268, 592, 1107, 1106, 1105, 1104, 1842, 1103, 594, 1102, - /* 1960 */ 1892, 1101, 1100, 1131, 1097, 1133, 1096, 1091, 595, 1093, - /* 1970 */ 1599, 1092, 1090, 1842, 663, 594, 1597, 664, 667, 1872, - /* 1980 */ 665, 1595, 1593, 1907, 671, 668, 669, 298, 1873, 1875, - /* 1990 */ 598, 1877, 1878, 593, 673, 588, 1872, 1926, 672, 675, - /* 2000 */ 1907, 676, 677, 1581, 156, 1873, 1875, 598, 1877, 1878, - /* 2010 */ 593, 1563, 588, 679, 1047, 683, 1874, 271, 1319, 279, - /* 2020 */ 686, 687, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, - /* 2030 */ 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, - /* 2040 */ 1538, 1538, 1538, 1538, 1538, 1892, 1998, 1538, 1538, 1538, - /* 2050 */ 1538, 1538, 1538, 595, 1538, 1538, 1538, 1538, 1842, 1538, - /* 2060 */ 594, 1538, 1538, 1538, 1538, 1538, 1538, 1874, 1538, 1538, - /* 2070 */ 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, - /* 2080 */ 1538, 1872, 1538, 1538, 1538, 1907, 1538, 1538, 1538, 294, - /* 2090 */ 1873, 1875, 598, 1877, 1878, 593, 1892, 588, 1538, 1538, - /* 2100 */ 1538, 1538, 1538, 1538, 595, 1538, 1538, 1538, 1538, 1842, - /* 2110 */ 1538, 594, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, - /* 2120 */ 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, - /* 2130 */ 1874, 1538, 1872, 563, 1538, 1538, 1907, 1538, 1538, 1538, - /* 2140 */ 157, 1873, 1875, 598, 1877, 1878, 593, 1538, 588, 1538, - /* 2150 */ 1874, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1892, - /* 2160 */ 1538, 1538, 1538, 1538, 344, 1538, 1538, 595, 1538, 1538, - /* 2170 */ 1538, 1538, 1842, 1538, 594, 1538, 1538, 1538, 1538, 1892, - /* 2180 */ 1538, 1538, 1538, 1538, 347, 1538, 1538, 595, 1538, 1538, - /* 2190 */ 1538, 1538, 1842, 2050, 594, 1872, 1538, 1538, 1538, 1907, - /* 2200 */ 1538, 1874, 1538, 299, 1873, 1875, 598, 1877, 1878, 593, - /* 2210 */ 1538, 588, 1538, 1538, 1538, 1872, 1538, 1538, 1874, 1907, - /* 2220 */ 1538, 1538, 1538, 299, 1873, 1875, 598, 1877, 1878, 593, - /* 2230 */ 1892, 588, 1538, 1538, 1538, 1538, 1538, 1538, 595, 1538, - /* 2240 */ 1538, 1538, 1538, 1842, 1538, 594, 1538, 1892, 1538, 1538, - /* 2250 */ 1538, 1538, 1538, 1538, 1538, 595, 1538, 1538, 1538, 1538, - /* 2260 */ 1842, 1874, 594, 1538, 1538, 1538, 509, 1538, 1538, 1538, - /* 2270 */ 1907, 1538, 1538, 1538, 292, 1873, 1875, 598, 1877, 1878, - /* 2280 */ 593, 1538, 588, 1872, 1538, 1538, 1538, 1907, 1538, 1538, - /* 2290 */ 1892, 284, 1873, 1875, 598, 1877, 1878, 593, 595, 588, - /* 2300 */ 1538, 1538, 1538, 1842, 1538, 594, 1538, 1538, 1538, 1538, - /* 2310 */ 1538, 1538, 1874, 1538, 1538, 1538, 1538, 1538, 1538, 1538, - /* 2320 */ 1538, 1538, 1538, 1538, 1538, 1538, 1872, 1538, 1538, 1874, - /* 2330 */ 1907, 1538, 1538, 1538, 285, 1873, 1875, 598, 1877, 1878, - /* 2340 */ 593, 1892, 588, 1538, 1538, 1538, 1538, 1538, 1538, 595, - /* 2350 */ 1538, 1538, 1538, 1538, 1842, 1538, 594, 1538, 1892, 1538, - /* 2360 */ 1538, 1538, 1538, 1538, 1538, 1538, 595, 1538, 1538, 1538, - /* 2370 */ 1538, 1842, 1538, 594, 1538, 1538, 1538, 1872, 1538, 1538, - /* 2380 */ 1874, 1907, 1538, 1538, 1538, 286, 1873, 1875, 598, 1877, - /* 2390 */ 1878, 593, 1538, 588, 1872, 1538, 1538, 1538, 1907, 1538, - /* 2400 */ 1538, 1538, 293, 1873, 1875, 598, 1877, 1878, 593, 1892, - /* 2410 */ 588, 1538, 1538, 1538, 1538, 1538, 1538, 595, 1538, 1538, - /* 2420 */ 1538, 1538, 1842, 1538, 594, 1538, 1538, 1538, 1538, 1538, - /* 2430 */ 1538, 1874, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, - /* 2440 */ 1538, 1538, 1538, 1538, 1538, 1872, 1538, 1538, 1538, 1907, - /* 2450 */ 1874, 1538, 1538, 295, 1873, 1875, 598, 1877, 1878, 593, - /* 2460 */ 1892, 588, 1538, 1538, 1538, 1538, 1538, 1538, 595, 1538, - /* 2470 */ 1538, 1538, 1538, 1842, 1538, 594, 1538, 1538, 1538, 1892, - /* 2480 */ 1538, 1538, 1538, 1538, 1538, 1538, 1538, 595, 1538, 1538, - /* 2490 */ 1538, 1538, 1842, 1538, 594, 1538, 1872, 1538, 1538, 1538, - /* 2500 */ 1907, 1538, 1538, 1538, 287, 1873, 1875, 598, 1877, 1878, - /* 2510 */ 593, 1538, 588, 1874, 1538, 1872, 1538, 1538, 1538, 1907, - /* 2520 */ 1538, 1538, 1538, 296, 1873, 1875, 598, 1877, 1878, 593, - /* 2530 */ 1538, 588, 1538, 1538, 1538, 1874, 1538, 1538, 1538, 1538, - /* 2540 */ 1538, 1538, 1892, 1538, 1538, 1538, 1538, 1538, 1538, 1538, - /* 2550 */ 595, 1538, 1538, 1538, 1538, 1842, 1538, 594, 1538, 1538, - /* 2560 */ 1538, 1538, 1538, 1538, 1892, 1538, 1538, 1538, 1538, 1538, - /* 2570 */ 1538, 1538, 595, 1538, 1538, 1538, 1538, 1842, 1872, 594, - /* 2580 */ 1538, 1538, 1907, 1538, 1538, 1538, 288, 1873, 1875, 598, - /* 2590 */ 1877, 1878, 593, 1538, 588, 1874, 1538, 1538, 1538, 1538, - /* 2600 */ 1872, 1538, 1538, 1538, 1907, 1538, 1538, 1538, 297, 1873, - /* 2610 */ 1875, 598, 1877, 1878, 593, 1874, 588, 1538, 1538, 1538, - /* 2620 */ 1538, 1538, 1538, 1538, 1892, 1538, 1538, 1538, 1538, 1538, - /* 2630 */ 1538, 1538, 595, 1538, 1538, 1538, 1538, 1842, 1538, 594, - /* 2640 */ 1538, 1538, 1538, 1538, 1892, 1538, 1538, 1538, 1538, 1538, - /* 2650 */ 1538, 1538, 595, 1538, 1538, 1538, 1538, 1842, 1874, 594, - /* 2660 */ 1872, 1538, 1538, 1538, 1907, 1538, 1538, 1538, 289, 1873, - /* 2670 */ 1875, 598, 1877, 1878, 593, 1538, 588, 1538, 1874, 1538, - /* 2680 */ 1872, 1538, 1538, 1538, 1907, 1538, 1538, 1892, 302, 1873, - /* 2690 */ 1875, 598, 1877, 1878, 593, 595, 588, 1538, 1538, 1538, - /* 2700 */ 1842, 1538, 594, 1538, 1538, 1538, 1538, 1892, 1538, 1538, - /* 2710 */ 1538, 1538, 1538, 1538, 1538, 595, 1538, 1538, 1538, 1538, - /* 2720 */ 1842, 1538, 594, 1872, 1538, 1538, 1538, 1907, 1538, 1874, - /* 2730 */ 1538, 303, 1873, 1875, 598, 1877, 1878, 593, 1538, 588, - /* 2740 */ 1538, 1538, 1538, 1872, 1538, 1538, 1538, 1907, 1538, 1538, - /* 2750 */ 1538, 1886, 1873, 1875, 598, 1877, 1878, 593, 1892, 588, - /* 2760 */ 1538, 1538, 1538, 1538, 1538, 1538, 595, 1538, 1538, 1538, - /* 2770 */ 1538, 1842, 1538, 594, 1538, 1538, 1538, 1538, 1538, 1538, - /* 2780 */ 1874, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, - /* 2790 */ 1538, 1538, 1538, 1538, 1872, 1538, 1538, 1538, 1907, 1874, - /* 2800 */ 1538, 1538, 1885, 1873, 1875, 598, 1877, 1878, 593, 1892, - /* 2810 */ 588, 1538, 1538, 1538, 1538, 1538, 1538, 595, 1538, 1538, - /* 2820 */ 1538, 1538, 1842, 1538, 594, 1538, 1538, 1538, 1892, 1538, - /* 2830 */ 1538, 1538, 1538, 1538, 1538, 1538, 595, 1538, 1538, 1538, - /* 2840 */ 1538, 1842, 1538, 594, 1538, 1872, 1538, 1538, 1538, 1907, - /* 2850 */ 1538, 1538, 1538, 1884, 1873, 1875, 598, 1877, 1878, 593, - /* 2860 */ 1538, 588, 1874, 1538, 1872, 1538, 1538, 1538, 1907, 1538, - /* 2870 */ 1538, 1538, 314, 1873, 1875, 598, 1877, 1878, 593, 1538, - /* 2880 */ 588, 1538, 1538, 1538, 1874, 1538, 1538, 1538, 1538, 1538, - /* 2890 */ 1538, 1892, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 595, - /* 2900 */ 1538, 1538, 1538, 1538, 1842, 1538, 594, 1538, 1538, 1538, - /* 2910 */ 1538, 1538, 1538, 1892, 1538, 1538, 1538, 1538, 1538, 1538, - /* 2920 */ 1538, 595, 1538, 1538, 1538, 1538, 1842, 1872, 594, 1538, - /* 2930 */ 1538, 1907, 1538, 1538, 1538, 315, 1873, 1875, 598, 1877, - /* 2940 */ 1878, 593, 1538, 588, 1874, 1538, 1538, 1538, 1538, 1872, - /* 2950 */ 1538, 1538, 1538, 1907, 1538, 1538, 1538, 311, 1873, 1875, - /* 2960 */ 598, 1877, 1878, 593, 1874, 588, 1538, 1538, 1538, 1538, - /* 2970 */ 1538, 1538, 1538, 1892, 1538, 1538, 1538, 1538, 1538, 1538, - /* 2980 */ 1538, 595, 1538, 1538, 1538, 1538, 1842, 1538, 594, 1538, - /* 2990 */ 1538, 1538, 1538, 1892, 1538, 1538, 1538, 1538, 1538, 1538, - /* 3000 */ 1538, 595, 1538, 1538, 1538, 1538, 1842, 1538, 594, 1872, - /* 3010 */ 1538, 1538, 1538, 1907, 1538, 1538, 1538, 316, 1873, 1875, - /* 3020 */ 598, 1877, 1878, 593, 1538, 588, 1538, 1538, 1538, 1872, - /* 3030 */ 1538, 1538, 1538, 1907, 1538, 1538, 1538, 291, 1873, 1875, - /* 3040 */ 598, 1877, 1878, 593, 1538, 588, + /* 0 */ 1868, 1797, 447, 1868, 448, 1581, 455, 1882, 448, 1581, + /* 10 */ 1684, 1864, 44, 42, 1864, 354, 544, 394, 1738, 1740, + /* 20 */ 349, 1864, 1323, 43, 41, 40, 39, 38, 52, 2042, + /* 30 */ 34, 267, 585, 1403, 1348, 1321, 1900, 1860, 1866, 337, + /* 40 */ 1860, 1866, 343, 1349, 586, 1693, 1350, 1860, 1866, 1850, + /* 50 */ 592, 598, 30, 592, 1671, 310, 1398, 1055, 37, 36, + /* 60 */ 592, 17, 43, 41, 40, 39, 38, 1882, 1329, 44, + /* 70 */ 42, 1473, 1880, 40, 39, 38, 1916, 349, 570, 1323, + /* 80 */ 97, 1881, 1883, 602, 1885, 1886, 597, 1072, 592, 1071, + /* 90 */ 1403, 62, 1321, 168, 1, 1969, 1900, 1059, 1060, 342, + /* 100 */ 1965, 77, 483, 464, 599, 582, 46, 2037, 58, 1850, + /* 110 */ 585, 598, 173, 1398, 464, 125, 689, 1073, 17, 531, + /* 120 */ 1995, 1532, 569, 171, 1688, 1329, 334, 2038, 571, 1794, + /* 130 */ 1405, 1406, 600, 585, 132, 181, 1916, 1547, 154, 227, + /* 140 */ 98, 348, 1883, 602, 1885, 1886, 597, 1696, 592, 1900, + /* 150 */ 1072, 1, 1071, 1217, 1218, 1969, 58, 564, 109, 314, + /* 160 */ 1965, 108, 107, 106, 105, 104, 103, 102, 101, 100, + /* 170 */ 2037, 130, 74, 689, 58, 73, 1324, 58, 1322, 81, + /* 180 */ 1073, 58, 1669, 1569, 46, 569, 171, 1405, 1406, 266, + /* 190 */ 2038, 571, 584, 169, 1977, 1978, 563, 1982, 1739, 1740, + /* 200 */ 1327, 1328, 635, 1378, 1379, 1381, 1382, 1383, 1384, 1385, + /* 210 */ 1386, 1387, 1388, 594, 590, 1396, 1397, 1399, 1400, 1401, + /* 220 */ 1402, 1404, 1407, 3, 205, 1850, 233, 234, 1349, 633, + /* 230 */ 582, 159, 325, 1324, 1477, 1322, 1650, 387, 161, 386, + /* 240 */ 1348, 174, 635, 481, 477, 473, 469, 204, 145, 144, + /* 250 */ 630, 629, 628, 174, 156, 174, 1558, 1327, 1328, 132, + /* 260 */ 1378, 1379, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, + /* 270 */ 594, 590, 1396, 1397, 1399, 1400, 1401, 1402, 1404, 1407, + /* 280 */ 3, 44, 42, 219, 78, 312, 167, 202, 534, 349, + /* 290 */ 335, 1323, 326, 1568, 324, 323, 130, 487, 154, 1732, + /* 300 */ 582, 489, 1403, 174, 1321, 1567, 109, 1695, 1348, 108, + /* 310 */ 107, 106, 105, 104, 103, 102, 101, 100, 170, 1977, + /* 320 */ 1978, 174, 1982, 488, 174, 1398, 565, 1745, 174, 132, + /* 330 */ 17, 1869, 560, 1882, 336, 1850, 232, 1329, 44, 42, + /* 340 */ 79, 312, 1864, 1743, 534, 1787, 349, 1850, 1323, 582, + /* 350 */ 201, 195, 47, 200, 452, 544, 179, 460, 94, 1403, + /* 360 */ 1346, 1321, 1900, 1, 544, 1413, 130, 119, 1860, 1866, + /* 370 */ 586, 1348, 127, 193, 485, 1850, 119, 598, 132, 1745, + /* 380 */ 1685, 592, 1398, 490, 1693, 689, 353, 17, 172, 1977, + /* 390 */ 1978, 395, 1982, 1693, 1329, 1743, 1301, 1302, 1880, 1405, + /* 400 */ 1406, 1499, 1916, 1546, 396, 352, 97, 1881, 1883, 602, + /* 410 */ 1885, 1886, 597, 154, 592, 121, 1135, 566, 561, 168, + /* 420 */ 1, 1969, 1695, 1434, 1380, 342, 1965, 118, 117, 116, + /* 430 */ 115, 114, 113, 112, 111, 110, 2042, 264, 1977, 581, + /* 440 */ 432, 580, 689, 77, 2037, 1324, 1996, 1322, 511, 1137, + /* 450 */ 355, 557, 1497, 1498, 1500, 1501, 1405, 1406, 154, 569, + /* 460 */ 171, 509, 1350, 507, 2038, 571, 1689, 1695, 1347, 1327, + /* 470 */ 1328, 1670, 1378, 1379, 1381, 1382, 1383, 1384, 1385, 1386, + /* 480 */ 1387, 1388, 594, 590, 1396, 1397, 1399, 1400, 1401, 1402, + /* 490 */ 1404, 1407, 3, 31, 11, 446, 185, 184, 450, 174, + /* 500 */ 494, 493, 1324, 1439, 1322, 1329, 1175, 624, 623, 622, + /* 510 */ 1179, 621, 1181, 1182, 620, 1184, 617, 1566, 1190, 614, + /* 520 */ 1192, 1193, 611, 608, 1984, 2042, 1327, 1328, 1532, 1378, + /* 530 */ 1379, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 594, + /* 540 */ 590, 1396, 1397, 1399, 1400, 1401, 1402, 1404, 1407, 3, + /* 550 */ 44, 42, 1981, 544, 2037, 1380, 660, 658, 349, 1850, + /* 560 */ 1323, 11, 1332, 9, 544, 176, 544, 627, 1565, 454, + /* 570 */ 2041, 1403, 450, 1321, 2038, 2040, 392, 633, 393, 1564, + /* 580 */ 37, 36, 1693, 1882, 43, 41, 40, 39, 38, 544, + /* 590 */ 13, 12, 1351, 1693, 1398, 1693, 145, 144, 630, 629, + /* 600 */ 628, 403, 1882, 1668, 544, 266, 1329, 44, 42, 1408, + /* 610 */ 1850, 544, 1900, 1563, 544, 349, 417, 1323, 1693, 1984, + /* 620 */ 599, 1850, 1745, 418, 1562, 1850, 462, 598, 1403, 1745, + /* 630 */ 1321, 1900, 8, 1693, 11, 546, 319, 1941, 1744, 599, + /* 640 */ 1693, 544, 226, 1693, 1850, 1743, 598, 1980, 600, 1561, + /* 650 */ 87, 1398, 1916, 463, 689, 1850, 294, 348, 1883, 602, + /* 660 */ 1885, 1886, 597, 1329, 592, 647, 1850, 1880, 1405, 1406, + /* 670 */ 1693, 1916, 1686, 1560, 570, 97, 1881, 1883, 602, 1885, + /* 680 */ 1886, 597, 80, 592, 1446, 1793, 2037, 307, 2057, 8, + /* 690 */ 1969, 1850, 37, 36, 342, 1965, 43, 41, 40, 39, + /* 700 */ 38, 569, 171, 2037, 2003, 1335, 2038, 571, 544, 633, + /* 710 */ 548, 689, 1941, 383, 1324, 1850, 1322, 1544, 569, 171, + /* 720 */ 356, 1059, 1060, 2038, 571, 1405, 1406, 26, 145, 144, + /* 730 */ 630, 629, 628, 385, 381, 243, 1557, 1693, 1327, 1328, + /* 740 */ 1682, 1378, 1379, 1381, 1382, 1383, 1384, 1385, 1386, 1387, + /* 750 */ 1388, 594, 590, 1396, 1397, 1399, 1400, 1401, 1402, 1404, + /* 760 */ 1407, 3, 37, 36, 544, 1678, 43, 41, 40, 39, + /* 770 */ 38, 1324, 220, 1322, 1787, 1723, 1690, 364, 1850, 174, + /* 780 */ 2041, 1351, 37, 36, 1556, 180, 43, 41, 40, 39, + /* 790 */ 38, 1611, 1555, 1693, 527, 1327, 1328, 7, 1378, 1379, + /* 800 */ 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 594, 590, + /* 810 */ 1396, 1397, 1399, 1400, 1401, 1402, 1404, 1407, 3, 44, + /* 820 */ 42, 544, 1323, 2037, 1554, 1553, 1850, 349, 574, 1323, + /* 830 */ 1552, 531, 1680, 137, 1850, 1321, 544, 1099, 2043, 171, + /* 840 */ 1403, 1795, 1321, 2038, 571, 1676, 1551, 32, 523, 1509, + /* 850 */ 1693, 1470, 1882, 37, 36, 497, 496, 43, 41, 40, + /* 860 */ 39, 38, 126, 1398, 1550, 1693, 1850, 1850, 1329, 2042, + /* 870 */ 1100, 1882, 1850, 492, 495, 1329, 44, 42, 544, 491, + /* 880 */ 544, 1900, 1984, 544, 349, 1792, 1323, 307, 1850, 599, + /* 890 */ 528, 1787, 237, 544, 1850, 540, 598, 1403, 2037, 1321, + /* 900 */ 1900, 8, 183, 1989, 1466, 542, 1850, 1693, 599, 1693, + /* 910 */ 1979, 1348, 1693, 1850, 2041, 598, 689, 1880, 2038, 2039, + /* 920 */ 1398, 1916, 1693, 689, 242, 157, 1881, 1883, 602, 1885, + /* 930 */ 1886, 597, 1329, 592, 489, 223, 1880, 1405, 1406, 1549, + /* 940 */ 1916, 544, 1539, 544, 97, 1881, 1883, 602, 1885, 1886, + /* 950 */ 597, 128, 592, 543, 1940, 268, 488, 2057, 1, 1969, + /* 960 */ 648, 593, 1663, 342, 1965, 631, 549, 2006, 1736, 522, + /* 970 */ 1693, 632, 1693, 2031, 1736, 1598, 1324, 626, 1322, 279, + /* 980 */ 689, 1850, 1723, 1324, 143, 1322, 48, 4, 210, 402, + /* 990 */ 212, 208, 45, 211, 1405, 1406, 214, 498, 1466, 213, + /* 1000 */ 1327, 1328, 1837, 216, 50, 526, 215, 1327, 1328, 1593, + /* 1010 */ 1378, 1379, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, + /* 1020 */ 594, 590, 1396, 1397, 1399, 1400, 1401, 1402, 1404, 1407, + /* 1030 */ 3, 500, 1541, 1542, 577, 573, 51, 1538, 72, 1331, + /* 1040 */ 1324, 231, 1322, 1559, 1272, 575, 37, 36, 589, 371, + /* 1050 */ 43, 41, 40, 39, 38, 37, 36, 138, 2009, 43, + /* 1060 */ 41, 40, 39, 38, 1327, 1328, 1608, 1378, 1379, 1381, + /* 1070 */ 1382, 1383, 1384, 1385, 1386, 1387, 1388, 594, 590, 1396, + /* 1080 */ 1397, 1399, 1400, 1401, 1402, 1404, 1407, 3, 309, 1469, + /* 1090 */ 1346, 13, 12, 235, 93, 1380, 1591, 425, 261, 558, + /* 1100 */ 437, 641, 642, 1651, 90, 482, 37, 36, 142, 537, + /* 1110 */ 43, 41, 40, 39, 38, 143, 60, 410, 503, 438, + /* 1120 */ 247, 412, 60, 1119, 1117, 1587, 255, 45, 1901, 666, + /* 1130 */ 665, 664, 663, 359, 45, 662, 661, 133, 656, 655, + /* 1140 */ 654, 653, 652, 651, 650, 649, 147, 645, 644, 643, + /* 1150 */ 358, 357, 640, 639, 638, 637, 636, 155, 360, 1582, + /* 1160 */ 239, 1999, 285, 322, 1733, 583, 263, 1168, 1496, 260, + /* 1170 */ 2, 5, 250, 684, 1440, 398, 283, 66, 388, 1389, + /* 1180 */ 65, 365, 1334, 1871, 606, 142, 278, 1424, 275, 143, + /* 1190 */ 370, 122, 320, 1489, 142, 527, 189, 443, 441, 1288, + /* 1200 */ 182, 153, 397, 436, 401, 1882, 431, 430, 429, 428, + /* 1210 */ 427, 424, 423, 422, 421, 420, 416, 415, 414, 413, + /* 1220 */ 407, 406, 405, 404, 2037, 400, 399, 321, 1346, 419, + /* 1230 */ 426, 1873, 1789, 58, 1900, 433, 1196, 1200, 434, 2043, + /* 1240 */ 171, 1207, 599, 1205, 2038, 571, 146, 1850, 435, 598, + /* 1250 */ 440, 37, 36, 578, 439, 43, 41, 40, 39, 38, + /* 1260 */ 186, 1352, 442, 444, 445, 453, 1354, 457, 192, 456, + /* 1270 */ 1880, 96, 194, 1353, 1916, 458, 1355, 197, 97, 1881, + /* 1280 */ 1883, 602, 1885, 1886, 597, 459, 592, 497, 496, 129, + /* 1290 */ 461, 141, 1940, 1969, 126, 199, 75, 342, 1965, 76, + /* 1300 */ 465, 530, 203, 362, 315, 492, 495, 71, 70, 391, + /* 1310 */ 361, 491, 178, 120, 484, 486, 1882, 1683, 527, 311, + /* 1320 */ 527, 1828, 207, 1679, 514, 209, 148, 527, 149, 308, + /* 1330 */ 1681, 1677, 379, 276, 377, 373, 369, 366, 363, 150, + /* 1340 */ 516, 221, 151, 518, 517, 1900, 1432, 2037, 224, 2037, + /* 1350 */ 521, 524, 529, 599, 331, 556, 2037, 228, 1850, 538, + /* 1360 */ 598, 515, 2043, 171, 2043, 171, 139, 2038, 571, 2038, + /* 1370 */ 571, 2043, 171, 140, 532, 1827, 2038, 571, 527, 1799, + /* 1380 */ 174, 1880, 535, 333, 84, 1916, 539, 277, 86, 97, + /* 1390 */ 1881, 1883, 602, 1885, 1886, 597, 1694, 592, 1351, 2000, + /* 1400 */ 2010, 1433, 2057, 552, 1969, 559, 245, 2037, 342, 1965, + /* 1410 */ 692, 554, 2015, 555, 338, 249, 6, 2014, 1988, 562, + /* 1420 */ 254, 1882, 2043, 171, 274, 568, 553, 2038, 571, 551, + /* 1430 */ 550, 1991, 162, 256, 339, 259, 579, 257, 165, 576, + /* 1440 */ 1466, 258, 131, 682, 678, 674, 670, 272, 1350, 57, + /* 1450 */ 1900, 1985, 88, 604, 2060, 1950, 1737, 1664, 599, 280, + /* 1460 */ 271, 2036, 685, 1850, 1882, 598, 49, 262, 686, 688, + /* 1470 */ 306, 33, 346, 1427, 1428, 1429, 1430, 1431, 1435, 1436, + /* 1480 */ 1437, 1438, 284, 292, 95, 282, 1880, 240, 1844, 1843, + /* 1490 */ 1916, 68, 303, 1900, 97, 1881, 1883, 602, 1885, 1886, + /* 1500 */ 597, 599, 592, 302, 1842, 1841, 1850, 1944, 598, 1969, + /* 1510 */ 69, 345, 344, 342, 1965, 1838, 367, 1882, 368, 1315, + /* 1520 */ 541, 1337, 1316, 372, 1836, 177, 374, 375, 376, 1880, + /* 1530 */ 1835, 378, 1403, 1916, 1330, 1834, 380, 97, 1881, 1883, + /* 1540 */ 602, 1885, 1886, 597, 384, 592, 1900, 1833, 382, 1832, + /* 1550 */ 1942, 1291, 1969, 229, 599, 1398, 342, 1965, 1290, 1850, + /* 1560 */ 1810, 598, 1809, 1808, 389, 390, 1807, 1329, 1782, 1260, + /* 1570 */ 1882, 1295, 1781, 222, 1779, 134, 1778, 1777, 1780, 135, + /* 1580 */ 1776, 1775, 1880, 1774, 1773, 1772, 1916, 1771, 408, 409, + /* 1590 */ 97, 1881, 1883, 602, 1885, 1886, 597, 1770, 592, 1900, + /* 1600 */ 411, 1769, 1768, 547, 1262, 1969, 1767, 599, 1766, 342, + /* 1610 */ 1965, 1765, 1850, 1882, 598, 588, 1764, 1763, 1762, 1761, + /* 1620 */ 1760, 1759, 1758, 1757, 1756, 1755, 1754, 1753, 136, 1752, + /* 1630 */ 1751, 1750, 1749, 1748, 1747, 1880, 1746, 1613, 1143, 1916, + /* 1640 */ 1612, 1610, 1900, 98, 1881, 1883, 602, 1885, 1886, 597, + /* 1650 */ 599, 592, 187, 1578, 188, 1850, 190, 598, 1969, 1062, + /* 1660 */ 1061, 449, 1968, 1965, 198, 1805, 1882, 123, 1577, 1823, + /* 1670 */ 1817, 1806, 1791, 1672, 124, 1338, 1609, 1333, 1880, 1607, + /* 1680 */ 1605, 166, 1916, 191, 466, 451, 98, 1881, 1883, 602, + /* 1690 */ 1885, 1886, 597, 196, 592, 1900, 468, 467, 470, 1341, + /* 1700 */ 1343, 1969, 471, 596, 1092, 587, 1965, 1603, 1850, 474, + /* 1710 */ 598, 1601, 1590, 590, 1396, 1397, 1399, 1400, 1401, 1402, + /* 1720 */ 472, 476, 1882, 478, 475, 479, 480, 1589, 1574, 1674, + /* 1730 */ 1211, 1880, 1210, 1673, 1134, 1916, 1133, 657, 1130, 300, + /* 1740 */ 1881, 1883, 602, 1885, 1886, 597, 595, 592, 545, 1934, + /* 1750 */ 1129, 1900, 659, 206, 59, 1599, 1128, 327, 1594, 599, + /* 1760 */ 328, 1592, 501, 329, 1850, 504, 598, 1573, 1572, 1571, + /* 1770 */ 510, 99, 506, 1822, 508, 53, 1816, 1297, 1307, 25, + /* 1780 */ 1804, 519, 1802, 1803, 1882, 18, 152, 1880, 1801, 502, + /* 1790 */ 2042, 1916, 1800, 230, 1798, 158, 1881, 1883, 602, 1885, + /* 1800 */ 1886, 597, 236, 592, 512, 1305, 1790, 520, 225, 90, + /* 1810 */ 82, 83, 241, 1900, 85, 1415, 10, 19, 218, 330, + /* 1820 */ 536, 599, 20, 525, 1414, 238, 1850, 1511, 598, 56, + /* 1830 */ 253, 61, 505, 15, 27, 1871, 499, 244, 252, 246, + /* 1840 */ 1493, 217, 1882, 248, 29, 1495, 160, 572, 2058, 1880, + /* 1850 */ 533, 251, 22, 1916, 28, 21, 89, 98, 1881, 1883, + /* 1860 */ 602, 1885, 1886, 597, 1882, 592, 1488, 1526, 1525, 340, + /* 1870 */ 1531, 1900, 1969, 1532, 1530, 1529, 332, 1966, 64, 599, + /* 1880 */ 341, 63, 265, 1870, 1850, 1463, 598, 55, 1462, 163, + /* 1890 */ 12, 1339, 1425, 1900, 1919, 164, 175, 1393, 591, 35, + /* 1900 */ 54, 596, 1391, 1390, 14, 16, 1850, 1880, 598, 23, + /* 1910 */ 24, 1916, 1363, 1371, 1197, 301, 1881, 1883, 602, 1885, + /* 1920 */ 1886, 597, 605, 592, 1882, 601, 603, 351, 609, 1880, + /* 1930 */ 1194, 612, 607, 1916, 615, 610, 613, 300, 1881, 1883, + /* 1940 */ 602, 1885, 1886, 597, 618, 592, 1191, 1935, 1185, 616, + /* 1950 */ 1174, 1183, 619, 1900, 625, 91, 92, 1206, 67, 269, + /* 1960 */ 1202, 599, 1090, 634, 1189, 1188, 1850, 1882, 598, 1125, + /* 1970 */ 1187, 1124, 1186, 1141, 1123, 1122, 1121, 1120, 1118, 1116, + /* 1980 */ 1115, 1114, 1110, 1108, 1882, 646, 1112, 1111, 1109, 1880, + /* 1990 */ 270, 1107, 1106, 1916, 1105, 1138, 1900, 157, 1881, 1883, + /* 2000 */ 602, 1885, 1886, 597, 599, 592, 1136, 1102, 1101, 1850, + /* 2010 */ 1098, 598, 1097, 1900, 1096, 1095, 1606, 667, 669, 1604, + /* 2020 */ 671, 599, 673, 668, 1602, 672, 1850, 677, 598, 675, + /* 2030 */ 1600, 676, 1880, 679, 680, 681, 1916, 1588, 1882, 2007, + /* 2040 */ 296, 1881, 1883, 602, 1885, 1886, 597, 683, 592, 1880, + /* 2050 */ 1052, 1570, 687, 1916, 273, 1325, 1882, 158, 1881, 1883, + /* 2060 */ 602, 1885, 1886, 597, 281, 592, 690, 1900, 691, 1545, + /* 2070 */ 1545, 1545, 347, 1545, 1545, 599, 1545, 1545, 1545, 1545, + /* 2080 */ 1850, 1545, 598, 1545, 567, 1900, 1545, 1545, 1545, 1545, + /* 2090 */ 350, 1545, 1545, 599, 1545, 1545, 1545, 1545, 1850, 1545, + /* 2100 */ 598, 1545, 1545, 1880, 1545, 1545, 1545, 1916, 1545, 1545, + /* 2110 */ 2059, 301, 1881, 1883, 602, 1885, 1886, 597, 1882, 592, + /* 2120 */ 1545, 1880, 1545, 1545, 1545, 1916, 1545, 1545, 1545, 301, + /* 2130 */ 1881, 1883, 602, 1885, 1886, 597, 1545, 592, 1545, 1545, + /* 2140 */ 1545, 1545, 1882, 1545, 1545, 1545, 1545, 1900, 1545, 1545, + /* 2150 */ 1545, 1545, 1545, 1545, 1545, 599, 1545, 1545, 1545, 1545, + /* 2160 */ 1850, 1545, 598, 1545, 1545, 1545, 1545, 1545, 1545, 1545, + /* 2170 */ 1545, 1900, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 599, + /* 2180 */ 1545, 1545, 1545, 513, 1850, 1882, 598, 1916, 1545, 1545, + /* 2190 */ 1545, 294, 1881, 1883, 602, 1885, 1886, 597, 1545, 592, + /* 2200 */ 1545, 1545, 1545, 1545, 1545, 1882, 1545, 1880, 1545, 1545, + /* 2210 */ 1545, 1916, 1545, 1545, 1900, 286, 1881, 1883, 602, 1885, + /* 2220 */ 1886, 597, 599, 592, 1545, 1545, 1545, 1850, 1545, 598, + /* 2230 */ 1545, 1545, 1545, 1545, 1900, 1545, 1545, 1545, 1545, 1545, + /* 2240 */ 1545, 1545, 599, 1545, 1545, 1545, 1545, 1850, 1545, 598, + /* 2250 */ 1880, 1545, 1545, 1545, 1916, 1545, 1545, 1545, 287, 1881, + /* 2260 */ 1883, 602, 1885, 1886, 597, 1545, 592, 1545, 1882, 1545, + /* 2270 */ 1880, 1545, 1545, 1545, 1916, 1545, 1545, 1545, 288, 1881, + /* 2280 */ 1883, 602, 1885, 1886, 597, 1545, 592, 1882, 1545, 1545, + /* 2290 */ 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1900, 1545, 1545, + /* 2300 */ 1545, 1545, 1545, 1545, 1545, 599, 1545, 1545, 1545, 1545, + /* 2310 */ 1850, 1545, 598, 1545, 1545, 1545, 1900, 1545, 1545, 1545, + /* 2320 */ 1545, 1545, 1545, 1545, 599, 1545, 1545, 1545, 1545, 1850, + /* 2330 */ 1882, 598, 1545, 1880, 1545, 1545, 1545, 1916, 1545, 1545, + /* 2340 */ 1545, 295, 1881, 1883, 602, 1885, 1886, 597, 1545, 592, + /* 2350 */ 1545, 1545, 1880, 1545, 1545, 1545, 1916, 1545, 1545, 1900, + /* 2360 */ 297, 1881, 1883, 602, 1885, 1886, 597, 599, 592, 1545, + /* 2370 */ 1545, 1545, 1850, 1545, 598, 1545, 1545, 1545, 1545, 1545, + /* 2380 */ 1545, 1882, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, + /* 2390 */ 1545, 1545, 1545, 1545, 1545, 1880, 1545, 1545, 1545, 1916, + /* 2400 */ 1545, 1882, 1545, 289, 1881, 1883, 602, 1885, 1886, 597, + /* 2410 */ 1900, 592, 1545, 1545, 1545, 1545, 1545, 1545, 599, 1545, + /* 2420 */ 1545, 1545, 1545, 1850, 1545, 598, 1545, 1545, 1545, 1545, + /* 2430 */ 1900, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 599, 1545, + /* 2440 */ 1545, 1545, 1545, 1850, 1545, 598, 1880, 1545, 1545, 1545, + /* 2450 */ 1916, 1545, 1882, 1545, 298, 1881, 1883, 602, 1885, 1886, + /* 2460 */ 597, 1545, 592, 1545, 1545, 1545, 1880, 1545, 1545, 1545, + /* 2470 */ 1916, 1545, 1545, 1545, 290, 1881, 1883, 602, 1885, 1886, + /* 2480 */ 597, 1900, 592, 1545, 1545, 1545, 1545, 1545, 1545, 599, + /* 2490 */ 1545, 1545, 1545, 1545, 1850, 1545, 598, 1545, 1545, 1545, + /* 2500 */ 1545, 1545, 1545, 1545, 1545, 1882, 1545, 1545, 1545, 1545, + /* 2510 */ 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1880, 1545, 1545, + /* 2520 */ 1545, 1916, 1545, 1545, 1545, 299, 1881, 1883, 602, 1885, + /* 2530 */ 1886, 597, 1545, 592, 1900, 1545, 1545, 1545, 1545, 1545, + /* 2540 */ 1545, 1545, 599, 1545, 1545, 1545, 1545, 1850, 1882, 598, + /* 2550 */ 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, + /* 2560 */ 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1882, 1545, + /* 2570 */ 1880, 1545, 1545, 1545, 1916, 1545, 1545, 1900, 291, 1881, + /* 2580 */ 1883, 602, 1885, 1886, 597, 599, 592, 1545, 1545, 1545, + /* 2590 */ 1850, 1545, 598, 1545, 1545, 1545, 1545, 1900, 1545, 1545, + /* 2600 */ 1545, 1545, 1545, 1545, 1545, 599, 1545, 1545, 1545, 1545, + /* 2610 */ 1850, 1545, 598, 1880, 1545, 1545, 1545, 1916, 1545, 1545, + /* 2620 */ 1545, 304, 1881, 1883, 602, 1885, 1886, 597, 1545, 592, + /* 2630 */ 1545, 1882, 1545, 1880, 1545, 1545, 1545, 1916, 1545, 1545, + /* 2640 */ 1545, 305, 1881, 1883, 602, 1885, 1886, 597, 1545, 592, + /* 2650 */ 1882, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, + /* 2660 */ 1900, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 599, 1545, + /* 2670 */ 1545, 1545, 1545, 1850, 1545, 598, 1545, 1545, 1545, 1900, + /* 2680 */ 1545, 1545, 1545, 1545, 1545, 1545, 1545, 599, 1545, 1545, + /* 2690 */ 1545, 1545, 1850, 1882, 598, 1545, 1880, 1545, 1545, 1545, + /* 2700 */ 1916, 1545, 1545, 1545, 1894, 1881, 1883, 602, 1885, 1886, + /* 2710 */ 597, 1545, 592, 1545, 1545, 1880, 1545, 1545, 1545, 1916, + /* 2720 */ 1545, 1545, 1900, 1893, 1881, 1883, 602, 1885, 1886, 597, + /* 2730 */ 599, 592, 1545, 1545, 1545, 1850, 1545, 598, 1545, 1545, + /* 2740 */ 1545, 1545, 1545, 1545, 1882, 1545, 1545, 1545, 1545, 1545, + /* 2750 */ 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1880, 1545, + /* 2760 */ 1545, 1545, 1916, 1545, 1882, 1545, 1892, 1881, 1883, 602, + /* 2770 */ 1885, 1886, 597, 1900, 592, 1545, 1545, 1545, 1545, 1545, + /* 2780 */ 1545, 599, 1545, 1545, 1545, 1545, 1850, 1545, 598, 1545, + /* 2790 */ 1545, 1545, 1545, 1900, 1545, 1545, 1545, 1545, 1545, 1545, + /* 2800 */ 1545, 599, 1545, 1545, 1545, 1545, 1850, 1545, 598, 1880, + /* 2810 */ 1545, 1545, 1545, 1916, 1545, 1882, 1545, 316, 1881, 1883, + /* 2820 */ 602, 1885, 1886, 597, 1545, 592, 1545, 1545, 1545, 1880, + /* 2830 */ 1545, 1545, 1545, 1916, 1545, 1545, 1545, 317, 1881, 1883, + /* 2840 */ 602, 1885, 1886, 597, 1900, 592, 1545, 1545, 1545, 1545, + /* 2850 */ 1545, 1545, 599, 1545, 1545, 1545, 1545, 1850, 1545, 598, + /* 2860 */ 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1882, 1545, + /* 2870 */ 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, + /* 2880 */ 1880, 1545, 1545, 1545, 1916, 1545, 1545, 1545, 313, 1881, + /* 2890 */ 1883, 602, 1885, 1886, 597, 1545, 592, 1900, 1545, 1545, + /* 2900 */ 1545, 1545, 1545, 1545, 1545, 599, 1545, 1545, 1545, 1545, + /* 2910 */ 1850, 1882, 598, 1545, 1545, 1545, 1545, 1545, 1545, 1545, + /* 2920 */ 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, + /* 2930 */ 1545, 1545, 1545, 1880, 1545, 1545, 1545, 1916, 1545, 1545, + /* 2940 */ 1900, 318, 1881, 1883, 602, 1885, 1886, 597, 599, 592, + /* 2950 */ 1545, 1545, 1545, 1850, 1545, 598, 1545, 1545, 1545, 1545, + /* 2960 */ 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, + /* 2970 */ 1545, 1545, 1545, 1545, 1545, 1545, 1880, 1545, 1545, 1545, + /* 2980 */ 1916, 1545, 1545, 1545, 293, 1881, 1883, 602, 1885, 1886, + /* 2990 */ 597, 1545, 592, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 350, 0, 323, 350, 325, 326, 323, 319, 325, 326, - /* 10 */ 350, 361, 12, 13, 361, 359, 327, 349, 362, 363, - /* 20 */ 20, 361, 22, 12, 13, 14, 15, 16, 339, 3, - /* 30 */ 14, 15, 16, 33, 4, 35, 348, 387, 388, 389, - /* 40 */ 387, 388, 389, 20, 356, 356, 20, 387, 388, 361, - /* 50 */ 400, 363, 2, 400, 324, 20, 56, 327, 8, 9, - /* 60 */ 400, 61, 12, 13, 14, 15, 16, 319, 68, 12, - /* 70 */ 13, 14, 384, 35, 44, 45, 388, 20, 393, 22, - /* 80 */ 392, 393, 394, 395, 396, 397, 398, 20, 400, 22, - /* 90 */ 33, 319, 35, 405, 94, 407, 348, 362, 363, 411, - /* 100 */ 412, 331, 35, 348, 356, 327, 68, 422, 14, 361, - /* 110 */ 355, 363, 424, 56, 20, 345, 116, 50, 61, 364, - /* 120 */ 432, 95, 437, 438, 354, 68, 0, 442, 443, 94, - /* 130 */ 130, 131, 384, 361, 356, 4, 388, 0, 319, 56, - /* 140 */ 392, 393, 394, 395, 396, 397, 398, 390, 400, 348, - /* 150 */ 329, 94, 20, 130, 131, 407, 94, 356, 21, 411, - /* 160 */ 412, 24, 25, 26, 27, 28, 29, 30, 31, 32, - /* 170 */ 422, 393, 351, 116, 363, 418, 176, 94, 178, 96, - /* 180 */ 361, 370, 408, 409, 373, 437, 438, 130, 131, 163, - /* 190 */ 442, 443, 414, 415, 416, 417, 395, 419, 161, 324, - /* 200 */ 200, 201, 327, 203, 204, 205, 206, 207, 208, 209, + /* 0 */ 351, 0, 324, 351, 326, 327, 324, 320, 326, 327, + /* 10 */ 351, 362, 12, 13, 362, 360, 328, 328, 363, 364, + /* 20 */ 20, 362, 22, 12, 13, 14, 15, 16, 340, 3, + /* 30 */ 409, 410, 20, 33, 20, 35, 349, 388, 389, 390, + /* 40 */ 388, 389, 390, 20, 357, 357, 20, 388, 389, 362, + /* 50 */ 401, 364, 2, 401, 0, 366, 56, 4, 8, 9, + /* 60 */ 401, 61, 12, 13, 14, 15, 16, 320, 68, 12, + /* 70 */ 13, 14, 385, 14, 15, 16, 389, 20, 394, 22, + /* 80 */ 393, 394, 395, 396, 397, 398, 399, 20, 401, 22, + /* 90 */ 33, 4, 35, 406, 94, 408, 349, 44, 45, 412, + /* 100 */ 413, 332, 35, 60, 357, 328, 94, 423, 94, 362, + /* 110 */ 20, 364, 425, 56, 60, 346, 116, 50, 61, 364, + /* 120 */ 433, 95, 438, 439, 355, 68, 371, 443, 444, 374, + /* 130 */ 130, 131, 385, 20, 357, 56, 389, 0, 349, 56, + /* 140 */ 393, 394, 395, 396, 397, 398, 399, 358, 401, 349, + /* 150 */ 20, 94, 22, 130, 131, 408, 94, 357, 21, 412, + /* 160 */ 413, 24, 25, 26, 27, 28, 29, 30, 31, 32, + /* 170 */ 423, 394, 93, 116, 94, 96, 176, 94, 178, 96, + /* 180 */ 50, 94, 0, 320, 94, 438, 439, 130, 131, 163, + /* 190 */ 443, 444, 415, 416, 417, 418, 396, 420, 363, 364, + /* 200 */ 200, 201, 60, 203, 204, 205, 206, 207, 208, 209, /* 210 */ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - /* 220 */ 220, 221, 222, 20, 33, 94, 94, 329, 158, 318, - /* 230 */ 327, 320, 106, 176, 20, 178, 94, 175, 47, 177, - /* 240 */ 240, 343, 200, 52, 53, 54, 55, 56, 78, 351, - /* 250 */ 14, 125, 126, 127, 128, 129, 20, 200, 201, 356, + /* 220 */ 220, 221, 222, 223, 33, 362, 125, 126, 20, 106, + /* 230 */ 328, 333, 37, 176, 14, 178, 338, 175, 47, 177, + /* 240 */ 20, 241, 60, 52, 53, 54, 55, 56, 125, 126, + /* 250 */ 127, 128, 129, 241, 319, 241, 321, 200, 201, 357, /* 260 */ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, /* 270 */ 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, - /* 280 */ 12, 13, 245, 246, 93, 334, 335, 96, 20, 350, - /* 290 */ 22, 249, 250, 251, 252, 253, 393, 227, 204, 327, - /* 300 */ 361, 33, 240, 35, 134, 135, 21, 237, 94, 24, - /* 310 */ 25, 26, 27, 28, 29, 30, 31, 32, 415, 416, - /* 320 */ 417, 106, 419, 240, 56, 60, 387, 388, 356, 61, - /* 330 */ 393, 224, 319, 226, 327, 171, 68, 12, 13, 400, - /* 340 */ 125, 126, 127, 128, 129, 20, 339, 22, 327, 332, - /* 350 */ 159, 160, 94, 162, 337, 191, 192, 166, 33, 422, - /* 360 */ 35, 348, 94, 356, 20, 393, 327, 393, 404, 356, - /* 370 */ 406, 240, 240, 182, 361, 438, 363, 356, 339, 442, - /* 380 */ 443, 56, 240, 327, 116, 346, 61, 415, 416, 417, - /* 390 */ 126, 419, 20, 68, 22, 356, 422, 384, 130, 131, - /* 400 */ 20, 388, 0, 125, 126, 392, 393, 394, 395, 396, - /* 410 */ 397, 398, 438, 400, 393, 20, 442, 443, 405, 94, - /* 420 */ 407, 365, 50, 327, 411, 412, 24, 25, 26, 27, - /* 430 */ 28, 29, 30, 31, 32, 339, 415, 416, 417, 390, - /* 440 */ 419, 116, 346, 422, 176, 432, 178, 183, 184, 60, - /* 450 */ 348, 187, 356, 20, 240, 130, 131, 355, 437, 438, - /* 460 */ 1, 2, 184, 442, 443, 187, 364, 418, 200, 201, - /* 470 */ 0, 203, 204, 205, 206, 207, 208, 209, 210, 211, - /* 480 */ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - /* 490 */ 222, 125, 224, 14, 404, 316, 406, 37, 240, 20, - /* 500 */ 331, 176, 372, 178, 374, 107, 108, 109, 110, 111, - /* 510 */ 112, 113, 114, 115, 116, 117, 43, 119, 120, 121, - /* 520 */ 122, 123, 124, 354, 105, 200, 201, 56, 203, 204, - /* 530 */ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, - /* 540 */ 215, 216, 217, 218, 219, 220, 221, 222, 12, 13, - /* 550 */ 22, 185, 186, 340, 95, 376, 20, 97, 22, 99, - /* 560 */ 100, 348, 102, 35, 93, 327, 106, 96, 95, 33, - /* 570 */ 357, 35, 393, 0, 376, 390, 106, 339, 8, 9, - /* 580 */ 347, 319, 12, 13, 14, 15, 16, 20, 128, 224, - /* 590 */ 20, 393, 56, 360, 356, 125, 126, 127, 128, 129, - /* 600 */ 319, 422, 327, 418, 68, 12, 13, 14, 334, 335, - /* 610 */ 348, 319, 68, 20, 339, 22, 437, 438, 356, 68, - /* 620 */ 422, 442, 443, 361, 56, 363, 33, 348, 35, 348, - /* 630 */ 94, 356, 21, 60, 355, 437, 438, 356, 3, 327, - /* 640 */ 442, 443, 361, 364, 363, 34, 384, 36, 0, 56, - /* 650 */ 388, 339, 116, 361, 392, 393, 394, 395, 396, 397, - /* 660 */ 398, 68, 400, 340, 96, 384, 130, 131, 356, 388, - /* 670 */ 349, 348, 393, 392, 393, 394, 395, 396, 397, 398, - /* 680 */ 357, 400, 341, 204, 422, 344, 405, 94, 407, 319, - /* 690 */ 8, 9, 411, 412, 12, 13, 14, 15, 16, 437, - /* 700 */ 438, 422, 421, 327, 442, 443, 327, 43, 60, 116, - /* 710 */ 363, 372, 176, 374, 178, 339, 437, 438, 339, 320, - /* 720 */ 373, 442, 443, 130, 131, 348, 358, 356, 319, 361, - /* 730 */ 163, 361, 356, 163, 357, 356, 200, 201, 367, 203, - /* 740 */ 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - /* 750 */ 214, 215, 216, 217, 218, 219, 220, 221, 222, 95, - /* 760 */ 8, 9, 327, 327, 12, 13, 14, 15, 16, 176, - /* 770 */ 361, 178, 340, 349, 339, 339, 240, 95, 8, 9, - /* 780 */ 348, 319, 12, 13, 14, 15, 16, 403, 319, 357, - /* 790 */ 406, 356, 356, 200, 201, 43, 203, 204, 205, 206, - /* 800 */ 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - /* 810 */ 217, 218, 219, 220, 221, 222, 12, 13, 376, 22, - /* 820 */ 356, 319, 348, 361, 20, 358, 22, 319, 361, 3, - /* 830 */ 361, 367, 35, 327, 319, 393, 349, 33, 364, 35, - /* 840 */ 2, 376, 44, 45, 106, 339, 8, 9, 319, 319, - /* 850 */ 12, 13, 14, 15, 16, 336, 39, 338, 393, 327, - /* 860 */ 56, 4, 356, 361, 422, 68, 128, 319, 319, 361, - /* 870 */ 327, 339, 68, 12, 13, 43, 361, 327, 348, 437, - /* 880 */ 438, 20, 339, 22, 442, 443, 356, 422, 356, 339, - /* 890 */ 361, 361, 257, 363, 33, 20, 35, 348, 94, 356, - /* 900 */ 380, 341, 437, 438, 344, 356, 356, 442, 443, 361, - /* 910 */ 361, 20, 363, 116, 384, 0, 319, 56, 388, 327, - /* 920 */ 116, 95, 392, 393, 394, 395, 396, 397, 398, 68, - /* 930 */ 400, 339, 349, 384, 130, 131, 319, 388, 168, 42, - /* 940 */ 43, 392, 393, 394, 395, 396, 397, 398, 356, 400, - /* 950 */ 64, 65, 319, 61, 405, 94, 407, 71, 361, 0, - /* 960 */ 411, 412, 47, 433, 434, 238, 239, 327, 82, 83, - /* 970 */ 421, 0, 327, 176, 88, 178, 35, 116, 361, 339, - /* 980 */ 176, 22, 178, 376, 339, 319, 98, 98, 319, 101, - /* 990 */ 101, 130, 131, 349, 361, 43, 356, 200, 201, 319, - /* 1000 */ 393, 356, 163, 164, 200, 201, 319, 203, 204, 205, - /* 1010 */ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, - /* 1020 */ 216, 217, 218, 219, 220, 221, 222, 361, 327, 422, - /* 1030 */ 361, 327, 262, 130, 131, 64, 65, 176, 163, 178, - /* 1040 */ 339, 361, 71, 339, 437, 438, 43, 95, 361, 442, - /* 1050 */ 443, 349, 43, 82, 83, 98, 239, 356, 101, 88, - /* 1060 */ 356, 200, 201, 0, 203, 204, 205, 206, 207, 208, - /* 1070 */ 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, - /* 1080 */ 219, 220, 221, 222, 18, 327, 20, 98, 1, 2, - /* 1090 */ 101, 259, 200, 27, 35, 204, 30, 339, 241, 0, - /* 1100 */ 0, 94, 8, 9, 95, 391, 12, 13, 14, 15, - /* 1110 */ 16, 104, 337, 47, 356, 49, 43, 51, 43, 178, - /* 1120 */ 43, 22, 22, 446, 43, 43, 63, 64, 65, 66, - /* 1130 */ 67, 43, 69, 70, 71, 72, 73, 74, 75, 76, - /* 1140 */ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - /* 1150 */ 87, 88, 89, 90, 435, 18, 328, 8, 9, 93, - /* 1160 */ 23, 12, 13, 14, 15, 16, 429, 35, 95, 13, - /* 1170 */ 95, 105, 95, 43, 37, 38, 95, 95, 41, 46, - /* 1180 */ 8, 9, 348, 95, 12, 13, 14, 15, 16, 95, - /* 1190 */ 43, 35, 328, 326, 57, 58, 59, 43, 391, 133, - /* 1200 */ 68, 319, 136, 137, 138, 139, 140, 141, 142, 143, - /* 1210 */ 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, - /* 1220 */ 43, 155, 156, 157, 13, 95, 360, 94, 8, 9, - /* 1230 */ 348, 94, 12, 13, 14, 15, 16, 178, 356, 43, - /* 1240 */ 43, 420, 95, 361, 439, 363, 35, 0, 413, 95, - /* 1250 */ 423, 386, 242, 47, 385, 378, 42, 174, 368, 20, - /* 1260 */ 327, 327, 368, 158, 261, 366, 384, 366, 92, 132, - /* 1270 */ 388, 333, 95, 327, 392, 393, 394, 395, 396, 397, - /* 1280 */ 398, 61, 400, 327, 20, 403, 321, 405, 406, 407, - /* 1290 */ 327, 95, 95, 411, 412, 48, 321, 20, 382, 331, - /* 1300 */ 376, 331, 363, 20, 375, 168, 169, 170, 20, 377, - /* 1310 */ 173, 319, 163, 331, 331, 375, 4, 393, 331, 331, - /* 1320 */ 327, 331, 321, 103, 348, 348, 348, 190, 348, 348, - /* 1330 */ 193, 19, 195, 196, 197, 198, 199, 321, 327, 348, - /* 1340 */ 348, 189, 348, 348, 348, 33, 422, 348, 356, 383, - /* 1350 */ 348, 382, 329, 361, 181, 363, 329, 327, 361, 47, - /* 1360 */ 381, 437, 438, 51, 327, 329, 442, 443, 56, 363, - /* 1370 */ 247, 371, 160, 375, 361, 361, 384, 240, 158, 361, - /* 1380 */ 388, 361, 361, 371, 392, 393, 394, 395, 396, 397, - /* 1390 */ 398, 369, 400, 319, 329, 344, 329, 405, 356, 407, - /* 1400 */ 20, 361, 428, 411, 412, 93, 391, 248, 96, 371, - /* 1410 */ 391, 361, 428, 421, 361, 371, 361, 361, 254, 167, - /* 1420 */ 263, 256, 348, 255, 243, 386, 260, 441, 258, 239, - /* 1430 */ 356, 20, 447, 425, 430, 361, 431, 363, 390, 94, - /* 1440 */ 356, 410, 94, 352, 338, 428, 319, 227, 228, 229, - /* 1450 */ 230, 231, 232, 233, 234, 235, 236, 237, 384, 427, - /* 1460 */ 426, 327, 388, 361, 440, 329, 392, 393, 394, 395, - /* 1470 */ 396, 397, 398, 36, 400, 348, 379, 322, 374, 405, - /* 1480 */ 342, 407, 321, 356, 342, 411, 412, 342, 361, 0, - /* 1490 */ 363, 317, 330, 0, 183, 0, 0, 42, 0, 35, - /* 1500 */ 194, 35, 35, 35, 194, 0, 35, 35, 194, 0, - /* 1510 */ 194, 384, 0, 35, 319, 388, 0, 0, 35, 392, - /* 1520 */ 393, 394, 395, 396, 397, 398, 22, 400, 178, 176, - /* 1530 */ 0, 0, 405, 172, 407, 171, 319, 0, 411, 412, - /* 1540 */ 12, 13, 0, 348, 42, 46, 0, 0, 0, 0, - /* 1550 */ 22, 356, 0, 0, 154, 0, 361, 0, 363, 0, - /* 1560 */ 0, 33, 0, 35, 149, 348, 0, 35, 149, 0, - /* 1570 */ 0, 0, 0, 356, 0, 0, 0, 0, 361, 384, - /* 1580 */ 363, 0, 0, 388, 56, 0, 0, 392, 393, 394, - /* 1590 */ 395, 396, 397, 398, 319, 400, 68, 0, 0, 0, - /* 1600 */ 405, 384, 407, 42, 0, 388, 411, 412, 0, 392, - /* 1610 */ 393, 394, 395, 396, 397, 398, 0, 400, 0, 0, - /* 1620 */ 19, 0, 22, 348, 407, 0, 0, 0, 411, 412, - /* 1630 */ 0, 356, 0, 0, 33, 56, 361, 35, 363, 56, - /* 1640 */ 0, 0, 14, 14, 116, 42, 39, 0, 47, 43, - /* 1650 */ 40, 46, 39, 52, 53, 54, 55, 56, 0, 384, - /* 1660 */ 46, 0, 39, 388, 167, 0, 0, 392, 393, 394, - /* 1670 */ 395, 396, 397, 398, 0, 400, 0, 62, 0, 35, - /* 1680 */ 0, 47, 407, 35, 39, 47, 411, 412, 39, 0, - /* 1690 */ 35, 39, 0, 47, 93, 35, 319, 96, 47, 0, - /* 1700 */ 0, 39, 0, 0, 176, 35, 178, 22, 0, 22, - /* 1710 */ 35, 43, 103, 0, 35, 43, 35, 35, 101, 0, - /* 1720 */ 22, 0, 49, 22, 0, 348, 22, 0, 200, 201, - /* 1730 */ 129, 35, 0, 356, 22, 0, 20, 95, 361, 0, - /* 1740 */ 363, 213, 214, 215, 216, 217, 218, 219, 94, 35, - /* 1750 */ 35, 163, 35, 22, 163, 319, 160, 179, 0, 0, - /* 1760 */ 3, 384, 0, 162, 0, 388, 0, 0, 35, 392, - /* 1770 */ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, - /* 1780 */ 94, 180, 188, 182, 348, 163, 95, 94, 94, 165, - /* 1790 */ 0, 39, 356, 46, 104, 159, 161, 361, 43, 363, - /* 1800 */ 94, 94, 244, 223, 43, 95, 95, 244, 43, 225, - /* 1810 */ 319, 43, 223, 95, 94, 46, 94, 46, 95, 94, - /* 1820 */ 384, 95, 94, 94, 388, 43, 3, 43, 392, 393, - /* 1830 */ 394, 395, 396, 397, 398, 94, 400, 95, 95, 348, - /* 1840 */ 35, 35, 35, 35, 35, 35, 95, 356, 95, 46, - /* 1850 */ 46, 2, 361, 200, 363, 244, 43, 22, 238, 22, - /* 1860 */ 46, 46, 46, 319, 94, 202, 22, 95, 94, 35, - /* 1870 */ 95, 94, 118, 95, 94, 384, 95, 94, 105, 388, - /* 1880 */ 444, 445, 94, 392, 393, 394, 395, 396, 397, 398, - /* 1890 */ 95, 400, 348, 35, 94, 35, 95, 353, 407, 35, - /* 1900 */ 356, 35, 106, 412, 35, 361, 94, 363, 35, 118, - /* 1910 */ 118, 118, 95, 94, 319, 95, 94, 43, 22, 95, - /* 1920 */ 94, 94, 94, 94, 62, 35, 61, 35, 384, 35, - /* 1930 */ 35, 319, 388, 35, 91, 35, 392, 393, 394, 395, - /* 1940 */ 396, 397, 398, 348, 400, 35, 35, 35, 35, 68, - /* 1950 */ 43, 356, 35, 35, 22, 35, 361, 22, 363, 35, - /* 1960 */ 348, 35, 35, 35, 35, 68, 35, 22, 356, 35, - /* 1970 */ 0, 35, 35, 361, 35, 363, 0, 47, 35, 384, - /* 1980 */ 39, 0, 0, 388, 35, 47, 39, 392, 393, 394, - /* 1990 */ 395, 396, 397, 398, 39, 400, 384, 402, 47, 35, - /* 2000 */ 388, 47, 39, 0, 392, 393, 394, 395, 396, 397, - /* 2010 */ 398, 0, 400, 35, 35, 21, 319, 22, 22, 22, - /* 2020 */ 21, 20, 448, 448, 448, 448, 448, 448, 448, 448, - /* 2030 */ 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, - /* 2040 */ 448, 448, 448, 448, 448, 348, 434, 448, 448, 448, - /* 2050 */ 448, 448, 448, 356, 448, 448, 448, 448, 361, 448, - /* 2060 */ 363, 448, 448, 448, 448, 448, 448, 319, 448, 448, - /* 2070 */ 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, - /* 2080 */ 448, 384, 448, 448, 448, 388, 448, 448, 448, 392, - /* 2090 */ 393, 394, 395, 396, 397, 398, 348, 400, 448, 448, - /* 2100 */ 448, 448, 448, 448, 356, 448, 448, 448, 448, 361, - /* 2110 */ 448, 363, 448, 448, 448, 448, 448, 448, 448, 448, - /* 2120 */ 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, - /* 2130 */ 319, 448, 384, 436, 448, 448, 388, 448, 448, 448, - /* 2140 */ 392, 393, 394, 395, 396, 397, 398, 448, 400, 448, - /* 2150 */ 319, 448, 448, 448, 448, 448, 448, 448, 448, 348, - /* 2160 */ 448, 448, 448, 448, 353, 448, 448, 356, 448, 448, - /* 2170 */ 448, 448, 361, 448, 363, 448, 448, 448, 448, 348, - /* 2180 */ 448, 448, 448, 448, 353, 448, 448, 356, 448, 448, - /* 2190 */ 448, 448, 361, 445, 363, 384, 448, 448, 448, 388, - /* 2200 */ 448, 319, 448, 392, 393, 394, 395, 396, 397, 398, - /* 2210 */ 448, 400, 448, 448, 448, 384, 448, 448, 319, 388, - /* 2220 */ 448, 448, 448, 392, 393, 394, 395, 396, 397, 398, - /* 2230 */ 348, 400, 448, 448, 448, 448, 448, 448, 356, 448, - /* 2240 */ 448, 448, 448, 361, 448, 363, 448, 348, 448, 448, - /* 2250 */ 448, 448, 448, 448, 448, 356, 448, 448, 448, 448, - /* 2260 */ 361, 319, 363, 448, 448, 448, 384, 448, 448, 448, - /* 2270 */ 388, 448, 448, 448, 392, 393, 394, 395, 396, 397, - /* 2280 */ 398, 448, 400, 384, 448, 448, 448, 388, 448, 448, - /* 2290 */ 348, 392, 393, 394, 395, 396, 397, 398, 356, 400, - /* 2300 */ 448, 448, 448, 361, 448, 363, 448, 448, 448, 448, - /* 2310 */ 448, 448, 319, 448, 448, 448, 448, 448, 448, 448, - /* 2320 */ 448, 448, 448, 448, 448, 448, 384, 448, 448, 319, - /* 2330 */ 388, 448, 448, 448, 392, 393, 394, 395, 396, 397, - /* 2340 */ 398, 348, 400, 448, 448, 448, 448, 448, 448, 356, - /* 2350 */ 448, 448, 448, 448, 361, 448, 363, 448, 348, 448, - /* 2360 */ 448, 448, 448, 448, 448, 448, 356, 448, 448, 448, - /* 2370 */ 448, 361, 448, 363, 448, 448, 448, 384, 448, 448, - /* 2380 */ 319, 388, 448, 448, 448, 392, 393, 394, 395, 396, - /* 2390 */ 397, 398, 448, 400, 384, 448, 448, 448, 388, 448, - /* 2400 */ 448, 448, 392, 393, 394, 395, 396, 397, 398, 348, - /* 2410 */ 400, 448, 448, 448, 448, 448, 448, 356, 448, 448, - /* 2420 */ 448, 448, 361, 448, 363, 448, 448, 448, 448, 448, - /* 2430 */ 448, 319, 448, 448, 448, 448, 448, 448, 448, 448, - /* 2440 */ 448, 448, 448, 448, 448, 384, 448, 448, 448, 388, - /* 2450 */ 319, 448, 448, 392, 393, 394, 395, 396, 397, 398, - /* 2460 */ 348, 400, 448, 448, 448, 448, 448, 448, 356, 448, - /* 2470 */ 448, 448, 448, 361, 448, 363, 448, 448, 448, 348, - /* 2480 */ 448, 448, 448, 448, 448, 448, 448, 356, 448, 448, - /* 2490 */ 448, 448, 361, 448, 363, 448, 384, 448, 448, 448, - /* 2500 */ 388, 448, 448, 448, 392, 393, 394, 395, 396, 397, - /* 2510 */ 398, 448, 400, 319, 448, 384, 448, 448, 448, 388, - /* 2520 */ 448, 448, 448, 392, 393, 394, 395, 396, 397, 398, - /* 2530 */ 448, 400, 448, 448, 448, 319, 448, 448, 448, 448, - /* 2540 */ 448, 448, 348, 448, 448, 448, 448, 448, 448, 448, - /* 2550 */ 356, 448, 448, 448, 448, 361, 448, 363, 448, 448, - /* 2560 */ 448, 448, 448, 448, 348, 448, 448, 448, 448, 448, - /* 2570 */ 448, 448, 356, 448, 448, 448, 448, 361, 384, 363, - /* 2580 */ 448, 448, 388, 448, 448, 448, 392, 393, 394, 395, - /* 2590 */ 396, 397, 398, 448, 400, 319, 448, 448, 448, 448, - /* 2600 */ 384, 448, 448, 448, 388, 448, 448, 448, 392, 393, - /* 2610 */ 394, 395, 396, 397, 398, 319, 400, 448, 448, 448, - /* 2620 */ 448, 448, 448, 448, 348, 448, 448, 448, 448, 448, - /* 2630 */ 448, 448, 356, 448, 448, 448, 448, 361, 448, 363, - /* 2640 */ 448, 448, 448, 448, 348, 448, 448, 448, 448, 448, - /* 2650 */ 448, 448, 356, 448, 448, 448, 448, 361, 319, 363, - /* 2660 */ 384, 448, 448, 448, 388, 448, 448, 448, 392, 393, - /* 2670 */ 394, 395, 396, 397, 398, 448, 400, 448, 319, 448, - /* 2680 */ 384, 448, 448, 448, 388, 448, 448, 348, 392, 393, - /* 2690 */ 394, 395, 396, 397, 398, 356, 400, 448, 448, 448, - /* 2700 */ 361, 448, 363, 448, 448, 448, 448, 348, 448, 448, - /* 2710 */ 448, 448, 448, 448, 448, 356, 448, 448, 448, 448, - /* 2720 */ 361, 448, 363, 384, 448, 448, 448, 388, 448, 319, - /* 2730 */ 448, 392, 393, 394, 395, 396, 397, 398, 448, 400, - /* 2740 */ 448, 448, 448, 384, 448, 448, 448, 388, 448, 448, - /* 2750 */ 448, 392, 393, 394, 395, 396, 397, 398, 348, 400, - /* 2760 */ 448, 448, 448, 448, 448, 448, 356, 448, 448, 448, - /* 2770 */ 448, 361, 448, 363, 448, 448, 448, 448, 448, 448, - /* 2780 */ 319, 448, 448, 448, 448, 448, 448, 448, 448, 448, - /* 2790 */ 448, 448, 448, 448, 384, 448, 448, 448, 388, 319, - /* 2800 */ 448, 448, 392, 393, 394, 395, 396, 397, 398, 348, - /* 2810 */ 400, 448, 448, 448, 448, 448, 448, 356, 448, 448, - /* 2820 */ 448, 448, 361, 448, 363, 448, 448, 448, 348, 448, - /* 2830 */ 448, 448, 448, 448, 448, 448, 356, 448, 448, 448, - /* 2840 */ 448, 361, 448, 363, 448, 384, 448, 448, 448, 388, - /* 2850 */ 448, 448, 448, 392, 393, 394, 395, 396, 397, 398, - /* 2860 */ 448, 400, 319, 448, 384, 448, 448, 448, 388, 448, - /* 2870 */ 448, 448, 392, 393, 394, 395, 396, 397, 398, 448, - /* 2880 */ 400, 448, 448, 448, 319, 448, 448, 448, 448, 448, - /* 2890 */ 448, 348, 448, 448, 448, 448, 448, 448, 448, 356, - /* 2900 */ 448, 448, 448, 448, 361, 448, 363, 448, 448, 448, - /* 2910 */ 448, 448, 448, 348, 448, 448, 448, 448, 448, 448, - /* 2920 */ 448, 356, 448, 448, 448, 448, 361, 384, 363, 448, - /* 2930 */ 448, 388, 448, 448, 448, 392, 393, 394, 395, 396, - /* 2940 */ 397, 398, 448, 400, 319, 448, 448, 448, 448, 384, - /* 2950 */ 448, 448, 448, 388, 448, 448, 448, 392, 393, 394, - /* 2960 */ 395, 396, 397, 398, 319, 400, 448, 448, 448, 448, - /* 2970 */ 448, 448, 448, 348, 448, 448, 448, 448, 448, 448, - /* 2980 */ 448, 356, 448, 448, 448, 448, 361, 448, 363, 448, - /* 2990 */ 448, 448, 448, 348, 448, 448, 448, 448, 448, 448, - /* 3000 */ 448, 356, 448, 448, 448, 448, 361, 448, 363, 384, - /* 3010 */ 448, 448, 448, 388, 448, 448, 448, 392, 393, 394, - /* 3020 */ 395, 396, 397, 398, 448, 400, 448, 448, 448, 384, - /* 3030 */ 448, 448, 448, 388, 448, 448, 448, 392, 393, 394, - /* 3040 */ 395, 396, 397, 398, 448, 400, + /* 280 */ 223, 12, 13, 126, 93, 184, 348, 96, 187, 20, + /* 290 */ 341, 22, 97, 320, 99, 100, 394, 102, 349, 361, + /* 300 */ 328, 106, 33, 241, 35, 320, 21, 358, 20, 24, + /* 310 */ 25, 26, 27, 28, 29, 30, 31, 32, 416, 417, + /* 320 */ 418, 241, 420, 128, 241, 56, 20, 349, 241, 357, + /* 330 */ 61, 351, 161, 320, 356, 362, 125, 68, 12, 13, + /* 340 */ 183, 184, 362, 365, 187, 357, 20, 362, 22, 328, + /* 350 */ 159, 160, 94, 162, 14, 328, 368, 166, 330, 33, + /* 360 */ 20, 35, 349, 94, 328, 14, 394, 340, 388, 389, + /* 370 */ 357, 20, 344, 182, 347, 362, 340, 364, 357, 349, + /* 380 */ 352, 401, 56, 347, 357, 116, 356, 61, 416, 417, + /* 390 */ 418, 22, 420, 357, 68, 365, 185, 186, 385, 130, + /* 400 */ 131, 200, 389, 0, 35, 341, 393, 394, 395, 396, + /* 410 */ 397, 398, 399, 349, 401, 394, 35, 246, 247, 406, + /* 420 */ 94, 408, 358, 158, 204, 412, 413, 24, 25, 26, + /* 430 */ 27, 28, 29, 30, 31, 32, 3, 416, 417, 418, + /* 440 */ 78, 420, 116, 332, 423, 176, 433, 178, 21, 68, + /* 450 */ 341, 250, 251, 252, 253, 254, 130, 131, 349, 438, + /* 460 */ 439, 34, 20, 36, 443, 444, 355, 358, 20, 200, + /* 470 */ 201, 0, 203, 204, 205, 206, 207, 208, 209, 210, + /* 480 */ 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, + /* 490 */ 221, 222, 223, 228, 225, 325, 134, 135, 328, 241, + /* 500 */ 335, 336, 176, 238, 178, 68, 107, 108, 109, 110, + /* 510 */ 111, 112, 113, 114, 115, 116, 117, 320, 119, 120, + /* 520 */ 121, 122, 123, 124, 391, 394, 200, 201, 95, 203, + /* 530 */ 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + /* 540 */ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + /* 550 */ 12, 13, 419, 328, 423, 204, 335, 336, 20, 362, + /* 560 */ 22, 225, 35, 227, 328, 340, 328, 105, 320, 325, + /* 570 */ 439, 33, 328, 35, 443, 444, 340, 106, 340, 320, + /* 580 */ 8, 9, 357, 320, 12, 13, 14, 15, 16, 328, + /* 590 */ 1, 2, 20, 357, 56, 357, 125, 126, 127, 128, + /* 600 */ 129, 340, 320, 0, 328, 163, 68, 12, 13, 14, + /* 610 */ 362, 328, 349, 320, 328, 20, 340, 22, 357, 391, + /* 620 */ 357, 362, 349, 340, 320, 362, 340, 364, 33, 349, + /* 630 */ 35, 349, 94, 357, 225, 405, 356, 407, 365, 357, + /* 640 */ 357, 328, 56, 357, 362, 365, 364, 419, 385, 320, + /* 650 */ 330, 56, 389, 340, 116, 362, 393, 394, 395, 396, + /* 660 */ 397, 398, 399, 68, 401, 68, 362, 385, 130, 131, + /* 670 */ 357, 389, 352, 320, 394, 393, 394, 395, 396, 397, + /* 680 */ 398, 399, 96, 401, 95, 373, 423, 375, 406, 94, + /* 690 */ 408, 362, 8, 9, 412, 413, 12, 13, 14, 15, + /* 700 */ 16, 438, 439, 423, 422, 178, 443, 444, 328, 106, + /* 710 */ 405, 116, 407, 171, 176, 362, 178, 317, 438, 439, + /* 720 */ 340, 44, 45, 443, 444, 130, 131, 43, 125, 126, + /* 730 */ 127, 128, 129, 191, 192, 163, 320, 357, 200, 201, + /* 740 */ 350, 203, 204, 205, 206, 207, 208, 209, 210, 211, + /* 750 */ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + /* 760 */ 222, 223, 8, 9, 328, 350, 12, 13, 14, 15, + /* 770 */ 16, 176, 342, 178, 357, 345, 340, 377, 362, 241, + /* 780 */ 3, 20, 8, 9, 320, 368, 12, 13, 14, 15, + /* 790 */ 16, 0, 320, 357, 394, 200, 201, 39, 203, 204, + /* 800 */ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + /* 810 */ 215, 216, 217, 218, 219, 220, 221, 222, 223, 12, + /* 820 */ 13, 328, 22, 423, 320, 320, 362, 20, 43, 22, + /* 830 */ 320, 364, 350, 340, 362, 35, 328, 35, 438, 439, + /* 840 */ 33, 374, 35, 443, 444, 350, 320, 2, 340, 95, + /* 850 */ 357, 4, 320, 8, 9, 64, 65, 12, 13, 14, + /* 860 */ 15, 16, 71, 56, 320, 357, 362, 362, 68, 394, + /* 870 */ 68, 320, 362, 82, 83, 68, 12, 13, 328, 88, + /* 880 */ 328, 349, 391, 328, 20, 373, 22, 375, 362, 357, + /* 890 */ 340, 357, 340, 328, 362, 340, 364, 33, 423, 35, + /* 900 */ 349, 94, 368, 239, 240, 340, 362, 357, 357, 357, + /* 910 */ 419, 20, 357, 362, 439, 364, 116, 385, 443, 444, + /* 920 */ 56, 389, 357, 116, 163, 393, 394, 395, 396, 397, + /* 930 */ 398, 399, 68, 401, 106, 350, 385, 130, 131, 320, + /* 940 */ 389, 328, 168, 328, 393, 394, 395, 396, 397, 398, + /* 950 */ 399, 404, 401, 340, 407, 340, 128, 406, 94, 408, + /* 960 */ 337, 350, 339, 412, 413, 359, 434, 435, 362, 381, + /* 970 */ 357, 359, 357, 422, 362, 0, 176, 350, 178, 342, + /* 980 */ 116, 362, 345, 176, 43, 178, 42, 43, 98, 105, + /* 990 */ 98, 101, 43, 101, 130, 131, 98, 22, 240, 101, + /* 1000 */ 200, 201, 0, 98, 163, 164, 101, 200, 201, 0, + /* 1010 */ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + /* 1020 */ 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, + /* 1030 */ 223, 22, 130, 131, 43, 258, 95, 263, 154, 35, + /* 1040 */ 176, 43, 178, 321, 95, 260, 8, 9, 61, 47, + /* 1050 */ 12, 13, 14, 15, 16, 8, 9, 43, 392, 12, + /* 1060 */ 13, 14, 15, 16, 200, 201, 0, 203, 204, 205, + /* 1070 */ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + /* 1080 */ 216, 217, 218, 219, 220, 221, 222, 223, 18, 242, + /* 1090 */ 20, 1, 2, 95, 94, 204, 0, 27, 447, 436, + /* 1100 */ 30, 13, 13, 338, 104, 329, 8, 9, 43, 95, + /* 1110 */ 12, 13, 14, 15, 16, 43, 43, 47, 22, 49, + /* 1120 */ 43, 51, 43, 35, 35, 0, 430, 43, 349, 63, + /* 1130 */ 64, 65, 66, 67, 43, 69, 70, 71, 72, 73, + /* 1140 */ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + /* 1150 */ 84, 85, 86, 87, 88, 89, 90, 18, 329, 327, + /* 1160 */ 95, 392, 23, 93, 361, 421, 440, 95, 95, 414, + /* 1170 */ 424, 243, 95, 48, 95, 105, 37, 38, 377, 95, + /* 1180 */ 41, 387, 178, 46, 43, 43, 95, 200, 379, 43, + /* 1190 */ 47, 43, 386, 95, 43, 394, 57, 58, 59, 174, + /* 1200 */ 42, 163, 369, 133, 369, 320, 136, 137, 138, 139, + /* 1210 */ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + /* 1220 */ 150, 151, 152, 153, 423, 155, 156, 157, 20, 328, + /* 1230 */ 369, 94, 328, 94, 349, 367, 95, 95, 158, 438, + /* 1240 */ 439, 95, 357, 95, 443, 444, 95, 362, 367, 364, + /* 1250 */ 334, 8, 9, 262, 92, 12, 13, 14, 15, 16, + /* 1260 */ 328, 20, 328, 328, 322, 322, 20, 364, 332, 383, + /* 1270 */ 385, 132, 332, 20, 389, 376, 20, 332, 393, 394, + /* 1280 */ 395, 396, 397, 398, 399, 378, 401, 64, 65, 404, + /* 1290 */ 376, 406, 407, 408, 71, 332, 332, 412, 413, 332, + /* 1300 */ 328, 377, 332, 377, 61, 82, 83, 168, 169, 170, + /* 1310 */ 377, 88, 173, 328, 322, 349, 320, 349, 394, 322, + /* 1320 */ 394, 362, 349, 349, 189, 349, 349, 394, 349, 190, + /* 1330 */ 349, 349, 193, 383, 195, 196, 197, 198, 199, 349, + /* 1340 */ 384, 330, 349, 382, 181, 349, 103, 423, 330, 423, + /* 1350 */ 364, 328, 328, 357, 376, 248, 423, 330, 362, 160, + /* 1360 */ 364, 377, 438, 439, 438, 439, 372, 443, 444, 443, + /* 1370 */ 444, 438, 439, 372, 362, 362, 443, 444, 394, 362, + /* 1380 */ 241, 385, 362, 362, 330, 389, 370, 345, 330, 393, + /* 1390 */ 394, 395, 396, 397, 398, 399, 357, 401, 20, 392, + /* 1400 */ 392, 158, 406, 362, 408, 249, 372, 423, 412, 413, + /* 1410 */ 19, 362, 429, 362, 362, 372, 255, 429, 422, 362, + /* 1420 */ 431, 320, 438, 439, 33, 167, 257, 443, 444, 256, + /* 1430 */ 244, 432, 429, 428, 264, 387, 261, 427, 47, 259, + /* 1440 */ 240, 426, 357, 52, 53, 54, 55, 56, 20, 94, + /* 1450 */ 349, 391, 94, 353, 448, 411, 362, 339, 357, 328, + /* 1460 */ 330, 442, 36, 362, 320, 364, 380, 441, 323, 322, + /* 1470 */ 375, 228, 229, 230, 231, 232, 233, 234, 235, 236, + /* 1480 */ 237, 238, 318, 343, 93, 331, 385, 96, 0, 0, + /* 1490 */ 389, 183, 343, 349, 393, 394, 395, 396, 397, 398, + /* 1500 */ 399, 357, 401, 343, 0, 0, 362, 406, 364, 408, + /* 1510 */ 42, 12, 13, 412, 413, 0, 35, 320, 194, 35, + /* 1520 */ 129, 22, 35, 194, 0, 35, 35, 35, 194, 385, + /* 1530 */ 0, 194, 33, 389, 35, 0, 35, 393, 394, 395, + /* 1540 */ 396, 397, 398, 399, 35, 401, 349, 0, 22, 0, + /* 1550 */ 406, 178, 408, 162, 357, 56, 412, 413, 176, 362, + /* 1560 */ 0, 364, 0, 0, 172, 171, 0, 68, 0, 46, + /* 1570 */ 320, 180, 0, 182, 0, 42, 0, 0, 0, 42, + /* 1580 */ 0, 0, 385, 0, 0, 0, 389, 0, 149, 35, + /* 1590 */ 393, 394, 395, 396, 397, 398, 399, 0, 401, 349, + /* 1600 */ 149, 0, 0, 406, 22, 408, 0, 357, 0, 412, + /* 1610 */ 413, 0, 362, 320, 364, 116, 0, 0, 0, 0, + /* 1620 */ 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, + /* 1630 */ 0, 0, 0, 0, 0, 385, 0, 0, 35, 389, + /* 1640 */ 0, 0, 349, 393, 394, 395, 396, 397, 398, 399, + /* 1650 */ 357, 401, 56, 0, 56, 362, 42, 364, 408, 14, + /* 1660 */ 14, 46, 412, 413, 167, 0, 320, 39, 0, 0, + /* 1670 */ 0, 0, 0, 0, 39, 176, 0, 178, 385, 0, + /* 1680 */ 0, 43, 389, 40, 35, 46, 393, 394, 395, 396, + /* 1690 */ 397, 398, 399, 39, 401, 349, 39, 47, 35, 200, + /* 1700 */ 201, 408, 47, 357, 62, 412, 413, 0, 362, 35, + /* 1710 */ 364, 0, 0, 214, 215, 216, 217, 218, 219, 220, + /* 1720 */ 39, 39, 320, 35, 47, 47, 39, 0, 0, 0, + /* 1730 */ 35, 385, 22, 0, 35, 389, 35, 43, 35, 393, + /* 1740 */ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, + /* 1750 */ 35, 349, 43, 101, 103, 0, 22, 22, 0, 357, + /* 1760 */ 22, 0, 49, 22, 362, 35, 364, 0, 0, 0, + /* 1770 */ 22, 20, 35, 0, 35, 163, 0, 35, 95, 94, + /* 1780 */ 0, 22, 0, 0, 320, 94, 179, 385, 0, 4, + /* 1790 */ 3, 389, 0, 95, 0, 393, 394, 395, 396, 397, + /* 1800 */ 398, 399, 94, 401, 19, 35, 0, 163, 160, 104, + /* 1810 */ 94, 39, 46, 349, 94, 224, 226, 43, 33, 163, + /* 1820 */ 161, 357, 43, 165, 224, 159, 362, 95, 364, 43, + /* 1830 */ 46, 3, 47, 245, 94, 46, 51, 94, 43, 95, + /* 1840 */ 95, 56, 320, 94, 43, 95, 94, 445, 446, 385, + /* 1850 */ 188, 94, 43, 389, 94, 245, 94, 393, 394, 395, + /* 1860 */ 396, 397, 398, 399, 320, 401, 95, 35, 35, 35, + /* 1870 */ 95, 349, 408, 95, 35, 35, 354, 413, 93, 357, + /* 1880 */ 35, 96, 46, 46, 362, 95, 364, 43, 95, 46, + /* 1890 */ 2, 22, 200, 349, 94, 46, 46, 95, 94, 94, + /* 1900 */ 239, 357, 95, 95, 94, 245, 362, 385, 364, 94, + /* 1910 */ 94, 389, 95, 22, 95, 393, 394, 395, 396, 397, + /* 1920 */ 398, 399, 35, 401, 320, 202, 105, 35, 35, 385, + /* 1930 */ 95, 35, 94, 389, 35, 94, 94, 393, 394, 395, + /* 1940 */ 396, 397, 398, 399, 35, 401, 95, 403, 95, 94, + /* 1950 */ 22, 95, 94, 349, 106, 94, 94, 35, 94, 43, + /* 1960 */ 22, 357, 62, 61, 118, 118, 362, 320, 364, 35, + /* 1970 */ 118, 35, 118, 68, 35, 35, 35, 35, 35, 35, + /* 1980 */ 35, 35, 22, 22, 320, 91, 35, 35, 35, 385, + /* 1990 */ 43, 35, 35, 389, 35, 68, 349, 393, 394, 395, + /* 2000 */ 396, 397, 398, 399, 357, 401, 35, 35, 35, 362, + /* 2010 */ 35, 364, 35, 349, 22, 35, 0, 35, 39, 0, + /* 2020 */ 35, 357, 39, 47, 0, 47, 362, 39, 364, 35, + /* 2030 */ 0, 47, 385, 35, 47, 39, 389, 0, 320, 435, + /* 2040 */ 393, 394, 395, 396, 397, 398, 399, 35, 401, 385, + /* 2050 */ 35, 0, 21, 389, 22, 22, 320, 393, 394, 395, + /* 2060 */ 396, 397, 398, 399, 22, 401, 21, 349, 20, 449, + /* 2070 */ 449, 449, 354, 449, 449, 357, 449, 449, 449, 449, + /* 2080 */ 362, 449, 364, 449, 437, 349, 449, 449, 449, 449, + /* 2090 */ 354, 449, 449, 357, 449, 449, 449, 449, 362, 449, + /* 2100 */ 364, 449, 449, 385, 449, 449, 449, 389, 449, 449, + /* 2110 */ 446, 393, 394, 395, 396, 397, 398, 399, 320, 401, + /* 2120 */ 449, 385, 449, 449, 449, 389, 449, 449, 449, 393, + /* 2130 */ 394, 395, 396, 397, 398, 399, 449, 401, 449, 449, + /* 2140 */ 449, 449, 320, 449, 449, 449, 449, 349, 449, 449, + /* 2150 */ 449, 449, 449, 449, 449, 357, 449, 449, 449, 449, + /* 2160 */ 362, 449, 364, 449, 449, 449, 449, 449, 449, 449, + /* 2170 */ 449, 349, 449, 449, 449, 449, 449, 449, 449, 357, + /* 2180 */ 449, 449, 449, 385, 362, 320, 364, 389, 449, 449, + /* 2190 */ 449, 393, 394, 395, 396, 397, 398, 399, 449, 401, + /* 2200 */ 449, 449, 449, 449, 449, 320, 449, 385, 449, 449, + /* 2210 */ 449, 389, 449, 449, 349, 393, 394, 395, 396, 397, + /* 2220 */ 398, 399, 357, 401, 449, 449, 449, 362, 449, 364, + /* 2230 */ 449, 449, 449, 449, 349, 449, 449, 449, 449, 449, + /* 2240 */ 449, 449, 357, 449, 449, 449, 449, 362, 449, 364, + /* 2250 */ 385, 449, 449, 449, 389, 449, 449, 449, 393, 394, + /* 2260 */ 395, 396, 397, 398, 399, 449, 401, 449, 320, 449, + /* 2270 */ 385, 449, 449, 449, 389, 449, 449, 449, 393, 394, + /* 2280 */ 395, 396, 397, 398, 399, 449, 401, 320, 449, 449, + /* 2290 */ 449, 449, 449, 449, 449, 449, 449, 349, 449, 449, + /* 2300 */ 449, 449, 449, 449, 449, 357, 449, 449, 449, 449, + /* 2310 */ 362, 449, 364, 449, 449, 449, 349, 449, 449, 449, + /* 2320 */ 449, 449, 449, 449, 357, 449, 449, 449, 449, 362, + /* 2330 */ 320, 364, 449, 385, 449, 449, 449, 389, 449, 449, + /* 2340 */ 449, 393, 394, 395, 396, 397, 398, 399, 449, 401, + /* 2350 */ 449, 449, 385, 449, 449, 449, 389, 449, 449, 349, + /* 2360 */ 393, 394, 395, 396, 397, 398, 399, 357, 401, 449, + /* 2370 */ 449, 449, 362, 449, 364, 449, 449, 449, 449, 449, + /* 2380 */ 449, 320, 449, 449, 449, 449, 449, 449, 449, 449, + /* 2390 */ 449, 449, 449, 449, 449, 385, 449, 449, 449, 389, + /* 2400 */ 449, 320, 449, 393, 394, 395, 396, 397, 398, 399, + /* 2410 */ 349, 401, 449, 449, 449, 449, 449, 449, 357, 449, + /* 2420 */ 449, 449, 449, 362, 449, 364, 449, 449, 449, 449, + /* 2430 */ 349, 449, 449, 449, 449, 449, 449, 449, 357, 449, + /* 2440 */ 449, 449, 449, 362, 449, 364, 385, 449, 449, 449, + /* 2450 */ 389, 449, 320, 449, 393, 394, 395, 396, 397, 398, + /* 2460 */ 399, 449, 401, 449, 449, 449, 385, 449, 449, 449, + /* 2470 */ 389, 449, 449, 449, 393, 394, 395, 396, 397, 398, + /* 2480 */ 399, 349, 401, 449, 449, 449, 449, 449, 449, 357, + /* 2490 */ 449, 449, 449, 449, 362, 449, 364, 449, 449, 449, + /* 2500 */ 449, 449, 449, 449, 449, 320, 449, 449, 449, 449, + /* 2510 */ 449, 449, 449, 449, 449, 449, 449, 385, 449, 449, + /* 2520 */ 449, 389, 449, 449, 449, 393, 394, 395, 396, 397, + /* 2530 */ 398, 399, 449, 401, 349, 449, 449, 449, 449, 449, + /* 2540 */ 449, 449, 357, 449, 449, 449, 449, 362, 320, 364, + /* 2550 */ 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + /* 2560 */ 449, 449, 449, 449, 449, 449, 449, 449, 320, 449, + /* 2570 */ 385, 449, 449, 449, 389, 449, 449, 349, 393, 394, + /* 2580 */ 395, 396, 397, 398, 399, 357, 401, 449, 449, 449, + /* 2590 */ 362, 449, 364, 449, 449, 449, 449, 349, 449, 449, + /* 2600 */ 449, 449, 449, 449, 449, 357, 449, 449, 449, 449, + /* 2610 */ 362, 449, 364, 385, 449, 449, 449, 389, 449, 449, + /* 2620 */ 449, 393, 394, 395, 396, 397, 398, 399, 449, 401, + /* 2630 */ 449, 320, 449, 385, 449, 449, 449, 389, 449, 449, + /* 2640 */ 449, 393, 394, 395, 396, 397, 398, 399, 449, 401, + /* 2650 */ 320, 449, 449, 449, 449, 449, 449, 449, 449, 449, + /* 2660 */ 349, 449, 449, 449, 449, 449, 449, 449, 357, 449, + /* 2670 */ 449, 449, 449, 362, 449, 364, 449, 449, 449, 349, + /* 2680 */ 449, 449, 449, 449, 449, 449, 449, 357, 449, 449, + /* 2690 */ 449, 449, 362, 320, 364, 449, 385, 449, 449, 449, + /* 2700 */ 389, 449, 449, 449, 393, 394, 395, 396, 397, 398, + /* 2710 */ 399, 449, 401, 449, 449, 385, 449, 449, 449, 389, + /* 2720 */ 449, 449, 349, 393, 394, 395, 396, 397, 398, 399, + /* 2730 */ 357, 401, 449, 449, 449, 362, 449, 364, 449, 449, + /* 2740 */ 449, 449, 449, 449, 320, 449, 449, 449, 449, 449, + /* 2750 */ 449, 449, 449, 449, 449, 449, 449, 449, 385, 449, + /* 2760 */ 449, 449, 389, 449, 320, 449, 393, 394, 395, 396, + /* 2770 */ 397, 398, 399, 349, 401, 449, 449, 449, 449, 449, + /* 2780 */ 449, 357, 449, 449, 449, 449, 362, 449, 364, 449, + /* 2790 */ 449, 449, 449, 349, 449, 449, 449, 449, 449, 449, + /* 2800 */ 449, 357, 449, 449, 449, 449, 362, 449, 364, 385, + /* 2810 */ 449, 449, 449, 389, 449, 320, 449, 393, 394, 395, + /* 2820 */ 396, 397, 398, 399, 449, 401, 449, 449, 449, 385, + /* 2830 */ 449, 449, 449, 389, 449, 449, 449, 393, 394, 395, + /* 2840 */ 396, 397, 398, 399, 349, 401, 449, 449, 449, 449, + /* 2850 */ 449, 449, 357, 449, 449, 449, 449, 362, 449, 364, + /* 2860 */ 449, 449, 449, 449, 449, 449, 449, 449, 320, 449, + /* 2870 */ 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + /* 2880 */ 385, 449, 449, 449, 389, 449, 449, 449, 393, 394, + /* 2890 */ 395, 396, 397, 398, 399, 449, 401, 349, 449, 449, + /* 2900 */ 449, 449, 449, 449, 449, 357, 449, 449, 449, 449, + /* 2910 */ 362, 320, 364, 449, 449, 449, 449, 449, 449, 449, + /* 2920 */ 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + /* 2930 */ 449, 449, 449, 385, 449, 449, 449, 389, 449, 449, + /* 2940 */ 349, 393, 394, 395, 396, 397, 398, 399, 357, 401, + /* 2950 */ 449, 449, 449, 362, 449, 364, 449, 449, 449, 449, + /* 2960 */ 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + /* 2970 */ 449, 449, 449, 449, 449, 449, 385, 449, 449, 449, + /* 2980 */ 389, 449, 449, 449, 393, 394, 395, 396, 397, 398, + /* 2990 */ 399, 449, 401, }; -#define YY_SHIFT_COUNT (688) +#define YY_SHIFT_COUNT (692) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2011) +#define YY_SHIFT_MAX (2051) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 1137, 0, 57, 268, 57, 325, 325, 325, 536, 325, - /* 10 */ 325, 325, 325, 325, 593, 804, 804, 861, 804, 804, - /* 20 */ 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, - /* 30 */ 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, - /* 40 */ 804, 804, 804, 804, 804, 804, 132, 214, 35, 62, - /* 50 */ 83, 142, 258, 142, 35, 35, 1528, 1528, 142, 1528, - /* 60 */ 1528, 131, 142, 203, 203, 30, 30, 23, 203, 203, - /* 70 */ 203, 203, 203, 203, 203, 203, 203, 203, 265, 203, - /* 80 */ 203, 203, 344, 203, 203, 380, 203, 203, 380, 395, - /* 90 */ 203, 380, 380, 380, 203, 389, 1066, 1220, 1220, 285, - /* 100 */ 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, - /* 110 */ 797, 797, 797, 797, 797, 797, 797, 797, 797, 460, - /* 120 */ 886, 26, 23, 236, 236, 573, 38, 648, 107, 107, - /* 130 */ 567, 567, 567, 38, 433, 433, 419, 344, 1, 1, - /* 140 */ 365, 380, 380, 544, 544, 419, 551, 398, 398, 398, - /* 150 */ 398, 398, 398, 398, 1601, 137, 570, 770, 971, 42, - /* 160 */ 67, 37, 94, 479, 372, 798, 738, 875, 727, 817, - /* 170 */ 635, 727, 897, 857, 891, 1010, 1206, 1083, 1214, 1239, - /* 180 */ 1239, 1214, 1105, 1105, 1176, 1239, 1239, 1239, 1264, 1264, - /* 190 */ 1277, 265, 344, 265, 1283, 1288, 265, 1283, 265, 265, - /* 200 */ 265, 1239, 265, 1264, 380, 380, 380, 380, 380, 380, - /* 210 */ 380, 380, 380, 380, 380, 1239, 1264, 544, 1152, 1277, - /* 220 */ 389, 1173, 344, 389, 1239, 1239, 1283, 389, 1123, 544, - /* 230 */ 544, 544, 544, 1123, 544, 1212, 389, 419, 389, 433, - /* 240 */ 1380, 1380, 544, 1159, 1123, 544, 544, 1159, 1123, 544, - /* 250 */ 544, 380, 1164, 1252, 1159, 1165, 1168, 1181, 1010, 1157, - /* 260 */ 1166, 1170, 1190, 433, 1411, 1345, 1348, 544, 551, 1239, - /* 270 */ 389, 1437, 1264, 3046, 3046, 3046, 3046, 3046, 3046, 3046, - /* 280 */ 1063, 191, 402, 1312, 682, 752, 1094, 50, 838, 1149, - /* 290 */ 126, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, - /* 300 */ 470, 215, 11, 11, 264, 278, 164, 471, 170, 611, - /* 310 */ 366, 16, 459, 70, 16, 16, 16, 473, 915, 528, - /* 320 */ 888, 889, 957, 989, 959, 1099, 1100, 568, 839, 664, - /* 330 */ 952, 1009, 1073, 1075, 1077, 1081, 903, 832, 1003, 1087, - /* 340 */ 1082, 941, 1059, 892, 1088, 826, 1133, 1130, 1147, 1154, - /* 350 */ 1177, 1196, 1197, 1007, 1156, 1211, 1132, 1247, 1489, 1493, - /* 360 */ 1311, 1495, 1496, 1455, 1498, 1464, 1306, 1466, 1467, 1468, - /* 370 */ 1310, 1505, 1471, 1472, 1314, 1509, 1316, 1512, 1478, 1516, - /* 380 */ 1504, 1517, 1483, 1350, 1353, 1530, 1531, 1361, 1364, 1537, - /* 390 */ 1542, 1499, 1546, 1547, 1548, 1502, 1549, 1552, 1553, 1400, - /* 400 */ 1555, 1557, 1559, 1560, 1562, 1415, 1532, 1566, 1419, 1569, - /* 410 */ 1570, 1571, 1572, 1574, 1575, 1576, 1577, 1581, 1582, 1585, - /* 420 */ 1586, 1597, 1598, 1561, 1599, 1604, 1608, 1616, 1618, 1619, - /* 430 */ 1600, 1621, 1625, 1626, 1627, 1602, 1630, 1579, 1632, 1583, - /* 440 */ 1633, 1640, 1603, 1607, 1606, 1628, 1605, 1629, 1614, 1641, - /* 450 */ 1610, 1613, 1647, 1658, 1661, 1623, 1497, 1665, 1666, 1674, - /* 460 */ 1615, 1676, 1678, 1644, 1634, 1645, 1680, 1648, 1638, 1649, - /* 470 */ 1689, 1655, 1646, 1652, 1692, 1660, 1651, 1662, 1699, 1700, - /* 480 */ 1702, 1703, 1609, 1617, 1670, 1685, 1708, 1675, 1679, 1668, - /* 490 */ 1672, 1681, 1682, 1687, 1713, 1698, 1719, 1701, 1673, 1721, - /* 500 */ 1704, 1696, 1724, 1714, 1727, 1715, 1732, 1712, 1716, 1642, - /* 510 */ 1654, 1735, 1588, 1717, 1739, 1578, 1731, 1591, 1596, 1758, - /* 520 */ 1759, 1622, 1624, 1757, 1762, 1764, 1766, 1686, 1691, 1733, - /* 530 */ 1594, 1767, 1693, 1635, 1694, 1790, 1752, 1636, 1706, 1690, - /* 540 */ 1747, 1755, 1580, 1584, 1589, 1761, 1558, 1707, 1710, 1720, - /* 550 */ 1711, 1718, 1722, 1765, 1723, 1725, 1728, 1729, 1726, 1768, - /* 560 */ 1769, 1771, 1741, 1782, 1563, 1742, 1743, 1823, 1784, 1611, - /* 570 */ 1805, 1806, 1807, 1808, 1809, 1810, 1751, 1753, 1803, 1620, - /* 580 */ 1813, 1804, 1814, 1849, 1835, 1653, 1770, 1772, 1774, 1775, - /* 590 */ 1777, 1778, 1815, 1780, 1783, 1816, 1781, 1837, 1663, 1788, - /* 600 */ 1773, 1795, 1834, 1858, 1800, 1801, 1860, 1812, 1817, 1864, - /* 610 */ 1819, 1820, 1866, 1822, 1824, 1869, 1826, 1754, 1791, 1792, - /* 620 */ 1793, 1844, 1796, 1827, 1828, 1873, 1829, 1874, 1874, 1896, - /* 630 */ 1862, 1865, 1890, 1892, 1894, 1895, 1898, 1900, 1910, 1911, - /* 640 */ 1912, 1913, 1881, 1843, 1907, 1917, 1918, 1932, 1920, 1935, - /* 650 */ 1924, 1926, 1927, 1897, 1668, 1928, 1672, 1929, 1931, 1934, - /* 660 */ 1936, 1945, 1937, 1970, 1939, 1930, 1941, 1976, 1943, 1938, - /* 670 */ 1947, 1981, 1949, 1951, 1955, 1982, 1964, 1954, 1963, 2003, - /* 680 */ 1978, 1979, 2011, 1995, 1994, 1996, 1997, 1999, 2001, + /* 0 */ 1139, 0, 57, 269, 57, 326, 326, 326, 538, 326, + /* 10 */ 326, 326, 326, 326, 595, 807, 807, 864, 807, 807, + /* 20 */ 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + /* 30 */ 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + /* 40 */ 807, 807, 807, 807, 807, 807, 12, 14, 90, 62, + /* 50 */ 83, 80, 258, 80, 90, 90, 1499, 1499, 80, 1499, + /* 60 */ 1499, 87, 80, 113, 113, 53, 53, 23, 113, 113, + /* 70 */ 113, 113, 113, 113, 113, 113, 113, 113, 43, 113, + /* 80 */ 113, 113, 208, 113, 113, 288, 113, 113, 288, 306, + /* 90 */ 113, 288, 288, 288, 113, 142, 1070, 1243, 1243, 285, + /* 100 */ 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, + /* 110 */ 800, 800, 800, 800, 800, 800, 800, 800, 800, 195, + /* 120 */ 1223, 26, 23, 340, 340, 54, 381, 182, 336, 336, + /* 130 */ 442, 442, 442, 381, 448, 448, 448, 462, 208, 1, + /* 140 */ 1, 409, 288, 288, 437, 437, 462, 597, 399, 399, + /* 150 */ 399, 399, 399, 399, 399, 1391, 137, 572, 774, 791, + /* 160 */ 201, 67, 171, 220, 351, 130, 677, 828, 761, 664, + /* 170 */ 758, 777, 664, 944, 847, 891, 928, 1143, 1025, 1158, + /* 180 */ 1158, 1208, 1208, 1158, 1080, 1080, 1162, 1208, 1208, 1208, + /* 190 */ 1241, 1241, 1246, 43, 208, 43, 1253, 1256, 43, 1253, + /* 200 */ 43, 43, 43, 1208, 43, 1241, 288, 288, 288, 288, + /* 210 */ 288, 288, 288, 288, 288, 288, 288, 1208, 1241, 437, + /* 220 */ 1135, 1246, 142, 1163, 208, 142, 1208, 1208, 1253, 142, + /* 230 */ 1107, 437, 437, 437, 437, 1107, 437, 1199, 142, 462, + /* 240 */ 142, 448, 1378, 1378, 437, 1156, 1107, 437, 437, 1156, + /* 250 */ 1107, 437, 437, 288, 1161, 1258, 1156, 1169, 1173, 1186, + /* 260 */ 928, 1170, 1175, 1180, 1200, 448, 1428, 1355, 1358, 437, + /* 270 */ 597, 1208, 142, 1426, 1241, 2993, 2993, 2993, 2993, 2993, + /* 280 */ 2993, 2993, 1066, 191, 403, 1785, 754, 684, 1098, 50, + /* 290 */ 845, 1038, 471, 1047, 1047, 1047, 1047, 1047, 1047, 1047, + /* 300 */ 1047, 1047, 603, 123, 11, 11, 157, 101, 542, 79, + /* 310 */ 362, 427, 211, 59, 589, 265, 59, 59, 59, 941, + /* 320 */ 1002, 369, 884, 890, 892, 898, 905, 975, 1009, 1096, + /* 330 */ 586, 841, 949, 998, 1014, 1065, 1072, 1073, 1077, 902, + /* 340 */ 785, 991, 1090, 1079, 527, 1004, 987, 1084, 433, 1137, + /* 350 */ 1091, 1141, 1142, 1146, 1148, 1151, 1000, 1088, 1089, 802, + /* 360 */ 1125, 1488, 1489, 1308, 1504, 1505, 1468, 1515, 1481, 1324, + /* 370 */ 1484, 1487, 1490, 1329, 1524, 1491, 1492, 1334, 1530, 1337, + /* 380 */ 1535, 1501, 1547, 1526, 1549, 1509, 1373, 1382, 1560, 1562, + /* 390 */ 1392, 1394, 1563, 1566, 1523, 1568, 1572, 1574, 1533, 1576, + /* 400 */ 1577, 1578, 1537, 1580, 1581, 1583, 1584, 1585, 1587, 1439, + /* 410 */ 1554, 1597, 1451, 1601, 1602, 1606, 1608, 1611, 1616, 1617, + /* 420 */ 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1586, 1625, 1626, + /* 430 */ 1627, 1629, 1630, 1631, 1582, 1632, 1633, 1634, 1636, 1603, + /* 440 */ 1637, 1596, 1640, 1598, 1641, 1653, 1614, 1628, 1638, 1645, + /* 450 */ 1615, 1646, 1639, 1668, 1643, 1635, 1669, 1670, 1671, 1654, + /* 460 */ 1497, 1665, 1672, 1673, 1642, 1676, 1679, 1649, 1650, 1657, + /* 470 */ 1680, 1663, 1655, 1681, 1707, 1674, 1677, 1682, 1711, 1688, + /* 480 */ 1678, 1687, 1712, 1727, 1728, 1729, 1651, 1652, 1695, 1710, + /* 490 */ 1733, 1699, 1701, 1694, 1709, 1703, 1715, 1734, 1755, 1735, + /* 500 */ 1758, 1738, 1713, 1761, 1741, 1730, 1767, 1737, 1768, 1739, + /* 510 */ 1769, 1748, 1751, 1683, 1685, 1773, 1612, 1742, 1776, 1607, + /* 520 */ 1759, 1644, 1648, 1780, 1782, 1656, 1658, 1787, 1783, 1788, + /* 530 */ 1792, 1691, 1698, 1770, 1662, 1794, 1708, 1659, 1716, 1806, + /* 540 */ 1772, 1666, 1720, 1705, 1766, 1774, 1591, 1590, 1600, 1779, + /* 550 */ 1588, 1740, 1732, 1743, 1744, 1745, 1749, 1786, 1750, 1752, + /* 560 */ 1757, 1760, 1771, 1795, 1784, 1789, 1762, 1801, 1610, 1775, + /* 570 */ 1778, 1828, 1809, 1660, 1832, 1833, 1834, 1839, 1840, 1845, + /* 580 */ 1790, 1793, 1836, 1661, 1844, 1837, 1843, 1888, 1869, 1692, + /* 590 */ 1800, 1802, 1804, 1807, 1805, 1808, 1849, 1810, 1815, 1850, + /* 600 */ 1817, 1891, 1723, 1816, 1821, 1819, 1887, 1892, 1838, 1835, + /* 610 */ 1893, 1841, 1851, 1896, 1842, 1853, 1899, 1855, 1856, 1909, + /* 620 */ 1858, 1846, 1847, 1852, 1854, 1928, 1848, 1861, 1862, 1922, + /* 630 */ 1864, 1916, 1916, 1938, 1900, 1902, 1934, 1936, 1939, 1940, + /* 640 */ 1941, 1942, 1943, 1944, 1945, 1946, 1905, 1894, 1947, 1951, + /* 650 */ 1952, 1960, 1953, 1961, 1956, 1957, 1959, 1927, 1694, 1971, + /* 660 */ 1709, 1972, 1973, 1975, 1977, 1992, 1980, 2016, 1982, 1976, + /* 670 */ 1979, 2019, 1985, 1978, 1983, 2024, 1994, 1984, 1988, 2030, + /* 680 */ 1998, 1987, 1996, 2037, 2012, 2015, 2051, 2032, 2031, 2033, + /* 690 */ 2042, 2045, 2048, }; -#define YY_REDUCE_COUNT (279) -#define YY_REDUCE_MIN (-350) -#define YY_REDUCE_MAX (2645) +#define YY_REDUCE_COUNT (281) +#define YY_REDUCE_MIN (-379) +#define YY_REDUCE_MAX (2591) static const short yy_reduce_ofst[] = { - /* 0 */ 179, -252, -312, 882, 13, 281, 549, 992, 262, 1074, - /* 10 */ 1127, 1195, 1217, 1275, 1377, 530, 1436, 1491, 1544, 1595, - /* 20 */ 1612, 1697, 1748, 1811, 1831, 1882, 1899, 1942, 1993, 2010, - /* 30 */ 2061, 2112, 2131, 2194, 2216, 2276, 2296, 2339, 2359, 2410, - /* 40 */ 2461, 2480, 2543, 2565, 2625, 2645, 21, 279, -222, 198, - /* 50 */ 442, 465, 607, 924, -97, -28, -350, -347, -315, -340, - /* 60 */ -61, -63, -26, 39, 96, -321, -317, -344, -311, 7, - /* 70 */ 238, 275, 312, 376, 379, 435, 436, 506, -230, 532, - /* 80 */ 543, 550, -189, 592, 640, 213, 645, 701, -245, -199, - /* 90 */ 704, 323, 102, 432, 758, -102, 56, -226, -226, -89, - /* 100 */ -228, -181, 292, 370, 409, 462, 469, 502, 508, 515, - /* 110 */ 529, 548, 597, 617, 633, 666, 669, 680, 687, 233, - /* 120 */ 17, -243, -265, -270, -125, 169, -49, -179, -36, 90, - /* 130 */ -243, 49, 185, 274, 371, 464, 341, 347, 130, 339, - /* 140 */ 384, 377, 474, 368, 467, 560, 519, -332, 321, 424, - /* 150 */ 487, 583, 644, 702, 520, 399, 714, 677, 775, 719, - /* 160 */ 828, 737, 834, 834, 864, 867, 866, 807, 821, 821, - /* 170 */ 805, 821, 835, 827, 834, 865, 869, 877, 890, 933, - /* 180 */ 934, 894, 899, 901, 938, 946, 956, 963, 965, 975, - /* 190 */ 916, 968, 939, 970, 929, 932, 982, 940, 983, 987, - /* 200 */ 988, 993, 990, 1001, 976, 977, 978, 980, 981, 991, - /* 210 */ 994, 995, 996, 999, 1002, 1011, 1016, 997, 966, 969, - /* 220 */ 1023, 979, 1006, 1027, 1030, 1037, 998, 1036, 1000, 1013, - /* 230 */ 1014, 1018, 1020, 1012, 1021, 1022, 1065, 1051, 1067, 1042, - /* 240 */ 1015, 1019, 1040, 974, 1038, 1050, 1053, 984, 1044, 1055, - /* 250 */ 1056, 834, 1005, 1004, 1017, 1032, 1034, 1008, 1039, 985, - /* 260 */ 986, 1024, 821, 1084, 1048, 1031, 1091, 1102, 1106, 1134, - /* 270 */ 1136, 1155, 1161, 1097, 1104, 1138, 1142, 1145, 1162, 1174, + /* 0 */ 400, -253, -313, 885, 13, 282, 551, 996, 263, 1101, + /* 10 */ 1144, 1197, 1250, 1293, 1346, 532, 1402, 1464, 1522, 1544, + /* 20 */ 1604, 1647, 1664, 1718, 1736, 1798, 1822, 1865, 1885, 1948, + /* 30 */ 1967, 2010, 2061, 2081, 2132, 2185, 2228, 2248, 2311, 2330, + /* 40 */ 2373, 2424, 2444, 2495, 2548, 2591, 21, 280, -223, 801, + /* 50 */ 924, 926, 933, 984, -98, -28, -351, -348, -316, -341, + /* 60 */ -20, 131, 475, 27, 36, -322, -318, -345, -312, 225, + /* 70 */ 236, 238, 261, 276, 283, 286, 313, 436, -231, 493, + /* 80 */ 508, 550, -245, 552, 555, -51, 565, 613, -22, -200, + /* 90 */ 615, 64, 30, 109, 380, 28, -311, -379, -379, -65, + /* 100 */ -137, -27, -15, 197, 248, 259, 293, 304, 329, 353, + /* 110 */ 416, 464, 472, 504, 505, 510, 526, 544, 619, -62, + /* 120 */ -102, 133, -165, 170, 244, 111, 165, 320, 230, 305, + /* 130 */ 133, 228, 491, 221, -12, 417, 534, 430, 467, 312, + /* 140 */ 512, 547, -211, 273, 606, 612, 637, 623, 390, 415, + /* 150 */ 482, 495, 585, 611, 627, 588, 722, 666, 651, 765, + /* 160 */ 663, 776, 696, 779, 779, 829, 832, 803, 769, 744, + /* 170 */ 744, 726, 744, 755, 746, 779, 794, 806, 809, 833, + /* 180 */ 835, 901, 904, 861, 868, 881, 916, 932, 934, 935, + /* 190 */ 942, 943, 886, 936, 903, 940, 899, 907, 945, 914, + /* 200 */ 963, 964, 967, 972, 970, 992, 966, 968, 973, 974, + /* 210 */ 976, 977, 979, 981, 982, 990, 993, 985, 997, 959, + /* 220 */ 956, 950, 1011, 961, 986, 1018, 1023, 1024, 978, 1027, + /* 230 */ 994, 1012, 1013, 1017, 1020, 1001, 1021, 1016, 1054, 1042, + /* 240 */ 1058, 1039, 1007, 1008, 1041, 983, 1034, 1049, 1051, 988, + /* 250 */ 1043, 1052, 1057, 779, 999, 989, 1003, 1005, 1010, 1015, + /* 260 */ 1048, 1006, 1019, 1026, 744, 1085, 1060, 1044, 1100, 1094, + /* 270 */ 1118, 1131, 1130, 1145, 1147, 1086, 1095, 1140, 1149, 1160, + /* 280 */ 1154, 1164, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 10 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 20 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 30 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 40 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 50 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 60 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 70 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1610, 1536, - /* 80 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 90 */ 1536, 1536, 1536, 1536, 1536, 1608, 1775, 1962, 1536, 1536, - /* 100 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 110 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 120 */ 1536, 1974, 1536, 1536, 1536, 1610, 1536, 1608, 1934, 1934, - /* 130 */ 1974, 1974, 1974, 1536, 1536, 1536, 1715, 1536, 1816, 1816, - /* 140 */ 1536, 1536, 1536, 1536, 1536, 1715, 1536, 1536, 1536, 1536, - /* 150 */ 1536, 1536, 1536, 1536, 1810, 1536, 1999, 2052, 1536, 1536, - /* 160 */ 1536, 2002, 1536, 1536, 1536, 1536, 1668, 1989, 1966, 1980, - /* 170 */ 2036, 1967, 1964, 1983, 1536, 1993, 1536, 1803, 1780, 1536, - /* 180 */ 1536, 1780, 1777, 1777, 1659, 1536, 1536, 1536, 1536, 1536, - /* 190 */ 1536, 1610, 1536, 1610, 1536, 1536, 1610, 1536, 1610, 1610, - /* 200 */ 1610, 1536, 1610, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 210 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1822, 1536, - /* 220 */ 1608, 1812, 1536, 1608, 1536, 1536, 1536, 1608, 2007, 1536, - /* 230 */ 1536, 1536, 1536, 2007, 1536, 1536, 1608, 1536, 1608, 1536, - /* 240 */ 1536, 1536, 1536, 2009, 2007, 1536, 1536, 2009, 2007, 1536, - /* 250 */ 1536, 1536, 2021, 2017, 2009, 2025, 2023, 1995, 1993, 2055, - /* 260 */ 2042, 2038, 1980, 1536, 1536, 1536, 1684, 1536, 1536, 1536, - /* 270 */ 1608, 1568, 1536, 1805, 1816, 1718, 1718, 1718, 1611, 1541, - /* 280 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 290 */ 1536, 1891, 1536, 2020, 2019, 1938, 1937, 1936, 1927, 1890, - /* 300 */ 1536, 1680, 1889, 1888, 1536, 1536, 1536, 1536, 1536, 1536, - /* 310 */ 1536, 1882, 1536, 1536, 1883, 1881, 1880, 1536, 1536, 1536, - /* 320 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 330 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 2039, 2043, 1963, - /* 340 */ 1536, 1536, 1536, 1536, 1536, 1873, 1864, 1536, 1536, 1536, - /* 350 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 360 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 370 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 380 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 390 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 400 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 410 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 420 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 430 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 440 */ 1536, 1536, 1536, 1536, 1573, 1536, 1536, 1536, 1536, 1536, - /* 450 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 460 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 470 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 480 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1649, - /* 490 */ 1648, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 500 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1872, - /* 510 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 520 */ 1536, 1536, 1536, 2035, 1536, 1536, 1536, 1536, 1536, 1536, - /* 530 */ 1536, 1820, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 540 */ 1536, 1924, 1536, 1536, 1536, 1996, 1536, 1536, 1536, 1536, - /* 550 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 560 */ 1536, 1864, 1536, 2018, 1536, 1536, 2033, 1536, 2037, 1536, - /* 570 */ 1536, 1536, 1536, 1536, 1536, 1536, 1973, 1969, 1536, 1536, - /* 580 */ 1965, 1863, 1536, 1958, 1536, 1536, 1909, 1536, 1536, 1536, - /* 590 */ 1536, 1536, 1536, 1536, 1536, 1536, 1872, 1536, 1876, 1536, - /* 600 */ 1536, 1536, 1536, 1536, 1712, 1536, 1536, 1536, 1536, 1536, - /* 610 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1697, 1695, 1694, - /* 620 */ 1693, 1536, 1690, 1536, 1536, 1536, 1536, 1721, 1720, 1536, - /* 630 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 640 */ 1536, 1536, 1536, 1536, 1630, 1536, 1536, 1536, 1536, 1536, - /* 650 */ 1536, 1536, 1536, 1536, 1621, 1536, 1620, 1536, 1536, 1536, - /* 660 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 670 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, - /* 680 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, + /* 0 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 10 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 20 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 30 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 40 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 50 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 60 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 70 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1617, 1543, + /* 80 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 90 */ 1543, 1543, 1543, 1543, 1543, 1615, 1783, 1971, 1543, 1543, + /* 100 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 110 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 120 */ 1543, 1983, 1543, 1543, 1543, 1617, 1543, 1615, 1943, 1943, + /* 130 */ 1983, 1983, 1983, 1543, 1543, 1543, 1543, 1722, 1543, 1824, + /* 140 */ 1824, 1543, 1543, 1543, 1543, 1543, 1722, 1543, 1543, 1543, + /* 150 */ 1543, 1543, 1543, 1543, 1543, 1818, 1543, 2008, 2061, 1543, + /* 160 */ 1543, 1543, 2011, 1543, 1543, 1543, 1543, 1675, 1998, 1975, + /* 170 */ 1989, 2045, 1976, 1973, 1992, 1543, 2002, 1543, 1811, 1788, + /* 180 */ 1788, 1543, 1543, 1788, 1785, 1785, 1666, 1543, 1543, 1543, + /* 190 */ 1543, 1543, 1543, 1617, 1543, 1617, 1543, 1543, 1617, 1543, + /* 200 */ 1617, 1617, 1617, 1543, 1617, 1543, 1543, 1543, 1543, 1543, + /* 210 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 220 */ 1830, 1543, 1615, 1820, 1543, 1615, 1543, 1543, 1543, 1615, + /* 230 */ 2016, 1543, 1543, 1543, 1543, 2016, 1543, 1543, 1615, 1543, + /* 240 */ 1615, 1543, 1543, 1543, 1543, 2018, 2016, 1543, 1543, 2018, + /* 250 */ 2016, 1543, 1543, 1543, 2030, 2026, 2018, 2034, 2032, 2004, + /* 260 */ 2002, 2064, 2051, 2047, 1989, 1543, 1543, 1543, 1691, 1543, + /* 270 */ 1543, 1543, 1615, 1575, 1543, 1813, 1824, 1725, 1725, 1725, + /* 280 */ 1618, 1548, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 290 */ 1543, 1543, 1543, 1899, 1543, 2029, 2028, 1947, 1946, 1945, + /* 300 */ 1936, 1898, 1543, 1687, 1897, 1896, 1543, 1543, 1543, 1543, + /* 310 */ 1543, 1543, 1543, 1890, 1543, 1543, 1891, 1889, 1888, 1543, + /* 320 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 330 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 340 */ 2048, 2052, 1972, 1543, 1543, 1543, 1543, 1543, 1881, 1872, + /* 350 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 360 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 370 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 380 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 390 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 400 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 410 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 420 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 430 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 440 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1580, 1543, + /* 450 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 460 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 470 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 480 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 490 */ 1543, 1543, 1543, 1656, 1655, 1543, 1543, 1543, 1543, 1543, + /* 500 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 510 */ 1543, 1543, 1543, 1880, 1543, 1543, 1543, 1543, 1543, 1543, + /* 520 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 2044, 1543, 1543, + /* 530 */ 1543, 1543, 1543, 1543, 1543, 1828, 1543, 1543, 1543, 1543, + /* 540 */ 1543, 1543, 1543, 1543, 1543, 1933, 1543, 1543, 1543, 2005, + /* 550 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 560 */ 1543, 1543, 1543, 1543, 1543, 1872, 1543, 2027, 1543, 1543, + /* 570 */ 2042, 1543, 2046, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 580 */ 1982, 1978, 1543, 1543, 1974, 1871, 1543, 1967, 1543, 1543, + /* 590 */ 1918, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 600 */ 1880, 1543, 1884, 1543, 1543, 1543, 1543, 1543, 1719, 1543, + /* 610 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 620 */ 1543, 1704, 1702, 1701, 1700, 1543, 1697, 1543, 1543, 1543, + /* 630 */ 1543, 1728, 1727, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 640 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1637, 1543, + /* 650 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1628, 1543, + /* 660 */ 1627, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 670 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 680 */ 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, + /* 690 */ 1543, 1543, 1543, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1239,6 +1232,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* WEND => nothing */ 0, /* WDURATION => nothing */ 0, /* IROWTS => nothing */ + 0, /* QTAGS => nothing */ 0, /* CAST => nothing */ 0, /* NOW => nothing */ 0, /* TODAY => nothing */ @@ -1250,7 +1244,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* COUNT => nothing */ 0, /* LAST_ROW => nothing */ 0, /* CASE => nothing */ - 264, /* END => ABORT */ + 265, /* END => ABORT */ 0, /* WHEN => nothing */ 0, /* THEN => nothing */ 0, /* ELSE => nothing */ @@ -1292,57 +1286,57 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ABORT => nothing */ - 264, /* AFTER => ABORT */ - 264, /* ATTACH => ABORT */ - 264, /* BEFORE => ABORT */ - 264, /* BEGIN => ABORT */ - 264, /* BITAND => ABORT */ - 264, /* BITNOT => ABORT */ - 264, /* BITOR => ABORT */ - 264, /* BLOCKS => ABORT */ - 264, /* CHANGE => ABORT */ - 264, /* COMMA => ABORT */ - 264, /* COMPACT => ABORT */ - 264, /* CONCAT => ABORT */ - 264, /* CONFLICT => ABORT */ - 264, /* COPY => ABORT */ - 264, /* DEFERRED => ABORT */ - 264, /* DELIMITERS => ABORT */ - 264, /* DETACH => ABORT */ - 264, /* DIVIDE => ABORT */ - 264, /* DOT => ABORT */ - 264, /* EACH => ABORT */ - 264, /* FAIL => ABORT */ - 264, /* FILE => ABORT */ - 264, /* FOR => ABORT */ - 264, /* GLOB => ABORT */ - 264, /* ID => ABORT */ - 264, /* IMMEDIATE => ABORT */ - 264, /* IMPORT => ABORT */ - 264, /* INITIALLY => ABORT */ - 264, /* INSTEAD => ABORT */ - 264, /* ISNULL => ABORT */ - 264, /* KEY => ABORT */ - 264, /* NK_BITNOT => ABORT */ - 264, /* NK_SEMI => ABORT */ - 264, /* NOTNULL => ABORT */ - 264, /* OF => ABORT */ - 264, /* PLUS => ABORT */ - 264, /* PRIVILEGE => ABORT */ - 264, /* RAISE => ABORT */ - 264, /* REPLACE => ABORT */ - 264, /* RESTRICT => ABORT */ - 264, /* ROW => ABORT */ - 264, /* SEMI => ABORT */ - 264, /* STAR => ABORT */ - 264, /* STATEMENT => ABORT */ - 264, /* STRING => ABORT */ - 264, /* TIMES => ABORT */ - 264, /* UPDATE => ABORT */ - 264, /* VALUES => ABORT */ - 264, /* VARIABLE => ABORT */ - 264, /* VIEW => ABORT */ - 264, /* WAL => ABORT */ + 265, /* AFTER => ABORT */ + 265, /* ATTACH => ABORT */ + 265, /* BEFORE => ABORT */ + 265, /* BEGIN => ABORT */ + 265, /* BITAND => ABORT */ + 265, /* BITNOT => ABORT */ + 265, /* BITOR => ABORT */ + 265, /* BLOCKS => ABORT */ + 265, /* CHANGE => ABORT */ + 265, /* COMMA => ABORT */ + 265, /* COMPACT => ABORT */ + 265, /* CONCAT => ABORT */ + 265, /* CONFLICT => ABORT */ + 265, /* COPY => ABORT */ + 265, /* DEFERRED => ABORT */ + 265, /* DELIMITERS => ABORT */ + 265, /* DETACH => ABORT */ + 265, /* DIVIDE => ABORT */ + 265, /* DOT => ABORT */ + 265, /* EACH => ABORT */ + 265, /* FAIL => ABORT */ + 265, /* FILE => ABORT */ + 265, /* FOR => ABORT */ + 265, /* GLOB => ABORT */ + 265, /* ID => ABORT */ + 265, /* IMMEDIATE => ABORT */ + 265, /* IMPORT => ABORT */ + 265, /* INITIALLY => ABORT */ + 265, /* INSTEAD => ABORT */ + 265, /* ISNULL => ABORT */ + 265, /* KEY => ABORT */ + 265, /* NK_BITNOT => ABORT */ + 265, /* NK_SEMI => ABORT */ + 265, /* NOTNULL => ABORT */ + 265, /* OF => ABORT */ + 265, /* PLUS => ABORT */ + 265, /* PRIVILEGE => ABORT */ + 265, /* RAISE => ABORT */ + 265, /* REPLACE => ABORT */ + 265, /* RESTRICT => ABORT */ + 265, /* ROW => ABORT */ + 265, /* SEMI => ABORT */ + 265, /* STAR => ABORT */ + 265, /* STATEMENT => ABORT */ + 265, /* STRING => ABORT */ + 265, /* TIMES => ABORT */ + 265, /* UPDATE => ABORT */ + 265, /* VALUES => ABORT */ + 265, /* VARIABLE => ABORT */ + 265, /* VIEW => ABORT */ + 265, /* WAL => ABORT */ }; #endif /* YYFALLBACK */ @@ -1642,242 +1636,243 @@ static const char *const yyTokenName[] = { /* 209 */ "WEND", /* 210 */ "WDURATION", /* 211 */ "IROWTS", - /* 212 */ "CAST", - /* 213 */ "NOW", - /* 214 */ "TODAY", - /* 215 */ "TIMEZONE", - /* 216 */ "CLIENT_VERSION", - /* 217 */ "SERVER_VERSION", - /* 218 */ "SERVER_STATUS", - /* 219 */ "CURRENT_USER", - /* 220 */ "COUNT", - /* 221 */ "LAST_ROW", - /* 222 */ "CASE", - /* 223 */ "END", - /* 224 */ "WHEN", - /* 225 */ "THEN", - /* 226 */ "ELSE", - /* 227 */ "BETWEEN", - /* 228 */ "IS", - /* 229 */ "NK_LT", - /* 230 */ "NK_GT", - /* 231 */ "NK_LE", - /* 232 */ "NK_GE", - /* 233 */ "NK_NE", - /* 234 */ "MATCH", - /* 235 */ "NMATCH", - /* 236 */ "CONTAINS", - /* 237 */ "IN", - /* 238 */ "JOIN", - /* 239 */ "INNER", - /* 240 */ "SELECT", - /* 241 */ "DISTINCT", - /* 242 */ "WHERE", - /* 243 */ "PARTITION", - /* 244 */ "BY", - /* 245 */ "SESSION", - /* 246 */ "STATE_WINDOW", - /* 247 */ "SLIDING", - /* 248 */ "FILL", - /* 249 */ "VALUE", - /* 250 */ "NONE", - /* 251 */ "PREV", - /* 252 */ "LINEAR", - /* 253 */ "NEXT", - /* 254 */ "HAVING", - /* 255 */ "RANGE", - /* 256 */ "EVERY", - /* 257 */ "ORDER", - /* 258 */ "SLIMIT", - /* 259 */ "SOFFSET", - /* 260 */ "LIMIT", - /* 261 */ "OFFSET", - /* 262 */ "ASC", - /* 263 */ "NULLS", - /* 264 */ "ABORT", - /* 265 */ "AFTER", - /* 266 */ "ATTACH", - /* 267 */ "BEFORE", - /* 268 */ "BEGIN", - /* 269 */ "BITAND", - /* 270 */ "BITNOT", - /* 271 */ "BITOR", - /* 272 */ "BLOCKS", - /* 273 */ "CHANGE", - /* 274 */ "COMMA", - /* 275 */ "COMPACT", - /* 276 */ "CONCAT", - /* 277 */ "CONFLICT", - /* 278 */ "COPY", - /* 279 */ "DEFERRED", - /* 280 */ "DELIMITERS", - /* 281 */ "DETACH", - /* 282 */ "DIVIDE", - /* 283 */ "DOT", - /* 284 */ "EACH", - /* 285 */ "FAIL", - /* 286 */ "FILE", - /* 287 */ "FOR", - /* 288 */ "GLOB", - /* 289 */ "ID", - /* 290 */ "IMMEDIATE", - /* 291 */ "IMPORT", - /* 292 */ "INITIALLY", - /* 293 */ "INSTEAD", - /* 294 */ "ISNULL", - /* 295 */ "KEY", - /* 296 */ "NK_BITNOT", - /* 297 */ "NK_SEMI", - /* 298 */ "NOTNULL", - /* 299 */ "OF", - /* 300 */ "PLUS", - /* 301 */ "PRIVILEGE", - /* 302 */ "RAISE", - /* 303 */ "REPLACE", - /* 304 */ "RESTRICT", - /* 305 */ "ROW", - /* 306 */ "SEMI", - /* 307 */ "STAR", - /* 308 */ "STATEMENT", - /* 309 */ "STRING", - /* 310 */ "TIMES", - /* 311 */ "UPDATE", - /* 312 */ "VALUES", - /* 313 */ "VARIABLE", - /* 314 */ "VIEW", - /* 315 */ "WAL", - /* 316 */ "cmd", - /* 317 */ "account_options", - /* 318 */ "alter_account_options", - /* 319 */ "literal", - /* 320 */ "alter_account_option", - /* 321 */ "user_name", - /* 322 */ "sysinfo_opt", - /* 323 */ "privileges", - /* 324 */ "priv_level", - /* 325 */ "priv_type_list", - /* 326 */ "priv_type", - /* 327 */ "db_name", - /* 328 */ "dnode_endpoint", - /* 329 */ "not_exists_opt", - /* 330 */ "db_options", - /* 331 */ "exists_opt", - /* 332 */ "alter_db_options", - /* 333 */ "speed_opt", - /* 334 */ "integer_list", - /* 335 */ "variable_list", - /* 336 */ "retention_list", - /* 337 */ "alter_db_option", - /* 338 */ "retention", - /* 339 */ "full_table_name", - /* 340 */ "column_def_list", - /* 341 */ "tags_def_opt", - /* 342 */ "table_options", - /* 343 */ "multi_create_clause", - /* 344 */ "tags_def", - /* 345 */ "multi_drop_clause", - /* 346 */ "alter_table_clause", - /* 347 */ "alter_table_options", - /* 348 */ "column_name", - /* 349 */ "type_name", - /* 350 */ "signed_literal", - /* 351 */ "create_subtable_clause", - /* 352 */ "specific_cols_opt", - /* 353 */ "expression_list", - /* 354 */ "drop_table_clause", - /* 355 */ "col_name_list", - /* 356 */ "table_name", - /* 357 */ "column_def", - /* 358 */ "duration_list", - /* 359 */ "rollup_func_list", - /* 360 */ "alter_table_option", - /* 361 */ "duration_literal", - /* 362 */ "rollup_func_name", - /* 363 */ "function_name", - /* 364 */ "col_name", - /* 365 */ "db_name_cond_opt", - /* 366 */ "like_pattern_opt", - /* 367 */ "table_name_cond", - /* 368 */ "from_db_opt", - /* 369 */ "index_options", - /* 370 */ "func_list", - /* 371 */ "sliding_opt", - /* 372 */ "sma_stream_opt", - /* 373 */ "func", - /* 374 */ "stream_options", - /* 375 */ "topic_name", - /* 376 */ "query_or_subquery", - /* 377 */ "cgroup_name", - /* 378 */ "analyze_opt", - /* 379 */ "explain_options", - /* 380 */ "agg_func_opt", - /* 381 */ "bufsize_opt", - /* 382 */ "stream_name", - /* 383 */ "subtable_opt", - /* 384 */ "expression", - /* 385 */ "dnode_list", - /* 386 */ "where_clause_opt", - /* 387 */ "signed", - /* 388 */ "literal_func", - /* 389 */ "literal_list", - /* 390 */ "table_alias", - /* 391 */ "column_alias", - /* 392 */ "expr_or_subquery", - /* 393 */ "subquery", - /* 394 */ "pseudo_column", - /* 395 */ "column_reference", - /* 396 */ "function_expression", - /* 397 */ "case_when_expression", - /* 398 */ "star_func", - /* 399 */ "star_func_para_list", - /* 400 */ "noarg_func", - /* 401 */ "other_para_list", - /* 402 */ "star_func_para", - /* 403 */ "when_then_list", - /* 404 */ "case_when_else_opt", - /* 405 */ "common_expression", - /* 406 */ "when_then_expr", - /* 407 */ "predicate", - /* 408 */ "compare_op", - /* 409 */ "in_op", - /* 410 */ "in_predicate_value", - /* 411 */ "boolean_value_expression", - /* 412 */ "boolean_primary", - /* 413 */ "from_clause_opt", - /* 414 */ "table_reference_list", - /* 415 */ "table_reference", - /* 416 */ "table_primary", - /* 417 */ "joined_table", - /* 418 */ "alias_opt", - /* 419 */ "parenthesized_joined_table", - /* 420 */ "join_type", - /* 421 */ "search_condition", - /* 422 */ "query_specification", - /* 423 */ "set_quantifier_opt", - /* 424 */ "select_list", - /* 425 */ "partition_by_clause_opt", - /* 426 */ "range_opt", - /* 427 */ "every_opt", - /* 428 */ "fill_opt", - /* 429 */ "twindow_clause_opt", - /* 430 */ "group_by_clause_opt", - /* 431 */ "having_clause_opt", - /* 432 */ "select_item", - /* 433 */ "partition_list", - /* 434 */ "partition_item", - /* 435 */ "fill_mode", - /* 436 */ "group_by_list", - /* 437 */ "query_expression", - /* 438 */ "query_simple", - /* 439 */ "order_by_clause_opt", - /* 440 */ "slimit_clause_opt", - /* 441 */ "limit_clause_opt", - /* 442 */ "union_query_expression", - /* 443 */ "query_simple_or_subquery", - /* 444 */ "sort_specification_list", - /* 445 */ "sort_specification", - /* 446 */ "ordering_specification_opt", - /* 447 */ "null_ordering_opt", + /* 212 */ "QTAGS", + /* 213 */ "CAST", + /* 214 */ "NOW", + /* 215 */ "TODAY", + /* 216 */ "TIMEZONE", + /* 217 */ "CLIENT_VERSION", + /* 218 */ "SERVER_VERSION", + /* 219 */ "SERVER_STATUS", + /* 220 */ "CURRENT_USER", + /* 221 */ "COUNT", + /* 222 */ "LAST_ROW", + /* 223 */ "CASE", + /* 224 */ "END", + /* 225 */ "WHEN", + /* 226 */ "THEN", + /* 227 */ "ELSE", + /* 228 */ "BETWEEN", + /* 229 */ "IS", + /* 230 */ "NK_LT", + /* 231 */ "NK_GT", + /* 232 */ "NK_LE", + /* 233 */ "NK_GE", + /* 234 */ "NK_NE", + /* 235 */ "MATCH", + /* 236 */ "NMATCH", + /* 237 */ "CONTAINS", + /* 238 */ "IN", + /* 239 */ "JOIN", + /* 240 */ "INNER", + /* 241 */ "SELECT", + /* 242 */ "DISTINCT", + /* 243 */ "WHERE", + /* 244 */ "PARTITION", + /* 245 */ "BY", + /* 246 */ "SESSION", + /* 247 */ "STATE_WINDOW", + /* 248 */ "SLIDING", + /* 249 */ "FILL", + /* 250 */ "VALUE", + /* 251 */ "NONE", + /* 252 */ "PREV", + /* 253 */ "LINEAR", + /* 254 */ "NEXT", + /* 255 */ "HAVING", + /* 256 */ "RANGE", + /* 257 */ "EVERY", + /* 258 */ "ORDER", + /* 259 */ "SLIMIT", + /* 260 */ "SOFFSET", + /* 261 */ "LIMIT", + /* 262 */ "OFFSET", + /* 263 */ "ASC", + /* 264 */ "NULLS", + /* 265 */ "ABORT", + /* 266 */ "AFTER", + /* 267 */ "ATTACH", + /* 268 */ "BEFORE", + /* 269 */ "BEGIN", + /* 270 */ "BITAND", + /* 271 */ "BITNOT", + /* 272 */ "BITOR", + /* 273 */ "BLOCKS", + /* 274 */ "CHANGE", + /* 275 */ "COMMA", + /* 276 */ "COMPACT", + /* 277 */ "CONCAT", + /* 278 */ "CONFLICT", + /* 279 */ "COPY", + /* 280 */ "DEFERRED", + /* 281 */ "DELIMITERS", + /* 282 */ "DETACH", + /* 283 */ "DIVIDE", + /* 284 */ "DOT", + /* 285 */ "EACH", + /* 286 */ "FAIL", + /* 287 */ "FILE", + /* 288 */ "FOR", + /* 289 */ "GLOB", + /* 290 */ "ID", + /* 291 */ "IMMEDIATE", + /* 292 */ "IMPORT", + /* 293 */ "INITIALLY", + /* 294 */ "INSTEAD", + /* 295 */ "ISNULL", + /* 296 */ "KEY", + /* 297 */ "NK_BITNOT", + /* 298 */ "NK_SEMI", + /* 299 */ "NOTNULL", + /* 300 */ "OF", + /* 301 */ "PLUS", + /* 302 */ "PRIVILEGE", + /* 303 */ "RAISE", + /* 304 */ "REPLACE", + /* 305 */ "RESTRICT", + /* 306 */ "ROW", + /* 307 */ "SEMI", + /* 308 */ "STAR", + /* 309 */ "STATEMENT", + /* 310 */ "STRING", + /* 311 */ "TIMES", + /* 312 */ "UPDATE", + /* 313 */ "VALUES", + /* 314 */ "VARIABLE", + /* 315 */ "VIEW", + /* 316 */ "WAL", + /* 317 */ "cmd", + /* 318 */ "account_options", + /* 319 */ "alter_account_options", + /* 320 */ "literal", + /* 321 */ "alter_account_option", + /* 322 */ "user_name", + /* 323 */ "sysinfo_opt", + /* 324 */ "privileges", + /* 325 */ "priv_level", + /* 326 */ "priv_type_list", + /* 327 */ "priv_type", + /* 328 */ "db_name", + /* 329 */ "dnode_endpoint", + /* 330 */ "not_exists_opt", + /* 331 */ "db_options", + /* 332 */ "exists_opt", + /* 333 */ "alter_db_options", + /* 334 */ "speed_opt", + /* 335 */ "integer_list", + /* 336 */ "variable_list", + /* 337 */ "retention_list", + /* 338 */ "alter_db_option", + /* 339 */ "retention", + /* 340 */ "full_table_name", + /* 341 */ "column_def_list", + /* 342 */ "tags_def_opt", + /* 343 */ "table_options", + /* 344 */ "multi_create_clause", + /* 345 */ "tags_def", + /* 346 */ "multi_drop_clause", + /* 347 */ "alter_table_clause", + /* 348 */ "alter_table_options", + /* 349 */ "column_name", + /* 350 */ "type_name", + /* 351 */ "signed_literal", + /* 352 */ "create_subtable_clause", + /* 353 */ "specific_cols_opt", + /* 354 */ "expression_list", + /* 355 */ "drop_table_clause", + /* 356 */ "col_name_list", + /* 357 */ "table_name", + /* 358 */ "column_def", + /* 359 */ "duration_list", + /* 360 */ "rollup_func_list", + /* 361 */ "alter_table_option", + /* 362 */ "duration_literal", + /* 363 */ "rollup_func_name", + /* 364 */ "function_name", + /* 365 */ "col_name", + /* 366 */ "db_name_cond_opt", + /* 367 */ "like_pattern_opt", + /* 368 */ "table_name_cond", + /* 369 */ "from_db_opt", + /* 370 */ "index_options", + /* 371 */ "func_list", + /* 372 */ "sliding_opt", + /* 373 */ "sma_stream_opt", + /* 374 */ "func", + /* 375 */ "stream_options", + /* 376 */ "topic_name", + /* 377 */ "query_or_subquery", + /* 378 */ "cgroup_name", + /* 379 */ "analyze_opt", + /* 380 */ "explain_options", + /* 381 */ "agg_func_opt", + /* 382 */ "bufsize_opt", + /* 383 */ "stream_name", + /* 384 */ "subtable_opt", + /* 385 */ "expression", + /* 386 */ "dnode_list", + /* 387 */ "where_clause_opt", + /* 388 */ "signed", + /* 389 */ "literal_func", + /* 390 */ "literal_list", + /* 391 */ "table_alias", + /* 392 */ "column_alias", + /* 393 */ "expr_or_subquery", + /* 394 */ "subquery", + /* 395 */ "pseudo_column", + /* 396 */ "column_reference", + /* 397 */ "function_expression", + /* 398 */ "case_when_expression", + /* 399 */ "star_func", + /* 400 */ "star_func_para_list", + /* 401 */ "noarg_func", + /* 402 */ "other_para_list", + /* 403 */ "star_func_para", + /* 404 */ "when_then_list", + /* 405 */ "case_when_else_opt", + /* 406 */ "common_expression", + /* 407 */ "when_then_expr", + /* 408 */ "predicate", + /* 409 */ "compare_op", + /* 410 */ "in_op", + /* 411 */ "in_predicate_value", + /* 412 */ "boolean_value_expression", + /* 413 */ "boolean_primary", + /* 414 */ "from_clause_opt", + /* 415 */ "table_reference_list", + /* 416 */ "table_reference", + /* 417 */ "table_primary", + /* 418 */ "joined_table", + /* 419 */ "alias_opt", + /* 420 */ "parenthesized_joined_table", + /* 421 */ "join_type", + /* 422 */ "search_condition", + /* 423 */ "query_specification", + /* 424 */ "set_quantifier_opt", + /* 425 */ "select_list", + /* 426 */ "partition_by_clause_opt", + /* 427 */ "range_opt", + /* 428 */ "every_opt", + /* 429 */ "fill_opt", + /* 430 */ "twindow_clause_opt", + /* 431 */ "group_by_clause_opt", + /* 432 */ "having_clause_opt", + /* 433 */ "select_item", + /* 434 */ "partition_list", + /* 435 */ "partition_item", + /* 436 */ "fill_mode", + /* 437 */ "group_by_list", + /* 438 */ "query_expression", + /* 439 */ "query_simple", + /* 440 */ "order_by_clause_opt", + /* 441 */ "slimit_clause_opt", + /* 442 */ "limit_clause_opt", + /* 443 */ "union_query_expression", + /* 444 */ "query_simple_or_subquery", + /* 445 */ "sort_specification_list", + /* 446 */ "sort_specification", + /* 447 */ "ordering_specification_opt", + /* 448 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -2119,291 +2114,293 @@ static const char *const yyRuleName[] = { /* 231 */ "cmd ::= SHOW CONSUMERS", /* 232 */ "cmd ::= SHOW SUBSCRIPTIONS", /* 233 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", - /* 234 */ "cmd ::= SHOW VNODES NK_INTEGER", - /* 235 */ "cmd ::= SHOW VNODES NK_STRING", - /* 236 */ "db_name_cond_opt ::=", - /* 237 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 238 */ "like_pattern_opt ::=", - /* 239 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 240 */ "table_name_cond ::= table_name", - /* 241 */ "from_db_opt ::=", - /* 242 */ "from_db_opt ::= FROM db_name", - /* 243 */ "cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options", - /* 244 */ "cmd ::= DROP INDEX exists_opt full_table_name", - /* 245 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", - /* 246 */ "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", - /* 247 */ "func_list ::= func", - /* 248 */ "func_list ::= func_list NK_COMMA func", - /* 249 */ "func ::= function_name NK_LP expression_list NK_RP", - /* 250 */ "sma_stream_opt ::=", - /* 251 */ "sma_stream_opt ::= stream_options WATERMARK duration_literal", - /* 252 */ "sma_stream_opt ::= stream_options MAX_DELAY duration_literal", - /* 253 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", - /* 254 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", - /* 255 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name", - /* 256 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", - /* 257 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name", - /* 258 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 259 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 260 */ "cmd ::= DESC full_table_name", - /* 261 */ "cmd ::= DESCRIBE full_table_name", - /* 262 */ "cmd ::= RESET QUERY CACHE", - /* 263 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", - /* 264 */ "analyze_opt ::=", - /* 265 */ "analyze_opt ::= ANALYZE", - /* 266 */ "explain_options ::=", - /* 267 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 268 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 269 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", - /* 270 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 271 */ "agg_func_opt ::=", - /* 272 */ "agg_func_opt ::= AGGREGATE", - /* 273 */ "bufsize_opt ::=", - /* 274 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 275 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery", - /* 276 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 277 */ "stream_options ::=", - /* 278 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 279 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 280 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 281 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 282 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", - /* 283 */ "subtable_opt ::=", - /* 284 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 285 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 286 */ "cmd ::= KILL QUERY NK_STRING", - /* 287 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 288 */ "cmd ::= BALANCE VGROUP", - /* 289 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 290 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 291 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 292 */ "dnode_list ::= DNODE NK_INTEGER", - /* 293 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 294 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 295 */ "cmd ::= query_or_subquery", - /* 296 */ "cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 297 */ "cmd ::= INSERT INTO full_table_name query_or_subquery", - /* 298 */ "literal ::= NK_INTEGER", - /* 299 */ "literal ::= NK_FLOAT", - /* 300 */ "literal ::= NK_STRING", - /* 301 */ "literal ::= NK_BOOL", - /* 302 */ "literal ::= TIMESTAMP NK_STRING", - /* 303 */ "literal ::= duration_literal", - /* 304 */ "literal ::= NULL", - /* 305 */ "literal ::= NK_QUESTION", - /* 306 */ "duration_literal ::= NK_VARIABLE", - /* 307 */ "signed ::= NK_INTEGER", - /* 308 */ "signed ::= NK_PLUS NK_INTEGER", - /* 309 */ "signed ::= NK_MINUS NK_INTEGER", - /* 310 */ "signed ::= NK_FLOAT", - /* 311 */ "signed ::= NK_PLUS NK_FLOAT", - /* 312 */ "signed ::= NK_MINUS NK_FLOAT", - /* 313 */ "signed_literal ::= signed", - /* 314 */ "signed_literal ::= NK_STRING", - /* 315 */ "signed_literal ::= NK_BOOL", - /* 316 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 317 */ "signed_literal ::= duration_literal", - /* 318 */ "signed_literal ::= NULL", - /* 319 */ "signed_literal ::= literal_func", - /* 320 */ "signed_literal ::= NK_QUESTION", - /* 321 */ "literal_list ::= signed_literal", - /* 322 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 323 */ "db_name ::= NK_ID", - /* 324 */ "table_name ::= NK_ID", - /* 325 */ "column_name ::= NK_ID", - /* 326 */ "function_name ::= NK_ID", - /* 327 */ "table_alias ::= NK_ID", - /* 328 */ "column_alias ::= NK_ID", - /* 329 */ "user_name ::= NK_ID", - /* 330 */ "topic_name ::= NK_ID", - /* 331 */ "stream_name ::= NK_ID", - /* 332 */ "cgroup_name ::= NK_ID", - /* 333 */ "expr_or_subquery ::= expression", - /* 334 */ "expr_or_subquery ::= subquery", - /* 335 */ "expression ::= literal", - /* 336 */ "expression ::= pseudo_column", - /* 337 */ "expression ::= column_reference", - /* 338 */ "expression ::= function_expression", - /* 339 */ "expression ::= case_when_expression", - /* 340 */ "expression ::= NK_LP expression NK_RP", - /* 341 */ "expression ::= NK_PLUS expr_or_subquery", - /* 342 */ "expression ::= NK_MINUS expr_or_subquery", - /* 343 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 344 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 345 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 346 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 347 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 348 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 349 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 350 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 351 */ "expression_list ::= expr_or_subquery", - /* 352 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 353 */ "column_reference ::= column_name", - /* 354 */ "column_reference ::= table_name NK_DOT column_name", - /* 355 */ "pseudo_column ::= ROWTS", - /* 356 */ "pseudo_column ::= TBNAME", - /* 357 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 358 */ "pseudo_column ::= QSTART", - /* 359 */ "pseudo_column ::= QEND", - /* 360 */ "pseudo_column ::= QDURATION", - /* 361 */ "pseudo_column ::= WSTART", - /* 362 */ "pseudo_column ::= WEND", - /* 363 */ "pseudo_column ::= WDURATION", - /* 364 */ "pseudo_column ::= IROWTS", - /* 365 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 366 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 367 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 368 */ "function_expression ::= literal_func", - /* 369 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 370 */ "literal_func ::= NOW", - /* 371 */ "noarg_func ::= NOW", - /* 372 */ "noarg_func ::= TODAY", - /* 373 */ "noarg_func ::= TIMEZONE", - /* 374 */ "noarg_func ::= DATABASE", - /* 375 */ "noarg_func ::= CLIENT_VERSION", - /* 376 */ "noarg_func ::= SERVER_VERSION", - /* 377 */ "noarg_func ::= SERVER_STATUS", - /* 378 */ "noarg_func ::= CURRENT_USER", - /* 379 */ "noarg_func ::= USER", - /* 380 */ "star_func ::= COUNT", - /* 381 */ "star_func ::= FIRST", - /* 382 */ "star_func ::= LAST", - /* 383 */ "star_func ::= LAST_ROW", - /* 384 */ "star_func_para_list ::= NK_STAR", - /* 385 */ "star_func_para_list ::= other_para_list", - /* 386 */ "other_para_list ::= star_func_para", - /* 387 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 388 */ "star_func_para ::= expr_or_subquery", - /* 389 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 390 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 391 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 392 */ "when_then_list ::= when_then_expr", - /* 393 */ "when_then_list ::= when_then_list when_then_expr", - /* 394 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 395 */ "case_when_else_opt ::=", - /* 396 */ "case_when_else_opt ::= ELSE common_expression", - /* 397 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 398 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 399 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 400 */ "predicate ::= expr_or_subquery IS NULL", - /* 401 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 402 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 403 */ "compare_op ::= NK_LT", - /* 404 */ "compare_op ::= NK_GT", - /* 405 */ "compare_op ::= NK_LE", - /* 406 */ "compare_op ::= NK_GE", - /* 407 */ "compare_op ::= NK_NE", - /* 408 */ "compare_op ::= NK_EQ", - /* 409 */ "compare_op ::= LIKE", - /* 410 */ "compare_op ::= NOT LIKE", - /* 411 */ "compare_op ::= MATCH", - /* 412 */ "compare_op ::= NMATCH", - /* 413 */ "compare_op ::= CONTAINS", - /* 414 */ "in_op ::= IN", - /* 415 */ "in_op ::= NOT IN", - /* 416 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 417 */ "boolean_value_expression ::= boolean_primary", - /* 418 */ "boolean_value_expression ::= NOT boolean_primary", - /* 419 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 420 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 421 */ "boolean_primary ::= predicate", - /* 422 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 423 */ "common_expression ::= expr_or_subquery", - /* 424 */ "common_expression ::= boolean_value_expression", - /* 425 */ "from_clause_opt ::=", - /* 426 */ "from_clause_opt ::= FROM table_reference_list", - /* 427 */ "table_reference_list ::= table_reference", - /* 428 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 429 */ "table_reference ::= table_primary", - /* 430 */ "table_reference ::= joined_table", - /* 431 */ "table_primary ::= table_name alias_opt", - /* 432 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 433 */ "table_primary ::= subquery alias_opt", - /* 434 */ "table_primary ::= parenthesized_joined_table", - /* 435 */ "alias_opt ::=", - /* 436 */ "alias_opt ::= table_alias", - /* 437 */ "alias_opt ::= AS table_alias", - /* 438 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 439 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 440 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 441 */ "join_type ::=", - /* 442 */ "join_type ::= INNER", - /* 443 */ "query_specification ::= SELECT set_quantifier_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", - /* 444 */ "set_quantifier_opt ::=", - /* 445 */ "set_quantifier_opt ::= DISTINCT", - /* 446 */ "set_quantifier_opt ::= ALL", - /* 447 */ "select_list ::= select_item", - /* 448 */ "select_list ::= select_list NK_COMMA select_item", - /* 449 */ "select_item ::= NK_STAR", - /* 450 */ "select_item ::= common_expression", - /* 451 */ "select_item ::= common_expression column_alias", - /* 452 */ "select_item ::= common_expression AS column_alias", - /* 453 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 454 */ "where_clause_opt ::=", - /* 455 */ "where_clause_opt ::= WHERE search_condition", - /* 456 */ "partition_by_clause_opt ::=", - /* 457 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 458 */ "partition_list ::= partition_item", - /* 459 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 460 */ "partition_item ::= expr_or_subquery", - /* 461 */ "partition_item ::= expr_or_subquery column_alias", - /* 462 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 463 */ "twindow_clause_opt ::=", - /* 464 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 465 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 466 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 467 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 468 */ "sliding_opt ::=", - /* 469 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 470 */ "fill_opt ::=", - /* 471 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 472 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 473 */ "fill_mode ::= NONE", - /* 474 */ "fill_mode ::= PREV", - /* 475 */ "fill_mode ::= NULL", - /* 476 */ "fill_mode ::= LINEAR", - /* 477 */ "fill_mode ::= NEXT", - /* 478 */ "group_by_clause_opt ::=", - /* 479 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 480 */ "group_by_list ::= expr_or_subquery", - /* 481 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 482 */ "having_clause_opt ::=", - /* 483 */ "having_clause_opt ::= HAVING search_condition", - /* 484 */ "range_opt ::=", - /* 485 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 486 */ "every_opt ::=", - /* 487 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 488 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 489 */ "query_simple ::= query_specification", - /* 490 */ "query_simple ::= union_query_expression", - /* 491 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 492 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 493 */ "query_simple_or_subquery ::= query_simple", - /* 494 */ "query_simple_or_subquery ::= subquery", - /* 495 */ "query_or_subquery ::= query_expression", - /* 496 */ "query_or_subquery ::= subquery", - /* 497 */ "order_by_clause_opt ::=", - /* 498 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 499 */ "slimit_clause_opt ::=", - /* 500 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 501 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 502 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 503 */ "limit_clause_opt ::=", - /* 504 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 505 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 506 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 507 */ "subquery ::= NK_LP query_expression NK_RP", - /* 508 */ "subquery ::= NK_LP subquery NK_RP", - /* 509 */ "search_condition ::= common_expression", - /* 510 */ "sort_specification_list ::= sort_specification", - /* 511 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 512 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 513 */ "ordering_specification_opt ::=", - /* 514 */ "ordering_specification_opt ::= ASC", - /* 515 */ "ordering_specification_opt ::= DESC", - /* 516 */ "null_ordering_opt ::=", - /* 517 */ "null_ordering_opt ::= NULLS FIRST", - /* 518 */ "null_ordering_opt ::= NULLS LAST", + /* 234 */ "cmd ::= SHOW TABLE TAGS FROM table_name_cond from_db_opt", + /* 235 */ "cmd ::= SHOW VNODES NK_INTEGER", + /* 236 */ "cmd ::= SHOW VNODES NK_STRING", + /* 237 */ "db_name_cond_opt ::=", + /* 238 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 239 */ "like_pattern_opt ::=", + /* 240 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 241 */ "table_name_cond ::= table_name", + /* 242 */ "from_db_opt ::=", + /* 243 */ "from_db_opt ::= FROM db_name", + /* 244 */ "cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options", + /* 245 */ "cmd ::= DROP INDEX exists_opt full_table_name", + /* 246 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", + /* 247 */ "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", + /* 248 */ "func_list ::= func", + /* 249 */ "func_list ::= func_list NK_COMMA func", + /* 250 */ "func ::= function_name NK_LP expression_list NK_RP", + /* 251 */ "sma_stream_opt ::=", + /* 252 */ "sma_stream_opt ::= stream_options WATERMARK duration_literal", + /* 253 */ "sma_stream_opt ::= stream_options MAX_DELAY duration_literal", + /* 254 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", + /* 255 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", + /* 256 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name", + /* 257 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", + /* 258 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name", + /* 259 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 260 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 261 */ "cmd ::= DESC full_table_name", + /* 262 */ "cmd ::= DESCRIBE full_table_name", + /* 263 */ "cmd ::= RESET QUERY CACHE", + /* 264 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", + /* 265 */ "analyze_opt ::=", + /* 266 */ "analyze_opt ::= ANALYZE", + /* 267 */ "explain_options ::=", + /* 268 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 269 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 270 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", + /* 271 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 272 */ "agg_func_opt ::=", + /* 273 */ "agg_func_opt ::= AGGREGATE", + /* 274 */ "bufsize_opt ::=", + /* 275 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 276 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery", + /* 277 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 278 */ "stream_options ::=", + /* 279 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 280 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 281 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 282 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 283 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", + /* 284 */ "subtable_opt ::=", + /* 285 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 286 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 287 */ "cmd ::= KILL QUERY NK_STRING", + /* 288 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 289 */ "cmd ::= BALANCE VGROUP", + /* 290 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 291 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 292 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 293 */ "dnode_list ::= DNODE NK_INTEGER", + /* 294 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 295 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 296 */ "cmd ::= query_or_subquery", + /* 297 */ "cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 298 */ "cmd ::= INSERT INTO full_table_name query_or_subquery", + /* 299 */ "literal ::= NK_INTEGER", + /* 300 */ "literal ::= NK_FLOAT", + /* 301 */ "literal ::= NK_STRING", + /* 302 */ "literal ::= NK_BOOL", + /* 303 */ "literal ::= TIMESTAMP NK_STRING", + /* 304 */ "literal ::= duration_literal", + /* 305 */ "literal ::= NULL", + /* 306 */ "literal ::= NK_QUESTION", + /* 307 */ "duration_literal ::= NK_VARIABLE", + /* 308 */ "signed ::= NK_INTEGER", + /* 309 */ "signed ::= NK_PLUS NK_INTEGER", + /* 310 */ "signed ::= NK_MINUS NK_INTEGER", + /* 311 */ "signed ::= NK_FLOAT", + /* 312 */ "signed ::= NK_PLUS NK_FLOAT", + /* 313 */ "signed ::= NK_MINUS NK_FLOAT", + /* 314 */ "signed_literal ::= signed", + /* 315 */ "signed_literal ::= NK_STRING", + /* 316 */ "signed_literal ::= NK_BOOL", + /* 317 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 318 */ "signed_literal ::= duration_literal", + /* 319 */ "signed_literal ::= NULL", + /* 320 */ "signed_literal ::= literal_func", + /* 321 */ "signed_literal ::= NK_QUESTION", + /* 322 */ "literal_list ::= signed_literal", + /* 323 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 324 */ "db_name ::= NK_ID", + /* 325 */ "table_name ::= NK_ID", + /* 326 */ "column_name ::= NK_ID", + /* 327 */ "function_name ::= NK_ID", + /* 328 */ "table_alias ::= NK_ID", + /* 329 */ "column_alias ::= NK_ID", + /* 330 */ "user_name ::= NK_ID", + /* 331 */ "topic_name ::= NK_ID", + /* 332 */ "stream_name ::= NK_ID", + /* 333 */ "cgroup_name ::= NK_ID", + /* 334 */ "expr_or_subquery ::= expression", + /* 335 */ "expr_or_subquery ::= subquery", + /* 336 */ "expression ::= literal", + /* 337 */ "expression ::= pseudo_column", + /* 338 */ "expression ::= column_reference", + /* 339 */ "expression ::= function_expression", + /* 340 */ "expression ::= case_when_expression", + /* 341 */ "expression ::= NK_LP expression NK_RP", + /* 342 */ "expression ::= NK_PLUS expr_or_subquery", + /* 343 */ "expression ::= NK_MINUS expr_or_subquery", + /* 344 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 345 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 346 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 347 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 348 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 349 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 350 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 351 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 352 */ "expression_list ::= expr_or_subquery", + /* 353 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 354 */ "column_reference ::= column_name", + /* 355 */ "column_reference ::= table_name NK_DOT column_name", + /* 356 */ "pseudo_column ::= ROWTS", + /* 357 */ "pseudo_column ::= TBNAME", + /* 358 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 359 */ "pseudo_column ::= QSTART", + /* 360 */ "pseudo_column ::= QEND", + /* 361 */ "pseudo_column ::= QDURATION", + /* 362 */ "pseudo_column ::= WSTART", + /* 363 */ "pseudo_column ::= WEND", + /* 364 */ "pseudo_column ::= WDURATION", + /* 365 */ "pseudo_column ::= IROWTS", + /* 366 */ "pseudo_column ::= QTAGS", + /* 367 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 368 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 369 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 370 */ "function_expression ::= literal_func", + /* 371 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 372 */ "literal_func ::= NOW", + /* 373 */ "noarg_func ::= NOW", + /* 374 */ "noarg_func ::= TODAY", + /* 375 */ "noarg_func ::= TIMEZONE", + /* 376 */ "noarg_func ::= DATABASE", + /* 377 */ "noarg_func ::= CLIENT_VERSION", + /* 378 */ "noarg_func ::= SERVER_VERSION", + /* 379 */ "noarg_func ::= SERVER_STATUS", + /* 380 */ "noarg_func ::= CURRENT_USER", + /* 381 */ "noarg_func ::= USER", + /* 382 */ "star_func ::= COUNT", + /* 383 */ "star_func ::= FIRST", + /* 384 */ "star_func ::= LAST", + /* 385 */ "star_func ::= LAST_ROW", + /* 386 */ "star_func_para_list ::= NK_STAR", + /* 387 */ "star_func_para_list ::= other_para_list", + /* 388 */ "other_para_list ::= star_func_para", + /* 389 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 390 */ "star_func_para ::= expr_or_subquery", + /* 391 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 392 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 393 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 394 */ "when_then_list ::= when_then_expr", + /* 395 */ "when_then_list ::= when_then_list when_then_expr", + /* 396 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 397 */ "case_when_else_opt ::=", + /* 398 */ "case_when_else_opt ::= ELSE common_expression", + /* 399 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 400 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 401 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 402 */ "predicate ::= expr_or_subquery IS NULL", + /* 403 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 404 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 405 */ "compare_op ::= NK_LT", + /* 406 */ "compare_op ::= NK_GT", + /* 407 */ "compare_op ::= NK_LE", + /* 408 */ "compare_op ::= NK_GE", + /* 409 */ "compare_op ::= NK_NE", + /* 410 */ "compare_op ::= NK_EQ", + /* 411 */ "compare_op ::= LIKE", + /* 412 */ "compare_op ::= NOT LIKE", + /* 413 */ "compare_op ::= MATCH", + /* 414 */ "compare_op ::= NMATCH", + /* 415 */ "compare_op ::= CONTAINS", + /* 416 */ "in_op ::= IN", + /* 417 */ "in_op ::= NOT IN", + /* 418 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 419 */ "boolean_value_expression ::= boolean_primary", + /* 420 */ "boolean_value_expression ::= NOT boolean_primary", + /* 421 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 422 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 423 */ "boolean_primary ::= predicate", + /* 424 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 425 */ "common_expression ::= expr_or_subquery", + /* 426 */ "common_expression ::= boolean_value_expression", + /* 427 */ "from_clause_opt ::=", + /* 428 */ "from_clause_opt ::= FROM table_reference_list", + /* 429 */ "table_reference_list ::= table_reference", + /* 430 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 431 */ "table_reference ::= table_primary", + /* 432 */ "table_reference ::= joined_table", + /* 433 */ "table_primary ::= table_name alias_opt", + /* 434 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 435 */ "table_primary ::= subquery alias_opt", + /* 436 */ "table_primary ::= parenthesized_joined_table", + /* 437 */ "alias_opt ::=", + /* 438 */ "alias_opt ::= table_alias", + /* 439 */ "alias_opt ::= AS table_alias", + /* 440 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 441 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 442 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 443 */ "join_type ::=", + /* 444 */ "join_type ::= INNER", + /* 445 */ "query_specification ::= SELECT set_quantifier_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", + /* 446 */ "set_quantifier_opt ::=", + /* 447 */ "set_quantifier_opt ::= DISTINCT", + /* 448 */ "set_quantifier_opt ::= ALL", + /* 449 */ "select_list ::= select_item", + /* 450 */ "select_list ::= select_list NK_COMMA select_item", + /* 451 */ "select_item ::= NK_STAR", + /* 452 */ "select_item ::= common_expression", + /* 453 */ "select_item ::= common_expression column_alias", + /* 454 */ "select_item ::= common_expression AS column_alias", + /* 455 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 456 */ "where_clause_opt ::=", + /* 457 */ "where_clause_opt ::= WHERE search_condition", + /* 458 */ "partition_by_clause_opt ::=", + /* 459 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 460 */ "partition_list ::= partition_item", + /* 461 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 462 */ "partition_item ::= expr_or_subquery", + /* 463 */ "partition_item ::= expr_or_subquery column_alias", + /* 464 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 465 */ "twindow_clause_opt ::=", + /* 466 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 467 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 468 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 469 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 470 */ "sliding_opt ::=", + /* 471 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 472 */ "fill_opt ::=", + /* 473 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 474 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", + /* 475 */ "fill_mode ::= NONE", + /* 476 */ "fill_mode ::= PREV", + /* 477 */ "fill_mode ::= NULL", + /* 478 */ "fill_mode ::= LINEAR", + /* 479 */ "fill_mode ::= NEXT", + /* 480 */ "group_by_clause_opt ::=", + /* 481 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 482 */ "group_by_list ::= expr_or_subquery", + /* 483 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 484 */ "having_clause_opt ::=", + /* 485 */ "having_clause_opt ::= HAVING search_condition", + /* 486 */ "range_opt ::=", + /* 487 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 488 */ "every_opt ::=", + /* 489 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 490 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 491 */ "query_simple ::= query_specification", + /* 492 */ "query_simple ::= union_query_expression", + /* 493 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 494 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 495 */ "query_simple_or_subquery ::= query_simple", + /* 496 */ "query_simple_or_subquery ::= subquery", + /* 497 */ "query_or_subquery ::= query_expression", + /* 498 */ "query_or_subquery ::= subquery", + /* 499 */ "order_by_clause_opt ::=", + /* 500 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 501 */ "slimit_clause_opt ::=", + /* 502 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 503 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 504 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 505 */ "limit_clause_opt ::=", + /* 506 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 507 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 508 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 509 */ "subquery ::= NK_LP query_expression NK_RP", + /* 510 */ "subquery ::= NK_LP subquery NK_RP", + /* 511 */ "search_condition ::= common_expression", + /* 512 */ "sort_specification_list ::= sort_specification", + /* 513 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 514 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 515 */ "ordering_specification_opt ::=", + /* 516 */ "ordering_specification_opt ::= ASC", + /* 517 */ "ordering_specification_opt ::= DESC", + /* 518 */ "null_ordering_opt ::=", + /* 519 */ "null_ordering_opt ::= NULLS FIRST", + /* 520 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -2530,190 +2527,190 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 316: /* cmd */ - case 319: /* literal */ - case 330: /* db_options */ - case 332: /* alter_db_options */ - case 338: /* retention */ - case 339: /* full_table_name */ - case 342: /* table_options */ - case 346: /* alter_table_clause */ - case 347: /* alter_table_options */ - case 350: /* signed_literal */ - case 351: /* create_subtable_clause */ - case 354: /* drop_table_clause */ - case 357: /* column_def */ - case 361: /* duration_literal */ - case 362: /* rollup_func_name */ - case 364: /* col_name */ - case 365: /* db_name_cond_opt */ - case 366: /* like_pattern_opt */ - case 367: /* table_name_cond */ - case 368: /* from_db_opt */ - case 369: /* index_options */ - case 371: /* sliding_opt */ - case 372: /* sma_stream_opt */ - case 373: /* func */ - case 374: /* stream_options */ - case 376: /* query_or_subquery */ - case 379: /* explain_options */ - case 383: /* subtable_opt */ - case 384: /* expression */ - case 386: /* where_clause_opt */ - case 387: /* signed */ - case 388: /* literal_func */ - case 392: /* expr_or_subquery */ - case 393: /* subquery */ - case 394: /* pseudo_column */ - case 395: /* column_reference */ - case 396: /* function_expression */ - case 397: /* case_when_expression */ - case 402: /* star_func_para */ - case 404: /* case_when_else_opt */ - case 405: /* common_expression */ - case 406: /* when_then_expr */ - case 407: /* predicate */ - case 410: /* in_predicate_value */ - case 411: /* boolean_value_expression */ - case 412: /* boolean_primary */ - case 413: /* from_clause_opt */ - case 414: /* table_reference_list */ - case 415: /* table_reference */ - case 416: /* table_primary */ - case 417: /* joined_table */ - case 419: /* parenthesized_joined_table */ - case 421: /* search_condition */ - case 422: /* query_specification */ - case 426: /* range_opt */ - case 427: /* every_opt */ - case 428: /* fill_opt */ - case 429: /* twindow_clause_opt */ - case 431: /* having_clause_opt */ - case 432: /* select_item */ - case 434: /* partition_item */ - case 437: /* query_expression */ - case 438: /* query_simple */ - case 440: /* slimit_clause_opt */ - case 441: /* limit_clause_opt */ - case 442: /* union_query_expression */ - case 443: /* query_simple_or_subquery */ - case 445: /* sort_specification */ + case 317: /* cmd */ + case 320: /* literal */ + case 331: /* db_options */ + case 333: /* alter_db_options */ + case 339: /* retention */ + case 340: /* full_table_name */ + case 343: /* table_options */ + case 347: /* alter_table_clause */ + case 348: /* alter_table_options */ + case 351: /* signed_literal */ + case 352: /* create_subtable_clause */ + case 355: /* drop_table_clause */ + case 358: /* column_def */ + case 362: /* duration_literal */ + case 363: /* rollup_func_name */ + case 365: /* col_name */ + case 366: /* db_name_cond_opt */ + case 367: /* like_pattern_opt */ + case 368: /* table_name_cond */ + case 369: /* from_db_opt */ + case 370: /* index_options */ + case 372: /* sliding_opt */ + case 373: /* sma_stream_opt */ + case 374: /* func */ + case 375: /* stream_options */ + case 377: /* query_or_subquery */ + case 380: /* explain_options */ + case 384: /* subtable_opt */ + case 385: /* expression */ + case 387: /* where_clause_opt */ + case 388: /* signed */ + case 389: /* literal_func */ + case 393: /* expr_or_subquery */ + case 394: /* subquery */ + case 395: /* pseudo_column */ + case 396: /* column_reference */ + case 397: /* function_expression */ + case 398: /* case_when_expression */ + case 403: /* star_func_para */ + case 405: /* case_when_else_opt */ + case 406: /* common_expression */ + case 407: /* when_then_expr */ + case 408: /* predicate */ + case 411: /* in_predicate_value */ + case 412: /* boolean_value_expression */ + case 413: /* boolean_primary */ + case 414: /* from_clause_opt */ + case 415: /* table_reference_list */ + case 416: /* table_reference */ + case 417: /* table_primary */ + case 418: /* joined_table */ + case 420: /* parenthesized_joined_table */ + case 422: /* search_condition */ + case 423: /* query_specification */ + case 427: /* range_opt */ + case 428: /* every_opt */ + case 429: /* fill_opt */ + case 430: /* twindow_clause_opt */ + case 432: /* having_clause_opt */ + case 433: /* select_item */ + case 435: /* partition_item */ + case 438: /* query_expression */ + case 439: /* query_simple */ + case 441: /* slimit_clause_opt */ + case 442: /* limit_clause_opt */ + case 443: /* union_query_expression */ + case 444: /* query_simple_or_subquery */ + case 446: /* sort_specification */ { - nodesDestroyNode((yypminor->yy616)); + nodesDestroyNode((yypminor->yy778)); } break; - case 317: /* account_options */ - case 318: /* alter_account_options */ - case 320: /* alter_account_option */ - case 333: /* speed_opt */ - case 381: /* bufsize_opt */ + case 318: /* account_options */ + case 319: /* alter_account_options */ + case 321: /* alter_account_option */ + case 334: /* speed_opt */ + case 382: /* bufsize_opt */ { } break; - case 321: /* user_name */ - case 324: /* priv_level */ - case 327: /* db_name */ - case 328: /* dnode_endpoint */ - case 348: /* column_name */ - case 356: /* table_name */ - case 363: /* function_name */ - case 375: /* topic_name */ - case 377: /* cgroup_name */ - case 382: /* stream_name */ - case 390: /* table_alias */ - case 391: /* column_alias */ - case 398: /* star_func */ - case 400: /* noarg_func */ - case 418: /* alias_opt */ + case 322: /* user_name */ + case 325: /* priv_level */ + case 328: /* db_name */ + case 329: /* dnode_endpoint */ + case 349: /* column_name */ + case 357: /* table_name */ + case 364: /* function_name */ + case 376: /* topic_name */ + case 378: /* cgroup_name */ + case 383: /* stream_name */ + case 391: /* table_alias */ + case 392: /* column_alias */ + case 399: /* star_func */ + case 401: /* noarg_func */ + case 419: /* alias_opt */ { } break; - case 322: /* sysinfo_opt */ + case 323: /* sysinfo_opt */ { } break; - case 323: /* privileges */ - case 325: /* priv_type_list */ - case 326: /* priv_type */ + case 324: /* privileges */ + case 326: /* priv_type_list */ + case 327: /* priv_type */ { } break; - case 329: /* not_exists_opt */ - case 331: /* exists_opt */ - case 378: /* analyze_opt */ - case 380: /* agg_func_opt */ - case 423: /* set_quantifier_opt */ + case 330: /* not_exists_opt */ + case 332: /* exists_opt */ + case 379: /* analyze_opt */ + case 381: /* agg_func_opt */ + case 424: /* set_quantifier_opt */ { } break; - case 334: /* integer_list */ - case 335: /* variable_list */ - case 336: /* retention_list */ - case 340: /* column_def_list */ - case 341: /* tags_def_opt */ - case 343: /* multi_create_clause */ - case 344: /* tags_def */ - case 345: /* multi_drop_clause */ - case 352: /* specific_cols_opt */ - case 353: /* expression_list */ - case 355: /* col_name_list */ - case 358: /* duration_list */ - case 359: /* rollup_func_list */ - case 370: /* func_list */ - case 385: /* dnode_list */ - case 389: /* literal_list */ - case 399: /* star_func_para_list */ - case 401: /* other_para_list */ - case 403: /* when_then_list */ - case 424: /* select_list */ - case 425: /* partition_by_clause_opt */ - case 430: /* group_by_clause_opt */ - case 433: /* partition_list */ - case 436: /* group_by_list */ - case 439: /* order_by_clause_opt */ - case 444: /* sort_specification_list */ + case 335: /* integer_list */ + case 336: /* variable_list */ + case 337: /* retention_list */ + case 341: /* column_def_list */ + case 342: /* tags_def_opt */ + case 344: /* multi_create_clause */ + case 345: /* tags_def */ + case 346: /* multi_drop_clause */ + case 353: /* specific_cols_opt */ + case 354: /* expression_list */ + case 356: /* col_name_list */ + case 359: /* duration_list */ + case 360: /* rollup_func_list */ + case 371: /* func_list */ + case 386: /* dnode_list */ + case 390: /* literal_list */ + case 400: /* star_func_para_list */ + case 402: /* other_para_list */ + case 404: /* when_then_list */ + case 425: /* select_list */ + case 426: /* partition_by_clause_opt */ + case 431: /* group_by_clause_opt */ + case 434: /* partition_list */ + case 437: /* group_by_list */ + case 440: /* order_by_clause_opt */ + case 445: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy152)); + nodesDestroyList((yypminor->yy282)); } break; - case 337: /* alter_db_option */ - case 360: /* alter_table_option */ + case 338: /* alter_db_option */ + case 361: /* alter_table_option */ { } break; - case 349: /* type_name */ + case 350: /* type_name */ { } break; - case 408: /* compare_op */ - case 409: /* in_op */ + case 409: /* compare_op */ + case 410: /* in_op */ { } break; - case 420: /* join_type */ + case 421: /* join_type */ { } break; - case 435: /* fill_mode */ + case 436: /* fill_mode */ { } break; - case 446: /* ordering_specification_opt */ + case 447: /* ordering_specification_opt */ { } break; - case 447: /* null_ordering_opt */ + case 448: /* null_ordering_opt */ { } @@ -3012,525 +3009,527 @@ static const struct { YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ signed char nrhs; /* Negative of the number of RHS symbols in the rule */ } yyRuleInfo[] = { - { 316, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - { 316, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - { 317, 0 }, /* (2) account_options ::= */ - { 317, -3 }, /* (3) account_options ::= account_options PPS literal */ - { 317, -3 }, /* (4) account_options ::= account_options TSERIES literal */ - { 317, -3 }, /* (5) account_options ::= account_options STORAGE literal */ - { 317, -3 }, /* (6) account_options ::= account_options STREAMS literal */ - { 317, -3 }, /* (7) account_options ::= account_options QTIME literal */ - { 317, -3 }, /* (8) account_options ::= account_options DBS literal */ - { 317, -3 }, /* (9) account_options ::= account_options USERS literal */ - { 317, -3 }, /* (10) account_options ::= account_options CONNS literal */ - { 317, -3 }, /* (11) account_options ::= account_options STATE literal */ - { 318, -1 }, /* (12) alter_account_options ::= alter_account_option */ - { 318, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - { 320, -2 }, /* (14) alter_account_option ::= PASS literal */ - { 320, -2 }, /* (15) alter_account_option ::= PPS literal */ - { 320, -2 }, /* (16) alter_account_option ::= TSERIES literal */ - { 320, -2 }, /* (17) alter_account_option ::= STORAGE literal */ - { 320, -2 }, /* (18) alter_account_option ::= STREAMS literal */ - { 320, -2 }, /* (19) alter_account_option ::= QTIME literal */ - { 320, -2 }, /* (20) alter_account_option ::= DBS literal */ - { 320, -2 }, /* (21) alter_account_option ::= USERS literal */ - { 320, -2 }, /* (22) alter_account_option ::= CONNS literal */ - { 320, -2 }, /* (23) alter_account_option ::= STATE literal */ - { 316, -6 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ - { 316, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ - { 316, -5 }, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ - { 316, -5 }, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ - { 316, -3 }, /* (28) cmd ::= DROP USER user_name */ - { 322, 0 }, /* (29) sysinfo_opt ::= */ - { 322, -2 }, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */ - { 316, -6 }, /* (31) cmd ::= GRANT privileges ON priv_level TO user_name */ - { 316, -6 }, /* (32) cmd ::= REVOKE privileges ON priv_level FROM user_name */ - { 323, -1 }, /* (33) privileges ::= ALL */ - { 323, -1 }, /* (34) privileges ::= priv_type_list */ - { 325, -1 }, /* (35) priv_type_list ::= priv_type */ - { 325, -3 }, /* (36) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - { 326, -1 }, /* (37) priv_type ::= READ */ - { 326, -1 }, /* (38) priv_type ::= WRITE */ - { 324, -3 }, /* (39) priv_level ::= NK_STAR NK_DOT NK_STAR */ - { 324, -3 }, /* (40) priv_level ::= db_name NK_DOT NK_STAR */ - { 316, -3 }, /* (41) cmd ::= CREATE DNODE dnode_endpoint */ - { 316, -5 }, /* (42) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ - { 316, -3 }, /* (43) cmd ::= DROP DNODE NK_INTEGER */ - { 316, -3 }, /* (44) cmd ::= DROP DNODE dnode_endpoint */ - { 316, -4 }, /* (45) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - { 316, -5 }, /* (46) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - { 316, -4 }, /* (47) cmd ::= ALTER ALL DNODES NK_STRING */ - { 316, -5 }, /* (48) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - { 328, -1 }, /* (49) dnode_endpoint ::= NK_STRING */ - { 328, -1 }, /* (50) dnode_endpoint ::= NK_ID */ - { 328, -1 }, /* (51) dnode_endpoint ::= NK_IPTOKEN */ - { 316, -3 }, /* (52) cmd ::= ALTER LOCAL NK_STRING */ - { 316, -4 }, /* (53) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - { 316, -5 }, /* (54) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - { 316, -5 }, /* (55) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - { 316, -5 }, /* (56) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - { 316, -5 }, /* (57) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - { 316, -5 }, /* (58) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - { 316, -5 }, /* (59) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - { 316, -5 }, /* (60) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - { 316, -5 }, /* (61) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - { 316, -5 }, /* (62) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - { 316, -4 }, /* (63) cmd ::= DROP DATABASE exists_opt db_name */ - { 316, -2 }, /* (64) cmd ::= USE db_name */ - { 316, -4 }, /* (65) cmd ::= ALTER DATABASE db_name alter_db_options */ - { 316, -3 }, /* (66) cmd ::= FLUSH DATABASE db_name */ - { 316, -4 }, /* (67) cmd ::= TRIM DATABASE db_name speed_opt */ - { 329, -3 }, /* (68) not_exists_opt ::= IF NOT EXISTS */ - { 329, 0 }, /* (69) not_exists_opt ::= */ - { 331, -2 }, /* (70) exists_opt ::= IF EXISTS */ - { 331, 0 }, /* (71) exists_opt ::= */ - { 330, 0 }, /* (72) db_options ::= */ - { 330, -3 }, /* (73) db_options ::= db_options BUFFER NK_INTEGER */ - { 330, -3 }, /* (74) db_options ::= db_options CACHEMODEL NK_STRING */ - { 330, -3 }, /* (75) db_options ::= db_options CACHESIZE NK_INTEGER */ - { 330, -3 }, /* (76) db_options ::= db_options COMP NK_INTEGER */ - { 330, -3 }, /* (77) db_options ::= db_options DURATION NK_INTEGER */ - { 330, -3 }, /* (78) db_options ::= db_options DURATION NK_VARIABLE */ - { 330, -3 }, /* (79) db_options ::= db_options MAXROWS NK_INTEGER */ - { 330, -3 }, /* (80) db_options ::= db_options MINROWS NK_INTEGER */ - { 330, -3 }, /* (81) db_options ::= db_options KEEP integer_list */ - { 330, -3 }, /* (82) db_options ::= db_options KEEP variable_list */ - { 330, -3 }, /* (83) db_options ::= db_options PAGES NK_INTEGER */ - { 330, -3 }, /* (84) db_options ::= db_options PAGESIZE NK_INTEGER */ - { 330, -3 }, /* (85) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - { 330, -3 }, /* (86) db_options ::= db_options PRECISION NK_STRING */ - { 330, -3 }, /* (87) db_options ::= db_options REPLICA NK_INTEGER */ - { 330, -3 }, /* (88) db_options ::= db_options STRICT NK_STRING */ - { 330, -3 }, /* (89) db_options ::= db_options VGROUPS NK_INTEGER */ - { 330, -3 }, /* (90) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - { 330, -3 }, /* (91) db_options ::= db_options RETENTIONS retention_list */ - { 330, -3 }, /* (92) db_options ::= db_options SCHEMALESS NK_INTEGER */ - { 330, -3 }, /* (93) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - { 330, -3 }, /* (94) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - { 330, -3 }, /* (95) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - { 330, -4 }, /* (96) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - { 330, -3 }, /* (97) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - { 330, -4 }, /* (98) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - { 330, -3 }, /* (99) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - { 330, -3 }, /* (100) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - { 330, -3 }, /* (101) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - { 330, -3 }, /* (102) db_options ::= db_options TABLE_PREFIX NK_INTEGER */ - { 330, -3 }, /* (103) db_options ::= db_options TABLE_SUFFIX NK_INTEGER */ - { 332, -1 }, /* (104) alter_db_options ::= alter_db_option */ - { 332, -2 }, /* (105) alter_db_options ::= alter_db_options alter_db_option */ - { 337, -2 }, /* (106) alter_db_option ::= CACHEMODEL NK_STRING */ - { 337, -2 }, /* (107) alter_db_option ::= CACHESIZE NK_INTEGER */ - { 337, -2 }, /* (108) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - { 337, -2 }, /* (109) alter_db_option ::= KEEP integer_list */ - { 337, -2 }, /* (110) alter_db_option ::= KEEP variable_list */ - { 337, -2 }, /* (111) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - { 337, -2 }, /* (112) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - { 334, -1 }, /* (113) integer_list ::= NK_INTEGER */ - { 334, -3 }, /* (114) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - { 335, -1 }, /* (115) variable_list ::= NK_VARIABLE */ - { 335, -3 }, /* (116) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - { 336, -1 }, /* (117) retention_list ::= retention */ - { 336, -3 }, /* (118) retention_list ::= retention_list NK_COMMA retention */ - { 338, -3 }, /* (119) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - { 333, 0 }, /* (120) speed_opt ::= */ - { 333, -2 }, /* (121) speed_opt ::= MAX_SPEED NK_INTEGER */ - { 316, -9 }, /* (122) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - { 316, -3 }, /* (123) cmd ::= CREATE TABLE multi_create_clause */ - { 316, -9 }, /* (124) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - { 316, -3 }, /* (125) cmd ::= DROP TABLE multi_drop_clause */ - { 316, -4 }, /* (126) cmd ::= DROP STABLE exists_opt full_table_name */ - { 316, -3 }, /* (127) cmd ::= ALTER TABLE alter_table_clause */ - { 316, -3 }, /* (128) cmd ::= ALTER STABLE alter_table_clause */ - { 346, -2 }, /* (129) alter_table_clause ::= full_table_name alter_table_options */ - { 346, -5 }, /* (130) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - { 346, -4 }, /* (131) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - { 346, -5 }, /* (132) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - { 346, -5 }, /* (133) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - { 346, -5 }, /* (134) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - { 346, -4 }, /* (135) alter_table_clause ::= full_table_name DROP TAG column_name */ - { 346, -5 }, /* (136) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - { 346, -5 }, /* (137) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - { 346, -6 }, /* (138) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - { 343, -1 }, /* (139) multi_create_clause ::= create_subtable_clause */ - { 343, -2 }, /* (140) multi_create_clause ::= multi_create_clause create_subtable_clause */ - { 351, -10 }, /* (141) 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 */ - { 345, -1 }, /* (142) multi_drop_clause ::= drop_table_clause */ - { 345, -2 }, /* (143) multi_drop_clause ::= multi_drop_clause drop_table_clause */ - { 354, -2 }, /* (144) drop_table_clause ::= exists_opt full_table_name */ - { 352, 0 }, /* (145) specific_cols_opt ::= */ - { 352, -3 }, /* (146) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - { 339, -1 }, /* (147) full_table_name ::= table_name */ - { 339, -3 }, /* (148) full_table_name ::= db_name NK_DOT table_name */ - { 340, -1 }, /* (149) column_def_list ::= column_def */ - { 340, -3 }, /* (150) column_def_list ::= column_def_list NK_COMMA column_def */ - { 357, -2 }, /* (151) column_def ::= column_name type_name */ - { 357, -4 }, /* (152) column_def ::= column_name type_name COMMENT NK_STRING */ - { 349, -1 }, /* (153) type_name ::= BOOL */ - { 349, -1 }, /* (154) type_name ::= TINYINT */ - { 349, -1 }, /* (155) type_name ::= SMALLINT */ - { 349, -1 }, /* (156) type_name ::= INT */ - { 349, -1 }, /* (157) type_name ::= INTEGER */ - { 349, -1 }, /* (158) type_name ::= BIGINT */ - { 349, -1 }, /* (159) type_name ::= FLOAT */ - { 349, -1 }, /* (160) type_name ::= DOUBLE */ - { 349, -4 }, /* (161) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - { 349, -1 }, /* (162) type_name ::= TIMESTAMP */ - { 349, -4 }, /* (163) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - { 349, -2 }, /* (164) type_name ::= TINYINT UNSIGNED */ - { 349, -2 }, /* (165) type_name ::= SMALLINT UNSIGNED */ - { 349, -2 }, /* (166) type_name ::= INT UNSIGNED */ - { 349, -2 }, /* (167) type_name ::= BIGINT UNSIGNED */ - { 349, -1 }, /* (168) type_name ::= JSON */ - { 349, -4 }, /* (169) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - { 349, -1 }, /* (170) type_name ::= MEDIUMBLOB */ - { 349, -1 }, /* (171) type_name ::= BLOB */ - { 349, -4 }, /* (172) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - { 349, -1 }, /* (173) type_name ::= DECIMAL */ - { 349, -4 }, /* (174) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - { 349, -6 }, /* (175) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - { 341, 0 }, /* (176) tags_def_opt ::= */ - { 341, -1 }, /* (177) tags_def_opt ::= tags_def */ - { 344, -4 }, /* (178) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - { 342, 0 }, /* (179) table_options ::= */ - { 342, -3 }, /* (180) table_options ::= table_options COMMENT NK_STRING */ - { 342, -3 }, /* (181) table_options ::= table_options MAX_DELAY duration_list */ - { 342, -3 }, /* (182) table_options ::= table_options WATERMARK duration_list */ - { 342, -5 }, /* (183) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - { 342, -3 }, /* (184) table_options ::= table_options TTL NK_INTEGER */ - { 342, -5 }, /* (185) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - { 347, -1 }, /* (186) alter_table_options ::= alter_table_option */ - { 347, -2 }, /* (187) alter_table_options ::= alter_table_options alter_table_option */ - { 360, -2 }, /* (188) alter_table_option ::= COMMENT NK_STRING */ - { 360, -2 }, /* (189) alter_table_option ::= TTL NK_INTEGER */ - { 358, -1 }, /* (190) duration_list ::= duration_literal */ - { 358, -3 }, /* (191) duration_list ::= duration_list NK_COMMA duration_literal */ - { 359, -1 }, /* (192) rollup_func_list ::= rollup_func_name */ - { 359, -3 }, /* (193) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - { 362, -1 }, /* (194) rollup_func_name ::= function_name */ - { 362, -1 }, /* (195) rollup_func_name ::= FIRST */ - { 362, -1 }, /* (196) rollup_func_name ::= LAST */ - { 355, -1 }, /* (197) col_name_list ::= col_name */ - { 355, -3 }, /* (198) col_name_list ::= col_name_list NK_COMMA col_name */ - { 364, -1 }, /* (199) col_name ::= column_name */ - { 316, -2 }, /* (200) cmd ::= SHOW DNODES */ - { 316, -2 }, /* (201) cmd ::= SHOW USERS */ - { 316, -2 }, /* (202) cmd ::= SHOW DATABASES */ - { 316, -4 }, /* (203) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ - { 316, -4 }, /* (204) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - { 316, -3 }, /* (205) cmd ::= SHOW db_name_cond_opt VGROUPS */ - { 316, -2 }, /* (206) cmd ::= SHOW MNODES */ - { 316, -2 }, /* (207) cmd ::= SHOW MODULES */ - { 316, -2 }, /* (208) cmd ::= SHOW QNODES */ - { 316, -2 }, /* (209) cmd ::= SHOW FUNCTIONS */ - { 316, -5 }, /* (210) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - { 316, -2 }, /* (211) cmd ::= SHOW STREAMS */ - { 316, -2 }, /* (212) cmd ::= SHOW ACCOUNTS */ - { 316, -2 }, /* (213) cmd ::= SHOW APPS */ - { 316, -2 }, /* (214) cmd ::= SHOW CONNECTIONS */ - { 316, -2 }, /* (215) cmd ::= SHOW LICENCES */ - { 316, -2 }, /* (216) cmd ::= SHOW GRANTS */ - { 316, -4 }, /* (217) cmd ::= SHOW CREATE DATABASE db_name */ - { 316, -4 }, /* (218) cmd ::= SHOW CREATE TABLE full_table_name */ - { 316, -4 }, /* (219) cmd ::= SHOW CREATE STABLE full_table_name */ - { 316, -2 }, /* (220) cmd ::= SHOW QUERIES */ - { 316, -2 }, /* (221) cmd ::= SHOW SCORES */ - { 316, -2 }, /* (222) cmd ::= SHOW TOPICS */ - { 316, -2 }, /* (223) cmd ::= SHOW VARIABLES */ - { 316, -3 }, /* (224) cmd ::= SHOW LOCAL VARIABLES */ - { 316, -4 }, /* (225) cmd ::= SHOW DNODE NK_INTEGER VARIABLES */ - { 316, -2 }, /* (226) cmd ::= SHOW BNODES */ - { 316, -2 }, /* (227) cmd ::= SHOW SNODES */ - { 316, -2 }, /* (228) cmd ::= SHOW CLUSTER */ - { 316, -2 }, /* (229) cmd ::= SHOW TRANSACTIONS */ - { 316, -4 }, /* (230) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - { 316, -2 }, /* (231) cmd ::= SHOW CONSUMERS */ - { 316, -2 }, /* (232) cmd ::= SHOW SUBSCRIPTIONS */ - { 316, -5 }, /* (233) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - { 316, -3 }, /* (234) cmd ::= SHOW VNODES NK_INTEGER */ - { 316, -3 }, /* (235) cmd ::= SHOW VNODES NK_STRING */ - { 365, 0 }, /* (236) db_name_cond_opt ::= */ - { 365, -2 }, /* (237) db_name_cond_opt ::= db_name NK_DOT */ - { 366, 0 }, /* (238) like_pattern_opt ::= */ - { 366, -2 }, /* (239) like_pattern_opt ::= LIKE NK_STRING */ - { 367, -1 }, /* (240) table_name_cond ::= table_name */ - { 368, 0 }, /* (241) from_db_opt ::= */ - { 368, -2 }, /* (242) from_db_opt ::= FROM db_name */ - { 316, -8 }, /* (243) cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */ - { 316, -4 }, /* (244) cmd ::= DROP INDEX exists_opt full_table_name */ - { 369, -10 }, /* (245) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - { 369, -12 }, /* (246) 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 */ - { 370, -1 }, /* (247) func_list ::= func */ - { 370, -3 }, /* (248) func_list ::= func_list NK_COMMA func */ - { 373, -4 }, /* (249) func ::= function_name NK_LP expression_list NK_RP */ - { 372, 0 }, /* (250) sma_stream_opt ::= */ - { 372, -3 }, /* (251) sma_stream_opt ::= stream_options WATERMARK duration_literal */ - { 372, -3 }, /* (252) sma_stream_opt ::= stream_options MAX_DELAY duration_literal */ - { 316, -6 }, /* (253) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - { 316, -7 }, /* (254) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ - { 316, -9 }, /* (255) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ - { 316, -7 }, /* (256) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ - { 316, -9 }, /* (257) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ - { 316, -4 }, /* (258) cmd ::= DROP TOPIC exists_opt topic_name */ - { 316, -7 }, /* (259) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - { 316, -2 }, /* (260) cmd ::= DESC full_table_name */ - { 316, -2 }, /* (261) cmd ::= DESCRIBE full_table_name */ - { 316, -3 }, /* (262) cmd ::= RESET QUERY CACHE */ - { 316, -4 }, /* (263) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - { 378, 0 }, /* (264) analyze_opt ::= */ - { 378, -1 }, /* (265) analyze_opt ::= ANALYZE */ - { 379, 0 }, /* (266) explain_options ::= */ - { 379, -3 }, /* (267) explain_options ::= explain_options VERBOSE NK_BOOL */ - { 379, -3 }, /* (268) explain_options ::= explain_options RATIO NK_FLOAT */ - { 316, -10 }, /* (269) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ - { 316, -4 }, /* (270) cmd ::= DROP FUNCTION exists_opt function_name */ - { 380, 0 }, /* (271) agg_func_opt ::= */ - { 380, -1 }, /* (272) agg_func_opt ::= AGGREGATE */ - { 381, 0 }, /* (273) bufsize_opt ::= */ - { 381, -2 }, /* (274) bufsize_opt ::= BUFSIZE NK_INTEGER */ - { 316, -11 }, /* (275) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */ - { 316, -4 }, /* (276) cmd ::= DROP STREAM exists_opt stream_name */ - { 374, 0 }, /* (277) stream_options ::= */ - { 374, -3 }, /* (278) stream_options ::= stream_options TRIGGER AT_ONCE */ - { 374, -3 }, /* (279) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - { 374, -4 }, /* (280) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - { 374, -3 }, /* (281) stream_options ::= stream_options WATERMARK duration_literal */ - { 374, -4 }, /* (282) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - { 383, 0 }, /* (283) subtable_opt ::= */ - { 383, -4 }, /* (284) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - { 316, -3 }, /* (285) cmd ::= KILL CONNECTION NK_INTEGER */ - { 316, -3 }, /* (286) cmd ::= KILL QUERY NK_STRING */ - { 316, -3 }, /* (287) cmd ::= KILL TRANSACTION NK_INTEGER */ - { 316, -2 }, /* (288) cmd ::= BALANCE VGROUP */ - { 316, -4 }, /* (289) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - { 316, -4 }, /* (290) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - { 316, -3 }, /* (291) cmd ::= SPLIT VGROUP NK_INTEGER */ - { 385, -2 }, /* (292) dnode_list ::= DNODE NK_INTEGER */ - { 385, -3 }, /* (293) dnode_list ::= dnode_list DNODE NK_INTEGER */ - { 316, -4 }, /* (294) cmd ::= DELETE FROM full_table_name where_clause_opt */ - { 316, -1 }, /* (295) cmd ::= query_or_subquery */ - { 316, -7 }, /* (296) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - { 316, -4 }, /* (297) cmd ::= INSERT INTO full_table_name query_or_subquery */ - { 319, -1 }, /* (298) literal ::= NK_INTEGER */ - { 319, -1 }, /* (299) literal ::= NK_FLOAT */ - { 319, -1 }, /* (300) literal ::= NK_STRING */ - { 319, -1 }, /* (301) literal ::= NK_BOOL */ - { 319, -2 }, /* (302) literal ::= TIMESTAMP NK_STRING */ - { 319, -1 }, /* (303) literal ::= duration_literal */ - { 319, -1 }, /* (304) literal ::= NULL */ - { 319, -1 }, /* (305) literal ::= NK_QUESTION */ - { 361, -1 }, /* (306) duration_literal ::= NK_VARIABLE */ - { 387, -1 }, /* (307) signed ::= NK_INTEGER */ - { 387, -2 }, /* (308) signed ::= NK_PLUS NK_INTEGER */ - { 387, -2 }, /* (309) signed ::= NK_MINUS NK_INTEGER */ - { 387, -1 }, /* (310) signed ::= NK_FLOAT */ - { 387, -2 }, /* (311) signed ::= NK_PLUS NK_FLOAT */ - { 387, -2 }, /* (312) signed ::= NK_MINUS NK_FLOAT */ - { 350, -1 }, /* (313) signed_literal ::= signed */ - { 350, -1 }, /* (314) signed_literal ::= NK_STRING */ - { 350, -1 }, /* (315) signed_literal ::= NK_BOOL */ - { 350, -2 }, /* (316) signed_literal ::= TIMESTAMP NK_STRING */ - { 350, -1 }, /* (317) signed_literal ::= duration_literal */ - { 350, -1 }, /* (318) signed_literal ::= NULL */ - { 350, -1 }, /* (319) signed_literal ::= literal_func */ - { 350, -1 }, /* (320) signed_literal ::= NK_QUESTION */ - { 389, -1 }, /* (321) literal_list ::= signed_literal */ - { 389, -3 }, /* (322) literal_list ::= literal_list NK_COMMA signed_literal */ - { 327, -1 }, /* (323) db_name ::= NK_ID */ - { 356, -1 }, /* (324) table_name ::= NK_ID */ - { 348, -1 }, /* (325) column_name ::= NK_ID */ - { 363, -1 }, /* (326) function_name ::= NK_ID */ - { 390, -1 }, /* (327) table_alias ::= NK_ID */ - { 391, -1 }, /* (328) column_alias ::= NK_ID */ - { 321, -1 }, /* (329) user_name ::= NK_ID */ - { 375, -1 }, /* (330) topic_name ::= NK_ID */ - { 382, -1 }, /* (331) stream_name ::= NK_ID */ - { 377, -1 }, /* (332) cgroup_name ::= NK_ID */ - { 392, -1 }, /* (333) expr_or_subquery ::= expression */ - { 392, -1 }, /* (334) expr_or_subquery ::= subquery */ - { 384, -1 }, /* (335) expression ::= literal */ - { 384, -1 }, /* (336) expression ::= pseudo_column */ - { 384, -1 }, /* (337) expression ::= column_reference */ - { 384, -1 }, /* (338) expression ::= function_expression */ - { 384, -1 }, /* (339) expression ::= case_when_expression */ - { 384, -3 }, /* (340) expression ::= NK_LP expression NK_RP */ - { 384, -2 }, /* (341) expression ::= NK_PLUS expr_or_subquery */ - { 384, -2 }, /* (342) expression ::= NK_MINUS expr_or_subquery */ - { 384, -3 }, /* (343) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - { 384, -3 }, /* (344) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - { 384, -3 }, /* (345) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - { 384, -3 }, /* (346) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - { 384, -3 }, /* (347) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - { 384, -3 }, /* (348) expression ::= column_reference NK_ARROW NK_STRING */ - { 384, -3 }, /* (349) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - { 384, -3 }, /* (350) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - { 353, -1 }, /* (351) expression_list ::= expr_or_subquery */ - { 353, -3 }, /* (352) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - { 395, -1 }, /* (353) column_reference ::= column_name */ - { 395, -3 }, /* (354) column_reference ::= table_name NK_DOT column_name */ - { 394, -1 }, /* (355) pseudo_column ::= ROWTS */ - { 394, -1 }, /* (356) pseudo_column ::= TBNAME */ - { 394, -3 }, /* (357) pseudo_column ::= table_name NK_DOT TBNAME */ - { 394, -1 }, /* (358) pseudo_column ::= QSTART */ - { 394, -1 }, /* (359) pseudo_column ::= QEND */ - { 394, -1 }, /* (360) pseudo_column ::= QDURATION */ - { 394, -1 }, /* (361) pseudo_column ::= WSTART */ - { 394, -1 }, /* (362) pseudo_column ::= WEND */ - { 394, -1 }, /* (363) pseudo_column ::= WDURATION */ - { 394, -1 }, /* (364) pseudo_column ::= IROWTS */ - { 396, -4 }, /* (365) function_expression ::= function_name NK_LP expression_list NK_RP */ - { 396, -4 }, /* (366) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - { 396, -6 }, /* (367) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - { 396, -1 }, /* (368) function_expression ::= literal_func */ - { 388, -3 }, /* (369) literal_func ::= noarg_func NK_LP NK_RP */ - { 388, -1 }, /* (370) literal_func ::= NOW */ - { 400, -1 }, /* (371) noarg_func ::= NOW */ - { 400, -1 }, /* (372) noarg_func ::= TODAY */ - { 400, -1 }, /* (373) noarg_func ::= TIMEZONE */ - { 400, -1 }, /* (374) noarg_func ::= DATABASE */ - { 400, -1 }, /* (375) noarg_func ::= CLIENT_VERSION */ - { 400, -1 }, /* (376) noarg_func ::= SERVER_VERSION */ - { 400, -1 }, /* (377) noarg_func ::= SERVER_STATUS */ - { 400, -1 }, /* (378) noarg_func ::= CURRENT_USER */ - { 400, -1 }, /* (379) noarg_func ::= USER */ - { 398, -1 }, /* (380) star_func ::= COUNT */ - { 398, -1 }, /* (381) star_func ::= FIRST */ - { 398, -1 }, /* (382) star_func ::= LAST */ - { 398, -1 }, /* (383) star_func ::= LAST_ROW */ - { 399, -1 }, /* (384) star_func_para_list ::= NK_STAR */ - { 399, -1 }, /* (385) star_func_para_list ::= other_para_list */ - { 401, -1 }, /* (386) other_para_list ::= star_func_para */ - { 401, -3 }, /* (387) other_para_list ::= other_para_list NK_COMMA star_func_para */ - { 402, -1 }, /* (388) star_func_para ::= expr_or_subquery */ - { 402, -3 }, /* (389) star_func_para ::= table_name NK_DOT NK_STAR */ - { 397, -4 }, /* (390) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - { 397, -5 }, /* (391) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - { 403, -1 }, /* (392) when_then_list ::= when_then_expr */ - { 403, -2 }, /* (393) when_then_list ::= when_then_list when_then_expr */ - { 406, -4 }, /* (394) when_then_expr ::= WHEN common_expression THEN common_expression */ - { 404, 0 }, /* (395) case_when_else_opt ::= */ - { 404, -2 }, /* (396) case_when_else_opt ::= ELSE common_expression */ - { 407, -3 }, /* (397) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - { 407, -5 }, /* (398) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - { 407, -6 }, /* (399) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - { 407, -3 }, /* (400) predicate ::= expr_or_subquery IS NULL */ - { 407, -4 }, /* (401) predicate ::= expr_or_subquery IS NOT NULL */ - { 407, -3 }, /* (402) predicate ::= expr_or_subquery in_op in_predicate_value */ - { 408, -1 }, /* (403) compare_op ::= NK_LT */ - { 408, -1 }, /* (404) compare_op ::= NK_GT */ - { 408, -1 }, /* (405) compare_op ::= NK_LE */ - { 408, -1 }, /* (406) compare_op ::= NK_GE */ - { 408, -1 }, /* (407) compare_op ::= NK_NE */ - { 408, -1 }, /* (408) compare_op ::= NK_EQ */ - { 408, -1 }, /* (409) compare_op ::= LIKE */ - { 408, -2 }, /* (410) compare_op ::= NOT LIKE */ - { 408, -1 }, /* (411) compare_op ::= MATCH */ - { 408, -1 }, /* (412) compare_op ::= NMATCH */ - { 408, -1 }, /* (413) compare_op ::= CONTAINS */ - { 409, -1 }, /* (414) in_op ::= IN */ - { 409, -2 }, /* (415) in_op ::= NOT IN */ - { 410, -3 }, /* (416) in_predicate_value ::= NK_LP literal_list NK_RP */ - { 411, -1 }, /* (417) boolean_value_expression ::= boolean_primary */ - { 411, -2 }, /* (418) boolean_value_expression ::= NOT boolean_primary */ - { 411, -3 }, /* (419) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - { 411, -3 }, /* (420) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - { 412, -1 }, /* (421) boolean_primary ::= predicate */ - { 412, -3 }, /* (422) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - { 405, -1 }, /* (423) common_expression ::= expr_or_subquery */ - { 405, -1 }, /* (424) common_expression ::= boolean_value_expression */ - { 413, 0 }, /* (425) from_clause_opt ::= */ - { 413, -2 }, /* (426) from_clause_opt ::= FROM table_reference_list */ - { 414, -1 }, /* (427) table_reference_list ::= table_reference */ - { 414, -3 }, /* (428) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - { 415, -1 }, /* (429) table_reference ::= table_primary */ - { 415, -1 }, /* (430) table_reference ::= joined_table */ - { 416, -2 }, /* (431) table_primary ::= table_name alias_opt */ - { 416, -4 }, /* (432) table_primary ::= db_name NK_DOT table_name alias_opt */ - { 416, -2 }, /* (433) table_primary ::= subquery alias_opt */ - { 416, -1 }, /* (434) table_primary ::= parenthesized_joined_table */ - { 418, 0 }, /* (435) alias_opt ::= */ - { 418, -1 }, /* (436) alias_opt ::= table_alias */ - { 418, -2 }, /* (437) alias_opt ::= AS table_alias */ - { 419, -3 }, /* (438) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - { 419, -3 }, /* (439) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - { 417, -6 }, /* (440) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - { 420, 0 }, /* (441) join_type ::= */ - { 420, -1 }, /* (442) join_type ::= INNER */ - { 422, -12 }, /* (443) query_specification ::= SELECT set_quantifier_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 */ - { 423, 0 }, /* (444) set_quantifier_opt ::= */ - { 423, -1 }, /* (445) set_quantifier_opt ::= DISTINCT */ - { 423, -1 }, /* (446) set_quantifier_opt ::= ALL */ - { 424, -1 }, /* (447) select_list ::= select_item */ - { 424, -3 }, /* (448) select_list ::= select_list NK_COMMA select_item */ - { 432, -1 }, /* (449) select_item ::= NK_STAR */ - { 432, -1 }, /* (450) select_item ::= common_expression */ - { 432, -2 }, /* (451) select_item ::= common_expression column_alias */ - { 432, -3 }, /* (452) select_item ::= common_expression AS column_alias */ - { 432, -3 }, /* (453) select_item ::= table_name NK_DOT NK_STAR */ - { 386, 0 }, /* (454) where_clause_opt ::= */ - { 386, -2 }, /* (455) where_clause_opt ::= WHERE search_condition */ - { 425, 0 }, /* (456) partition_by_clause_opt ::= */ - { 425, -3 }, /* (457) partition_by_clause_opt ::= PARTITION BY partition_list */ - { 433, -1 }, /* (458) partition_list ::= partition_item */ - { 433, -3 }, /* (459) partition_list ::= partition_list NK_COMMA partition_item */ - { 434, -1 }, /* (460) partition_item ::= expr_or_subquery */ - { 434, -2 }, /* (461) partition_item ::= expr_or_subquery column_alias */ - { 434, -3 }, /* (462) partition_item ::= expr_or_subquery AS column_alias */ - { 429, 0 }, /* (463) twindow_clause_opt ::= */ - { 429, -6 }, /* (464) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - { 429, -4 }, /* (465) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - { 429, -6 }, /* (466) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - { 429, -8 }, /* (467) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - { 371, 0 }, /* (468) sliding_opt ::= */ - { 371, -4 }, /* (469) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - { 428, 0 }, /* (470) fill_opt ::= */ - { 428, -4 }, /* (471) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - { 428, -6 }, /* (472) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - { 435, -1 }, /* (473) fill_mode ::= NONE */ - { 435, -1 }, /* (474) fill_mode ::= PREV */ - { 435, -1 }, /* (475) fill_mode ::= NULL */ - { 435, -1 }, /* (476) fill_mode ::= LINEAR */ - { 435, -1 }, /* (477) fill_mode ::= NEXT */ - { 430, 0 }, /* (478) group_by_clause_opt ::= */ - { 430, -3 }, /* (479) group_by_clause_opt ::= GROUP BY group_by_list */ - { 436, -1 }, /* (480) group_by_list ::= expr_or_subquery */ - { 436, -3 }, /* (481) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - { 431, 0 }, /* (482) having_clause_opt ::= */ - { 431, -2 }, /* (483) having_clause_opt ::= HAVING search_condition */ - { 426, 0 }, /* (484) range_opt ::= */ - { 426, -6 }, /* (485) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - { 427, 0 }, /* (486) every_opt ::= */ - { 427, -4 }, /* (487) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - { 437, -4 }, /* (488) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - { 438, -1 }, /* (489) query_simple ::= query_specification */ - { 438, -1 }, /* (490) query_simple ::= union_query_expression */ - { 442, -4 }, /* (491) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - { 442, -3 }, /* (492) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - { 443, -1 }, /* (493) query_simple_or_subquery ::= query_simple */ - { 443, -1 }, /* (494) query_simple_or_subquery ::= subquery */ - { 376, -1 }, /* (495) query_or_subquery ::= query_expression */ - { 376, -1 }, /* (496) query_or_subquery ::= subquery */ - { 439, 0 }, /* (497) order_by_clause_opt ::= */ - { 439, -3 }, /* (498) order_by_clause_opt ::= ORDER BY sort_specification_list */ - { 440, 0 }, /* (499) slimit_clause_opt ::= */ - { 440, -2 }, /* (500) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - { 440, -4 }, /* (501) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - { 440, -4 }, /* (502) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 441, 0 }, /* (503) limit_clause_opt ::= */ - { 441, -2 }, /* (504) limit_clause_opt ::= LIMIT NK_INTEGER */ - { 441, -4 }, /* (505) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - { 441, -4 }, /* (506) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 393, -3 }, /* (507) subquery ::= NK_LP query_expression NK_RP */ - { 393, -3 }, /* (508) subquery ::= NK_LP subquery NK_RP */ - { 421, -1 }, /* (509) search_condition ::= common_expression */ - { 444, -1 }, /* (510) sort_specification_list ::= sort_specification */ - { 444, -3 }, /* (511) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - { 445, -3 }, /* (512) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - { 446, 0 }, /* (513) ordering_specification_opt ::= */ - { 446, -1 }, /* (514) ordering_specification_opt ::= ASC */ - { 446, -1 }, /* (515) ordering_specification_opt ::= DESC */ - { 447, 0 }, /* (516) null_ordering_opt ::= */ - { 447, -2 }, /* (517) null_ordering_opt ::= NULLS FIRST */ - { 447, -2 }, /* (518) null_ordering_opt ::= NULLS LAST */ + { 317, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + { 317, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + { 318, 0 }, /* (2) account_options ::= */ + { 318, -3 }, /* (3) account_options ::= account_options PPS literal */ + { 318, -3 }, /* (4) account_options ::= account_options TSERIES literal */ + { 318, -3 }, /* (5) account_options ::= account_options STORAGE literal */ + { 318, -3 }, /* (6) account_options ::= account_options STREAMS literal */ + { 318, -3 }, /* (7) account_options ::= account_options QTIME literal */ + { 318, -3 }, /* (8) account_options ::= account_options DBS literal */ + { 318, -3 }, /* (9) account_options ::= account_options USERS literal */ + { 318, -3 }, /* (10) account_options ::= account_options CONNS literal */ + { 318, -3 }, /* (11) account_options ::= account_options STATE literal */ + { 319, -1 }, /* (12) alter_account_options ::= alter_account_option */ + { 319, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + { 321, -2 }, /* (14) alter_account_option ::= PASS literal */ + { 321, -2 }, /* (15) alter_account_option ::= PPS literal */ + { 321, -2 }, /* (16) alter_account_option ::= TSERIES literal */ + { 321, -2 }, /* (17) alter_account_option ::= STORAGE literal */ + { 321, -2 }, /* (18) alter_account_option ::= STREAMS literal */ + { 321, -2 }, /* (19) alter_account_option ::= QTIME literal */ + { 321, -2 }, /* (20) alter_account_option ::= DBS literal */ + { 321, -2 }, /* (21) alter_account_option ::= USERS literal */ + { 321, -2 }, /* (22) alter_account_option ::= CONNS literal */ + { 321, -2 }, /* (23) alter_account_option ::= STATE literal */ + { 317, -6 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ + { 317, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ + { 317, -5 }, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ + { 317, -5 }, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ + { 317, -3 }, /* (28) cmd ::= DROP USER user_name */ + { 323, 0 }, /* (29) sysinfo_opt ::= */ + { 323, -2 }, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */ + { 317, -6 }, /* (31) cmd ::= GRANT privileges ON priv_level TO user_name */ + { 317, -6 }, /* (32) cmd ::= REVOKE privileges ON priv_level FROM user_name */ + { 324, -1 }, /* (33) privileges ::= ALL */ + { 324, -1 }, /* (34) privileges ::= priv_type_list */ + { 326, -1 }, /* (35) priv_type_list ::= priv_type */ + { 326, -3 }, /* (36) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + { 327, -1 }, /* (37) priv_type ::= READ */ + { 327, -1 }, /* (38) priv_type ::= WRITE */ + { 325, -3 }, /* (39) priv_level ::= NK_STAR NK_DOT NK_STAR */ + { 325, -3 }, /* (40) priv_level ::= db_name NK_DOT NK_STAR */ + { 317, -3 }, /* (41) cmd ::= CREATE DNODE dnode_endpoint */ + { 317, -5 }, /* (42) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + { 317, -3 }, /* (43) cmd ::= DROP DNODE NK_INTEGER */ + { 317, -3 }, /* (44) cmd ::= DROP DNODE dnode_endpoint */ + { 317, -4 }, /* (45) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + { 317, -5 }, /* (46) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + { 317, -4 }, /* (47) cmd ::= ALTER ALL DNODES NK_STRING */ + { 317, -5 }, /* (48) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + { 329, -1 }, /* (49) dnode_endpoint ::= NK_STRING */ + { 329, -1 }, /* (50) dnode_endpoint ::= NK_ID */ + { 329, -1 }, /* (51) dnode_endpoint ::= NK_IPTOKEN */ + { 317, -3 }, /* (52) cmd ::= ALTER LOCAL NK_STRING */ + { 317, -4 }, /* (53) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + { 317, -5 }, /* (54) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + { 317, -5 }, /* (55) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + { 317, -5 }, /* (56) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + { 317, -5 }, /* (57) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + { 317, -5 }, /* (58) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + { 317, -5 }, /* (59) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + { 317, -5 }, /* (60) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + { 317, -5 }, /* (61) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + { 317, -5 }, /* (62) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + { 317, -4 }, /* (63) cmd ::= DROP DATABASE exists_opt db_name */ + { 317, -2 }, /* (64) cmd ::= USE db_name */ + { 317, -4 }, /* (65) cmd ::= ALTER DATABASE db_name alter_db_options */ + { 317, -3 }, /* (66) cmd ::= FLUSH DATABASE db_name */ + { 317, -4 }, /* (67) cmd ::= TRIM DATABASE db_name speed_opt */ + { 330, -3 }, /* (68) not_exists_opt ::= IF NOT EXISTS */ + { 330, 0 }, /* (69) not_exists_opt ::= */ + { 332, -2 }, /* (70) exists_opt ::= IF EXISTS */ + { 332, 0 }, /* (71) exists_opt ::= */ + { 331, 0 }, /* (72) db_options ::= */ + { 331, -3 }, /* (73) db_options ::= db_options BUFFER NK_INTEGER */ + { 331, -3 }, /* (74) db_options ::= db_options CACHEMODEL NK_STRING */ + { 331, -3 }, /* (75) db_options ::= db_options CACHESIZE NK_INTEGER */ + { 331, -3 }, /* (76) db_options ::= db_options COMP NK_INTEGER */ + { 331, -3 }, /* (77) db_options ::= db_options DURATION NK_INTEGER */ + { 331, -3 }, /* (78) db_options ::= db_options DURATION NK_VARIABLE */ + { 331, -3 }, /* (79) db_options ::= db_options MAXROWS NK_INTEGER */ + { 331, -3 }, /* (80) db_options ::= db_options MINROWS NK_INTEGER */ + { 331, -3 }, /* (81) db_options ::= db_options KEEP integer_list */ + { 331, -3 }, /* (82) db_options ::= db_options KEEP variable_list */ + { 331, -3 }, /* (83) db_options ::= db_options PAGES NK_INTEGER */ + { 331, -3 }, /* (84) db_options ::= db_options PAGESIZE NK_INTEGER */ + { 331, -3 }, /* (85) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + { 331, -3 }, /* (86) db_options ::= db_options PRECISION NK_STRING */ + { 331, -3 }, /* (87) db_options ::= db_options REPLICA NK_INTEGER */ + { 331, -3 }, /* (88) db_options ::= db_options STRICT NK_STRING */ + { 331, -3 }, /* (89) db_options ::= db_options VGROUPS NK_INTEGER */ + { 331, -3 }, /* (90) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + { 331, -3 }, /* (91) db_options ::= db_options RETENTIONS retention_list */ + { 331, -3 }, /* (92) db_options ::= db_options SCHEMALESS NK_INTEGER */ + { 331, -3 }, /* (93) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + { 331, -3 }, /* (94) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + { 331, -3 }, /* (95) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + { 331, -4 }, /* (96) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + { 331, -3 }, /* (97) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + { 331, -4 }, /* (98) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + { 331, -3 }, /* (99) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + { 331, -3 }, /* (100) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + { 331, -3 }, /* (101) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + { 331, -3 }, /* (102) db_options ::= db_options TABLE_PREFIX NK_INTEGER */ + { 331, -3 }, /* (103) db_options ::= db_options TABLE_SUFFIX NK_INTEGER */ + { 333, -1 }, /* (104) alter_db_options ::= alter_db_option */ + { 333, -2 }, /* (105) alter_db_options ::= alter_db_options alter_db_option */ + { 338, -2 }, /* (106) alter_db_option ::= CACHEMODEL NK_STRING */ + { 338, -2 }, /* (107) alter_db_option ::= CACHESIZE NK_INTEGER */ + { 338, -2 }, /* (108) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + { 338, -2 }, /* (109) alter_db_option ::= KEEP integer_list */ + { 338, -2 }, /* (110) alter_db_option ::= KEEP variable_list */ + { 338, -2 }, /* (111) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + { 338, -2 }, /* (112) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + { 335, -1 }, /* (113) integer_list ::= NK_INTEGER */ + { 335, -3 }, /* (114) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + { 336, -1 }, /* (115) variable_list ::= NK_VARIABLE */ + { 336, -3 }, /* (116) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + { 337, -1 }, /* (117) retention_list ::= retention */ + { 337, -3 }, /* (118) retention_list ::= retention_list NK_COMMA retention */ + { 339, -3 }, /* (119) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + { 334, 0 }, /* (120) speed_opt ::= */ + { 334, -2 }, /* (121) speed_opt ::= MAX_SPEED NK_INTEGER */ + { 317, -9 }, /* (122) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + { 317, -3 }, /* (123) cmd ::= CREATE TABLE multi_create_clause */ + { 317, -9 }, /* (124) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + { 317, -3 }, /* (125) cmd ::= DROP TABLE multi_drop_clause */ + { 317, -4 }, /* (126) cmd ::= DROP STABLE exists_opt full_table_name */ + { 317, -3 }, /* (127) cmd ::= ALTER TABLE alter_table_clause */ + { 317, -3 }, /* (128) cmd ::= ALTER STABLE alter_table_clause */ + { 347, -2 }, /* (129) alter_table_clause ::= full_table_name alter_table_options */ + { 347, -5 }, /* (130) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + { 347, -4 }, /* (131) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + { 347, -5 }, /* (132) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + { 347, -5 }, /* (133) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + { 347, -5 }, /* (134) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + { 347, -4 }, /* (135) alter_table_clause ::= full_table_name DROP TAG column_name */ + { 347, -5 }, /* (136) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + { 347, -5 }, /* (137) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + { 347, -6 }, /* (138) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + { 344, -1 }, /* (139) multi_create_clause ::= create_subtable_clause */ + { 344, -2 }, /* (140) multi_create_clause ::= multi_create_clause create_subtable_clause */ + { 352, -10 }, /* (141) 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 */ + { 346, -1 }, /* (142) multi_drop_clause ::= drop_table_clause */ + { 346, -2 }, /* (143) multi_drop_clause ::= multi_drop_clause drop_table_clause */ + { 355, -2 }, /* (144) drop_table_clause ::= exists_opt full_table_name */ + { 353, 0 }, /* (145) specific_cols_opt ::= */ + { 353, -3 }, /* (146) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + { 340, -1 }, /* (147) full_table_name ::= table_name */ + { 340, -3 }, /* (148) full_table_name ::= db_name NK_DOT table_name */ + { 341, -1 }, /* (149) column_def_list ::= column_def */ + { 341, -3 }, /* (150) column_def_list ::= column_def_list NK_COMMA column_def */ + { 358, -2 }, /* (151) column_def ::= column_name type_name */ + { 358, -4 }, /* (152) column_def ::= column_name type_name COMMENT NK_STRING */ + { 350, -1 }, /* (153) type_name ::= BOOL */ + { 350, -1 }, /* (154) type_name ::= TINYINT */ + { 350, -1 }, /* (155) type_name ::= SMALLINT */ + { 350, -1 }, /* (156) type_name ::= INT */ + { 350, -1 }, /* (157) type_name ::= INTEGER */ + { 350, -1 }, /* (158) type_name ::= BIGINT */ + { 350, -1 }, /* (159) type_name ::= FLOAT */ + { 350, -1 }, /* (160) type_name ::= DOUBLE */ + { 350, -4 }, /* (161) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + { 350, -1 }, /* (162) type_name ::= TIMESTAMP */ + { 350, -4 }, /* (163) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + { 350, -2 }, /* (164) type_name ::= TINYINT UNSIGNED */ + { 350, -2 }, /* (165) type_name ::= SMALLINT UNSIGNED */ + { 350, -2 }, /* (166) type_name ::= INT UNSIGNED */ + { 350, -2 }, /* (167) type_name ::= BIGINT UNSIGNED */ + { 350, -1 }, /* (168) type_name ::= JSON */ + { 350, -4 }, /* (169) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + { 350, -1 }, /* (170) type_name ::= MEDIUMBLOB */ + { 350, -1 }, /* (171) type_name ::= BLOB */ + { 350, -4 }, /* (172) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + { 350, -1 }, /* (173) type_name ::= DECIMAL */ + { 350, -4 }, /* (174) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + { 350, -6 }, /* (175) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + { 342, 0 }, /* (176) tags_def_opt ::= */ + { 342, -1 }, /* (177) tags_def_opt ::= tags_def */ + { 345, -4 }, /* (178) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + { 343, 0 }, /* (179) table_options ::= */ + { 343, -3 }, /* (180) table_options ::= table_options COMMENT NK_STRING */ + { 343, -3 }, /* (181) table_options ::= table_options MAX_DELAY duration_list */ + { 343, -3 }, /* (182) table_options ::= table_options WATERMARK duration_list */ + { 343, -5 }, /* (183) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + { 343, -3 }, /* (184) table_options ::= table_options TTL NK_INTEGER */ + { 343, -5 }, /* (185) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + { 348, -1 }, /* (186) alter_table_options ::= alter_table_option */ + { 348, -2 }, /* (187) alter_table_options ::= alter_table_options alter_table_option */ + { 361, -2 }, /* (188) alter_table_option ::= COMMENT NK_STRING */ + { 361, -2 }, /* (189) alter_table_option ::= TTL NK_INTEGER */ + { 359, -1 }, /* (190) duration_list ::= duration_literal */ + { 359, -3 }, /* (191) duration_list ::= duration_list NK_COMMA duration_literal */ + { 360, -1 }, /* (192) rollup_func_list ::= rollup_func_name */ + { 360, -3 }, /* (193) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + { 363, -1 }, /* (194) rollup_func_name ::= function_name */ + { 363, -1 }, /* (195) rollup_func_name ::= FIRST */ + { 363, -1 }, /* (196) rollup_func_name ::= LAST */ + { 356, -1 }, /* (197) col_name_list ::= col_name */ + { 356, -3 }, /* (198) col_name_list ::= col_name_list NK_COMMA col_name */ + { 365, -1 }, /* (199) col_name ::= column_name */ + { 317, -2 }, /* (200) cmd ::= SHOW DNODES */ + { 317, -2 }, /* (201) cmd ::= SHOW USERS */ + { 317, -2 }, /* (202) cmd ::= SHOW DATABASES */ + { 317, -4 }, /* (203) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + { 317, -4 }, /* (204) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + { 317, -3 }, /* (205) cmd ::= SHOW db_name_cond_opt VGROUPS */ + { 317, -2 }, /* (206) cmd ::= SHOW MNODES */ + { 317, -2 }, /* (207) cmd ::= SHOW MODULES */ + { 317, -2 }, /* (208) cmd ::= SHOW QNODES */ + { 317, -2 }, /* (209) cmd ::= SHOW FUNCTIONS */ + { 317, -5 }, /* (210) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + { 317, -2 }, /* (211) cmd ::= SHOW STREAMS */ + { 317, -2 }, /* (212) cmd ::= SHOW ACCOUNTS */ + { 317, -2 }, /* (213) cmd ::= SHOW APPS */ + { 317, -2 }, /* (214) cmd ::= SHOW CONNECTIONS */ + { 317, -2 }, /* (215) cmd ::= SHOW LICENCES */ + { 317, -2 }, /* (216) cmd ::= SHOW GRANTS */ + { 317, -4 }, /* (217) cmd ::= SHOW CREATE DATABASE db_name */ + { 317, -4 }, /* (218) cmd ::= SHOW CREATE TABLE full_table_name */ + { 317, -4 }, /* (219) cmd ::= SHOW CREATE STABLE full_table_name */ + { 317, -2 }, /* (220) cmd ::= SHOW QUERIES */ + { 317, -2 }, /* (221) cmd ::= SHOW SCORES */ + { 317, -2 }, /* (222) cmd ::= SHOW TOPICS */ + { 317, -2 }, /* (223) cmd ::= SHOW VARIABLES */ + { 317, -3 }, /* (224) cmd ::= SHOW LOCAL VARIABLES */ + { 317, -4 }, /* (225) cmd ::= SHOW DNODE NK_INTEGER VARIABLES */ + { 317, -2 }, /* (226) cmd ::= SHOW BNODES */ + { 317, -2 }, /* (227) cmd ::= SHOW SNODES */ + { 317, -2 }, /* (228) cmd ::= SHOW CLUSTER */ + { 317, -2 }, /* (229) cmd ::= SHOW TRANSACTIONS */ + { 317, -4 }, /* (230) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + { 317, -2 }, /* (231) cmd ::= SHOW CONSUMERS */ + { 317, -2 }, /* (232) cmd ::= SHOW SUBSCRIPTIONS */ + { 317, -5 }, /* (233) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + { 317, -6 }, /* (234) cmd ::= SHOW TABLE TAGS FROM table_name_cond from_db_opt */ + { 317, -3 }, /* (235) cmd ::= SHOW VNODES NK_INTEGER */ + { 317, -3 }, /* (236) cmd ::= SHOW VNODES NK_STRING */ + { 366, 0 }, /* (237) db_name_cond_opt ::= */ + { 366, -2 }, /* (238) db_name_cond_opt ::= db_name NK_DOT */ + { 367, 0 }, /* (239) like_pattern_opt ::= */ + { 367, -2 }, /* (240) like_pattern_opt ::= LIKE NK_STRING */ + { 368, -1 }, /* (241) table_name_cond ::= table_name */ + { 369, 0 }, /* (242) from_db_opt ::= */ + { 369, -2 }, /* (243) from_db_opt ::= FROM db_name */ + { 317, -8 }, /* (244) cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */ + { 317, -4 }, /* (245) cmd ::= DROP INDEX exists_opt full_table_name */ + { 370, -10 }, /* (246) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + { 370, -12 }, /* (247) 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 */ + { 371, -1 }, /* (248) func_list ::= func */ + { 371, -3 }, /* (249) func_list ::= func_list NK_COMMA func */ + { 374, -4 }, /* (250) func ::= function_name NK_LP expression_list NK_RP */ + { 373, 0 }, /* (251) sma_stream_opt ::= */ + { 373, -3 }, /* (252) sma_stream_opt ::= stream_options WATERMARK duration_literal */ + { 373, -3 }, /* (253) sma_stream_opt ::= stream_options MAX_DELAY duration_literal */ + { 317, -6 }, /* (254) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + { 317, -7 }, /* (255) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ + { 317, -9 }, /* (256) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ + { 317, -7 }, /* (257) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ + { 317, -9 }, /* (258) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ + { 317, -4 }, /* (259) cmd ::= DROP TOPIC exists_opt topic_name */ + { 317, -7 }, /* (260) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + { 317, -2 }, /* (261) cmd ::= DESC full_table_name */ + { 317, -2 }, /* (262) cmd ::= DESCRIBE full_table_name */ + { 317, -3 }, /* (263) cmd ::= RESET QUERY CACHE */ + { 317, -4 }, /* (264) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + { 379, 0 }, /* (265) analyze_opt ::= */ + { 379, -1 }, /* (266) analyze_opt ::= ANALYZE */ + { 380, 0 }, /* (267) explain_options ::= */ + { 380, -3 }, /* (268) explain_options ::= explain_options VERBOSE NK_BOOL */ + { 380, -3 }, /* (269) explain_options ::= explain_options RATIO NK_FLOAT */ + { 317, -10 }, /* (270) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + { 317, -4 }, /* (271) cmd ::= DROP FUNCTION exists_opt function_name */ + { 381, 0 }, /* (272) agg_func_opt ::= */ + { 381, -1 }, /* (273) agg_func_opt ::= AGGREGATE */ + { 382, 0 }, /* (274) bufsize_opt ::= */ + { 382, -2 }, /* (275) bufsize_opt ::= BUFSIZE NK_INTEGER */ + { 317, -11 }, /* (276) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */ + { 317, -4 }, /* (277) cmd ::= DROP STREAM exists_opt stream_name */ + { 375, 0 }, /* (278) stream_options ::= */ + { 375, -3 }, /* (279) stream_options ::= stream_options TRIGGER AT_ONCE */ + { 375, -3 }, /* (280) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + { 375, -4 }, /* (281) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + { 375, -3 }, /* (282) stream_options ::= stream_options WATERMARK duration_literal */ + { 375, -4 }, /* (283) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + { 384, 0 }, /* (284) subtable_opt ::= */ + { 384, -4 }, /* (285) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + { 317, -3 }, /* (286) cmd ::= KILL CONNECTION NK_INTEGER */ + { 317, -3 }, /* (287) cmd ::= KILL QUERY NK_STRING */ + { 317, -3 }, /* (288) cmd ::= KILL TRANSACTION NK_INTEGER */ + { 317, -2 }, /* (289) cmd ::= BALANCE VGROUP */ + { 317, -4 }, /* (290) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + { 317, -4 }, /* (291) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + { 317, -3 }, /* (292) cmd ::= SPLIT VGROUP NK_INTEGER */ + { 386, -2 }, /* (293) dnode_list ::= DNODE NK_INTEGER */ + { 386, -3 }, /* (294) dnode_list ::= dnode_list DNODE NK_INTEGER */ + { 317, -4 }, /* (295) cmd ::= DELETE FROM full_table_name where_clause_opt */ + { 317, -1 }, /* (296) cmd ::= query_or_subquery */ + { 317, -7 }, /* (297) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + { 317, -4 }, /* (298) cmd ::= INSERT INTO full_table_name query_or_subquery */ + { 320, -1 }, /* (299) literal ::= NK_INTEGER */ + { 320, -1 }, /* (300) literal ::= NK_FLOAT */ + { 320, -1 }, /* (301) literal ::= NK_STRING */ + { 320, -1 }, /* (302) literal ::= NK_BOOL */ + { 320, -2 }, /* (303) literal ::= TIMESTAMP NK_STRING */ + { 320, -1 }, /* (304) literal ::= duration_literal */ + { 320, -1 }, /* (305) literal ::= NULL */ + { 320, -1 }, /* (306) literal ::= NK_QUESTION */ + { 362, -1 }, /* (307) duration_literal ::= NK_VARIABLE */ + { 388, -1 }, /* (308) signed ::= NK_INTEGER */ + { 388, -2 }, /* (309) signed ::= NK_PLUS NK_INTEGER */ + { 388, -2 }, /* (310) signed ::= NK_MINUS NK_INTEGER */ + { 388, -1 }, /* (311) signed ::= NK_FLOAT */ + { 388, -2 }, /* (312) signed ::= NK_PLUS NK_FLOAT */ + { 388, -2 }, /* (313) signed ::= NK_MINUS NK_FLOAT */ + { 351, -1 }, /* (314) signed_literal ::= signed */ + { 351, -1 }, /* (315) signed_literal ::= NK_STRING */ + { 351, -1 }, /* (316) signed_literal ::= NK_BOOL */ + { 351, -2 }, /* (317) signed_literal ::= TIMESTAMP NK_STRING */ + { 351, -1 }, /* (318) signed_literal ::= duration_literal */ + { 351, -1 }, /* (319) signed_literal ::= NULL */ + { 351, -1 }, /* (320) signed_literal ::= literal_func */ + { 351, -1 }, /* (321) signed_literal ::= NK_QUESTION */ + { 390, -1 }, /* (322) literal_list ::= signed_literal */ + { 390, -3 }, /* (323) literal_list ::= literal_list NK_COMMA signed_literal */ + { 328, -1 }, /* (324) db_name ::= NK_ID */ + { 357, -1 }, /* (325) table_name ::= NK_ID */ + { 349, -1 }, /* (326) column_name ::= NK_ID */ + { 364, -1 }, /* (327) function_name ::= NK_ID */ + { 391, -1 }, /* (328) table_alias ::= NK_ID */ + { 392, -1 }, /* (329) column_alias ::= NK_ID */ + { 322, -1 }, /* (330) user_name ::= NK_ID */ + { 376, -1 }, /* (331) topic_name ::= NK_ID */ + { 383, -1 }, /* (332) stream_name ::= NK_ID */ + { 378, -1 }, /* (333) cgroup_name ::= NK_ID */ + { 393, -1 }, /* (334) expr_or_subquery ::= expression */ + { 393, -1 }, /* (335) expr_or_subquery ::= subquery */ + { 385, -1 }, /* (336) expression ::= literal */ + { 385, -1 }, /* (337) expression ::= pseudo_column */ + { 385, -1 }, /* (338) expression ::= column_reference */ + { 385, -1 }, /* (339) expression ::= function_expression */ + { 385, -1 }, /* (340) expression ::= case_when_expression */ + { 385, -3 }, /* (341) expression ::= NK_LP expression NK_RP */ + { 385, -2 }, /* (342) expression ::= NK_PLUS expr_or_subquery */ + { 385, -2 }, /* (343) expression ::= NK_MINUS expr_or_subquery */ + { 385, -3 }, /* (344) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + { 385, -3 }, /* (345) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + { 385, -3 }, /* (346) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + { 385, -3 }, /* (347) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + { 385, -3 }, /* (348) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + { 385, -3 }, /* (349) expression ::= column_reference NK_ARROW NK_STRING */ + { 385, -3 }, /* (350) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + { 385, -3 }, /* (351) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + { 354, -1 }, /* (352) expression_list ::= expr_or_subquery */ + { 354, -3 }, /* (353) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + { 396, -1 }, /* (354) column_reference ::= column_name */ + { 396, -3 }, /* (355) column_reference ::= table_name NK_DOT column_name */ + { 395, -1 }, /* (356) pseudo_column ::= ROWTS */ + { 395, -1 }, /* (357) pseudo_column ::= TBNAME */ + { 395, -3 }, /* (358) pseudo_column ::= table_name NK_DOT TBNAME */ + { 395, -1 }, /* (359) pseudo_column ::= QSTART */ + { 395, -1 }, /* (360) pseudo_column ::= QEND */ + { 395, -1 }, /* (361) pseudo_column ::= QDURATION */ + { 395, -1 }, /* (362) pseudo_column ::= WSTART */ + { 395, -1 }, /* (363) pseudo_column ::= WEND */ + { 395, -1 }, /* (364) pseudo_column ::= WDURATION */ + { 395, -1 }, /* (365) pseudo_column ::= IROWTS */ + { 395, -1 }, /* (366) pseudo_column ::= QTAGS */ + { 397, -4 }, /* (367) function_expression ::= function_name NK_LP expression_list NK_RP */ + { 397, -4 }, /* (368) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + { 397, -6 }, /* (369) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + { 397, -1 }, /* (370) function_expression ::= literal_func */ + { 389, -3 }, /* (371) literal_func ::= noarg_func NK_LP NK_RP */ + { 389, -1 }, /* (372) literal_func ::= NOW */ + { 401, -1 }, /* (373) noarg_func ::= NOW */ + { 401, -1 }, /* (374) noarg_func ::= TODAY */ + { 401, -1 }, /* (375) noarg_func ::= TIMEZONE */ + { 401, -1 }, /* (376) noarg_func ::= DATABASE */ + { 401, -1 }, /* (377) noarg_func ::= CLIENT_VERSION */ + { 401, -1 }, /* (378) noarg_func ::= SERVER_VERSION */ + { 401, -1 }, /* (379) noarg_func ::= SERVER_STATUS */ + { 401, -1 }, /* (380) noarg_func ::= CURRENT_USER */ + { 401, -1 }, /* (381) noarg_func ::= USER */ + { 399, -1 }, /* (382) star_func ::= COUNT */ + { 399, -1 }, /* (383) star_func ::= FIRST */ + { 399, -1 }, /* (384) star_func ::= LAST */ + { 399, -1 }, /* (385) star_func ::= LAST_ROW */ + { 400, -1 }, /* (386) star_func_para_list ::= NK_STAR */ + { 400, -1 }, /* (387) star_func_para_list ::= other_para_list */ + { 402, -1 }, /* (388) other_para_list ::= star_func_para */ + { 402, -3 }, /* (389) other_para_list ::= other_para_list NK_COMMA star_func_para */ + { 403, -1 }, /* (390) star_func_para ::= expr_or_subquery */ + { 403, -3 }, /* (391) star_func_para ::= table_name NK_DOT NK_STAR */ + { 398, -4 }, /* (392) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + { 398, -5 }, /* (393) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + { 404, -1 }, /* (394) when_then_list ::= when_then_expr */ + { 404, -2 }, /* (395) when_then_list ::= when_then_list when_then_expr */ + { 407, -4 }, /* (396) when_then_expr ::= WHEN common_expression THEN common_expression */ + { 405, 0 }, /* (397) case_when_else_opt ::= */ + { 405, -2 }, /* (398) case_when_else_opt ::= ELSE common_expression */ + { 408, -3 }, /* (399) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + { 408, -5 }, /* (400) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + { 408, -6 }, /* (401) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + { 408, -3 }, /* (402) predicate ::= expr_or_subquery IS NULL */ + { 408, -4 }, /* (403) predicate ::= expr_or_subquery IS NOT NULL */ + { 408, -3 }, /* (404) predicate ::= expr_or_subquery in_op in_predicate_value */ + { 409, -1 }, /* (405) compare_op ::= NK_LT */ + { 409, -1 }, /* (406) compare_op ::= NK_GT */ + { 409, -1 }, /* (407) compare_op ::= NK_LE */ + { 409, -1 }, /* (408) compare_op ::= NK_GE */ + { 409, -1 }, /* (409) compare_op ::= NK_NE */ + { 409, -1 }, /* (410) compare_op ::= NK_EQ */ + { 409, -1 }, /* (411) compare_op ::= LIKE */ + { 409, -2 }, /* (412) compare_op ::= NOT LIKE */ + { 409, -1 }, /* (413) compare_op ::= MATCH */ + { 409, -1 }, /* (414) compare_op ::= NMATCH */ + { 409, -1 }, /* (415) compare_op ::= CONTAINS */ + { 410, -1 }, /* (416) in_op ::= IN */ + { 410, -2 }, /* (417) in_op ::= NOT IN */ + { 411, -3 }, /* (418) in_predicate_value ::= NK_LP literal_list NK_RP */ + { 412, -1 }, /* (419) boolean_value_expression ::= boolean_primary */ + { 412, -2 }, /* (420) boolean_value_expression ::= NOT boolean_primary */ + { 412, -3 }, /* (421) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + { 412, -3 }, /* (422) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + { 413, -1 }, /* (423) boolean_primary ::= predicate */ + { 413, -3 }, /* (424) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + { 406, -1 }, /* (425) common_expression ::= expr_or_subquery */ + { 406, -1 }, /* (426) common_expression ::= boolean_value_expression */ + { 414, 0 }, /* (427) from_clause_opt ::= */ + { 414, -2 }, /* (428) from_clause_opt ::= FROM table_reference_list */ + { 415, -1 }, /* (429) table_reference_list ::= table_reference */ + { 415, -3 }, /* (430) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + { 416, -1 }, /* (431) table_reference ::= table_primary */ + { 416, -1 }, /* (432) table_reference ::= joined_table */ + { 417, -2 }, /* (433) table_primary ::= table_name alias_opt */ + { 417, -4 }, /* (434) table_primary ::= db_name NK_DOT table_name alias_opt */ + { 417, -2 }, /* (435) table_primary ::= subquery alias_opt */ + { 417, -1 }, /* (436) table_primary ::= parenthesized_joined_table */ + { 419, 0 }, /* (437) alias_opt ::= */ + { 419, -1 }, /* (438) alias_opt ::= table_alias */ + { 419, -2 }, /* (439) alias_opt ::= AS table_alias */ + { 420, -3 }, /* (440) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + { 420, -3 }, /* (441) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + { 418, -6 }, /* (442) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + { 421, 0 }, /* (443) join_type ::= */ + { 421, -1 }, /* (444) join_type ::= INNER */ + { 423, -12 }, /* (445) query_specification ::= SELECT set_quantifier_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 */ + { 424, 0 }, /* (446) set_quantifier_opt ::= */ + { 424, -1 }, /* (447) set_quantifier_opt ::= DISTINCT */ + { 424, -1 }, /* (448) set_quantifier_opt ::= ALL */ + { 425, -1 }, /* (449) select_list ::= select_item */ + { 425, -3 }, /* (450) select_list ::= select_list NK_COMMA select_item */ + { 433, -1 }, /* (451) select_item ::= NK_STAR */ + { 433, -1 }, /* (452) select_item ::= common_expression */ + { 433, -2 }, /* (453) select_item ::= common_expression column_alias */ + { 433, -3 }, /* (454) select_item ::= common_expression AS column_alias */ + { 433, -3 }, /* (455) select_item ::= table_name NK_DOT NK_STAR */ + { 387, 0 }, /* (456) where_clause_opt ::= */ + { 387, -2 }, /* (457) where_clause_opt ::= WHERE search_condition */ + { 426, 0 }, /* (458) partition_by_clause_opt ::= */ + { 426, -3 }, /* (459) partition_by_clause_opt ::= PARTITION BY partition_list */ + { 434, -1 }, /* (460) partition_list ::= partition_item */ + { 434, -3 }, /* (461) partition_list ::= partition_list NK_COMMA partition_item */ + { 435, -1 }, /* (462) partition_item ::= expr_or_subquery */ + { 435, -2 }, /* (463) partition_item ::= expr_or_subquery column_alias */ + { 435, -3 }, /* (464) partition_item ::= expr_or_subquery AS column_alias */ + { 430, 0 }, /* (465) twindow_clause_opt ::= */ + { 430, -6 }, /* (466) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + { 430, -4 }, /* (467) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + { 430, -6 }, /* (468) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + { 430, -8 }, /* (469) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + { 372, 0 }, /* (470) sliding_opt ::= */ + { 372, -4 }, /* (471) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + { 429, 0 }, /* (472) fill_opt ::= */ + { 429, -4 }, /* (473) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { 429, -6 }, /* (474) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + { 436, -1 }, /* (475) fill_mode ::= NONE */ + { 436, -1 }, /* (476) fill_mode ::= PREV */ + { 436, -1 }, /* (477) fill_mode ::= NULL */ + { 436, -1 }, /* (478) fill_mode ::= LINEAR */ + { 436, -1 }, /* (479) fill_mode ::= NEXT */ + { 431, 0 }, /* (480) group_by_clause_opt ::= */ + { 431, -3 }, /* (481) group_by_clause_opt ::= GROUP BY group_by_list */ + { 437, -1 }, /* (482) group_by_list ::= expr_or_subquery */ + { 437, -3 }, /* (483) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + { 432, 0 }, /* (484) having_clause_opt ::= */ + { 432, -2 }, /* (485) having_clause_opt ::= HAVING search_condition */ + { 427, 0 }, /* (486) range_opt ::= */ + { 427, -6 }, /* (487) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + { 428, 0 }, /* (488) every_opt ::= */ + { 428, -4 }, /* (489) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + { 438, -4 }, /* (490) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + { 439, -1 }, /* (491) query_simple ::= query_specification */ + { 439, -1 }, /* (492) query_simple ::= union_query_expression */ + { 443, -4 }, /* (493) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + { 443, -3 }, /* (494) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + { 444, -1 }, /* (495) query_simple_or_subquery ::= query_simple */ + { 444, -1 }, /* (496) query_simple_or_subquery ::= subquery */ + { 377, -1 }, /* (497) query_or_subquery ::= query_expression */ + { 377, -1 }, /* (498) query_or_subquery ::= subquery */ + { 440, 0 }, /* (499) order_by_clause_opt ::= */ + { 440, -3 }, /* (500) order_by_clause_opt ::= ORDER BY sort_specification_list */ + { 441, 0 }, /* (501) slimit_clause_opt ::= */ + { 441, -2 }, /* (502) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + { 441, -4 }, /* (503) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + { 441, -4 }, /* (504) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 442, 0 }, /* (505) limit_clause_opt ::= */ + { 442, -2 }, /* (506) limit_clause_opt ::= LIMIT NK_INTEGER */ + { 442, -4 }, /* (507) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + { 442, -4 }, /* (508) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 394, -3 }, /* (509) subquery ::= NK_LP query_expression NK_RP */ + { 394, -3 }, /* (510) subquery ::= NK_LP subquery NK_RP */ + { 422, -1 }, /* (511) search_condition ::= common_expression */ + { 445, -1 }, /* (512) sort_specification_list ::= sort_specification */ + { 445, -3 }, /* (513) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + { 446, -3 }, /* (514) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + { 447, 0 }, /* (515) ordering_specification_opt ::= */ + { 447, -1 }, /* (516) ordering_specification_opt ::= ASC */ + { 447, -1 }, /* (517) ordering_specification_opt ::= DESC */ + { 448, 0 }, /* (518) null_ordering_opt ::= */ + { 448, -2 }, /* (519) null_ordering_opt ::= NULLS FIRST */ + { 448, -2 }, /* (520) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3619,11 +3618,11 @@ static YYACTIONTYPE yy_reduce( YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,317,&yymsp[0].minor); + yy_destructor(yypParser,318,&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,318,&yymsp[0].minor); + yy_destructor(yypParser,319,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -3637,20 +3636,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,317,&yymsp[-2].minor); +{ yy_destructor(yypParser,318,&yymsp[-2].minor); { } - yy_destructor(yypParser,319,&yymsp[0].minor); + yy_destructor(yypParser,320,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,320,&yymsp[0].minor); +{ yy_destructor(yypParser,321,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,318,&yymsp[-1].minor); +{ yy_destructor(yypParser,319,&yymsp[-1].minor); { } - yy_destructor(yypParser,320,&yymsp[0].minor); + yy_destructor(yypParser,321,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -3664,72 +3663,72 @@ static YYACTIONTYPE yy_reduce( case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); { } - yy_destructor(yypParser,319,&yymsp[0].minor); + yy_destructor(yypParser,320,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ -{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy673, &yymsp[-1].minor.yy0, yymsp[0].minor.yy439); } +{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy181, &yymsp[-1].minor.yy0, yymsp[0].minor.yy293); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy673, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy181, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 26: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy673, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy181, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } break; case 27: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy673, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy181, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } break; case 28: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy673); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy181); } break; case 29: /* sysinfo_opt ::= */ -{ yymsp[1].minor.yy439 = 1; } +{ yymsp[1].minor.yy293 = 1; } break; case 30: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ -{ yymsp[-1].minor.yy439 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy293 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } break; case 31: /* cmd ::= GRANT privileges ON priv_level TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy221, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy673); } +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy831, &yymsp[-2].minor.yy181, &yymsp[0].minor.yy181); } break; case 32: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy221, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy673); } +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy831, &yymsp[-2].minor.yy181, &yymsp[0].minor.yy181); } break; case 33: /* privileges ::= ALL */ -{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_ALL; } +{ yymsp[0].minor.yy831 = PRIVILEGE_TYPE_ALL; } break; case 34: /* privileges ::= priv_type_list */ case 35: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==35); -{ yylhsminor.yy221 = yymsp[0].minor.yy221; } - yymsp[0].minor.yy221 = yylhsminor.yy221; +{ yylhsminor.yy831 = yymsp[0].minor.yy831; } + yymsp[0].minor.yy831 = yylhsminor.yy831; break; case 36: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy221 = yymsp[-2].minor.yy221 | yymsp[0].minor.yy221; } - yymsp[-2].minor.yy221 = yylhsminor.yy221; +{ yylhsminor.yy831 = yymsp[-2].minor.yy831 | yymsp[0].minor.yy831; } + yymsp[-2].minor.yy831 = yylhsminor.yy831; break; case 37: /* priv_type ::= READ */ -{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_READ; } +{ yymsp[0].minor.yy831 = PRIVILEGE_TYPE_READ; } break; case 38: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_WRITE; } +{ yymsp[0].minor.yy831 = PRIVILEGE_TYPE_WRITE; } break; case 39: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy673 = yymsp[-2].minor.yy0; } - yymsp[-2].minor.yy673 = yylhsminor.yy673; +{ yylhsminor.yy181 = yymsp[-2].minor.yy0; } + yymsp[-2].minor.yy181 = yylhsminor.yy181; break; case 40: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy673 = yymsp[-2].minor.yy673; } - yymsp[-2].minor.yy673 = yylhsminor.yy673; +{ yylhsminor.yy181 = yymsp[-2].minor.yy181; } + yymsp[-2].minor.yy181 = yylhsminor.yy181; break; case 41: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy673, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy181, NULL); } break; case 42: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy181, &yymsp[0].minor.yy0); } break; case 43: /* cmd ::= DROP DNODE NK_INTEGER */ { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy0); } break; case 44: /* cmd ::= DROP DNODE dnode_endpoint */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy673); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy181); } break; case 45: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -3746,31 +3745,31 @@ static YYACTIONTYPE yy_reduce( case 49: /* dnode_endpoint ::= NK_STRING */ case 50: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==50); case 51: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==51); - case 323: /* db_name ::= NK_ID */ yytestcase(yyruleno==323); - case 324: /* table_name ::= NK_ID */ yytestcase(yyruleno==324); - case 325: /* column_name ::= NK_ID */ yytestcase(yyruleno==325); - case 326: /* function_name ::= NK_ID */ yytestcase(yyruleno==326); - case 327: /* table_alias ::= NK_ID */ yytestcase(yyruleno==327); - case 328: /* column_alias ::= NK_ID */ yytestcase(yyruleno==328); - case 329: /* user_name ::= NK_ID */ yytestcase(yyruleno==329); - case 330: /* topic_name ::= NK_ID */ yytestcase(yyruleno==330); - case 331: /* stream_name ::= NK_ID */ yytestcase(yyruleno==331); - case 332: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==332); - case 371: /* noarg_func ::= NOW */ yytestcase(yyruleno==371); - case 372: /* noarg_func ::= TODAY */ yytestcase(yyruleno==372); - case 373: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==373); - case 374: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==374); - case 375: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==375); - case 376: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==376); - case 377: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==377); - case 378: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==378); - case 379: /* noarg_func ::= USER */ yytestcase(yyruleno==379); - case 380: /* star_func ::= COUNT */ yytestcase(yyruleno==380); - case 381: /* star_func ::= FIRST */ yytestcase(yyruleno==381); - case 382: /* star_func ::= LAST */ yytestcase(yyruleno==382); - case 383: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==383); -{ yylhsminor.yy673 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy673 = yylhsminor.yy673; + case 324: /* db_name ::= NK_ID */ yytestcase(yyruleno==324); + case 325: /* table_name ::= NK_ID */ yytestcase(yyruleno==325); + case 326: /* column_name ::= NK_ID */ yytestcase(yyruleno==326); + case 327: /* function_name ::= NK_ID */ yytestcase(yyruleno==327); + case 328: /* table_alias ::= NK_ID */ yytestcase(yyruleno==328); + case 329: /* column_alias ::= NK_ID */ yytestcase(yyruleno==329); + case 330: /* user_name ::= NK_ID */ yytestcase(yyruleno==330); + case 331: /* topic_name ::= NK_ID */ yytestcase(yyruleno==331); + case 332: /* stream_name ::= NK_ID */ yytestcase(yyruleno==332); + case 333: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==333); + case 373: /* noarg_func ::= NOW */ yytestcase(yyruleno==373); + case 374: /* noarg_func ::= TODAY */ yytestcase(yyruleno==374); + case 375: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==375); + case 376: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==376); + case 377: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==377); + case 378: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==378); + case 379: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==379); + case 380: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==380); + case 381: /* noarg_func ::= USER */ yytestcase(yyruleno==381); + case 382: /* star_func ::= COUNT */ yytestcase(yyruleno==382); + case 383: /* star_func ::= FIRST */ yytestcase(yyruleno==383); + case 384: /* star_func ::= LAST */ yytestcase(yyruleno==384); + case 385: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==385); +{ yylhsminor.yy181 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy181 = yylhsminor.yy181; break; case 52: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -3803,208 +3802,208 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; case 62: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy89, &yymsp[-1].minor.yy673, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy39, &yymsp[-1].minor.yy181, yymsp[0].minor.yy778); } break; case 63: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy89, &yymsp[0].minor.yy673); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy39, &yymsp[0].minor.yy181); } break; case 64: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy673); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy181); } break; case 65: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy673, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy181, yymsp[0].minor.yy778); } break; case 66: /* cmd ::= FLUSH DATABASE db_name */ -{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy673); } +{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy181); } break; case 67: /* cmd ::= TRIM DATABASE db_name speed_opt */ -{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy673, yymsp[0].minor.yy452); } +{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy181, yymsp[0].minor.yy276); } break; case 68: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy89 = true; } +{ yymsp[-2].minor.yy39 = true; } break; case 69: /* not_exists_opt ::= */ case 71: /* exists_opt ::= */ yytestcase(yyruleno==71); - case 264: /* analyze_opt ::= */ yytestcase(yyruleno==264); - case 271: /* agg_func_opt ::= */ yytestcase(yyruleno==271); - case 444: /* set_quantifier_opt ::= */ yytestcase(yyruleno==444); -{ yymsp[1].minor.yy89 = false; } + case 265: /* analyze_opt ::= */ yytestcase(yyruleno==265); + case 272: /* agg_func_opt ::= */ yytestcase(yyruleno==272); + case 446: /* set_quantifier_opt ::= */ yytestcase(yyruleno==446); +{ yymsp[1].minor.yy39 = false; } break; case 70: /* exists_opt ::= IF EXISTS */ -{ yymsp[-1].minor.yy89 = true; } +{ yymsp[-1].minor.yy39 = true; } break; case 72: /* db_options ::= */ -{ yymsp[1].minor.yy616 = createDefaultDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy778 = createDefaultDatabaseOptions(pCxt); } break; case 73: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 74: /* db_options ::= db_options CACHEMODEL NK_STRING */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 75: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 76: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 77: /* db_options ::= db_options DURATION NK_INTEGER */ case 78: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==78); -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 79: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 80: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 81: /* db_options ::= db_options KEEP integer_list */ case 82: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==82); -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_KEEP, yymsp[0].minor.yy152); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_KEEP, yymsp[0].minor.yy282); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 83: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 84: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 85: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 86: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 87: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 88: /* db_options ::= db_options STRICT NK_STRING */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 89: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 90: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 91: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_RETENTIONS, yymsp[0].minor.yy152); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_RETENTIONS, yymsp[0].minor.yy282); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 92: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 93: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 94: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 95: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 96: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-3].minor.yy616, DB_OPTION_WAL_RETENTION_PERIOD, &t); + yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-3].minor.yy778, DB_OPTION_WAL_RETENTION_PERIOD, &t); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; + yymsp[-3].minor.yy778 = yylhsminor.yy778; break; case 97: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 98: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-3].minor.yy616, DB_OPTION_WAL_RETENTION_SIZE, &t); + yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-3].minor.yy778, DB_OPTION_WAL_RETENTION_SIZE, &t); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; + yymsp[-3].minor.yy778 = yylhsminor.yy778; break; case 99: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 100: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 101: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 102: /* db_options ::= db_options TABLE_PREFIX NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 103: /* db_options ::= db_options TABLE_SUFFIX NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setDatabaseOption(pCxt, yymsp[-2].minor.yy778, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 104: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy616 = createAlterDatabaseOptions(pCxt); yylhsminor.yy616 = setAlterDatabaseOption(pCxt, yylhsminor.yy616, &yymsp[0].minor.yy669); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createAlterDatabaseOptions(pCxt); yylhsminor.yy778 = setAlterDatabaseOption(pCxt, yylhsminor.yy778, &yymsp[0].minor.yy645); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; case 105: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy616 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy616, &yymsp[0].minor.yy669); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy778, &yymsp[0].minor.yy645); } + yymsp[-1].minor.yy778 = yylhsminor.yy778; break; case 106: /* alter_db_option ::= CACHEMODEL NK_STRING */ -{ yymsp[-1].minor.yy669.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy669.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy645.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy645.val = yymsp[0].minor.yy0; } break; case 107: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -{ yymsp[-1].minor.yy669.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy669.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy645.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy645.val = yymsp[0].minor.yy0; } break; case 108: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy669.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy669.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy645.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy645.val = yymsp[0].minor.yy0; } break; case 109: /* alter_db_option ::= KEEP integer_list */ case 110: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==110); -{ yymsp[-1].minor.yy669.type = DB_OPTION_KEEP; yymsp[-1].minor.yy669.pList = yymsp[0].minor.yy152; } +{ yymsp[-1].minor.yy645.type = DB_OPTION_KEEP; yymsp[-1].minor.yy645.pList = yymsp[0].minor.yy282; } break; case 111: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -{ yymsp[-1].minor.yy669.type = DB_OPTION_WAL; yymsp[-1].minor.yy669.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy645.type = DB_OPTION_WAL; yymsp[-1].minor.yy645.val = yymsp[0].minor.yy0; } break; case 112: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -{ yymsp[-1].minor.yy669.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy669.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy645.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy645.val = yymsp[0].minor.yy0; } break; case 113: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy152 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy152 = yylhsminor.yy152; +{ yylhsminor.yy282 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy282 = yylhsminor.yy282; break; case 114: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 293: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==293); -{ yylhsminor.yy152 = addNodeToList(pCxt, yymsp[-2].minor.yy152, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy152 = yylhsminor.yy152; + case 294: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==294); +{ yylhsminor.yy282 = addNodeToList(pCxt, yymsp[-2].minor.yy282, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy282 = yylhsminor.yy282; break; case 115: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy152 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy152 = yylhsminor.yy152; +{ yylhsminor.yy282 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy282 = yylhsminor.yy282; break; case 116: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy152 = addNodeToList(pCxt, yymsp[-2].minor.yy152, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy152 = yylhsminor.yy152; +{ yylhsminor.yy282 = addNodeToList(pCxt, yymsp[-2].minor.yy282, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy282 = yylhsminor.yy282; break; case 117: /* retention_list ::= retention */ case 139: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==139); @@ -4012,279 +4011,279 @@ static YYACTIONTYPE yy_reduce( case 149: /* column_def_list ::= column_def */ yytestcase(yyruleno==149); case 192: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==192); case 197: /* col_name_list ::= col_name */ yytestcase(yyruleno==197); - case 247: /* func_list ::= func */ yytestcase(yyruleno==247); - case 321: /* literal_list ::= signed_literal */ yytestcase(yyruleno==321); - case 386: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==386); - case 392: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==392); - case 447: /* select_list ::= select_item */ yytestcase(yyruleno==447); - case 458: /* partition_list ::= partition_item */ yytestcase(yyruleno==458); - case 510: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==510); -{ yylhsminor.yy152 = createNodeList(pCxt, yymsp[0].minor.yy616); } - yymsp[0].minor.yy152 = yylhsminor.yy152; + case 248: /* func_list ::= func */ yytestcase(yyruleno==248); + case 322: /* literal_list ::= signed_literal */ yytestcase(yyruleno==322); + case 388: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==388); + case 394: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==394); + case 449: /* select_list ::= select_item */ yytestcase(yyruleno==449); + case 460: /* partition_list ::= partition_item */ yytestcase(yyruleno==460); + case 512: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==512); +{ yylhsminor.yy282 = createNodeList(pCxt, yymsp[0].minor.yy778); } + yymsp[0].minor.yy282 = yylhsminor.yy282; break; case 118: /* retention_list ::= retention_list NK_COMMA retention */ case 150: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==150); case 193: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==193); case 198: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==198); - case 248: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==248); - case 322: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==322); - case 387: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==387); - case 448: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==448); - case 459: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==459); - case 511: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==511); -{ yylhsminor.yy152 = addNodeToList(pCxt, yymsp[-2].minor.yy152, yymsp[0].minor.yy616); } - yymsp[-2].minor.yy152 = yylhsminor.yy152; + case 249: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==249); + case 323: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==323); + case 389: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==389); + case 450: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==450); + case 461: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==461); + case 513: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==513); +{ yylhsminor.yy282 = addNodeToList(pCxt, yymsp[-2].minor.yy282, yymsp[0].minor.yy778); } + yymsp[-2].minor.yy282 = yylhsminor.yy282; break; case 119: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ -{ yylhsminor.yy616 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 120: /* speed_opt ::= */ - case 273: /* bufsize_opt ::= */ yytestcase(yyruleno==273); -{ yymsp[1].minor.yy452 = 0; } + case 274: /* bufsize_opt ::= */ yytestcase(yyruleno==274); +{ yymsp[1].minor.yy276 = 0; } break; case 121: /* speed_opt ::= MAX_SPEED NK_INTEGER */ - case 274: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==274); -{ yymsp[-1].minor.yy452 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } + case 275: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==275); +{ yymsp[-1].minor.yy276 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; case 122: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 124: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==124); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy89, yymsp[-5].minor.yy616, yymsp[-3].minor.yy152, yymsp[-1].minor.yy152, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy39, yymsp[-5].minor.yy778, yymsp[-3].minor.yy282, yymsp[-1].minor.yy282, yymsp[0].minor.yy778); } break; case 123: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy152); } +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy282); } break; case 125: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy152); } +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy282); } break; case 126: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy89, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy39, yymsp[0].minor.yy778); } break; case 127: /* cmd ::= ALTER TABLE alter_table_clause */ - case 295: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==295); -{ pCxt->pRootNode = yymsp[0].minor.yy616; } + case 296: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==296); +{ pCxt->pRootNode = yymsp[0].minor.yy778; } break; case 128: /* cmd ::= ALTER STABLE alter_table_clause */ -{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy616); } +{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy778); } break; case 129: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy616 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy616, yymsp[0].minor.yy616); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy778, yymsp[0].minor.yy778); } + yymsp[-1].minor.yy778 = yylhsminor.yy778; break; case 130: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy616 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy616, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy673, yymsp[0].minor.yy784); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy778, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy181, yymsp[0].minor.yy380); } + yymsp[-4].minor.yy778 = yylhsminor.yy778; break; case 131: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy616 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy616, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy673); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy778, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy181); } + yymsp[-3].minor.yy778 = yylhsminor.yy778; break; case 132: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy616 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy616, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy673, yymsp[0].minor.yy784); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy778, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy181, yymsp[0].minor.yy380); } + yymsp[-4].minor.yy778 = yylhsminor.yy778; break; case 133: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy616 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy616, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy673, &yymsp[0].minor.yy673); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy778, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy181, &yymsp[0].minor.yy181); } + yymsp[-4].minor.yy778 = yylhsminor.yy778; break; case 134: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy616 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy616, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy673, yymsp[0].minor.yy784); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy778, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy181, yymsp[0].minor.yy380); } + yymsp[-4].minor.yy778 = yylhsminor.yy778; break; case 135: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy616 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy616, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy673); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy778, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy181); } + yymsp[-3].minor.yy778 = yylhsminor.yy778; break; case 136: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy616 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy616, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy673, yymsp[0].minor.yy784); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy778, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy181, yymsp[0].minor.yy380); } + yymsp[-4].minor.yy778 = yylhsminor.yy778; break; case 137: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy616 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy616, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy673, &yymsp[0].minor.yy673); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy778, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy181, &yymsp[0].minor.yy181); } + yymsp[-4].minor.yy778 = yylhsminor.yy778; break; case 138: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -{ yylhsminor.yy616 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy616, &yymsp[-2].minor.yy673, yymsp[0].minor.yy616); } - yymsp[-5].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy778, &yymsp[-2].minor.yy181, yymsp[0].minor.yy778); } + yymsp[-5].minor.yy778 = yylhsminor.yy778; break; case 140: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ case 143: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==143); - case 393: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==393); -{ yylhsminor.yy152 = addNodeToList(pCxt, yymsp[-1].minor.yy152, yymsp[0].minor.yy616); } - yymsp[-1].minor.yy152 = yylhsminor.yy152; + case 395: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==395); +{ yylhsminor.yy282 = addNodeToList(pCxt, yymsp[-1].minor.yy282, yymsp[0].minor.yy778); } + yymsp[-1].minor.yy282 = yylhsminor.yy282; break; case 141: /* 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 */ -{ yylhsminor.yy616 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy89, yymsp[-8].minor.yy616, yymsp[-6].minor.yy616, yymsp[-5].minor.yy152, yymsp[-2].minor.yy152, yymsp[0].minor.yy616); } - yymsp[-9].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy39, yymsp[-8].minor.yy778, yymsp[-6].minor.yy778, yymsp[-5].minor.yy282, yymsp[-2].minor.yy282, yymsp[0].minor.yy778); } + yymsp[-9].minor.yy778 = yylhsminor.yy778; break; case 144: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy616 = createDropTableClause(pCxt, yymsp[-1].minor.yy89, yymsp[0].minor.yy616); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createDropTableClause(pCxt, yymsp[-1].minor.yy39, yymsp[0].minor.yy778); } + yymsp[-1].minor.yy778 = yylhsminor.yy778; break; case 145: /* specific_cols_opt ::= */ case 176: /* tags_def_opt ::= */ yytestcase(yyruleno==176); - case 456: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==456); - case 478: /* group_by_clause_opt ::= */ yytestcase(yyruleno==478); - case 497: /* order_by_clause_opt ::= */ yytestcase(yyruleno==497); -{ yymsp[1].minor.yy152 = NULL; } + case 458: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==458); + case 480: /* group_by_clause_opt ::= */ yytestcase(yyruleno==480); + case 499: /* order_by_clause_opt ::= */ yytestcase(yyruleno==499); +{ yymsp[1].minor.yy282 = NULL; } break; case 146: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ -{ yymsp[-2].minor.yy152 = yymsp[-1].minor.yy152; } +{ yymsp[-2].minor.yy282 = yymsp[-1].minor.yy282; } break; case 147: /* full_table_name ::= table_name */ -{ yylhsminor.yy616 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy673, NULL); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy181, NULL); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; case 148: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy616 = createRealTableNode(pCxt, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy673, NULL); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createRealTableNode(pCxt, &yymsp[-2].minor.yy181, &yymsp[0].minor.yy181, NULL); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 151: /* column_def ::= column_name type_name */ -{ yylhsminor.yy616 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy673, yymsp[0].minor.yy784, NULL); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy181, yymsp[0].minor.yy380, NULL); } + yymsp[-1].minor.yy778 = yylhsminor.yy778; break; case 152: /* column_def ::= column_name type_name COMMENT NK_STRING */ -{ yylhsminor.yy616 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy673, yymsp[-2].minor.yy784, &yymsp[0].minor.yy0); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy181, yymsp[-2].minor.yy380, &yymsp[0].minor.yy0); } + yymsp[-3].minor.yy778 = yylhsminor.yy778; break; case 153: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_BOOL); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 154: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_TINYINT); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 155: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 156: /* type_name ::= INT */ case 157: /* type_name ::= INTEGER */ yytestcase(yyruleno==157); -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_INT); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_INT); } break; case 158: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_BIGINT); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 159: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_FLOAT); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 160: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 161: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy784 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy380 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 162: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 163: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy784 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy380 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 164: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy784 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +{ yymsp[-1].minor.yy380 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 165: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy784 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +{ yymsp[-1].minor.yy380 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 166: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy784 = createDataType(TSDB_DATA_TYPE_UINT); } +{ yymsp[-1].minor.yy380 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 167: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy784 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +{ yymsp[-1].minor.yy380 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 168: /* type_name ::= JSON */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_JSON); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 169: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy784 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy380 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 170: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 171: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_BLOB); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 172: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy784 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy380 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 173: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 174: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy784 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-3].minor.yy380 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 175: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy784 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-5].minor.yy380 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 177: /* tags_def_opt ::= tags_def */ - case 385: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==385); -{ yylhsminor.yy152 = yymsp[0].minor.yy152; } - yymsp[0].minor.yy152 = yylhsminor.yy152; + case 387: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==387); +{ yylhsminor.yy282 = yymsp[0].minor.yy282; } + yymsp[0].minor.yy282 = yylhsminor.yy282; break; case 178: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ -{ yymsp[-3].minor.yy152 = yymsp[-1].minor.yy152; } +{ yymsp[-3].minor.yy282 = yymsp[-1].minor.yy282; } break; case 179: /* table_options ::= */ -{ yymsp[1].minor.yy616 = createDefaultTableOptions(pCxt); } +{ yymsp[1].minor.yy778 = createDefaultTableOptions(pCxt); } break; case 180: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-2].minor.yy616, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setTableOption(pCxt, yymsp[-2].minor.yy778, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 181: /* table_options ::= table_options MAX_DELAY duration_list */ -{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-2].minor.yy616, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy152); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setTableOption(pCxt, yymsp[-2].minor.yy778, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy282); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 182: /* table_options ::= table_options WATERMARK duration_list */ -{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-2].minor.yy616, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy152); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setTableOption(pCxt, yymsp[-2].minor.yy778, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy282); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 183: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-4].minor.yy616, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy152); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setTableOption(pCxt, yymsp[-4].minor.yy778, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy282); } + yymsp[-4].minor.yy778 = yylhsminor.yy778; break; case 184: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-2].minor.yy616, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setTableOption(pCxt, yymsp[-2].minor.yy778, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; case 185: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-4].minor.yy616, TABLE_OPTION_SMA, yymsp[-1].minor.yy152); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setTableOption(pCxt, yymsp[-4].minor.yy778, TABLE_OPTION_SMA, yymsp[-1].minor.yy282); } + yymsp[-4].minor.yy778 = yylhsminor.yy778; break; case 186: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy616 = createAlterTableOptions(pCxt); yylhsminor.yy616 = setTableOption(pCxt, yylhsminor.yy616, yymsp[0].minor.yy669.type, &yymsp[0].minor.yy669.val); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createAlterTableOptions(pCxt); yylhsminor.yy778 = setTableOption(pCxt, yylhsminor.yy778, yymsp[0].minor.yy645.type, &yymsp[0].minor.yy645.val); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; case 187: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-1].minor.yy616, yymsp[0].minor.yy669.type, &yymsp[0].minor.yy669.val); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = setTableOption(pCxt, yymsp[-1].minor.yy778, yymsp[0].minor.yy645.type, &yymsp[0].minor.yy645.val); } + yymsp[-1].minor.yy778 = yylhsminor.yy778; break; case 188: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy669.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy669.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy645.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy645.val = yymsp[0].minor.yy0; } break; case 189: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy669.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy669.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy645.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy645.val = yymsp[0].minor.yy0; } break; case 190: /* duration_list ::= duration_literal */ - case 351: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==351); -{ yylhsminor.yy152 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy616)); } - yymsp[0].minor.yy152 = yylhsminor.yy152; + case 352: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==352); +{ yylhsminor.yy282 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy778)); } + yymsp[0].minor.yy282 = yylhsminor.yy282; break; case 191: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 352: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==352); -{ yylhsminor.yy152 = addNodeToList(pCxt, yymsp[-2].minor.yy152, releaseRawExprNode(pCxt, yymsp[0].minor.yy616)); } - yymsp[-2].minor.yy152 = yylhsminor.yy152; + case 353: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==353); +{ yylhsminor.yy282 = addNodeToList(pCxt, yymsp[-2].minor.yy282, releaseRawExprNode(pCxt, yymsp[0].minor.yy778)); } + yymsp[-2].minor.yy282 = yylhsminor.yy282; break; case 194: /* rollup_func_name ::= function_name */ -{ yylhsminor.yy616 = createFunctionNode(pCxt, &yymsp[0].minor.yy673, NULL); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createFunctionNode(pCxt, &yymsp[0].minor.yy181, NULL); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; case 195: /* rollup_func_name ::= FIRST */ case 196: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==196); -{ yylhsminor.yy616 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; case 199: /* col_name ::= column_name */ -{ yylhsminor.yy616 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy673); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy778 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy181); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; case 200: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } @@ -4296,13 +4295,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); } break; case 203: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy616, yymsp[0].minor.yy616, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy778, yymsp[0].minor.yy778, OP_TYPE_LIKE); } break; case 204: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy616, yymsp[0].minor.yy616, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy778, yymsp[0].minor.yy778, OP_TYPE_LIKE); } break; case 205: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy616, NULL, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy778, NULL, OP_TYPE_LIKE); } break; case 206: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } @@ -4317,7 +4316,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; case 210: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy616, yymsp[-1].minor.yy616, OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy778, yymsp[-1].minor.yy778, OP_TYPE_EQUAL); } break; case 211: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } @@ -4336,13 +4335,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } break; case 217: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy673); } +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy181); } break; case 218: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy778); } break; case 219: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy778); } break; case 220: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } @@ -4375,7 +4374,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; case 230: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy778); } break; case 231: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } @@ -4384,732 +4383,736 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } break; case 233: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy616, yymsp[-1].minor.yy616, OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy778, yymsp[-1].minor.yy778, OP_TYPE_EQUAL); } break; - case 234: /* cmd ::= SHOW VNODES NK_INTEGER */ + case 234: /* cmd ::= SHOW TABLE TAGS FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLE_TAGS_STMT, yymsp[0].minor.yy778, yymsp[-1].minor.yy778, OP_TYPE_EQUAL); } + break; + case 235: /* cmd ::= SHOW VNODES NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } break; - case 235: /* cmd ::= SHOW VNODES NK_STRING */ + case 236: /* cmd ::= SHOW VNODES NK_STRING */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, createValueNode(pCxt, TSDB_DATA_TYPE_VARCHAR, &yymsp[0].minor.yy0)); } break; - case 236: /* db_name_cond_opt ::= */ - case 241: /* from_db_opt ::= */ yytestcase(yyruleno==241); -{ yymsp[1].minor.yy616 = createDefaultDatabaseCondValue(pCxt); } + case 237: /* db_name_cond_opt ::= */ + case 242: /* from_db_opt ::= */ yytestcase(yyruleno==242); +{ yymsp[1].minor.yy778 = createDefaultDatabaseCondValue(pCxt); } break; - case 237: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy673); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; + case 238: /* db_name_cond_opt ::= db_name NK_DOT */ +{ yylhsminor.yy778 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy181); } + yymsp[-1].minor.yy778 = yylhsminor.yy778; break; - case 238: /* like_pattern_opt ::= */ - case 283: /* subtable_opt ::= */ yytestcase(yyruleno==283); - case 395: /* case_when_else_opt ::= */ yytestcase(yyruleno==395); - case 425: /* from_clause_opt ::= */ yytestcase(yyruleno==425); - case 454: /* where_clause_opt ::= */ yytestcase(yyruleno==454); - case 463: /* twindow_clause_opt ::= */ yytestcase(yyruleno==463); - case 468: /* sliding_opt ::= */ yytestcase(yyruleno==468); - case 470: /* fill_opt ::= */ yytestcase(yyruleno==470); - case 482: /* having_clause_opt ::= */ yytestcase(yyruleno==482); - case 484: /* range_opt ::= */ yytestcase(yyruleno==484); - case 486: /* every_opt ::= */ yytestcase(yyruleno==486); - case 499: /* slimit_clause_opt ::= */ yytestcase(yyruleno==499); - case 503: /* limit_clause_opt ::= */ yytestcase(yyruleno==503); -{ yymsp[1].minor.yy616 = NULL; } + case 239: /* like_pattern_opt ::= */ + case 284: /* subtable_opt ::= */ yytestcase(yyruleno==284); + case 397: /* case_when_else_opt ::= */ yytestcase(yyruleno==397); + case 427: /* from_clause_opt ::= */ yytestcase(yyruleno==427); + case 456: /* where_clause_opt ::= */ yytestcase(yyruleno==456); + case 465: /* twindow_clause_opt ::= */ yytestcase(yyruleno==465); + case 470: /* sliding_opt ::= */ yytestcase(yyruleno==470); + case 472: /* fill_opt ::= */ yytestcase(yyruleno==472); + case 484: /* having_clause_opt ::= */ yytestcase(yyruleno==484); + case 486: /* range_opt ::= */ yytestcase(yyruleno==486); + case 488: /* every_opt ::= */ yytestcase(yyruleno==488); + case 501: /* slimit_clause_opt ::= */ yytestcase(yyruleno==501); + case 505: /* limit_clause_opt ::= */ yytestcase(yyruleno==505); +{ yymsp[1].minor.yy778 = NULL; } break; - case 239: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + case 240: /* like_pattern_opt ::= LIKE NK_STRING */ +{ yymsp[-1].minor.yy778 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; - case 240: /* table_name_cond ::= table_name */ -{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy673); } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 241: /* table_name_cond ::= table_name */ +{ yylhsminor.yy778 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy181); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 242: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy673); } + case 243: /* from_db_opt ::= FROM db_name */ +{ yymsp[-1].minor.yy778 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy181); } break; - case 243: /* cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy89, yymsp[-3].minor.yy616, yymsp[-1].minor.yy616, NULL, yymsp[0].minor.yy616); } + case 244: /* cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */ +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy39, yymsp[-3].minor.yy778, yymsp[-1].minor.yy778, NULL, yymsp[0].minor.yy778); } break; - case 244: /* cmd ::= DROP INDEX exists_opt full_table_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy89, yymsp[0].minor.yy616); } + case 245: /* cmd ::= DROP INDEX exists_opt full_table_name */ +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy39, yymsp[0].minor.yy778); } break; - case 245: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-9].minor.yy616 = createIndexOption(pCxt, yymsp[-7].minor.yy152, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), NULL, yymsp[-1].minor.yy616, yymsp[0].minor.yy616); } + case 246: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ +{ yymsp[-9].minor.yy778 = createIndexOption(pCxt, yymsp[-7].minor.yy282, releaseRawExprNode(pCxt, yymsp[-3].minor.yy778), NULL, yymsp[-1].minor.yy778, yymsp[0].minor.yy778); } break; - case 246: /* 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 */ -{ yymsp[-11].minor.yy616 = createIndexOption(pCxt, yymsp[-9].minor.yy152, releaseRawExprNode(pCxt, yymsp[-5].minor.yy616), releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), yymsp[-1].minor.yy616, yymsp[0].minor.yy616); } + case 247: /* 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 */ +{ yymsp[-11].minor.yy778 = createIndexOption(pCxt, yymsp[-9].minor.yy282, releaseRawExprNode(pCxt, yymsp[-5].minor.yy778), releaseRawExprNode(pCxt, yymsp[-3].minor.yy778), yymsp[-1].minor.yy778, yymsp[0].minor.yy778); } break; - case 249: /* func ::= function_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy616 = createFunctionNode(pCxt, &yymsp[-3].minor.yy673, yymsp[-1].minor.yy152); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; + case 250: /* func ::= function_name NK_LP expression_list NK_RP */ +{ yylhsminor.yy778 = createFunctionNode(pCxt, &yymsp[-3].minor.yy181, yymsp[-1].minor.yy282); } + yymsp[-3].minor.yy778 = yylhsminor.yy778; break; - case 250: /* sma_stream_opt ::= */ - case 277: /* stream_options ::= */ yytestcase(yyruleno==277); -{ yymsp[1].minor.yy616 = createStreamOptions(pCxt); } + case 251: /* sma_stream_opt ::= */ + case 278: /* stream_options ::= */ yytestcase(yyruleno==278); +{ yymsp[1].minor.yy778 = createStreamOptions(pCxt); } break; - case 251: /* sma_stream_opt ::= stream_options WATERMARK duration_literal */ - case 281: /* stream_options ::= stream_options WATERMARK duration_literal */ yytestcase(yyruleno==281); -{ ((SStreamOptions*)yymsp[-2].minor.yy616)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy616); yylhsminor.yy616 = yymsp[-2].minor.yy616; } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + case 252: /* sma_stream_opt ::= stream_options WATERMARK duration_literal */ + case 282: /* stream_options ::= stream_options WATERMARK duration_literal */ yytestcase(yyruleno==282); +{ ((SStreamOptions*)yymsp[-2].minor.yy778)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy778); yylhsminor.yy778 = yymsp[-2].minor.yy778; } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 252: /* sma_stream_opt ::= stream_options MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy616)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy616); yylhsminor.yy616 = yymsp[-2].minor.yy616; } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + case 253: /* sma_stream_opt ::= stream_options MAX_DELAY duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy778)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy778); yylhsminor.yy778 = yymsp[-2].minor.yy778; } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 253: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy89, &yymsp[-2].minor.yy673, yymsp[0].minor.yy616); } + case 254: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ +{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy39, &yymsp[-2].minor.yy181, yymsp[0].minor.yy778); } break; - case 254: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy89, &yymsp[-3].minor.yy673, &yymsp[0].minor.yy673, false); } + case 255: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy39, &yymsp[-3].minor.yy181, &yymsp[0].minor.yy181, false); } break; - case 255: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy89, &yymsp[-5].minor.yy673, &yymsp[0].minor.yy673, true); } + case 256: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy39, &yymsp[-5].minor.yy181, &yymsp[0].minor.yy181, true); } break; - case 256: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy89, &yymsp[-3].minor.yy673, yymsp[0].minor.yy616, false); } + case 257: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy39, &yymsp[-3].minor.yy181, yymsp[0].minor.yy778, false); } break; - case 257: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy89, &yymsp[-5].minor.yy673, yymsp[0].minor.yy616, true); } + case 258: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy39, &yymsp[-5].minor.yy181, yymsp[0].minor.yy778, true); } break; - case 258: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy89, &yymsp[0].minor.yy673); } + case 259: /* cmd ::= DROP TOPIC exists_opt topic_name */ +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy39, &yymsp[0].minor.yy181); } break; - case 259: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy89, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy673); } + case 260: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy39, &yymsp[-2].minor.yy181, &yymsp[0].minor.yy181); } break; - case 260: /* cmd ::= DESC full_table_name */ - case 261: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==261); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy616); } + case 261: /* cmd ::= DESC full_table_name */ + case 262: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==262); +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy778); } break; - case 262: /* cmd ::= RESET QUERY CACHE */ + case 263: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 263: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy89, yymsp[-1].minor.yy616, yymsp[0].minor.yy616); } + case 264: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy39, yymsp[-1].minor.yy778, yymsp[0].minor.yy778); } break; - case 265: /* analyze_opt ::= ANALYZE */ - case 272: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==272); - case 445: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==445); -{ yymsp[0].minor.yy89 = true; } + case 266: /* analyze_opt ::= ANALYZE */ + case 273: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==273); + case 447: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==447); +{ yymsp[0].minor.yy39 = true; } break; - case 266: /* explain_options ::= */ -{ yymsp[1].minor.yy616 = createDefaultExplainOptions(pCxt); } + case 267: /* explain_options ::= */ +{ yymsp[1].minor.yy778 = createDefaultExplainOptions(pCxt); } break; - case 267: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy616 = setExplainVerbose(pCxt, yymsp[-2].minor.yy616, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + case 268: /* explain_options ::= explain_options VERBOSE NK_BOOL */ +{ yylhsminor.yy778 = setExplainVerbose(pCxt, yymsp[-2].minor.yy778, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 268: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy616 = setExplainRatio(pCxt, yymsp[-2].minor.yy616, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + case 269: /* explain_options ::= explain_options RATIO NK_FLOAT */ +{ yylhsminor.yy778 = setExplainRatio(pCxt, yymsp[-2].minor.yy778, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 269: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ -{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy89, yymsp[-8].minor.yy89, &yymsp[-5].minor.yy673, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy784, yymsp[0].minor.yy452); } + case 270: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy39, yymsp[-8].minor.yy39, &yymsp[-5].minor.yy181, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy380, yymsp[0].minor.yy276); } break; - case 270: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy89, &yymsp[0].minor.yy673); } + case 271: /* cmd ::= DROP FUNCTION exists_opt function_name */ +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy39, &yymsp[0].minor.yy181); } break; - case 275: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-8].minor.yy89, &yymsp[-7].minor.yy673, yymsp[-4].minor.yy616, yymsp[-6].minor.yy616, yymsp[-3].minor.yy152, yymsp[-2].minor.yy616, yymsp[0].minor.yy616); } + case 276: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */ +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-8].minor.yy39, &yymsp[-7].minor.yy181, yymsp[-4].minor.yy778, yymsp[-6].minor.yy778, yymsp[-3].minor.yy282, yymsp[-2].minor.yy778, yymsp[0].minor.yy778); } break; - case 276: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy89, &yymsp[0].minor.yy673); } + case 277: /* cmd ::= DROP STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy39, &yymsp[0].minor.yy181); } break; - case 278: /* stream_options ::= stream_options TRIGGER AT_ONCE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy616)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy616 = yymsp[-2].minor.yy616; } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + case 279: /* stream_options ::= stream_options TRIGGER AT_ONCE */ +{ ((SStreamOptions*)yymsp[-2].minor.yy778)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy778 = yymsp[-2].minor.yy778; } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 279: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy616)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy616 = yymsp[-2].minor.yy616; } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + case 280: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ +{ ((SStreamOptions*)yymsp[-2].minor.yy778)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy778 = yymsp[-2].minor.yy778; } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 280: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-3].minor.yy616)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy616)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy616); yylhsminor.yy616 = yymsp[-3].minor.yy616; } - yymsp[-3].minor.yy616 = yylhsminor.yy616; + case 281: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ +{ ((SStreamOptions*)yymsp[-3].minor.yy778)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy778)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy778); yylhsminor.yy778 = yymsp[-3].minor.yy778; } + yymsp[-3].minor.yy778 = yylhsminor.yy778; break; - case 282: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -{ ((SStreamOptions*)yymsp[-3].minor.yy616)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy616 = yymsp[-3].minor.yy616; } - yymsp[-3].minor.yy616 = yylhsminor.yy616; + case 283: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ +{ ((SStreamOptions*)yymsp[-3].minor.yy778)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy778 = yymsp[-3].minor.yy778; } + yymsp[-3].minor.yy778 = yylhsminor.yy778; break; - case 284: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 469: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==469); - case 487: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==487); -{ yymsp[-3].minor.yy616 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy616); } + case 285: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 471: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==471); + case 489: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==489); +{ yymsp[-3].minor.yy778 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy778); } break; - case 285: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 286: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 286: /* cmd ::= KILL QUERY NK_STRING */ + case 287: /* cmd ::= KILL QUERY NK_STRING */ { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 287: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 288: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 288: /* cmd ::= BALANCE VGROUP */ + case 289: /* cmd ::= BALANCE VGROUP */ { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } break; - case 289: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 290: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 290: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy152); } + case 291: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy282); } break; - case 291: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 292: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 292: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy152 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + case 293: /* dnode_list ::= DNODE NK_INTEGER */ +{ yymsp[-1].minor.yy282 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 294: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy616, yymsp[0].minor.yy616); } + case 295: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ +{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy778, yymsp[0].minor.yy778); } break; - case 296: /* cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-4].minor.yy616, yymsp[-2].minor.yy152, yymsp[0].minor.yy616); } + case 297: /* cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ +{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-4].minor.yy778, yymsp[-2].minor.yy282, yymsp[0].minor.yy778); } break; - case 297: /* cmd ::= INSERT INTO full_table_name query_or_subquery */ -{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy616, NULL, yymsp[0].minor.yy616); } + case 298: /* cmd ::= INSERT INTO full_table_name query_or_subquery */ +{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy778, NULL, yymsp[0].minor.yy778); } break; - case 298: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 299: /* literal ::= NK_INTEGER */ +{ yylhsminor.yy778 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 299: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 300: /* literal ::= NK_FLOAT */ +{ yylhsminor.yy778 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 300: /* literal ::= NK_STRING */ -{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 301: /* literal ::= NK_STRING */ +{ yylhsminor.yy778 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 301: /* literal ::= NK_BOOL */ -{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 302: /* literal ::= NK_BOOL */ +{ yylhsminor.yy778 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 302: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; + case 303: /* literal ::= TIMESTAMP NK_STRING */ +{ yylhsminor.yy778 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy778 = yylhsminor.yy778; break; - case 303: /* literal ::= duration_literal */ - case 313: /* signed_literal ::= signed */ yytestcase(yyruleno==313); - case 333: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==333); - case 334: /* expr_or_subquery ::= subquery */ yytestcase(yyruleno==334); - case 335: /* expression ::= literal */ yytestcase(yyruleno==335); - case 336: /* expression ::= pseudo_column */ yytestcase(yyruleno==336); - case 337: /* expression ::= column_reference */ yytestcase(yyruleno==337); - case 338: /* expression ::= function_expression */ yytestcase(yyruleno==338); - case 339: /* expression ::= case_when_expression */ yytestcase(yyruleno==339); - case 368: /* function_expression ::= literal_func */ yytestcase(yyruleno==368); - case 417: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==417); - case 421: /* boolean_primary ::= predicate */ yytestcase(yyruleno==421); - case 423: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==423); - case 424: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==424); - case 427: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==427); - case 429: /* table_reference ::= table_primary */ yytestcase(yyruleno==429); - case 430: /* table_reference ::= joined_table */ yytestcase(yyruleno==430); - case 434: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==434); - case 489: /* query_simple ::= query_specification */ yytestcase(yyruleno==489); - case 490: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==490); - case 493: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==493); - case 495: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==495); -{ yylhsminor.yy616 = yymsp[0].minor.yy616; } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 304: /* literal ::= duration_literal */ + case 314: /* signed_literal ::= signed */ yytestcase(yyruleno==314); + case 334: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==334); + case 335: /* expr_or_subquery ::= subquery */ yytestcase(yyruleno==335); + case 336: /* expression ::= literal */ yytestcase(yyruleno==336); + case 337: /* expression ::= pseudo_column */ yytestcase(yyruleno==337); + case 338: /* expression ::= column_reference */ yytestcase(yyruleno==338); + case 339: /* expression ::= function_expression */ yytestcase(yyruleno==339); + case 340: /* expression ::= case_when_expression */ yytestcase(yyruleno==340); + case 370: /* function_expression ::= literal_func */ yytestcase(yyruleno==370); + case 419: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==419); + case 423: /* boolean_primary ::= predicate */ yytestcase(yyruleno==423); + case 425: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==425); + case 426: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==426); + case 429: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==429); + case 431: /* table_reference ::= table_primary */ yytestcase(yyruleno==431); + case 432: /* table_reference ::= joined_table */ yytestcase(yyruleno==432); + case 436: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==436); + case 491: /* query_simple ::= query_specification */ yytestcase(yyruleno==491); + case 492: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==492); + case 495: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==495); + case 497: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==497); +{ yylhsminor.yy778 = yymsp[0].minor.yy778; } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 304: /* literal ::= NULL */ -{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 305: /* literal ::= NULL */ +{ yylhsminor.yy778 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 305: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 306: /* literal ::= NK_QUESTION */ +{ yylhsminor.yy778 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 306: /* duration_literal ::= NK_VARIABLE */ -{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 307: /* duration_literal ::= NK_VARIABLE */ +{ yylhsminor.yy778 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 307: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 308: /* signed ::= NK_INTEGER */ +{ yylhsminor.yy778 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 308: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + case 309: /* signed ::= NK_PLUS NK_INTEGER */ +{ yymsp[-1].minor.yy778 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; - case 309: /* signed ::= NK_MINUS NK_INTEGER */ + case 310: /* signed ::= NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy778 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; + yymsp[-1].minor.yy778 = yylhsminor.yy778; break; - case 310: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 311: /* signed ::= NK_FLOAT */ +{ yylhsminor.yy778 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 311: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + case 312: /* signed ::= NK_PLUS NK_FLOAT */ +{ yymsp[-1].minor.yy778 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 312: /* signed ::= NK_MINUS NK_FLOAT */ + case 313: /* signed ::= NK_MINUS NK_FLOAT */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy778 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; + yymsp[-1].minor.yy778 = yylhsminor.yy778; break; - case 314: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 315: /* signed_literal ::= NK_STRING */ +{ yylhsminor.yy778 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 315: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 316: /* signed_literal ::= NK_BOOL */ +{ yylhsminor.yy778 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 316: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + case 317: /* signed_literal ::= TIMESTAMP NK_STRING */ +{ yymsp[-1].minor.yy778 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 317: /* signed_literal ::= duration_literal */ - case 319: /* signed_literal ::= literal_func */ yytestcase(yyruleno==319); - case 388: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==388); - case 450: /* select_item ::= common_expression */ yytestcase(yyruleno==450); - case 460: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==460); - case 494: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==494); - case 496: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==496); - case 509: /* search_condition ::= common_expression */ yytestcase(yyruleno==509); -{ yylhsminor.yy616 = releaseRawExprNode(pCxt, yymsp[0].minor.yy616); } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 318: /* signed_literal ::= duration_literal */ + case 320: /* signed_literal ::= literal_func */ yytestcase(yyruleno==320); + case 390: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==390); + case 452: /* select_item ::= common_expression */ yytestcase(yyruleno==452); + case 462: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==462); + case 496: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==496); + case 498: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==498); + case 511: /* search_condition ::= common_expression */ yytestcase(yyruleno==511); +{ yylhsminor.yy778 = releaseRawExprNode(pCxt, yymsp[0].minor.yy778); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 318: /* signed_literal ::= NULL */ -{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 319: /* signed_literal ::= NULL */ +{ yylhsminor.yy778 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 320: /* signed_literal ::= NK_QUESTION */ -{ yylhsminor.yy616 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 321: /* signed_literal ::= NK_QUESTION */ +{ yylhsminor.yy778 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 340: /* expression ::= NK_LP expression NK_RP */ - case 422: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==422); - case 508: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==508); -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy616)); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + case 341: /* expression ::= NK_LP expression NK_RP */ + case 424: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==424); + case 510: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==510); +{ yylhsminor.yy778 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy778)); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 341: /* expression ::= NK_PLUS expr_or_subquery */ + case 342: /* expression ::= NK_PLUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy616)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy778); + yylhsminor.yy778 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy778)); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; + yymsp[-1].minor.yy778 = yylhsminor.yy778; break; - case 342: /* expression ::= NK_MINUS expr_or_subquery */ + case 343: /* expression ::= NK_MINUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy616), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy778); + yylhsminor.yy778 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy778), NULL)); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; + yymsp[-1].minor.yy778 = yylhsminor.yy778; break; - case 343: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + case 344: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy778); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy778); + yylhsminor.yy778 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy778), releaseRawExprNode(pCxt, yymsp[0].minor.yy778))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 344: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + case 345: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy778); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy778); + yylhsminor.yy778 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy778), releaseRawExprNode(pCxt, yymsp[0].minor.yy778))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 345: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + case 346: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy778); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy778); + yylhsminor.yy778 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy778), releaseRawExprNode(pCxt, yymsp[0].minor.yy778))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 346: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + case 347: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy778); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy778); + yylhsminor.yy778 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy778), releaseRawExprNode(pCxt, yymsp[0].minor.yy778))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 347: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ + case 348: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy778); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy778); + yylhsminor.yy778 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy778), releaseRawExprNode(pCxt, yymsp[0].minor.yy778))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 348: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 349: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy778); + yylhsminor.yy778 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy778), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 349: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + case 350: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy778); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy778); + yylhsminor.yy778 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy778), releaseRawExprNode(pCxt, yymsp[0].minor.yy778))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 350: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + case 351: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy778); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy778); + yylhsminor.yy778 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy778), releaseRawExprNode(pCxt, yymsp[0].minor.yy778))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 353: /* column_reference ::= column_name */ -{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy673, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy673)); } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 354: /* column_reference ::= column_name */ +{ yylhsminor.yy778 = createRawExprNode(pCxt, &yymsp[0].minor.yy181, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy181)); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 354: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy673, createColumnNode(pCxt, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy673)); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + case 355: /* column_reference ::= table_name NK_DOT column_name */ +{ yylhsminor.yy778 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy181, &yymsp[0].minor.yy181, createColumnNode(pCxt, &yymsp[-2].minor.yy181, &yymsp[0].minor.yy181)); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 355: /* pseudo_column ::= ROWTS */ - case 356: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==356); - case 358: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==358); - case 359: /* pseudo_column ::= QEND */ yytestcase(yyruleno==359); - case 360: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==360); - case 361: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==361); - case 362: /* pseudo_column ::= WEND */ yytestcase(yyruleno==362); - case 363: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==363); - case 364: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==364); - case 370: /* literal_func ::= NOW */ yytestcase(yyruleno==370); -{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 356: /* pseudo_column ::= ROWTS */ + case 357: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==357); + case 359: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==359); + case 360: /* pseudo_column ::= QEND */ yytestcase(yyruleno==360); + case 361: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==361); + case 362: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==362); + case 363: /* pseudo_column ::= WEND */ yytestcase(yyruleno==363); + case 364: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==364); + case 365: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==365); + case 366: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==366); + case 372: /* literal_func ::= NOW */ yytestcase(yyruleno==372); +{ yylhsminor.yy778 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 357: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy673)))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + case 358: /* pseudo_column ::= table_name NK_DOT TBNAME */ +{ yylhsminor.yy778 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy181, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy181)))); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 365: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 366: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==366); -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy673, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy673, yymsp[-1].minor.yy152)); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; + case 367: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 368: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==368); +{ yylhsminor.yy778 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy181, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy181, yymsp[-1].minor.yy282)); } + yymsp[-3].minor.yy778 = yylhsminor.yy778; break; - case 367: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), yymsp[-1].minor.yy784)); } - yymsp[-5].minor.yy616 = yylhsminor.yy616; + case 369: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ +{ yylhsminor.yy778 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy778), yymsp[-1].minor.yy380)); } + yymsp[-5].minor.yy778 = yylhsminor.yy778; break; - case 369: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy673, NULL)); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + case 371: /* literal_func ::= noarg_func NK_LP NK_RP */ +{ yylhsminor.yy778 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy181, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy181, NULL)); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 384: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy152 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy152 = yylhsminor.yy152; + case 386: /* star_func_para_list ::= NK_STAR */ +{ yylhsminor.yy282 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy282 = yylhsminor.yy282; break; - case 389: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 453: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==453); -{ yylhsminor.yy616 = createColumnNode(pCxt, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + case 391: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 455: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==455); +{ yylhsminor.yy778 = createColumnNode(pCxt, &yymsp[-2].minor.yy181, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 390: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy152, yymsp[-1].minor.yy616)); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; + case 392: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ +{ yylhsminor.yy778 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy282, yymsp[-1].minor.yy778)); } + yymsp[-3].minor.yy778 = yylhsminor.yy778; break; - case 391: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), yymsp[-2].minor.yy152, yymsp[-1].minor.yy616)); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; + case 393: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ +{ yylhsminor.yy778 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy778), yymsp[-2].minor.yy282, yymsp[-1].minor.yy778)); } + yymsp[-4].minor.yy778 = yylhsminor.yy778; break; - case 394: /* when_then_expr ::= WHEN common_expression THEN common_expression */ -{ yymsp[-3].minor.yy616 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616)); } + case 396: /* when_then_expr ::= WHEN common_expression THEN common_expression */ +{ yymsp[-3].minor.yy778 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy778), releaseRawExprNode(pCxt, yymsp[0].minor.yy778)); } break; - case 396: /* case_when_else_opt ::= ELSE common_expression */ -{ yymsp[-1].minor.yy616 = releaseRawExprNode(pCxt, yymsp[0].minor.yy616); } + case 398: /* case_when_else_opt ::= ELSE common_expression */ +{ yymsp[-1].minor.yy778 = releaseRawExprNode(pCxt, yymsp[0].minor.yy778); } break; - case 397: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 402: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==402); + case 399: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 404: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==404); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy380, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy778); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy778); + yylhsminor.yy778 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy682, releaseRawExprNode(pCxt, yymsp[-2].minor.yy778), releaseRawExprNode(pCxt, yymsp[0].minor.yy778))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 398: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 400: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy616), releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy778); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy778); + yylhsminor.yy778 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy778), releaseRawExprNode(pCxt, yymsp[-2].minor.yy778), releaseRawExprNode(pCxt, yymsp[0].minor.yy778))); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; + yymsp[-4].minor.yy778 = yylhsminor.yy778; break; - case 399: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 401: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy616), releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy778); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy778); + yylhsminor.yy778 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy778), releaseRawExprNode(pCxt, yymsp[-2].minor.yy778), releaseRawExprNode(pCxt, yymsp[0].minor.yy778))); } - yymsp[-5].minor.yy616 = yylhsminor.yy616; + yymsp[-5].minor.yy778 = yylhsminor.yy778; break; - case 400: /* predicate ::= expr_or_subquery IS NULL */ + case 402: /* predicate ::= expr_or_subquery IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy778); + yylhsminor.yy778 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy778), NULL)); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 401: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 403: /* predicate ::= expr_or_subquery IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy778); + yylhsminor.yy778 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy778), NULL)); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; + yymsp[-3].minor.yy778 = yylhsminor.yy778; break; - case 403: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy380 = OP_TYPE_LOWER_THAN; } + case 405: /* compare_op ::= NK_LT */ +{ yymsp[0].minor.yy682 = OP_TYPE_LOWER_THAN; } break; - case 404: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy380 = OP_TYPE_GREATER_THAN; } + case 406: /* compare_op ::= NK_GT */ +{ yymsp[0].minor.yy682 = OP_TYPE_GREATER_THAN; } break; - case 405: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy380 = OP_TYPE_LOWER_EQUAL; } + case 407: /* compare_op ::= NK_LE */ +{ yymsp[0].minor.yy682 = OP_TYPE_LOWER_EQUAL; } break; - case 406: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy380 = OP_TYPE_GREATER_EQUAL; } + case 408: /* compare_op ::= NK_GE */ +{ yymsp[0].minor.yy682 = OP_TYPE_GREATER_EQUAL; } break; - case 407: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy380 = OP_TYPE_NOT_EQUAL; } + case 409: /* compare_op ::= NK_NE */ +{ yymsp[0].minor.yy682 = OP_TYPE_NOT_EQUAL; } break; - case 408: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy380 = OP_TYPE_EQUAL; } + case 410: /* compare_op ::= NK_EQ */ +{ yymsp[0].minor.yy682 = OP_TYPE_EQUAL; } break; - case 409: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy380 = OP_TYPE_LIKE; } + case 411: /* compare_op ::= LIKE */ +{ yymsp[0].minor.yy682 = OP_TYPE_LIKE; } break; - case 410: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy380 = OP_TYPE_NOT_LIKE; } + case 412: /* compare_op ::= NOT LIKE */ +{ yymsp[-1].minor.yy682 = OP_TYPE_NOT_LIKE; } break; - case 411: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy380 = OP_TYPE_MATCH; } + case 413: /* compare_op ::= MATCH */ +{ yymsp[0].minor.yy682 = OP_TYPE_MATCH; } break; - case 412: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy380 = OP_TYPE_NMATCH; } + case 414: /* compare_op ::= NMATCH */ +{ yymsp[0].minor.yy682 = OP_TYPE_NMATCH; } break; - case 413: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy380 = OP_TYPE_JSON_CONTAINS; } + case 415: /* compare_op ::= CONTAINS */ +{ yymsp[0].minor.yy682 = OP_TYPE_JSON_CONTAINS; } break; - case 414: /* in_op ::= IN */ -{ yymsp[0].minor.yy380 = OP_TYPE_IN; } + case 416: /* in_op ::= IN */ +{ yymsp[0].minor.yy682 = OP_TYPE_IN; } break; - case 415: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy380 = OP_TYPE_NOT_IN; } + case 417: /* in_op ::= NOT IN */ +{ yymsp[-1].minor.yy682 = OP_TYPE_NOT_IN; } break; - case 416: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy152)); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + case 418: /* in_predicate_value ::= NK_LP literal_list NK_RP */ +{ yylhsminor.yy778 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy282)); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 418: /* boolean_value_expression ::= NOT boolean_primary */ + case 420: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy616), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy778); + yylhsminor.yy778 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy778), NULL)); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; + yymsp[-1].minor.yy778 = yylhsminor.yy778; break; - case 419: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 421: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy778); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy778); + yylhsminor.yy778 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy778), releaseRawExprNode(pCxt, yymsp[0].minor.yy778))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 420: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 422: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy778); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy778); + yylhsminor.yy778 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy778), releaseRawExprNode(pCxt, yymsp[0].minor.yy778))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 426: /* from_clause_opt ::= FROM table_reference_list */ - case 455: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==455); - case 483: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==483); -{ yymsp[-1].minor.yy616 = yymsp[0].minor.yy616; } + case 428: /* from_clause_opt ::= FROM table_reference_list */ + case 457: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==457); + case 485: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==485); +{ yymsp[-1].minor.yy778 = yymsp[0].minor.yy778; } break; - case 428: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy616 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy616, yymsp[0].minor.yy616, NULL); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + case 430: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +{ yylhsminor.yy778 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy778, yymsp[0].minor.yy778, NULL); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 431: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy616 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy673, &yymsp[0].minor.yy673); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; + case 433: /* table_primary ::= table_name alias_opt */ +{ yylhsminor.yy778 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy181, &yymsp[0].minor.yy181); } + yymsp[-1].minor.yy778 = yylhsminor.yy778; break; - case 432: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy616 = createRealTableNode(pCxt, &yymsp[-3].minor.yy673, &yymsp[-1].minor.yy673, &yymsp[0].minor.yy673); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; + case 434: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +{ yylhsminor.yy778 = createRealTableNode(pCxt, &yymsp[-3].minor.yy181, &yymsp[-1].minor.yy181, &yymsp[0].minor.yy181); } + yymsp[-3].minor.yy778 = yylhsminor.yy778; break; - case 433: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy616 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy616), &yymsp[0].minor.yy673); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; + case 435: /* table_primary ::= subquery alias_opt */ +{ yylhsminor.yy778 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy778), &yymsp[0].minor.yy181); } + yymsp[-1].minor.yy778 = yylhsminor.yy778; break; - case 435: /* alias_opt ::= */ -{ yymsp[1].minor.yy673 = nil_token; } + case 437: /* alias_opt ::= */ +{ yymsp[1].minor.yy181 = nil_token; } break; - case 436: /* alias_opt ::= table_alias */ -{ yylhsminor.yy673 = yymsp[0].minor.yy673; } - yymsp[0].minor.yy673 = yylhsminor.yy673; + case 438: /* alias_opt ::= table_alias */ +{ yylhsminor.yy181 = yymsp[0].minor.yy181; } + yymsp[0].minor.yy181 = yylhsminor.yy181; break; - case 437: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy673 = yymsp[0].minor.yy673; } + case 439: /* alias_opt ::= AS table_alias */ +{ yymsp[-1].minor.yy181 = yymsp[0].minor.yy181; } break; - case 438: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 439: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==439); -{ yymsp[-2].minor.yy616 = yymsp[-1].minor.yy616; } + case 440: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 441: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==441); +{ yymsp[-2].minor.yy778 = yymsp[-1].minor.yy778; } break; - case 440: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy616 = createJoinTableNode(pCxt, yymsp[-4].minor.yy596, yymsp[-5].minor.yy616, yymsp[-2].minor.yy616, yymsp[0].minor.yy616); } - yymsp[-5].minor.yy616 = yylhsminor.yy616; + case 442: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ +{ yylhsminor.yy778 = createJoinTableNode(pCxt, yymsp[-4].minor.yy202, yymsp[-5].minor.yy778, yymsp[-2].minor.yy778, yymsp[0].minor.yy778); } + yymsp[-5].minor.yy778 = yylhsminor.yy778; break; - case 441: /* join_type ::= */ -{ yymsp[1].minor.yy596 = JOIN_TYPE_INNER; } + case 443: /* join_type ::= */ +{ yymsp[1].minor.yy202 = JOIN_TYPE_INNER; } break; - case 442: /* join_type ::= INNER */ -{ yymsp[0].minor.yy596 = JOIN_TYPE_INNER; } + case 444: /* join_type ::= INNER */ +{ yymsp[0].minor.yy202 = JOIN_TYPE_INNER; } break; - case 443: /* query_specification ::= SELECT set_quantifier_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 */ + case 445: /* query_specification ::= SELECT set_quantifier_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 */ { - yymsp[-11].minor.yy616 = createSelectStmt(pCxt, yymsp[-10].minor.yy89, yymsp[-9].minor.yy152, yymsp[-8].minor.yy616); - yymsp[-11].minor.yy616 = addWhereClause(pCxt, yymsp[-11].minor.yy616, yymsp[-7].minor.yy616); - yymsp[-11].minor.yy616 = addPartitionByClause(pCxt, yymsp[-11].minor.yy616, yymsp[-6].minor.yy152); - yymsp[-11].minor.yy616 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy616, yymsp[-2].minor.yy616); - yymsp[-11].minor.yy616 = addGroupByClause(pCxt, yymsp[-11].minor.yy616, yymsp[-1].minor.yy152); - yymsp[-11].minor.yy616 = addHavingClause(pCxt, yymsp[-11].minor.yy616, yymsp[0].minor.yy616); - yymsp[-11].minor.yy616 = addRangeClause(pCxt, yymsp[-11].minor.yy616, yymsp[-5].minor.yy616); - yymsp[-11].minor.yy616 = addEveryClause(pCxt, yymsp[-11].minor.yy616, yymsp[-4].minor.yy616); - yymsp[-11].minor.yy616 = addFillClause(pCxt, yymsp[-11].minor.yy616, yymsp[-3].minor.yy616); + yymsp[-11].minor.yy778 = createSelectStmt(pCxt, yymsp[-10].minor.yy39, yymsp[-9].minor.yy282, yymsp[-8].minor.yy778); + yymsp[-11].minor.yy778 = addWhereClause(pCxt, yymsp[-11].minor.yy778, yymsp[-7].minor.yy778); + yymsp[-11].minor.yy778 = addPartitionByClause(pCxt, yymsp[-11].minor.yy778, yymsp[-6].minor.yy282); + yymsp[-11].minor.yy778 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy778, yymsp[-2].minor.yy778); + yymsp[-11].minor.yy778 = addGroupByClause(pCxt, yymsp[-11].minor.yy778, yymsp[-1].minor.yy282); + yymsp[-11].minor.yy778 = addHavingClause(pCxt, yymsp[-11].minor.yy778, yymsp[0].minor.yy778); + yymsp[-11].minor.yy778 = addRangeClause(pCxt, yymsp[-11].minor.yy778, yymsp[-5].minor.yy778); + yymsp[-11].minor.yy778 = addEveryClause(pCxt, yymsp[-11].minor.yy778, yymsp[-4].minor.yy778); + yymsp[-11].minor.yy778 = addFillClause(pCxt, yymsp[-11].minor.yy778, yymsp[-3].minor.yy778); } break; - case 446: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy89 = false; } + case 448: /* set_quantifier_opt ::= ALL */ +{ yymsp[0].minor.yy39 = false; } break; - case 449: /* select_item ::= NK_STAR */ -{ yylhsminor.yy616 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy616 = yylhsminor.yy616; + case 451: /* select_item ::= NK_STAR */ +{ yylhsminor.yy778 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy778 = yylhsminor.yy778; break; - case 451: /* select_item ::= common_expression column_alias */ - case 461: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==461); -{ yylhsminor.yy616 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy616), &yymsp[0].minor.yy673); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; + case 453: /* select_item ::= common_expression column_alias */ + case 463: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==463); +{ yylhsminor.yy778 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy778), &yymsp[0].minor.yy181); } + yymsp[-1].minor.yy778 = yylhsminor.yy778; break; - case 452: /* select_item ::= common_expression AS column_alias */ - case 462: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==462); -{ yylhsminor.yy616 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), &yymsp[0].minor.yy673); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + case 454: /* select_item ::= common_expression AS column_alias */ + case 464: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==464); +{ yylhsminor.yy778 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy778), &yymsp[0].minor.yy181); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 457: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 479: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==479); - case 498: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==498); -{ yymsp[-2].minor.yy152 = yymsp[0].minor.yy152; } + case 459: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 481: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==481); + case 500: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==500); +{ yymsp[-2].minor.yy282 = yymsp[0].minor.yy282; } break; - case 464: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ -{ yymsp[-5].minor.yy616 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), releaseRawExprNode(pCxt, yymsp[-1].minor.yy616)); } + case 466: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ +{ yymsp[-5].minor.yy778 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy778), releaseRawExprNode(pCxt, yymsp[-1].minor.yy778)); } break; - case 465: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy616 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy616)); } + case 467: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ +{ yymsp[-3].minor.yy778 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy778)); } break; - case 466: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy616 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), NULL, yymsp[-1].minor.yy616, yymsp[0].minor.yy616); } + case 468: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-5].minor.yy778 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy778), NULL, yymsp[-1].minor.yy778, yymsp[0].minor.yy778); } break; - case 467: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-7].minor.yy616 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy616), releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), yymsp[-1].minor.yy616, yymsp[0].minor.yy616); } + case 469: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-7].minor.yy778 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy778), releaseRawExprNode(pCxt, yymsp[-3].minor.yy778), yymsp[-1].minor.yy778, yymsp[0].minor.yy778); } break; - case 471: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy616 = createFillNode(pCxt, yymsp[-1].minor.yy102, NULL); } + case 473: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy778 = createFillNode(pCxt, yymsp[-1].minor.yy381, NULL); } break; - case 472: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ -{ yymsp[-5].minor.yy616 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy152)); } + case 474: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ +{ yymsp[-5].minor.yy778 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy282)); } break; - case 473: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy102 = FILL_MODE_NONE; } + case 475: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy381 = FILL_MODE_NONE; } break; - case 474: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy102 = FILL_MODE_PREV; } + case 476: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy381 = FILL_MODE_PREV; } break; - case 475: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy102 = FILL_MODE_NULL; } + case 477: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy381 = FILL_MODE_NULL; } break; - case 476: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy102 = FILL_MODE_LINEAR; } + case 478: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy381 = FILL_MODE_LINEAR; } break; - case 477: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy102 = FILL_MODE_NEXT; } + case 479: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy381 = FILL_MODE_NEXT; } break; - case 480: /* group_by_list ::= expr_or_subquery */ -{ yylhsminor.yy152 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); } - yymsp[0].minor.yy152 = yylhsminor.yy152; + case 482: /* group_by_list ::= expr_or_subquery */ +{ yylhsminor.yy282 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy778))); } + yymsp[0].minor.yy282 = yylhsminor.yy282; break; - case 481: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ -{ yylhsminor.yy152 = addNodeToList(pCxt, yymsp[-2].minor.yy152, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); } - yymsp[-2].minor.yy152 = yylhsminor.yy152; + case 483: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ +{ yylhsminor.yy282 = addNodeToList(pCxt, yymsp[-2].minor.yy282, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy778))); } + yymsp[-2].minor.yy282 = yylhsminor.yy282; break; - case 485: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ -{ yymsp[-5].minor.yy616 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), releaseRawExprNode(pCxt, yymsp[-1].minor.yy616)); } + case 487: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ +{ yymsp[-5].minor.yy778 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy778), releaseRawExprNode(pCxt, yymsp[-1].minor.yy778)); } break; - case 488: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 490: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy616 = addOrderByClause(pCxt, yymsp[-3].minor.yy616, yymsp[-2].minor.yy152); - yylhsminor.yy616 = addSlimitClause(pCxt, yylhsminor.yy616, yymsp[-1].minor.yy616); - yylhsminor.yy616 = addLimitClause(pCxt, yylhsminor.yy616, yymsp[0].minor.yy616); + yylhsminor.yy778 = addOrderByClause(pCxt, yymsp[-3].minor.yy778, yymsp[-2].minor.yy282); + yylhsminor.yy778 = addSlimitClause(pCxt, yylhsminor.yy778, yymsp[-1].minor.yy778); + yylhsminor.yy778 = addLimitClause(pCxt, yylhsminor.yy778, yymsp[0].minor.yy778); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; + yymsp[-3].minor.yy778 = yylhsminor.yy778; break; - case 491: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ -{ yylhsminor.yy616 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy616, yymsp[0].minor.yy616); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; + case 493: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ +{ yylhsminor.yy778 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy778, yymsp[0].minor.yy778); } + yymsp[-3].minor.yy778 = yylhsminor.yy778; break; - case 492: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ -{ yylhsminor.yy616 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy616, yymsp[0].minor.yy616); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + case 494: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ +{ yylhsminor.yy778 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy778, yymsp[0].minor.yy778); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 500: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 504: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==504); -{ yymsp[-1].minor.yy616 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 502: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 506: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==506); +{ yymsp[-1].minor.yy778 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 501: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 505: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==505); -{ yymsp[-3].minor.yy616 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 503: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 507: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==507); +{ yymsp[-3].minor.yy778 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 502: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 506: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==506); -{ yymsp[-3].minor.yy616 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 504: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 508: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==508); +{ yymsp[-3].minor.yy778 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 507: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy616); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + case 509: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy778 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy778); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 512: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy616 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), yymsp[-1].minor.yy386, yymsp[0].minor.yy585); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + case 514: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy778 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy778), yymsp[-1].minor.yy14, yymsp[0].minor.yy305); } + yymsp[-2].minor.yy778 = yylhsminor.yy778; break; - case 513: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy386 = ORDER_ASC; } + case 515: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy14 = ORDER_ASC; } break; - case 514: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy386 = ORDER_ASC; } + case 516: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy14 = ORDER_ASC; } break; - case 515: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy386 = ORDER_DESC; } + case 517: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy14 = ORDER_DESC; } break; - case 516: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy585 = NULL_ORDER_DEFAULT; } + case 518: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy305 = NULL_ORDER_DEFAULT; } break; - case 517: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy585 = NULL_ORDER_FIRST; } + case 519: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy305 = NULL_ORDER_FIRST; } break; - case 518: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy585 = NULL_ORDER_LAST; } + case 520: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy305 = NULL_ORDER_LAST; } break; default: break; diff --git a/source/libs/planner/test/planBasicTest.cpp b/source/libs/planner/test/planBasicTest.cpp index aeb78f4030..0baec147a2 100644 --- a/source/libs/planner/test/planBasicTest.cpp +++ b/source/libs/planner/test/planBasicTest.cpp @@ -180,6 +180,8 @@ TEST_F(PlanBasicTest, pseudoColumn) { run("SELECT _QSTART, _QEND, _QDURATION, _WSTART, _WEND, _WDURATION, COUNT(*) FROM t1 " "WHERE ts BETWEEN '2017-7-14 18:00:00' AND '2017-7-14 19:00:00' INTERVAL(10S)"); + + run("SELECT _TAGS, * FROM st1s1"); } TEST_F(PlanBasicTest, indefiniteRowsFunc) { diff --git a/source/libs/planner/test/planOtherTest.cpp b/source/libs/planner/test/planOtherTest.cpp index 2ad997bb46..a934fb615c 100644 --- a/source/libs/planner/test/planOtherTest.cpp +++ b/source/libs/planner/test/planOtherTest.cpp @@ -86,6 +86,8 @@ TEST_F(PlanOtherTest, show) { run("SHOW DNODE 1 VARIABLES"); run("SHOW TAGS FROM st1s1"); + + run("SHOW TABLE TAGS FROM st1"); } TEST_F(PlanOtherTest, delete) { From f1d492f62875468b4d22f004be0d569c419c004d Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Thu, 29 Sep 2022 16:18:47 +0800 Subject: [PATCH 27/40] doc: change rest connection sample as the default in tabs --- docs/en/14-reference/03-connector/04-java.mdx | 2 +- docs/en/14-reference/03-connector/05-go.mdx | 2 +- docs/en/14-reference/03-connector/06-rust.mdx | 22 ++++++++++--------- .../14-reference/03-connector/07-python.mdx | 2 +- docs/en/14-reference/03-connector/08-node.mdx | 4 ++-- docs/zh/08-connector/04-java.mdx | 2 +- docs/zh/08-connector/05-go.mdx | 2 +- docs/zh/08-connector/06-rust.mdx | 21 +++++++++--------- docs/zh/08-connector/07-python.mdx | 2 +- docs/zh/08-connector/08-node.mdx | 4 ++-- 10 files changed, 33 insertions(+), 30 deletions(-) diff --git a/docs/en/14-reference/03-connector/04-java.mdx b/docs/en/14-reference/03-connector/04-java.mdx index 0f977393f1..afa3200387 100644 --- a/docs/en/14-reference/03-connector/04-java.mdx +++ b/docs/en/14-reference/03-connector/04-java.mdx @@ -109,7 +109,7 @@ TDengine's JDBC URL specification format is: For establishing connections, native connections differ slightly from REST connections. - + ```java diff --git a/docs/en/14-reference/03-connector/05-go.mdx b/docs/en/14-reference/03-connector/05-go.mdx index 00e3bc1bc3..1bf99d72fa 100644 --- a/docs/en/14-reference/03-connector/05-go.mdx +++ b/docs/en/14-reference/03-connector/05-go.mdx @@ -113,7 +113,7 @@ username:password@protocol(address)/dbname?param=value ``` ### Connecting via connector - + _taosSql_ implements Go's `database/sql/driver` interface via cgo. You can use the [`database/sql`](https://golang.org/pkg/database/sql/) interface by simply introducing the driver. diff --git a/docs/en/14-reference/03-connector/06-rust.mdx b/docs/en/14-reference/03-connector/06-rust.mdx index 1184c98a28..9d2e840e9e 100644 --- a/docs/en/14-reference/03-connector/06-rust.mdx +++ b/docs/en/14-reference/03-connector/06-rust.mdx @@ -55,16 +55,6 @@ taos = "*" - - -In `cargo.toml`, add [taos][taos] and enable the native feature: - -```toml -[dependencies] -taos = { version = "*", default-features = false, features = ["native"] } -``` - - In `cargo.toml`, add [taos][taos] and enable the ws feature: @@ -75,6 +65,18 @@ taos = { version = "*", default-features = false, features = ["ws"] } ``` + + + +In `cargo.toml`, add [taos][taos] and enable the native feature: + +```toml +[dependencies] +taos = { version = "*", default-features = false, features = ["native"] } +``` + + + ## Establishing a connection diff --git a/docs/en/14-reference/03-connector/07-python.mdx b/docs/en/14-reference/03-connector/07-python.mdx index fc95033baa..355ba06ee4 100644 --- a/docs/en/14-reference/03-connector/07-python.mdx +++ b/docs/en/14-reference/03-connector/07-python.mdx @@ -81,7 +81,7 @@ pip3 install git+https://github.com/taosdata/taos-connector-python.git ### Verify - + For native connection, you need to verify that both the client driver and the Python connector itself are installed correctly. The client driver and Python connector have been installed properly if you can successfully import the `taos` module. In the Python Interactive Shell, you can type. diff --git a/docs/en/14-reference/03-connector/08-node.mdx b/docs/en/14-reference/03-connector/08-node.mdx index f93632b417..259ee590ef 100644 --- a/docs/en/14-reference/03-connector/08-node.mdx +++ b/docs/en/14-reference/03-connector/08-node.mdx @@ -85,7 +85,7 @@ If using ARM64 Node.js on Windows 10 ARM, you must add "Visual C++ compilers and ### Install via npm - + ```bash @@ -124,7 +124,7 @@ node nodejsChecker.js host=localhost Please choose to use one of the connectors. - + Install and import the `@tdengine/client` package. diff --git a/docs/zh/08-connector/04-java.mdx b/docs/zh/08-connector/04-java.mdx index 6b1715f8c6..d78da52aaa 100644 --- a/docs/zh/08-connector/04-java.mdx +++ b/docs/zh/08-connector/04-java.mdx @@ -109,7 +109,7 @@ TDengine 的 JDBC URL 规范格式为: 对于建立连接,原生连接与 REST 连接有细微不同。 - + ```java diff --git a/docs/zh/08-connector/05-go.mdx b/docs/zh/08-connector/05-go.mdx index 9d30f75190..515d1b030b 100644 --- a/docs/zh/08-connector/05-go.mdx +++ b/docs/zh/08-connector/05-go.mdx @@ -114,7 +114,7 @@ username:password@protocol(address)/dbname?param=value ``` ### 使用连接器进行连接 - + _taosSql_ 通过 cgo 实现了 Go 的 `database/sql/driver` 接口。只需要引入驱动就可以使用 [`database/sql`](https://golang.org/pkg/database/sql/) 的接口。 diff --git a/docs/zh/08-connector/06-rust.mdx b/docs/zh/08-connector/06-rust.mdx index 26f53c82d6..42cd5205cd 100644 --- a/docs/zh/08-connector/06-rust.mdx +++ b/docs/zh/08-connector/06-rust.mdx @@ -55,16 +55,6 @@ taos = "*" - - -在 `Cargo.toml` 文件中添加 [taos][taos],并启用 `native` 特性: - -```toml -[dependencies] -taos = { version = "*", default-features = false, features = ["native"] } -``` - - 在 `Cargo.toml` 文件中添加 [taos][taos],并启用 `ws` 特性。 @@ -74,6 +64,17 @@ taos = { version = "*", default-features = false, features = ["native"] } taos = { version = "*", default-features = false, features = ["ws"] } ``` + + + + +在 `Cargo.toml` 文件中添加 [taos][taos],并启用 `native` 特性: + +```toml +[dependencies] +taos = { version = "*", default-features = false, features = ["native"] } +``` + diff --git a/docs/zh/08-connector/07-python.mdx b/docs/zh/08-connector/07-python.mdx index 0242486d3b..2e80da4283 100644 --- a/docs/zh/08-connector/07-python.mdx +++ b/docs/zh/08-connector/07-python.mdx @@ -80,7 +80,7 @@ pip3 install git+https://github.com/taosdata/taos-connector-python.git ### 安装验证 - + 对于原生连接,需要验证客户端驱动和 Python 连接器本身是否都正确安装。如果能成功导入 `taos` 模块,则说明已经正确安装了客户端驱动和 Python 连接器。可在 Python 交互式 Shell 中输入: diff --git a/docs/zh/08-connector/08-node.mdx b/docs/zh/08-connector/08-node.mdx index 167ae069d6..1de19cdd3a 100644 --- a/docs/zh/08-connector/08-node.mdx +++ b/docs/zh/08-connector/08-node.mdx @@ -85,7 +85,7 @@ REST 连接器支持所有能运行 Node.js 的平台。 ### 使用 npm 安装 - + ```bash @@ -124,7 +124,7 @@ node nodejsChecker.js host=localhost 请选择使用一种连接器。 - + 安装并引用 `@tdengine/client` 包。 From 129f494e7ec03be1ada6a64ce3bade5688b0a017 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 29 Sep 2022 16:34:18 +0800 Subject: [PATCH 28/40] docs: add table name customization note (#17153) --- docs/en/20-third-party/03-telegraf.md | 20 +++++++++++++++----- docs/zh/20-third-party/03-telegraf.md | 20 +++++++++++++++----- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/docs/en/20-third-party/03-telegraf.md b/docs/en/20-third-party/03-telegraf.md index 6a7aac322f..e5c6d6f254 100644 --- a/docs/en/20-third-party/03-telegraf.md +++ b/docs/en/20-third-party/03-telegraf.md @@ -15,6 +15,7 @@ To write Telegraf data to TDengine requires the following preparations. - The TDengine cluster is deployed and functioning properly - taosAdapter is installed and running properly. Please refer to the [taosAdapter manual](/reference/taosadapter) for details. - Telegraf has been installed. Please refer to the [official documentation](https://docs.influxdata.com/telegraf/v1.22/install/) for Telegraf installation. +- Telegraf collects the running status measurements of current system. You can enable [input plugins](https://docs.influxdata.com/telegraf/v1.22/plugins/) to insert [other formats](https://docs.influxdata.com/telegraf/v1.24/data_formats/input/) data to Telegraf then forward to TDengine. ## Configuration steps @@ -31,11 +32,12 @@ Use TDengine CLI to verify Telegraf correctly writing data to TDengine and read ``` taos> show databases; - name | created_time | ntables | vgroups | replica | quorum | days | keep | cache(MB) | blocks | minrows | maxrows | wallevel | fsync | comp | cachelast | precision | update | status | -==================================================================================================================================================================================================================================================================================== - telegraf | 2022-04-20 08:47:53.488 | 22 | 1 | 1 | 1 | 10 | 3650 | 16 | 6 | 100 | 4096 | 1 | 3000 | 2 | 0 | ns | 2 | ready | - log | 2022-04-20 07:19:50.260 | 9 | 1 | 1 | 1 | 10 | 3650 | 16 | 6 | 100 | 4096 | 1 | 3000 | 2 | 0 | ms | 0 | ready | -Query OK, 2 row(s) in set (0.002401s) + name | +================================= + information_schema | + performance_schema | + telegraf | +Query OK, 3 rows in database (0.010568s) taos> use telegraf; Database changed. @@ -65,3 +67,11 @@ taos> select * from telegraf.system limit 10; | Query OK, 3 row(s) in set (0.013269s) ``` + +:::note + +- TDengine take influxdb format data and create unique ID for table names by the rule. +The user can configure `smlChildTableName` paramter to generate specified table names if he/she needs. And he/she also need to insert data with specified data format. +For example, Add `smlChildTableName=tname` in the taos.cfg file. Insert data `st,tname=cpu1,t1=4 c1=3 1626006833639000000` then the table name will be cpu1. If there are multiple lines has same tname but different tag_set, the first line's tag_set will be used to automatically creating table and ignore other lines. Please refer to [TDengine Schemaless](/reference/schemaless/#Schemaless-Line-Protocol) +::: + diff --git a/docs/zh/20-third-party/03-telegraf.md b/docs/zh/20-third-party/03-telegraf.md index 84883e665a..71bb1b3885 100644 --- a/docs/zh/20-third-party/03-telegraf.md +++ b/docs/zh/20-third-party/03-telegraf.md @@ -16,6 +16,7 @@ Telegraf 是一款十分流行的指标采集开源软件。在数据采集和 - TDengine 集群已经部署并正常运行 - taosAdapter 已经安装并正常运行。具体细节请参考 [taosAdapter 的使用手册](/reference/taosadapter) - Telegraf 已经安装。安装 Telegraf 请参考[官方文档](https://docs.influxdata.com/telegraf/v1.22/install/) +- Telegraf 默认采集系统运行状态数据。通过使能[输入插件](https://docs.influxdata.com/telegraf/v1.22/plugins/)方式可以输出[其他格式](https://docs.influxdata.com/telegraf/v1.24/data_formats/input/)的数据到 Telegraf 再写入到 TDengine中。 ## 配置步骤 @@ -32,11 +33,12 @@ sudo systemctl restart telegraf ``` taos> show databases; - name | created_time | ntables | vgroups | replica | quorum | days | keep | cache(MB) | blocks | minrows | maxrows | wallevel | fsync | comp | cachelast | precision | update | status | -==================================================================================================================================================================================================================================================================================== - telegraf | 2022-04-20 08:47:53.488 | 22 | 1 | 1 | 1 | 10 | 3650 | 16 | 6 | 100 | 4096 | 1 | 3000 | 2 | 0 | ns | 2 | ready | - log | 2022-04-20 07:19:50.260 | 9 | 1 | 1 | 1 | 10 | 3650 | 16 | 6 | 100 | 4096 | 1 | 3000 | 2 | 0 | ms | 0 | ready | -Query OK, 2 row(s) in set (0.002401s) + name | +================================= + information_schema | + performance_schema | + telegraf | +Query OK, 3 rows in database (0.010568s) taos> use telegraf; Database changed. @@ -66,3 +68,11 @@ taos> select * from telegraf.system limit 10; | Query OK, 3 row(s) in set (0.013269s) ``` + +:::note + +- TDengine 接收 influxdb 格式数据默认生成的子表名是根据规则生成的唯一 ID 值。 +用户如需指定生成的表名,可以通过在 taos.cfg 里配置 smlChildTableName 参数来指定。如果通过控制输入数据格式,即可利用 TDengine 这个功能指定生成的表名。 +举例如下:配置 smlChildTableName=tname 插入数据为 st,tname=cpu1,t1=4 c1=3 1626006833639000000 则创建的表名为 cpu1。如果多行数据 tname 相同,但是后面的 tag_set 不同,则使用第一行自动建表时指定的 tag_set,其他的行会忽略)。[TDengine 无模式写入参考指南](/reference/schemaless/#无模式写入行协议) +::: + From 363f062a85a7c23d2303ae28b08893bf85e08db1 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Thu, 29 Sep 2022 16:59:20 +0800 Subject: [PATCH 29/40] fix(query): fix tbname mismatch with multiple rows output functions when used with group by/partition by tbname. TD-19273 --- source/libs/executor/src/executorimpl.c | 8 ++++++++ source/libs/function/src/builtinsimpl.c | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index 9917791312..8f76a3d72f 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -1273,6 +1273,14 @@ static void doCopyResultToDataBlock(SExprInfo* pExprInfo, int32_t numOfExprs, SR pCtx[j].resultInfo = getResultEntryInfo(pRow, j, rowEntryOffset); if (pCtx[j].fpSet.finalize) { + if (strcmp(pCtx[j].pExpr->pExpr->_function.functionName, "_group_key") == 0) { + // for groupkey along with functions output multiple lines(e.g. Histogram) + // need to fill groupkey result for each output row. + if (pCtx[j].resultInfo->numOfRes != 0) { + pCtx[j].resultInfo->numOfRes = pRow->numOfRows; + } + } + int32_t code = pCtx[j].fpSet.finalize(&pCtx[j], pBlock); if (TAOS_FAILED(code)) { qError("%s build result data block error, code %s", GET_TASKID(pTaskInfo), tstrerror(code)); diff --git a/source/libs/function/src/builtinsimpl.c b/source/libs/function/src/builtinsimpl.c index a8d51905ab..42512d3a11 100644 --- a/source/libs/function/src/builtinsimpl.c +++ b/source/libs/function/src/builtinsimpl.c @@ -6157,7 +6157,10 @@ int32_t groupKeyFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) { SGroupKeyInfo* pInfo = GET_ROWCELL_INTERBUF(pResInfo); if (pInfo->hasResult) { - colDataAppend(pCol, pBlock->info.rows, pInfo->data, pInfo->isNull ? true : false); + int32_t currentRow = pBlock->info.rows; + for (; currentRow < pBlock->info.rows + pResInfo->numOfRes; ++currentRow) { + colDataAppend(pCol, currentRow, pInfo->data, pInfo->isNull ? true : false); + } } else { pResInfo->numOfRes = 0; } From 075d8c4933b36145a17d2072dcc97c5dd6171555 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Thu, 29 Sep 2022 16:59:47 +0800 Subject: [PATCH 30/40] doc: change default tab to rest --- docs/zh/08-connector/30-python.mdx | 10 +++++----- docs/zh/08-connector/40-csharp.mdx | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/zh/08-connector/30-python.mdx b/docs/zh/08-connector/30-python.mdx index 2e80da4283..c70677f816 100644 --- a/docs/zh/08-connector/30-python.mdx +++ b/docs/zh/08-connector/30-python.mdx @@ -80,7 +80,7 @@ pip3 install git+https://github.com/taosdata/taos-connector-python.git ### 安装验证 - + 对于原生连接,需要验证客户端驱动和 Python 连接器本身是否都正确安装。如果能成功导入 `taos` 模块,则说明已经正确安装了客户端驱动和 Python 连接器。可在 Python 交互式 Shell 中输入: @@ -118,7 +118,7 @@ Requirement already satisfied: taospy in c:\users\username\appdata\local\program 在用连接器建立连接之前,建议先测试本地 TDengine CLI 到 TDengine 集群的连通性。 - + 请确保 TDengine 集群已经启动, 且集群中机器的 FQDN (如果启动的是单机版,FQDN 默认为 hostname)在本机能够解析, 可用 `ping` 命令进行测试: @@ -173,7 +173,7 @@ curl -u root:taosdata http://:/rest/sql -d "select server_version()" 以下示例代码假设 TDengine 安装在本机, 且 FQDN 和 serverPort 都使用了默认配置。 - + ```python @@ -219,7 +219,7 @@ curl -u root:taosdata http://:/rest/sql -d "select server_version()" ### 基本使用 - + ##### TaosConnection 类的使用 @@ -289,7 +289,7 @@ TaosCursor 类使用原生连接进行写入、查询操作。在客户端多线 ### 与 pandas 一起使用 - + ```python diff --git a/docs/zh/08-connector/40-csharp.mdx b/docs/zh/08-connector/40-csharp.mdx index e99f41ae9c..70c0382080 100644 --- a/docs/zh/08-connector/40-csharp.mdx +++ b/docs/zh/08-connector/40-csharp.mdx @@ -35,7 +35,7 @@ import CSAsyncQuery from "../07-develop/04-query-data/_cs_async.mdx" ## 支持的功能特性 - + @@ -96,7 +96,7 @@ dotnet add exmaple.csproj reference src/TDengine.csproj ## 建立连接 - + @@ -171,7 +171,7 @@ namespace TDengineExample #### SQL 写入 - + @@ -203,7 +203,7 @@ namespace TDengineExample #### 参数绑定 - + @@ -227,7 +227,7 @@ namespace TDengineExample #### 同步查询 - + From 3abf6abad6da88c71a7803bf6898146e40c77dcc Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Thu, 29 Sep 2022 16:59:20 +0800 Subject: [PATCH 31/40] fix(query): fix group_key output mismatch with multiple rows output functions TD-19273 --- source/libs/executor/src/executorimpl.c | 8 ++++++++ source/libs/function/src/builtinsimpl.c | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index 9917791312..8f76a3d72f 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -1273,6 +1273,14 @@ static void doCopyResultToDataBlock(SExprInfo* pExprInfo, int32_t numOfExprs, SR pCtx[j].resultInfo = getResultEntryInfo(pRow, j, rowEntryOffset); if (pCtx[j].fpSet.finalize) { + if (strcmp(pCtx[j].pExpr->pExpr->_function.functionName, "_group_key") == 0) { + // for groupkey along with functions output multiple lines(e.g. Histogram) + // need to fill groupkey result for each output row. + if (pCtx[j].resultInfo->numOfRes != 0) { + pCtx[j].resultInfo->numOfRes = pRow->numOfRows; + } + } + int32_t code = pCtx[j].fpSet.finalize(&pCtx[j], pBlock); if (TAOS_FAILED(code)) { qError("%s build result data block error, code %s", GET_TASKID(pTaskInfo), tstrerror(code)); diff --git a/source/libs/function/src/builtinsimpl.c b/source/libs/function/src/builtinsimpl.c index a8d51905ab..42512d3a11 100644 --- a/source/libs/function/src/builtinsimpl.c +++ b/source/libs/function/src/builtinsimpl.c @@ -6157,7 +6157,10 @@ int32_t groupKeyFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) { SGroupKeyInfo* pInfo = GET_ROWCELL_INTERBUF(pResInfo); if (pInfo->hasResult) { - colDataAppend(pCol, pBlock->info.rows, pInfo->data, pInfo->isNull ? true : false); + int32_t currentRow = pBlock->info.rows; + for (; currentRow < pBlock->info.rows + pResInfo->numOfRes; ++currentRow) { + colDataAppend(pCol, currentRow, pInfo->data, pInfo->isNull ? true : false); + } } else { pResInfo->numOfRes = 0; } From 3af613ac7356fb4095058bd5603b2cd627f1d792 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Thu, 29 Sep 2022 17:04:31 +0800 Subject: [PATCH 32/40] Merge branch 'fix/TD-19273' of github.com:taosdata/TDengine into fix/TD-19273 --- source/libs/executor/src/executorimpl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index 8f76a3d72f..ff28199712 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -1274,8 +1274,8 @@ static void doCopyResultToDataBlock(SExprInfo* pExprInfo, int32_t numOfExprs, SR pCtx[j].resultInfo = getResultEntryInfo(pRow, j, rowEntryOffset); if (pCtx[j].fpSet.finalize) { if (strcmp(pCtx[j].pExpr->pExpr->_function.functionName, "_group_key") == 0) { - // for groupkey along with functions output multiple lines(e.g. Histogram) - // need to fill groupkey result for each output row. + // for groupkey along with functions that output multiple lines(e.g. Histogram) + // need to match groupkey result for each output row of that function. if (pCtx[j].resultInfo->numOfRes != 0) { pCtx[j].resultInfo->numOfRes = pRow->numOfRows; } From 19be38dcca8424bb18b8286f1d155398d647977c Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Thu, 29 Sep 2022 17:09:25 +0800 Subject: [PATCH 33/40] doc: change default to rest --- docs/en/14-reference/03-connector/07-python.mdx | 10 +++++----- docs/en/14-reference/03-connector/09-csharp.mdx | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/en/14-reference/03-connector/07-python.mdx b/docs/en/14-reference/03-connector/07-python.mdx index 5fdb42a2cd..304bab6e38 100644 --- a/docs/en/14-reference/03-connector/07-python.mdx +++ b/docs/en/14-reference/03-connector/07-python.mdx @@ -80,7 +80,7 @@ pip3 install git+https://github.com/taosdata/taos-connector-python.git ### Verify - + For native connection, you need to verify that both the client driver and the Python connector itself are installed correctly. The client driver and Python connector have been installed properly if you can successfully import the `taos` module. In the Python Interactive Shell, you can type. @@ -118,7 +118,7 @@ Requirement already satisfied: taospy in c:\users\username\appdata\local\program Before establishing a connection with the connector, we recommend testing the connectivity of the local TDengine CLI to the TDengine cluster. - + Ensure that the TDengine instance is up and that the FQDN of the machines in the cluster (the FQDN defaults to hostname if you are starting a standalone version) can be resolved locally, by testing with the `ping` command. @@ -173,7 +173,7 @@ If the test is successful, it will output the server version information, e.g. The following example code assumes that TDengine is installed locally and that the default configuration is used for both FQDN and serverPort. - + ```python @@ -219,7 +219,7 @@ All arguments to the `connect()` function are optional keyword arguments. The fo ### Basic Usage - + ##### TaosConnection class @@ -289,7 +289,7 @@ For a more detailed description of the `sql()` method, please refer to [RestClie ### Used with pandas - + ```python diff --git a/docs/en/14-reference/03-connector/09-csharp.mdx b/docs/en/14-reference/03-connector/09-csharp.mdx index 87a10e17ca..85514f58ac 100644 --- a/docs/en/14-reference/03-connector/09-csharp.mdx +++ b/docs/en/14-reference/03-connector/09-csharp.mdx @@ -97,7 +97,7 @@ dotnet add exmaple.csproj reference src/TDengine.csproj ## Establish a Connection - + @@ -173,7 +173,7 @@ ws://localhost:6041/test #### SQL Write - + @@ -204,7 +204,7 @@ ws://localhost:6041/test #### Parameter Binding - + @@ -227,7 +227,7 @@ ws://localhost:6041/test #### Synchronous Query - + From f90280ba95482a5a872ddc2da512fb8de4a1b89c Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 29 Sep 2022 17:09:51 +0800 Subject: [PATCH 34/40] docs: fix a typo in telegraf doc (#17155) * docs: add table name customization note * docs: fix a typo --- docs/en/20-third-party/03-telegraf.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/20-third-party/03-telegraf.md b/docs/en/20-third-party/03-telegraf.md index e5c6d6f254..ab06ab0379 100644 --- a/docs/en/20-third-party/03-telegraf.md +++ b/docs/en/20-third-party/03-telegraf.md @@ -71,7 +71,7 @@ Query OK, 3 row(s) in set (0.013269s) :::note - TDengine take influxdb format data and create unique ID for table names by the rule. -The user can configure `smlChildTableName` paramter to generate specified table names if he/she needs. And he/she also need to insert data with specified data format. +The user can configure `smlChildTableName` parameter to generate specified table names if he/she needs. And he/she also need to insert data with specified data format. For example, Add `smlChildTableName=tname` in the taos.cfg file. Insert data `st,tname=cpu1,t1=4 c1=3 1626006833639000000` then the table name will be cpu1. If there are multiple lines has same tname but different tag_set, the first line's tag_set will be used to automatically creating table and ignore other lines. Please refer to [TDengine Schemaless](/reference/schemaless/#Schemaless-Line-Protocol) ::: From 768a04d17155519a956ef7a0ea8e6293e56f7ed7 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Thu, 29 Sep 2022 17:14:47 +0800 Subject: [PATCH 35/40] doc: fix duplicate tabItem value --- docs/en/14-reference/03-connector/07-python.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/14-reference/03-connector/07-python.mdx b/docs/en/14-reference/03-connector/07-python.mdx index 304bab6e38..1e7945bfd2 100644 --- a/docs/en/14-reference/03-connector/07-python.mdx +++ b/docs/en/14-reference/03-connector/07-python.mdx @@ -81,7 +81,7 @@ pip3 install git+https://github.com/taosdata/taos-connector-python.git ### Verify - + For native connection, you need to verify that both the client driver and the Python connector itself are installed correctly. The client driver and Python connector have been installed properly if you can successfully import the `taos` module. In the Python Interactive Shell, you can type. From 59bb3d1475f61857d25dc7d4616fad37a3785b4c Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Thu, 29 Sep 2022 17:21:28 +0800 Subject: [PATCH 36/40] build: add websocket build --- docs/en/28-releases/01-tdengine.md | 4 ++++ docs/en/28-releases/02-tools.md | 4 ++++ docs/zh/28-releases/01-tdengine.md | 4 ++++ docs/zh/28-releases/02-tools.md | 4 ++++ packaging/release.sh | 4 ++-- 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/en/28-releases/01-tdengine.md b/docs/en/28-releases/01-tdengine.md index a65a2fff63..808a21474e 100644 --- a/docs/en/28-releases/01-tdengine.md +++ b/docs/en/28-releases/01-tdengine.md @@ -6,6 +6,10 @@ description: TDengine release history, Release Notes and download links. import Release from "/components/ReleaseV3"; +## 3.0.1.4 + + + ## 3.0.1.3 diff --git a/docs/en/28-releases/02-tools.md b/docs/en/28-releases/02-tools.md index a83723bff7..5d6693ae73 100644 --- a/docs/en/28-releases/02-tools.md +++ b/docs/en/28-releases/02-tools.md @@ -6,6 +6,10 @@ description: taosTools release history, Release Notes, download links. import Release from "/components/ReleaseV3"; +## 2.2.4 + + + ## 2.2.3 diff --git a/docs/zh/28-releases/01-tdengine.md b/docs/zh/28-releases/01-tdengine.md index 597e98238b..59e0d0f761 100644 --- a/docs/zh/28-releases/01-tdengine.md +++ b/docs/zh/28-releases/01-tdengine.md @@ -6,6 +6,10 @@ description: TDengine 发布历史、Release Notes 及下载链接 import Release from "/components/ReleaseV3"; +## 3.0.1.4 + + + ## 3.0.1.3 diff --git a/docs/zh/28-releases/02-tools.md b/docs/zh/28-releases/02-tools.md index 8604885d3c..83ccdec387 100644 --- a/docs/zh/28-releases/02-tools.md +++ b/docs/zh/28-releases/02-tools.md @@ -6,6 +6,10 @@ description: taosTools 的发布历史、Release Notes 和下载链接 import Release from "/components/ReleaseV3"; +## 2.2.4 + + + ## 2.2.3 diff --git a/packaging/release.sh b/packaging/release.sh index 2452ee1813..9ebbc50a84 100755 --- a/packaging/release.sh +++ b/packaging/release.sh @@ -219,12 +219,12 @@ fi if [[ "$cpuType" == "x64" ]] || [[ "$cpuType" == "aarch64" ]] || [[ "$cpuType" == "aarch32" ]] || [[ "$cpuType" == "arm64" ]] || [[ "$cpuType" == "arm32" ]] || [[ "$cpuType" == "mips64" ]]; then if [ "$verMode" != "cluster" ]; then # community-version compile - cmake ../ -DCPUTYPE=${cpuType} -DOSTYPE=${osType} -DSOMODE=${soMode} -DDBNAME=${dbName} -DVERTYPE=${verType} -DVERDATE="${build_time}" -DGITINFO=${gitinfo} -DGITINFOI=${gitinfoOfInternal} -DVERNUMBER=${verNumber} -DVERCOMPATIBLE=${verNumberComp} -DPAGMODE=${pagMode} -DBUILD_HTTP=${BUILD_HTTP} -DBUILD_TOOLS=${BUILD_TOOLS} ${allocator_macro} + cmake ../ -DCPUTYPE=${cpuType} -DWEBSOCKET=true -DOSTYPE=${osType} -DSOMODE=${soMode} -DDBNAME=${dbName} -DVERTYPE=${verType} -DVERDATE="${build_time}" -DGITINFO=${gitinfo} -DGITINFOI=${gitinfoOfInternal} -DVERNUMBER=${verNumber} -DVERCOMPATIBLE=${verNumberComp} -DPAGMODE=${pagMode} -DBUILD_HTTP=${BUILD_HTTP} -DBUILD_TOOLS=${BUILD_TOOLS} ${allocator_macro} else if [[ "$dbName" != "taos" ]]; then replace_enterprise_$dbName fi - cmake ../../ -DCPUTYPE=${cpuType} -DOSTYPE=${osType} -DSOMODE=${soMode} -DDBNAME=${dbName} -DVERTYPE=${verType} -DVERDATE="${build_time}" -DGITINFO=${gitinfo} -DGITINFOI=${gitinfoOfInternal} -DVERNUMBER=${verNumber} -DVERCOMPATIBLE=${verNumberComp} -DBUILD_HTTP=${BUILD_HTTP} -DBUILD_TOOLS=${BUILD_TOOLS} ${allocator_macro} + cmake ../../ -DCPUTYPE=${cpuType} -DWEBSOCKET=true -DOSTYPE=${osType} -DSOMODE=${soMode} -DDBNAME=${dbName} -DVERTYPE=${verType} -DVERDATE="${build_time}" -DGITINFO=${gitinfo} -DGITINFOI=${gitinfoOfInternal} -DVERNUMBER=${verNumber} -DVERCOMPATIBLE=${verNumberComp} -DBUILD_HTTP=${BUILD_HTTP} -DBUILD_TOOLS=${BUILD_TOOLS} ${allocator_macro} fi else echo "input cpuType=${cpuType} error!!!" From 61f92a24cbb8b60b13adf6ca77387d3426004e9c Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 29 Sep 2022 17:47:24 +0800 Subject: [PATCH 37/40] docs: add prometheus sub-table naming by rule note (#17158) --- docs/en/20-third-party/02-prometheus.md | 4 ++++ docs/zh/20-third-party/02-prometheus.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/en/20-third-party/02-prometheus.md b/docs/en/20-third-party/02-prometheus.md index 0fb41a1696..c46b0381b9 100644 --- a/docs/en/20-third-party/02-prometheus.md +++ b/docs/en/20-third-party/02-prometheus.md @@ -89,3 +89,7 @@ VALUE TIMESTAMP ``` +:::note + +- TDengine will automatically create unique IDs for sub-table names by the rule. +::: diff --git a/docs/zh/20-third-party/02-prometheus.md b/docs/zh/20-third-party/02-prometheus.md index eb6c3bf1d0..59bab1823a 100644 --- a/docs/zh/20-third-party/02-prometheus.md +++ b/docs/zh/20-third-party/02-prometheus.md @@ -88,3 +88,7 @@ VALUE TIMESTAMP ``` +:::note + +- TDengine 默认生成的子表名是根据规则生成的唯一 ID 值。 +::: From e8d2a30aa57ee212ec050cac9bafd06e6df9df30 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 29 Sep 2022 18:14:51 +0800 Subject: [PATCH 38/40] docs: add sub-table name by rule note (#17160) --- docs/en/20-third-party/05-collectd.md | 4 ++++ docs/zh/20-third-party/05-collectd.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/en/20-third-party/05-collectd.md b/docs/en/20-third-party/05-collectd.md index db62f2ecd1..295c08c307 100644 --- a/docs/en/20-third-party/05-collectd.md +++ b/docs/en/20-third-party/05-collectd.md @@ -72,3 +72,7 @@ taos> select * from collectd.memory_value limit 10; Query OK, 10 row(s) in set (0.010348s) ``` +:::note + +- TDengine will automatically create unique IDs for sub-table names by the rule. +::: diff --git a/docs/zh/20-third-party/05-collectd.md b/docs/zh/20-third-party/05-collectd.md index cc2235f260..d55b981fb9 100644 --- a/docs/zh/20-third-party/05-collectd.md +++ b/docs/zh/20-third-party/05-collectd.md @@ -72,3 +72,7 @@ taos> select * from collectd.memory_value limit 10; Query OK, 10 row(s) in set (0.010348s) ``` +:::note + +- TDengine 默认生成的子表名是根据规则生成的唯一 ID 值。 +::: From 8aa5100dfd5a561d9581246a37b1785e60bfa094 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 29 Sep 2022 19:14:45 +0800 Subject: [PATCH 39/40] docs: icinga2 sub-tbname by rule note (#17161) --- docs/en/20-third-party/07-icinga2.md | 16 +++++++++++----- docs/zh/20-third-party/07-icinga2.md | 17 ++++++++++++----- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/docs/en/20-third-party/07-icinga2.md b/docs/en/20-third-party/07-icinga2.md index b27196dfe3..e98f209803 100644 --- a/docs/en/20-third-party/07-icinga2.md +++ b/docs/en/20-third-party/07-icinga2.md @@ -36,11 +36,12 @@ After waiting about 10 seconds, use the TDengine CLI to query TDengine to verify ``` taos> show databases; - name | created_time | ntables | vgroups | replica | quorum | days | keep | cache(MB) | blocks | minrows | maxrows | wallevel | fsync | comp | cachelast | precision | update | status | -==================================================================================================================================================================================================================================================================================== - log | 2022-04-20 07:19:50.260 | 11 | 1 | 1 | 1 | 10 | 3650 | 16 | 6 | 100 | 4096 | 1 | 3000 | 2 | 0 | ms | 0 | ready | - icinga2 | 2022-04-20 12:11:39.697 | 13 | 1 | 1 | 1 | 10 | 3650 | 16 | 6 | 100 | 4096 | 1 | 3000 | 2 | 0 | ns | 2 | ready | -Query OK, 2 row(s) in set (0.001867s) + name | +================================= + information_schema | + performance_schema | + icinga2 | +Query OK, 3 row(s) in set (0.001867s) taos> use icinga2; Database changed. @@ -72,3 +73,8 @@ taos> show stables; icinga.service.users.state | 2022-04-20 12:11:39.704 | 2 | 1 | 1 | Query OK, 22 row(s) in set (0.002317s) ``` + +:::note + +- TDengine will automatically create unique IDs for sub-table names by the rule. +::: diff --git a/docs/zh/20-third-party/07-icinga2.md b/docs/zh/20-third-party/07-icinga2.md index 06ead57655..03d733a326 100644 --- a/docs/zh/20-third-party/07-icinga2.md +++ b/docs/zh/20-third-party/07-icinga2.md @@ -37,11 +37,12 @@ sudo systemctl restart icinga2 ``` taos> show databases; - name | created_time | ntables | vgroups | replica | quorum | days | keep | cache(MB) | blocks | minrows | maxrows | wallevel | fsync | comp | cachelast | precision | update | status | -==================================================================================================================================================================================================================================================================================== - log | 2022-04-20 07:19:50.260 | 11 | 1 | 1 | 1 | 10 | 3650 | 16 | 6 | 100 | 4096 | 1 | 3000 | 2 | 0 | ms | 0 | ready | - icinga2 | 2022-04-20 12:11:39.697 | 13 | 1 | 1 | 1 | 10 | 3650 | 16 | 6 | 100 | 4096 | 1 | 3000 | 2 | 0 | ns | 2 | ready | -Query OK, 2 row(s) in set (0.001867s) + name | +================================= + information_schema | + performance_schema | + icinga2 | +Query OK, 3 row(s) in set (0.001867s) taos> use icinga2; Database changed. @@ -73,3 +74,9 @@ taos> show stables; icinga.service.users.state | 2022-04-20 12:11:39.704 | 2 | 1 | 1 | Query OK, 22 row(s) in set (0.002317s) ``` + + +:::note + +- TDengine 默认生成的子表名是根据规则生成的唯一 ID 值。 +::: From e94646ca704f4a91b059fb5adbf6c5c1d5b51b33 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 29 Sep 2022 19:41:54 +0800 Subject: [PATCH 40/40] fix: coverity issues --- include/libs/sync/sync.h | 2 +- source/dnode/mgmt/node_mgmt/src/dmProc.c | 3 +++ source/dnode/mgmt/node_mgmt/src/dmTransport.c | 2 +- source/dnode/mnode/impl/src/mndAcct.c | 1 + source/dnode/mnode/impl/src/mndCluster.c | 2 +- source/dnode/mnode/impl/src/mndSync.c | 17 +++++++++++------ source/dnode/mnode/impl/src/mndTopic.c | 2 +- source/dnode/mnode/impl/src/mndTrans.c | 6 ++++-- source/dnode/mnode/impl/src/mndUser.c | 1 + source/dnode/mnode/impl/src/mndVgroup.c | 8 ++++---- source/dnode/vnode/src/vnd/vnodeSync.c | 8 ++++---- source/libs/sync/src/syncMain.c | 2 +- .../sync/test/syncConfigChangeSnapshotTest.cpp | 4 ++-- source/libs/sync/test/syncConfigChangeTest.cpp | 4 ++-- source/libs/sync/test/syncTestTool.cpp | 4 ++-- 15 files changed, 39 insertions(+), 27 deletions(-) diff --git a/include/libs/sync/sync.h b/include/libs/sync/sync.h index 285e079b3e..58c9b30890 100644 --- a/include/libs/sync/sync.h +++ b/include/libs/sync/sync.h @@ -132,7 +132,7 @@ typedef struct SSyncFSM { void (*FpRollBackCb)(struct SSyncFSM* pFsm, const SRpcMsg* pMsg, SFsmCbMeta cbMeta); void (*FpRestoreFinishCb)(struct SSyncFSM* pFsm); - void (*FpReConfigCb)(struct SSyncFSM* pFsm, const SRpcMsg* pMsg, SReConfigCbMeta cbMeta); + void (*FpReConfigCb)(struct SSyncFSM* pFsm, const SRpcMsg* pMsg, SReConfigCbMeta *cbMeta); void (*FpLeaderTransferCb)(struct SSyncFSM* pFsm, const SRpcMsg* pMsg, SFsmCbMeta cbMeta); void (*FpBecomeLeaderCb)(struct SSyncFSM* pFsm); diff --git a/source/dnode/mgmt/node_mgmt/src/dmProc.c b/source/dnode/mgmt/node_mgmt/src/dmProc.c index cbf13924d7..bb71044dd6 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmProc.c +++ b/source/dnode/mgmt/node_mgmt/src/dmProc.c @@ -74,11 +74,14 @@ static SProcQueue *dmInitProcQueue(SProc *proc, char *ptr, int32_t size) { } tstrncpy(queue->name, proc->name, sizeof(queue->name)); + + taosThreadMutexLock(&queue->mutex); queue->head = 0; queue->tail = 0; queue->total = bufSize; queue->avail = bufSize; queue->items = 0; + taosThreadMutexUnlock(&queue->mutex); } return queue; diff --git a/source/dnode/mgmt/node_mgmt/src/dmTransport.c b/source/dnode/mgmt/node_mgmt/src/dmTransport.c index f57943b9dd..e83f1f7cab 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmTransport.c +++ b/source/dnode/mgmt/node_mgmt/src/dmTransport.c @@ -301,7 +301,7 @@ int32_t dmInitServer(SDnode *pDnode) { SDnodeTrans *pTrans = &pDnode->trans; SRpcInit rpcInit = {0}; - strncpy(rpcInit.localFqdn, tsLocalFqdn, TSDB_FQDN_LEN); + tstrncpy(rpcInit.localFqdn, tsLocalFqdn, TSDB_FQDN_LEN); rpcInit.localPort = tsServerPort; rpcInit.label = "DND-S"; rpcInit.numOfThreads = tsNumOfRpcThreads; diff --git a/source/dnode/mnode/impl/src/mndAcct.c b/source/dnode/mnode/impl/src/mndAcct.c index 5279a86d83..65857367f9 100644 --- a/source/dnode/mnode/impl/src/mndAcct.c +++ b/source/dnode/mnode/impl/src/mndAcct.c @@ -83,6 +83,7 @@ static int32_t mndCreateDefaultAcct(SMnode *pMnode) { STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, NULL, "create-acct"); if (pTrans == NULL) { + sdbFreeRaw(pRaw); mError("acct:%s, failed to create since %s", acctObj.acct, terrstr()); return -1; } diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c index 70c9374821..96748b3620 100644 --- a/source/dnode/mnode/impl/src/mndCluster.c +++ b/source/dnode/mnode/impl/src/mndCluster.c @@ -315,7 +315,7 @@ static int32_t mndProcessUptimeTimer(SRpcMsg *pReq) { return 0; } - mInfo("update cluster uptime to %" PRId64, clusterObj.upTime); + mInfo("update cluster uptime to %d", clusterObj.upTime); STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "update-uptime"); if (pTrans == NULL) return -1; diff --git a/source/dnode/mnode/impl/src/mndSync.c b/source/dnode/mnode/impl/src/mndSync.c index 3655289f99..aabde3fed2 100644 --- a/source/dnode/mnode/impl/src/mndSync.c +++ b/source/dnode/mnode/impl/src/mndSync.c @@ -68,7 +68,7 @@ void mndSyncCommitMsg(struct SSyncFSM *pFsm, const SRpcMsg *pMsg, SFsmCbMeta cbM if (pMgmt->errCode != 0) { mError("trans:%d, failed to propose since %s, post sem", transId, tstrerror(pMgmt->errCode)); } else { - mInfo("trans:%d, is proposed and post sem", transId, tstrerror(pMgmt->errCode)); + mInfo("trans:%d, is proposed and post sem", transId); } pMgmt->transId = 0; taosWUnLockLatch(&pMgmt->lock); @@ -113,13 +113,13 @@ void mndRestoreFinish(struct SSyncFSM *pFsm) { } } -void mndReConfig(struct SSyncFSM *pFsm, const SRpcMsg *pMsg, SReConfigCbMeta cbMeta) { +void mndReConfig(struct SSyncFSM *pFsm, const SRpcMsg *pMsg, SReConfigCbMeta *cbMeta) { SMnode *pMnode = pFsm->data; SSyncMgmt *pMgmt = &pMnode->syncMgmt; - pMgmt->errCode = cbMeta.code; + pMgmt->errCode = cbMeta->code; mInfo("trans:-1, sync reconfig is proposed, saved:%d code:0x%x, index:%" PRId64 " term:%" PRId64, pMgmt->transId, - cbMeta.code, cbMeta.index, cbMeta.term); + cbMeta->code, cbMeta->index, cbMeta->term); taosWLockLatch(&pMgmt->lock); if (pMgmt->transId == -1) { @@ -127,7 +127,7 @@ void mndReConfig(struct SSyncFSM *pFsm, const SRpcMsg *pMsg, SReConfigCbMeta cbM mError("trans:-1, failed to propose sync reconfig since %s, post sem", tstrerror(pMgmt->errCode)); } else { mInfo("trans:-1, sync reconfig is proposed, saved:%d code:0x%x, index:%" PRId64 " term:%" PRId64 " post sem", - pMgmt->transId, cbMeta.code, cbMeta.index, cbMeta.term); + pMgmt->transId, cbMeta->code, cbMeta->index, cbMeta->term); } pMgmt->transId = 0; tsem_post(&pMgmt->syncSem); @@ -271,6 +271,11 @@ void mndCleanupSync(SMnode *pMnode) { int32_t mndSyncPropose(SMnode *pMnode, SSdbRaw *pRaw, int32_t transId) { SSyncMgmt *pMgmt = &pMnode->syncMgmt; SRpcMsg req = {.msgType = TDMT_MND_APPLY_MSG, .contLen = sdbGetRawTotalSize(pRaw)}; + if (req.contLen <= 0) { + terrno = TSDB_CODE_APP_ERROR; + return -1; + } + req.pCont = rpcMallocCont(req.contLen); if (req.pCont == NULL) return -1; memcpy(req.pCont, pRaw, req.contLen); @@ -278,7 +283,7 @@ int32_t mndSyncPropose(SMnode *pMnode, SSdbRaw *pRaw, int32_t transId) { pMgmt->errCode = 0; taosWLockLatch(&pMgmt->lock); if (pMgmt->transId != 0) { - mError("trans:%d, can't be proposed since trans:%s alrady waiting for confirm", transId, pMgmt->transId); + mError("trans:%d, can't be proposed since trans:%d alrady waiting for confirm", transId, pMgmt->transId); taosWUnLockLatch(&pMgmt->lock); terrno = TSDB_CODE_APP_NOT_READY; return -1; diff --git a/source/dnode/mnode/impl/src/mndTopic.c b/source/dnode/mnode/impl/src/mndTopic.c index b9647a28fb..662f524e08 100644 --- a/source/dnode/mnode/impl/src/mndTopic.c +++ b/source/dnode/mnode/impl/src/mndTopic.c @@ -774,7 +774,7 @@ static int32_t mndRetrieveTopic(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl SName n; int32_t cols = 0; - char topicName[TSDB_TOPIC_NAME_LEN + VARSTR_HEADER_SIZE] = {0}; + char topicName[TSDB_TOPIC_NAME_LEN + VARSTR_HEADER_SIZE + 5] = {0}; strcpy(varDataVal(topicName), mndGetDbStr(pTopic->name)); /*tNameFromString(&n, pTopic->name, T_NAME_ACCT | T_NAME_DB);*/ /*tNameGetDbName(&n, varDataVal(topicName));*/ diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c index 9613d924c4..455b71ace9 100644 --- a/source/dnode/mnode/impl/src/mndTrans.c +++ b/source/dnode/mnode/impl/src/mndTrans.c @@ -427,7 +427,7 @@ static SSdbRow *mndTransActionDecode(SSdbRaw *pRaw) { terrno = 0; _OVER: - if (terrno != 0) { + if (terrno != 0 && pTrans != NULL) { mError("trans:%d, failed to parse from raw:%p since %s", pTrans->id, pRaw, terrstr()); mndTransDropData(pTrans); taosMemoryFreeClear(pRow); @@ -629,6 +629,7 @@ STrans *mndTransCreate(SMnode *pMnode, ETrnPolicy policy, ETrnConflct conflict, pTrans->pRpcArray == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; mError("failed to create transaction since %s", terrstr()); + mndTransDrop(pTrans); return NULL; } @@ -1428,6 +1429,7 @@ static bool mndTransPerfromFinishedStage(SMnode *pMnode, STrans *pTrans) { SSdbRaw *pRaw = mndTransActionEncode(pTrans); if (pRaw == NULL) { mError("trans:%d, failed to encode while finish trans since %s", pTrans->id, terrstr()); + return false; } sdbSetRawStatus(pRaw, SDB_STATUS_DROPPED); @@ -1617,7 +1619,7 @@ static int32_t mndRetrieveTrans(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl colDataAppend(pColInfo, numOfRows, (const char *)&pTrans->lastExecTime, false); char lastInfo[TSDB_TRANS_ERROR_LEN + VARSTR_HEADER_SIZE] = {0}; - char detail[TSDB_TRANS_ERROR_LEN] = {0}; + char detail[TSDB_TRANS_ERROR_LEN + 1] = {0}; int32_t len = snprintf(detail, sizeof(detail), "action:%d code:0x%x(%s) ", pTrans->lastAction, pTrans->lastErrorNo & 0xFFFF, tstrerror(pTrans->lastErrorNo)); SEpSet epset = pTrans->lastEpset; diff --git a/source/dnode/mnode/impl/src/mndUser.c b/source/dnode/mnode/impl/src/mndUser.c index 5512fa4107..fecdfb12ba 100644 --- a/source/dnode/mnode/impl/src/mndUser.c +++ b/source/dnode/mnode/impl/src/mndUser.c @@ -83,6 +83,7 @@ static int32_t mndCreateDefaultUser(SMnode *pMnode, char *acct, char *user, char STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, NULL, "create-user"); if (pTrans == NULL) { + sdbFreeRaw(pRaw); mError("user:%s, failed to create since %s", userObj.user, terrstr()); return -1; } diff --git a/source/dnode/mnode/impl/src/mndVgroup.c b/source/dnode/mnode/impl/src/mndVgroup.c index c1bc340819..a0f01f41d8 100644 --- a/source/dnode/mnode/impl/src/mndVgroup.c +++ b/source/dnode/mnode/impl/src/mndVgroup.c @@ -1250,7 +1250,7 @@ static int32_t mndRedistributeVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, mError("db:%s, vgId:%d, no enough memory:%" PRId64 " in dnode:%d avail:%" PRId64 " used:%" PRId64, pVgroup->dbName, pVgroup->vgId, vgMem, pNew1->id, pNew1->memAvail, pNew1->memUsed); terrno = TSDB_CODE_MND_NO_ENOUGH_MEM_IN_DNODE; - return -1; + goto _OVER; } else { pNew1->memUsed += vgMem; } @@ -1272,7 +1272,7 @@ static int32_t mndRedistributeVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, mError("db:%s, vgId:%d, no enough memory:%" PRId64 " in dnode:%d avail:%" PRId64 " used:%" PRId64, pVgroup->dbName, pVgroup->vgId, vgMem, pNew2->id, pNew2->memAvail, pNew2->memUsed); terrno = TSDB_CODE_MND_NO_ENOUGH_MEM_IN_DNODE; - return -1; + goto _OVER; } else { pNew2->memUsed += vgMem; } @@ -1293,7 +1293,7 @@ static int32_t mndRedistributeVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, mError("db:%s, vgId:%d, no enough memory:%" PRId64 " in dnode:%d avail:%" PRId64 " used:%" PRId64, pVgroup->dbName, pVgroup->vgId, vgMem, pNew3->id, pNew3->memAvail, pNew3->memUsed); terrno = TSDB_CODE_MND_NO_ENOUGH_MEM_IN_DNODE; - return -1; + goto _OVER; } else { pNew3->memUsed += vgMem; } @@ -1627,7 +1627,7 @@ static int32_t mndSplitVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, SVgObj } else if (newVg1.replica == 3) { SVnodeGid del1 = {0}; if (mndRemoveVnodeFromVgroup(pMnode, &newVg1, pArray, &del1) != 0) goto _OVER; - if (mndAddSetVnodeStandByAction(pMnode, pTrans, pDb, pVgroup, &del1, true) != 0) return -1; + if (mndAddSetVnodeStandByAction(pMnode, pTrans, pDb, pVgroup, &del1, true) != 0) goto _OVER; if (mndAddAlterVnodeAction(pMnode, pTrans, pDb, &newVg1, TDMT_VND_ALTER_REPLICA) != 0) goto _OVER; if (mndAddDropVnodeAction(pMnode, pTrans, pDb, &newVg1, &del1, true) != 0) goto _OVER; if (mndAddAlterVnodeConfirmAction(pMnode, pTrans, pDb, &newVg1) != 0) goto _OVER; diff --git a/source/dnode/vnode/src/vnd/vnodeSync.c b/source/dnode/vnode/src/vnd/vnodeSync.c index 2c3808a703..cdbdd4b468 100644 --- a/source/dnode/vnode/src/vnd/vnodeSync.c +++ b/source/dnode/vnode/src/vnd/vnodeSync.c @@ -496,16 +496,16 @@ static int32_t vnodeSyncGetSnapshot(SSyncFSM *pFsm, SSnapshot *pSnapshot) { return 0; } -static void vnodeSyncReconfig(struct SSyncFSM *pFsm, const SRpcMsg *pMsg, SReConfigCbMeta cbMeta) { +static void vnodeSyncReconfig(struct SSyncFSM *pFsm, const SRpcMsg *pMsg, SReConfigCbMeta *cbMeta) { SVnode *pVnode = pFsm->data; SRpcMsg rpcMsg = {.msgType = pMsg->msgType, .contLen = pMsg->contLen}; - syncGetAndDelRespRpc(pVnode->sync, cbMeta.newCfgSeqNum, &rpcMsg.info); - rpcMsg.info.conn.applyIndex = cbMeta.index; + syncGetAndDelRespRpc(pVnode->sync, cbMeta->newCfgSeqNum, &rpcMsg.info); + rpcMsg.info.conn.applyIndex = cbMeta->index; const STraceId *trace = (STraceId *)&pMsg->info.traceId; vGTrace("vgId:%d, alter vnode replica is confirmed, type:%s contLen:%d seq:%" PRIu64 " handle:%p", TD_VID(pVnode), - TMSG_INFO(pMsg->msgType), pMsg->contLen, cbMeta.seqNum, rpcMsg.info.handle); + TMSG_INFO(pMsg->msgType), pMsg->contLen, cbMeta->seqNum, rpcMsg.info.handle); if (rpcMsg.info.handle != NULL) { tmsgSendRsp(&rpcMsg); } diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 17157fbd23..86c06c6936 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -2908,7 +2908,7 @@ static int32_t syncNodeConfigChangeFinish(SSyncNode* ths, SRpcMsg* pRpcMsg, SSyn cbMeta.newCfgTerm = pFinish->newCfgTerm; cbMeta.newCfgSeqNum = pFinish->newCfgSeqNum; - ths->pFsm->FpReConfigCb(ths->pFsm, pRpcMsg, cbMeta); + ths->pFsm->FpReConfigCb(ths->pFsm, pRpcMsg, &cbMeta); } // clear changing diff --git a/source/libs/sync/test/syncConfigChangeSnapshotTest.cpp b/source/libs/sync/test/syncConfigChangeSnapshotTest.cpp index 714d233984..fbfc4cda8e 100644 --- a/source/libs/sync/test/syncConfigChangeSnapshotTest.cpp +++ b/source/libs/sync/test/syncConfigChangeSnapshotTest.cpp @@ -149,9 +149,9 @@ int32_t SnapshotDoWrite(struct SSyncFSM* pFsm, void* pWriter, void* pBuf, int32_ void RestoreFinishCb(struct SSyncFSM* pFsm) { sTrace("==callback== ==RestoreFinishCb=="); } -void ReConfigCb(struct SSyncFSM* pFsm, const SRpcMsg* pMsg, SReConfigCbMeta cbMeta) { +void ReConfigCb(struct SSyncFSM* pFsm, const SRpcMsg* pMsg, SReConfigCbMeta *cbMeta) { sTrace("==callback== ==ReConfigCb== flag:0x%lX, index:%" PRId64 ", code:%d, currentTerm:%" PRIu64 ", term:%" PRIu64, - cbMeta.flag, cbMeta.index, cbMeta.code, cbMeta.currentTerm, cbMeta.term); + cbMeta->flag, cbMeta->index, cbMeta->code, cbMeta->currentTerm, cbMeta->term); } SSyncFSM* createFsm() { diff --git a/source/libs/sync/test/syncConfigChangeTest.cpp b/source/libs/sync/test/syncConfigChangeTest.cpp index ba3fc77650..cfab3b6ae3 100644 --- a/source/libs/sync/test/syncConfigChangeTest.cpp +++ b/source/libs/sync/test/syncConfigChangeTest.cpp @@ -80,9 +80,9 @@ int32_t GetSnapshotCb(struct SSyncFSM* pFsm, SSnapshot* pSnapshot) { void RestoreFinishCb(struct SSyncFSM* pFsm) { sTrace("==callback== ==RestoreFinishCb=="); } -void ReConfigCb(struct SSyncFSM* pFsm, const SRpcMsg* pMsg, SReConfigCbMeta cbMeta) { +void ReConfigCb(struct SSyncFSM* pFsm, const SRpcMsg* pMsg, SReConfigCbMeta *cbMeta) { sTrace("==callback== ==ReConfigCb== flag:0x%lX, index:%" PRId64 ", code:%d, currentTerm:%" PRIu64 ", term:%" PRIu64, - cbMeta.flag, cbMeta.index, cbMeta.code, cbMeta.currentTerm, cbMeta.term); + cbMeta->flag, cbMeta->index, cbMeta->code, cbMeta->currentTerm, cbMeta->term); } SSyncFSM* createFsm() { diff --git a/source/libs/sync/test/syncTestTool.cpp b/source/libs/sync/test/syncTestTool.cpp index 9e9769224f..e718d37376 100644 --- a/source/libs/sync/test/syncTestTool.cpp +++ b/source/libs/sync/test/syncTestTool.cpp @@ -153,11 +153,11 @@ int32_t SnapshotDoWrite(struct SSyncFSM* pFsm, void* pWriter, void* pBuf, int32_ void RestoreFinishCb(struct SSyncFSM* pFsm) { sTrace("==callback== ==RestoreFinishCb== pFsm:%p", pFsm); } -void ReConfigCb(struct SSyncFSM* pFsm, const SRpcMsg* pMsg, SReConfigCbMeta cbMeta) { +void ReConfigCb(struct SSyncFSM* pFsm, const SRpcMsg* pMsg, SReConfigCbMeta* cbMeta) { char* s = syncCfg2Str(&(cbMeta.newCfg)); sTrace("==callback== ==ReConfigCb== flag:0x%lX, index:%" PRId64 ", code:%d, currentTerm:%" PRIu64 ", term:%" PRIu64 ", newCfg:%s", - cbMeta.flag, cbMeta.index, cbMeta.code, cbMeta.currentTerm, cbMeta.term, s); + cbMeta->flag, cbMeta->index, cbMeta->code, cbMeta->currentTerm, cbMeta->term, s); taosMemoryFree(s); }