From e8c11c58f0086377cb44497ff46432f176103867 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 3 Mar 2023 10:20:52 +0800 Subject: [PATCH 001/154] fix(tq): add some logs. --- source/client/src/clientMain.c | 10 +++++- source/client/src/clientTmq.c | 41 ++++++++++++++--------- source/common/src/tmsg.c | 2 +- source/dnode/mnode/impl/src/mndConsumer.c | 13 +++---- source/dnode/mnode/impl/src/mndTrans.c | 10 +++--- source/dnode/vnode/src/tq/tq.c | 9 +++-- 6 files changed, 56 insertions(+), 29 deletions(-) diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index 4ba51ce50d..5a3986257c 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -271,6 +271,8 @@ TAOS_ROW taos_fetch_row(TAOS_RES *res) { SReqResultInfo *pResultInfo; if (msg->resIter == -1) { pResultInfo = tmqGetNextResInfo(res, true); + tscDebug("consumer:0x%" PRIx64 ", vgId:%d, numOfRows:%" PRId64 ", total rows:%" PRId64, msg->rsp.head.consumerId, + msg->vgId, pResultInfo->numOfRows, pResultInfo->totalRows); } else { pResultInfo = tmqGetCurResInfo(res); } @@ -281,7 +283,13 @@ TAOS_ROW taos_fetch_row(TAOS_RES *res) { return pResultInfo->row; } else { pResultInfo = tmqGetNextResInfo(res, true); - if (pResultInfo == NULL) return NULL; + if (pResultInfo == NULL) { + return NULL; + } + + tscDebug("consumer:0x%" PRIx64 " vgId:%d, numOfRows:%" PRId64 ", total rows:%" PRId64, msg->rsp.head.consumerId, + msg->vgId, pResultInfo->numOfRows, pResultInfo->totalRows); + doSetOneRowPtr(pResultInfo); pResultInfo->current += 1; return pResultInfo->row; diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index d913b32642..40eccd57dd 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -192,6 +192,7 @@ typedef struct { SMqClientTopic* pTopic; int32_t vgId; tsem_t rspSem; + uint64_t requestId; // request id for debug purpose } SMqPollCbParam; typedef struct { @@ -1054,7 +1055,7 @@ tmq_t* tmq_consumer_new(tmq_conf_t* conf, char* errstr, int32_t errstrLen) { pTmq->hbLiveTimer = taosTmrStart(tmqSendHbReq, 1000, pRefId, tmqMgmt.timer); } - tscInfo("consumer:0x%" PRIx64 " is setup, consumer groupId %s", pTmq->consumerId, pTmq->groupId); + tscInfo("consumer:0x%" PRIx64 " is setup, groupId:%s", pTmq->consumerId, pTmq->groupId); return pTmq; FAIL: @@ -1224,6 +1225,7 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { atomic_store_8(&tmq->status, TMQ_CONSUMER_STATUS__RECOVER); goto CREATE_MSG_FAIL; } + if (code == TSDB_CODE_TQ_NO_COMMITTED_OFFSET) { SMqPollRspWrapper* pRspWrapper = taosAllocateQitem(sizeof(SMqPollRspWrapper), DEF_QITEM, 0); if (pRspWrapper == NULL) { @@ -1277,10 +1279,9 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { tDecoderClear(&decoder); memcpy(&pRspWrapper->dataRsp, pMsg->pData, sizeof(SMqRspHead)); - tscDebug("consumer:0x%" PRIx64 ", recv poll: vgId:%d, req offset %" PRId64 ", rsp offset %" PRId64 " type %d", + tscDebug("consumer:0x%" PRIx64 " recv poll rsp, vgId:%d, req offset:%" PRId64 ", rsp offset:%" PRId64 " type %d, reqId:0x%"PRIx64, tmq->consumerId, pVg->vgId, pRspWrapper->dataRsp.reqOffset.version, pRspWrapper->dataRsp.rspOffset.version, - rspType); - + rspType, pParam->requestId); } else if (rspType == TMQ_MSG_TYPE__POLL_META_RSP) { SDecoder decoder; tDecoderInit(&decoder, POINTER_SHIFT(pMsg->pData, sizeof(SMqRspHead)), pMsg->len - sizeof(SMqRspHead)); @@ -1298,7 +1299,7 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { taosMemoryFree(pMsg->pData); taosMemoryFree(pMsg->pEpSet); - tscDebug("consumer:0x%" PRIx64 ", put poll res into mqueue %p", tmq->consumerId, pRspWrapper); + tscDebug("consumer:0x%" PRIx64 ", put poll res into mqueue, total in queue:%d", tmq->consumerId, tmq->mqueue->numOfItems); taosWriteQitem(tmq->mqueue, pRspWrapper); tsem_post(&tmq->rspSem); @@ -1344,7 +1345,7 @@ bool tmqUpdateEp(tmq_t* tmq, int32_t epoch, const SMqAskEpRsp* pRsp) { sprintf(vgKey, "%s:%d", pTopicCur->topicName, pVgCur->vgId); char buf[80]; tFormatOffset(buf, 80, &pVgCur->currentOffset); - tscDebug("consumer:0x%" PRIx64 ", epoch %d vgId:%d vgKey is %s, offset is %s", tmq->consumerId, epoch, + tscDebug("consumer:0x%" PRIx64 ", epoch:%d vgId:%d vgKey:%s, offset:%s", tmq->consumerId, epoch, pVgCur->vgId, vgKey, buf); taosHashPut(pHash, vgKey, strlen(vgKey), &pVgCur->currentOffset, sizeof(STqOffsetVal)); } @@ -1552,7 +1553,7 @@ int32_t tmqAskEp(tmq_t* tmq, bool async) { .handle = NULL, }; - sendInfo->requestId = tmq->consumerId; + sendInfo->requestId = generateRequestId(); sendInfo->requestObjRefId = 0; sendInfo->param = pParam; sendInfo->fp = tmqAskEpCb; @@ -1560,7 +1561,7 @@ int32_t tmqAskEp(tmq_t* tmq, bool async) { SEpSet epSet = getEpSet_s(&tmq->pTscObj->pAppInfo->mgmtEp); tscDebug("consumer:0x%" PRIx64 " ask ep from mnode, async:%d, reqId:0x%" PRIx64, tmq->consumerId, async, - tmq->consumerId); + sendInfo->requestId); int64_t transporterId = 0; asyncSendMsgToServer(tmq->pTscObj->pAppInfo->pTransporter, &epSet, &transporterId, sendInfo); @@ -1674,6 +1675,7 @@ static int32_t doTmqPollImpl(tmq_t* pTmq, SMqClientTopic* pTopic, SMqClientVg* p pParam->pVg = pVg; // pVg may be released,fix it pParam->pTopic = pTopic; pParam->vgId = pVg->vgId; + pParam->requestId = req.reqId; SMsgSendInfo* sendInfo = taosMemoryCalloc(1, sizeof(SMsgSendInfo)); if (sendInfo == NULL) { @@ -1698,7 +1700,7 @@ static int32_t doTmqPollImpl(tmq_t* pTmq, SMqClientTopic* pTopic, SMqClientVg* p char offsetFormatBuf[80]; tFormatOffset(offsetFormatBuf, tListLen(offsetFormatBuf), &pVg->currentOffset); - tscDebug("consumer:0x%" PRIx64 " send poll to %s vgId:%d, epoch %d, req offset:%s, reqId:0x%" PRIx64, + tscDebug("consumer:0x%" PRIx64 " send poll to %s vgId:%d, epoch %d, req:%s, reqId:0x%" PRIx64, pTmq->consumerId, pTopic->topicName, pVg->vgId, pTmq->epoch, offsetFormatBuf, req.reqId); asyncSendMsgToServer(pTmq->pTscObj->pAppInfo->pTransporter, &pVg->epSet, &transporterId, sendInfo); @@ -1722,10 +1724,9 @@ int32_t tmqPollImpl(tmq_t* tmq, int64_t timeout) { int32_t vgStatus = atomic_val_compare_exchange_32(&pVg->vgStatus, TMQ_VG_STATUS__IDLE, TMQ_VG_STATUS__WAIT); if (vgStatus == TMQ_VG_STATUS__WAIT) { int32_t vgSkipCnt = atomic_add_fetch_32(&pVg->vgSkipCnt, 1); - tscDebug("consumer:0x%" PRIx64 " epoch %d wait poll-rsp, skip vgId:%d skip cnt %d", tmq->consumerId, tmq->epoch, + tscTrace("consumer:0x%" PRIx64 " epoch %d wait poll-rsp, skip vgId:%d skip cnt %d", tmq->consumerId, tmq->epoch, pVg->vgId, vgSkipCnt); continue; - /*if (vgSkipCnt < 10000) continue;*/ #if 0 if (skipCnt < 30000) { continue; @@ -1767,7 +1768,7 @@ int32_t tmqHandleNoPollRsp(tmq_t* tmq, SMqRspWrapper* rspWrapper, bool* pReset) } void* tmqHandleAllRsp(tmq_t* tmq, int64_t timeout, bool pollIfReset) { - tscDebug("consumer:0x%" PRIx64 " start to handle the rsp", tmq->consumerId); + tscDebug("consumer:0x%" PRIx64 " start to handle the rsp, total:%d", tmq->consumerId, tmq->qall->numOfItems); while (1) { SMqRspWrapper* rspWrapper = NULL; @@ -1785,25 +1786,33 @@ void* tmqHandleAllRsp(tmq_t* tmq, int64_t timeout, bool pollIfReset) { if (rspWrapper->tmqRspType == TMQ_MSG_TYPE__END_RSP) { taosFreeQitem(rspWrapper); terrno = TSDB_CODE_TQ_NO_COMMITTED_OFFSET; + tscError("consumer:0x%" PRIx64 " unexpected rsp from poll, code:%s", tmq->consumerId, tstrerror(terrno)); return NULL; } else if (rspWrapper->tmqRspType == TMQ_MSG_TYPE__POLL_RSP) { SMqPollRspWrapper* pollRspWrapper = (SMqPollRspWrapper*)rspWrapper; - tscDebug("consumer:0x%" PRIx64 " 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) { SMqClientVg* pVg = pollRspWrapper->vgHandle; - /*printf("vgId:%d, offset %" PRId64 " up to %" PRId64 "\n", pVg->vgId, pVg->currentOffset, - * rspMsg->msg.rspOffset);*/ pVg->currentOffset = pollRspWrapper->dataRsp.rspOffset; atomic_store_32(&pVg->vgStatus, TMQ_VG_STATUS__IDLE); + if (pollRspWrapper->dataRsp.blockNum == 0) { + tscDebug("consumer:0x%" PRIx64 " empty block received in poll rsp", tmq->consumerId); + taosFreeQitem(pollRspWrapper); rspWrapper = NULL; continue; } + // build rsp + char buf[80]; + tFormatOffset(buf, 80, &pVg->currentOffset); SMqRspObj* pRsp = tmqBuildRspFromWrapper(pollRspWrapper); + tscDebug("consumer:0x%" PRIx64 " process poll rsp, vgId:%d, offset:%s, blocks:%d", tmq->consumerId, + pVg->vgId, buf, pollRspWrapper->dataRsp.blockNum); + taosFreeQitem(pollRspWrapper); return pRsp; } else { @@ -1876,6 +1885,8 @@ void* tmqHandleAllRsp(tmq_t* tmq, int64_t timeout, bool pollIfReset) { } } } + + tscDebug("consumer:0x%" PRIx64 " handle the rsp completed", tmq->consumerId); } TAOS_RES* tmq_consumer_poll(tmq_t* tmq, int64_t timeout) { diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index e180959d1e..b9b5f3f5dd 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -6570,7 +6570,7 @@ int32_t tFormatOffset(char *buf, int32_t maxLen, const STqOffsetVal *pVal) { } else if (pVal->type == TMQ_OFFSET__LOG) { snprintf(buf, maxLen, "offset(log) ver:%" PRId64, pVal->version); } else if (pVal->type == TMQ_OFFSET__SNAPSHOT_DATA || pVal->type == TMQ_OFFSET__SNAPSHOT_META) { - snprintf(buf, maxLen, "offset(ss data) uid:%" PRId64 ", ts:%" PRId64, pVal->uid, pVal->ts); + snprintf(buf, maxLen, "offset(snapshot) uid:%" PRId64 " ts:%" PRId64, pVal->uid, pVal->ts); } else { ASSERT(0); } diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 280f3b0ecc..1b86c28a67 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -29,7 +29,7 @@ #define MND_CONSUMER_LOST_HB_CNT 3 #define MND_CONSUMER_LOST_CLEAR_THRESHOLD 43200 -static int8_t mqRebInExecCnt = 0; +static int32_t mqRebInExecCnt = 0; static const char *mndConsumerStatusName(int status); @@ -76,15 +76,16 @@ int32_t mndInitConsumer(SMnode *pMnode) { void mndCleanupConsumer(SMnode *pMnode) {} bool mndRebTryStart() { - int8_t old = atomic_val_compare_exchange_8(&mqRebInExecCnt, 0, 1); + int32_t old = atomic_val_compare_exchange_32(&mqRebInExecCnt, 0, 1); + mInfo("tq timer, rebalance counter old val:%d", old); return old == 0; } -void mndRebEnd() { atomic_sub_fetch_8(&mqRebInExecCnt, 1); } +void mndRebEnd() { int32_t val = atomic_sub_fetch_32(&mqRebInExecCnt, 1); mInfo("rebalance end, rebalance counter:%d", val); } -void mndRebCntInc() { atomic_add_fetch_8(&mqRebInExecCnt, 1); } +void mndRebCntInc() { int32_t val = atomic_add_fetch_32(&mqRebInExecCnt, 1); mInfo("rebalance trans start, rebalance count:%d", val);} -void mndRebCntDec() { atomic_sub_fetch_8(&mqRebInExecCnt, 1); } +void mndRebCntDec() { int32_t val = atomic_sub_fetch_32(&mqRebInExecCnt, 1); mInfo("rebalance trans end, rebalance count:%d", val); } static int32_t mndProcessConsumerLostMsg(SRpcMsg *pMsg) { SMnode *pMnode = pMsg->info.node; @@ -334,7 +335,7 @@ static int32_t mndProcessMqTimerMsg(SRpcMsg *pMsg) { } else { taosHashCleanup(pRebMsg->rebSubHash); rpcFreeCont(pRebMsg); - mTrace("mq rebalance finished, no modification"); + mInfo("mq rebalance finished, no modification"); mndRebEnd(); } return 0; diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c index 55e9faf020..7721dda576 100644 --- a/source/dnode/mnode/impl/src/mndTrans.c +++ b/source/dnode/mnode/impl/src/mndTrans.c @@ -503,7 +503,8 @@ static TransCbFp mndTransGetCbFp(ETrnFunc ftype) { } static int32_t mndTransActionInsert(SSdb *pSdb, STrans *pTrans) { - mTrace("trans:%d, perform insert action, row:%p stage:%s", pTrans->id, pTrans, mndTransStr(pTrans->stage)); + mInfo("trans:%d, perform insert action, row:%p stage:%s, startFunc:%d, callfunc:1", pTrans->id, pTrans, mndTransStr(pTrans->stage), + pTrans->startFunc); if (pTrans->startFunc > 0) { TransCbFp fp = mndTransGetCbFp(pTrans->startFunc); @@ -546,8 +547,9 @@ static void mndTransDropData(STrans *pTrans) { } static int32_t mndTransActionDelete(SSdb *pSdb, STrans *pTrans, bool callFunc) { - mTrace("trans:%d, perform delete action, row:%p stage:%s callfunc:%d", pTrans->id, pTrans, mndTransStr(pTrans->stage), - callFunc); + mInfo("trans:%d, perform delete action, row:%p stage:%s callfunc:%d, stopFunc:%d", pTrans->id, pTrans, mndTransStr(pTrans->stage), + pTrans->stopFunc, callFunc); + if (pTrans->stopFunc > 0 && callFunc) { TransCbFp fp = mndTransGetCbFp(pTrans->stopFunc); if (fp) { @@ -572,7 +574,7 @@ static void mndTransUpdateActions(SArray *pOldArray, SArray *pNewArray) { } static int32_t mndTransActionUpdate(SSdb *pSdb, STrans *pOld, STrans *pNew) { - mTrace("trans:%d, perform update action, old row:%p stage:%s create:%" PRId64 ", new row:%p stage:%s create:%" PRId64, + mInfo("trans:%d, perform update action, old row:%p stage:%s create:%" PRId64 ", new row:%p stage:%s create:%" PRId64, pOld->id, pOld, mndTransStr(pOld->stage), pOld->createdTime, pNew, mndTransStr(pNew->stage), pNew->createdTime); diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index d07933c9f1..4d21a2e7f3 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -488,7 +488,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) { // 2. check rebalance if (pHandle->consumerId != consumerId) { - tqError("tmq poll: consumer:0x%" PRIx64 " vgId:%d, subkey %s, mismatch for saved handle consumer:0x%" PRIx64, + tqDebug("ERROR tmq poll: consumer:0x%" PRIx64 " vgId:%d, subkey %s, mismatch for saved handle consumer:0x%" PRIx64, consumerId, TD_VID(pTq->pVnode), req.subKey, pHandle->consumerId); terrno = TSDB_CODE_TMQ_CONSUMER_MISMATCH; return -1; @@ -822,6 +822,7 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg pHandle = &tqHandle; /*taosInitRWLatch(&pExec->lock);*/ + uint64_t oldConsumerId = pHandle->consumerId; memcpy(pHandle->subKey, req.subKey, TSDB_SUBSCRIBE_KEY_LEN); pHandle->consumerId = req.newConsumerId; pHandle->epoch = -1; @@ -884,13 +885,16 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg (SSnapContext**)(&handle.sContext)); pHandle->execHandle.task = qCreateQueueExecTaskInfo(NULL, &handle, NULL, NULL); } + taosHashPut(pTq->pHandle, req.subKey, strlen(req.subKey), pHandle, sizeof(STqHandle)); - tqDebug("try to persist handle %s consumer:0x%" PRIx64, req.subKey, pHandle->consumerId); + tqDebug("try to persist handle %s consumer:0x%" PRIx64" , old consumer:0x%"PRIx64, req.subKey, pHandle->consumerId, + oldConsumerId); if (tqMetaSaveHandle(pTq, req.subKey, pHandle) < 0) { return -1; } } else { // TODO handle qmsg and exec modification + tqInfo("update the consumer info, old consumer id:0x%"PRIx64", new Id:0x%"PRIx64, pHandle->consumerId, req.newConsumerId); atomic_store_32(&pHandle->epoch, -1); atomic_store_64(&pHandle->consumerId, req.newConsumerId); atomic_add_fetch_32(&pHandle->epoch, 1); @@ -898,6 +902,7 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) { qStreamCloseTsdbReader(pHandle->execHandle.task); } + if (tqMetaSaveHandle(pTq, req.subKey, pHandle) < 0) { return -1; } From b26b1aa8fd459a5f9e858b3373852ed2d88750be Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 3 Mar 2023 10:30:23 +0800 Subject: [PATCH 002/154] fix: minor changes --- source/dnode/mnode/impl/src/mndTrans.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c index 7721dda576..05368d3445 100644 --- a/source/dnode/mnode/impl/src/mndTrans.c +++ b/source/dnode/mnode/impl/src/mndTrans.c @@ -503,7 +503,7 @@ static TransCbFp mndTransGetCbFp(ETrnFunc ftype) { } static int32_t mndTransActionInsert(SSdb *pSdb, STrans *pTrans) { - mInfo("trans:%d, perform insert action, row:%p stage:%s, startFunc:%d, callfunc:1", pTrans->id, pTrans, mndTransStr(pTrans->stage), + mInfo("trans:%d, perform insert action, row:%p stage:%s, callfunc:1, startFunc:%d", pTrans->id, pTrans, mndTransStr(pTrans->stage), pTrans->startFunc); if (pTrans->startFunc > 0) { @@ -547,8 +547,8 @@ static void mndTransDropData(STrans *pTrans) { } static int32_t mndTransActionDelete(SSdb *pSdb, STrans *pTrans, bool callFunc) { - mInfo("trans:%d, perform delete action, row:%p stage:%s callfunc:%d, stopFunc:%d", pTrans->id, pTrans, mndTransStr(pTrans->stage), - pTrans->stopFunc, callFunc); + mInfo("trans:%d, perform delete action, row:%p stage:%s callfunc:%d, stopFunc:%d", pTrans->id, pTrans, + mndTransStr(pTrans->stage), callFunc, pTrans->stopFunc); if (pTrans->stopFunc > 0 && callFunc) { TransCbFp fp = mndTransGetCbFp(pTrans->stopFunc); From f30496d958e1bbe2ce35210cd0409776026b435a Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 3 Mar 2023 10:30:45 +0800 Subject: [PATCH 003/154] refactor: update the consumerid --- source/dnode/mnode/impl/src/mndSubscribe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndSubscribe.c b/source/dnode/mnode/impl/src/mndSubscribe.c index 8544994c3e..bcddde52f7 100644 --- a/source/dnode/mnode/impl/src/mndSubscribe.c +++ b/source/dnode/mnode/impl/src/mndSubscribe.c @@ -427,10 +427,10 @@ static int32_t mndDoRebalance(SMnode *pMnode, const SMqRebInputObj *pInput, SMqR if (pIter == NULL) break; SMqConsumerEp *pConsumerEp = (SMqConsumerEp *)pIter; int32_t sz = taosArrayGetSize(pConsumerEp->vgs); - mInfo("sub:%s mq re-balance final cfg: consumer:0x%" PRId64 " has %d vg", sub, pConsumerEp->consumerId, sz); + mInfo("sub:%s mq re-balance final cfg: consumer:0x%" PRIx64 " has %d vg", sub, pConsumerEp->consumerId, sz); for (int32_t i = 0; i < sz; i++) { SMqVgEp *pVgEp = taosArrayGetP(pConsumerEp->vgs, i); - mInfo("sub:%s mq re-balance final cfg: vg %d to consumer:0x%" PRId64, sub, pVgEp->vgId, + mInfo("sub:%s mq re-balance final cfg: vg %d to consumer:0x%" PRIx64, sub, pVgEp->vgId, pConsumerEp->consumerId); } } From 8ffc397cf2682d98cef9b5bfae592d3472cda9b7 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 3 Mar 2023 10:35:13 +0800 Subject: [PATCH 004/154] fix: minor changes --- source/dnode/mnode/impl/src/mndSubscribe.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndSubscribe.c b/source/dnode/mnode/impl/src/mndSubscribe.c index 8544994c3e..fcd68d9001 100644 --- a/source/dnode/mnode/impl/src/mndSubscribe.c +++ b/source/dnode/mnode/impl/src/mndSubscribe.c @@ -224,7 +224,7 @@ static int32_t mndDoRebalance(SMnode *pMnode, const SMqRebInputObj *pInput, SMqR .pVgEp = pVgEp, }; taosHashPut(pHash, &pVgEp->vgId, sizeof(int32_t), &outputVg, sizeof(SMqRebOutputVg)); - mInfo("sub:%s mq re-balance remove vgId:%d from consumer:%" PRId64, sub, pVgEp->vgId, consumerId); + mInfo("sub:%s mq re-balance remove vgId:%d from consumer:%" PRIx64, sub, pVgEp->vgId, consumerId); } taosArrayDestroy(pConsumerEp->vgs); taosHashRemove(pOutput->pSub->consumerHash, &consumerId, sizeof(int64_t)); @@ -296,7 +296,7 @@ static int32_t mndDoRebalance(SMnode *pMnode, const SMqRebInputObj *pInput, SMqR .pVgEp = pVgEp, }; taosHashPut(pHash, &pVgEp->vgId, sizeof(int32_t), &outputVg, sizeof(SMqRebOutputVg)); - mInfo("sub:%s mq rebalance remove vgId:%d from consumer:%" PRId64 ",(first scan)", sub, pVgEp->vgId, + mInfo("sub:%s mq rebalance remove vgId:%d from consumer:%" PRIx64 ",(first scan)", sub, pVgEp->vgId, pConsumerEp->consumerId); } imbCnt++; @@ -311,7 +311,7 @@ static int32_t mndDoRebalance(SMnode *pMnode, const SMqRebInputObj *pInput, SMqR .pVgEp = pVgEp, }; taosHashPut(pHash, &pVgEp->vgId, sizeof(int32_t), &outputVg, sizeof(SMqRebOutputVg)); - mInfo("sub:%s mq rebalance remove vgId:%d from consumer:%" PRId64 ",(first scan)", sub, pVgEp->vgId, + mInfo("sub:%s mq rebalance remove vgId:%d from consumer:%" PRIx64 ",(first scan)", sub, pVgEp->vgId, pConsumerEp->consumerId); } } @@ -329,7 +329,7 @@ static int32_t mndDoRebalance(SMnode *pMnode, const SMqRebInputObj *pInput, SMqR newConsumerEp.vgs = taosArrayInit(0, sizeof(void *)); taosHashPut(pOutput->pSub->consumerHash, &consumerId, sizeof(int64_t), &newConsumerEp, sizeof(SMqConsumerEp)); taosArrayPush(pOutput->newConsumers, &consumerId); - mInfo("sub:%s mq rebalance add new consumer:%" PRId64, sub, consumerId); + mInfo("sub:%s mq rebalance add new consumer:%" PRIx64, sub, consumerId); } } @@ -357,7 +357,7 @@ static int32_t mndDoRebalance(SMnode *pMnode, const SMqRebInputObj *pInput, SMqR taosArrayPush(pConsumerEp->vgs, &pRebVg->pVgEp); pRebVg->newConsumerId = pConsumerEp->consumerId; taosArrayPush(pOutput->rebVgs, pRebVg); - mInfo("mq rebalance: add vgId:%d to consumer:%" PRId64 " (second scan) (not enough)", pRebVg->pVgEp->vgId, + mInfo("mq rebalance: add vgId:%d to consumer:%" PRIx64 " (second scan) (not enough)", pRebVg->pVgEp->vgId, pConsumerEp->consumerId); } } @@ -387,12 +387,12 @@ static int32_t mndDoRebalance(SMnode *pMnode, const SMqRebInputObj *pInput, SMqR taosArrayPush(pConsumerEp->vgs, &pRebVg->pVgEp); pRebVg->newConsumerId = pConsumerEp->consumerId; if (pRebVg->newConsumerId == pRebVg->oldConsumerId) { - mInfo("mq rebalance: skip vg %d for same consumer:%" PRId64 " (second scan)", pRebVg->pVgEp->vgId, + mInfo("mq rebalance: skip vg %d for same consumer:%" PRIx64 " (second scan)", pRebVg->pVgEp->vgId, pConsumerEp->consumerId); continue; } taosArrayPush(pOutput->rebVgs, pRebVg); - mInfo("mq rebalance: add vgId:%d to consumer:%" PRId64 " (second scan) (unassigned)", pRebVg->pVgEp->vgId, + mInfo("mq rebalance: add vgId:%d to consumer:%" PRIx64 " (second scan) (unassigned)", pRebVg->pVgEp->vgId, pConsumerEp->consumerId); } } else { @@ -427,10 +427,10 @@ static int32_t mndDoRebalance(SMnode *pMnode, const SMqRebInputObj *pInput, SMqR if (pIter == NULL) break; SMqConsumerEp *pConsumerEp = (SMqConsumerEp *)pIter; int32_t sz = taosArrayGetSize(pConsumerEp->vgs); - mInfo("sub:%s mq re-balance final cfg: consumer:0x%" PRId64 " has %d vg", sub, pConsumerEp->consumerId, sz); + mInfo("sub:%s mq re-balance final cfg: consumer:0x%" PRIx64 " has %d vg", sub, pConsumerEp->consumerId, sz); for (int32_t i = 0; i < sz; i++) { SMqVgEp *pVgEp = taosArrayGetP(pConsumerEp->vgs, i); - mInfo("sub:%s mq re-balance final cfg: vg %d to consumer:0x%" PRId64, sub, pVgEp->vgId, + mInfo("sub:%s mq re-balance final cfg: vg %d to consumer:0x%" PRIx64, sub, pVgEp->vgId, pConsumerEp->consumerId); } } @@ -1017,7 +1017,7 @@ int32_t mndRetrieveSubscribe(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); colDataSetVal(pColInfo, numOfRows, (const char *)&pConsumerEp->consumerId, false); - mDebug("mnd show subscriptions: topic %s, consumer %" PRId64 " cgroup %s vgid %d", varDataVal(topic), + mDebug("mnd show subscriptions: topic %s, consumer:%" PRIx64 " cgroup %s vgid %d", varDataVal(topic), pConsumerEp->consumerId, varDataVal(cgroup), pVgEp->vgId); // offset From dfeb3fb458a2dd0275251b79f99c17d8fbc15655 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 3 Mar 2023 13:45:04 +0800 Subject: [PATCH 005/154] refactor: update some logs. --- source/dnode/mnode/impl/src/mndConsumer.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 1b86c28a67..2b5956f6a6 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -944,8 +944,9 @@ static int32_t mndConsumerActionUpdate(SSdb *pSdb, SMqConsumerObj *pOldConsumer, pOldConsumer->rebalanceTime = pNewConsumer->upTime; atomic_add_fetch_32(&pOldConsumer->epoch, 1); - mDebug("consumer:0x%" PRIx64 " state %s -> %s, new epoch:%d, reb-time:%" PRId64 ", current topics:%d", - pOldConsumer->consumerId, mndConsumerStatusName(status), mndConsumerStatusName(pOldConsumer->status), + mDebug("consumer:0x%" PRIx64 " state (%d)%s -> (%d)%s, new epoch:%d, reb-time:%" PRId64 ", current topics:%d", + pOldConsumer->consumerId, status, mndConsumerStatusName(status), pOldConsumer->status, + mndConsumerStatusName(pOldConsumer->status), pOldConsumer->epoch, pOldConsumer->rebalanceTime, (int)taosArrayGetSize(pOldConsumer->currentTopics)); } else if (pNewConsumer->updateType == CONSUMER_UPDATE__REMOVE) { /*A(taosArrayGetSize(pNewConsumer->rebNewTopics) == 0);*/ @@ -1003,8 +1004,9 @@ static int32_t mndConsumerActionUpdate(SSdb *pSdb, SMqConsumerObj *pOldConsumer, pOldConsumer->rebalanceTime = pNewConsumer->upTime; atomic_add_fetch_32(&pOldConsumer->epoch, 1); - mDebug("consumer:0x%" PRIx64 " state %s -> %s, new epoch:%d, reb-time:%" PRId64 ", current topics:%d", - pOldConsumer->consumerId, mndConsumerStatusName(status), mndConsumerStatusName(pOldConsumer->status), + mDebug("consumer:0x%" PRIx64 " state %d(%s) -> %d(%s), new epoch:%d, reb-time:%" PRId64 ", current topics:%d", + pOldConsumer->consumerId, status, mndConsumerStatusName(status), pOldConsumer->status, + mndConsumerStatusName(pOldConsumer->status), pOldConsumer->epoch, pOldConsumer->rebalanceTime, (int)taosArrayGetSize(pOldConsumer->currentTopics)); } From 6c68b36d7f1609cbf53d7b176448f364969bc834 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Fri, 3 Mar 2023 18:22:26 +0800 Subject: [PATCH 006/154] fix:change ask ep to 20s --- source/client/src/clientTmq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 40eccd57dd..826bbbd8a3 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1162,7 +1162,7 @@ int32_t tmq_subscribe(tmq_t* tmq, const tmq_list_t* topic_list) { int32_t retryCnt = 0; while (TSDB_CODE_MND_CONSUMER_NOT_READY == tmqAskEp(tmq, false)) { - if (retryCnt++ > 10) { + if (retryCnt++ > 40) { goto FAIL; } From 24bb33f24a11a8b55aa87f4d7f7a3f1841260aac Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 3 Mar 2023 18:34:38 +0800 Subject: [PATCH 007/154] refactor: add some logs. --- source/dnode/vnode/inc/vnode.h | 2 +- source/dnode/vnode/src/tq/tqRead.c | 8 ++++---- source/libs/executor/src/executor.c | 2 +- source/libs/executor/src/scanoperator.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/dnode/vnode/inc/vnode.h b/source/dnode/vnode/inc/vnode.h index acfaccafe2..1d14829891 100644 --- a/source/dnode/vnode/inc/vnode.h +++ b/source/dnode/vnode/inc/vnode.h @@ -264,7 +264,7 @@ int32_t tqReaderSetTbUidList(STqReader *pReader, const SArray *tbUidList); int32_t tqReaderAddTbUidList(STqReader *pReader, const SArray *tbUidList); int32_t tqReaderRemoveTbUidList(STqReader *pReader, const SArray *tbUidList); -int32_t tqSeekVer(STqReader *pReader, int64_t ver); +int32_t tqSeekVer(STqReader *pReader, int64_t ver, const char* id); int32_t tqNextBlock(STqReader *pReader, SFetchRet *ret); int32_t tqReaderSetSubmitReq2(STqReader *pReader, void *msgStr, int32_t msgLen, int64_t ver); diff --git a/source/dnode/vnode/src/tq/tqRead.c b/source/dnode/vnode/src/tq/tqRead.c index ee00cdc205..f4c96d073b 100644 --- a/source/dnode/vnode/src/tq/tqRead.c +++ b/source/dnode/vnode/src/tq/tqRead.c @@ -290,14 +290,14 @@ void tqCloseReader(STqReader* pReader) { taosMemoryFree(pReader); } -int32_t tqSeekVer(STqReader* pReader, int64_t ver) { +int32_t tqSeekVer(STqReader* pReader, int64_t ver, const char* id) { // todo set the correct vgId - tqDebug("tmq poll: vgId:%d wal seek to version:%"PRId64, 0, ver); + tqDebug("tmq poll: wal seek to version:%"PRId64" %s", ver, id); if (walReadSeekVer(pReader->pWalReader, ver) < 0) { - tqError("tmq poll: wal reader failed to seek to ver:%"PRId64, ver); + tqError("tmq poll: wal reader failed to seek to ver:%"PRId64" code:%s, %s", ver, tstrerror(terrno), id); return -1; } else { - tqDebug("tmq poll: wal reader seek to ver:%"PRId64, ver); + tqError("tmq poll: wal reader seek to ver:%"PRId64" %s", ver, id); return 0; } } diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c index c2bf001c86..f24fe2d211 100644 --- a/source/libs/executor/src/executor.c +++ b/source/libs/executor/src/executor.c @@ -1068,7 +1068,7 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT tsdbReaderClose(pTSInfo->base.dataReader); pTSInfo->base.dataReader = NULL; // let's seek to the next version in wal file - if (tqSeekVer(pInfo->tqReader, pOffset->version + 1) < 0) { + if (tqSeekVer(pInfo->tqReader, pOffset->version + 1, pTaskInfo->id.str) < 0) { return -1; } } else if (pOffset->type == TMQ_OFFSET__SNAPSHOT_DATA) { diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 7961d5518a..8576ac74c7 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -1618,7 +1618,7 @@ static SSDataBlock* doQueueScan(SOperatorInfo* pOperator) { pTSInfo->base.dataReader = NULL; tqOffsetResetToLog(&pTaskInfo->streamInfo.prepareStatus, pTaskInfo->streamInfo.snapshotVer); qDebug("queue scan tsdb over, switch to wal ver %" PRId64 "", pTaskInfo->streamInfo.snapshotVer + 1); - if (tqSeekVer(pInfo->tqReader, pTaskInfo->streamInfo.snapshotVer + 1) < 0) { + if (tqSeekVer(pInfo->tqReader, pTaskInfo->streamInfo.snapshotVer + 1, pTaskInfo->id.str) < 0) { tqOffsetResetToLog(&pTaskInfo->streamInfo.lastStatus, pTaskInfo->streamInfo.snapshotVer); return NULL; } From 0b00922a43706bb5d40b7aee00cd90dd1beb98f5 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 3 Mar 2023 23:53:32 +0800 Subject: [PATCH 008/154] fix: should not set startFunc/stopFunc to 0. when the trans is not finished on taosd stop, it will cause the startFunc/stopFunc setting error --- source/dnode/mnode/impl/src/mndTrans.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c index 56fce0507f..ff8b4dd9ce 100644 --- a/source/dnode/mnode/impl/src/mndTrans.c +++ b/source/dnode/mnode/impl/src/mndTrans.c @@ -513,7 +513,7 @@ static int32_t mndTransActionInsert(SSdb *pSdb, STrans *pTrans) { if (fp) { (*fp)(pSdb->pMnode, pTrans->param, pTrans->paramLen); } - pTrans->startFunc = 0; + // pTrans->startFunc = 0; } return 0; @@ -557,7 +557,7 @@ static int32_t mndTransActionDelete(SSdb *pSdb, STrans *pTrans, bool callFunc) { if (fp) { (*fp)(pSdb->pMnode, pTrans->param, pTrans->paramLen); } - pTrans->stopFunc = 0; + // pTrans->stopFunc = 0; } mndTransDropData(pTrans); From f4c8444b8f92994a81816c3a90836f3425313ed4 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 3 Mar 2023 23:55:05 +0800 Subject: [PATCH 009/154] fix: format log --- source/dnode/mnode/impl/src/mndConsumer.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 2b5956f6a6..803c4f81e7 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -81,11 +81,20 @@ bool mndRebTryStart() { return old == 0; } -void mndRebEnd() { int32_t val = atomic_sub_fetch_32(&mqRebInExecCnt, 1); mInfo("rebalance end, rebalance counter:%d", val); } +void mndRebEnd() { + int32_t val = atomic_sub_fetch_32(&mqRebInExecCnt, 1); + mInfo("rebalance end, rebalance count:%d", val); +} -void mndRebCntInc() { int32_t val = atomic_add_fetch_32(&mqRebInExecCnt, 1); mInfo("rebalance trans start, rebalance count:%d", val);} +void mndRebCntInc() { + int32_t val = atomic_add_fetch_32(&mqRebInExecCnt, 1); + mInfo("rebalance trans start, rebalance count:%d", val); +} -void mndRebCntDec() { int32_t val = atomic_sub_fetch_32(&mqRebInExecCnt, 1); mInfo("rebalance trans end, rebalance count:%d", val); } +void mndRebCntDec() { + int32_t val = atomic_sub_fetch_32(&mqRebInExecCnt, 1); + mInfo("rebalance trans end, rebalance count:%d", val); +} static int32_t mndProcessConsumerLostMsg(SRpcMsg *pMsg) { SMnode *pMnode = pMsg->info.node; From 3645c52b251ce44c761515e1984782674236dd03 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 4 Mar 2023 00:34:53 +0800 Subject: [PATCH 010/154] refactor: update some logs. --- source/client/src/clientTmq.c | 7 +++---- source/dnode/mnode/impl/src/mndConsumer.c | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 826bbbd8a3..de338a4642 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1799,8 +1799,7 @@ void* tmqHandleAllRsp(tmq_t* tmq, int64_t timeout, bool pollIfReset) { atomic_store_32(&pVg->vgStatus, TMQ_VG_STATUS__IDLE); if (pollRspWrapper->dataRsp.blockNum == 0) { - tscDebug("consumer:0x%" PRIx64 " empty block received in poll rsp", tmq->consumerId); - + tscDebug("consumer:0x%" PRIx64 " empty block received, vgId:%d", tmq->consumerId, pVg->vgId); taosFreeQitem(pollRspWrapper); rspWrapper = NULL; continue; @@ -1913,11 +1912,11 @@ TAOS_RES* tmq_consumer_poll(tmq_t* tmq, int64_t timeout) { if (atomic_load_8(&tmq->status) == TMQ_CONSUMER_STATUS__RECOVER) { int32_t retryCnt = 0; while (TSDB_CODE_MND_CONSUMER_NOT_READY == tmqAskEp(tmq, false)) { - if (retryCnt++ > 10) { + if (retryCnt++ > 40) { return NULL; } - tscDebug("consumer:0x%" PRIx64 " not ready, retry:%d/10 in 500ms", tmq->consumerId, retryCnt); + tscDebug("consumer:0x%" PRIx64 " not ready, retry:%d/40 in 500ms", tmq->consumerId, retryCnt); taosMsleep(500); } } diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 803c4f81e7..50aa1bb8c7 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -621,7 +621,8 @@ int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) { pExistedConsumer = mndAcquireConsumer(pMnode, consumerId); if (pExistedConsumer == NULL) { - mInfo("receive subscribe request from new consumer:0x%" PRIx64" cgroup:%s", consumerId, subscribe.cgroup); + mInfo("receive subscribe request from new consumer:0x%" PRIx64" cgroup:%s, numOfTopics:%d", consumerId, + subscribe.cgroup, (int32_t) taosArrayGetSize(pTopicList)); pConsumerNew = tNewSMqConsumerObj(consumerId, cgroup); tstrncpy(pConsumerNew->clientId, subscribe.clientId, 256); From 53a0ff0be381dcb5fd1578291871642dea36cb11 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 4 Mar 2023 16:19:45 +0800 Subject: [PATCH 011/154] refactor: add some logs. --- source/client/src/clientTmq.c | 40 ++++++++++++++-------- source/dnode/mnode/impl/src/mndConsumer.c | 2 +- source/dnode/mnode/impl/src/mndSubscribe.c | 4 +-- 3 files changed, 29 insertions(+), 17 deletions(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index de338a4642..56d0148272 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1076,7 +1076,7 @@ int32_t tmq_subscribe(tmq_t* tmq, const tmq_list_t* topic_list) { SCMSubscribeReq req = {0}; int32_t code = 0; - tscDebug("consumer:0x%" PRIx64 " subscribe %d topics", tmq->consumerId, sz); + tscDebug("consumer:0x%" PRIx64 " cgroup:%s, subscribe %d topics", tmq->consumerId, tmq->groupId, sz); req.consumerId = tmq->consumerId; tstrncpy(req.clientId, tmq->clientId, 256); @@ -1213,31 +1213,38 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { return -1; } - int32_t epoch = pParam->epoch; - int32_t vgId = pParam->vgId; + int32_t epoch = pParam->epoch; + int32_t vgId = pParam->vgId; + uint64_t requestId = pParam->requestId; + taosMemoryFree(pParam); + if (code != 0) { - tscWarn("msg discard from vgId:%d, epoch %d, since %s", vgId, epoch, terrstr()); + tscWarn("consumer:0x%"PRIx64" msg from vgId:%d discarded, epoch %d, since %s, reqId:0x%"PRIx64, tmq->consumerId, vgId, + epoch, tstrerror(code), requestId); + if (pMsg->pData) taosMemoryFree(pMsg->pData); if (pMsg->pEpSet) taosMemoryFree(pMsg->pEpSet); + // in case of consumer mismatch, wait for 500ms and retry if (code == TSDB_CODE_TMQ_CONSUMER_MISMATCH) { + taosMsleep(500); atomic_store_8(&tmq->status, TMQ_CONSUMER_STATUS__RECOVER); - goto CREATE_MSG_FAIL; - } - - if (code == TSDB_CODE_TQ_NO_COMMITTED_OFFSET) { + } else if (code == TSDB_CODE_TQ_NO_COMMITTED_OFFSET) { SMqPollRspWrapper* pRspWrapper = taosAllocateQitem(sizeof(SMqPollRspWrapper), DEF_QITEM, 0); if (pRspWrapper == NULL) { - tscWarn("msg discard from vgId:%d, epoch %d since out of memory", vgId, epoch); + tscWarn("consumer:0x%" PRIx64 " msg from vgId:%d discarded, epoch %d since out of memory, reqId:0x%" PRIx64, + tmq->consumerId, vgId, epoch, requestId); goto CREATE_MSG_FAIL; } + pRspWrapper->tmqRspType = TMQ_MSG_TYPE__END_RSP; /*pRspWrapper->vgHandle = pVg;*/ /*pRspWrapper->topicHandle = pTopic;*/ taosWriteQitem(tmq->mqueue, pRspWrapper); tsem_post(&tmq->rspSem); } + goto CREATE_MSG_FAIL; } @@ -1245,8 +1252,9 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { int32_t tmqEpoch = atomic_load_32(&tmq->epoch); if (msgEpoch < tmqEpoch) { // do not write into queue since updating epoch reset - tscWarn("msg discard from vgId:%d since from earlier epoch, rsp epoch %d, current epoch %d", vgId, msgEpoch, - tmqEpoch); + tscWarn("consumer:0x%" PRIx64 " msg discard from vgId:%d since from earlier epoch, rsp epoch %d, current epoch %d, reqId:0x%"PRIx64, + tmq->consumerId, vgId, msgEpoch, tmqEpoch, requestId); + tsem_post(&tmq->rspSem); taosMemoryFree(pMsg->pData); taosMemoryFree(pMsg->pEpSet); @@ -1254,7 +1262,8 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { } if (msgEpoch != tmqEpoch) { - tscWarn("mismatch rsp from vgId:%d, epoch %d, current epoch %d", vgId, msgEpoch, tmqEpoch); + tscWarn("consumer:0x%"PRIx64" mismatch rsp from vgId:%d, epoch %d, current epoch %d, reqId:0x%"PRIx64, tmq->consumerId, vgId, + msgEpoch, tmqEpoch, requestId); } // handle meta rsp @@ -1264,7 +1273,7 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { if (pRspWrapper == NULL) { taosMemoryFree(pMsg->pData); taosMemoryFree(pMsg->pEpSet); - tscWarn("msg discard from vgId:%d, epoch %d since out of memory", vgId, epoch); + tscWarn("consumer:0x%"PRIx64" msg discard from vgId:%d, epoch %d since out of memory", tmq->consumerId, vgId, epoch); goto CREATE_MSG_FAIL; } @@ -1299,16 +1308,19 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { taosMemoryFree(pMsg->pData); taosMemoryFree(pMsg->pEpSet); - tscDebug("consumer:0x%" PRIx64 ", put poll res into mqueue, total in queue:%d", tmq->consumerId, tmq->mqueue->numOfItems); + tscDebug("consumer:0x%" PRIx64 ", put poll res into mqueue, total in queue:%d, reqId:0x%" PRIx64, tmq->consumerId, + tmq->mqueue->numOfItems, requestId); taosWriteQitem(tmq->mqueue, pRspWrapper); tsem_post(&tmq->rspSem); return 0; + CREATE_MSG_FAIL: if (epoch == tmq->epoch) { atomic_store_32(&pVg->vgStatus, TMQ_VG_STATUS__IDLE); } + tsem_post(&tmq->rspSem); return -1; } diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 50aa1bb8c7..90f5f8c839 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -26,7 +26,7 @@ #define MND_CONSUMER_VER_NUMBER 1 #define MND_CONSUMER_RESERVE_SIZE 64 -#define MND_CONSUMER_LOST_HB_CNT 3 +#define MND_CONSUMER_LOST_HB_CNT 6 #define MND_CONSUMER_LOST_CLEAR_THRESHOLD 43200 static int32_t mqRebInExecCnt = 0; diff --git a/source/dnode/mnode/impl/src/mndSubscribe.c b/source/dnode/mnode/impl/src/mndSubscribe.c index fcd68d9001..648014d97e 100644 --- a/source/dnode/mnode/impl/src/mndSubscribe.c +++ b/source/dnode/mnode/impl/src/mndSubscribe.c @@ -296,7 +296,7 @@ static int32_t mndDoRebalance(SMnode *pMnode, const SMqRebInputObj *pInput, SMqR .pVgEp = pVgEp, }; taosHashPut(pHash, &pVgEp->vgId, sizeof(int32_t), &outputVg, sizeof(SMqRebOutputVg)); - mInfo("sub:%s mq rebalance remove vgId:%d from consumer:%" PRIx64 ",(first scan)", sub, pVgEp->vgId, + mInfo("sub:%s mq rebalance remove vgId:%d from consumer:0x%" PRIx64 ",(first scan)", sub, pVgEp->vgId, pConsumerEp->consumerId); } imbCnt++; @@ -311,7 +311,7 @@ static int32_t mndDoRebalance(SMnode *pMnode, const SMqRebInputObj *pInput, SMqR .pVgEp = pVgEp, }; taosHashPut(pHash, &pVgEp->vgId, sizeof(int32_t), &outputVg, sizeof(SMqRebOutputVg)); - mInfo("sub:%s mq rebalance remove vgId:%d from consumer:%" PRIx64 ",(first scan)", sub, pVgEp->vgId, + mInfo("sub:%s mq rebalance remove vgId:%d from consumer:0x%" PRIx64 ",(first scan)", sub, pVgEp->vgId, pConsumerEp->consumerId); } } From c159fd07471c6a36c42bbcdfdef2bc2b84b99cc1 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 4 Mar 2023 16:37:44 +0800 Subject: [PATCH 012/154] refactor: disable sleep temporarily. --- source/client/src/clientTmq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 56d0148272..7a31ab572c 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1228,7 +1228,7 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { // in case of consumer mismatch, wait for 500ms and retry if (code == TSDB_CODE_TMQ_CONSUMER_MISMATCH) { - taosMsleep(500); +// taosMsleep(500); atomic_store_8(&tmq->status, TMQ_CONSUMER_STATUS__RECOVER); } else if (code == TSDB_CODE_TQ_NO_COMMITTED_OFFSET) { SMqPollRspWrapper* pRspWrapper = taosAllocateQitem(sizeof(SMqPollRspWrapper), DEF_QITEM, 0); From 33f2d076052013ae0d5cab38b5acac5304c84eb1 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 4 Mar 2023 16:38:50 +0800 Subject: [PATCH 013/154] refactor: sleep for a while. --- source/client/src/clientTmq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 7a31ab572c..d08cabd27e 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1918,6 +1918,7 @@ TAOS_RES* tmq_consumer_poll(tmq_t* tmq, int64_t timeout) { // in no topic status, delayed task also need to be processed if (atomic_load_8(&tmq->status) == TMQ_CONSUMER_STATUS__INIT) { tscDebug("consumer:0x%" PRIx64 " poll return since consumer is init", tmq->consumerId); + // sleep for a while return NULL; } From 6fe2a9b10dff26679ebc6833ecc0d97c15c5fb28 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sat, 4 Mar 2023 18:09:40 +0800 Subject: [PATCH 014/154] add debug --- source/libs/transport/src/transCli.c | 60 +++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 274d153adc..a2516f6ff7 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -13,7 +13,6 @@ */ #include "transComm.h" -#include "tutil.h" typedef struct { int32_t numOfConn; @@ -121,6 +120,9 @@ typedef struct SCliThrd { SCliMsg* stopMsg; bool quit; + + int newConnCount; + SHashObj* msgCount; } SCliThrd; typedef struct SCliObj { @@ -423,6 +425,21 @@ void cliHandleResp(SCliConn* conn) { tDebug("%s conn %p ref by app", CONN_GET_INST_LABEL(conn), conn); } + // if (TMSG_INFO(pHead->msgType - 1) != 0) { + // char buf[128] = {0}; + // sprintf(buf, "%s", TMSG_INFO(pHead->msgType - 1)); + // int* count = taosHashGet(pThrd->msgCount, TMSG_INFO(pHead->msgType - 1), strlen(TMSG_INFO(pHead->msgType - 1))); + // if (NULL == 0) { + // int localCount = 1; + // taosHashPut(pThrd->msgCount, TMSG_INFO(pHead->msgType - 1), strlen(TMSG_INFO(pHead->msgType - 1)), &localCount, + // sizeof(localCount)); + // } else { + // int localCount = *count - 1; + // taosHashPut(pThrd->msgCount, TMSG_INFO(pHead->msgType - 1), strlen(TMSG_INFO(pHead->msgType - 1)), &localCount, + // sizeof(localCount)); + // } + // } + STraceId* trace = &transMsg.info.traceId; tGDebug("%s conn %p %s received from %s, local info:%s, len:%d, code str:%s", CONN_GET_INST_LABEL(conn), conn, TMSG_INFO(pHead->msgType), conn->dst, conn->src, pHead->msgLen, tstrerror(transMsg.code)); @@ -1098,6 +1115,19 @@ void cliSend(SCliConn* pConn) { msgLen = (int32_t)ntohl((uint32_t)(pHead->msgLen)); } + if (TMSG_INFO(pHead->msgType) != 0) { + char buf[128] = {0}; + sprintf(buf, "%s", TMSG_INFO(pHead->msgType)); + int* count = taosHashGet(pThrd->msgCount, buf, strlen(buf)); + if (NULL == 0) { + int localCount = 1; + taosHashPut(pThrd->msgCount, buf, strlen(buf), &localCount, sizeof(localCount)); + } else { + int localCount = *count + 1; + taosHashPut(pThrd->msgCount, buf, strlen(buf), &localCount, sizeof(localCount)); + } + } + tGDebug("%s conn %p %s is sent to %s, local info %s, len:%d", CONN_GET_INST_LABEL(pConn), pConn, TMSG_INFO(pHead->msgType), pConn->dst, pConn->src, msgLen); @@ -1173,6 +1203,7 @@ static void cliHandleBatchReq(SCliBatch* pBatch, SCliThrd* pThrd) { addr.sin_port = (uint16_t)htons(pList->port); tTrace("%s conn %p try to connect to %s", pTransInst->label, conn, pList->dst); + pThrd->newConnCount++; int32_t fd = taosCreateSocketWithTimeout(TRANS_CONN_TIMEOUT * 10); if (fd == -1) { tError("%s conn %p failed to create socket, reason:%s", transLabel(pTransInst), conn, @@ -1546,6 +1577,7 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) { addr.sin_port = (uint16_t)htons(port); tGTrace("%s conn %p try to connect to %s", pTransInst->label, conn, conn->ip); + pThrd->newConnCount++; int32_t fd = taosCreateSocketWithTimeout(TRANS_CONN_TIMEOUT * 4); if (fd == -1) { tGError("%s conn %p failed to create socket, reason:%s", transLabel(pTransInst), conn, @@ -1735,6 +1767,17 @@ static void cliAsyncCb(uv_async_t* handle) { QUEUE_MOVE(&item->qmsg, &wq); taosThreadMutexUnlock(&item->mtx); + void* pIter = taosHashIterate(pThrd->msgCount, NULL); + while (pIter != NULL) { + int* count = pIter; + size_t len = 0; + char* key = taosHashGetKey(pIter, &len); + tDebug("key: %s count: %d", key, *count); + + pIter = taosHashIterate(pThrd->msgCount, pIter); + } + tDebug("conn count: %d", pThrd->newConnCount); + int8_t supportBatch = pTransInst->supportBatch; if (supportBatch == 0) { cliNoBatchDealReq(&wq, pThrd); @@ -1969,6 +2012,9 @@ static SCliThrd* createThrdObj(void* trans) { pThrd->batchCache = taosHashInit(8, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), true, HASH_NO_LOCK); pThrd->quit = false; + + pThrd->newConnCount = 0; + pThrd->msgCount = taosHashInit(8, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), false, HASH_NO_LOCK); return pThrd; } static void destroyThrdObj(SCliThrd* pThrd) { @@ -2316,6 +2362,18 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { } } + if ((pResp->msgType - 1) > 0) { + char buf[128] = {0}; + sprintf(buf, "%s", TMSG_INFO(pResp->msgType - 1)); + int* count = taosHashGet(pThrd->msgCount, buf, strlen(buf)); + if (NULL == 0) { + int localCount = 0; + taosHashPut(pThrd->msgCount, buf, strlen(buf), &localCount, sizeof(localCount)); + } else { + int localCount = *count - 1; + taosHashPut(pThrd->msgCount, buf, strlen(buf), &localCount, sizeof(localCount)); + } + } if (pCtx->pSem != NULL) { tGTrace("%s conn %p(sync) handle resp", CONN_GET_INST_LABEL(pConn), pConn); if (pCtx->pRsp == NULL) { From 8f63de5a0ad4be615687544ea8cd5ca173d36b37 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sat, 4 Mar 2023 18:30:53 +0800 Subject: [PATCH 015/154] add debug --- source/libs/transport/src/transCli.c | 66 ++++++++++++++-------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index a2516f6ff7..9ed7953e90 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -1115,18 +1115,18 @@ void cliSend(SCliConn* pConn) { msgLen = (int32_t)ntohl((uint32_t)(pHead->msgLen)); } - if (TMSG_INFO(pHead->msgType) != 0) { - char buf[128] = {0}; - sprintf(buf, "%s", TMSG_INFO(pHead->msgType)); - int* count = taosHashGet(pThrd->msgCount, buf, strlen(buf)); - if (NULL == 0) { - int localCount = 1; - taosHashPut(pThrd->msgCount, buf, strlen(buf), &localCount, sizeof(localCount)); - } else { - int localCount = *count + 1; - taosHashPut(pThrd->msgCount, buf, strlen(buf), &localCount, sizeof(localCount)); - } - } + // if (pHead->msgType != 0) { + // char buf[128] = {0}; + // sprintf(buf, "%s", TMSG_INFO(pHead->msgType)); + // int* count = taosHashGet(pThrd->msgCount, buf, strlen(buf)); + // if (NULL == 0) { + // int localCount = 1; + // taosHashPut(pThrd->msgCount, buf, strlen(buf), &localCount, sizeof(localCount)); + //} else { + // int localCount = *count + 1; + // taosHashPut(pThrd->msgCount, buf, strlen(buf), &localCount, sizeof(localCount)); + //} + //} tGDebug("%s conn %p %s is sent to %s, local info %s, len:%d", CONN_GET_INST_LABEL(pConn), pConn, TMSG_INFO(pHead->msgType), pConn->dst, pConn->src, msgLen); @@ -1767,15 +1767,15 @@ static void cliAsyncCb(uv_async_t* handle) { QUEUE_MOVE(&item->qmsg, &wq); taosThreadMutexUnlock(&item->mtx); - void* pIter = taosHashIterate(pThrd->msgCount, NULL); - while (pIter != NULL) { - int* count = pIter; - size_t len = 0; - char* key = taosHashGetKey(pIter, &len); - tDebug("key: %s count: %d", key, *count); + // void* pIter = taosHashIterate(pThrd->msgCount, NULL); + // while (pIter != NULL) { + // int* count = pIter; + // size_t len = 0; + // char* key = taosHashGetKey(pIter, &len); + // tDebug("key: %s count: %d", key, *count); - pIter = taosHashIterate(pThrd->msgCount, pIter); - } + // pIter = taosHashIterate(pThrd->msgCount, pIter); + //} tDebug("conn count: %d", pThrd->newConnCount); int8_t supportBatch = pTransInst->supportBatch; @@ -2014,7 +2014,7 @@ static SCliThrd* createThrdObj(void* trans) { pThrd->quit = false; pThrd->newConnCount = 0; - pThrd->msgCount = taosHashInit(8, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), false, HASH_NO_LOCK); + pThrd->msgCount = taosHashInit(8, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), true, HASH_NO_LOCK); return pThrd; } static void destroyThrdObj(SCliThrd* pThrd) { @@ -2362,18 +2362,18 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { } } - if ((pResp->msgType - 1) > 0) { - char buf[128] = {0}; - sprintf(buf, "%s", TMSG_INFO(pResp->msgType - 1)); - int* count = taosHashGet(pThrd->msgCount, buf, strlen(buf)); - if (NULL == 0) { - int localCount = 0; - taosHashPut(pThrd->msgCount, buf, strlen(buf), &localCount, sizeof(localCount)); - } else { - int localCount = *count - 1; - taosHashPut(pThrd->msgCount, buf, strlen(buf), &localCount, sizeof(localCount)); - } - } + // if ((pResp->msgType - 1) > 0) { + // char buf[128] = {0}; + // sprintf(buf, "%s", TMSG_INFO(pResp->msgType - 1)); + // int* count = taosHashGet(pThrd->msgCount, buf, strlen(buf)); + // if (NULL == 0) { + // int localCount = 0; + // taosHashPut(pThrd->msgCount, buf, strlen(buf), &localCount, sizeof(localCount)); + //} else { + // int localCount = *count - 1; + // taosHashPut(pThrd->msgCount, buf, strlen(buf), &localCount, sizeof(localCount)); + //} + //} if (pCtx->pSem != NULL) { tGTrace("%s conn %p(sync) handle resp", CONN_GET_INST_LABEL(pConn), pConn); if (pCtx->pRsp == NULL) { From b4e8130633710f11e261d73959409c6e0c154e6b Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sat, 4 Mar 2023 18:48:37 +0800 Subject: [PATCH 016/154] add debug --- source/libs/transport/src/transCli.c | 68 ++++++++++++++-------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 9ed7953e90..e7da5b1c69 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -1115,18 +1115,18 @@ void cliSend(SCliConn* pConn) { msgLen = (int32_t)ntohl((uint32_t)(pHead->msgLen)); } - // if (pHead->msgType != 0) { - // char buf[128] = {0}; - // sprintf(buf, "%s", TMSG_INFO(pHead->msgType)); - // int* count = taosHashGet(pThrd->msgCount, buf, strlen(buf)); - // if (NULL == 0) { - // int localCount = 1; - // taosHashPut(pThrd->msgCount, buf, strlen(buf), &localCount, sizeof(localCount)); - //} else { - // int localCount = *count + 1; - // taosHashPut(pThrd->msgCount, buf, strlen(buf), &localCount, sizeof(localCount)); - //} - //} + if (pHead->msgType != 0) { + char buf[128] = {0}; + sprintf(buf, "%s", TMSG_INFO(pHead->msgType)); + int* count = taosHashGet(pThrd->msgCount, buf, sizeof(buf)); + if (NULL == 0) { + int localCount = 1; + taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); + } else { + int localCount = *count + 1; + taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); + } + } tGDebug("%s conn %p %s is sent to %s, local info %s, len:%d", CONN_GET_INST_LABEL(pConn), pConn, TMSG_INFO(pHead->msgType), pConn->dst, pConn->src, msgLen); @@ -1767,16 +1767,18 @@ static void cliAsyncCb(uv_async_t* handle) { QUEUE_MOVE(&item->qmsg, &wq); taosThreadMutexUnlock(&item->mtx); - // void* pIter = taosHashIterate(pThrd->msgCount, NULL); - // while (pIter != NULL) { - // int* count = pIter; - // size_t len = 0; - // char* key = taosHashGetKey(pIter, &len); - // tDebug("key: %s count: %d", key, *count); + void* pIter = taosHashIterate(pThrd->msgCount, NULL); + while (pIter != NULL) { + int* count = pIter; + size_t len = 0; + char* key = taosHashGetKey(pIter, &len); + if (*count != 0) { + tDebug("key: %s count: %d", key, *count); + } - // pIter = taosHashIterate(pThrd->msgCount, pIter); - //} - tDebug("conn count: %d", pThrd->newConnCount); + pIter = taosHashIterate(pThrd->msgCount, pIter); + } + tDebug("all conn count: %d", pThrd->newConnCount); int8_t supportBatch = pTransInst->supportBatch; if (supportBatch == 0) { @@ -2362,18 +2364,18 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { } } - // if ((pResp->msgType - 1) > 0) { - // char buf[128] = {0}; - // sprintf(buf, "%s", TMSG_INFO(pResp->msgType - 1)); - // int* count = taosHashGet(pThrd->msgCount, buf, strlen(buf)); - // if (NULL == 0) { - // int localCount = 0; - // taosHashPut(pThrd->msgCount, buf, strlen(buf), &localCount, sizeof(localCount)); - //} else { - // int localCount = *count - 1; - // taosHashPut(pThrd->msgCount, buf, strlen(buf), &localCount, sizeof(localCount)); - //} - //} + if ((pResp->msgType - 1) > 0) { + char buf[128] = {0}; + sprintf(buf, "%s", TMSG_INFO(pResp->msgType - 1)); + int* count = taosHashGet(pThrd->msgCount, buf, sizeof(buf)); + if (NULL == 0) { + int localCount = 0; + taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); + } else { + int localCount = *count - 1; + taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); + } + } if (pCtx->pSem != NULL) { tGTrace("%s conn %p(sync) handle resp", CONN_GET_INST_LABEL(pConn), pConn); if (pCtx->pRsp == NULL) { From 566d233c1cbb14b8acc5fdea98f3f1edbebf75af Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sat, 4 Mar 2023 19:28:03 +0800 Subject: [PATCH 017/154] add debug --- source/libs/transport/src/transCli.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index e7da5b1c69..0774492dbb 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -1115,7 +1115,8 @@ void cliSend(SCliConn* pConn) { msgLen = (int32_t)ntohl((uint32_t)(pHead->msgLen)); } - if (pHead->msgType != 0) { + if ((pHead->msgType > TDMT_VND_TMQ_MSG && pHead->msgType < TDMT_VND_TMQ_MAX_MSG) || + (pHead->msgType > TDMT_MND_MSG && pHead->msgType < TDMT_MND_MAX_MSG)) { char buf[128] = {0}; sprintf(buf, "%s", TMSG_INFO(pHead->msgType)); int* count = taosHashGet(pThrd->msgCount, buf, sizeof(buf)); @@ -2364,7 +2365,8 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { } } - if ((pResp->msgType - 1) > 0) { + if ((pResp->msgType - 1 > TDMT_VND_TMQ_MSG && pResp->msgType - 1 < TDMT_VND_TMQ_MAX_MSG) || + (pResp->msgType - 1 > TDMT_MND_MSG && pResp->msgType - 1 < TDMT_MND_MAX_MSG)) { char buf[128] = {0}; sprintf(buf, "%s", TMSG_INFO(pResp->msgType - 1)); int* count = taosHashGet(pThrd->msgCount, buf, sizeof(buf)); From dfeed5a4951a530ce4cc40fc91c7f60833f531d5 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 4 Mar 2023 22:14:30 +0800 Subject: [PATCH 018/154] refactor: disable 0 topics; --- include/util/taoserror.h | 1 + source/client/src/clientTmq.c | 7 ++++++- source/util/src/terror.c | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 5106196ccd..61e181bc36 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -558,6 +558,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_TQ_GROUP_NOT_SET TAOS_DEF_ERROR_CODE(0, 0x0A0B) #define TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND TAOS_DEF_ERROR_CODE(0, 0x0A0C) #define TSDB_CODE_TQ_NO_COMMITTED_OFFSET TAOS_DEF_ERROR_CODE(0, 0x0A0D) +#define TSDB_CODE_TQ_NO_SUBSCRIBE_TOPICS TAOS_DEF_ERROR_CODE(0, 0x0A0E) // wal // #define TSDB_CODE_WAL_APP_ERROR TAOS_DEF_ERROR_CODE(0, 0x1000) // 2.x diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index d08cabd27e..00e29f5ecc 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1076,7 +1076,12 @@ int32_t tmq_subscribe(tmq_t* tmq, const tmq_list_t* topic_list) { SCMSubscribeReq req = {0}; int32_t code = 0; - tscDebug("consumer:0x%" PRIx64 " cgroup:%s, subscribe %d topics", tmq->consumerId, tmq->groupId, sz); + if (sz == 0) { + tscDebug("consumer:0x%" PRIx64 " cgroup:%s, subscribe %d topics, not allowed", tmq->consumerId, tmq->groupId, sz); + return TSDB_CODE_TQ_NO_SUBSCRIBE_TOPICS; + } else { + tscDebug("consumer:0x%" PRIx64 " cgroup:%s, subscribe %d topics", tmq->consumerId, tmq->groupId, sz); + } req.consumerId = tmq->consumerId; tstrncpy(req.clientId, tmq->clientId, 256); diff --git a/source/util/src/terror.c b/source/util/src/terror.c index b22e2e924f..6e63776afe 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -435,7 +435,8 @@ TAOS_DEFINE_ERROR(TSDB_CODE_TQ_META_KEY_NOT_IN_TXN, "TQ meta key not in tx TAOS_DEFINE_ERROR(TSDB_CODE_TQ_META_KEY_DUP_IN_TXN, "TQ met key dup in txn") TAOS_DEFINE_ERROR(TSDB_CODE_TQ_GROUP_NOT_SET, "TQ group not exist") TAOS_DEFINE_ERROR(TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND, "TQ table schema not found") -TAOS_DEFINE_ERROR(TSDB_CODE_TQ_NO_COMMITTED_OFFSET, "TQ no commited offset") +TAOS_DEFINE_ERROR(TSDB_CODE_TQ_NO_COMMITTED_OFFSET, "TQ no committed offset") +TAOS_DEFINE_ERROR(TSDB_CODE_TQ_NO_SUBSCRIBE_TOPICS, "TQ no topics") // wal TAOS_DEFINE_ERROR(TSDB_CODE_WAL_FILE_CORRUPTED, "WAL file is corrupted") From bf8b36901a0be5602481e22f1c148e9ceee629ec Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sat, 4 Mar 2023 23:37:50 +0800 Subject: [PATCH 019/154] add crash --- source/libs/transport/src/transCli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 0774492dbb..7d648d69ac 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -877,7 +877,7 @@ static SCliConn* cliCreateConn(SCliThrd* pThrd) { static void cliDestroyConn(SCliConn* conn, bool clear) { SCliThrd* pThrd = conn->hostThrd; tTrace("%s conn %p remove from conn pool", CONN_GET_INST_LABEL(conn), conn); - + conn->broken = true; QUEUE_REMOVE(&conn->q); QUEUE_INIT(&conn->q); @@ -1262,7 +1262,7 @@ static void cliSendBatchCb(uv_write_t* req, int status) { } else { tDebug("%s conn %p succ to send batch msg, batch size:%d, msgLen:%d", CONN_GET_INST_LABEL(conn), conn, p->wLen, p->batchSize); - if (!uv_is_closing((uv_handle_t*)&conn->stream)) { + if (!uv_is_closing((uv_handle_t*)&conn->stream) && conn->broken == false) { if (nxtBatch != NULL) { conn->pBatch = nxtBatch; cliSendBatch(conn); From fbad444981627d6079210c4b17ae433f9d4c1c92 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sun, 5 Mar 2023 10:52:16 +0800 Subject: [PATCH 020/154] change parameter --- source/client/src/clientEnv.c | 4 ++-- source/common/src/tglobal.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/client/src/clientEnv.c b/source/client/src/clientEnv.c index 79c5baf43d..e3e20ee85d 100644 --- a/source/client/src/clientEnv.c +++ b/source/client/src/clientEnv.c @@ -159,9 +159,9 @@ void *openTransporter(const char *user, const char *auth, int32_t numOfThread) { rpcInit.retryMaxInterval = tsRedirectMaxPeriod; rpcInit.retryMaxTimouet = tsMaxRetryWaitTime; - int32_t connLimitNum = tsNumOfRpcSessions / (tsNumOfRpcThreads * 5); + int32_t connLimitNum = tsNumOfRpcSessions / (tsNumOfRpcThreads * 3); connLimitNum = TMAX(connLimitNum, 10); - connLimitNum = TMIN(connLimitNum, 500); + connLimitNum = TMIN(connLimitNum, 1000); rpcInit.connLimitNum = connLimitNum; rpcInit.timeToGetConn = tsTimeToGetAvailableConn; diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 4bb64e5fd6..0d03e1a11a 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -41,7 +41,7 @@ bool tsPrintAuth = false; // queue & threads int32_t tsNumOfRpcThreads = 1; -int32_t tsNumOfRpcSessions = 6000; +int32_t tsNumOfRpcSessions = 10000; int32_t tsTimeToGetAvailableConn = 500000; int32_t tsNumOfCommitThreads = 2; int32_t tsNumOfTaskQueueThreads = 4; From 167f4de9037241e57aea6b7243baed3b23cbb78b Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sun, 5 Mar 2023 11:06:55 +0800 Subject: [PATCH 021/154] fix debug info --- source/libs/transport/src/transCli.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 7d648d69ac..15fb20856c 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -1116,7 +1116,8 @@ void cliSend(SCliConn* pConn) { } if ((pHead->msgType > TDMT_VND_TMQ_MSG && pHead->msgType < TDMT_VND_TMQ_MAX_MSG) || - (pHead->msgType > TDMT_MND_MSG && pHead->msgType < TDMT_MND_MAX_MSG)) { + (pHead->msgType > TDMT_MND_MSG && pHead->msgType < TDMT_MND_MAX_MSG) || pHead->msgType == TDMT_VND_SUBMIT || + pHead->msgType == TDMT_MND_HEARTBEAT) { char buf[128] = {0}; sprintf(buf, "%s", TMSG_INFO(pHead->msgType)); int* count = taosHashGet(pThrd->msgCount, buf, sizeof(buf)); @@ -2366,7 +2367,8 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { } if ((pResp->msgType - 1 > TDMT_VND_TMQ_MSG && pResp->msgType - 1 < TDMT_VND_TMQ_MAX_MSG) || - (pResp->msgType - 1 > TDMT_MND_MSG && pResp->msgType - 1 < TDMT_MND_MAX_MSG)) { + (pResp->msgType - 1 > TDMT_MND_MSG && pResp->msgType - 1 < TDMT_MND_MAX_MSG) || + pResp->msgType - 1 == TDMT_VND_SUBMIT_RSP || pResp->msgType - 1 == TDMT_MND_HEARTBEAT_RSP) { char buf[128] = {0}; sprintf(buf, "%s", TMSG_INFO(pResp->msgType - 1)); int* count = taosHashGet(pThrd->msgCount, buf, sizeof(buf)); From 7986e1fd49edd9eac9c9676a917bb469ad7040ae Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sun, 5 Mar 2023 11:08:11 +0800 Subject: [PATCH 022/154] fix debug info --- source/libs/transport/src/transCli.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 15fb20856c..99c9285018 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -692,6 +692,7 @@ static SCliConn* getConnFromPool2(SCliThrd* pThrd, char* key, SCliMsg** pMsg) { } list->numOfConn++; } + tTrace("%s numOfConn: %d, limit: %d", pTransInst->label, list->numOfConn, pTransInst->connLimitNum); return NULL; } From e6ec795b4d2c7ba10ed2ea2de1edf9bb74a2175e Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sun, 5 Mar 2023 11:36:01 +0800 Subject: [PATCH 023/154] fix debug info --- include/common/tmsg.h | 19 ++++++++++++++----- source/libs/transport/src/transCli.c | 8 ++------ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 41bc873a3b..9a2439f0cf 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -66,6 +66,15 @@ extern int32_t tMsgDict[]; typedef uint16_t tmsg_t; +static inline bool tmsgIsValid(tmsg_t type) { + if (type < TDMT_DND_MAX_MSG || type < TDMT_MND_MAX_MSG || type < TDMT_VND_MAX_MSG || type < TDMT_SCH_MAX_MSG || + type < TDMT_STREAM_MAX_MSG || type < TDMT_MON_MAX_MSG || type < TDMT_SYNC_MAX_MSG || type < TDMT_VND_STREAM_MSG || + type < TDMT_VND_TMQ_MSG || type < TDMT_VND_TMQ_MAX_MSG) { + return true; + } else { + return false; + } +} static inline bool vnodeIsMsgBlock(tmsg_t type) { return (type == TDMT_VND_CREATE_TABLE) || (type == TDMT_VND_ALTER_TABLE) || (type == TDMT_VND_DROP_TABLE) || (type == TDMT_VND_UPDATE_TAG_VAL) || (type == TDMT_VND_ALTER_CONFIRM); @@ -1911,10 +1920,10 @@ typedef struct { } SMqConsumerLostMsg, SMqConsumerRecoverMsg, SMqConsumerClearMsg; typedef struct { - int64_t consumerId; - char cgroup[TSDB_CGROUP_LEN]; - char clientId[256]; - SArray* topicNames; // SArray + int64_t consumerId; + char cgroup[TSDB_CGROUP_LEN]; + char clientId[256]; + SArray* topicNames; // SArray } SCMSubscribeReq; static FORCE_INLINE int32_t tSerializeSCMSubscribeReq(void** buf, const SCMSubscribeReq* pReq) { @@ -2691,7 +2700,7 @@ typedef struct { char subKey[TSDB_SUBSCRIBE_KEY_LEN]; int8_t subType; int8_t withMeta; - char* qmsg; //SubPlanToString + char* qmsg; // SubPlanToString int64_t suid; } SMqRebVgReq; diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 99c9285018..c4f0b63ffc 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -1116,9 +1116,7 @@ void cliSend(SCliConn* pConn) { msgLen = (int32_t)ntohl((uint32_t)(pHead->msgLen)); } - if ((pHead->msgType > TDMT_VND_TMQ_MSG && pHead->msgType < TDMT_VND_TMQ_MAX_MSG) || - (pHead->msgType > TDMT_MND_MSG && pHead->msgType < TDMT_MND_MAX_MSG) || pHead->msgType == TDMT_VND_SUBMIT || - pHead->msgType == TDMT_MND_HEARTBEAT) { + if (tmsgIsValid(pHead->msgType)) { char buf[128] = {0}; sprintf(buf, "%s", TMSG_INFO(pHead->msgType)); int* count = taosHashGet(pThrd->msgCount, buf, sizeof(buf)); @@ -2367,9 +2365,7 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { } } - if ((pResp->msgType - 1 > TDMT_VND_TMQ_MSG && pResp->msgType - 1 < TDMT_VND_TMQ_MAX_MSG) || - (pResp->msgType - 1 > TDMT_MND_MSG && pResp->msgType - 1 < TDMT_MND_MAX_MSG) || - pResp->msgType - 1 == TDMT_VND_SUBMIT_RSP || pResp->msgType - 1 == TDMT_MND_HEARTBEAT_RSP) { + if (tmsgIsValid(pResp->msgType - 1)) { char buf[128] = {0}; sprintf(buf, "%s", TMSG_INFO(pResp->msgType - 1)); int* count = taosHashGet(pThrd->msgCount, buf, sizeof(buf)); From ee0bf9c501afb8421152dd41e94c02e9da1d6723 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sun, 5 Mar 2023 12:42:56 +0800 Subject: [PATCH 024/154] fix debug info --- source/libs/transport/src/transCli.c | 36 ++++++++++++++++++---------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index c4f0b63ffc..b97597dc65 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -1116,18 +1116,18 @@ void cliSend(SCliConn* pConn) { msgLen = (int32_t)ntohl((uint32_t)(pHead->msgLen)); } - if (tmsgIsValid(pHead->msgType)) { - char buf[128] = {0}; - sprintf(buf, "%s", TMSG_INFO(pHead->msgType)); - int* count = taosHashGet(pThrd->msgCount, buf, sizeof(buf)); - if (NULL == 0) { - int localCount = 1; - taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); - } else { - int localCount = *count + 1; - taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); - } - } + // if (tmsgIsValid(pHead->msgType)) { + // char buf[128] = {0}; + // sprintf(buf, "%s", TMSG_INFO(pHead->msgType)); + // int* count = taosHashGet(pThrd->msgCount, buf, sizeof(buf)); + // if (NULL == 0) { + // int localCount = 1; + // taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); + // } else { + // int localCount = *count + 1; + // taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); + // } + // } tGDebug("%s conn %p %s is sent to %s, local info %s, len:%d", CONN_GET_INST_LABEL(pConn), pConn, TMSG_INFO(pHead->msgType), pConn->dst, pConn->src, msgLen); @@ -1523,6 +1523,18 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) { destroyCmsg(pMsg); return; } + if (tmsgIsValid(pMsg->msg.msgType)) { + char buf[128] = {0}; + sprintf(buf, "%s", TMSG_INFO(pMsg->msg.msgType)); + int* count = taosHashGet(pThrd->msgCount, buf, sizeof(buf)); + if (NULL == 0) { + int localCount = 1; + taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); + } else { + int localCount = *count + 1; + taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); + } + } char* fqdn = EPSET_GET_INUSE_IP(&pMsg->ctx->epSet); uint16_t port = EPSET_GET_INUSE_PORT(&pMsg->ctx->epSet); From 22a85734c69528e977663a2472b51e4b17cac079 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sun, 5 Mar 2023 13:23:50 +0800 Subject: [PATCH 025/154] fix(mq): add more chek for balance couner to avoid the negative value emerges. --- include/util/taoserror.h | 1 - source/client/src/clientTmq.c | 7 +------ source/client/test/clientTests.cpp | 9 +++++++- source/dnode/mnode/impl/src/mndConsumer.c | 24 ++++++++++++++++------ source/dnode/mnode/impl/src/mndMain.c | 3 +++ source/dnode/mnode/impl/src/mndSubscribe.c | 6 +++--- source/dnode/vnode/src/tq/tqRead.c | 9 ++++---- source/libs/executor/src/scanoperator.c | 6 +++++- source/util/src/terror.c | 1 - 9 files changed, 42 insertions(+), 24 deletions(-) diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 61e181bc36..5106196ccd 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -558,7 +558,6 @@ int32_t* taosGetErrno(); #define TSDB_CODE_TQ_GROUP_NOT_SET TAOS_DEF_ERROR_CODE(0, 0x0A0B) #define TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND TAOS_DEF_ERROR_CODE(0, 0x0A0C) #define TSDB_CODE_TQ_NO_COMMITTED_OFFSET TAOS_DEF_ERROR_CODE(0, 0x0A0D) -#define TSDB_CODE_TQ_NO_SUBSCRIBE_TOPICS TAOS_DEF_ERROR_CODE(0, 0x0A0E) // wal // #define TSDB_CODE_WAL_APP_ERROR TAOS_DEF_ERROR_CODE(0, 0x1000) // 2.x diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 00e29f5ecc..d08cabd27e 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1076,12 +1076,7 @@ int32_t tmq_subscribe(tmq_t* tmq, const tmq_list_t* topic_list) { SCMSubscribeReq req = {0}; int32_t code = 0; - if (sz == 0) { - tscDebug("consumer:0x%" PRIx64 " cgroup:%s, subscribe %d topics, not allowed", tmq->consumerId, tmq->groupId, sz); - return TSDB_CODE_TQ_NO_SUBSCRIBE_TOPICS; - } else { - tscDebug("consumer:0x%" PRIx64 " cgroup:%s, subscribe %d topics", tmq->consumerId, tmq->groupId, sz); - } + tscDebug("consumer:0x%" PRIx64 " cgroup:%s, subscribe %d topics", tmq->consumerId, tmq->groupId, sz); req.consumerId = tmq->consumerId; tstrncpy(req.clientId, tmq->clientId, 256); diff --git a/source/client/test/clientTests.cpp b/source/client/test/clientTests.cpp index 59c931d9aa..2f3d600019 100644 --- a/source/client/test/clientTests.cpp +++ b/source/client/test/clientTests.cpp @@ -925,7 +925,7 @@ TEST(clientCase, subscription_test) { // 创建订阅 topics 列表 tmq_list_t* topicList = tmq_list_new(); - tmq_list_append(topicList, "topic_t1"); +// tmq_list_append(topicList, "topic_t1"); // 启动订阅 tmq_subscribe(tmq, topicList); @@ -938,6 +938,8 @@ TEST(clientCase, subscription_test) { int32_t msgCnt = 0; int32_t timeout = 5000; + int32_t count = 0; + while (1) { TAOS_RES* pRes = tmq_consumer_poll(tmq, timeout); if (pRes) { @@ -952,6 +954,11 @@ TEST(clientCase, subscription_test) { printf("db: %s\n", dbName); printf("vgroup id: %d\n", vgroupId); + if (count ++ > 20) { + tmq_unsubscribe(tmq); + break; + } + while (1) { TAOS_ROW row = taos_fetch_row(pRes); if (row == NULL) break; diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 90f5f8c839..e52b046053 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -82,18 +82,29 @@ bool mndRebTryStart() { } void mndRebEnd() { - int32_t val = atomic_sub_fetch_32(&mqRebInExecCnt, 1); - mInfo("rebalance end, rebalance count:%d", val); + mndRebCntDec(); } void mndRebCntInc() { int32_t val = atomic_add_fetch_32(&mqRebInExecCnt, 1); - mInfo("rebalance trans start, rebalance count:%d", val); + mInfo("rebalance trans start, rebalance counter:%d", val); } void mndRebCntDec() { - int32_t val = atomic_sub_fetch_32(&mqRebInExecCnt, 1); - mInfo("rebalance trans end, rebalance count:%d", val); + while (1) { + int32_t val = atomic_load_32(&mqRebInExecCnt); + if (val <= 0) { + mError("rebalance trans end, rebalance counter:%d should not be less equalled than 0, ignore counter desc", val); + break; + } + + int32_t newVal = val - 1; + int32_t oldVal = atomic_val_compare_exchange_32(&mqRebInExecCnt, val, newVal); + if (oldVal == val) { + mInfo("rebalance trans end, rebalance counter:%d", newVal); + break; + } + } } static int32_t mndProcessConsumerLostMsg(SRpcMsg *pMsg) { @@ -308,6 +319,7 @@ static int32_t mndProcessMqTimerMsg(SRpcMsg *pMsg) { taosRUnLockLatch(&pConsumer->lock); } else if (status == MQ_CONSUMER_STATUS__MODIFY) { taosRLockLatch(&pConsumer->lock); + int32_t newTopicNum = taosArrayGetSize(pConsumer->rebNewTopics); for (int32_t i = 0; i < newTopicNum; i++) { char key[TSDB_SUBSCRIBE_KEY_LEN]; @@ -700,6 +712,7 @@ int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) { // no topics need to be rebalanced if (taosArrayGetSize(pConsumerNew->rebNewTopics) == 0 && taosArrayGetSize(pConsumerNew->rebRemovedTopics) == 0) { +// mInfo(); goto _over; } @@ -1057,7 +1070,6 @@ static int32_t mndRetrieveConsumer(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock * } taosRLockLatch(&pConsumer->lock); - mDebug("showing consumer:0x%" PRIx64, pConsumer->consumerId); int32_t topicSz = taosArrayGetSize(pConsumer->assignedTopics); diff --git a/source/dnode/mnode/impl/src/mndMain.c b/source/dnode/mnode/impl/src/mndMain.c index b09a4f63a7..d83b969e2d 100644 --- a/source/dnode/mnode/impl/src/mndMain.c +++ b/source/dnode/mnode/impl/src/mndMain.c @@ -706,6 +706,9 @@ int32_t mndProcessRpcMsg(SRpcMsg *pMsg) { } else if (code == 0) { mGTrace("msg:%p, successfully processed", pMsg); } else { + if (code == -1) { + code = terrno; + } mGError("msg:%p, failed to process since %s, app:%p type:%s", pMsg, tstrerror(code), pMsg->info.ahandle, TMSG_INFO(pMsg->msgType)); } diff --git a/source/dnode/mnode/impl/src/mndSubscribe.c b/source/dnode/mnode/impl/src/mndSubscribe.c index 648014d97e..86f6976398 100644 --- a/source/dnode/mnode/impl/src/mndSubscribe.c +++ b/source/dnode/mnode/impl/src/mndSubscribe.c @@ -263,7 +263,7 @@ static int32_t mndDoRebalance(SMnode *pMnode, const SMqRebInputObj *pInput, SMqR imbConsumerNum = totalVgNum % afterRebConsumerNum; } - mInfo("sub:%s mq re-balance %d consumers: at least %d vg each, %d consumer has more vg", sub, + mInfo("sub:%s mq re-balance %d consumers: at least %d vgs each, %d consumers has more vgs", sub, afterRebConsumerNum, minVgCnt, imbConsumerNum); // 4. first scan: remove consumer more than wanted, put to remove hash @@ -591,13 +591,13 @@ static int32_t mndProcessRebalanceReq(SRpcMsg *pMsg) { rebOutput.pSub = mndCreateSubscription(pMnode, pTopic, pRebInfo->key); if (rebOutput.pSub == NULL) { - mError("mq rebalance %s failed create sub since %s, abort", pRebInfo->key, terrstr()); + mError("mq rebalance %s failed create sub since %s, ignore", pRebInfo->key, terrstr()); taosRUnLockLatch(&pTopic->lock); mndReleaseTopic(pMnode, pTopic); continue; } - memcpy(rebOutput.pSub->dbName, pTopic->db, TSDB_DB_FNAME_LEN); + memcpy(rebOutput.pSub->dbName, pTopic->db, TSDB_DB_FNAME_LEN); taosRUnLockLatch(&pTopic->lock); mndReleaseTopic(pMnode, pTopic); diff --git a/source/dnode/vnode/src/tq/tqRead.c b/source/dnode/vnode/src/tq/tqRead.c index f4c96d073b..8712a93bff 100644 --- a/source/dnode/vnode/src/tq/tqRead.c +++ b/source/dnode/vnode/src/tq/tqRead.c @@ -297,7 +297,7 @@ int32_t tqSeekVer(STqReader* pReader, int64_t ver, const char* id) { tqError("tmq poll: wal reader failed to seek to ver:%"PRId64" code:%s, %s", ver, tstrerror(terrno), id); return -1; } else { - tqError("tmq poll: wal reader seek to ver:%"PRId64" %s", ver, id); + tqDebug("tmq poll: wal reader seek to ver:%"PRId64" %s", ver, id); return 0; } } @@ -308,13 +308,12 @@ int32_t tqNextBlock(STqReader* pReader, SFetchRet* ret) { while (1) { if (!fromProcessedMsg) { if (walNextValidMsg(pReader->pWalReader) < 0) { - pReader->ver = - pReader->pWalReader->curVersion - pReader->pWalReader->curStopped; -// pReader->pWalReader->curVersion - (pReader->pWalReader->curInvalid | pReader->pWalReader->curStopped); + pReader->ver = pReader->pWalReader->curVersion - pReader->pWalReader->curStopped; ret->offset.type = TMQ_OFFSET__LOG; + ret->offset.version = pReader->ver; ret->fetchType = FETCH_TYPE__NONE; - tqDebug("return offset %" PRId64 ", no more valid", ret->offset.version); + tqDebug("return offset %" PRId64 ", no more valid msg in wal", ret->offset.version); return -1; } diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 8576ac74c7..ccc721996f 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -1632,8 +1632,12 @@ static SSDataBlock* doQueueScan(SOperatorInfo* pOperator) { while (1) { SFetchRet ret = {0}; if (tqNextBlock(pInfo->tqReader, &ret) < 0) { - qError("failed to get next log block since %s", terrstr()); + // if the end is reached, terrno is 0 + if (terrno != 0) { + qError("failed to get next log block since %s", terrstr()); + } } + if (ret.fetchType == FETCH_TYPE__DATA) { blockDataCleanup(pInfo->pRes); setBlockIntoRes(pInfo, &ret.data, true); diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 6e63776afe..33b562c8dd 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -436,7 +436,6 @@ TAOS_DEFINE_ERROR(TSDB_CODE_TQ_META_KEY_DUP_IN_TXN, "TQ met key dup in txn TAOS_DEFINE_ERROR(TSDB_CODE_TQ_GROUP_NOT_SET, "TQ group not exist") TAOS_DEFINE_ERROR(TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND, "TQ table schema not found") TAOS_DEFINE_ERROR(TSDB_CODE_TQ_NO_COMMITTED_OFFSET, "TQ no committed offset") -TAOS_DEFINE_ERROR(TSDB_CODE_TQ_NO_SUBSCRIBE_TOPICS, "TQ no topics") // wal TAOS_DEFINE_ERROR(TSDB_CODE_WAL_FILE_CORRUPTED, "WAL file is corrupted") From 42ba45e60d2aa7fa284ce5f2c5dd4c5718fbf0ab Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sun, 5 Mar 2023 13:25:00 +0800 Subject: [PATCH 026/154] fix debug info --- source/libs/transport/src/transCli.c | 1 - 1 file changed, 1 deletion(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index b97597dc65..79afe95342 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -804,7 +804,6 @@ static int32_t specifyConnRef(SCliConn* conn, bool update, int64_t handle) { static void cliAllocRecvBufferCb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) { SCliConn* conn = handle->data; SConnBuffer* pBuf = &conn->readBuf; - tTrace("%s conn %p alloc read buf", CONN_GET_INST_LABEL(conn), conn); transAllocBuffer(pBuf, buf); } static void cliRecvCb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) { From 6fafa8443e37332ce61a64c21e75b8eeef856a14 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sun, 5 Mar 2023 15:32:00 +0800 Subject: [PATCH 027/154] fix(query): sleep a little bit when errors occur. --- source/client/src/clientTmq.c | 5 +++-- source/dnode/mnode/impl/src/mndConsumer.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index d08cabd27e..f6a2c5fdc1 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1228,8 +1228,9 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { // in case of consumer mismatch, wait for 500ms and retry if (code == TSDB_CODE_TMQ_CONSUMER_MISMATCH) { -// taosMsleep(500); + taosMsleep(500); atomic_store_8(&tmq->status, TMQ_CONSUMER_STATUS__RECOVER); + tscDebug("consumer:0x%" PRIx64" wait for the re-balance, wait for 500ms and set status to be RECOVER", tmq->consumerId); } else if (code == TSDB_CODE_TQ_NO_COMMITTED_OFFSET) { SMqPollRspWrapper* pRspWrapper = taosAllocateQitem(sizeof(SMqPollRspWrapper), DEF_QITEM, 0); if (pRspWrapper == NULL) { @@ -1918,7 +1919,7 @@ TAOS_RES* tmq_consumer_poll(tmq_t* tmq, int64_t timeout) { // in no topic status, delayed task also need to be processed if (atomic_load_8(&tmq->status) == TMQ_CONSUMER_STATUS__INIT) { tscDebug("consumer:0x%" PRIx64 " poll return since consumer is init", tmq->consumerId); - // sleep for a while + taosMsleep(500); // sleep for a while return NULL; } diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index e52b046053..24974a1973 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -637,7 +637,7 @@ int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) { subscribe.cgroup, (int32_t) taosArrayGetSize(pTopicList)); pConsumerNew = tNewSMqConsumerObj(consumerId, cgroup); - tstrncpy(pConsumerNew->clientId, subscribe.clientId, 256); + tstrncpy(pConsumerNew->clientId, subscribe.clientId, tListLen(pConsumerNew->clientId)); // set the update type pConsumerNew->updateType = CONSUMER_UPDATE__MODIFY; From 3362b8a4caf3f3a446858010a9118b8351594f7d Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sun, 5 Mar 2023 15:38:11 +0800 Subject: [PATCH 028/154] fix mem leak --- source/libs/transport/src/transCli.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 79afe95342..1016b50542 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -890,6 +890,7 @@ static void cliDestroyConn(SCliConn* conn, bool clear) { connList->list->numOfConn--; } conn->list = NULL; + pThrd->newConnCount--; transReleaseExHandle(transGetRefMgt(), conn->refId); transRemoveExHandle(transGetRefMgt(), conn->refId); @@ -2074,6 +2075,7 @@ static void destroyThrdObj(SCliThrd* pThrd) { pIter = (void**)taosHashIterate(pThrd->batchCache, pIter); } taosHashCleanup(pThrd->batchCache); + taosHashCleanup(pThrd->msgCount); taosMemoryFree(pThrd); } From 54184cda3c322e514086ad57b64519befed26a07 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Mon, 6 Mar 2023 09:42:08 +0800 Subject: [PATCH 029/154] fix: should not set startFunc/stopFunc to 0. when the trans is not finished on taosd stop, it will cause the startFunc/stopFunc setting error --- source/dnode/mnode/impl/src/mndTrans.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c index eccabf2d5c..1ae61213ec 100644 --- a/source/dnode/mnode/impl/src/mndTrans.c +++ b/source/dnode/mnode/impl/src/mndTrans.c @@ -512,7 +512,7 @@ static int32_t mndTransActionInsert(SSdb *pSdb, STrans *pTrans) { if (fp) { (*fp)(pSdb->pMnode, pTrans->param, pTrans->paramLen); } - pTrans->startFunc = 0; + // pTrans->startFunc = 0; } return 0; @@ -555,7 +555,7 @@ static int32_t mndTransActionDelete(SSdb *pSdb, STrans *pTrans, bool callFunc) { if (fp) { (*fp)(pSdb->pMnode, pTrans->param, pTrans->paramLen); } - pTrans->stopFunc = 0; + // pTrans->stopFunc = 0; } mndTransDropData(pTrans); From da550029d893d53649d0b25b08b0ebf7dfa85d5b Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Mon, 6 Mar 2023 11:52:52 +0800 Subject: [PATCH 030/154] fix(tmq): fix memory error and adjust some logs. --- source/client/src/clientTmq.c | 2 +- source/dnode/mnode/impl/src/mndConsumer.c | 5 ++--- source/dnode/mnode/impl/src/mndSubscribe.c | 8 +++++--- source/dnode/mnode/impl/src/mndTrans.c | 1 + tests/script/tsim/tmq/consume.sh | 10 +++++----- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index f6a2c5fdc1..9f24deff94 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1291,7 +1291,7 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { tscDebug("consumer:0x%" PRIx64 " recv poll rsp, vgId:%d, req offset:%" PRId64 ", rsp offset:%" PRId64 " type %d, reqId:0x%"PRIx64, tmq->consumerId, pVg->vgId, pRspWrapper->dataRsp.reqOffset.version, pRspWrapper->dataRsp.rspOffset.version, - rspType, pParam->requestId); + rspType, requestId); } else if (rspType == TMQ_MSG_TYPE__POLL_META_RSP) { SDecoder decoder; tDecoderInit(&decoder, POINTER_SHIFT(pMsg->pData, sizeof(SMqRspHead)), pMsg->len - sizeof(SMqRspHead)); diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 24974a1973..f1ef83aca5 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -35,9 +35,9 @@ static const char *mndConsumerStatusName(int status); static int32_t mndConsumerActionInsert(SSdb *pSdb, SMqConsumerObj *pConsumer); static int32_t mndConsumerActionDelete(SSdb *pSdb, SMqConsumerObj *pConsumer); -static int32_t mndConsumerActionUpdate(SSdb *pSdb, SMqConsumerObj *pConsumer, SMqConsumerObj *pNewConsumer); +static int32_t mndConsumerActionUpdate(SSdb *pSdb, SMqConsumerObj *pOldConsumer, SMqConsumerObj *pNewConsumer); static int32_t mndProcessConsumerMetaMsg(SRpcMsg *pMsg); -static int32_t mndRetrieveConsumer(SRpcMsg *pMsg, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows); +static int32_t mndRetrieveConsumer(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows); static void mndCancelGetNextConsumer(SMnode *pMnode, void *pIter); static int32_t mndProcessSubscribeReq(SRpcMsg *pMsg); @@ -712,7 +712,6 @@ int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) { // no topics need to be rebalanced if (taosArrayGetSize(pConsumerNew->rebNewTopics) == 0 && taosArrayGetSize(pConsumerNew->rebRemovedTopics) == 0) { -// mInfo(); goto _over; } diff --git a/source/dnode/mnode/impl/src/mndSubscribe.c b/source/dnode/mnode/impl/src/mndSubscribe.c index 86f6976398..21539a6313 100644 --- a/source/dnode/mnode/impl/src/mndSubscribe.c +++ b/source/dnode/mnode/impl/src/mndSubscribe.c @@ -444,7 +444,9 @@ static int32_t mndDoRebalance(SMnode *pMnode, const SMqRebInputObj *pInput, SMqR static int32_t mndPersistRebResult(SMnode *pMnode, SRpcMsg *pMsg, const SMqRebOutputObj *pOutput) { STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_DB_INSIDE, pMsg, "tmq-reb"); - if (pTrans == NULL) return -1; + if (pTrans == NULL) { + return -1; + } mndTransSetDbName(pTrans, pOutput->pSub->dbName, NULL); if (mndTrancCheckConflict(pMnode, pTrans) != 0) { @@ -616,9 +618,9 @@ static int32_t mndProcessRebalanceReq(SRpcMsg *pMsg) { // if add more consumer to balanced subscribe, // possibly no vg is changed - + // when each topic is re-balanced, issue an trans to save the results in sdb. if (mndPersistRebResult(pMnode, pMsg, &rebOutput) < 0) { - mError("mq re-balance persist re-balance output error, possibly vnode splitted or dropped"); + mError("mq re-balance persist output error, possibly vnode splitted or dropped"); } taosArrayDestroy(pRebInfo->lostConsumers); diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c index ff8b4dd9ce..39b4252618 100644 --- a/source/dnode/mnode/impl/src/mndTrans.c +++ b/source/dnode/mnode/impl/src/mndTrans.c @@ -875,6 +875,7 @@ int32_t mndTrancCheckConflict(SMnode *pMnode, STrans *pTrans) { } } + if (mndCheckTransConflict(pMnode, pTrans)) { terrno = TSDB_CODE_MND_TRANS_CONFLICT; mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); diff --git a/tests/script/tsim/tmq/consume.sh b/tests/script/tsim/tmq/consume.sh index 001ce6ae49..f0c9197a59 100755 --- a/tests/script/tsim/tmq/consume.sh +++ b/tests/script/tsim/tmq/consume.sh @@ -79,15 +79,15 @@ CFG_DIR=$PRG_DIR/cfg LOG_DIR=$PRG_DIR/log echo "------------------------------------------------------------------------" +echo "TOP_DIR: $TOP_DIR" echo "BUILD_DIR: $BUILD_DIR" echo "SIM_DIR : $SIM_DIR" echo "CFG_DIR : $CFG_DIR" - -echo "PROGRAM: $PROGRAM -echo "CFG_DIR: $CFG_DIR -echo "POLL_DELAY: $POLL_DELAY -echo "DB_NAME: $DB_NAME +echo "PROGRAM: $PROGRAM" +echo "CFG_DIR: $CFG_DIR" +echo "POLL_DELAY: $POLL_DELAY" +echo "DB_NAME: $DB_NAME" echo "------------------------------------------------------------------------" if [ "$EXEC_OPTON" = "start" ]; then From 933fa721d6621e003f9d170ddad2a6d001a23e9c Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao@163.com> Date: Mon, 6 Mar 2023 15:49:57 +0800 Subject: [PATCH 031/154] fix:return empty ssdatablock --- source/libs/executor/src/scanoperator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 38822a4565..eea0f77cf6 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -1907,7 +1907,9 @@ FETCH_NEXT_BLOCK: doFilter(pInfo->pRes, pOperator->exprSupp.pFilterInfo, NULL); pInfo->pRes->info.dataLoad = 1; blockDataUpdateTsWindow(pInfo->pRes, pInfo->primaryTsIndex); - return pInfo->pRes; + if (pInfo->pRes->info.rows > 0) { + return pInfo->pRes; + } } break; case STREAM_SCAN_FROM_DELETE_DATA: { generateScanRange(pInfo, pInfo->pUpdateDataRes, pInfo->pUpdateRes); From 809f04dd7cfccd1b18fcd22c8cff379e1aaa3699 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Mon, 6 Mar 2023 16:32:22 +0800 Subject: [PATCH 032/154] change default valude --- source/common/src/tglobal.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 5c8f8e885d..83c80c355d 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -332,6 +332,10 @@ static int32_t taosAddClientCfg(SConfig *pCfg) { if (cfgAddBool(pCfg, "useAdapter", tsUseAdapter, true) != 0) return -1; if (cfgAddBool(pCfg, "crashReporting", tsEnableCrashReport, true) != 0) return -1; + tsNumOfRpcThreads = tsNumOfCores / 2; + tsNumOfRpcThreads = TRANGE(tsNumOfRpcThreads, 2, TSDB_MAX_RPC_THREADS); + if (cfgAddInt32(pCfg, "numOfRpcThreads", tsNumOfRpcThreads, 1, 1024, 0) != 0) return -1; + tsNumOfRpcSessions = TRANGE(tsNumOfRpcSessions, 100, 100000); if (cfgAddInt32(pCfg, "numOfRpcSessions", tsNumOfRpcSessions, 1, 100000, 0) != 0) return -1; From f01ea67a00cc06d894b3c0f5ca46b2b58700f26e Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Mon, 6 Mar 2023 17:15:14 +0800 Subject: [PATCH 033/154] change default valude --- source/libs/transport/src/transCli.c | 1 - 1 file changed, 1 deletion(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index e554580fc9..6f53674ef7 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -786,7 +786,6 @@ static int32_t specifyConnRef(SCliConn* conn, bool update, int64_t handle) { static void cliAllocRecvBufferCb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) { SCliConn* conn = handle->data; SConnBuffer* pBuf = &conn->readBuf; - tTrace("%s conn %p alloc read buf", CONN_GET_INST_LABEL(conn), conn); transAllocBuffer(pBuf, buf); } static void cliRecvCb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) { From 86ef6522ae56e60bdf68dee29d87bebc5e10b813 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Mon, 6 Mar 2023 17:40:02 +0800 Subject: [PATCH 034/154] fix:wal curVersion error if switch to wal --- source/dnode/vnode/src/tq/tqRead.c | 7 ++++++- source/libs/executor/src/scanoperator.c | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/tq/tqRead.c b/source/dnode/vnode/src/tq/tqRead.c index 8712a93bff..bf73cca925 100644 --- a/source/dnode/vnode/src/tq/tqRead.c +++ b/source/dnode/vnode/src/tq/tqRead.c @@ -308,7 +308,12 @@ int32_t tqNextBlock(STqReader* pReader, SFetchRet* ret) { while (1) { if (!fromProcessedMsg) { if (walNextValidMsg(pReader->pWalReader) < 0) { - pReader->ver = pReader->pWalReader->curVersion - pReader->pWalReader->curStopped; +// pReader->ver = pReader->pWalReader->curVersion - pReader->pWalReader->curStopped; + if(pReader->pWalReader->curInvalid == 0){ + pReader->ver = pReader->pWalReader->curVersion - pReader->pWalReader->curStopped; + }else{ + pReader->ver = walGetLastVer(pReader->pWalReader->pWal); + } ret->offset.type = TMQ_OFFSET__LOG; ret->offset.version = pReader->ver; diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index ccc721996f..7314e84c9b 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -1609,6 +1609,8 @@ static SSDataBlock* doQueueScan(SOperatorInfo* pOperator) { if (pResult && pResult->info.rows > 0) { qDebug("queue scan tsdb return %d rows min:%" PRId64 " max:%" PRId64, pResult->info.rows, pResult->info.window.skey, pResult->info.window.ekey); + qDebug("queue scan tsdb return %d rows min:%" PRId64 " max:%" PRId64 " wal curVersion:%" PRId64, pResult->info.rows, + pResult->info.window.skey, pResult->info.window.ekey, pInfo->tqReader->pWalReader->curVersion); pTaskInfo->streamInfo.returned = 1; return pResult; } else { From b2247a10cbe151dfffd0b368ffcba1f4df511e2f Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Mon, 6 Mar 2023 18:00:53 +0800 Subject: [PATCH 035/154] fix: last cache invalid write --- source/dnode/vnode/src/tsdb/tsdbCacheRead.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbCacheRead.c b/source/dnode/vnode/src/tsdb/tsdbCacheRead.c index 5bb224799a..478d21afc9 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCacheRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbCacheRead.c @@ -292,7 +292,8 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32 } for (int32_t j = 0; j < pr->numOfCols; ++j) { - pRes[j] = taosMemoryCalloc(1, sizeof(SFirstLastRes) + pr->pSchema->columns[slotIds[j]].bytes + VARSTR_HEADER_SIZE); + pRes[j] = taosMemoryCalloc( + 1, sizeof(SFirstLastRes) + pr->pSchema->columns[-1 == slotIds[j] ? 0 : slotIds[j]].bytes + VARSTR_HEADER_SIZE); SFirstLastRes* p = (SFirstLastRes*)varDataVal(pRes[j]); p->ts = INT64_MIN; } From f51a559d560ec8315d8ae48a1b74a86eae404c6b Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Mon, 6 Mar 2023 18:19:19 +0800 Subject: [PATCH 036/154] change default valude --- source/common/src/tglobal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 83c80c355d..b1c07aac4f 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -727,6 +727,7 @@ static int32_t taosSetClientCfg(SConfig *pCfg) { tsMaxRetryWaitTime = cfgGetItem(pCfg, "maxRetryWaitTime")->i32; + tsNumOfRpcThreads = cfgGetItem(pCfg, "numOfRpcThreads")->i32; tsNumOfRpcSessions = cfgGetItem(pCfg, "numOfRpcSessions")->i32; tsTimeToGetAvailableConn = cfgGetItem(pCfg, "timeToGetAvailableConn")->i32; From 56eba758064cc4bcb92d7f53b3f67ae13ab0bbcc Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Mon, 6 Mar 2023 19:26:51 +0800 Subject: [PATCH 037/154] enh: print mnode epSet on sending dnode status failure --- source/dnode/mgmt/mgmt_dnode/src/dmHandle.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c index 0724fcc63a..1dd87d0543 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c @@ -61,6 +61,16 @@ static void dmProcessStatusRsp(SDnodeMgmt *pMgmt, SRpcMsg *pRsp) { rpcFreeCont(pRsp->pCont); } +void dmEpSetToStr(char *buf, int32_t len, SEpSet *epSet) { + int32_t n = 0; + n += snprintf(buf + n, len - n, "%s", "{"); + for (int i = 0; i < epSet->numOfEps; i++) { + n += snprintf(buf + n, len - n, "%s:%d%s", epSet->eps[i].fqdn, epSet->eps[i].port, + (i + 1 < epSet->numOfEps ? ", " : "")); + } + n += snprintf(buf + n, len - n, "%s", "}"); +} + void dmSendStatusReq(SDnodeMgmt *pMgmt) { SStatusReq req = {0}; @@ -119,11 +129,9 @@ void dmSendStatusReq(SDnodeMgmt *pMgmt) { dmGetMnodeEpSet(pMgmt->pData, &epSet); rpcSendRecv(pMgmt->msgCb.clientRpc, &epSet, &rpcMsg, &rpcRsp); if (rpcRsp.code != 0) { - dError("failed to send status req since %s, numOfEps:%d inUse:%d", tstrerror(rpcRsp.code), epSet.numOfEps, - epSet.inUse); - for (int32_t i = 0; i < epSet.numOfEps; ++i) { - dDebug("index:%d, mnode ep:%s:%u", i, epSet.eps[i].fqdn, epSet.eps[i].port); - } + char tbuf[256]; + dmEpSetToStr(tbuf, sizeof(tbuf), &epSet); + dError("failed to send status req since %s, epSet:%s, inUse:%d", tstrerror(rpcRsp.code), tbuf, epSet.inUse); } dmProcessStatusRsp(pMgmt, &rpcRsp); } From c0a835ff58e99312637efd810680e061efa6e49c Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Mon, 6 Mar 2023 19:34:24 +0800 Subject: [PATCH 038/154] enh: rotate mnode epSet on sending dnode status failure --- source/dnode/mgmt/mgmt_dnode/src/dmHandle.c | 1 + source/dnode/mgmt/node_util/inc/dmUtil.h | 1 + source/dnode/mgmt/node_util/src/dmEps.c | 22 +++++++++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c index 1dd87d0543..228f301aec 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c @@ -129,6 +129,7 @@ void dmSendStatusReq(SDnodeMgmt *pMgmt) { dmGetMnodeEpSet(pMgmt->pData, &epSet); rpcSendRecv(pMgmt->msgCb.clientRpc, &epSet, &rpcMsg, &rpcRsp); if (rpcRsp.code != 0) { + dmRotateMnodeEpSet(pMgmt->pData); char tbuf[256]; dmEpSetToStr(tbuf, sizeof(tbuf), &epSet); dError("failed to send status req since %s, epSet:%s, inUse:%d", tstrerror(rpcRsp.code), tbuf, epSet.inUse); diff --git a/source/dnode/mgmt/node_util/inc/dmUtil.h b/source/dnode/mgmt/node_util/inc/dmUtil.h index 55ee6d6973..cfdea40477 100644 --- a/source/dnode/mgmt/node_util/inc/dmUtil.h +++ b/source/dnode/mgmt/node_util/inc/dmUtil.h @@ -166,6 +166,7 @@ int32_t dmReadEps(SDnodeData *pData); int32_t dmWriteEps(SDnodeData *pData); void dmUpdateEps(SDnodeData *pData, SArray *pDnodeEps); void dmGetMnodeEpSet(SDnodeData *pData, SEpSet *pEpSet); +void dmRotateMnodeEpSet(SDnodeData *pData); void dmGetMnodeEpSetForRedirect(SDnodeData *pData, SRpcMsg *pMsg, SEpSet *pEpSet); void dmSetMnodeEpSet(SDnodeData *pData, SEpSet *pEpSet); bool dmUpdateDnodeInfo(void *pData, int32_t *dnodeId, int64_t *clusterId, char *fqdn, uint16_t *port); diff --git a/source/dnode/mgmt/node_util/src/dmEps.c b/source/dnode/mgmt/node_util/src/dmEps.c index e9ab8a0460..784d2b425b 100644 --- a/source/dnode/mgmt/node_util/src/dmEps.c +++ b/source/dnode/mgmt/node_util/src/dmEps.c @@ -325,6 +325,28 @@ void dmGetMnodeEpSet(SDnodeData *pData, SEpSet *pEpSet) { taosThreadRwlockUnlock(&pData->lock); } +static FORCE_INLINE void dmSwapEps(SEp *epLhs, SEp *epRhs) { + SEp epTmp; + + epTmp.port = epLhs->port; + tstrncpy(epTmp.fqdn, epLhs->fqdn, tListLen(epTmp.fqdn)); + + epLhs->port = epRhs->port; + tstrncpy(epLhs->fqdn, epRhs->fqdn, tListLen(epLhs->fqdn)); + + epRhs->port = epTmp.port; + tstrncpy(epRhs->fqdn, epTmp.fqdn, tListLen(epRhs->fqdn)); +} + +void dmRotateMnodeEpSet(SDnodeData *pData) { + taosThreadRwlockRdlock(&pData->lock); + SEpSet *pEpSet = &pData->mnodeEps; + for (int i = 1; i < pEpSet->numOfEps; i++) { + dmSwapEps(&pEpSet->eps[i - 1], &pEpSet->eps[i]); + } + taosThreadRwlockUnlock(&pData->lock); +} + void dmGetMnodeEpSetForRedirect(SDnodeData *pData, SRpcMsg *pMsg, SEpSet *pEpSet) { dmGetMnodeEpSet(pData, pEpSet); dTrace("msg is redirected, handle:%p num:%d use:%d", pMsg->info.handle, pEpSet->numOfEps, pEpSet->inUse); From 561c7886749e2caf82a8a683434c5a7eb58bb199 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Mon, 6 Mar 2023 23:00:07 +0800 Subject: [PATCH 039/154] fix(query): fix apercentile crash in stream due to dereferencing invalid address --- source/libs/function/src/builtinsimpl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/libs/function/src/builtinsimpl.c b/source/libs/function/src/builtinsimpl.c index 9631aa76bb..6e3c8f111c 100644 --- a/source/libs/function/src/builtinsimpl.c +++ b/source/libs/function/src/builtinsimpl.c @@ -1940,6 +1940,7 @@ int32_t apercentileFunctionMerge(SqlFunctionCtx* pCtx) { } if (pInfo->algo != APERCT_ALGO_TDIGEST) { + buildHistogramInfo(pInfo); qDebug("%s after merge, total:%" PRId64 ", numOfEntry:%d, %p", __FUNCTION__, pInfo->pHisto->numOfElems, pInfo->pHisto->numOfEntries, pInfo->pHisto); } From 77f86c672997d332f006bd7dfcaa26c1734cbeec Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Mon, 6 Mar 2023 23:24:30 +0800 Subject: [PATCH 040/154] fix:wrong uasge of taosArrayGet --- source/dnode/mnode/impl/src/mndSubscribe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndSubscribe.c b/source/dnode/mnode/impl/src/mndSubscribe.c index 21539a6313..4d19110f31 100644 --- a/source/dnode/mnode/impl/src/mndSubscribe.c +++ b/source/dnode/mnode/impl/src/mndSubscribe.c @@ -772,7 +772,7 @@ static SSdbRow *mndSubActionDecode(SSdbRaw *pRaw) { if (pSub->unassignedVgs != NULL) { int32_t size = (int32_t)taosArrayGetSize(pSub->unassignedVgs); for (int32_t i = 0; i < size; ++i) { - SMqVgEp *pMqVgEp = taosArrayGet(pSub->unassignedVgs, i); + SMqVgEp *pMqVgEp = (SMqVgEp *)taosArrayGetP(pSub->unassignedVgs, i); tmsgUpdateDnodeEpSet(&pMqVgEp->epSet); } } @@ -782,7 +782,7 @@ static SSdbRow *mndSubActionDecode(SSdbRaw *pRaw) { SMqConsumerEp *pConsumerEp = pIter; int32_t size = (int32_t)taosArrayGetSize(pConsumerEp->vgs); for (int32_t i = 0; i < size; ++i) { - SMqVgEp *pMqVgEp = taosArrayGet(pConsumerEp->vgs, i); + SMqVgEp *pMqVgEp = (SMqVgEp *)taosArrayGetP(pConsumerEp->vgs, i); tmsgUpdateDnodeEpSet(&pMqVgEp->epSet); } pIter = taosHashIterate(pSub->consumerHash, pIter); From dd2137eab73dad3314a2bde69c58fed0965b44a3 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Tue, 7 Mar 2023 09:22:20 +0800 Subject: [PATCH 041/154] fix: empty ts range in nested query --- source/libs/parser/src/parTranslater.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index fd2d5d53f4..b70a0f83a4 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -2500,6 +2500,12 @@ static int32_t translateTable(STranslateContext* pCxt, SNode* pTable) { STempTableNode* pTempTable = (STempTableNode*)pTable; code = translateSubquery(pCxt, pTempTable->pSubquery); if (TSDB_CODE_SUCCESS == code) { + if (QUERY_NODE_SELECT_STMT == nodeType(pTempTable->pSubquery) && + ((SSelectStmt*)pTempTable->pSubquery)->isEmptyResult && + isSelectStmt(pCxt->pCurrStmt)) { + ((SSelectStmt*)pCxt->pCurrStmt)->isEmptyResult = true; + } + pTempTable->table.precision = getStmtPrecision(pTempTable->pSubquery); pTempTable->table.singleTable = stmtIsSingleTable(pTempTable->pSubquery); code = addNamespace(pCxt, pTempTable); From bc9eb47e04de72fe33ad1274a40e21622a7f1259 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 7 Mar 2023 10:14:39 +0800 Subject: [PATCH 042/154] fix: after the last cache is created, modify the schema and query again, resulting in taosd crash --- source/dnode/vnode/src/tsdb/tsdbCacheRead.c | 9 +++++---- source/libs/function/src/builtinsimpl.c | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbCacheRead.c b/source/dnode/vnode/src/tsdb/tsdbCacheRead.c index 478d21afc9..0ee42366de 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCacheRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbCacheRead.c @@ -38,16 +38,17 @@ static int32_t saveOneRow(SArray* pRow, SSDataBlock* pBlock, SCacheRowsReader* p *(int64_t*)p->buf = pColVal->ts; allNullRow = false; } else { - int32_t slotId = slotIds[i]; - SLastCol* pColVal = (SLastCol*)taosArrayGet(pRow, slotId); - + int32_t slotId = slotIds[i]; // add check for null value, caused by the modification of table schema (new column added). - if (pColVal == NULL) { + if (slotId >= taosArrayGetSize(pRow)) { p->ts = 0; p->isNull = true; + colDataSetNULL(pColInfoData, numOfRows); continue; } + SLastCol* pColVal = (SLastCol*)taosArrayGet(pRow, slotId); + p->ts = pColVal->ts; p->isNull = !COL_VAL_IS_VALUE(&pColVal->colVal); allNullRow = p->isNull & allNullRow; diff --git a/source/libs/function/src/builtinsimpl.c b/source/libs/function/src/builtinsimpl.c index 9631aa76bb..7f0c38f215 100644 --- a/source/libs/function/src/builtinsimpl.c +++ b/source/libs/function/src/builtinsimpl.c @@ -2461,6 +2461,9 @@ static int32_t firstLastFunctionMergeImpl(SqlFunctionCtx* pCtx, bool isFirstQuer int32_t numOfElems = 0; for (int32_t i = start; i < start + pInput->numOfRows; ++i) { + if (colDataIsNull_s(pCol, i)) { + continue; + } char* data = colDataGetData(pCol, i); SFirstLastRes* pInputInfo = (SFirstLastRes*)varDataVal(data); int32_t code = firstLastTransferInfo(pCtx, pInputInfo, pInfo, isFirstQuery, i); From 424a37fd3a73dd2a5b440a67fc939007b4d10175 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Tue, 7 Mar 2023 10:20:48 +0800 Subject: [PATCH 043/154] some code --- source/dnode/vnode/src/inc/vnodeInt.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/dnode/vnode/src/inc/vnodeInt.h b/source/dnode/vnode/src/inc/vnodeInt.h index c0d017e350..ca61a4dfce 100644 --- a/source/dnode/vnode/src/inc/vnodeInt.h +++ b/source/dnode/vnode/src/inc/vnodeInt.h @@ -460,6 +460,8 @@ struct SCompactInfo { SVnode* pVnode; int32_t flag; int64_t commitID; + int64_t stime; + int64_t etime; }; #ifdef __cplusplus From e1be1c8d0f3e84897ec8239422ff174156d64b3c Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Tue, 7 Mar 2023 11:53:45 +0800 Subject: [PATCH 044/154] test: add stream and topic in compatibility case --- tests/system-test/0-others/compa4096.json | 2 +- tests/system-test/0-others/compatibility.py | 91 ++++++++++++++++----- tests/system-test/0-others/testRoll.py | 83 +++++++++++++++++++ 3 files changed, 154 insertions(+), 22 deletions(-) create mode 100644 tests/system-test/0-others/testRoll.py diff --git a/tests/system-test/0-others/compa4096.json b/tests/system-test/0-others/compa4096.json index 5cc5d2084d..49e0ec1d8a 100644 --- a/tests/system-test/0-others/compa4096.json +++ b/tests/system-test/0-others/compa4096.json @@ -41,7 +41,7 @@ "interlace_rows": 0, "line_protocol": null, "tcp_transfer": "no", - "insert_rows": 10000, + "insert_rows": 1000, "childtable_limit": 0, "childtable_offset": 0, "rows_per_tbl": 0, diff --git a/tests/system-test/0-others/compatibility.py b/tests/system-test/0-others/compatibility.py index a5cded7a6b..8764a169fa 100644 --- a/tests/system-test/0-others/compatibility.py +++ b/tests/system-test/0-others/compatibility.py @@ -3,6 +3,8 @@ import taos import sys import os import time +import inspect +from taos.tmq import Consumer from pathlib import Path from util.log import * @@ -14,7 +16,7 @@ from util.dnodes import TDDnode from util.cluster import * import subprocess -BASEVERSION = "3.0.1.8" +BASEVERSION = "3.0.2.5" class TDTestCase: def caseDescription(self): ''' @@ -99,6 +101,7 @@ class TDTestCase: def run(self): + scriptsPath = os.path.dirname(os.path.realpath(__file__)) distro_id = distro.id() if distro_id == "alpine": tdLog.info(f"alpine skip compatibility test") @@ -128,19 +131,18 @@ class TDTestCase: tdLog.printNoPrefix(f"==========step1:prepare and check data in old version-{BASEVERSION}") tdLog.info(f" LD_LIBRARY_PATH=/usr/lib taosBenchmark -t {tableNumbers} -n {recordNumbers1} -y ") os.system(f"LD_LIBRARY_PATH=/usr/lib taosBenchmark -t {tableNumbers} -n {recordNumbers1} -y ") - sleep(3) + os.system(f"LD_LIBRARY_PATH=/usr/lib taos -s 'use test;create stream current_stream into current_stream_output_stb as select _wstart as `start`, _wend as wend, max(current) as max_current from meters where voltage <= 220 interval (5s);' ") + os.system('LD_LIBRARY_PATH=/usr/lib taos -s "use test;create stream power_stream into power_stream_output_stb as select ts, concat_ws(\\".\\", location, tbname) as meter_location, current*voltage*cos(phase) as active_power, current*voltage*sin(phase) as reactive_power from meters partition by tbname;" ') + os.system('LD_LIBRARY_PATH=/usr/lib taos -s "use test;show streams;" ') + os.system(f"cd {scriptsPath} && python3 testRoll.py") + os.system('LD_LIBRARY_PATH=/usr/lib taos -s "use test;show topics;" ') - # tdsqlF.query(f"select count(*) from {stb}") - # tdsqlF.checkData(0,0,tableNumbers*recordNumbers1) - os.system("pkill taosd") - self.checkProcessPid("taosd") - - print(f"start taosd: nohup taosd -c {cPath} & ") - os.system(f" nohup taosd -c {cPath} & " ) - sleep(10) + # print(f"start taosd: nohup taosd -c {cPath} & ") + # os.system(f" nohup taosd -c {cPath} & " ) tdLog.info(" LD_LIBRARY_PATH=/usr/lib taosBenchmark -f 0-others/compa4096.json -y ") os.system("LD_LIBRARY_PATH=/usr/lib taosBenchmark -f 0-others/compa4096.json -y") - os.system("pkill taosd") # make sure all the data are saved in disk. + os.system("LD_LIBRARY_PATH=/usr/lib taos -s 'flush database db4096 '") + os.system("pkill taosd") # make sure all the data are saved in disk. self.checkProcessPid("taosd") @@ -161,12 +163,14 @@ class TDTestCase: tdLog.printNoPrefix(f"==========step3:prepare and check data in new version-{nowServerVersion}") tdsql.query(f"select count(*) from {stb}") - tdsql.checkData(0,0,tableNumbers*recordNumbers1) - os.system(f"taosBenchmark -t {tableNumbers} -n {recordNumbers2} -y ") - tdsql.query(f"select count(*) from {stb}") - tdsql.checkData(0,0,tableNumbers*recordNumbers2) + tdsql.checkData(0,0,tableNumbers*recordNumbers1) + # tdsql.query("show streams;") + # os.system(f"taosBenchmark -t {tableNumbers} -n {recordNumbers2} -y ") + # tdsql.query("show streams;") + # tdsql.query(f"select count(*) from {stb}") + # tdsql.checkData(0,0,tableNumbers*recordNumbers2) tdsql.query(f"select count(*) from db4096.stb0") - tdsql.checkData(0,0,50000) + tdsql.checkData(0,0,5000) tdsql=tdCom.newTdSql() tdLog.printNoPrefix(f"==========step4:verify backticks in taos Sql-TD18542") @@ -183,13 +187,58 @@ class TDTestCase: tdsql.execute("insert into db.`ct4` using db.stb1 TAGS(4) values(now(),14);") tdsql.query("select * from db.ct4") tdsql.checkData(0,1,14) + print(1) + tdsql=tdCom.newTdSql() tdsql.query("describe information_schema.ins_databases;") qRows=tdsql.queryRows - for i in range(qRows) : - if tdsql.queryResult[i][0]=="retentions" : - return True - else: - return False + comFlag=True + j=0 + while comFlag: + for i in range(qRows) : + if tdsql.queryResult[i][0] == "retentions" : + print("parameters include retentions") + comFlag=False + break + else : + comFlag=True + j=j+1 + if j == qRows: + print("parameters don't include retentions") + caller = inspect.getframeinfo(inspect.stack()[0][0]) + args = (caller.filename, caller.lineno) + tdLog.exit("%s(%d) failed" % args) + tdsql.query("show streams;") + tdsql.checkRows(2) + tdsql.execute("insert into tmq_test.tb1 values (now, 11, 3.0, 'tmq test1');") + tdsql.execute("insert into tmq_test.tb2 values (now, 22, 3.0, 'tmq test2');") + + conn = taos.connect() + + consumer = Consumer( + { + "group.id": "tg75", + "client.id": "124", + "td.connect.user": "root", + "td.connect.pass": "taosdata", + "enable.auto.commit": "true", + "experimental.snapshot.enable": "true", + } + ) + consumer.subscribe(["tmq_test_topic"]) + + while True: + res = consumer.poll(10) + if not res: + break + err = res.error() + if err is not None: + raise err + val = res.value() + + for block in val: + print(block.fetchall()) + tdsql.query("show topics;") + tdsql.checkRows(1) def stop(self): tdSql.close() tdLog.success(f"{__file__} successfully executed") diff --git a/tests/system-test/0-others/testRoll.py b/tests/system-test/0-others/testRoll.py new file mode 100644 index 0000000000..56e5b3630a --- /dev/null +++ b/tests/system-test/0-others/testRoll.py @@ -0,0 +1,83 @@ +from taos.tmq import Consumer +import taos +import taosrest +import socket + + +def init_tmq_env(db, topic): + conn = taos.connect() + # conn.execute("create dnode test209") + # conn.execute("create dnode test216") + # conn.execute("create mnode on dnode 2") + # conn.execute("create mnode on dnode 3") + + conn.execute("drop topic if exists {}".format(topic)) + conn.execute("drop database if exists {}".format(db)) + conn.execute("create database if not exists {} replica 1 ".format(db)) + conn.select_db(db) + conn.execute( + "create stable if not exists stb1 (ts timestamp, c1 int, c2 float, c3 varchar(16)) tags(t1 int, t3 varchar(16))") + conn.execute("create table if not exists tb1 using stb1 tags(1, 't1')") + conn.execute("create table if not exists tb2 using stb1 tags(2, 't2')") + conn.execute("create table if not exists tb3 using stb1 tags(3, 't3')") + conn.execute("create topic if not exists {} as select ts, c1, c2, c3 from stb1".format(topic)) + conn.execute("insert into tb1 values (now+10s, 1, 1.0, 'tmq test')") + conn.execute("insert into tb2 values (now+100s, 2, 2.0, 'tmq test')") + conn.execute("insert into tb3 values (now+20s, 3, 3.0, 'tmq test')") + conn.execute("insert into tb3 values (now+30s, 4, 4.0, 'tmq test4')") + +def init_tmq_rest_env(db, topic): + host = socket.gethostname() + conn = taosrest.connect(url=f"http://{host}:6041") + + # conn.execute("create dnode test209") + # conn.execute("create dnode test216") + # conn.execute("create mnode on dnode 2") + # conn.execute("create mnode on dnode 3") + + conn.execute("drop topic if exists {}".format(topic)) + conn.execute("drop database if exists {}".format(db)) + conn.execute("create database if not exists {} replica 3 ".format(db)) + conn.select_db(db) + conn.execute( + "create stable if not exists stb1 (ts timestamp, c1 int, c2 float, c3 varchar(16)) tags(t1 int, t3 varchar(16))") + conn.execute("create table if not exists tb1 using stb1 tags(1, 't1')") + conn.execute("create table if not exists tb2 using stb1 tags(2, 't2')") + conn.execute("create table if not exists tb3 using stb1 tags(3, 't3')") + conn.execute("create topic if not exists {} as select ts, c1, c2, c3 from stb1".format(topic)) + conn.execute("insert into tb1 values (now+10s, 1, 1.0, 'tmq test')") + conn.execute("insert into tb2 values (now+100s, 2, 2.0, 'tmq test')") + conn.execute("insert into tb3 values (now+20s, 3, 3.0, 'tmq test')") + conn.execute("insert into tb3 values (now+30s, 4, 4.0, 'tmq test4')") + + + + +if __name__ == '__main__': + conn = taos.connect() + + init_tmq_env("tmq_test", "tmq_test_topic") # init env + # init_tmq_rest_env("tmq_test", "tmq_test_topic") + consumer = Consumer( + { + "group.id": "tg75", + "client.id": "124", + "td.connect.user": "root", + "td.connect.pass": "taosdata", + "enable.auto.commit": "true", + "experimental.snapshot.enable": "true", + } + ) + consumer.subscribe(["tmq_test_topic"]) + + while True: + res = consumer.poll(10) + if not res: + break + err = res.error() + if err is not None: + raise err + val = res.value() + + for block in val: + print(block.fetchall()) \ No newline at end of file From 53b3de03842193b2f9a9fb6dbf36c0ae801bcded Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Tue, 7 Mar 2023 12:38:38 +0800 Subject: [PATCH 045/154] test: add stream and topic in compatibility case --- tests/system-test/0-others/compatibility.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system-test/0-others/compatibility.py b/tests/system-test/0-others/compatibility.py index 8764a169fa..b9d0e1844b 100644 --- a/tests/system-test/0-others/compatibility.py +++ b/tests/system-test/0-others/compatibility.py @@ -16,7 +16,7 @@ from util.dnodes import TDDnode from util.cluster import * import subprocess -BASEVERSION = "3.0.2.5" +BASEVERSION = "3.0.1.8" class TDTestCase: def caseDescription(self): ''' From 0cd871010f7f6d38319e422c2b96249c6768043b Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao@163.com> Date: Tue, 7 Mar 2023 13:34:17 +0800 Subject: [PATCH 046/154] fix:fix fill history bug --- include/libs/executor/executor.h | 1 + source/libs/executor/src/executor.c | 8 +++++++- source/libs/executor/src/scanoperator.c | 1 + source/libs/stream/src/streamExec.c | 11 +++++++++-- source/libs/stream/src/streamRecover.c | 2 +- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/include/libs/executor/executor.h b/include/libs/executor/executor.h index 095d2f6d10..c3d2010351 100644 --- a/include/libs/executor/executor.h +++ b/include/libs/executor/executor.h @@ -219,6 +219,7 @@ int32_t qStreamRecoverFinish(qTaskInfo_t tinfo); int32_t qStreamRestoreParam(qTaskInfo_t tinfo); bool qStreamRecoverScanFinished(qTaskInfo_t tinfo); void qStreamCloseTsdbReader(void* task); +void resetTaskInfo(qTaskInfo_t tinfo); #ifdef __cplusplus } diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c index 9fe0f4f8a7..04d54a95ae 100644 --- a/source/libs/executor/src/executor.c +++ b/source/libs/executor/src/executor.c @@ -104,6 +104,12 @@ static void clearStreamBlock(SOperatorInfo* pOperator) { } } +void resetTaskInfo(qTaskInfo_t tinfo) { + SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo; + pTaskInfo->code = 0; + clearStreamBlock(pTaskInfo->pRoot); +} + static int32_t doSetStreamBlock(SOperatorInfo* pOperator, void* input, size_t numOfBlocks, int32_t type, char* id) { if (pOperator->operatorType != QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN) { if (pOperator->numOfDownstream == 0) { @@ -618,7 +624,7 @@ int32_t qExecTask(qTaskInfo_t tinfo, SSDataBlock** pRes, uint64_t* useconds) { pTaskInfo->cost.start = taosGetTimestampUs(); } - if (isTaskKilled(pTaskInfo) && pTaskInfo->code != TSDB_CODE_QRY_IN_EXEC) { + if (isTaskKilled(pTaskInfo)) { clearStreamBlock(pTaskInfo->pRoot); atomic_store_64(&pTaskInfo->owner, 0); qDebug("%s already killed, abort", GET_TASKID(pTaskInfo)); diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index a7178af20d..2f3b757241 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -946,6 +946,7 @@ SOperatorInfo* createTableSeqScanOperatorInfo(void* pReadHandle, SExecTaskInfo* } FORCE_INLINE void doClearBufferedBlocks(SStreamScanInfo* pInfo) { + qDebug("clear buff blocks:%d", (int32_t)taosArrayGetSize(pInfo->pBlockLists)); taosArrayClear(pInfo->pBlockLists); pInfo->validBlockIndex = 0; } diff --git a/source/libs/stream/src/streamExec.c b/source/libs/stream/src/streamExec.c index 9226d6ebb8..cb9774b584 100644 --- a/source/libs/stream/src/streamExec.c +++ b/source/libs/stream/src/streamExec.c @@ -20,6 +20,11 @@ static int32_t streamTaskExecImpl(SStreamTask* pTask, const void* data, SArray* pRes) { int32_t code; void* exec = pTask->exec.executor; + while(atomic_load_8(&pTask->taskStatus) != TASK_STATUS__NORMAL) { + qError("stream task wait for the end of fill history"); + taosMsleep(2); + continue; + } // set input const SStreamQueueItem* pItem = (const SStreamQueueItem*)data; @@ -58,6 +63,9 @@ static int32_t streamTaskExecImpl(SStreamTask* pTask, const void* data, SArray* SSDataBlock* output = NULL; uint64_t ts = 0; if ((code = qExecTask(exec, &output, &ts)) < 0) { + if (code == TSDB_CODE_QRY_IN_EXEC) { + resetTaskInfo(exec); + } /*ASSERT(false);*/ qError("unexpected stream execution, stream %" PRId64 " task: %d, since %s", pTask->streamId, pTask->taskId, terrstr()); @@ -121,8 +129,7 @@ int32_t streamScanExec(SStreamTask* pTask, int32_t batchSz) { SSDataBlock* output = NULL; uint64_t ts = 0; if (qExecTask(exec, &output, &ts) < 0) { - taosArrayDestroy(pRes); - return -1; + continue; } if (output == NULL) { if (qStreamRecoverScanFinished(exec)) { diff --git a/source/libs/stream/src/streamRecover.c b/source/libs/stream/src/streamRecover.c index 061b211ddf..87058bf490 100644 --- a/source/libs/stream/src/streamRecover.c +++ b/source/libs/stream/src/streamRecover.c @@ -168,7 +168,7 @@ int32_t streamRestoreParam(SStreamTask* pTask) { return qStreamRestoreParam(exec); } int32_t streamSetStatusNormal(SStreamTask* pTask) { - pTask->taskStatus = TASK_STATUS__NORMAL; + atomic_store_8(&pTask->taskStatus, TASK_STATUS__NORMAL); return 0; } From 22e236f4e6b855579302f813806a93b6ccfcc4ba Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Tue, 7 Mar 2023 15:15:46 +0800 Subject: [PATCH 047/154] fix: check pWal->cfg.retentionPeriod properly --- source/libs/wal/src/walWrite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/wal/src/walWrite.c b/source/libs/wal/src/walWrite.c index b74bbdd15f..00ad7a3d67 100644 --- a/source/libs/wal/src/walWrite.c +++ b/source/libs/wal/src/walWrite.c @@ -328,8 +328,8 @@ int32_t walEndSnapshot(SWal *pWal) { "), new tot size %" PRId64, pWal->cfg.vgId, iter->firstVer, iter->fileSize, iter->closeTs, newTotSize); if (((pWal->cfg.retentionSize == 0) || (pWal->cfg.retentionSize != -1 && newTotSize > pWal->cfg.retentionSize)) || - ((pWal->cfg.retentionPeriod == 0) || - (pWal->cfg.retentionPeriod != -1 && iter->closeTs + pWal->cfg.retentionPeriod > ts))) { + ((pWal->cfg.retentionPeriod == 0) || (pWal->cfg.retentionPeriod != -1 && iter->closeTs != -1 && + iter->closeTs + pWal->cfg.retentionPeriod < ts))) { // delete according to file size or close time wDebug("vgId:%d, check pass", pWal->cfg.vgId); deleteCnt++; From 62d4729eb84c94e778ca7df4c6b9fb9e1e734414 Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Tue, 7 Mar 2023 15:19:47 +0800 Subject: [PATCH 048/154] enh: print term in logging msg of raftStoreWriteFile --- source/libs/sync/src/syncRaftStore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/sync/src/syncRaftStore.c b/source/libs/sync/src/syncRaftStore.c index 68e735cf0d..bd15567c87 100644 --- a/source/libs/sync/src/syncRaftStore.c +++ b/source/libs/sync/src/syncRaftStore.c @@ -139,7 +139,7 @@ int32_t raftStoreWriteFile(SSyncNode *pNode) { if (taosRenameFile(file, realfile) != 0) goto _OVER; code = 0; - sInfo("vgId:%d, succeed to write raft store file:%s, len:%d", pNode->vgId, realfile, len); + sInfo("vgId:%d, succeed to write raft store file:%s, term:%" PRId64, pNode->vgId, realfile, pStore->currentTerm); _OVER: if (pJson != NULL) tjsonDelete(pJson); From df0d200f59341fb7d6306999e8e20a4dbade1a4d Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 7 Mar 2023 15:24:04 +0800 Subject: [PATCH 049/154] feat: the compact command adds 'start with end with' clause --- include/common/tmsg.h | 3 +- include/common/ttokendef.h | 324 +- include/libs/nodes/cmdnodes.h | 2 + source/common/src/tmsg.c | 4 + source/libs/parser/inc/parAst.h | 2 +- source/libs/parser/inc/sql.y | 12 +- source/libs/parser/src/parAstCreater.c | 4 +- source/libs/parser/src/parAstParser.c | 9 +- source/libs/parser/src/parTranslater.c | 26 +- source/libs/parser/src/sql.c | 6086 +++++++++-------- source/libs/parser/test/mockCatalog.cpp | 4 +- .../libs/parser/test/mockCatalogService.cpp | 7 +- source/libs/parser/test/mockCatalogService.h | 3 +- source/libs/parser/test/parInitialCTest.cpp | 23 +- source/libs/parser/test/parTestUtil.cpp | 7 +- 15 files changed, 3303 insertions(+), 3213 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 9a2439f0cf..308246df64 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1031,7 +1031,8 @@ int32_t tDeserializeSUserAuthBatchRsp(void* buf, int32_t bufLen, SUserAuthBatchR void tFreeSUserAuthBatchRsp(SUserAuthBatchRsp* pRsp); typedef struct { - char db[TSDB_DB_FNAME_LEN]; + char db[TSDB_DB_FNAME_LEN]; + STimeWindow timeRange; } SCompactDbReq; int32_t tSerializeSCompactDbReq(void* buf, int32_t bufLen, SCompactDbReq* pReq); diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index ada3fd20e8..a0593e7d4b 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -110,168 +110,168 @@ #define TK_TABLE_SUFFIX 92 #define TK_NK_COLON 93 #define TK_MAX_SPEED 94 -#define TK_TABLE 95 -#define TK_NK_LP 96 -#define TK_NK_RP 97 -#define TK_STABLE 98 -#define TK_ADD 99 -#define TK_COLUMN 100 -#define TK_MODIFY 101 -#define TK_RENAME 102 -#define TK_TAG 103 -#define TK_SET 104 -#define TK_NK_EQ 105 -#define TK_USING 106 -#define TK_TAGS 107 -#define TK_COMMENT 108 -#define TK_BOOL 109 -#define TK_TINYINT 110 -#define TK_SMALLINT 111 -#define TK_INT 112 -#define TK_INTEGER 113 -#define TK_BIGINT 114 -#define TK_FLOAT 115 -#define TK_DOUBLE 116 -#define TK_BINARY 117 -#define TK_TIMESTAMP 118 -#define TK_NCHAR 119 -#define TK_UNSIGNED 120 -#define TK_JSON 121 -#define TK_VARCHAR 122 -#define TK_MEDIUMBLOB 123 -#define TK_BLOB 124 -#define TK_VARBINARY 125 -#define TK_DECIMAL 126 -#define TK_MAX_DELAY 127 -#define TK_WATERMARK 128 -#define TK_ROLLUP 129 -#define TK_TTL 130 -#define TK_SMA 131 -#define TK_DELETE_MARK 132 -#define TK_FIRST 133 -#define TK_LAST 134 -#define TK_SHOW 135 -#define TK_PRIVILEGES 136 -#define TK_DATABASES 137 -#define TK_TABLES 138 -#define TK_STABLES 139 -#define TK_MNODES 140 -#define TK_QNODES 141 -#define TK_FUNCTIONS 142 -#define TK_INDEXES 143 -#define TK_ACCOUNTS 144 -#define TK_APPS 145 -#define TK_CONNECTIONS 146 -#define TK_LICENCES 147 -#define TK_GRANTS 148 -#define TK_QUERIES 149 -#define TK_SCORES 150 -#define TK_TOPICS 151 -#define TK_VARIABLES 152 -#define TK_CLUSTER 153 -#define TK_BNODES 154 -#define TK_SNODES 155 -#define TK_TRANSACTIONS 156 -#define TK_DISTRIBUTED 157 -#define TK_CONSUMERS 158 -#define TK_SUBSCRIPTIONS 159 -#define TK_VNODES 160 -#define TK_ALIVE 161 -#define TK_LIKE 162 -#define TK_TBNAME 163 -#define TK_QTAGS 164 -#define TK_AS 165 -#define TK_INDEX 166 -#define TK_FUNCTION 167 -#define TK_INTERVAL 168 -#define TK_COUNT 169 -#define TK_LAST_ROW 170 -#define TK_TOPIC 171 -#define TK_WITH 172 -#define TK_META 173 -#define TK_CONSUMER 174 -#define TK_GROUP 175 -#define TK_DESC 176 -#define TK_DESCRIBE 177 -#define TK_RESET 178 -#define TK_QUERY 179 -#define TK_CACHE 180 -#define TK_EXPLAIN 181 -#define TK_ANALYZE 182 -#define TK_VERBOSE 183 -#define TK_NK_BOOL 184 -#define TK_RATIO 185 -#define TK_NK_FLOAT 186 -#define TK_OUTPUTTYPE 187 -#define TK_AGGREGATE 188 -#define TK_BUFSIZE 189 -#define TK_STREAM 190 -#define TK_INTO 191 -#define TK_TRIGGER 192 -#define TK_AT_ONCE 193 -#define TK_WINDOW_CLOSE 194 -#define TK_IGNORE 195 -#define TK_EXPIRED 196 -#define TK_FILL_HISTORY 197 -#define TK_UPDATE 198 -#define TK_SUBTABLE 199 -#define TK_KILL 200 -#define TK_CONNECTION 201 -#define TK_TRANSACTION 202 -#define TK_BALANCE 203 -#define TK_VGROUP 204 -#define TK_MERGE 205 -#define TK_REDISTRIBUTE 206 -#define TK_SPLIT 207 -#define TK_DELETE 208 -#define TK_INSERT 209 -#define TK_NULL 210 -#define TK_NK_QUESTION 211 -#define TK_NK_ARROW 212 -#define TK_ROWTS 213 -#define TK_QSTART 214 -#define TK_QEND 215 -#define TK_QDURATION 216 -#define TK_WSTART 217 -#define TK_WEND 218 -#define TK_WDURATION 219 -#define TK_IROWTS 220 -#define TK_ISFILLED 221 -#define TK_CAST 222 -#define TK_NOW 223 -#define TK_TODAY 224 -#define TK_TIMEZONE 225 -#define TK_CLIENT_VERSION 226 -#define TK_SERVER_VERSION 227 -#define TK_SERVER_STATUS 228 -#define TK_CURRENT_USER 229 -#define TK_CASE 230 -#define TK_END 231 -#define TK_WHEN 232 -#define TK_THEN 233 -#define TK_ELSE 234 -#define TK_BETWEEN 235 -#define TK_IS 236 -#define TK_NK_LT 237 -#define TK_NK_GT 238 -#define TK_NK_LE 239 -#define TK_NK_GE 240 -#define TK_NK_NE 241 -#define TK_MATCH 242 -#define TK_NMATCH 243 -#define TK_CONTAINS 244 -#define TK_IN 245 -#define TK_JOIN 246 -#define TK_INNER 247 -#define TK_SELECT 248 -#define TK_DISTINCT 249 -#define TK_WHERE 250 -#define TK_PARTITION 251 -#define TK_BY 252 -#define TK_SESSION 253 -#define TK_STATE_WINDOW 254 -#define TK_EVENT_WINDOW 255 -#define TK_START 256 +#define TK_START 95 +#define TK_WITH 96 +#define TK_TIMESTAMP 97 +#define TK_END 98 +#define TK_TABLE 99 +#define TK_NK_LP 100 +#define TK_NK_RP 101 +#define TK_STABLE 102 +#define TK_ADD 103 +#define TK_COLUMN 104 +#define TK_MODIFY 105 +#define TK_RENAME 106 +#define TK_TAG 107 +#define TK_SET 108 +#define TK_NK_EQ 109 +#define TK_USING 110 +#define TK_TAGS 111 +#define TK_COMMENT 112 +#define TK_BOOL 113 +#define TK_TINYINT 114 +#define TK_SMALLINT 115 +#define TK_INT 116 +#define TK_INTEGER 117 +#define TK_BIGINT 118 +#define TK_FLOAT 119 +#define TK_DOUBLE 120 +#define TK_BINARY 121 +#define TK_NCHAR 122 +#define TK_UNSIGNED 123 +#define TK_JSON 124 +#define TK_VARCHAR 125 +#define TK_MEDIUMBLOB 126 +#define TK_BLOB 127 +#define TK_VARBINARY 128 +#define TK_DECIMAL 129 +#define TK_MAX_DELAY 130 +#define TK_WATERMARK 131 +#define TK_ROLLUP 132 +#define TK_TTL 133 +#define TK_SMA 134 +#define TK_DELETE_MARK 135 +#define TK_FIRST 136 +#define TK_LAST 137 +#define TK_SHOW 138 +#define TK_PRIVILEGES 139 +#define TK_DATABASES 140 +#define TK_TABLES 141 +#define TK_STABLES 142 +#define TK_MNODES 143 +#define TK_QNODES 144 +#define TK_FUNCTIONS 145 +#define TK_INDEXES 146 +#define TK_ACCOUNTS 147 +#define TK_APPS 148 +#define TK_CONNECTIONS 149 +#define TK_LICENCES 150 +#define TK_GRANTS 151 +#define TK_QUERIES 152 +#define TK_SCORES 153 +#define TK_TOPICS 154 +#define TK_VARIABLES 155 +#define TK_CLUSTER 156 +#define TK_BNODES 157 +#define TK_SNODES 158 +#define TK_TRANSACTIONS 159 +#define TK_DISTRIBUTED 160 +#define TK_CONSUMERS 161 +#define TK_SUBSCRIPTIONS 162 +#define TK_VNODES 163 +#define TK_ALIVE 164 +#define TK_LIKE 165 +#define TK_TBNAME 166 +#define TK_QTAGS 167 +#define TK_AS 168 +#define TK_INDEX 169 +#define TK_FUNCTION 170 +#define TK_INTERVAL 171 +#define TK_COUNT 172 +#define TK_LAST_ROW 173 +#define TK_TOPIC 174 +#define TK_META 175 +#define TK_CONSUMER 176 +#define TK_GROUP 177 +#define TK_DESC 178 +#define TK_DESCRIBE 179 +#define TK_RESET 180 +#define TK_QUERY 181 +#define TK_CACHE 182 +#define TK_EXPLAIN 183 +#define TK_ANALYZE 184 +#define TK_VERBOSE 185 +#define TK_NK_BOOL 186 +#define TK_RATIO 187 +#define TK_NK_FLOAT 188 +#define TK_OUTPUTTYPE 189 +#define TK_AGGREGATE 190 +#define TK_BUFSIZE 191 +#define TK_STREAM 192 +#define TK_INTO 193 +#define TK_TRIGGER 194 +#define TK_AT_ONCE 195 +#define TK_WINDOW_CLOSE 196 +#define TK_IGNORE 197 +#define TK_EXPIRED 198 +#define TK_FILL_HISTORY 199 +#define TK_UPDATE 200 +#define TK_SUBTABLE 201 +#define TK_KILL 202 +#define TK_CONNECTION 203 +#define TK_TRANSACTION 204 +#define TK_BALANCE 205 +#define TK_VGROUP 206 +#define TK_MERGE 207 +#define TK_REDISTRIBUTE 208 +#define TK_SPLIT 209 +#define TK_DELETE 210 +#define TK_INSERT 211 +#define TK_NULL 212 +#define TK_NK_QUESTION 213 +#define TK_NK_ARROW 214 +#define TK_ROWTS 215 +#define TK_QSTART 216 +#define TK_QEND 217 +#define TK_QDURATION 218 +#define TK_WSTART 219 +#define TK_WEND 220 +#define TK_WDURATION 221 +#define TK_IROWTS 222 +#define TK_ISFILLED 223 +#define TK_CAST 224 +#define TK_NOW 225 +#define TK_TODAY 226 +#define TK_TIMEZONE 227 +#define TK_CLIENT_VERSION 228 +#define TK_SERVER_VERSION 229 +#define TK_SERVER_STATUS 230 +#define TK_CURRENT_USER 231 +#define TK_CASE 232 +#define TK_WHEN 233 +#define TK_THEN 234 +#define TK_ELSE 235 +#define TK_BETWEEN 236 +#define TK_IS 237 +#define TK_NK_LT 238 +#define TK_NK_GT 239 +#define TK_NK_LE 240 +#define TK_NK_GE 241 +#define TK_NK_NE 242 +#define TK_MATCH 243 +#define TK_NMATCH 244 +#define TK_CONTAINS 245 +#define TK_IN 246 +#define TK_JOIN 247 +#define TK_INNER 248 +#define TK_SELECT 249 +#define TK_DISTINCT 250 +#define TK_WHERE 251 +#define TK_PARTITION 252 +#define TK_BY 253 +#define TK_SESSION 254 +#define TK_STATE_WINDOW 255 +#define TK_EVENT_WINDOW 256 #define TK_SLIDING 257 #define TK_FILL 258 #define TK_VALUE 259 diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index 736ee7da05..bcbc5f4cf4 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -128,6 +128,8 @@ typedef struct STrimDatabaseStmt { typedef struct SCompactDatabaseStmt { ENodeType type; char dbName[TSDB_DB_NAME_LEN]; + SNode* pStart; + SNode* pEnd; } SCompactDatabaseStmt; typedef struct STableOptions { diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 01a0ee7306..5018a517e1 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -2531,6 +2531,8 @@ int32_t tSerializeSCompactDbReq(void *buf, int32_t bufLen, SCompactDbReq *pReq) if (tStartEncode(&encoder) < 0) return -1; if (tEncodeCStr(&encoder, pReq->db) < 0) return -1; + if (tEncodeI64(&encoder, pReq->timeRange.skey) < 0) return -1; + if (tEncodeI64(&encoder, pReq->timeRange.ekey) < 0) return -1; tEndEncode(&encoder); int32_t tlen = encoder.pos; @@ -2544,6 +2546,8 @@ int32_t tDeserializeSCompactDbReq(void *buf, int32_t bufLen, SCompactDbReq *pReq if (tStartDecode(&decoder) < 0) return -1; if (tDecodeCStrTo(&decoder, pReq->db) < 0) return -1; + if (tDecodeI64(&decoder, &pReq->timeRange.skey) < 0) return -1; + if (tDecodeI64(&decoder, &pReq->timeRange.ekey) < 0) return -1; tEndDecode(&decoder); tDecoderClear(&decoder); diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index 4b9fa7aa42..695d9f3006 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -151,7 +151,7 @@ SNode* createDropDatabaseStmt(SAstCreateContext* pCxt, bool ignoreNotExists, STo SNode* createAlterDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName, SNode* pOptions); SNode* createFlushDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName); SNode* createTrimDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName, int32_t maxSpeed); -SNode* createCompactStmt(SAstCreateContext* pCxt, SToken* pDbName); +SNode* createCompactStmt(SAstCreateContext* pCxt, SToken* pDbName, SNode* pStart, SNode* pEnd); SNode* createDefaultTableOptions(SAstCreateContext* pCxt); SNode* createAlterTableOptions(SAstCreateContext* pCxt); SNode* setTableOption(SAstCreateContext* pCxt, SNode* pOptions, ETableOptionType type, void* pVal); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 317bfccb78..db418169a5 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -167,7 +167,7 @@ cmd ::= USE db_name(A). cmd ::= ALTER DATABASE db_name(A) alter_db_options(B). { pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &A, B); } cmd ::= FLUSH DATABASE db_name(A). { pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &A); } cmd ::= TRIM DATABASE db_name(A) speed_opt(B). { pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &A, B); } -cmd ::= COMPACT DATABASE db_name(A). { pCxt->pRootNode = createCompactStmt(pCxt, &A); } +cmd ::= COMPACT DATABASE db_name(A) start_opt(B) end_opt(C). { pCxt->pRootNode = createCompactStmt(pCxt, &A, B, C); } %type not_exists_opt { bool } %destructor not_exists_opt { } @@ -259,6 +259,16 @@ retention(A) ::= NK_VARIABLE(B) NK_COLON NK_VARIABLE(C). speed_opt(A) ::= . { A = 0; } speed_opt(A) ::= MAX_SPEED NK_INTEGER(B). { A = taosStr2Int32(B.z, NULL, 10); } +start_opt(A) ::= . { A = NULL; } +start_opt(A) ::= START WITH NK_INTEGER(B). { A = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &B); } +start_opt(A) ::= START WITH NK_STRING(B). { A = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &B); } +start_opt(A) ::= START WITH TIMESTAMP NK_STRING(B). { A = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &B); } + +end_opt(A) ::= . { A = NULL; } +end_opt(A) ::= END WITH NK_INTEGER(B). { A = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &B); } +end_opt(A) ::= END WITH NK_STRING(B). { A = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &B); } +end_opt(A) ::= END WITH TIMESTAMP NK_STRING(B). { A = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &B); } + /************************************************ create/drop table/stable ********************************************/ cmd ::= CREATE TABLE not_exists_opt(A) full_table_name(B) NK_LP column_def_list(C) NK_RP tags_def_opt(D) table_options(E). { pCxt->pRootNode = createCreateTableStmt(pCxt, A, B, C, D, E); } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 469132613d..e1855256b2 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -1105,7 +1105,7 @@ SNode* createTrimDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName, int32_t return (SNode*)pStmt; } -SNode* createCompactStmt(SAstCreateContext* pCxt, SToken* pDbName) { +SNode* createCompactStmt(SAstCreateContext* pCxt, SToken* pDbName, SNode* pStart, SNode* pEnd) { CHECK_PARSER_STATUS(pCxt); if (!checkDbName(pCxt, pDbName, false)) { return NULL; @@ -1113,6 +1113,8 @@ SNode* createCompactStmt(SAstCreateContext* pCxt, SToken* pDbName) { SCompactDatabaseStmt* pStmt = (SCompactDatabaseStmt*)nodesMakeNode(QUERY_NODE_COMPACT_DATABASE_STMT); CHECK_OUT_OF_MEM(pStmt); COPY_STRING_FORM_ID_TOKEN(pStmt->dbName, pDbName); + pStmt->pStart = pStart; + pStmt->pEnd = pEnd; return (SNode*)pStmt; } diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c index 126027c78f..cd4b455e02 100644 --- a/source/libs/parser/src/parAstParser.c +++ b/source/libs/parser/src/parAstParser.c @@ -166,7 +166,8 @@ static int32_t collectMetaKeyFromRealTableImpl(SCollectMetaKeyCxt* pCxt, const c code = reserveDnodeRequiredInCache(pCxt->pMetaCache); } if (TSDB_CODE_SUCCESS == code && - (0 == strcmp(pTable, TSDB_INS_TABLE_TAGS) || 0 == strcmp(pTable, TSDB_INS_TABLE_TABLES) || 0 == strcmp(pTable, TSDB_INS_TABLE_COLS)) && + (0 == strcmp(pTable, TSDB_INS_TABLE_TAGS) || 0 == strcmp(pTable, TSDB_INS_TABLE_TABLES) || + 0 == strcmp(pTable, TSDB_INS_TABLE_COLS)) && QUERY_NODE_SELECT_STMT == nodeType(pCxt->pStmt)) { code = collectMetaKeyFromInsTags(pCxt); } @@ -605,6 +606,10 @@ static int32_t collectMetaKeyFromShowSubscriptions(SCollectMetaKeyCxt* pCxt, SSh pCxt->pMetaCache); } +static int32_t collectMetaKeyFromCompactDatabase(SCollectMetaKeyCxt* pCxt, SCompactDatabaseStmt* pStmt) { + return reserveDbCfgInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pCxt->pMetaCache); +} + static int32_t collectMetaKeyFromQuery(SCollectMetaKeyCxt* pCxt, SNode* pStmt) { pCxt->pStmt = pStmt; switch (nodeType(pStmt)) { @@ -636,6 +641,8 @@ static int32_t collectMetaKeyFromQuery(SCollectMetaKeyCxt* pCxt, SNode* pStmt) { return collectMetaKeyFromExplain(pCxt, (SExplainStmt*)pStmt); case QUERY_NODE_DESCRIBE_STMT: return collectMetaKeyFromDescribe(pCxt, (SDescribeStmt*)pStmt); + case QUERY_NODE_COMPACT_DATABASE_STMT: + return collectMetaKeyFromCompactDatabase(pCxt, (SCompactDatabaseStmt*)pStmt); case QUERY_NODE_CREATE_STREAM_STMT: return collectMetaKeyFromCreateStream(pCxt, (SCreateStreamStmt*)pStmt); case QUERY_NODE_SHOW_DNODES_STMT: diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index fd2d5d53f4..ff6ef2e423 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -5626,12 +5626,36 @@ static int32_t translateDescribe(STranslateContext* pCxt, SDescribeStmt* pStmt) return refreshGetTableMeta(pCxt, pStmt->dbName, pStmt->tableName, &pStmt->pMeta); } +static int32_t translateCompactRange(STranslateContext* pCxt, SCompactDatabaseStmt* pStmt, SCompactDbReq* pReq) { + SDbCfgInfo dbCfg = {0}; + int32_t code = getDBCfg(pCxt, pStmt->dbName, &dbCfg); + if (TSDB_CODE_SUCCESS == code && NULL != pStmt->pStart) { + ((SValueNode*)pStmt->pStart)->node.resType.precision = dbCfg.precision; + ((SValueNode*)pStmt->pStart)->node.resType.type = TSDB_DATA_TYPE_TIMESTAMP; + code = doTranslateValue(pCxt, (SValueNode*)pStmt->pStart); + } + if (TSDB_CODE_SUCCESS == code && NULL != pStmt->pEnd) { + ((SValueNode*)pStmt->pEnd)->node.resType.precision = dbCfg.precision; + ((SValueNode*)pStmt->pEnd)->node.resType.type = TSDB_DATA_TYPE_TIMESTAMP; + code = doTranslateValue(pCxt, (SValueNode*)pStmt->pEnd); + } + if (TSDB_CODE_SUCCESS == code) { + pReq->timeRange.skey = NULL != pStmt->pStart ? ((SValueNode*)pStmt->pStart)->datum.i : INT64_MIN; + pReq->timeRange.ekey = NULL != pStmt->pEnd ? ((SValueNode*)pStmt->pEnd)->datum.i : INT64_MAX; + } + return code; +} + static int32_t translateCompact(STranslateContext* pCxt, SCompactDatabaseStmt* pStmt) { SCompactDbReq compactReq = {0}; SName name; tNameSetDbName(&name, pCxt->pParseCxt->acctId, pStmt->dbName, strlen(pStmt->dbName)); tNameGetFullDbName(&name, compactReq.db); - return buildCmdMsg(pCxt, TDMT_MND_COMPACT_DB, (FSerializeFunc)tSerializeSCompactDbReq, &compactReq); + int32_t code = translateCompactRange(pCxt, pStmt, &compactReq); + if (TSDB_CODE_SUCCESS == code) { + code = buildCmdMsg(pCxt, TDMT_MND_COMPACT_DB, (FSerializeFunc)tSerializeSCompactDbReq, &compactReq); + } + return code; } static int32_t translateKillConnection(STranslateContext* pCxt, SKillStmt* pStmt) { diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 04f838b92d..6df57cd32b 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 469 +#define YYNOCODE 471 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - EOperatorType yy2; - SNode* yy42; - bool yy103; - EOrder yy106; - SNodeList* yy110; - SToken yy225; - EFillMode yy410; - SDataType yy448; - SAlterOption yy459; - int32_t yy508; - ENullOrder yy599; - EJoinType yy638; - int64_t yy641; - int8_t yy705; + SNode* yy140; + EFillMode yy174; + int32_t yy214; + SNodeList* yy220; + int64_t yy303; + bool yy587; + SDataType yy682; + ENullOrder yy697; + EOperatorType yy794; + SAlterOption yy809; + EJoinType yy852; + int8_t yy857; + EOrder yy866; + SToken yy881; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -139,17 +139,17 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 743 -#define YYNRULE 563 +#define YYNSTATE 751 +#define YYNRULE 571 #define YYNTOKEN 328 -#define YY_MAX_SHIFT 742 -#define YY_MIN_SHIFTREDUCE 1102 -#define YY_MAX_SHIFTREDUCE 1664 -#define YY_ERROR_ACTION 1665 -#define YY_ACCEPT_ACTION 1666 -#define YY_NO_ACTION 1667 -#define YY_MIN_REDUCE 1668 -#define YY_MAX_REDUCE 2230 +#define YY_MAX_SHIFT 750 +#define YY_MIN_SHIFTREDUCE 1116 +#define YY_MAX_SHIFTREDUCE 1686 +#define YY_ERROR_ACTION 1687 +#define YY_ACCEPT_ACTION 1688 +#define YY_NO_ACTION 1689 +#define YY_MIN_REDUCE 1690 +#define YY_MAX_REDUCE 2260 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -216,753 +216,739 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (2749) +#define YY_ACTTAB_COUNT (2669) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 1941, 2206, 1798, 607, 482, 2201, 483, 1704, 491, 1811, - /* 10 */ 483, 1704, 45, 43, 1592, 1939, 619, 31, 176, 178, - /* 20 */ 380, 2205, 1441, 38, 37, 2202, 2204, 44, 42, 41, - /* 30 */ 40, 39, 1862, 1522, 139, 1439, 1466, 2042, 1875, 347, - /* 40 */ 1924, 2028, 38, 37, 613, 358, 44, 42, 41, 40, - /* 50 */ 39, 425, 2024, 2206, 1873, 38, 37, 2201, 1517, 44, - /* 60 */ 42, 41, 40, 39, 18, 686, 385, 1469, 2060, 1868, - /* 70 */ 1870, 1447, 1666, 2205, 167, 607, 646, 2202, 2203, 1776, - /* 80 */ 1154, 2010, 1153, 648, 45, 43, 2020, 2026, 361, 570, - /* 90 */ 1135, 330, 380, 2201, 1441, 220, 14, 642, 340, 181, - /* 100 */ 2138, 2139, 550, 137, 2143, 1522, 139, 1439, 2207, 182, - /* 110 */ 602, 1155, 2041, 2202, 596, 548, 2077, 546, 739, 324, - /* 120 */ 2043, 652, 2045, 2046, 647, 645, 642, 633, 2095, 1137, - /* 130 */ 1517, 1140, 1141, 1524, 1525, 631, 18, 481, 393, 1551, - /* 140 */ 486, 1710, 392, 1447, 1691, 1262, 674, 673, 672, 1266, - /* 150 */ 671, 1268, 1269, 670, 1271, 667, 176, 1277, 664, 1279, - /* 160 */ 1280, 661, 658, 1497, 1507, 1941, 607, 617, 14, 1523, - /* 170 */ 1526, 267, 2138, 606, 383, 133, 605, 371, 1925, 2201, - /* 180 */ 1938, 619, 161, 570, 1442, 618, 1440, 2201, 2010, 359, - /* 190 */ 739, 1824, 631, 270, 594, 182, 1552, 139, 1873, 2202, - /* 200 */ 596, 500, 2207, 182, 631, 1524, 1525, 2202, 596, 590, - /* 210 */ 1445, 1446, 247, 1496, 1499, 1500, 1501, 1502, 1503, 1504, - /* 220 */ 1505, 1506, 644, 640, 1515, 1516, 1518, 1519, 1520, 1521, - /* 230 */ 2, 61, 498, 92, 1934, 1497, 1507, 585, 106, 686, - /* 240 */ 122, 1523, 1526, 121, 120, 119, 118, 117, 116, 115, - /* 250 */ 114, 113, 140, 1596, 352, 166, 1442, 1680, 1440, 1466, - /* 260 */ 1814, 609, 180, 2138, 2139, 1465, 137, 2143, 48, 34, - /* 270 */ 378, 1546, 1547, 1548, 1549, 1550, 1554, 1555, 1556, 1557, - /* 280 */ 48, 61, 1445, 1446, 1222, 1496, 1499, 1500, 1501, 1502, - /* 290 */ 1503, 1504, 1505, 1506, 644, 640, 1515, 1516, 1518, 1519, - /* 300 */ 1520, 1521, 2, 2028, 11, 45, 43, 44, 42, 41, - /* 310 */ 40, 39, 1466, 380, 2024, 1441, 353, 742, 351, 350, - /* 320 */ 1224, 523, 591, 586, 579, 525, 1522, 1466, 1439, 490, - /* 330 */ 2042, 295, 486, 1710, 607, 35, 288, 38, 37, 603, - /* 340 */ 412, 44, 42, 41, 40, 39, 175, 524, 2020, 2026, - /* 350 */ 362, 1517, 732, 728, 724, 720, 293, 18, 86, 642, - /* 360 */ 488, 2060, 414, 410, 1447, 139, 484, 559, 417, 649, - /* 370 */ 416, 2145, 349, 1154, 2010, 1153, 648, 45, 43, 1527, - /* 380 */ 1467, 1817, 2206, 185, 11, 380, 9, 1441, 61, 14, - /* 390 */ 279, 280, 65, 107, 415, 278, 286, 2142, 1522, 1468, - /* 400 */ 1439, 634, 1498, 2102, 1155, 2041, 1737, 632, 1690, 2077, - /* 410 */ 632, 739, 168, 2043, 652, 2045, 2046, 647, 1669, 642, - /* 420 */ 185, 132, 678, 1517, 187, 1866, 1524, 1525, 521, 628, - /* 430 */ 183, 2138, 2139, 185, 137, 2143, 1447, 632, 1822, 122, - /* 440 */ 11, 1822, 121, 120, 119, 118, 117, 116, 115, 114, - /* 450 */ 113, 132, 2010, 571, 2167, 194, 1497, 1507, 526, 1875, - /* 460 */ 100, 46, 1523, 1526, 273, 636, 368, 2102, 1822, 272, - /* 470 */ 1360, 1361, 536, 535, 534, 1873, 1654, 1442, 2031, 1440, - /* 480 */ 136, 530, 1815, 739, 61, 529, 1404, 463, 241, 1905, - /* 490 */ 528, 533, 83, 1305, 1306, 82, 527, 237, 1524, 1525, - /* 500 */ 1869, 1870, 1467, 1445, 1446, 1661, 1496, 1499, 1500, 1501, - /* 510 */ 1502, 1503, 1504, 1505, 1506, 644, 640, 1515, 1516, 1518, - /* 520 */ 1519, 1520, 1521, 2, 536, 535, 534, 2033, 1497, 1507, - /* 530 */ 1668, 1875, 136, 530, 1523, 1526, 632, 529, 345, 632, - /* 540 */ 185, 1447, 528, 533, 269, 198, 197, 1873, 527, 1442, - /* 550 */ 54, 1440, 618, 423, 131, 130, 129, 128, 127, 126, - /* 560 */ 125, 124, 123, 1415, 1416, 419, 677, 1822, 462, 418, - /* 570 */ 1822, 41, 40, 39, 2042, 1445, 1446, 618, 1496, 1499, - /* 580 */ 1500, 1501, 1502, 1503, 1504, 1505, 1506, 644, 640, 1515, - /* 590 */ 1516, 1518, 1519, 1520, 1521, 2, 45, 43, 1468, 616, - /* 600 */ 1920, 1934, 86, 1660, 380, 2060, 1441, 632, 595, 632, - /* 610 */ 570, 190, 2201, 649, 2201, 1377, 1378, 1522, 2010, 1439, - /* 620 */ 648, 424, 221, 433, 627, 1818, 1934, 594, 182, 2207, - /* 630 */ 182, 61, 2202, 596, 2202, 596, 185, 171, 1822, 1689, - /* 640 */ 1822, 443, 1517, 517, 513, 509, 505, 218, 632, 2041, - /* 650 */ 442, 1376, 1379, 2077, 1620, 1447, 110, 2043, 652, 2045, - /* 660 */ 2046, 647, 448, 642, 49, 372, 1532, 1688, 45, 43, - /* 670 */ 2130, 2205, 1466, 164, 2129, 2126, 380, 698, 1441, 1822, - /* 680 */ 46, 541, 1824, 2010, 87, 1687, 2145, 216, 1807, 1522, - /* 690 */ 1686, 1439, 141, 38, 37, 2101, 551, 44, 42, 41, - /* 700 */ 40, 39, 739, 582, 581, 1618, 1619, 1621, 1622, 1623, - /* 710 */ 234, 2010, 2141, 1685, 1517, 38, 37, 1524, 1525, 44, - /* 720 */ 42, 41, 40, 39, 236, 544, 33, 1447, 235, 2010, - /* 730 */ 538, 1799, 38, 37, 2010, 233, 44, 42, 41, 40, - /* 740 */ 39, 1684, 595, 269, 1553, 2145, 2201, 1497, 1507, 1875, - /* 750 */ 632, 27, 14, 1523, 1526, 215, 209, 2010, 13, 12, - /* 760 */ 214, 594, 182, 496, 449, 1874, 2202, 596, 1442, 383, - /* 770 */ 1440, 2140, 69, 1589, 739, 68, 2060, 164, 1683, 207, - /* 780 */ 1809, 1822, 1631, 185, 589, 2010, 1824, 89, 335, 1524, - /* 790 */ 1525, 357, 1978, 552, 1445, 1446, 1469, 1496, 1499, 1500, - /* 800 */ 1501, 1502, 1503, 1504, 1505, 1506, 644, 640, 1515, 1516, - /* 810 */ 1518, 1519, 1520, 1521, 2, 1498, 185, 32, 1805, 1497, - /* 820 */ 1507, 333, 2010, 1464, 684, 1523, 1526, 1558, 164, 588, - /* 830 */ 456, 710, 708, 470, 1875, 152, 469, 1825, 238, 684, - /* 840 */ 1442, 373, 1440, 154, 153, 681, 680, 679, 151, 1682, - /* 850 */ 1873, 439, 1679, 471, 1565, 676, 441, 1920, 154, 153, - /* 860 */ 681, 680, 679, 151, 532, 531, 1445, 1446, 192, 1496, - /* 870 */ 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 644, 640, - /* 880 */ 1515, 1516, 1518, 1519, 1520, 1521, 2, 699, 53, 1792, - /* 890 */ 632, 682, 165, 2010, 1866, 1678, 2010, 308, 348, 1734, - /* 900 */ 632, 38, 37, 1797, 499, 44, 42, 41, 40, 39, - /* 910 */ 429, 306, 72, 242, 1819, 71, 1677, 1920, 643, 38, - /* 920 */ 37, 1822, 1875, 44, 42, 41, 40, 39, 196, 384, - /* 930 */ 51, 1822, 3, 203, 478, 476, 473, 598, 1873, 2010, - /* 940 */ 467, 191, 525, 461, 460, 459, 458, 455, 454, 453, - /* 950 */ 452, 451, 447, 446, 445, 444, 332, 436, 435, 434, - /* 960 */ 2010, 431, 430, 346, 524, 716, 715, 714, 713, 390, - /* 970 */ 61, 712, 711, 143, 706, 705, 704, 703, 702, 701, - /* 980 */ 700, 156, 696, 695, 694, 389, 388, 691, 690, 689, - /* 990 */ 688, 687, 632, 632, 1676, 38, 37, 565, 2003, 44, - /* 1000 */ 42, 41, 40, 39, 1441, 632, 239, 566, 1608, 108, - /* 1010 */ 2042, 684, 1996, 632, 632, 632, 1469, 1439, 1588, 629, - /* 1020 */ 8, 1675, 1674, 1822, 1822, 1673, 1672, 630, 611, 615, - /* 1030 */ 154, 153, 681, 680, 679, 151, 1822, 683, 2010, 1466, - /* 1040 */ 1866, 2060, 1671, 570, 1822, 1822, 1822, 2201, 152, 610, - /* 1050 */ 80, 79, 422, 1447, 2010, 189, 648, 632, 163, 2042, - /* 1060 */ 400, 302, 2207, 182, 1852, 2010, 2010, 2202, 596, 2010, - /* 1070 */ 2010, 283, 599, 2028, 331, 1140, 1141, 408, 1450, 406, - /* 1080 */ 402, 398, 395, 415, 2024, 2041, 2010, 1681, 1822, 2077, - /* 1090 */ 2060, 1813, 109, 2043, 652, 2045, 2046, 647, 649, 642, - /* 1100 */ 739, 1410, 2024, 2010, 179, 648, 2130, 1777, 386, 632, - /* 1110 */ 374, 2126, 2150, 1585, 426, 639, 164, 2029, 2020, 2026, - /* 1120 */ 375, 632, 185, 387, 184, 1824, 2042, 427, 2024, 642, - /* 1130 */ 2004, 145, 2156, 134, 2041, 289, 2020, 2026, 2077, 1800, - /* 1140 */ 1822, 109, 2043, 652, 2045, 2046, 647, 642, 642, 52, - /* 1150 */ 152, 142, 1822, 149, 2101, 2130, 569, 2060, 2042, 374, - /* 1160 */ 2126, 246, 2020, 2026, 73, 610, 1442, 1711, 1440, 1724, - /* 1170 */ 2010, 226, 648, 642, 224, 570, 1717, 228, 230, 2201, - /* 1180 */ 227, 229, 1498, 147, 232, 245, 554, 231, 553, 2060, - /* 1190 */ 2170, 537, 1445, 1446, 2207, 182, 1715, 649, 539, 2202, - /* 1200 */ 596, 2041, 2010, 1413, 648, 2077, 1449, 2042, 109, 2043, - /* 1210 */ 652, 2045, 2046, 647, 81, 642, 734, 63, 542, 63, - /* 1220 */ 179, 251, 2130, 1663, 1664, 90, 374, 2126, 1585, 1453, - /* 1230 */ 152, 47, 276, 2041, 70, 13, 12, 2077, 2060, 105, - /* 1240 */ 109, 2043, 652, 2045, 2046, 647, 649, 642, 2157, 102, - /* 1250 */ 264, 2010, 2221, 648, 2130, 583, 150, 557, 374, 2126, - /* 1260 */ 152, 1543, 63, 47, 47, 219, 2042, 258, 2061, 2164, - /* 1270 */ 1617, 656, 1616, 692, 253, 150, 152, 135, 1184, 150, - /* 1280 */ 391, 1929, 2041, 614, 1374, 281, 2077, 624, 1705, 109, - /* 1290 */ 2043, 652, 2045, 2046, 647, 1203, 642, 2060, 693, 600, - /* 1300 */ 2042, 2221, 570, 2130, 1863, 649, 2201, 374, 2126, 285, - /* 1310 */ 2010, 2160, 648, 1255, 1185, 1559, 1508, 301, 2177, 608, - /* 1320 */ 1201, 2207, 182, 263, 1283, 266, 2202, 596, 1287, 1294, - /* 1330 */ 1292, 2060, 155, 1, 399, 4, 394, 296, 344, 649, - /* 1340 */ 1397, 2041, 195, 428, 2010, 2077, 648, 1469, 109, 2043, - /* 1350 */ 652, 2045, 2046, 647, 432, 642, 1930, 1452, 437, 465, - /* 1360 */ 2221, 1464, 2130, 450, 1922, 457, 374, 2126, 464, 466, - /* 1370 */ 472, 474, 200, 2042, 475, 2041, 477, 577, 479, 2077, - /* 1380 */ 1470, 480, 109, 2043, 652, 2045, 2046, 647, 489, 642, - /* 1390 */ 1472, 206, 377, 376, 2221, 492, 2130, 1467, 493, 208, - /* 1400 */ 374, 2126, 1455, 1471, 2060, 494, 1473, 211, 495, 497, - /* 1410 */ 1157, 2195, 649, 1522, 518, 1448, 519, 2010, 213, 648, - /* 1420 */ 84, 85, 2042, 522, 217, 501, 520, 1987, 1812, 223, - /* 1430 */ 1808, 334, 225, 112, 1984, 1983, 556, 558, 1517, 88, - /* 1440 */ 240, 148, 157, 158, 1810, 1806, 297, 560, 2041, 159, - /* 1450 */ 160, 1447, 2077, 2060, 243, 109, 2043, 652, 2045, 2046, - /* 1460 */ 647, 649, 642, 561, 567, 584, 2010, 2221, 648, 2130, - /* 1470 */ 622, 2176, 564, 374, 2126, 2175, 574, 580, 593, 363, - /* 1480 */ 587, 2161, 575, 7, 2149, 2171, 2042, 2152, 573, 249, - /* 1490 */ 172, 257, 259, 252, 260, 572, 261, 2041, 638, 364, - /* 1500 */ 604, 2077, 2224, 1585, 109, 2043, 652, 2045, 2046, 647, - /* 1510 */ 601, 642, 138, 1468, 265, 262, 2105, 2060, 2130, 612, - /* 1520 */ 2200, 2146, 374, 2126, 367, 649, 271, 1474, 95, 1935, - /* 1530 */ 2010, 620, 648, 625, 298, 621, 1949, 1948, 1947, 299, - /* 1540 */ 370, 626, 97, 99, 1823, 60, 2111, 300, 101, 303, - /* 1550 */ 1793, 292, 735, 1867, 2042, 327, 736, 654, 738, 336, - /* 1560 */ 312, 2041, 326, 50, 1456, 2077, 1451, 316, 109, 2043, - /* 1570 */ 652, 2045, 2046, 647, 305, 642, 307, 2002, 2001, 2000, - /* 1580 */ 2103, 77, 2130, 337, 2042, 2060, 374, 2126, 1997, 396, - /* 1590 */ 1459, 1461, 397, 649, 1432, 1433, 188, 401, 2010, 1995, - /* 1600 */ 648, 405, 403, 640, 1515, 1516, 1518, 1519, 1520, 1521, - /* 1610 */ 404, 1994, 407, 1993, 2042, 2060, 409, 1992, 411, 1991, - /* 1620 */ 413, 78, 1400, 649, 1399, 1961, 1960, 1959, 2010, 2041, - /* 1630 */ 648, 420, 421, 2077, 1958, 1957, 109, 2043, 652, 2045, - /* 1640 */ 2046, 647, 1351, 642, 2042, 2060, 1913, 1912, 635, 1910, - /* 1650 */ 2130, 144, 1909, 649, 374, 2126, 1908, 1911, 2010, 2041, - /* 1660 */ 648, 1907, 1906, 2077, 193, 438, 110, 2043, 652, 2045, - /* 1670 */ 2046, 647, 1904, 642, 1903, 2060, 1902, 1901, 2042, 440, - /* 1680 */ 2130, 1915, 1900, 649, 637, 2126, 1899, 1898, 2010, 650, - /* 1690 */ 648, 1897, 1896, 2077, 1895, 1894, 110, 2043, 652, 2045, - /* 1700 */ 2046, 647, 1893, 642, 1892, 2042, 1891, 1890, 1889, 2060, - /* 1710 */ 2130, 1888, 1887, 1886, 339, 2126, 1885, 649, 1884, 2041, - /* 1720 */ 146, 1883, 2010, 2077, 648, 1914, 169, 2043, 652, 2045, - /* 1730 */ 2046, 647, 1882, 642, 1881, 1880, 2060, 1353, 1879, 1878, - /* 1740 */ 468, 1877, 1876, 1740, 649, 1230, 199, 1739, 201, 2010, - /* 1750 */ 1738, 648, 2030, 2041, 2042, 202, 1736, 2077, 1700, 204, - /* 1760 */ 168, 2043, 652, 2045, 2046, 647, 75, 642, 177, 1143, - /* 1770 */ 485, 1142, 1699, 487, 1974, 1968, 205, 1956, 597, 2222, - /* 1780 */ 2041, 212, 1955, 76, 2077, 2060, 1933, 110, 2043, 652, - /* 1790 */ 2045, 2046, 647, 649, 642, 1801, 1177, 1735, 2010, 210, - /* 1800 */ 648, 2130, 2168, 1733, 502, 504, 2127, 503, 1731, 507, - /* 1810 */ 508, 506, 1729, 510, 1727, 511, 2042, 1714, 514, 512, - /* 1820 */ 516, 515, 1713, 1696, 1803, 62, 1299, 1298, 1802, 2041, - /* 1830 */ 1725, 222, 707, 2077, 1221, 1220, 318, 2043, 652, 2045, - /* 1840 */ 2046, 647, 1219, 642, 1218, 1215, 709, 2060, 2042, 1213, - /* 1850 */ 1214, 1212, 1718, 354, 355, 649, 540, 1716, 356, 1695, - /* 1860 */ 2010, 543, 648, 1694, 545, 1693, 549, 111, 547, 1420, - /* 1870 */ 1422, 1973, 1419, 1406, 55, 1967, 562, 1954, 1952, 2060, - /* 1880 */ 592, 1424, 2206, 26, 369, 66, 162, 649, 16, 244, - /* 1890 */ 19, 2041, 2010, 1633, 648, 2077, 576, 2042, 169, 2043, - /* 1900 */ 652, 2045, 2046, 647, 578, 642, 568, 28, 58, 248, - /* 1910 */ 563, 360, 5, 59, 2042, 250, 1615, 170, 255, 256, - /* 1920 */ 6, 254, 20, 2041, 30, 64, 1648, 2077, 2060, 2031, - /* 1930 */ 325, 2043, 652, 2045, 2046, 647, 646, 642, 29, 21, - /* 1940 */ 1607, 2010, 1653, 648, 91, 2060, 2042, 1654, 17, 1647, - /* 1950 */ 379, 2223, 365, 649, 1652, 1651, 366, 1582, 2010, 1581, - /* 1960 */ 648, 1953, 57, 268, 1951, 56, 1950, 1932, 94, 93, - /* 1970 */ 173, 2042, 2041, 274, 1931, 96, 2077, 2060, 287, 324, - /* 1980 */ 2043, 652, 2045, 2046, 647, 649, 642, 275, 2096, 2041, - /* 1990 */ 2010, 1613, 648, 2077, 102, 2042, 325, 2043, 652, 2045, - /* 2000 */ 2046, 647, 2060, 642, 22, 277, 282, 381, 623, 67, - /* 2010 */ 649, 12, 23, 1457, 1544, 2010, 1534, 648, 174, 284, - /* 2020 */ 2042, 555, 1512, 98, 1533, 2077, 2060, 10, 320, 2043, - /* 2030 */ 652, 2045, 2046, 647, 649, 642, 2080, 641, 36, 2010, - /* 2040 */ 1510, 648, 1509, 1481, 15, 24, 2041, 186, 1489, 25, - /* 2050 */ 2077, 2060, 655, 325, 2043, 652, 2045, 2046, 647, 649, - /* 2060 */ 642, 651, 653, 382, 2010, 657, 648, 1284, 659, 660, - /* 2070 */ 2041, 662, 1281, 1278, 2077, 663, 665, 309, 2043, 652, - /* 2080 */ 2045, 2046, 647, 2042, 642, 1272, 666, 668, 1261, 1270, - /* 2090 */ 669, 675, 290, 103, 104, 2041, 1293, 1276, 1275, 2077, - /* 2100 */ 1274, 1273, 310, 2043, 652, 2045, 2046, 647, 74, 642, - /* 2110 */ 2042, 1289, 1175, 685, 2060, 1209, 1208, 1207, 1206, 291, - /* 2120 */ 1205, 1204, 649, 1202, 1228, 1200, 1199, 2010, 1198, 648, - /* 2130 */ 697, 1196, 2042, 1195, 1194, 1193, 1192, 1191, 1190, 1225, - /* 2140 */ 1223, 2060, 1187, 1186, 1183, 1182, 1181, 1180, 1732, 649, - /* 2150 */ 717, 1730, 718, 719, 2010, 721, 648, 723, 2041, 1728, - /* 2160 */ 725, 727, 2077, 2060, 722, 311, 2043, 652, 2045, 2046, - /* 2170 */ 647, 649, 642, 1726, 726, 729, 2010, 730, 648, 1712, - /* 2180 */ 731, 733, 1132, 1692, 294, 2041, 737, 741, 1443, 2077, - /* 2190 */ 304, 740, 317, 2043, 652, 2045, 2046, 647, 1667, 642, - /* 2200 */ 1667, 1667, 1667, 1667, 1667, 1667, 1667, 2041, 1667, 1667, - /* 2210 */ 1667, 2077, 2042, 1667, 321, 2043, 652, 2045, 2046, 647, - /* 2220 */ 1667, 642, 1667, 1667, 1667, 1667, 1667, 1667, 1667, 2042, - /* 2230 */ 1667, 1667, 1667, 1667, 1667, 1667, 1667, 1667, 1667, 1667, - /* 2240 */ 1667, 1667, 1667, 2060, 1667, 1667, 2042, 1667, 1667, 1667, - /* 2250 */ 1667, 649, 1667, 1667, 1667, 1667, 2010, 1667, 648, 1667, - /* 2260 */ 2060, 1667, 1667, 1667, 1667, 1667, 1667, 1667, 649, 1667, - /* 2270 */ 1667, 1667, 1667, 2010, 1667, 648, 1667, 2060, 2042, 1667, - /* 2280 */ 1667, 1667, 1667, 1667, 1667, 649, 1667, 2041, 1667, 1667, - /* 2290 */ 2010, 2077, 648, 1667, 313, 2043, 652, 2045, 2046, 647, - /* 2300 */ 1667, 642, 1667, 2042, 2041, 1667, 1667, 1667, 2077, 2060, - /* 2310 */ 1667, 322, 2043, 652, 2045, 2046, 647, 649, 642, 1667, - /* 2320 */ 1667, 2041, 2010, 1667, 648, 2077, 1667, 2042, 314, 2043, - /* 2330 */ 652, 2045, 2046, 647, 2060, 642, 1667, 1667, 1667, 1667, - /* 2340 */ 1667, 1667, 649, 1667, 1667, 1667, 1667, 2010, 1667, 648, - /* 2350 */ 1667, 1667, 2042, 2041, 1667, 1667, 1667, 2077, 2060, 1667, - /* 2360 */ 323, 2043, 652, 2045, 2046, 647, 649, 642, 1667, 1667, - /* 2370 */ 1667, 2010, 1667, 648, 1667, 1667, 1667, 1667, 2041, 1667, - /* 2380 */ 1667, 1667, 2077, 2060, 1667, 315, 2043, 652, 2045, 2046, - /* 2390 */ 647, 649, 642, 1667, 1667, 1667, 2010, 1667, 648, 1667, - /* 2400 */ 1667, 1667, 2041, 1667, 1667, 1667, 2077, 1667, 1667, 328, - /* 2410 */ 2043, 652, 2045, 2046, 647, 2042, 642, 1667, 1667, 1667, - /* 2420 */ 1667, 1667, 1667, 1667, 1667, 1667, 1667, 2041, 1667, 1667, - /* 2430 */ 1667, 2077, 1667, 1667, 329, 2043, 652, 2045, 2046, 647, - /* 2440 */ 1667, 642, 2042, 1667, 1667, 1667, 2060, 1667, 1667, 1667, - /* 2450 */ 1667, 1667, 1667, 1667, 649, 1667, 1667, 1667, 1667, 2010, - /* 2460 */ 1667, 648, 1667, 1667, 2042, 1667, 1667, 1667, 1667, 1667, - /* 2470 */ 1667, 1667, 1667, 2060, 1667, 1667, 1667, 1667, 1667, 1667, - /* 2480 */ 1667, 649, 1667, 1667, 1667, 1667, 2010, 1667, 648, 1667, - /* 2490 */ 2041, 1667, 1667, 1667, 2077, 2060, 1667, 2054, 2043, 652, - /* 2500 */ 2045, 2046, 647, 649, 642, 1667, 1667, 1667, 2010, 1667, - /* 2510 */ 648, 1667, 1667, 1667, 1667, 1667, 1667, 2041, 1667, 1667, - /* 2520 */ 1667, 2077, 1667, 1667, 2053, 2043, 652, 2045, 2046, 647, - /* 2530 */ 1667, 642, 1667, 1667, 1667, 1667, 1667, 1667, 1667, 2041, - /* 2540 */ 1667, 1667, 1667, 2077, 2042, 1667, 2052, 2043, 652, 2045, - /* 2550 */ 2046, 647, 1667, 642, 1667, 1667, 1667, 1667, 1667, 1667, - /* 2560 */ 1667, 2042, 1667, 1667, 1667, 1667, 1667, 1667, 1667, 1667, - /* 2570 */ 1667, 1667, 1667, 1667, 1667, 2060, 1667, 1667, 2042, 1667, - /* 2580 */ 1667, 1667, 1667, 649, 1667, 1667, 1667, 1667, 2010, 1667, - /* 2590 */ 648, 1667, 2060, 1667, 1667, 1667, 1667, 1667, 1667, 1667, - /* 2600 */ 649, 1667, 1667, 1667, 1667, 2010, 1667, 648, 1667, 2060, - /* 2610 */ 2042, 1667, 1667, 1667, 1667, 1667, 1667, 649, 1667, 2041, - /* 2620 */ 1667, 1667, 2010, 2077, 648, 1667, 341, 2043, 652, 2045, - /* 2630 */ 2046, 647, 1667, 642, 1667, 2042, 2041, 1667, 1667, 1667, - /* 2640 */ 2077, 2060, 1667, 342, 2043, 652, 2045, 2046, 647, 649, - /* 2650 */ 642, 1667, 1667, 2041, 2010, 1667, 648, 2077, 1667, 2042, - /* 2660 */ 338, 2043, 652, 2045, 2046, 647, 2060, 642, 1667, 1667, - /* 2670 */ 1667, 1667, 1667, 1667, 649, 1667, 1667, 1667, 1667, 2010, - /* 2680 */ 1667, 648, 1667, 1667, 1667, 2041, 1667, 1667, 1667, 2077, - /* 2690 */ 2060, 1667, 343, 2043, 652, 2045, 2046, 647, 649, 642, - /* 2700 */ 1667, 1667, 1667, 2010, 1667, 648, 1667, 1667, 1667, 1667, - /* 2710 */ 650, 1667, 1667, 1667, 2077, 1667, 1667, 320, 2043, 652, - /* 2720 */ 2045, 2046, 647, 1667, 642, 1667, 1667, 1667, 1667, 1667, - /* 2730 */ 1667, 1667, 1667, 1667, 2041, 1667, 1667, 1667, 2077, 1667, - /* 2740 */ 1667, 319, 2043, 652, 2045, 2046, 647, 1667, 642, + /* 0 */ 387, 376, 490, 2072, 491, 1726, 603, 1841, 161, 164, + /* 10 */ 2231, 1149, 45, 43, 1614, 363, 176, 1854, 1854, 549, + /* 20 */ 384, 1843, 1463, 615, 1903, 602, 182, 1971, 1247, 2058, + /* 30 */ 2232, 604, 2054, 1544, 559, 1461, 2090, 351, 1954, 375, + /* 40 */ 2054, 1246, 1968, 627, 618, 1971, 13, 12, 236, 2040, + /* 50 */ 1151, 656, 1154, 1155, 1488, 166, 139, 1702, 1539, 1488, + /* 60 */ 1969, 627, 1905, 552, 18, 1905, 2050, 2056, 546, 349, + /* 70 */ 1688, 1469, 362, 235, 2050, 2056, 365, 650, 1903, 640, + /* 80 */ 2071, 1903, 429, 178, 2107, 650, 2235, 109, 2073, 660, + /* 90 */ 2075, 2076, 655, 639, 650, 132, 1892, 747, 2236, 179, + /* 100 */ 14, 2160, 529, 476, 389, 378, 2156, 1898, 1900, 167, + /* 110 */ 45, 43, 1852, 625, 69, 1490, 1798, 68, 384, 184, + /* 120 */ 1463, 269, 2168, 614, 332, 133, 613, 2186, 508, 2231, + /* 130 */ 1490, 1544, 499, 1461, 491, 1726, 1546, 1547, 397, 603, + /* 140 */ 621, 31, 396, 2231, 602, 182, 1587, 38, 37, 2232, + /* 150 */ 604, 44, 42, 41, 40, 39, 1539, 489, 602, 182, + /* 160 */ 494, 1732, 18, 2232, 604, 1489, 1519, 1529, 1713, 1469, + /* 170 */ 1756, 122, 1545, 1548, 121, 120, 119, 118, 117, 116, + /* 180 */ 115, 114, 113, 578, 598, 578, 1464, 2231, 1462, 2231, + /* 190 */ 44, 42, 41, 40, 39, 747, 1676, 639, 14, 694, + /* 200 */ 1382, 1383, 2237, 182, 2237, 182, 593, 2232, 604, 2232, + /* 210 */ 604, 176, 1467, 1468, 2040, 1518, 1521, 1522, 1523, 1524, + /* 220 */ 1525, 1526, 1527, 1528, 652, 648, 1537, 1538, 1540, 1541, + /* 230 */ 1542, 1543, 2, 1955, 1546, 1547, 724, 723, 722, 721, + /* 240 */ 394, 1712, 720, 719, 143, 714, 713, 712, 711, 710, + /* 250 */ 709, 708, 156, 704, 703, 702, 393, 392, 699, 698, + /* 260 */ 697, 696, 695, 271, 1519, 1529, 639, 567, 38, 37, + /* 270 */ 1545, 1548, 44, 42, 41, 40, 39, 48, 271, 640, + /* 280 */ 1491, 1327, 1328, 467, 1464, 692, 1462, 2040, 238, 599, + /* 290 */ 594, 587, 237, 38, 37, 132, 1487, 44, 42, 41, + /* 300 */ 40, 39, 534, 154, 153, 689, 688, 687, 151, 86, + /* 310 */ 1467, 1468, 1852, 1518, 1521, 1522, 1523, 1524, 1525, 1526, + /* 320 */ 1527, 1528, 652, 648, 1537, 1538, 1540, 1541, 1542, 1543, + /* 330 */ 2, 11, 45, 43, 1848, 498, 626, 2059, 494, 1732, + /* 340 */ 384, 1293, 1463, 423, 198, 197, 48, 422, 2054, 344, + /* 350 */ 89, 339, 606, 1544, 361, 1461, 560, 1284, 682, 681, + /* 360 */ 680, 1288, 679, 1290, 1291, 678, 675, 466, 1299, 672, + /* 370 */ 1301, 1302, 669, 666, 1691, 194, 35, 290, 1539, 1829, + /* 380 */ 496, 2072, 2050, 2056, 18, 506, 492, 1964, 578, 610, + /* 390 */ 2033, 1469, 2231, 650, 1573, 122, 1899, 1900, 121, 120, + /* 400 */ 119, 118, 117, 116, 115, 114, 113, 2237, 182, 86, + /* 410 */ 281, 282, 2232, 604, 2090, 280, 83, 747, 1618, 82, + /* 420 */ 14, 1168, 657, 1167, 1488, 353, 185, 2040, 249, 656, + /* 430 */ 45, 43, 1549, 61, 1847, 578, 222, 1554, 384, 2231, + /* 440 */ 1463, 38, 37, 1488, 49, 44, 42, 41, 40, 39, + /* 450 */ 1574, 1544, 1169, 1461, 2237, 182, 1546, 1547, 2071, 2232, + /* 460 */ 604, 100, 2107, 272, 106, 109, 2073, 660, 2075, 2076, + /* 470 */ 655, 1690, 650, 1711, 1710, 142, 1539, 149, 2131, 2160, + /* 480 */ 140, 718, 716, 378, 2156, 1845, 1519, 1529, 1844, 1469, + /* 490 */ 1759, 692, 1545, 1548, 1746, 131, 130, 129, 128, 127, + /* 500 */ 126, 125, 124, 123, 11, 61, 1464, 92, 1462, 154, + /* 510 */ 153, 689, 688, 687, 151, 747, 545, 1488, 46, 2040, + /* 520 */ 2040, 34, 382, 1568, 1569, 1570, 1571, 1572, 1576, 1577, + /* 530 */ 1578, 1579, 1467, 1468, 1469, 1518, 1521, 1522, 1523, 1524, + /* 540 */ 1525, 1526, 1527, 1528, 652, 648, 1537, 1538, 1540, 1541, + /* 550 */ 1542, 1543, 2, 1251, 1546, 1547, 544, 543, 542, 544, + /* 560 */ 543, 542, 1489, 685, 136, 538, 1250, 136, 538, 537, + /* 570 */ 1520, 1611, 537, 2090, 536, 541, 2058, 536, 541, 2072, + /* 580 */ 535, 597, 185, 535, 1519, 1529, 615, 2054, 706, 1520, + /* 590 */ 1545, 1548, 558, 185, 38, 37, 65, 61, 44, 42, + /* 600 */ 41, 40, 39, 33, 1464, 556, 1462, 554, 1491, 38, + /* 610 */ 37, 1683, 2090, 44, 42, 41, 40, 39, 611, 139, + /* 620 */ 618, 2050, 2056, 366, 1837, 2040, 596, 656, 478, 1839, + /* 630 */ 1467, 1468, 650, 1518, 1521, 1522, 1523, 1524, 1525, 1526, + /* 640 */ 1527, 1528, 652, 648, 1537, 1538, 1540, 1541, 1542, 1543, + /* 650 */ 2, 45, 43, 61, 185, 1905, 2071, 640, 239, 384, + /* 660 */ 2107, 1463, 372, 109, 2073, 660, 2075, 2076, 655, 1642, + /* 670 */ 650, 1903, 1544, 187, 1461, 179, 577, 2160, 1399, 1400, + /* 680 */ 1950, 378, 2156, 617, 180, 2168, 2169, 1653, 137, 2173, + /* 690 */ 1852, 190, 61, 640, 38, 37, 2072, 1539, 44, 42, + /* 700 */ 41, 40, 39, 2187, 41, 40, 39, 1682, 1835, 54, + /* 710 */ 1469, 626, 1709, 684, 1398, 1401, 590, 589, 1640, 1641, + /* 720 */ 1643, 1644, 1645, 1437, 1438, 2175, 1852, 38, 37, 2090, + /* 730 */ 27, 44, 42, 41, 40, 39, 747, 657, 421, 46, + /* 740 */ 420, 2236, 2040, 2236, 656, 2231, 185, 2231, 52, 45, + /* 750 */ 43, 2172, 2175, 640, 2034, 1236, 191, 384, 2040, 1463, + /* 760 */ 624, 2235, 1964, 2235, 419, 2232, 2234, 2232, 2233, 427, + /* 770 */ 1544, 387, 1461, 2071, 640, 1546, 1547, 2107, 2171, 164, + /* 780 */ 168, 2073, 660, 2075, 2076, 655, 1852, 650, 1854, 626, + /* 790 */ 241, 1238, 416, 640, 1905, 1539, 1708, 640, 2072, 578, + /* 800 */ 640, 377, 185, 2231, 1707, 1519, 1529, 1852, 1469, 428, + /* 810 */ 1903, 1545, 1548, 437, 418, 414, 452, 1610, 2237, 182, + /* 820 */ 1630, 579, 2197, 2232, 604, 1464, 1852, 1462, 390, 1828, + /* 830 */ 1852, 2090, 1935, 1852, 747, 430, 164, 14, 635, 657, + /* 840 */ 1964, 185, 2040, 615, 2040, 1854, 656, 1168, 431, 1167, + /* 850 */ 2040, 1467, 1468, 1575, 1518, 1521, 1522, 1523, 1524, 1525, + /* 860 */ 1526, 1527, 1528, 652, 648, 1537, 1538, 1540, 1541, 1542, + /* 870 */ 1543, 2, 1488, 1546, 1547, 2071, 139, 244, 1169, 2107, + /* 880 */ 1706, 1705, 109, 2073, 660, 2075, 2076, 655, 165, 650, + /* 890 */ 1905, 2058, 694, 310, 2135, 615, 2160, 388, 540, 539, + /* 900 */ 378, 2156, 2054, 1519, 1529, 1704, 1903, 308, 72, 1545, + /* 910 */ 1548, 71, 141, 38, 37, 2131, 8, 44, 42, 41, + /* 920 */ 40, 39, 2175, 1464, 32, 1462, 2040, 2040, 139, 205, + /* 930 */ 486, 484, 481, 1701, 1580, 1700, 2050, 2056, 379, 1154, + /* 940 */ 1155, 181, 2168, 2169, 2072, 137, 2173, 650, 2170, 1467, + /* 950 */ 1468, 2040, 1518, 1521, 1522, 1523, 1524, 1525, 1526, 1527, + /* 960 */ 1528, 652, 648, 1537, 1538, 1540, 1541, 1542, 1543, 2, + /* 970 */ 61, 335, 640, 1486, 2072, 2180, 1607, 2090, 1699, 2040, + /* 980 */ 460, 2040, 651, 474, 640, 657, 473, 447, 453, 1703, + /* 990 */ 2040, 1698, 656, 183, 2168, 2169, 446, 137, 2173, 1697, + /* 1000 */ 507, 443, 11, 475, 9, 1852, 445, 2090, 108, 1799, + /* 1010 */ 640, 640, 373, 13, 12, 657, 1827, 1852, 1520, 152, + /* 1020 */ 2040, 2071, 656, 640, 2040, 2107, 1849, 623, 109, 2073, + /* 1030 */ 660, 2075, 2076, 655, 642, 650, 2132, 2040, 640, 574, + /* 1040 */ 2251, 1696, 2160, 1852, 1852, 2040, 378, 2156, 80, 79, + /* 1050 */ 426, 2071, 352, 189, 619, 2107, 1852, 2194, 327, 2073, + /* 1060 */ 660, 2075, 2076, 655, 433, 650, 644, 1695, 2132, 1463, + /* 1070 */ 1491, 1852, 333, 163, 1694, 412, 53, 410, 406, 402, + /* 1080 */ 399, 419, 1461, 1950, 1950, 1693, 2008, 2040, 573, 2072, + /* 1090 */ 707, 565, 1814, 471, 192, 196, 465, 464, 463, 462, + /* 1100 */ 459, 458, 457, 456, 455, 451, 450, 449, 448, 334, + /* 1110 */ 440, 439, 438, 2040, 435, 434, 350, 647, 1469, 185, + /* 1120 */ 2040, 2200, 2090, 1905, 164, 1607, 640, 1472, 692, 640, + /* 1130 */ 657, 2040, 240, 1855, 2026, 2040, 578, 656, 2072, 1904, + /* 1140 */ 2231, 356, 285, 533, 747, 637, 154, 153, 689, 688, + /* 1150 */ 687, 151, 73, 1198, 686, 2237, 182, 1896, 266, 1852, + /* 1160 */ 2232, 604, 1852, 591, 532, 640, 2071, 640, 607, 690, + /* 1170 */ 2107, 2090, 1896, 109, 2073, 660, 2075, 2076, 655, 657, + /* 1180 */ 650, 638, 404, 291, 2040, 2251, 656, 2160, 1830, 1199, + /* 1190 */ 691, 378, 2156, 1896, 221, 640, 304, 2072, 1852, 1882, + /* 1200 */ 1852, 81, 2207, 51, 145, 3, 134, 357, 1471, 355, + /* 1210 */ 354, 391, 531, 247, 228, 2071, 533, 226, 248, 2107, + /* 1220 */ 2072, 105, 109, 2073, 660, 2075, 2076, 655, 1852, 650, + /* 1230 */ 2090, 102, 147, 1464, 2251, 1462, 2160, 532, 657, 230, + /* 1240 */ 378, 2156, 229, 2040, 232, 656, 234, 231, 1739, 233, + /* 1250 */ 1737, 585, 562, 2090, 561, 152, 152, 90, 260, 1467, + /* 1260 */ 1468, 657, 63, 63, 253, 1565, 2040, 700, 656, 152, + /* 1270 */ 547, 47, 550, 278, 2071, 1685, 1686, 70, 2107, 150, + /* 1280 */ 1475, 109, 2073, 660, 2075, 2076, 655, 2061, 650, 1217, + /* 1290 */ 152, 2091, 395, 2251, 1959, 2160, 1727, 2071, 2072, 378, + /* 1300 */ 2156, 2107, 63, 701, 109, 2073, 660, 2075, 2076, 655, + /* 1310 */ 2225, 650, 1432, 1435, 381, 380, 2251, 47, 2160, 1639, + /* 1320 */ 1638, 255, 378, 2156, 1477, 1215, 622, 1733, 1396, 2190, + /* 1330 */ 283, 2090, 1893, 2179, 632, 1544, 287, 1470, 616, 657, + /* 1340 */ 2063, 268, 1, 223, 2040, 47, 656, 1277, 38, 37, + /* 1350 */ 664, 150, 44, 42, 41, 40, 39, 2072, 171, 1581, + /* 1360 */ 1539, 1474, 152, 135, 525, 521, 517, 513, 220, 265, + /* 1370 */ 4, 398, 403, 1469, 1530, 2071, 742, 348, 150, 2107, + /* 1380 */ 2072, 1419, 109, 2073, 660, 2075, 2076, 655, 298, 650, + /* 1390 */ 2090, 195, 432, 1491, 2133, 608, 2160, 1960, 657, 646, + /* 1400 */ 378, 2156, 303, 2040, 436, 656, 469, 1305, 1309, 87, + /* 1410 */ 441, 1486, 218, 2090, 454, 1952, 461, 468, 470, 1316, + /* 1420 */ 1314, 657, 480, 479, 477, 199, 2040, 200, 656, 482, + /* 1430 */ 483, 1492, 202, 485, 2071, 155, 487, 1494, 2107, 488, + /* 1440 */ 497, 109, 2073, 660, 2075, 2076, 655, 500, 650, 1489, + /* 1450 */ 208, 501, 1493, 643, 210, 2160, 502, 2071, 1495, 378, + /* 1460 */ 2156, 2107, 2072, 503, 110, 2073, 660, 2075, 2076, 655, + /* 1470 */ 213, 650, 505, 215, 84, 85, 509, 1171, 2160, 217, + /* 1480 */ 211, 219, 2159, 2156, 216, 526, 504, 527, 1478, 528, + /* 1490 */ 1473, 530, 2017, 564, 2014, 2090, 338, 1842, 566, 112, + /* 1500 */ 2013, 88, 209, 657, 148, 225, 299, 242, 2040, 245, + /* 1510 */ 656, 2072, 1838, 227, 1481, 1483, 157, 158, 1840, 568, + /* 1520 */ 575, 1836, 159, 160, 569, 572, 592, 648, 1537, 1538, + /* 1530 */ 1540, 1541, 1542, 1543, 2072, 2206, 630, 2191, 2201, 2071, + /* 1540 */ 2205, 2182, 582, 2107, 2090, 588, 110, 2073, 660, 2075, + /* 1550 */ 2076, 655, 657, 650, 367, 595, 601, 2040, 261, 656, + /* 1560 */ 2160, 251, 254, 7, 645, 2156, 259, 2090, 583, 580, + /* 1570 */ 581, 172, 2254, 138, 263, 654, 2230, 264, 609, 368, + /* 1580 */ 2040, 612, 656, 1490, 1607, 2176, 620, 262, 658, 371, + /* 1590 */ 1496, 300, 2107, 628, 273, 110, 2073, 660, 2075, 2076, + /* 1600 */ 655, 629, 650, 95, 1965, 1979, 2072, 267, 1978, 2160, + /* 1610 */ 633, 2071, 634, 343, 2156, 2107, 1977, 97, 326, 2073, + /* 1620 */ 660, 2075, 2076, 655, 653, 650, 641, 2125, 301, 2072, + /* 1630 */ 374, 302, 99, 1853, 60, 101, 2141, 662, 1815, 2090, + /* 1640 */ 1897, 743, 294, 750, 305, 744, 746, 657, 329, 340, + /* 1650 */ 341, 50, 2040, 314, 656, 309, 307, 297, 2032, 2031, + /* 1660 */ 2030, 77, 2090, 2072, 2027, 400, 401, 1454, 1455, 188, + /* 1670 */ 657, 405, 175, 328, 318, 2040, 407, 656, 740, 736, + /* 1680 */ 732, 728, 295, 2071, 2025, 408, 409, 2107, 2024, 2072, + /* 1690 */ 169, 2073, 660, 2075, 2076, 655, 2090, 650, 411, 2023, + /* 1700 */ 413, 2022, 415, 2021, 657, 417, 2071, 78, 1422, 2040, + /* 1710 */ 2107, 656, 1421, 110, 2073, 660, 2075, 2076, 655, 1991, + /* 1720 */ 650, 1990, 2090, 107, 1989, 424, 288, 2160, 425, 1988, + /* 1730 */ 657, 1987, 2157, 1373, 1943, 2040, 1942, 656, 1940, 144, + /* 1740 */ 2071, 1939, 605, 2252, 2107, 1938, 1941, 168, 2073, 660, + /* 1750 */ 2075, 2076, 655, 2072, 650, 1937, 1936, 1934, 636, 193, + /* 1760 */ 442, 1931, 444, 1945, 1930, 1929, 2071, 1933, 1932, 1928, + /* 1770 */ 2107, 1927, 1926, 320, 2073, 660, 2075, 2076, 655, 1925, + /* 1780 */ 650, 1924, 1923, 1922, 1921, 2072, 2090, 1920, 1919, 2198, + /* 1790 */ 1918, 1917, 1916, 275, 657, 146, 1915, 1914, 274, 2040, + /* 1800 */ 1913, 656, 1944, 1912, 1911, 1910, 1909, 1375, 1908, 1907, + /* 1810 */ 2072, 472, 1906, 336, 1426, 1248, 243, 600, 2090, 337, + /* 1820 */ 1252, 1762, 1761, 1760, 201, 1758, 654, 1722, 203, 1244, + /* 1830 */ 2071, 2040, 204, 656, 2107, 1721, 2060, 169, 2073, 660, + /* 1840 */ 2075, 2076, 655, 2090, 650, 177, 493, 1157, 383, 206, + /* 1850 */ 75, 657, 1156, 207, 76, 2004, 2040, 495, 656, 2072, + /* 1860 */ 1998, 1986, 2071, 212, 214, 1985, 2107, 1963, 1831, 326, + /* 1870 */ 2073, 660, 2075, 2076, 655, 2072, 650, 1757, 2126, 1191, + /* 1880 */ 1755, 510, 511, 512, 1753, 514, 516, 2071, 515, 1751, + /* 1890 */ 2253, 2107, 2090, 518, 327, 2073, 660, 2075, 2076, 655, + /* 1900 */ 657, 650, 519, 520, 1749, 2040, 522, 656, 2090, 524, + /* 1910 */ 523, 1736, 1735, 385, 1321, 1320, 657, 1718, 1833, 1832, + /* 1920 */ 1235, 2040, 1234, 656, 2072, 62, 224, 1233, 1227, 1232, + /* 1930 */ 715, 1229, 717, 1747, 1228, 1226, 563, 358, 1740, 1738, + /* 1940 */ 2107, 2072, 359, 322, 2073, 660, 2075, 2076, 655, 360, + /* 1950 */ 650, 548, 2071, 1717, 1716, 1715, 2107, 2090, 2072, 327, + /* 1960 */ 2073, 660, 2075, 2076, 655, 657, 650, 551, 557, 553, + /* 1970 */ 2040, 555, 656, 1446, 2090, 1442, 111, 1444, 1441, 2003, + /* 1980 */ 1428, 26, 657, 66, 1997, 55, 570, 2040, 571, 656, + /* 1990 */ 1984, 2090, 1982, 576, 2236, 19, 246, 364, 1655, 657, + /* 2000 */ 16, 2071, 28, 250, 2040, 2107, 656, 2072, 311, 2073, + /* 2010 */ 660, 2075, 2076, 655, 584, 650, 586, 162, 2071, 5, + /* 2020 */ 6, 58, 2107, 2072, 59, 312, 2073, 660, 2075, 2076, + /* 2030 */ 655, 252, 650, 257, 258, 2071, 1637, 170, 30, 2107, + /* 2040 */ 2090, 2072, 313, 2073, 660, 2075, 2076, 655, 657, 650, + /* 2050 */ 256, 2061, 29, 2040, 64, 656, 2090, 21, 1629, 91, + /* 2060 */ 1670, 1675, 1676, 1669, 657, 369, 1674, 1673, 370, 2040, + /* 2070 */ 1604, 656, 1603, 270, 2090, 1983, 173, 1981, 56, 57, + /* 2080 */ 1980, 1962, 657, 20, 2071, 93, 94, 2040, 2107, 656, + /* 2090 */ 2072, 319, 2073, 660, 2075, 2076, 655, 276, 650, 22, + /* 2100 */ 2071, 17, 277, 1635, 2107, 279, 2072, 323, 2073, 660, + /* 2110 */ 2075, 2076, 655, 1961, 650, 284, 67, 96, 2071, 631, + /* 2120 */ 98, 102, 2107, 2090, 10, 315, 2073, 660, 2075, 2076, + /* 2130 */ 655, 657, 650, 289, 286, 23, 2040, 1556, 656, 2090, + /* 2140 */ 1555, 12, 1479, 1566, 2110, 174, 1534, 657, 649, 186, + /* 2150 */ 1532, 1511, 2040, 36, 656, 1531, 15, 24, 659, 1503, + /* 2160 */ 25, 663, 1306, 2072, 665, 386, 661, 2071, 1303, 667, + /* 2170 */ 668, 2107, 1300, 670, 324, 2073, 660, 2075, 2076, 655, + /* 2180 */ 2072, 650, 671, 2071, 673, 1294, 1292, 2107, 674, 676, + /* 2190 */ 316, 2073, 660, 2075, 2076, 655, 2090, 650, 1283, 677, + /* 2200 */ 103, 292, 1298, 104, 657, 683, 1315, 74, 1311, 2040, + /* 2210 */ 1297, 656, 1296, 2090, 693, 1295, 1189, 1223, 1222, 1221, + /* 2220 */ 1220, 657, 1219, 1218, 1216, 1214, 2040, 1213, 656, 2072, + /* 2230 */ 1212, 1242, 1207, 705, 1210, 293, 1209, 1208, 1206, 1205, + /* 2240 */ 2071, 1204, 1237, 1239, 2107, 2072, 1201, 325, 2073, 660, + /* 2250 */ 2075, 2076, 655, 1200, 650, 1197, 1196, 2071, 1195, 1194, + /* 2260 */ 1754, 2107, 2090, 725, 317, 2073, 660, 2075, 2076, 655, + /* 2270 */ 657, 650, 727, 726, 1752, 2040, 729, 656, 2090, 730, + /* 2280 */ 1750, 731, 733, 734, 735, 1748, 657, 737, 738, 739, + /* 2290 */ 1734, 2040, 741, 656, 2072, 1714, 1146, 296, 745, 1689, + /* 2300 */ 1465, 306, 748, 749, 1689, 1689, 2071, 1689, 1689, 1689, + /* 2310 */ 2107, 1689, 1689, 330, 2073, 660, 2075, 2076, 655, 2072, + /* 2320 */ 650, 1689, 2071, 1689, 1689, 1689, 2107, 2090, 1689, 331, + /* 2330 */ 2073, 660, 2075, 2076, 655, 657, 650, 1689, 1689, 1689, + /* 2340 */ 2040, 1689, 656, 2072, 1689, 1689, 1689, 1689, 1689, 1689, + /* 2350 */ 1689, 1689, 2090, 1689, 1689, 1689, 1689, 1689, 1689, 1689, + /* 2360 */ 657, 1689, 1689, 1689, 1689, 2040, 1689, 656, 1689, 1689, + /* 2370 */ 1689, 2071, 1689, 1689, 1689, 2107, 2090, 1689, 2084, 2073, + /* 2380 */ 660, 2075, 2076, 655, 657, 650, 1689, 1689, 1689, 2040, + /* 2390 */ 1689, 656, 1689, 1689, 1689, 1689, 2071, 1689, 1689, 1689, + /* 2400 */ 2107, 1689, 1689, 2083, 2073, 660, 2075, 2076, 655, 1689, + /* 2410 */ 650, 1689, 1689, 1689, 2072, 1689, 1689, 1689, 1689, 1689, + /* 2420 */ 2071, 1689, 1689, 1689, 2107, 1689, 1689, 2082, 2073, 660, + /* 2430 */ 2075, 2076, 655, 1689, 650, 1689, 2072, 1689, 1689, 1689, + /* 2440 */ 1689, 1689, 1689, 1689, 1689, 1689, 1689, 2090, 1689, 1689, + /* 2450 */ 1689, 1689, 1689, 1689, 1689, 657, 1689, 1689, 1689, 1689, + /* 2460 */ 2040, 1689, 656, 2072, 1689, 1689, 1689, 1689, 1689, 2090, + /* 2470 */ 1689, 1689, 1689, 1689, 1689, 1689, 1689, 657, 1689, 1689, + /* 2480 */ 1689, 1689, 2040, 1689, 656, 1689, 1689, 1689, 1689, 1689, + /* 2490 */ 1689, 2071, 1689, 1689, 1689, 2107, 2090, 1689, 345, 2073, + /* 2500 */ 660, 2075, 2076, 655, 657, 650, 1689, 1689, 1689, 2040, + /* 2510 */ 1689, 656, 2072, 2071, 1689, 1689, 1689, 2107, 1689, 1689, + /* 2520 */ 346, 2073, 660, 2075, 2076, 655, 1689, 650, 2072, 1689, + /* 2530 */ 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, + /* 2540 */ 2071, 1689, 1689, 1689, 2107, 2090, 1689, 342, 2073, 660, + /* 2550 */ 2075, 2076, 655, 657, 650, 1689, 1689, 1689, 2040, 1689, + /* 2560 */ 656, 2090, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 657, + /* 2570 */ 1689, 1689, 1689, 1689, 2040, 1689, 656, 2072, 1689, 1689, + /* 2580 */ 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 2071, + /* 2590 */ 1689, 1689, 1689, 2107, 1689, 1689, 347, 2073, 660, 2075, + /* 2600 */ 2076, 655, 1689, 650, 1689, 658, 1689, 1689, 1689, 2107, + /* 2610 */ 2090, 1689, 322, 2073, 660, 2075, 2076, 655, 657, 650, + /* 2620 */ 1689, 1689, 1689, 2040, 1689, 656, 1689, 1689, 1689, 1689, + /* 2630 */ 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, + /* 2640 */ 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, + /* 2650 */ 1689, 1689, 1689, 1689, 2071, 1689, 1689, 1689, 2107, 1689, + /* 2660 */ 1689, 321, 2073, 660, 2075, 2076, 655, 1689, 650, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 377, 439, 0, 339, 335, 443, 337, 338, 335, 363, - /* 10 */ 337, 338, 12, 13, 14, 392, 393, 2, 362, 361, - /* 20 */ 20, 459, 22, 8, 9, 463, 464, 12, 13, 14, - /* 30 */ 15, 16, 374, 33, 370, 35, 20, 331, 362, 383, - /* 40 */ 384, 364, 8, 9, 394, 369, 12, 13, 14, 15, - /* 50 */ 16, 339, 375, 439, 378, 8, 9, 443, 58, 12, - /* 60 */ 13, 14, 15, 16, 64, 63, 373, 20, 362, 376, - /* 70 */ 377, 71, 328, 459, 346, 339, 370, 463, 464, 351, - /* 80 */ 20, 375, 22, 377, 12, 13, 409, 410, 411, 439, - /* 90 */ 4, 379, 20, 443, 22, 35, 96, 420, 64, 435, - /* 100 */ 436, 437, 21, 439, 440, 33, 370, 35, 458, 459, - /* 110 */ 44, 51, 406, 463, 464, 34, 410, 36, 118, 413, - /* 120 */ 414, 415, 416, 417, 418, 419, 420, 421, 422, 43, - /* 130 */ 58, 45, 46, 133, 134, 20, 64, 336, 394, 105, - /* 140 */ 339, 340, 398, 71, 331, 109, 110, 111, 112, 113, - /* 150 */ 114, 115, 116, 117, 118, 119, 362, 121, 122, 123, - /* 160 */ 124, 125, 126, 163, 164, 377, 339, 20, 96, 169, - /* 170 */ 170, 435, 436, 437, 354, 439, 440, 389, 384, 443, - /* 180 */ 392, 393, 362, 439, 184, 339, 186, 443, 375, 369, - /* 190 */ 118, 371, 20, 58, 458, 459, 162, 370, 378, 463, - /* 200 */ 464, 63, 458, 459, 20, 133, 134, 463, 464, 20, - /* 210 */ 210, 211, 165, 213, 214, 215, 216, 217, 218, 219, + /* 0 */ 356, 356, 335, 331, 337, 338, 441, 365, 364, 364, + /* 10 */ 445, 4, 12, 13, 14, 371, 364, 373, 373, 4, + /* 20 */ 20, 366, 22, 339, 380, 460, 461, 379, 22, 366, + /* 30 */ 465, 466, 377, 33, 19, 35, 364, 385, 386, 391, + /* 40 */ 377, 35, 394, 395, 372, 379, 1, 2, 33, 377, + /* 50 */ 43, 379, 45, 46, 20, 330, 372, 332, 58, 20, + /* 60 */ 394, 395, 364, 48, 64, 364, 411, 412, 53, 371, + /* 70 */ 328, 71, 371, 58, 411, 412, 413, 422, 380, 339, + /* 80 */ 408, 380, 339, 363, 412, 422, 3, 415, 416, 417, + /* 90 */ 418, 419, 420, 20, 422, 355, 376, 97, 3, 427, + /* 100 */ 100, 429, 362, 97, 375, 433, 434, 378, 379, 346, + /* 110 */ 12, 13, 372, 20, 99, 20, 353, 102, 20, 447, + /* 120 */ 22, 437, 438, 439, 381, 441, 442, 455, 63, 445, + /* 130 */ 20, 33, 335, 35, 337, 338, 136, 137, 396, 441, + /* 140 */ 396, 2, 400, 445, 460, 461, 101, 8, 9, 465, + /* 150 */ 466, 12, 13, 14, 15, 16, 58, 336, 460, 461, + /* 160 */ 339, 340, 64, 465, 466, 20, 166, 167, 331, 71, + /* 170 */ 0, 21, 172, 173, 24, 25, 26, 27, 28, 29, + /* 180 */ 30, 31, 32, 441, 20, 441, 186, 445, 188, 445, + /* 190 */ 12, 13, 14, 15, 16, 97, 101, 20, 100, 63, + /* 200 */ 166, 167, 460, 461, 460, 461, 171, 465, 466, 465, + /* 210 */ 466, 364, 212, 213, 377, 215, 216, 217, 218, 219, /* 220 */ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, - /* 230 */ 230, 96, 386, 98, 388, 163, 164, 168, 343, 63, - /* 240 */ 21, 169, 170, 24, 25, 26, 27, 28, 29, 30, - /* 250 */ 31, 32, 357, 14, 37, 330, 184, 332, 186, 20, - /* 260 */ 365, 434, 435, 436, 437, 20, 439, 440, 96, 235, - /* 270 */ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, - /* 280 */ 96, 96, 210, 211, 35, 213, 214, 215, 216, 217, - /* 290 */ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - /* 300 */ 228, 229, 230, 364, 232, 12, 13, 12, 13, 14, - /* 310 */ 15, 16, 20, 20, 375, 22, 99, 19, 101, 102, - /* 320 */ 71, 104, 253, 254, 255, 108, 33, 20, 35, 336, - /* 330 */ 331, 33, 339, 340, 339, 428, 429, 8, 9, 273, - /* 340 */ 179, 12, 13, 14, 15, 16, 48, 130, 409, 410, - /* 350 */ 411, 58, 54, 55, 56, 57, 58, 64, 345, 420, - /* 360 */ 14, 362, 201, 202, 71, 370, 20, 107, 183, 370, - /* 370 */ 185, 412, 359, 20, 375, 22, 377, 12, 13, 14, - /* 380 */ 20, 368, 3, 248, 232, 20, 234, 22, 96, 96, - /* 390 */ 127, 128, 4, 95, 209, 132, 98, 438, 33, 20, - /* 400 */ 35, 424, 163, 426, 51, 406, 0, 339, 331, 410, - /* 410 */ 339, 118, 413, 414, 415, 416, 417, 418, 0, 420, - /* 420 */ 248, 353, 372, 58, 353, 375, 133, 134, 360, 131, - /* 430 */ 435, 436, 437, 248, 439, 440, 71, 339, 370, 21, - /* 440 */ 232, 370, 24, 25, 26, 27, 28, 29, 30, 31, - /* 450 */ 32, 353, 375, 454, 455, 58, 163, 164, 360, 362, - /* 460 */ 343, 96, 169, 170, 166, 424, 369, 426, 370, 171, - /* 470 */ 163, 164, 66, 67, 68, 378, 97, 184, 47, 186, - /* 480 */ 74, 75, 365, 118, 96, 79, 188, 80, 190, 0, - /* 490 */ 84, 85, 95, 133, 134, 98, 90, 127, 133, 134, - /* 500 */ 376, 377, 20, 210, 211, 176, 213, 214, 215, 216, - /* 510 */ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, - /* 520 */ 227, 228, 229, 230, 66, 67, 68, 96, 163, 164, - /* 530 */ 0, 362, 74, 75, 169, 170, 339, 79, 369, 339, - /* 540 */ 248, 71, 84, 85, 165, 138, 139, 378, 90, 184, - /* 550 */ 353, 186, 339, 353, 24, 25, 26, 27, 28, 29, - /* 560 */ 30, 31, 32, 193, 194, 394, 107, 370, 161, 398, - /* 570 */ 370, 14, 15, 16, 331, 210, 211, 339, 213, 214, - /* 580 */ 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, - /* 590 */ 225, 226, 227, 228, 229, 230, 12, 13, 20, 386, - /* 600 */ 370, 388, 345, 274, 20, 362, 22, 339, 439, 339, - /* 610 */ 439, 381, 443, 370, 443, 133, 134, 33, 375, 35, - /* 620 */ 377, 353, 33, 353, 386, 368, 388, 458, 459, 458, - /* 630 */ 459, 96, 463, 464, 463, 464, 248, 48, 370, 331, - /* 640 */ 370, 152, 58, 54, 55, 56, 57, 58, 339, 406, - /* 650 */ 161, 169, 170, 410, 210, 71, 413, 414, 415, 416, - /* 660 */ 417, 418, 353, 420, 96, 354, 14, 331, 12, 13, - /* 670 */ 427, 3, 20, 362, 431, 432, 20, 71, 22, 370, - /* 680 */ 96, 4, 371, 375, 95, 331, 412, 98, 363, 33, - /* 690 */ 331, 35, 423, 8, 9, 426, 19, 12, 13, 14, - /* 700 */ 15, 16, 118, 259, 260, 261, 262, 263, 264, 265, - /* 710 */ 33, 375, 438, 331, 58, 8, 9, 133, 134, 12, - /* 720 */ 13, 14, 15, 16, 128, 48, 2, 71, 132, 375, - /* 730 */ 53, 0, 8, 9, 375, 58, 12, 13, 14, 15, - /* 740 */ 16, 331, 439, 165, 162, 412, 443, 163, 164, 362, - /* 750 */ 339, 44, 96, 169, 170, 166, 167, 375, 1, 2, - /* 760 */ 171, 458, 459, 174, 353, 378, 463, 464, 184, 354, - /* 770 */ 186, 438, 95, 4, 118, 98, 362, 362, 331, 190, - /* 780 */ 363, 370, 97, 248, 370, 375, 371, 191, 192, 133, - /* 790 */ 134, 195, 358, 197, 210, 211, 20, 213, 214, 215, - /* 800 */ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, - /* 810 */ 226, 227, 228, 229, 230, 163, 248, 235, 363, 163, - /* 820 */ 164, 18, 375, 20, 108, 169, 170, 245, 362, 415, - /* 830 */ 27, 348, 349, 30, 362, 44, 33, 371, 404, 108, - /* 840 */ 184, 369, 186, 127, 128, 129, 130, 131, 132, 331, - /* 850 */ 378, 48, 331, 50, 97, 363, 53, 370, 127, 128, - /* 860 */ 129, 130, 131, 132, 348, 349, 210, 211, 381, 213, - /* 870 */ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, - /* 880 */ 224, 225, 226, 227, 228, 229, 230, 350, 97, 352, - /* 890 */ 339, 372, 18, 375, 375, 331, 375, 23, 95, 0, - /* 900 */ 339, 8, 9, 0, 353, 12, 13, 14, 15, 16, - /* 910 */ 107, 37, 38, 363, 353, 41, 331, 370, 363, 8, - /* 920 */ 9, 370, 362, 12, 13, 14, 15, 16, 381, 369, - /* 930 */ 42, 370, 44, 59, 60, 61, 62, 269, 378, 375, - /* 940 */ 137, 165, 108, 140, 141, 142, 143, 144, 145, 146, - /* 950 */ 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, - /* 960 */ 375, 158, 159, 160, 130, 66, 67, 68, 69, 70, - /* 970 */ 96, 72, 73, 74, 75, 76, 77, 78, 79, 80, - /* 980 */ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - /* 990 */ 91, 92, 339, 339, 331, 8, 9, 399, 394, 12, - /* 1000 */ 13, 14, 15, 16, 22, 339, 353, 353, 97, 135, - /* 1010 */ 331, 108, 0, 339, 339, 339, 20, 35, 249, 353, - /* 1020 */ 39, 331, 331, 370, 370, 331, 331, 353, 353, 353, - /* 1030 */ 127, 128, 129, 130, 131, 132, 370, 372, 375, 20, - /* 1040 */ 375, 362, 331, 439, 370, 370, 370, 443, 44, 370, - /* 1050 */ 176, 177, 178, 71, 375, 181, 377, 339, 165, 331, - /* 1060 */ 48, 355, 458, 459, 358, 375, 375, 463, 464, 375, - /* 1070 */ 375, 353, 44, 364, 200, 45, 46, 203, 35, 205, - /* 1080 */ 206, 207, 208, 209, 375, 406, 375, 332, 370, 410, - /* 1090 */ 362, 364, 413, 414, 415, 416, 417, 418, 370, 420, - /* 1100 */ 118, 97, 375, 375, 425, 377, 427, 351, 354, 339, - /* 1110 */ 431, 432, 246, 247, 22, 64, 362, 364, 409, 410, - /* 1120 */ 411, 339, 248, 353, 445, 371, 331, 35, 375, 420, - /* 1130 */ 394, 42, 453, 44, 406, 353, 409, 410, 410, 0, - /* 1140 */ 370, 413, 414, 415, 416, 417, 418, 420, 420, 165, - /* 1150 */ 44, 423, 370, 425, 426, 427, 172, 362, 331, 431, - /* 1160 */ 432, 165, 409, 410, 107, 370, 184, 0, 186, 0, - /* 1170 */ 375, 100, 377, 420, 103, 439, 0, 100, 100, 443, - /* 1180 */ 103, 103, 163, 44, 100, 58, 196, 103, 198, 362, - /* 1190 */ 385, 22, 210, 211, 458, 459, 0, 370, 22, 463, - /* 1200 */ 464, 406, 375, 97, 377, 410, 35, 331, 413, 414, - /* 1210 */ 415, 416, 417, 418, 157, 420, 49, 44, 22, 44, - /* 1220 */ 425, 44, 427, 133, 134, 98, 431, 432, 247, 186, - /* 1230 */ 44, 44, 44, 406, 44, 1, 2, 410, 362, 96, - /* 1240 */ 413, 414, 415, 416, 417, 418, 370, 420, 453, 106, - /* 1250 */ 467, 375, 425, 377, 427, 456, 44, 394, 431, 432, - /* 1260 */ 44, 210, 44, 44, 44, 341, 331, 450, 362, 442, - /* 1270 */ 97, 44, 97, 13, 97, 44, 44, 44, 35, 44, - /* 1280 */ 341, 385, 406, 97, 97, 97, 410, 97, 338, 413, - /* 1290 */ 414, 415, 416, 417, 418, 35, 420, 362, 13, 271, - /* 1300 */ 331, 425, 439, 427, 374, 370, 443, 431, 432, 97, - /* 1310 */ 375, 385, 377, 97, 71, 97, 97, 97, 442, 441, - /* 1320 */ 35, 458, 459, 433, 97, 460, 463, 464, 97, 97, - /* 1330 */ 97, 362, 97, 444, 48, 250, 408, 396, 407, 370, - /* 1340 */ 182, 406, 42, 382, 375, 410, 377, 20, 413, 414, - /* 1350 */ 415, 416, 417, 418, 382, 420, 385, 186, 380, 162, - /* 1360 */ 425, 20, 427, 339, 339, 382, 431, 432, 380, 380, - /* 1370 */ 339, 94, 339, 331, 347, 406, 339, 442, 339, 410, - /* 1380 */ 20, 333, 413, 414, 415, 416, 417, 418, 333, 420, - /* 1390 */ 20, 345, 12, 13, 425, 401, 427, 20, 377, 345, - /* 1400 */ 431, 432, 22, 20, 362, 340, 20, 345, 395, 340, - /* 1410 */ 52, 442, 370, 33, 342, 35, 342, 375, 345, 377, - /* 1420 */ 345, 345, 331, 362, 345, 339, 333, 375, 362, 362, - /* 1430 */ 362, 333, 362, 339, 375, 375, 199, 405, 58, 96, - /* 1440 */ 343, 403, 362, 362, 362, 362, 401, 189, 406, 362, - /* 1450 */ 362, 71, 410, 362, 343, 413, 414, 415, 416, 417, - /* 1460 */ 418, 370, 420, 400, 339, 258, 375, 425, 377, 427, - /* 1470 */ 257, 449, 377, 431, 432, 449, 375, 375, 175, 375, - /* 1480 */ 375, 385, 268, 266, 442, 385, 331, 452, 267, 390, - /* 1490 */ 449, 451, 448, 390, 447, 251, 446, 406, 118, 275, - /* 1500 */ 272, 410, 468, 247, 413, 414, 415, 416, 417, 418, - /* 1510 */ 270, 420, 370, 20, 461, 408, 425, 362, 427, 339, - /* 1520 */ 462, 412, 431, 432, 340, 370, 343, 20, 343, 388, - /* 1530 */ 375, 375, 377, 167, 390, 375, 375, 375, 375, 390, - /* 1540 */ 375, 387, 343, 343, 370, 96, 430, 358, 96, 339, - /* 1550 */ 352, 343, 36, 375, 331, 402, 334, 366, 333, 391, - /* 1560 */ 356, 406, 356, 397, 184, 410, 186, 356, 413, 414, - /* 1570 */ 415, 416, 417, 418, 344, 420, 329, 0, 0, 0, - /* 1580 */ 425, 42, 427, 391, 331, 362, 431, 432, 0, 35, - /* 1590 */ 210, 211, 204, 370, 35, 35, 35, 204, 375, 0, - /* 1600 */ 377, 204, 35, 223, 224, 225, 226, 227, 228, 229, - /* 1610 */ 35, 0, 204, 0, 331, 362, 35, 0, 22, 0, - /* 1620 */ 35, 191, 186, 370, 184, 0, 0, 0, 375, 406, - /* 1630 */ 377, 180, 179, 410, 0, 0, 413, 414, 415, 416, - /* 1640 */ 417, 418, 47, 420, 331, 362, 0, 0, 425, 0, - /* 1650 */ 427, 42, 0, 370, 431, 432, 0, 0, 375, 406, - /* 1660 */ 377, 0, 0, 410, 152, 35, 413, 414, 415, 416, - /* 1670 */ 417, 418, 0, 420, 0, 362, 0, 0, 331, 152, - /* 1680 */ 427, 0, 0, 370, 431, 432, 0, 0, 375, 406, - /* 1690 */ 377, 0, 0, 410, 0, 0, 413, 414, 415, 416, - /* 1700 */ 417, 418, 0, 420, 0, 331, 0, 0, 0, 362, - /* 1710 */ 427, 0, 0, 0, 431, 432, 0, 370, 0, 406, - /* 1720 */ 42, 0, 375, 410, 377, 0, 413, 414, 415, 416, - /* 1730 */ 417, 418, 0, 420, 0, 0, 362, 22, 0, 0, - /* 1740 */ 136, 0, 0, 0, 370, 35, 58, 0, 58, 375, - /* 1750 */ 0, 377, 47, 406, 331, 58, 0, 410, 0, 42, - /* 1760 */ 413, 414, 415, 416, 417, 418, 39, 420, 44, 14, - /* 1770 */ 47, 14, 0, 47, 0, 0, 40, 0, 465, 466, - /* 1780 */ 406, 175, 0, 39, 410, 362, 0, 413, 414, 415, - /* 1790 */ 416, 417, 418, 370, 420, 0, 65, 0, 375, 39, - /* 1800 */ 377, 427, 455, 0, 35, 39, 432, 48, 0, 48, - /* 1810 */ 39, 35, 0, 35, 0, 48, 331, 0, 35, 39, - /* 1820 */ 39, 48, 0, 0, 0, 105, 35, 22, 0, 406, - /* 1830 */ 0, 103, 44, 410, 35, 35, 413, 414, 415, 416, - /* 1840 */ 417, 418, 35, 420, 35, 35, 44, 362, 331, 22, - /* 1850 */ 35, 35, 0, 22, 22, 370, 50, 0, 22, 0, - /* 1860 */ 375, 35, 377, 0, 35, 0, 22, 20, 35, 35, - /* 1870 */ 35, 0, 35, 35, 165, 0, 22, 0, 0, 362, - /* 1880 */ 457, 97, 3, 96, 367, 96, 187, 370, 252, 167, - /* 1890 */ 44, 406, 375, 97, 377, 410, 231, 331, 413, 414, - /* 1900 */ 415, 416, 417, 418, 256, 420, 173, 96, 44, 96, - /* 1910 */ 165, 165, 172, 44, 331, 97, 97, 96, 44, 47, - /* 1920 */ 172, 96, 252, 406, 44, 3, 35, 410, 362, 47, - /* 1930 */ 413, 414, 415, 416, 417, 418, 370, 420, 96, 44, - /* 1940 */ 97, 375, 97, 377, 96, 362, 331, 97, 252, 35, - /* 1950 */ 367, 466, 35, 370, 35, 35, 35, 97, 375, 97, - /* 1960 */ 377, 0, 44, 47, 0, 246, 0, 0, 39, 96, - /* 1970 */ 47, 331, 406, 47, 0, 39, 410, 362, 47, 413, - /* 1980 */ 414, 415, 416, 417, 418, 370, 420, 97, 422, 406, - /* 1990 */ 375, 97, 377, 410, 106, 331, 413, 414, 415, 416, - /* 2000 */ 417, 418, 362, 420, 96, 96, 96, 367, 168, 96, - /* 2010 */ 370, 2, 44, 22, 210, 375, 231, 377, 47, 166, - /* 2020 */ 331, 406, 97, 96, 231, 410, 362, 233, 413, 414, - /* 2030 */ 415, 416, 417, 418, 370, 420, 96, 96, 96, 375, - /* 2040 */ 97, 377, 97, 97, 96, 96, 406, 47, 22, 96, - /* 2050 */ 410, 362, 35, 413, 414, 415, 416, 417, 418, 370, - /* 2060 */ 420, 212, 107, 35, 375, 96, 377, 97, 35, 96, - /* 2070 */ 406, 35, 97, 97, 410, 96, 35, 413, 414, 415, - /* 2080 */ 416, 417, 418, 331, 420, 97, 96, 35, 22, 97, - /* 2090 */ 96, 108, 44, 96, 96, 406, 35, 120, 120, 410, - /* 2100 */ 120, 120, 413, 414, 415, 416, 417, 418, 96, 420, - /* 2110 */ 331, 22, 65, 64, 362, 35, 35, 35, 35, 44, - /* 2120 */ 35, 35, 370, 35, 71, 35, 35, 375, 35, 377, - /* 2130 */ 93, 35, 331, 35, 35, 22, 35, 35, 35, 71, - /* 2140 */ 35, 362, 35, 35, 35, 35, 22, 35, 0, 370, - /* 2150 */ 35, 0, 48, 39, 375, 35, 377, 39, 406, 0, - /* 2160 */ 35, 39, 410, 362, 48, 413, 414, 415, 416, 417, - /* 2170 */ 418, 370, 420, 0, 48, 35, 375, 48, 377, 0, - /* 2180 */ 39, 35, 35, 0, 22, 406, 21, 20, 22, 410, - /* 2190 */ 22, 21, 413, 414, 415, 416, 417, 418, 469, 420, - /* 2200 */ 469, 469, 469, 469, 469, 469, 469, 406, 469, 469, - /* 2210 */ 469, 410, 331, 469, 413, 414, 415, 416, 417, 418, - /* 2220 */ 469, 420, 469, 469, 469, 469, 469, 469, 469, 331, - /* 2230 */ 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, - /* 2240 */ 469, 469, 469, 362, 469, 469, 331, 469, 469, 469, - /* 2250 */ 469, 370, 469, 469, 469, 469, 375, 469, 377, 469, - /* 2260 */ 362, 469, 469, 469, 469, 469, 469, 469, 370, 469, - /* 2270 */ 469, 469, 469, 375, 469, 377, 469, 362, 331, 469, - /* 2280 */ 469, 469, 469, 469, 469, 370, 469, 406, 469, 469, - /* 2290 */ 375, 410, 377, 469, 413, 414, 415, 416, 417, 418, - /* 2300 */ 469, 420, 469, 331, 406, 469, 469, 469, 410, 362, - /* 2310 */ 469, 413, 414, 415, 416, 417, 418, 370, 420, 469, - /* 2320 */ 469, 406, 375, 469, 377, 410, 469, 331, 413, 414, - /* 2330 */ 415, 416, 417, 418, 362, 420, 469, 469, 469, 469, - /* 2340 */ 469, 469, 370, 469, 469, 469, 469, 375, 469, 377, - /* 2350 */ 469, 469, 331, 406, 469, 469, 469, 410, 362, 469, - /* 2360 */ 413, 414, 415, 416, 417, 418, 370, 420, 469, 469, - /* 2370 */ 469, 375, 469, 377, 469, 469, 469, 469, 406, 469, - /* 2380 */ 469, 469, 410, 362, 469, 413, 414, 415, 416, 417, - /* 2390 */ 418, 370, 420, 469, 469, 469, 375, 469, 377, 469, - /* 2400 */ 469, 469, 406, 469, 469, 469, 410, 469, 469, 413, - /* 2410 */ 414, 415, 416, 417, 418, 331, 420, 469, 469, 469, - /* 2420 */ 469, 469, 469, 469, 469, 469, 469, 406, 469, 469, - /* 2430 */ 469, 410, 469, 469, 413, 414, 415, 416, 417, 418, - /* 2440 */ 469, 420, 331, 469, 469, 469, 362, 469, 469, 469, - /* 2450 */ 469, 469, 469, 469, 370, 469, 469, 469, 469, 375, - /* 2460 */ 469, 377, 469, 469, 331, 469, 469, 469, 469, 469, - /* 2470 */ 469, 469, 469, 362, 469, 469, 469, 469, 469, 469, - /* 2480 */ 469, 370, 469, 469, 469, 469, 375, 469, 377, 469, - /* 2490 */ 406, 469, 469, 469, 410, 362, 469, 413, 414, 415, - /* 2500 */ 416, 417, 418, 370, 420, 469, 469, 469, 375, 469, - /* 2510 */ 377, 469, 469, 469, 469, 469, 469, 406, 469, 469, - /* 2520 */ 469, 410, 469, 469, 413, 414, 415, 416, 417, 418, - /* 2530 */ 469, 420, 469, 469, 469, 469, 469, 469, 469, 406, - /* 2540 */ 469, 469, 469, 410, 331, 469, 413, 414, 415, 416, - /* 2550 */ 417, 418, 469, 420, 469, 469, 469, 469, 469, 469, - /* 2560 */ 469, 331, 469, 469, 469, 469, 469, 469, 469, 469, - /* 2570 */ 469, 469, 469, 469, 469, 362, 469, 469, 331, 469, - /* 2580 */ 469, 469, 469, 370, 469, 469, 469, 469, 375, 469, - /* 2590 */ 377, 469, 362, 469, 469, 469, 469, 469, 469, 469, - /* 2600 */ 370, 469, 469, 469, 469, 375, 469, 377, 469, 362, - /* 2610 */ 331, 469, 469, 469, 469, 469, 469, 370, 469, 406, - /* 2620 */ 469, 469, 375, 410, 377, 469, 413, 414, 415, 416, - /* 2630 */ 417, 418, 469, 420, 469, 331, 406, 469, 469, 469, - /* 2640 */ 410, 362, 469, 413, 414, 415, 416, 417, 418, 370, - /* 2650 */ 420, 469, 469, 406, 375, 469, 377, 410, 469, 331, - /* 2660 */ 413, 414, 415, 416, 417, 418, 362, 420, 469, 469, - /* 2670 */ 469, 469, 469, 469, 370, 469, 469, 469, 469, 375, - /* 2680 */ 469, 377, 469, 469, 469, 406, 469, 469, 469, 410, - /* 2690 */ 362, 469, 413, 414, 415, 416, 417, 418, 370, 420, - /* 2700 */ 469, 469, 469, 375, 469, 377, 469, 469, 469, 469, - /* 2710 */ 406, 469, 469, 469, 410, 469, 469, 413, 414, 415, - /* 2720 */ 416, 417, 418, 469, 420, 469, 469, 469, 469, 469, - /* 2730 */ 469, 469, 469, 469, 406, 469, 469, 469, 410, 469, - /* 2740 */ 469, 413, 414, 415, 416, 417, 418, 469, 420, + /* 230 */ 230, 231, 232, 386, 136, 137, 66, 67, 68, 69, + /* 240 */ 70, 331, 72, 73, 74, 75, 76, 77, 78, 79, + /* 250 */ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + /* 260 */ 90, 91, 92, 168, 166, 167, 20, 111, 8, 9, + /* 270 */ 172, 173, 12, 13, 14, 15, 16, 100, 168, 339, + /* 280 */ 20, 136, 137, 80, 186, 112, 188, 377, 131, 254, + /* 290 */ 255, 256, 135, 8, 9, 355, 20, 12, 13, 14, + /* 300 */ 15, 16, 362, 130, 131, 132, 133, 134, 135, 345, + /* 310 */ 212, 213, 372, 215, 216, 217, 218, 219, 220, 221, + /* 320 */ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + /* 330 */ 232, 233, 12, 13, 370, 336, 339, 366, 339, 340, + /* 340 */ 20, 97, 22, 396, 141, 142, 100, 400, 377, 64, + /* 350 */ 193, 194, 269, 33, 197, 35, 199, 113, 114, 115, + /* 360 */ 116, 117, 118, 119, 120, 121, 122, 164, 124, 125, + /* 370 */ 126, 127, 128, 129, 0, 58, 430, 431, 58, 0, + /* 380 */ 14, 331, 411, 412, 64, 388, 20, 390, 441, 44, + /* 390 */ 396, 71, 445, 422, 109, 21, 378, 379, 24, 25, + /* 400 */ 26, 27, 28, 29, 30, 31, 32, 460, 461, 345, + /* 410 */ 130, 131, 465, 466, 364, 135, 99, 97, 14, 102, + /* 420 */ 100, 20, 372, 22, 20, 361, 249, 377, 168, 379, + /* 430 */ 12, 13, 14, 100, 370, 441, 35, 14, 20, 445, + /* 440 */ 22, 8, 9, 20, 100, 12, 13, 14, 15, 16, + /* 450 */ 165, 33, 51, 35, 460, 461, 136, 137, 408, 465, + /* 460 */ 466, 343, 412, 58, 343, 415, 416, 417, 418, 419, + /* 470 */ 420, 0, 422, 331, 331, 425, 58, 427, 428, 429, + /* 480 */ 359, 350, 351, 433, 434, 367, 166, 167, 367, 71, + /* 490 */ 0, 112, 172, 173, 0, 24, 25, 26, 27, 28, + /* 500 */ 29, 30, 31, 32, 233, 100, 186, 102, 188, 130, + /* 510 */ 131, 132, 133, 134, 135, 97, 22, 20, 100, 377, + /* 520 */ 377, 236, 237, 238, 239, 240, 241, 242, 243, 244, + /* 530 */ 245, 246, 212, 213, 71, 215, 216, 217, 218, 219, + /* 540 */ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + /* 550 */ 230, 231, 232, 22, 136, 137, 66, 67, 68, 66, + /* 560 */ 67, 68, 20, 111, 74, 75, 35, 74, 75, 79, + /* 570 */ 166, 4, 79, 364, 84, 85, 366, 84, 85, 331, + /* 580 */ 90, 372, 249, 90, 166, 167, 339, 377, 71, 166, + /* 590 */ 172, 173, 21, 249, 8, 9, 4, 100, 12, 13, + /* 600 */ 14, 15, 16, 2, 186, 34, 188, 36, 20, 8, + /* 610 */ 9, 178, 364, 12, 13, 14, 15, 16, 273, 372, + /* 620 */ 372, 411, 412, 413, 365, 377, 417, 379, 97, 365, + /* 630 */ 212, 213, 422, 215, 216, 217, 218, 219, 220, 221, + /* 640 */ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + /* 650 */ 232, 12, 13, 100, 249, 364, 408, 339, 130, 20, + /* 660 */ 412, 22, 371, 415, 416, 417, 418, 419, 420, 212, + /* 670 */ 422, 380, 33, 355, 35, 427, 96, 429, 136, 137, + /* 680 */ 372, 433, 434, 436, 437, 438, 439, 101, 441, 442, + /* 690 */ 372, 383, 100, 339, 8, 9, 331, 58, 12, 13, + /* 700 */ 14, 15, 16, 455, 14, 15, 16, 274, 365, 355, + /* 710 */ 71, 339, 331, 365, 172, 173, 259, 260, 261, 262, + /* 720 */ 263, 264, 265, 195, 196, 414, 372, 8, 9, 364, + /* 730 */ 44, 12, 13, 14, 15, 16, 97, 372, 185, 100, + /* 740 */ 187, 441, 377, 441, 379, 445, 249, 445, 168, 12, + /* 750 */ 13, 440, 414, 339, 396, 35, 168, 20, 377, 22, + /* 760 */ 388, 461, 390, 461, 211, 465, 466, 465, 466, 355, + /* 770 */ 33, 356, 35, 408, 339, 136, 137, 412, 440, 364, + /* 780 */ 415, 416, 417, 418, 419, 420, 372, 422, 373, 339, + /* 790 */ 355, 71, 181, 339, 364, 58, 331, 339, 331, 441, + /* 800 */ 339, 371, 249, 445, 331, 166, 167, 372, 71, 355, + /* 810 */ 380, 172, 173, 355, 203, 204, 355, 250, 460, 461, + /* 820 */ 101, 456, 457, 465, 466, 186, 372, 188, 356, 0, + /* 830 */ 372, 364, 0, 372, 97, 22, 364, 100, 388, 372, + /* 840 */ 390, 249, 377, 339, 377, 373, 379, 20, 35, 22, + /* 850 */ 377, 212, 213, 165, 215, 216, 217, 218, 219, 220, + /* 860 */ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + /* 870 */ 231, 232, 20, 136, 137, 408, 372, 365, 51, 412, + /* 880 */ 331, 331, 415, 416, 417, 418, 419, 420, 18, 422, + /* 890 */ 364, 366, 63, 23, 427, 339, 429, 371, 350, 351, + /* 900 */ 433, 434, 377, 166, 167, 331, 380, 37, 38, 172, + /* 910 */ 173, 41, 425, 8, 9, 428, 39, 12, 13, 14, + /* 920 */ 15, 16, 414, 186, 236, 188, 377, 377, 372, 59, + /* 930 */ 60, 61, 62, 331, 246, 331, 411, 412, 413, 45, + /* 940 */ 46, 437, 438, 439, 331, 441, 442, 422, 440, 212, + /* 950 */ 213, 377, 215, 216, 217, 218, 219, 220, 221, 222, + /* 960 */ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, + /* 970 */ 100, 18, 339, 20, 331, 247, 248, 364, 331, 377, + /* 980 */ 27, 377, 365, 30, 339, 372, 33, 155, 355, 332, + /* 990 */ 377, 331, 379, 437, 438, 439, 164, 441, 442, 331, + /* 1000 */ 355, 48, 233, 50, 235, 372, 53, 364, 138, 353, + /* 1010 */ 339, 339, 369, 1, 2, 372, 0, 372, 166, 44, + /* 1020 */ 377, 408, 379, 339, 377, 412, 355, 355, 415, 416, + /* 1030 */ 417, 418, 419, 420, 426, 422, 428, 377, 339, 355, + /* 1040 */ 427, 331, 429, 372, 372, 377, 433, 434, 178, 179, + /* 1050 */ 180, 408, 99, 183, 355, 412, 372, 444, 415, 416, + /* 1060 */ 417, 418, 419, 420, 111, 422, 426, 331, 428, 22, + /* 1070 */ 20, 372, 202, 168, 331, 205, 101, 207, 208, 209, + /* 1080 */ 210, 211, 35, 372, 372, 331, 360, 377, 401, 331, + /* 1090 */ 352, 396, 354, 140, 383, 383, 143, 144, 145, 146, + /* 1100 */ 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + /* 1110 */ 157, 158, 159, 377, 161, 162, 163, 64, 71, 249, + /* 1120 */ 377, 387, 364, 364, 364, 248, 339, 35, 112, 339, + /* 1130 */ 372, 377, 406, 373, 0, 377, 441, 379, 331, 380, + /* 1140 */ 445, 37, 355, 112, 97, 355, 130, 131, 132, 133, + /* 1150 */ 134, 135, 111, 35, 374, 460, 461, 377, 469, 372, + /* 1160 */ 465, 466, 372, 458, 133, 339, 408, 339, 44, 374, + /* 1170 */ 412, 364, 377, 415, 416, 417, 418, 419, 420, 372, + /* 1180 */ 422, 355, 48, 355, 377, 427, 379, 429, 0, 71, + /* 1190 */ 374, 433, 434, 377, 341, 339, 357, 331, 372, 360, + /* 1200 */ 372, 160, 444, 42, 42, 44, 44, 103, 35, 105, + /* 1210 */ 106, 355, 108, 58, 104, 408, 112, 107, 168, 412, + /* 1220 */ 331, 100, 415, 416, 417, 418, 419, 420, 372, 422, + /* 1230 */ 364, 110, 44, 186, 427, 188, 429, 133, 372, 104, + /* 1240 */ 433, 434, 107, 377, 104, 379, 104, 107, 0, 107, + /* 1250 */ 0, 444, 198, 364, 200, 44, 44, 102, 452, 212, + /* 1260 */ 213, 372, 44, 44, 44, 212, 377, 13, 379, 44, + /* 1270 */ 22, 44, 22, 44, 408, 136, 137, 44, 412, 44, + /* 1280 */ 188, 415, 416, 417, 418, 419, 420, 47, 422, 35, + /* 1290 */ 44, 364, 341, 427, 387, 429, 338, 408, 331, 433, + /* 1300 */ 434, 412, 44, 13, 415, 416, 417, 418, 419, 420, + /* 1310 */ 444, 422, 101, 101, 12, 13, 427, 44, 429, 101, + /* 1320 */ 101, 101, 433, 434, 22, 35, 101, 0, 101, 387, + /* 1330 */ 101, 364, 376, 444, 101, 33, 101, 35, 443, 372, + /* 1340 */ 100, 462, 446, 33, 377, 44, 379, 101, 8, 9, + /* 1350 */ 44, 44, 12, 13, 14, 15, 16, 331, 48, 101, + /* 1360 */ 58, 188, 44, 44, 54, 55, 56, 57, 58, 435, + /* 1370 */ 251, 410, 48, 71, 101, 408, 49, 409, 44, 412, + /* 1380 */ 331, 184, 415, 416, 417, 418, 419, 420, 398, 422, + /* 1390 */ 364, 42, 384, 20, 427, 271, 429, 387, 372, 97, + /* 1400 */ 433, 434, 101, 377, 384, 379, 165, 101, 101, 99, + /* 1410 */ 382, 20, 102, 364, 339, 339, 384, 382, 382, 101, + /* 1420 */ 101, 372, 349, 98, 95, 348, 377, 339, 379, 94, + /* 1430 */ 347, 20, 339, 339, 408, 101, 339, 20, 412, 333, + /* 1440 */ 333, 415, 416, 417, 418, 419, 420, 403, 422, 20, + /* 1450 */ 345, 379, 20, 427, 345, 429, 340, 408, 20, 433, + /* 1460 */ 434, 412, 331, 397, 415, 416, 417, 418, 419, 420, + /* 1470 */ 345, 422, 340, 345, 345, 345, 339, 52, 429, 169, + /* 1480 */ 170, 345, 433, 434, 174, 342, 176, 342, 186, 333, + /* 1490 */ 188, 364, 377, 201, 377, 364, 333, 364, 407, 339, + /* 1500 */ 377, 100, 192, 372, 405, 364, 403, 343, 377, 343, + /* 1510 */ 379, 331, 364, 364, 212, 213, 364, 364, 364, 191, + /* 1520 */ 339, 364, 364, 364, 402, 379, 258, 225, 226, 227, + /* 1530 */ 228, 229, 230, 231, 331, 451, 257, 387, 387, 408, + /* 1540 */ 451, 454, 377, 412, 364, 377, 415, 416, 417, 418, + /* 1550 */ 419, 420, 372, 422, 377, 377, 177, 377, 450, 379, + /* 1560 */ 429, 392, 392, 266, 433, 434, 453, 364, 268, 252, + /* 1570 */ 267, 451, 470, 372, 448, 372, 464, 410, 270, 275, + /* 1580 */ 377, 272, 379, 20, 248, 414, 339, 449, 408, 340, + /* 1590 */ 20, 392, 412, 377, 343, 415, 416, 417, 418, 419, + /* 1600 */ 420, 377, 422, 343, 390, 377, 331, 463, 377, 429, + /* 1610 */ 170, 408, 389, 433, 434, 412, 377, 343, 415, 416, + /* 1620 */ 417, 418, 419, 420, 421, 422, 423, 424, 392, 331, + /* 1630 */ 377, 360, 343, 372, 100, 100, 432, 368, 354, 364, + /* 1640 */ 377, 36, 343, 19, 339, 334, 333, 372, 404, 393, + /* 1650 */ 393, 399, 377, 358, 379, 329, 344, 33, 0, 0, + /* 1660 */ 0, 42, 364, 331, 0, 35, 206, 35, 35, 35, + /* 1670 */ 372, 206, 48, 358, 358, 377, 35, 379, 54, 55, + /* 1680 */ 56, 57, 58, 408, 0, 35, 206, 412, 0, 331, + /* 1690 */ 415, 416, 417, 418, 419, 420, 364, 422, 206, 0, + /* 1700 */ 35, 0, 22, 0, 372, 35, 408, 193, 188, 377, + /* 1710 */ 412, 379, 186, 415, 416, 417, 418, 419, 420, 0, + /* 1720 */ 422, 0, 364, 99, 0, 182, 102, 429, 181, 0, + /* 1730 */ 372, 0, 434, 47, 0, 377, 0, 379, 0, 42, + /* 1740 */ 408, 0, 467, 468, 412, 0, 0, 415, 416, 417, + /* 1750 */ 418, 419, 420, 331, 422, 0, 0, 0, 134, 155, + /* 1760 */ 35, 0, 155, 0, 0, 0, 408, 0, 0, 0, + /* 1770 */ 412, 0, 0, 415, 416, 417, 418, 419, 420, 0, + /* 1780 */ 422, 0, 0, 0, 0, 331, 364, 0, 0, 457, + /* 1790 */ 0, 0, 0, 169, 372, 42, 0, 0, 174, 377, + /* 1800 */ 0, 379, 0, 0, 0, 0, 0, 22, 0, 0, + /* 1810 */ 331, 139, 0, 96, 190, 22, 192, 459, 364, 96, + /* 1820 */ 22, 0, 0, 0, 58, 0, 372, 0, 58, 35, + /* 1830 */ 408, 377, 58, 379, 412, 0, 47, 415, 416, 417, + /* 1840 */ 418, 419, 420, 364, 422, 44, 47, 14, 369, 42, + /* 1850 */ 39, 372, 14, 40, 39, 0, 377, 47, 379, 331, + /* 1860 */ 0, 0, 408, 39, 177, 0, 412, 0, 0, 415, + /* 1870 */ 416, 417, 418, 419, 420, 331, 422, 0, 424, 65, + /* 1880 */ 0, 35, 48, 39, 0, 35, 39, 408, 48, 0, + /* 1890 */ 468, 412, 364, 35, 415, 416, 417, 418, 419, 420, + /* 1900 */ 372, 422, 48, 39, 0, 377, 35, 379, 364, 39, + /* 1910 */ 48, 0, 0, 369, 35, 22, 372, 0, 0, 0, + /* 1920 */ 35, 377, 35, 379, 331, 109, 107, 35, 22, 35, + /* 1930 */ 44, 35, 44, 0, 35, 35, 408, 22, 0, 0, + /* 1940 */ 412, 331, 22, 415, 416, 417, 418, 419, 420, 22, + /* 1950 */ 422, 50, 408, 0, 0, 0, 412, 364, 331, 415, + /* 1960 */ 416, 417, 418, 419, 420, 372, 422, 35, 22, 35, + /* 1970 */ 377, 35, 379, 101, 364, 35, 20, 35, 35, 0, + /* 1980 */ 35, 100, 372, 100, 0, 168, 22, 377, 168, 379, + /* 1990 */ 0, 364, 0, 175, 3, 44, 170, 168, 101, 372, + /* 2000 */ 253, 408, 100, 100, 377, 412, 379, 331, 415, 416, + /* 2010 */ 417, 418, 419, 420, 98, 422, 95, 189, 408, 96, + /* 2020 */ 96, 44, 412, 331, 44, 415, 416, 417, 418, 419, + /* 2030 */ 420, 101, 422, 44, 47, 408, 101, 100, 44, 412, + /* 2040 */ 364, 331, 415, 416, 417, 418, 419, 420, 372, 422, + /* 2050 */ 100, 47, 100, 377, 3, 379, 364, 44, 101, 100, + /* 2060 */ 35, 101, 101, 35, 372, 35, 35, 35, 35, 377, + /* 2070 */ 101, 379, 101, 47, 364, 0, 47, 0, 247, 44, + /* 2080 */ 0, 0, 372, 253, 408, 100, 39, 377, 412, 379, + /* 2090 */ 331, 415, 416, 417, 418, 419, 420, 47, 422, 100, + /* 2100 */ 408, 253, 101, 101, 412, 100, 331, 415, 416, 417, + /* 2110 */ 418, 419, 420, 0, 422, 100, 100, 39, 408, 171, + /* 2120 */ 100, 110, 412, 364, 234, 415, 416, 417, 418, 419, + /* 2130 */ 420, 372, 422, 47, 169, 44, 377, 98, 379, 364, + /* 2140 */ 98, 2, 22, 212, 100, 47, 101, 372, 100, 47, + /* 2150 */ 101, 22, 377, 100, 379, 101, 100, 100, 214, 101, + /* 2160 */ 100, 35, 101, 331, 100, 35, 111, 408, 101, 35, + /* 2170 */ 100, 412, 101, 35, 415, 416, 417, 418, 419, 420, + /* 2180 */ 331, 422, 100, 408, 35, 101, 101, 412, 100, 35, + /* 2190 */ 415, 416, 417, 418, 419, 420, 364, 422, 22, 100, + /* 2200 */ 100, 44, 123, 100, 372, 112, 35, 100, 22, 377, + /* 2210 */ 123, 379, 123, 364, 64, 123, 65, 35, 35, 35, + /* 2220 */ 35, 372, 35, 35, 35, 35, 377, 35, 379, 331, + /* 2230 */ 35, 71, 22, 93, 35, 44, 35, 35, 35, 35, + /* 2240 */ 408, 35, 35, 71, 412, 331, 35, 415, 416, 417, + /* 2250 */ 418, 419, 420, 35, 422, 35, 35, 408, 22, 35, + /* 2260 */ 0, 412, 364, 35, 415, 416, 417, 418, 419, 420, + /* 2270 */ 372, 422, 39, 48, 0, 377, 35, 379, 364, 48, + /* 2280 */ 0, 39, 35, 48, 39, 0, 372, 35, 48, 39, + /* 2290 */ 0, 377, 35, 379, 331, 0, 35, 22, 21, 471, + /* 2300 */ 22, 22, 21, 20, 471, 471, 408, 471, 471, 471, + /* 2310 */ 412, 471, 471, 415, 416, 417, 418, 419, 420, 331, + /* 2320 */ 422, 471, 408, 471, 471, 471, 412, 364, 471, 415, + /* 2330 */ 416, 417, 418, 419, 420, 372, 422, 471, 471, 471, + /* 2340 */ 377, 471, 379, 331, 471, 471, 471, 471, 471, 471, + /* 2350 */ 471, 471, 364, 471, 471, 471, 471, 471, 471, 471, + /* 2360 */ 372, 471, 471, 471, 471, 377, 471, 379, 471, 471, + /* 2370 */ 471, 408, 471, 471, 471, 412, 364, 471, 415, 416, + /* 2380 */ 417, 418, 419, 420, 372, 422, 471, 471, 471, 377, + /* 2390 */ 471, 379, 471, 471, 471, 471, 408, 471, 471, 471, + /* 2400 */ 412, 471, 471, 415, 416, 417, 418, 419, 420, 471, + /* 2410 */ 422, 471, 471, 471, 331, 471, 471, 471, 471, 471, + /* 2420 */ 408, 471, 471, 471, 412, 471, 471, 415, 416, 417, + /* 2430 */ 418, 419, 420, 471, 422, 471, 331, 471, 471, 471, + /* 2440 */ 471, 471, 471, 471, 471, 471, 471, 364, 471, 471, + /* 2450 */ 471, 471, 471, 471, 471, 372, 471, 471, 471, 471, + /* 2460 */ 377, 471, 379, 331, 471, 471, 471, 471, 471, 364, + /* 2470 */ 471, 471, 471, 471, 471, 471, 471, 372, 471, 471, + /* 2480 */ 471, 471, 377, 471, 379, 471, 471, 471, 471, 471, + /* 2490 */ 471, 408, 471, 471, 471, 412, 364, 471, 415, 416, + /* 2500 */ 417, 418, 419, 420, 372, 422, 471, 471, 471, 377, + /* 2510 */ 471, 379, 331, 408, 471, 471, 471, 412, 471, 471, + /* 2520 */ 415, 416, 417, 418, 419, 420, 471, 422, 331, 471, + /* 2530 */ 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, + /* 2540 */ 408, 471, 471, 471, 412, 364, 471, 415, 416, 417, + /* 2550 */ 418, 419, 420, 372, 422, 471, 471, 471, 377, 471, + /* 2560 */ 379, 364, 471, 471, 471, 471, 471, 471, 471, 372, + /* 2570 */ 471, 471, 471, 471, 377, 471, 379, 331, 471, 471, + /* 2580 */ 471, 471, 471, 471, 471, 471, 471, 471, 471, 408, + /* 2590 */ 471, 471, 471, 412, 471, 471, 415, 416, 417, 418, + /* 2600 */ 419, 420, 471, 422, 471, 408, 471, 471, 471, 412, + /* 2610 */ 364, 471, 415, 416, 417, 418, 419, 420, 372, 422, + /* 2620 */ 471, 471, 471, 377, 471, 379, 471, 471, 471, 471, + /* 2630 */ 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, + /* 2640 */ 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, + /* 2650 */ 471, 471, 471, 471, 408, 471, 471, 471, 412, 471, + /* 2660 */ 471, 415, 416, 417, 418, 419, 420, 471, 422, }; -#define YY_SHIFT_COUNT (742) +#define YY_SHIFT_COUNT (750) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2183) +#define YY_SHIFT_MAX (2295) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 874, 0, 72, 0, 293, 293, 293, 293, 293, 293, - /* 10 */ 293, 293, 293, 293, 293, 365, 584, 584, 656, 584, - /* 20 */ 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, - /* 30 */ 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, - /* 40 */ 584, 584, 584, 584, 584, 584, 584, 584, 172, 292, - /* 50 */ 185, 184, 135, 535, 568, 535, 184, 184, 1380, 1380, - /* 60 */ 1380, 535, 1380, 1380, 388, 535, 16, 482, 115, 115, - /* 70 */ 482, 86, 86, 307, 360, 346, 346, 115, 115, 115, - /* 80 */ 115, 115, 115, 115, 147, 115, 115, 138, 16, 115, - /* 90 */ 115, 189, 115, 16, 115, 147, 115, 147, 16, 115, - /* 100 */ 115, 16, 115, 16, 16, 16, 115, 176, 803, 34, - /* 110 */ 34, 219, 458, 982, 982, 982, 982, 982, 982, 982, - /* 120 */ 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, - /* 130 */ 982, 982, 217, 379, 307, 360, 249, 578, 578, 578, - /* 140 */ 2, 152, 152, 249, 245, 245, 245, 138, 260, 208, - /* 150 */ 16, 470, 16, 470, 470, 459, 606, 36, 36, 36, - /* 160 */ 36, 36, 36, 36, 36, 298, 418, 406, 47, 329, - /* 170 */ 444, 60, 69, 239, 652, 353, 776, 1030, 834, 996, - /* 180 */ 866, 981, 668, 866, 888, 769, 1019, 1085, 1286, 1158, - /* 190 */ 1300, 1327, 1300, 1197, 1341, 1341, 1300, 1197, 1197, 1341, - /* 200 */ 1277, 1341, 1341, 1341, 1360, 1360, 1370, 138, 1377, 138, - /* 210 */ 1383, 1386, 138, 1383, 138, 138, 138, 1341, 138, 1358, - /* 220 */ 1358, 1360, 16, 16, 16, 16, 16, 16, 16, 16, - /* 230 */ 16, 16, 16, 1341, 1360, 470, 470, 470, 1237, 1343, - /* 240 */ 1370, 176, 1258, 1377, 176, 1341, 1327, 1327, 470, 1207, - /* 250 */ 1213, 470, 1207, 1213, 470, 470, 16, 1217, 1303, 1207, - /* 260 */ 1214, 1221, 1244, 1085, 1224, 1228, 1240, 1256, 245, 1493, - /* 270 */ 1341, 1383, 176, 176, 1507, 1213, 470, 470, 470, 470, - /* 280 */ 470, 1213, 470, 1366, 176, 459, 176, 245, 1449, 1452, - /* 290 */ 470, 606, 1341, 176, 1516, 1360, 2749, 2749, 2749, 2749, - /* 300 */ 2749, 2749, 2749, 2749, 2749, 899, 589, 530, 677, 685, - /* 310 */ 707, 911, 731, 15, 724, 893, 903, 987, 987, 987, - /* 320 */ 987, 987, 987, 987, 987, 987, 716, 596, 295, 295, - /* 330 */ 407, 161, 489, 397, 81, 370, 263, 263, 557, 757, - /* 340 */ 582, 557, 557, 557, 1012, 791, 1092, 1089, 1057, 1139, - /* 350 */ 1071, 1077, 1078, 1084, 1169, 1176, 1196, 990, 1004, 1106, - /* 360 */ 1127, 1173, 1175, 1177, 1090, 1028, 66, 984, 1186, 1187, - /* 370 */ 1188, 1190, 1212, 1216, 1234, 1218, 1043, 1171, 1051, 1219, - /* 380 */ 431, 1220, 1227, 1231, 1232, 1233, 1235, 1143, 1260, 1285, - /* 390 */ 1243, 1167, 1577, 1578, 1579, 1539, 1588, 1554, 1388, 1559, - /* 400 */ 1560, 1561, 1393, 1599, 1567, 1575, 1397, 1611, 1408, 1613, - /* 410 */ 1581, 1617, 1596, 1619, 1585, 1430, 1436, 1440, 1625, 1626, - /* 420 */ 1627, 1451, 1453, 1634, 1635, 1595, 1646, 1647, 1649, 1609, - /* 430 */ 1652, 1656, 1657, 1661, 1662, 1672, 1674, 1676, 1512, 1630, - /* 440 */ 1677, 1527, 1681, 1682, 1686, 1687, 1691, 1692, 1694, 1695, - /* 450 */ 1702, 1704, 1706, 1707, 1708, 1711, 1712, 1713, 1678, 1716, - /* 460 */ 1718, 1721, 1725, 1732, 1734, 1715, 1735, 1738, 1739, 1604, - /* 470 */ 1741, 1742, 1743, 1688, 1710, 1747, 1690, 1750, 1697, 1756, - /* 480 */ 1758, 1717, 1727, 1724, 1705, 1755, 1723, 1757, 1726, 1772, - /* 490 */ 1736, 1744, 1774, 1775, 1777, 1760, 1606, 1782, 1786, 1795, - /* 500 */ 1731, 1797, 1803, 1769, 1759, 1766, 1808, 1776, 1761, 1771, - /* 510 */ 1812, 1778, 1767, 1780, 1814, 1783, 1773, 1781, 1817, 1822, - /* 520 */ 1823, 1824, 1720, 1728, 1791, 1805, 1828, 1799, 1800, 1807, - /* 530 */ 1809, 1788, 1802, 1810, 1815, 1827, 1816, 1830, 1831, 1852, - /* 540 */ 1832, 1806, 1857, 1836, 1826, 1859, 1829, 1863, 1833, 1865, - /* 550 */ 1844, 1847, 1834, 1835, 1837, 1784, 1787, 1871, 1709, 1789, - /* 560 */ 1838, 1875, 1699, 1854, 1745, 1722, 1877, 1878, 1746, 1733, - /* 570 */ 1879, 1846, 1636, 1811, 1796, 1813, 1740, 1665, 1748, 1648, - /* 580 */ 1818, 1864, 1869, 1819, 1821, 1825, 1842, 1843, 1874, 1872, - /* 590 */ 1882, 1848, 1880, 1670, 1845, 1850, 1922, 1895, 1696, 1891, - /* 600 */ 1914, 1917, 1919, 1920, 1921, 1860, 1862, 1916, 1719, 1918, - /* 610 */ 1923, 1961, 1964, 1966, 1967, 1873, 1929, 1705, 1926, 1908, - /* 620 */ 1890, 1894, 1909, 1910, 1840, 1913, 1974, 1936, 1853, 1927, - /* 630 */ 1888, 1705, 1931, 1968, 1785, 1794, 1793, 2009, 1991, 1804, - /* 640 */ 1940, 1925, 1941, 1943, 1942, 1945, 1971, 1948, 1949, 2000, - /* 650 */ 1946, 2026, 1849, 1953, 1955, 1970, 2017, 2028, 1969, 1975, - /* 660 */ 2033, 1973, 1976, 2036, 1979, 1988, 2041, 1990, 1992, 2052, - /* 670 */ 1994, 1977, 1978, 1980, 1981, 2066, 1983, 1997, 2048, 1998, - /* 680 */ 2061, 2012, 2048, 2048, 2089, 2047, 2049, 2080, 2081, 2082, - /* 690 */ 2083, 2085, 2086, 2088, 2090, 2091, 2093, 2053, 2037, 2075, - /* 700 */ 2096, 2098, 2099, 2113, 2101, 2102, 2103, 2068, 1788, 2105, - /* 710 */ 1802, 2107, 2108, 2109, 2110, 2124, 2112, 2148, 2115, 2104, - /* 720 */ 2114, 2151, 2120, 2116, 2118, 2159, 2125, 2126, 2122, 2173, - /* 730 */ 2140, 2129, 2141, 2179, 2146, 2147, 2183, 2162, 2165, 2166, - /* 740 */ 2168, 2170, 2167, + /* 0 */ 870, 0, 98, 0, 320, 320, 320, 320, 320, 320, + /* 10 */ 320, 320, 320, 320, 320, 418, 639, 639, 737, 639, + /* 20 */ 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, + /* 30 */ 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, + /* 40 */ 639, 639, 639, 639, 639, 639, 639, 639, 177, 497, + /* 50 */ 553, 246, 405, 333, 344, 333, 246, 246, 1302, 1302, + /* 60 */ 1302, 333, 1302, 1302, 592, 333, 39, 542, 73, 73, + /* 70 */ 542, 7, 7, 34, 145, 366, 366, 73, 73, 73, + /* 80 */ 73, 73, 73, 73, 93, 73, 73, 65, 39, 73, + /* 90 */ 73, 164, 73, 39, 73, 93, 73, 93, 39, 73, + /* 100 */ 73, 39, 73, 39, 39, 39, 73, 136, 953, 285, + /* 110 */ 285, 150, 493, 1047, 1047, 1047, 1047, 1047, 1047, 1047, + /* 120 */ 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, + /* 130 */ 1047, 1047, 1104, 95, 34, 145, 720, 110, 110, 110, + /* 140 */ 829, 769, 769, 720, 276, 276, 276, 65, 156, 271, + /* 150 */ 39, 463, 39, 463, 463, 452, 517, 244, 244, 244, + /* 160 */ 244, 244, 244, 244, 244, 1624, 374, 490, 260, 433, + /* 170 */ 457, 401, 35, 404, 423, 827, 588, 894, 1031, 1050, + /* 180 */ 728, 877, 83, 728, 1161, 567, 852, 1119, 1324, 1197, + /* 190 */ 1349, 1373, 1349, 1241, 1391, 1391, 1349, 1241, 1241, 1325, + /* 200 */ 1329, 1391, 1335, 1391, 1391, 1391, 1411, 1411, 1417, 65, + /* 210 */ 1429, 65, 1432, 1438, 65, 1432, 65, 65, 65, 1391, + /* 220 */ 65, 1425, 1425, 1411, 39, 39, 39, 39, 39, 39, + /* 230 */ 39, 39, 39, 39, 39, 1391, 1411, 463, 463, 463, + /* 240 */ 1292, 1401, 1417, 136, 1328, 1429, 136, 1391, 1373, 1373, + /* 250 */ 463, 1268, 1279, 463, 1268, 1279, 463, 463, 39, 1297, + /* 260 */ 1379, 1268, 1300, 1303, 1317, 1119, 1304, 1309, 1308, 1336, + /* 270 */ 276, 1563, 1391, 1432, 136, 136, 1570, 1279, 463, 463, + /* 280 */ 463, 463, 463, 1279, 463, 1440, 136, 452, 136, 276, + /* 290 */ 1534, 1535, 463, 517, 1391, 136, 1605, 1411, 2669, 2669, + /* 300 */ 2669, 2669, 2669, 2669, 2669, 2669, 2669, 170, 1310, 471, + /* 310 */ 15, 586, 686, 719, 379, 139, 601, 905, 1016, 1340, + /* 320 */ 1340, 1340, 1340, 1340, 1340, 1340, 1340, 1340, 173, 157, + /* 330 */ 178, 178, 203, 611, 832, 317, 6, 531, 571, 528, + /* 340 */ 280, 280, 690, 45, 688, 690, 690, 690, 1134, 975, + /* 350 */ 813, 1162, 1041, 1188, 1110, 1135, 1140, 1142, 494, 1248, + /* 360 */ 1250, 1054, 1211, 1212, 1155, 1218, 1219, 1220, 1139, 1124, + /* 370 */ 345, 580, 1225, 1227, 1229, 1233, 1235, 1246, 1012, 1258, + /* 380 */ 1092, 1173, 1053, 1273, 1240, 1301, 1306, 1307, 1318, 1319, + /* 390 */ 1334, 1121, 1254, 1290, 1118, 1327, 1658, 1659, 1660, 1619, + /* 400 */ 1664, 1630, 1460, 1632, 1633, 1634, 1465, 1684, 1641, 1650, + /* 410 */ 1480, 1688, 1492, 1699, 1665, 1701, 1680, 1703, 1670, 1514, + /* 420 */ 1520, 1526, 1719, 1721, 1724, 1543, 1547, 1729, 1731, 1686, + /* 430 */ 1734, 1736, 1738, 1697, 1741, 1745, 1746, 1755, 1756, 1757, + /* 440 */ 1767, 1768, 1604, 1725, 1761, 1607, 1763, 1764, 1765, 1769, + /* 450 */ 1771, 1772, 1779, 1781, 1782, 1783, 1784, 1787, 1788, 1790, + /* 460 */ 1791, 1792, 1753, 1796, 1797, 1800, 1802, 1803, 1804, 1785, + /* 470 */ 1805, 1806, 1808, 1672, 1809, 1812, 1793, 1717, 1798, 1723, + /* 480 */ 1821, 1766, 1794, 1822, 1770, 1823, 1774, 1825, 1827, 1807, + /* 490 */ 1811, 1801, 1789, 1833, 1799, 1838, 1810, 1835, 1813, 1815, + /* 500 */ 1855, 1860, 1861, 1824, 1687, 1865, 1867, 1868, 1814, 1877, + /* 510 */ 1880, 1846, 1834, 1844, 1884, 1850, 1840, 1847, 1889, 1858, + /* 520 */ 1854, 1864, 1904, 1871, 1862, 1870, 1911, 1912, 1917, 1918, + /* 530 */ 1816, 1819, 1879, 1893, 1919, 1885, 1887, 1892, 1894, 1886, + /* 540 */ 1888, 1896, 1899, 1906, 1900, 1933, 1915, 1938, 1920, 1901, + /* 550 */ 1939, 1927, 1932, 1953, 1934, 1954, 1936, 1955, 1946, 1956, + /* 560 */ 1940, 1942, 1943, 1872, 1881, 1979, 1817, 1883, 1945, 1984, + /* 570 */ 1828, 1964, 1820, 1826, 1990, 1992, 1829, 1818, 1991, 1951, + /* 580 */ 1747, 1902, 1897, 1903, 1923, 1916, 1924, 1921, 1930, 1977, + /* 590 */ 1980, 1935, 1937, 1950, 1952, 1957, 1989, 1987, 2004, 1959, + /* 600 */ 1994, 1830, 1960, 1961, 2051, 2013, 1848, 2025, 2028, 2030, + /* 610 */ 2031, 2032, 2033, 1969, 1971, 2026, 1831, 2035, 2029, 2075, + /* 620 */ 2077, 2080, 2081, 1985, 2047, 1789, 2050, 1999, 2001, 2002, + /* 630 */ 2005, 2015, 1948, 2016, 2113, 2078, 1965, 2020, 2011, 1789, + /* 640 */ 2086, 2091, 2039, 1890, 2042, 2139, 2120, 1931, 2044, 2045, + /* 650 */ 2048, 2049, 2053, 2054, 2098, 2056, 2057, 2102, 2058, 2129, + /* 660 */ 1944, 2060, 2055, 2061, 2126, 2130, 2064, 2067, 2134, 2070, + /* 670 */ 2071, 2138, 2082, 2084, 2149, 2088, 2085, 2154, 2099, 2079, + /* 680 */ 2087, 2089, 2092, 2176, 2093, 2100, 2157, 2103, 2171, 2107, + /* 690 */ 2157, 2157, 2186, 2151, 2150, 2182, 2183, 2184, 2185, 2187, + /* 700 */ 2188, 2189, 2190, 2192, 2195, 2160, 2140, 2191, 2199, 2201, + /* 710 */ 2202, 2210, 2203, 2204, 2206, 2172, 1886, 2207, 1888, 2211, + /* 720 */ 2218, 2220, 2221, 2236, 2224, 2260, 2228, 2225, 2233, 2274, + /* 730 */ 2241, 2231, 2242, 2280, 2247, 2235, 2245, 2285, 2252, 2240, + /* 740 */ 2250, 2290, 2257, 2261, 2295, 2275, 2277, 2278, 2279, 2281, + /* 750 */ 2283, }; -#define YY_REDUCE_COUNT (304) -#define YY_REDUCE_MIN (-438) -#define YY_REDUCE_MAX (2328) +#define YY_REDUCE_COUNT (306) +#define YY_REDUCE_MIN (-435) +#define YY_REDUCE_MAX (2246) static const short yy_reduce_ofst[] = { - /* 0 */ -256, 679, 728, 795, 827, 876, 935, 969, 1042, 1091, - /* 10 */ 1155, 1223, 243, 1253, 1283, -294, -1, 1313, 1374, 1347, - /* 20 */ 1423, 1485, 1517, 1566, 1583, 1640, 1615, 1664, 1689, 1752, - /* 30 */ 1779, 1801, 1881, 1898, 1915, 1947, 1972, 1996, 2021, 2084, - /* 40 */ 2111, 2133, 2213, 2230, 2247, 2279, 2304, 2328, -264, 169, - /* 50 */ 171, -173, -350, 604, 736, 863, -336, -5, -323, -61, - /* 60 */ 709, 303, 727, 753, -438, -386, -180, -212, 68, 98, - /* 70 */ -377, -331, -327, -344, -307, -199, -7, 71, 197, 200, - /* 80 */ 268, 270, 309, 411, -154, 551, 561, 13, -324, 653, - /* 90 */ 654, 414, 675, 97, 676, 213, 718, 238, 311, 666, - /* 100 */ 674, 472, 782, 415, 560, 754, 770, -105, -288, -93, - /* 110 */ -93, -75, -272, -187, 77, 308, 336, 354, 359, 382, - /* 120 */ 410, 447, 518, 521, 564, 585, 663, 690, 691, 694, - /* 130 */ 695, 711, -342, -41, -206, 124, 516, -41, 274, 333, - /* 140 */ 117, -23, 41, 483, 230, 487, 547, 257, 434, 269, - /* 150 */ 466, 50, 387, 519, 665, 706, 537, -354, 325, 417, - /* 160 */ 455, 492, 550, 555, 492, 598, 755, 756, 805, 783, - /* 170 */ 799, 924, 817, 906, 906, 939, 896, 950, 930, 926, - /* 180 */ 878, 878, 865, 878, 890, 889, 906, 928, 931, 941, - /* 190 */ 961, 971, 972, 978, 1024, 1025, 983, 988, 989, 1031, - /* 200 */ 1027, 1033, 1037, 1039, 1048, 1055, 994, 1046, 1021, 1054, - /* 210 */ 1065, 1013, 1062, 1069, 1073, 1075, 1076, 1086, 1079, 1072, - /* 220 */ 1074, 1093, 1061, 1066, 1067, 1068, 1070, 1080, 1081, 1082, - /* 230 */ 1083, 1087, 1088, 1094, 1098, 1052, 1059, 1060, 1032, 1038, - /* 240 */ 1045, 1097, 1063, 1095, 1111, 1125, 1096, 1100, 1101, 1022, - /* 250 */ 1099, 1102, 1026, 1103, 1104, 1105, 906, 1035, 1040, 1041, - /* 260 */ 1044, 1047, 1050, 1107, 1034, 1058, 1053, 878, 1142, 1109, - /* 270 */ 1180, 1184, 1183, 1185, 1141, 1144, 1156, 1160, 1161, 1162, - /* 280 */ 1163, 1149, 1165, 1154, 1199, 1189, 1200, 1174, 1116, 1191, - /* 290 */ 1178, 1198, 1210, 1208, 1222, 1225, 1166, 1153, 1168, 1192, - /* 300 */ 1204, 1206, 1211, 1230, 1247, + /* 0 */ -258, -328, 50, 248, 613, 758, 807, 866, 889, 467, + /* 10 */ 967, 1026, 1049, 1131, 1180, 1203, 365, 1275, 1298, 1332, + /* 20 */ 1358, 1422, 643, 1454, 1479, 1544, 1528, 1593, 1610, 1627, + /* 30 */ 1676, 1692, 1710, 1759, 1775, 1832, 1849, 1898, 1914, 1963, + /* 40 */ 1988, 2012, 2083, 2105, 2132, 2181, 2197, 2246, -316, -302, + /* 50 */ -53, 247, -256, -6, 358, 695, 504, 556, -337, 210, + /* 60 */ 525, -435, -345, -29, 300, 302, -356, -352, -260, -60, + /* 70 */ -334, -333, -203, -348, -271, -179, -1, 318, 354, 414, + /* 80 */ 454, 458, 461, 633, -3, 645, 671, 64, -299, 435, + /* 90 */ 684, 209, 699, 291, 672, 372, 787, 450, -355, 790, + /* 100 */ 826, 430, 828, 415, 526, 472, 856, 121, -257, -54, + /* 110 */ -54, -275, -237, -163, -90, 142, 143, 381, 465, 473, + /* 120 */ 549, 550, 574, 602, 604, 647, 660, 668, 710, 736, + /* 130 */ 743, 754, -280, 311, -153, 18, 548, 311, 338, 508, + /* 140 */ 118, 608, 640, 131, 308, 711, 712, -36, 726, 487, + /* 150 */ 760, 780, 759, 795, 816, 839, 738, -358, 259, 264, + /* 160 */ 343, 348, 512, 617, 348, 687, 657, 656, 734, 689, + /* 170 */ 705, 853, 806, 927, 927, 951, 907, 958, 956, 942, + /* 180 */ 895, 895, 879, 895, 934, 896, 927, 961, 968, 990, + /* 190 */ 1008, 1010, 1020, 1028, 1075, 1076, 1032, 1035, 1036, 1073, + /* 200 */ 1077, 1088, 1083, 1093, 1094, 1097, 1106, 1107, 1044, 1105, + /* 210 */ 1072, 1109, 1116, 1066, 1125, 1132, 1128, 1129, 1130, 1137, + /* 220 */ 1136, 1143, 1145, 1156, 1127, 1133, 1141, 1148, 1149, 1152, + /* 230 */ 1153, 1154, 1157, 1158, 1159, 1160, 1163, 1115, 1117, 1123, + /* 240 */ 1091, 1099, 1103, 1164, 1122, 1146, 1166, 1181, 1150, 1151, + /* 250 */ 1165, 1084, 1169, 1168, 1089, 1170, 1177, 1178, 927, 1087, + /* 260 */ 1113, 1120, 1108, 1138, 1126, 1167, 1102, 1112, 1144, 895, + /* 270 */ 1201, 1171, 1247, 1249, 1251, 1260, 1214, 1199, 1216, 1224, + /* 280 */ 1228, 1231, 1239, 1236, 1253, 1223, 1274, 1271, 1289, 1261, + /* 290 */ 1204, 1269, 1263, 1284, 1305, 1299, 1311, 1313, 1252, 1244, + /* 300 */ 1256, 1257, 1295, 1315, 1316, 1312, 1326, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 10 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 20 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 30 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 40 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 50 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 60 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 70 */ 1665, 1665, 1665, 1923, 1665, 1665, 1665, 1665, 1665, 1665, - /* 80 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1744, 1665, 1665, - /* 90 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 100 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1742, 1916, 2132, - /* 110 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 120 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 130 */ 1665, 1665, 1665, 2144, 1665, 1665, 1665, 2144, 2144, 2144, - /* 140 */ 1742, 2104, 2104, 1665, 1665, 1665, 1665, 1744, 1977, 1665, - /* 150 */ 1665, 1665, 1665, 1665, 1665, 1851, 1665, 1665, 1665, 1665, - /* 160 */ 1665, 1875, 1665, 1665, 1665, 1969, 1665, 1665, 2169, 2225, - /* 170 */ 1665, 1665, 2172, 1665, 1665, 1665, 1928, 1665, 1804, 2159, - /* 180 */ 2136, 2150, 2209, 2137, 2134, 2153, 1665, 2163, 1665, 1962, - /* 190 */ 1921, 1665, 1921, 1918, 1665, 1665, 1921, 1918, 1918, 1665, - /* 200 */ 1795, 1665, 1665, 1665, 1665, 1665, 1665, 1744, 1665, 1744, - /* 210 */ 1665, 1665, 1744, 1665, 1744, 1744, 1744, 1665, 1744, 1722, - /* 220 */ 1722, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 230 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1989, 1975, - /* 240 */ 1665, 1742, 1971, 1665, 1742, 1665, 1665, 1665, 1665, 2180, - /* 250 */ 2178, 1665, 2180, 2178, 1665, 1665, 1665, 2194, 2190, 2180, - /* 260 */ 2198, 2196, 2165, 2163, 2228, 2215, 2211, 2150, 1665, 1665, - /* 270 */ 1665, 1665, 1742, 1742, 1665, 2178, 1665, 1665, 1665, 1665, - /* 280 */ 1665, 2178, 1665, 1665, 1742, 1665, 1742, 1665, 1665, 1820, - /* 290 */ 1665, 1665, 1665, 1742, 1697, 1665, 1964, 1980, 1946, 1946, - /* 300 */ 1854, 1854, 1854, 1745, 1670, 1665, 1665, 1665, 1665, 1665, - /* 310 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 2193, 2192, 2059, - /* 320 */ 1665, 2108, 2107, 2106, 2097, 2058, 1816, 1665, 2057, 2056, - /* 330 */ 1665, 1665, 1665, 1665, 1665, 1665, 1937, 1936, 2050, 1665, - /* 340 */ 1665, 2051, 2049, 2048, 1665, 1665, 1665, 1665, 1665, 1665, - /* 350 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 360 */ 1665, 1665, 1665, 1665, 1665, 2212, 2216, 1665, 1665, 1665, - /* 370 */ 1665, 1665, 1665, 1665, 2133, 1665, 1665, 1665, 1665, 1665, - /* 380 */ 2032, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 390 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 400 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 410 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 420 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 430 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 440 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 450 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 460 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 470 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 480 */ 1665, 1665, 1665, 1702, 2037, 1665, 1665, 1665, 1665, 1665, - /* 490 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 500 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 510 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 520 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 530 */ 1665, 1783, 1782, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 540 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 550 */ 1665, 1665, 1665, 1665, 1665, 2041, 1665, 1665, 1665, 1665, - /* 560 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 570 */ 2208, 2166, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 580 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 590 */ 2032, 1665, 2191, 1665, 1665, 2206, 1665, 2210, 1665, 1665, - /* 600 */ 1665, 1665, 1665, 1665, 1665, 2143, 2139, 1665, 1665, 2135, - /* 610 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 2040, 1665, 1665, - /* 620 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 630 */ 1665, 2031, 1665, 2094, 1665, 1665, 1665, 2128, 1665, 1665, - /* 640 */ 2079, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 650 */ 2041, 1665, 2044, 1665, 1665, 1665, 1665, 1665, 1848, 1665, - /* 660 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 670 */ 1665, 1833, 1831, 1830, 1829, 1665, 1826, 1665, 1861, 1665, - /* 680 */ 1665, 1665, 1857, 1856, 1665, 1665, 1665, 1665, 1665, 1665, - /* 690 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1763, - /* 700 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1755, 1665, - /* 710 */ 1754, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 720 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 730 */ 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, - /* 740 */ 1665, 1665, 1665, + /* 0 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 10 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 20 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 30 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 40 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 50 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 60 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 70 */ 1687, 1687, 1687, 1953, 1687, 1687, 1687, 1687, 1687, 1687, + /* 80 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1766, 1687, 1687, + /* 90 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 100 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1764, 1946, 2162, + /* 110 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 120 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 130 */ 1687, 1687, 1687, 2174, 1687, 1687, 1687, 2174, 2174, 2174, + /* 140 */ 1764, 2134, 2134, 1687, 1687, 1687, 1687, 1766, 2007, 1687, + /* 150 */ 1687, 1687, 1687, 1687, 1687, 1881, 1687, 1687, 1687, 1687, + /* 160 */ 1687, 1905, 1687, 1687, 1687, 1999, 1687, 1687, 2199, 2255, + /* 170 */ 1687, 1687, 2202, 1687, 1687, 1687, 1958, 1687, 1834, 2189, + /* 180 */ 2166, 2180, 2239, 2167, 2164, 2183, 1687, 2193, 1687, 1992, + /* 190 */ 1951, 1687, 1951, 1948, 1687, 1687, 1951, 1948, 1948, 1823, + /* 200 */ 1819, 1687, 1817, 1687, 1687, 1687, 1687, 1687, 1687, 1766, + /* 210 */ 1687, 1766, 1687, 1687, 1766, 1687, 1766, 1766, 1766, 1687, + /* 220 */ 1766, 1744, 1744, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 230 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 240 */ 2019, 2005, 1687, 1764, 2001, 1687, 1764, 1687, 1687, 1687, + /* 250 */ 1687, 2210, 2208, 1687, 2210, 2208, 1687, 1687, 1687, 2224, + /* 260 */ 2220, 2210, 2228, 2226, 2195, 2193, 2258, 2245, 2241, 2180, + /* 270 */ 1687, 1687, 1687, 1687, 1764, 1764, 1687, 2208, 1687, 1687, + /* 280 */ 1687, 1687, 1687, 2208, 1687, 1687, 1764, 1687, 1764, 1687, + /* 290 */ 1687, 1850, 1687, 1687, 1687, 1764, 1719, 1687, 1994, 2010, + /* 300 */ 1976, 1976, 1884, 1884, 1884, 1767, 1692, 1687, 1687, 1687, + /* 310 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2223, + /* 320 */ 2222, 2089, 1687, 2138, 2137, 2136, 2127, 2088, 1846, 1687, + /* 330 */ 2087, 2086, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 340 */ 1967, 1966, 2080, 1687, 1687, 2081, 2079, 2078, 1687, 1687, + /* 350 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 360 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2242, + /* 370 */ 2246, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2163, 1687, + /* 380 */ 1687, 1687, 1687, 1687, 2062, 1687, 1687, 1687, 1687, 1687, + /* 390 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 400 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 410 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 420 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 430 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 440 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 450 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 460 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 470 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 480 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 490 */ 1687, 1724, 2067, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 500 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 510 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 520 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 530 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1805, + /* 540 */ 1804, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 550 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 560 */ 1687, 1687, 1687, 2071, 1687, 1687, 1687, 1687, 1687, 1687, + /* 570 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2238, 2196, + /* 580 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 590 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2062, 1687, + /* 600 */ 2221, 1687, 1687, 2236, 1687, 2240, 1687, 1687, 1687, 1687, + /* 610 */ 1687, 1687, 1687, 2173, 2169, 1687, 1687, 2165, 1687, 1687, + /* 620 */ 1687, 1687, 1687, 1687, 1687, 2070, 1687, 1687, 1687, 1687, + /* 630 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2061, + /* 640 */ 1687, 2124, 1687, 1687, 1687, 2158, 1687, 1687, 2109, 1687, + /* 650 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2071, 1687, + /* 660 */ 2074, 1687, 1687, 1687, 1687, 1687, 1878, 1687, 1687, 1687, + /* 670 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1863, + /* 680 */ 1861, 1860, 1859, 1687, 1856, 1687, 1891, 1687, 1687, 1687, + /* 690 */ 1887, 1886, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 700 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1785, 1687, 1687, + /* 710 */ 1687, 1687, 1687, 1687, 1687, 1687, 1777, 1687, 1776, 1687, + /* 720 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 730 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 740 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 750 */ 1687, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1077,6 +1063,10 @@ static const YYCODETYPE yyFallback[] = { 0, /* TABLE_SUFFIX => nothing */ 0, /* NK_COLON => nothing */ 0, /* MAX_SPEED => nothing */ + 0, /* START => nothing */ + 0, /* WITH => nothing */ + 0, /* TIMESTAMP => nothing */ + 276, /* END => ABORT */ 0, /* TABLE => nothing */ 0, /* NK_LP => nothing */ 0, /* NK_RP => nothing */ @@ -1100,7 +1090,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* FLOAT => nothing */ 0, /* DOUBLE => nothing */ 0, /* BINARY => nothing */ - 0, /* TIMESTAMP => nothing */ 0, /* NCHAR => nothing */ 0, /* UNSIGNED => nothing */ 0, /* JSON => nothing */ @@ -1154,7 +1143,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* COUNT => nothing */ 0, /* LAST_ROW => nothing */ 0, /* TOPIC => nothing */ - 0, /* WITH => nothing */ 0, /* META => nothing */ 0, /* CONSUMER => nothing */ 0, /* GROUP => nothing */ @@ -1213,7 +1201,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* SERVER_STATUS => nothing */ 0, /* CURRENT_USER => nothing */ 0, /* CASE => nothing */ - 276, /* END => ABORT */ 0, /* WHEN => nothing */ 0, /* THEN => nothing */ 0, /* ELSE => nothing */ @@ -1238,7 +1225,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* SESSION => nothing */ 0, /* STATE_WINDOW => nothing */ 0, /* EVENT_WINDOW => nothing */ - 0, /* START => nothing */ 0, /* SLIDING => nothing */ 0, /* FILL => nothing */ 0, /* VALUE => nothing */ @@ -1492,168 +1478,168 @@ static const char *const yyTokenName[] = { /* 92 */ "TABLE_SUFFIX", /* 93 */ "NK_COLON", /* 94 */ "MAX_SPEED", - /* 95 */ "TABLE", - /* 96 */ "NK_LP", - /* 97 */ "NK_RP", - /* 98 */ "STABLE", - /* 99 */ "ADD", - /* 100 */ "COLUMN", - /* 101 */ "MODIFY", - /* 102 */ "RENAME", - /* 103 */ "TAG", - /* 104 */ "SET", - /* 105 */ "NK_EQ", - /* 106 */ "USING", - /* 107 */ "TAGS", - /* 108 */ "COMMENT", - /* 109 */ "BOOL", - /* 110 */ "TINYINT", - /* 111 */ "SMALLINT", - /* 112 */ "INT", - /* 113 */ "INTEGER", - /* 114 */ "BIGINT", - /* 115 */ "FLOAT", - /* 116 */ "DOUBLE", - /* 117 */ "BINARY", - /* 118 */ "TIMESTAMP", - /* 119 */ "NCHAR", - /* 120 */ "UNSIGNED", - /* 121 */ "JSON", - /* 122 */ "VARCHAR", - /* 123 */ "MEDIUMBLOB", - /* 124 */ "BLOB", - /* 125 */ "VARBINARY", - /* 126 */ "DECIMAL", - /* 127 */ "MAX_DELAY", - /* 128 */ "WATERMARK", - /* 129 */ "ROLLUP", - /* 130 */ "TTL", - /* 131 */ "SMA", - /* 132 */ "DELETE_MARK", - /* 133 */ "FIRST", - /* 134 */ "LAST", - /* 135 */ "SHOW", - /* 136 */ "PRIVILEGES", - /* 137 */ "DATABASES", - /* 138 */ "TABLES", - /* 139 */ "STABLES", - /* 140 */ "MNODES", - /* 141 */ "QNODES", - /* 142 */ "FUNCTIONS", - /* 143 */ "INDEXES", - /* 144 */ "ACCOUNTS", - /* 145 */ "APPS", - /* 146 */ "CONNECTIONS", - /* 147 */ "LICENCES", - /* 148 */ "GRANTS", - /* 149 */ "QUERIES", - /* 150 */ "SCORES", - /* 151 */ "TOPICS", - /* 152 */ "VARIABLES", - /* 153 */ "CLUSTER", - /* 154 */ "BNODES", - /* 155 */ "SNODES", - /* 156 */ "TRANSACTIONS", - /* 157 */ "DISTRIBUTED", - /* 158 */ "CONSUMERS", - /* 159 */ "SUBSCRIPTIONS", - /* 160 */ "VNODES", - /* 161 */ "ALIVE", - /* 162 */ "LIKE", - /* 163 */ "TBNAME", - /* 164 */ "QTAGS", - /* 165 */ "AS", - /* 166 */ "INDEX", - /* 167 */ "FUNCTION", - /* 168 */ "INTERVAL", - /* 169 */ "COUNT", - /* 170 */ "LAST_ROW", - /* 171 */ "TOPIC", - /* 172 */ "WITH", - /* 173 */ "META", - /* 174 */ "CONSUMER", - /* 175 */ "GROUP", - /* 176 */ "DESC", - /* 177 */ "DESCRIBE", - /* 178 */ "RESET", - /* 179 */ "QUERY", - /* 180 */ "CACHE", - /* 181 */ "EXPLAIN", - /* 182 */ "ANALYZE", - /* 183 */ "VERBOSE", - /* 184 */ "NK_BOOL", - /* 185 */ "RATIO", - /* 186 */ "NK_FLOAT", - /* 187 */ "OUTPUTTYPE", - /* 188 */ "AGGREGATE", - /* 189 */ "BUFSIZE", - /* 190 */ "STREAM", - /* 191 */ "INTO", - /* 192 */ "TRIGGER", - /* 193 */ "AT_ONCE", - /* 194 */ "WINDOW_CLOSE", - /* 195 */ "IGNORE", - /* 196 */ "EXPIRED", - /* 197 */ "FILL_HISTORY", - /* 198 */ "UPDATE", - /* 199 */ "SUBTABLE", - /* 200 */ "KILL", - /* 201 */ "CONNECTION", - /* 202 */ "TRANSACTION", - /* 203 */ "BALANCE", - /* 204 */ "VGROUP", - /* 205 */ "MERGE", - /* 206 */ "REDISTRIBUTE", - /* 207 */ "SPLIT", - /* 208 */ "DELETE", - /* 209 */ "INSERT", - /* 210 */ "NULL", - /* 211 */ "NK_QUESTION", - /* 212 */ "NK_ARROW", - /* 213 */ "ROWTS", - /* 214 */ "QSTART", - /* 215 */ "QEND", - /* 216 */ "QDURATION", - /* 217 */ "WSTART", - /* 218 */ "WEND", - /* 219 */ "WDURATION", - /* 220 */ "IROWTS", - /* 221 */ "ISFILLED", - /* 222 */ "CAST", - /* 223 */ "NOW", - /* 224 */ "TODAY", - /* 225 */ "TIMEZONE", - /* 226 */ "CLIENT_VERSION", - /* 227 */ "SERVER_VERSION", - /* 228 */ "SERVER_STATUS", - /* 229 */ "CURRENT_USER", - /* 230 */ "CASE", - /* 231 */ "END", - /* 232 */ "WHEN", - /* 233 */ "THEN", - /* 234 */ "ELSE", - /* 235 */ "BETWEEN", - /* 236 */ "IS", - /* 237 */ "NK_LT", - /* 238 */ "NK_GT", - /* 239 */ "NK_LE", - /* 240 */ "NK_GE", - /* 241 */ "NK_NE", - /* 242 */ "MATCH", - /* 243 */ "NMATCH", - /* 244 */ "CONTAINS", - /* 245 */ "IN", - /* 246 */ "JOIN", - /* 247 */ "INNER", - /* 248 */ "SELECT", - /* 249 */ "DISTINCT", - /* 250 */ "WHERE", - /* 251 */ "PARTITION", - /* 252 */ "BY", - /* 253 */ "SESSION", - /* 254 */ "STATE_WINDOW", - /* 255 */ "EVENT_WINDOW", - /* 256 */ "START", + /* 95 */ "START", + /* 96 */ "WITH", + /* 97 */ "TIMESTAMP", + /* 98 */ "END", + /* 99 */ "TABLE", + /* 100 */ "NK_LP", + /* 101 */ "NK_RP", + /* 102 */ "STABLE", + /* 103 */ "ADD", + /* 104 */ "COLUMN", + /* 105 */ "MODIFY", + /* 106 */ "RENAME", + /* 107 */ "TAG", + /* 108 */ "SET", + /* 109 */ "NK_EQ", + /* 110 */ "USING", + /* 111 */ "TAGS", + /* 112 */ "COMMENT", + /* 113 */ "BOOL", + /* 114 */ "TINYINT", + /* 115 */ "SMALLINT", + /* 116 */ "INT", + /* 117 */ "INTEGER", + /* 118 */ "BIGINT", + /* 119 */ "FLOAT", + /* 120 */ "DOUBLE", + /* 121 */ "BINARY", + /* 122 */ "NCHAR", + /* 123 */ "UNSIGNED", + /* 124 */ "JSON", + /* 125 */ "VARCHAR", + /* 126 */ "MEDIUMBLOB", + /* 127 */ "BLOB", + /* 128 */ "VARBINARY", + /* 129 */ "DECIMAL", + /* 130 */ "MAX_DELAY", + /* 131 */ "WATERMARK", + /* 132 */ "ROLLUP", + /* 133 */ "TTL", + /* 134 */ "SMA", + /* 135 */ "DELETE_MARK", + /* 136 */ "FIRST", + /* 137 */ "LAST", + /* 138 */ "SHOW", + /* 139 */ "PRIVILEGES", + /* 140 */ "DATABASES", + /* 141 */ "TABLES", + /* 142 */ "STABLES", + /* 143 */ "MNODES", + /* 144 */ "QNODES", + /* 145 */ "FUNCTIONS", + /* 146 */ "INDEXES", + /* 147 */ "ACCOUNTS", + /* 148 */ "APPS", + /* 149 */ "CONNECTIONS", + /* 150 */ "LICENCES", + /* 151 */ "GRANTS", + /* 152 */ "QUERIES", + /* 153 */ "SCORES", + /* 154 */ "TOPICS", + /* 155 */ "VARIABLES", + /* 156 */ "CLUSTER", + /* 157 */ "BNODES", + /* 158 */ "SNODES", + /* 159 */ "TRANSACTIONS", + /* 160 */ "DISTRIBUTED", + /* 161 */ "CONSUMERS", + /* 162 */ "SUBSCRIPTIONS", + /* 163 */ "VNODES", + /* 164 */ "ALIVE", + /* 165 */ "LIKE", + /* 166 */ "TBNAME", + /* 167 */ "QTAGS", + /* 168 */ "AS", + /* 169 */ "INDEX", + /* 170 */ "FUNCTION", + /* 171 */ "INTERVAL", + /* 172 */ "COUNT", + /* 173 */ "LAST_ROW", + /* 174 */ "TOPIC", + /* 175 */ "META", + /* 176 */ "CONSUMER", + /* 177 */ "GROUP", + /* 178 */ "DESC", + /* 179 */ "DESCRIBE", + /* 180 */ "RESET", + /* 181 */ "QUERY", + /* 182 */ "CACHE", + /* 183 */ "EXPLAIN", + /* 184 */ "ANALYZE", + /* 185 */ "VERBOSE", + /* 186 */ "NK_BOOL", + /* 187 */ "RATIO", + /* 188 */ "NK_FLOAT", + /* 189 */ "OUTPUTTYPE", + /* 190 */ "AGGREGATE", + /* 191 */ "BUFSIZE", + /* 192 */ "STREAM", + /* 193 */ "INTO", + /* 194 */ "TRIGGER", + /* 195 */ "AT_ONCE", + /* 196 */ "WINDOW_CLOSE", + /* 197 */ "IGNORE", + /* 198 */ "EXPIRED", + /* 199 */ "FILL_HISTORY", + /* 200 */ "UPDATE", + /* 201 */ "SUBTABLE", + /* 202 */ "KILL", + /* 203 */ "CONNECTION", + /* 204 */ "TRANSACTION", + /* 205 */ "BALANCE", + /* 206 */ "VGROUP", + /* 207 */ "MERGE", + /* 208 */ "REDISTRIBUTE", + /* 209 */ "SPLIT", + /* 210 */ "DELETE", + /* 211 */ "INSERT", + /* 212 */ "NULL", + /* 213 */ "NK_QUESTION", + /* 214 */ "NK_ARROW", + /* 215 */ "ROWTS", + /* 216 */ "QSTART", + /* 217 */ "QEND", + /* 218 */ "QDURATION", + /* 219 */ "WSTART", + /* 220 */ "WEND", + /* 221 */ "WDURATION", + /* 222 */ "IROWTS", + /* 223 */ "ISFILLED", + /* 224 */ "CAST", + /* 225 */ "NOW", + /* 226 */ "TODAY", + /* 227 */ "TIMEZONE", + /* 228 */ "CLIENT_VERSION", + /* 229 */ "SERVER_VERSION", + /* 230 */ "SERVER_STATUS", + /* 231 */ "CURRENT_USER", + /* 232 */ "CASE", + /* 233 */ "WHEN", + /* 234 */ "THEN", + /* 235 */ "ELSE", + /* 236 */ "BETWEEN", + /* 237 */ "IS", + /* 238 */ "NK_LT", + /* 239 */ "NK_GT", + /* 240 */ "NK_LE", + /* 241 */ "NK_GE", + /* 242 */ "NK_NE", + /* 243 */ "MATCH", + /* 244 */ "NMATCH", + /* 245 */ "CONTAINS", + /* 246 */ "IN", + /* 247 */ "JOIN", + /* 248 */ "INNER", + /* 249 */ "SELECT", + /* 250 */ "DISTINCT", + /* 251 */ "WHERE", + /* 252 */ "PARTITION", + /* 253 */ "BY", + /* 254 */ "SESSION", + /* 255 */ "STATE_WINDOW", + /* 256 */ "EVENT_WINDOW", /* 257 */ "SLIDING", /* 258 */ "FILL", /* 259 */ "VALUE", @@ -1745,127 +1731,129 @@ static const char *const yyTokenName[] = { /* 345 */ "exists_opt", /* 346 */ "alter_db_options", /* 347 */ "speed_opt", - /* 348 */ "integer_list", - /* 349 */ "variable_list", - /* 350 */ "retention_list", - /* 351 */ "alter_db_option", - /* 352 */ "retention", - /* 353 */ "full_table_name", - /* 354 */ "column_def_list", - /* 355 */ "tags_def_opt", - /* 356 */ "table_options", - /* 357 */ "multi_create_clause", - /* 358 */ "tags_def", - /* 359 */ "multi_drop_clause", - /* 360 */ "alter_table_clause", - /* 361 */ "alter_table_options", - /* 362 */ "column_name", - /* 363 */ "type_name", - /* 364 */ "signed_literal", - /* 365 */ "create_subtable_clause", - /* 366 */ "specific_cols_opt", - /* 367 */ "expression_list", - /* 368 */ "drop_table_clause", - /* 369 */ "col_name_list", - /* 370 */ "table_name", - /* 371 */ "column_def", - /* 372 */ "duration_list", - /* 373 */ "rollup_func_list", - /* 374 */ "alter_table_option", - /* 375 */ "duration_literal", - /* 376 */ "rollup_func_name", - /* 377 */ "function_name", - /* 378 */ "col_name", - /* 379 */ "db_name_cond_opt", - /* 380 */ "like_pattern_opt", - /* 381 */ "table_name_cond", - /* 382 */ "from_db_opt", - /* 383 */ "tag_list_opt", - /* 384 */ "tag_item", - /* 385 */ "column_alias", - /* 386 */ "full_index_name", - /* 387 */ "index_options", - /* 388 */ "index_name", - /* 389 */ "func_list", - /* 390 */ "sliding_opt", - /* 391 */ "sma_stream_opt", - /* 392 */ "func", - /* 393 */ "sma_func_name", - /* 394 */ "query_or_subquery", - /* 395 */ "cgroup_name", - /* 396 */ "analyze_opt", - /* 397 */ "explain_options", - /* 398 */ "insert_query", - /* 399 */ "agg_func_opt", - /* 400 */ "bufsize_opt", - /* 401 */ "stream_name", - /* 402 */ "stream_options", - /* 403 */ "col_list_opt", - /* 404 */ "tag_def_or_ref_opt", - /* 405 */ "subtable_opt", - /* 406 */ "expression", - /* 407 */ "dnode_list", - /* 408 */ "where_clause_opt", - /* 409 */ "signed", - /* 410 */ "literal_func", - /* 411 */ "literal_list", - /* 412 */ "table_alias", - /* 413 */ "expr_or_subquery", - /* 414 */ "pseudo_column", - /* 415 */ "column_reference", - /* 416 */ "function_expression", - /* 417 */ "case_when_expression", - /* 418 */ "star_func", - /* 419 */ "star_func_para_list", - /* 420 */ "noarg_func", - /* 421 */ "other_para_list", - /* 422 */ "star_func_para", - /* 423 */ "when_then_list", - /* 424 */ "case_when_else_opt", - /* 425 */ "common_expression", - /* 426 */ "when_then_expr", - /* 427 */ "predicate", - /* 428 */ "compare_op", - /* 429 */ "in_op", - /* 430 */ "in_predicate_value", - /* 431 */ "boolean_value_expression", - /* 432 */ "boolean_primary", - /* 433 */ "from_clause_opt", - /* 434 */ "table_reference_list", - /* 435 */ "table_reference", - /* 436 */ "table_primary", - /* 437 */ "joined_table", - /* 438 */ "alias_opt", - /* 439 */ "subquery", - /* 440 */ "parenthesized_joined_table", - /* 441 */ "join_type", - /* 442 */ "search_condition", - /* 443 */ "query_specification", - /* 444 */ "set_quantifier_opt", - /* 445 */ "select_list", - /* 446 */ "partition_by_clause_opt", - /* 447 */ "range_opt", - /* 448 */ "every_opt", - /* 449 */ "fill_opt", - /* 450 */ "twindow_clause_opt", - /* 451 */ "group_by_clause_opt", - /* 452 */ "having_clause_opt", - /* 453 */ "select_item", - /* 454 */ "partition_list", - /* 455 */ "partition_item", - /* 456 */ "fill_mode", - /* 457 */ "group_by_list", - /* 458 */ "query_expression", - /* 459 */ "query_simple", - /* 460 */ "order_by_clause_opt", - /* 461 */ "slimit_clause_opt", - /* 462 */ "limit_clause_opt", - /* 463 */ "union_query_expression", - /* 464 */ "query_simple_or_subquery", - /* 465 */ "sort_specification_list", - /* 466 */ "sort_specification", - /* 467 */ "ordering_specification_opt", - /* 468 */ "null_ordering_opt", + /* 348 */ "start_opt", + /* 349 */ "end_opt", + /* 350 */ "integer_list", + /* 351 */ "variable_list", + /* 352 */ "retention_list", + /* 353 */ "alter_db_option", + /* 354 */ "retention", + /* 355 */ "full_table_name", + /* 356 */ "column_def_list", + /* 357 */ "tags_def_opt", + /* 358 */ "table_options", + /* 359 */ "multi_create_clause", + /* 360 */ "tags_def", + /* 361 */ "multi_drop_clause", + /* 362 */ "alter_table_clause", + /* 363 */ "alter_table_options", + /* 364 */ "column_name", + /* 365 */ "type_name", + /* 366 */ "signed_literal", + /* 367 */ "create_subtable_clause", + /* 368 */ "specific_cols_opt", + /* 369 */ "expression_list", + /* 370 */ "drop_table_clause", + /* 371 */ "col_name_list", + /* 372 */ "table_name", + /* 373 */ "column_def", + /* 374 */ "duration_list", + /* 375 */ "rollup_func_list", + /* 376 */ "alter_table_option", + /* 377 */ "duration_literal", + /* 378 */ "rollup_func_name", + /* 379 */ "function_name", + /* 380 */ "col_name", + /* 381 */ "db_name_cond_opt", + /* 382 */ "like_pattern_opt", + /* 383 */ "table_name_cond", + /* 384 */ "from_db_opt", + /* 385 */ "tag_list_opt", + /* 386 */ "tag_item", + /* 387 */ "column_alias", + /* 388 */ "full_index_name", + /* 389 */ "index_options", + /* 390 */ "index_name", + /* 391 */ "func_list", + /* 392 */ "sliding_opt", + /* 393 */ "sma_stream_opt", + /* 394 */ "func", + /* 395 */ "sma_func_name", + /* 396 */ "query_or_subquery", + /* 397 */ "cgroup_name", + /* 398 */ "analyze_opt", + /* 399 */ "explain_options", + /* 400 */ "insert_query", + /* 401 */ "agg_func_opt", + /* 402 */ "bufsize_opt", + /* 403 */ "stream_name", + /* 404 */ "stream_options", + /* 405 */ "col_list_opt", + /* 406 */ "tag_def_or_ref_opt", + /* 407 */ "subtable_opt", + /* 408 */ "expression", + /* 409 */ "dnode_list", + /* 410 */ "where_clause_opt", + /* 411 */ "signed", + /* 412 */ "literal_func", + /* 413 */ "literal_list", + /* 414 */ "table_alias", + /* 415 */ "expr_or_subquery", + /* 416 */ "pseudo_column", + /* 417 */ "column_reference", + /* 418 */ "function_expression", + /* 419 */ "case_when_expression", + /* 420 */ "star_func", + /* 421 */ "star_func_para_list", + /* 422 */ "noarg_func", + /* 423 */ "other_para_list", + /* 424 */ "star_func_para", + /* 425 */ "when_then_list", + /* 426 */ "case_when_else_opt", + /* 427 */ "common_expression", + /* 428 */ "when_then_expr", + /* 429 */ "predicate", + /* 430 */ "compare_op", + /* 431 */ "in_op", + /* 432 */ "in_predicate_value", + /* 433 */ "boolean_value_expression", + /* 434 */ "boolean_primary", + /* 435 */ "from_clause_opt", + /* 436 */ "table_reference_list", + /* 437 */ "table_reference", + /* 438 */ "table_primary", + /* 439 */ "joined_table", + /* 440 */ "alias_opt", + /* 441 */ "subquery", + /* 442 */ "parenthesized_joined_table", + /* 443 */ "join_type", + /* 444 */ "search_condition", + /* 445 */ "query_specification", + /* 446 */ "set_quantifier_opt", + /* 447 */ "select_list", + /* 448 */ "partition_by_clause_opt", + /* 449 */ "range_opt", + /* 450 */ "every_opt", + /* 451 */ "fill_opt", + /* 452 */ "twindow_clause_opt", + /* 453 */ "group_by_clause_opt", + /* 454 */ "having_clause_opt", + /* 455 */ "select_item", + /* 456 */ "partition_list", + /* 457 */ "partition_item", + /* 458 */ "fill_mode", + /* 459 */ "group_by_list", + /* 460 */ "query_expression", + /* 461 */ "query_simple", + /* 462 */ "order_by_clause_opt", + /* 463 */ "slimit_clause_opt", + /* 464 */ "limit_clause_opt", + /* 465 */ "union_query_expression", + /* 466 */ "query_simple_or_subquery", + /* 467 */ "sort_specification_list", + /* 468 */ "sort_specification", + /* 469 */ "ordering_specification_opt", + /* 470 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -1945,7 +1933,7 @@ static const char *const yyRuleName[] = { /* 69 */ "cmd ::= ALTER DATABASE db_name alter_db_options", /* 70 */ "cmd ::= FLUSH DATABASE db_name", /* 71 */ "cmd ::= TRIM DATABASE db_name speed_opt", - /* 72 */ "cmd ::= COMPACT DATABASE db_name", + /* 72 */ "cmd ::= COMPACT DATABASE db_name start_opt end_opt", /* 73 */ "not_exists_opt ::= IF NOT EXISTS", /* 74 */ "not_exists_opt ::=", /* 75 */ "exists_opt ::= IF EXISTS", @@ -2002,440 +1990,448 @@ static const char *const yyRuleName[] = { /* 126 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", /* 127 */ "speed_opt ::=", /* 128 */ "speed_opt ::= MAX_SPEED NK_INTEGER", - /* 129 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", - /* 130 */ "cmd ::= CREATE TABLE multi_create_clause", - /* 131 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", - /* 132 */ "cmd ::= DROP TABLE multi_drop_clause", - /* 133 */ "cmd ::= DROP STABLE exists_opt full_table_name", - /* 134 */ "cmd ::= ALTER TABLE alter_table_clause", - /* 135 */ "cmd ::= ALTER STABLE alter_table_clause", - /* 136 */ "alter_table_clause ::= full_table_name alter_table_options", - /* 137 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name", - /* 138 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", - /* 139 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", - /* 140 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", - /* 141 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", - /* 142 */ "alter_table_clause ::= full_table_name DROP TAG column_name", - /* 143 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", - /* 144 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", - /* 145 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal", - /* 146 */ "multi_create_clause ::= create_subtable_clause", - /* 147 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", - /* 148 */ "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", - /* 149 */ "multi_drop_clause ::= drop_table_clause", - /* 150 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", - /* 151 */ "drop_table_clause ::= exists_opt full_table_name", - /* 152 */ "specific_cols_opt ::=", - /* 153 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", - /* 154 */ "full_table_name ::= table_name", - /* 155 */ "full_table_name ::= db_name NK_DOT table_name", - /* 156 */ "column_def_list ::= column_def", - /* 157 */ "column_def_list ::= column_def_list NK_COMMA column_def", - /* 158 */ "column_def ::= column_name type_name", - /* 159 */ "column_def ::= column_name type_name COMMENT NK_STRING", - /* 160 */ "type_name ::= BOOL", - /* 161 */ "type_name ::= TINYINT", - /* 162 */ "type_name ::= SMALLINT", - /* 163 */ "type_name ::= INT", - /* 164 */ "type_name ::= INTEGER", - /* 165 */ "type_name ::= BIGINT", - /* 166 */ "type_name ::= FLOAT", - /* 167 */ "type_name ::= DOUBLE", - /* 168 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", - /* 169 */ "type_name ::= TIMESTAMP", - /* 170 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", - /* 171 */ "type_name ::= TINYINT UNSIGNED", - /* 172 */ "type_name ::= SMALLINT UNSIGNED", - /* 173 */ "type_name ::= INT UNSIGNED", - /* 174 */ "type_name ::= BIGINT UNSIGNED", - /* 175 */ "type_name ::= JSON", - /* 176 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", - /* 177 */ "type_name ::= MEDIUMBLOB", - /* 178 */ "type_name ::= BLOB", - /* 179 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", - /* 180 */ "type_name ::= DECIMAL", - /* 181 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", - /* 182 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 183 */ "tags_def_opt ::=", - /* 184 */ "tags_def_opt ::= tags_def", - /* 185 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", - /* 186 */ "table_options ::=", - /* 187 */ "table_options ::= table_options COMMENT NK_STRING", - /* 188 */ "table_options ::= table_options MAX_DELAY duration_list", - /* 189 */ "table_options ::= table_options WATERMARK duration_list", - /* 190 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", - /* 191 */ "table_options ::= table_options TTL NK_INTEGER", - /* 192 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", - /* 193 */ "table_options ::= table_options DELETE_MARK duration_list", - /* 194 */ "alter_table_options ::= alter_table_option", - /* 195 */ "alter_table_options ::= alter_table_options alter_table_option", - /* 196 */ "alter_table_option ::= COMMENT NK_STRING", - /* 197 */ "alter_table_option ::= TTL NK_INTEGER", - /* 198 */ "duration_list ::= duration_literal", - /* 199 */ "duration_list ::= duration_list NK_COMMA duration_literal", - /* 200 */ "rollup_func_list ::= rollup_func_name", - /* 201 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", - /* 202 */ "rollup_func_name ::= function_name", - /* 203 */ "rollup_func_name ::= FIRST", - /* 204 */ "rollup_func_name ::= LAST", - /* 205 */ "col_name_list ::= col_name", - /* 206 */ "col_name_list ::= col_name_list NK_COMMA col_name", - /* 207 */ "col_name ::= column_name", - /* 208 */ "cmd ::= SHOW DNODES", - /* 209 */ "cmd ::= SHOW USERS", - /* 210 */ "cmd ::= SHOW USER PRIVILEGES", - /* 211 */ "cmd ::= SHOW DATABASES", - /* 212 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt", - /* 213 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", - /* 214 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", - /* 215 */ "cmd ::= SHOW MNODES", - /* 216 */ "cmd ::= SHOW QNODES", - /* 217 */ "cmd ::= SHOW FUNCTIONS", - /* 218 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", - /* 219 */ "cmd ::= SHOW STREAMS", - /* 220 */ "cmd ::= SHOW ACCOUNTS", - /* 221 */ "cmd ::= SHOW APPS", - /* 222 */ "cmd ::= SHOW CONNECTIONS", - /* 223 */ "cmd ::= SHOW LICENCES", - /* 224 */ "cmd ::= SHOW GRANTS", - /* 225 */ "cmd ::= SHOW CREATE DATABASE db_name", - /* 226 */ "cmd ::= SHOW CREATE TABLE full_table_name", - /* 227 */ "cmd ::= SHOW CREATE STABLE full_table_name", - /* 228 */ "cmd ::= SHOW QUERIES", - /* 229 */ "cmd ::= SHOW SCORES", - /* 230 */ "cmd ::= SHOW TOPICS", - /* 231 */ "cmd ::= SHOW VARIABLES", - /* 232 */ "cmd ::= SHOW CLUSTER VARIABLES", - /* 233 */ "cmd ::= SHOW LOCAL VARIABLES", - /* 234 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", - /* 235 */ "cmd ::= SHOW BNODES", - /* 236 */ "cmd ::= SHOW SNODES", - /* 237 */ "cmd ::= SHOW CLUSTER", - /* 238 */ "cmd ::= SHOW TRANSACTIONS", - /* 239 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", - /* 240 */ "cmd ::= SHOW CONSUMERS", - /* 241 */ "cmd ::= SHOW SUBSCRIPTIONS", - /* 242 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", - /* 243 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", - /* 244 */ "cmd ::= SHOW VNODES NK_INTEGER", - /* 245 */ "cmd ::= SHOW VNODES NK_STRING", - /* 246 */ "cmd ::= SHOW db_name_cond_opt ALIVE", - /* 247 */ "cmd ::= SHOW CLUSTER ALIVE", - /* 248 */ "db_name_cond_opt ::=", - /* 249 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 250 */ "like_pattern_opt ::=", - /* 251 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 252 */ "table_name_cond ::= table_name", - /* 253 */ "from_db_opt ::=", - /* 254 */ "from_db_opt ::= FROM db_name", - /* 255 */ "tag_list_opt ::=", - /* 256 */ "tag_list_opt ::= tag_item", - /* 257 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", - /* 258 */ "tag_item ::= TBNAME", - /* 259 */ "tag_item ::= QTAGS", - /* 260 */ "tag_item ::= column_name", - /* 261 */ "tag_item ::= column_name column_alias", - /* 262 */ "tag_item ::= column_name AS column_alias", - /* 263 */ "cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options", - /* 264 */ "cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP", - /* 265 */ "cmd ::= DROP INDEX exists_opt full_index_name", - /* 266 */ "full_index_name ::= index_name", - /* 267 */ "full_index_name ::= db_name NK_DOT index_name", - /* 268 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", - /* 269 */ "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", - /* 270 */ "func_list ::= func", - /* 271 */ "func_list ::= func_list NK_COMMA func", - /* 272 */ "func ::= sma_func_name NK_LP expression_list NK_RP", - /* 273 */ "sma_func_name ::= function_name", - /* 274 */ "sma_func_name ::= COUNT", - /* 275 */ "sma_func_name ::= FIRST", - /* 276 */ "sma_func_name ::= LAST", - /* 277 */ "sma_func_name ::= LAST_ROW", - /* 278 */ "sma_stream_opt ::=", - /* 279 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", - /* 280 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", - /* 281 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", - /* 282 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", - /* 283 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", - /* 284 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name", - /* 285 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", - /* 286 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name", - /* 287 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 288 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 289 */ "cmd ::= DESC full_table_name", - /* 290 */ "cmd ::= DESCRIBE full_table_name", - /* 291 */ "cmd ::= RESET QUERY CACHE", - /* 292 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", - /* 293 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", - /* 294 */ "analyze_opt ::=", - /* 295 */ "analyze_opt ::= ANALYZE", - /* 296 */ "explain_options ::=", - /* 297 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 298 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 299 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", - /* 300 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 301 */ "agg_func_opt ::=", - /* 302 */ "agg_func_opt ::= AGGREGATE", - /* 303 */ "bufsize_opt ::=", - /* 304 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 305 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery", - /* 306 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 307 */ "col_list_opt ::=", - /* 308 */ "col_list_opt ::= NK_LP col_name_list NK_RP", - /* 309 */ "tag_def_or_ref_opt ::=", - /* 310 */ "tag_def_or_ref_opt ::= tags_def", - /* 311 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP", - /* 312 */ "stream_options ::=", - /* 313 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 314 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 315 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 316 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 317 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", - /* 318 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", - /* 319 */ "stream_options ::= stream_options DELETE_MARK duration_literal", - /* 320 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", - /* 321 */ "subtable_opt ::=", - /* 322 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 323 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 324 */ "cmd ::= KILL QUERY NK_STRING", - /* 325 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 326 */ "cmd ::= BALANCE VGROUP", - /* 327 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 328 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 329 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 330 */ "dnode_list ::= DNODE NK_INTEGER", - /* 331 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 332 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 333 */ "cmd ::= query_or_subquery", - /* 334 */ "cmd ::= insert_query", - /* 335 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 336 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", - /* 337 */ "literal ::= NK_INTEGER", - /* 338 */ "literal ::= NK_FLOAT", - /* 339 */ "literal ::= NK_STRING", - /* 340 */ "literal ::= NK_BOOL", - /* 341 */ "literal ::= TIMESTAMP NK_STRING", - /* 342 */ "literal ::= duration_literal", - /* 343 */ "literal ::= NULL", - /* 344 */ "literal ::= NK_QUESTION", - /* 345 */ "duration_literal ::= NK_VARIABLE", - /* 346 */ "signed ::= NK_INTEGER", - /* 347 */ "signed ::= NK_PLUS NK_INTEGER", - /* 348 */ "signed ::= NK_MINUS NK_INTEGER", - /* 349 */ "signed ::= NK_FLOAT", - /* 350 */ "signed ::= NK_PLUS NK_FLOAT", - /* 351 */ "signed ::= NK_MINUS NK_FLOAT", - /* 352 */ "signed_literal ::= signed", - /* 353 */ "signed_literal ::= NK_STRING", - /* 354 */ "signed_literal ::= NK_BOOL", - /* 355 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 356 */ "signed_literal ::= duration_literal", - /* 357 */ "signed_literal ::= NULL", - /* 358 */ "signed_literal ::= literal_func", - /* 359 */ "signed_literal ::= NK_QUESTION", - /* 360 */ "literal_list ::= signed_literal", - /* 361 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 362 */ "db_name ::= NK_ID", - /* 363 */ "table_name ::= NK_ID", - /* 364 */ "column_name ::= NK_ID", - /* 365 */ "function_name ::= NK_ID", - /* 366 */ "table_alias ::= NK_ID", - /* 367 */ "column_alias ::= NK_ID", - /* 368 */ "user_name ::= NK_ID", - /* 369 */ "topic_name ::= NK_ID", - /* 370 */ "stream_name ::= NK_ID", - /* 371 */ "cgroup_name ::= NK_ID", - /* 372 */ "index_name ::= NK_ID", - /* 373 */ "expr_or_subquery ::= expression", - /* 374 */ "expression ::= literal", - /* 375 */ "expression ::= pseudo_column", - /* 376 */ "expression ::= column_reference", - /* 377 */ "expression ::= function_expression", - /* 378 */ "expression ::= case_when_expression", - /* 379 */ "expression ::= NK_LP expression NK_RP", - /* 380 */ "expression ::= NK_PLUS expr_or_subquery", - /* 381 */ "expression ::= NK_MINUS expr_or_subquery", - /* 382 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 383 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 384 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 385 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 386 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 387 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 388 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 389 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 390 */ "expression_list ::= expr_or_subquery", - /* 391 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 392 */ "column_reference ::= column_name", - /* 393 */ "column_reference ::= table_name NK_DOT column_name", - /* 394 */ "pseudo_column ::= ROWTS", - /* 395 */ "pseudo_column ::= TBNAME", - /* 396 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 397 */ "pseudo_column ::= QSTART", - /* 398 */ "pseudo_column ::= QEND", - /* 399 */ "pseudo_column ::= QDURATION", - /* 400 */ "pseudo_column ::= WSTART", - /* 401 */ "pseudo_column ::= WEND", - /* 402 */ "pseudo_column ::= WDURATION", - /* 403 */ "pseudo_column ::= IROWTS", - /* 404 */ "pseudo_column ::= ISFILLED", - /* 405 */ "pseudo_column ::= QTAGS", - /* 406 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 407 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 408 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 409 */ "function_expression ::= literal_func", - /* 410 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 411 */ "literal_func ::= NOW", - /* 412 */ "noarg_func ::= NOW", - /* 413 */ "noarg_func ::= TODAY", - /* 414 */ "noarg_func ::= TIMEZONE", - /* 415 */ "noarg_func ::= DATABASE", - /* 416 */ "noarg_func ::= CLIENT_VERSION", - /* 417 */ "noarg_func ::= SERVER_VERSION", - /* 418 */ "noarg_func ::= SERVER_STATUS", - /* 419 */ "noarg_func ::= CURRENT_USER", - /* 420 */ "noarg_func ::= USER", - /* 421 */ "star_func ::= COUNT", - /* 422 */ "star_func ::= FIRST", - /* 423 */ "star_func ::= LAST", - /* 424 */ "star_func ::= LAST_ROW", - /* 425 */ "star_func_para_list ::= NK_STAR", - /* 426 */ "star_func_para_list ::= other_para_list", - /* 427 */ "other_para_list ::= star_func_para", - /* 428 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 429 */ "star_func_para ::= expr_or_subquery", - /* 430 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 431 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 432 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 433 */ "when_then_list ::= when_then_expr", - /* 434 */ "when_then_list ::= when_then_list when_then_expr", - /* 435 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 436 */ "case_when_else_opt ::=", - /* 437 */ "case_when_else_opt ::= ELSE common_expression", - /* 438 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 439 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 440 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 441 */ "predicate ::= expr_or_subquery IS NULL", - /* 442 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 443 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 444 */ "compare_op ::= NK_LT", - /* 445 */ "compare_op ::= NK_GT", - /* 446 */ "compare_op ::= NK_LE", - /* 447 */ "compare_op ::= NK_GE", - /* 448 */ "compare_op ::= NK_NE", - /* 449 */ "compare_op ::= NK_EQ", - /* 450 */ "compare_op ::= LIKE", - /* 451 */ "compare_op ::= NOT LIKE", - /* 452 */ "compare_op ::= MATCH", - /* 453 */ "compare_op ::= NMATCH", - /* 454 */ "compare_op ::= CONTAINS", - /* 455 */ "in_op ::= IN", - /* 456 */ "in_op ::= NOT IN", - /* 457 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 458 */ "boolean_value_expression ::= boolean_primary", - /* 459 */ "boolean_value_expression ::= NOT boolean_primary", - /* 460 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 461 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 462 */ "boolean_primary ::= predicate", - /* 463 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 464 */ "common_expression ::= expr_or_subquery", - /* 465 */ "common_expression ::= boolean_value_expression", - /* 466 */ "from_clause_opt ::=", - /* 467 */ "from_clause_opt ::= FROM table_reference_list", - /* 468 */ "table_reference_list ::= table_reference", - /* 469 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 470 */ "table_reference ::= table_primary", - /* 471 */ "table_reference ::= joined_table", - /* 472 */ "table_primary ::= table_name alias_opt", - /* 473 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 474 */ "table_primary ::= subquery alias_opt", - /* 475 */ "table_primary ::= parenthesized_joined_table", - /* 476 */ "alias_opt ::=", - /* 477 */ "alias_opt ::= table_alias", - /* 478 */ "alias_opt ::= AS table_alias", - /* 479 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 480 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 481 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 482 */ "join_type ::=", - /* 483 */ "join_type ::= INNER", - /* 484 */ "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", - /* 485 */ "set_quantifier_opt ::=", - /* 486 */ "set_quantifier_opt ::= DISTINCT", - /* 487 */ "set_quantifier_opt ::= ALL", - /* 488 */ "select_list ::= select_item", - /* 489 */ "select_list ::= select_list NK_COMMA select_item", - /* 490 */ "select_item ::= NK_STAR", - /* 491 */ "select_item ::= common_expression", - /* 492 */ "select_item ::= common_expression column_alias", - /* 493 */ "select_item ::= common_expression AS column_alias", - /* 494 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 495 */ "where_clause_opt ::=", - /* 496 */ "where_clause_opt ::= WHERE search_condition", - /* 497 */ "partition_by_clause_opt ::=", - /* 498 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 499 */ "partition_list ::= partition_item", - /* 500 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 501 */ "partition_item ::= expr_or_subquery", - /* 502 */ "partition_item ::= expr_or_subquery column_alias", - /* 503 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 504 */ "twindow_clause_opt ::=", - /* 505 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 506 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 507 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 508 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 509 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 510 */ "sliding_opt ::=", - /* 511 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 512 */ "fill_opt ::=", - /* 513 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 514 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 515 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP", - /* 516 */ "fill_mode ::= NONE", - /* 517 */ "fill_mode ::= PREV", - /* 518 */ "fill_mode ::= NULL", - /* 519 */ "fill_mode ::= NULL_F", - /* 520 */ "fill_mode ::= LINEAR", - /* 521 */ "fill_mode ::= NEXT", - /* 522 */ "group_by_clause_opt ::=", - /* 523 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 524 */ "group_by_list ::= expr_or_subquery", - /* 525 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 526 */ "having_clause_opt ::=", - /* 527 */ "having_clause_opt ::= HAVING search_condition", - /* 528 */ "range_opt ::=", - /* 529 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 530 */ "every_opt ::=", - /* 531 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 532 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 533 */ "query_simple ::= query_specification", - /* 534 */ "query_simple ::= union_query_expression", - /* 535 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 536 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 537 */ "query_simple_or_subquery ::= query_simple", - /* 538 */ "query_simple_or_subquery ::= subquery", - /* 539 */ "query_or_subquery ::= query_expression", - /* 540 */ "query_or_subquery ::= subquery", - /* 541 */ "order_by_clause_opt ::=", - /* 542 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 543 */ "slimit_clause_opt ::=", - /* 544 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 545 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 546 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 547 */ "limit_clause_opt ::=", - /* 548 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 549 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 550 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 551 */ "subquery ::= NK_LP query_expression NK_RP", - /* 552 */ "subquery ::= NK_LP subquery NK_RP", - /* 553 */ "search_condition ::= common_expression", - /* 554 */ "sort_specification_list ::= sort_specification", - /* 555 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 556 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 557 */ "ordering_specification_opt ::=", - /* 558 */ "ordering_specification_opt ::= ASC", - /* 559 */ "ordering_specification_opt ::= DESC", - /* 560 */ "null_ordering_opt ::=", - /* 561 */ "null_ordering_opt ::= NULLS FIRST", - /* 562 */ "null_ordering_opt ::= NULLS LAST", + /* 129 */ "start_opt ::=", + /* 130 */ "start_opt ::= START WITH NK_INTEGER", + /* 131 */ "start_opt ::= START WITH NK_STRING", + /* 132 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", + /* 133 */ "end_opt ::=", + /* 134 */ "end_opt ::= END WITH NK_INTEGER", + /* 135 */ "end_opt ::= END WITH NK_STRING", + /* 136 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", + /* 137 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", + /* 138 */ "cmd ::= CREATE TABLE multi_create_clause", + /* 139 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", + /* 140 */ "cmd ::= DROP TABLE multi_drop_clause", + /* 141 */ "cmd ::= DROP STABLE exists_opt full_table_name", + /* 142 */ "cmd ::= ALTER TABLE alter_table_clause", + /* 143 */ "cmd ::= ALTER STABLE alter_table_clause", + /* 144 */ "alter_table_clause ::= full_table_name alter_table_options", + /* 145 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name", + /* 146 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", + /* 147 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", + /* 148 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", + /* 149 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", + /* 150 */ "alter_table_clause ::= full_table_name DROP TAG column_name", + /* 151 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", + /* 152 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", + /* 153 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal", + /* 154 */ "multi_create_clause ::= create_subtable_clause", + /* 155 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", + /* 156 */ "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", + /* 157 */ "multi_drop_clause ::= drop_table_clause", + /* 158 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", + /* 159 */ "drop_table_clause ::= exists_opt full_table_name", + /* 160 */ "specific_cols_opt ::=", + /* 161 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", + /* 162 */ "full_table_name ::= table_name", + /* 163 */ "full_table_name ::= db_name NK_DOT table_name", + /* 164 */ "column_def_list ::= column_def", + /* 165 */ "column_def_list ::= column_def_list NK_COMMA column_def", + /* 166 */ "column_def ::= column_name type_name", + /* 167 */ "column_def ::= column_name type_name COMMENT NK_STRING", + /* 168 */ "type_name ::= BOOL", + /* 169 */ "type_name ::= TINYINT", + /* 170 */ "type_name ::= SMALLINT", + /* 171 */ "type_name ::= INT", + /* 172 */ "type_name ::= INTEGER", + /* 173 */ "type_name ::= BIGINT", + /* 174 */ "type_name ::= FLOAT", + /* 175 */ "type_name ::= DOUBLE", + /* 176 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", + /* 177 */ "type_name ::= TIMESTAMP", + /* 178 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", + /* 179 */ "type_name ::= TINYINT UNSIGNED", + /* 180 */ "type_name ::= SMALLINT UNSIGNED", + /* 181 */ "type_name ::= INT UNSIGNED", + /* 182 */ "type_name ::= BIGINT UNSIGNED", + /* 183 */ "type_name ::= JSON", + /* 184 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", + /* 185 */ "type_name ::= MEDIUMBLOB", + /* 186 */ "type_name ::= BLOB", + /* 187 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", + /* 188 */ "type_name ::= DECIMAL", + /* 189 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", + /* 190 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 191 */ "tags_def_opt ::=", + /* 192 */ "tags_def_opt ::= tags_def", + /* 193 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", + /* 194 */ "table_options ::=", + /* 195 */ "table_options ::= table_options COMMENT NK_STRING", + /* 196 */ "table_options ::= table_options MAX_DELAY duration_list", + /* 197 */ "table_options ::= table_options WATERMARK duration_list", + /* 198 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", + /* 199 */ "table_options ::= table_options TTL NK_INTEGER", + /* 200 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", + /* 201 */ "table_options ::= table_options DELETE_MARK duration_list", + /* 202 */ "alter_table_options ::= alter_table_option", + /* 203 */ "alter_table_options ::= alter_table_options alter_table_option", + /* 204 */ "alter_table_option ::= COMMENT NK_STRING", + /* 205 */ "alter_table_option ::= TTL NK_INTEGER", + /* 206 */ "duration_list ::= duration_literal", + /* 207 */ "duration_list ::= duration_list NK_COMMA duration_literal", + /* 208 */ "rollup_func_list ::= rollup_func_name", + /* 209 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", + /* 210 */ "rollup_func_name ::= function_name", + /* 211 */ "rollup_func_name ::= FIRST", + /* 212 */ "rollup_func_name ::= LAST", + /* 213 */ "col_name_list ::= col_name", + /* 214 */ "col_name_list ::= col_name_list NK_COMMA col_name", + /* 215 */ "col_name ::= column_name", + /* 216 */ "cmd ::= SHOW DNODES", + /* 217 */ "cmd ::= SHOW USERS", + /* 218 */ "cmd ::= SHOW USER PRIVILEGES", + /* 219 */ "cmd ::= SHOW DATABASES", + /* 220 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt", + /* 221 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", + /* 222 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", + /* 223 */ "cmd ::= SHOW MNODES", + /* 224 */ "cmd ::= SHOW QNODES", + /* 225 */ "cmd ::= SHOW FUNCTIONS", + /* 226 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", + /* 227 */ "cmd ::= SHOW STREAMS", + /* 228 */ "cmd ::= SHOW ACCOUNTS", + /* 229 */ "cmd ::= SHOW APPS", + /* 230 */ "cmd ::= SHOW CONNECTIONS", + /* 231 */ "cmd ::= SHOW LICENCES", + /* 232 */ "cmd ::= SHOW GRANTS", + /* 233 */ "cmd ::= SHOW CREATE DATABASE db_name", + /* 234 */ "cmd ::= SHOW CREATE TABLE full_table_name", + /* 235 */ "cmd ::= SHOW CREATE STABLE full_table_name", + /* 236 */ "cmd ::= SHOW QUERIES", + /* 237 */ "cmd ::= SHOW SCORES", + /* 238 */ "cmd ::= SHOW TOPICS", + /* 239 */ "cmd ::= SHOW VARIABLES", + /* 240 */ "cmd ::= SHOW CLUSTER VARIABLES", + /* 241 */ "cmd ::= SHOW LOCAL VARIABLES", + /* 242 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", + /* 243 */ "cmd ::= SHOW BNODES", + /* 244 */ "cmd ::= SHOW SNODES", + /* 245 */ "cmd ::= SHOW CLUSTER", + /* 246 */ "cmd ::= SHOW TRANSACTIONS", + /* 247 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", + /* 248 */ "cmd ::= SHOW CONSUMERS", + /* 249 */ "cmd ::= SHOW SUBSCRIPTIONS", + /* 250 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", + /* 251 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", + /* 252 */ "cmd ::= SHOW VNODES NK_INTEGER", + /* 253 */ "cmd ::= SHOW VNODES NK_STRING", + /* 254 */ "cmd ::= SHOW db_name_cond_opt ALIVE", + /* 255 */ "cmd ::= SHOW CLUSTER ALIVE", + /* 256 */ "db_name_cond_opt ::=", + /* 257 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 258 */ "like_pattern_opt ::=", + /* 259 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 260 */ "table_name_cond ::= table_name", + /* 261 */ "from_db_opt ::=", + /* 262 */ "from_db_opt ::= FROM db_name", + /* 263 */ "tag_list_opt ::=", + /* 264 */ "tag_list_opt ::= tag_item", + /* 265 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", + /* 266 */ "tag_item ::= TBNAME", + /* 267 */ "tag_item ::= QTAGS", + /* 268 */ "tag_item ::= column_name", + /* 269 */ "tag_item ::= column_name column_alias", + /* 270 */ "tag_item ::= column_name AS column_alias", + /* 271 */ "cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options", + /* 272 */ "cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP", + /* 273 */ "cmd ::= DROP INDEX exists_opt full_index_name", + /* 274 */ "full_index_name ::= index_name", + /* 275 */ "full_index_name ::= db_name NK_DOT index_name", + /* 276 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", + /* 277 */ "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", + /* 278 */ "func_list ::= func", + /* 279 */ "func_list ::= func_list NK_COMMA func", + /* 280 */ "func ::= sma_func_name NK_LP expression_list NK_RP", + /* 281 */ "sma_func_name ::= function_name", + /* 282 */ "sma_func_name ::= COUNT", + /* 283 */ "sma_func_name ::= FIRST", + /* 284 */ "sma_func_name ::= LAST", + /* 285 */ "sma_func_name ::= LAST_ROW", + /* 286 */ "sma_stream_opt ::=", + /* 287 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", + /* 288 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", + /* 289 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", + /* 290 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", + /* 291 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", + /* 292 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name", + /* 293 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", + /* 294 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name", + /* 295 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 296 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 297 */ "cmd ::= DESC full_table_name", + /* 298 */ "cmd ::= DESCRIBE full_table_name", + /* 299 */ "cmd ::= RESET QUERY CACHE", + /* 300 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", + /* 301 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", + /* 302 */ "analyze_opt ::=", + /* 303 */ "analyze_opt ::= ANALYZE", + /* 304 */ "explain_options ::=", + /* 305 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 306 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 307 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", + /* 308 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 309 */ "agg_func_opt ::=", + /* 310 */ "agg_func_opt ::= AGGREGATE", + /* 311 */ "bufsize_opt ::=", + /* 312 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 313 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery", + /* 314 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 315 */ "col_list_opt ::=", + /* 316 */ "col_list_opt ::= NK_LP col_name_list NK_RP", + /* 317 */ "tag_def_or_ref_opt ::=", + /* 318 */ "tag_def_or_ref_opt ::= tags_def", + /* 319 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP", + /* 320 */ "stream_options ::=", + /* 321 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 322 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 323 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 324 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 325 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", + /* 326 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", + /* 327 */ "stream_options ::= stream_options DELETE_MARK duration_literal", + /* 328 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", + /* 329 */ "subtable_opt ::=", + /* 330 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 331 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 332 */ "cmd ::= KILL QUERY NK_STRING", + /* 333 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 334 */ "cmd ::= BALANCE VGROUP", + /* 335 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 336 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 337 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 338 */ "dnode_list ::= DNODE NK_INTEGER", + /* 339 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 340 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 341 */ "cmd ::= query_or_subquery", + /* 342 */ "cmd ::= insert_query", + /* 343 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 344 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", + /* 345 */ "literal ::= NK_INTEGER", + /* 346 */ "literal ::= NK_FLOAT", + /* 347 */ "literal ::= NK_STRING", + /* 348 */ "literal ::= NK_BOOL", + /* 349 */ "literal ::= TIMESTAMP NK_STRING", + /* 350 */ "literal ::= duration_literal", + /* 351 */ "literal ::= NULL", + /* 352 */ "literal ::= NK_QUESTION", + /* 353 */ "duration_literal ::= NK_VARIABLE", + /* 354 */ "signed ::= NK_INTEGER", + /* 355 */ "signed ::= NK_PLUS NK_INTEGER", + /* 356 */ "signed ::= NK_MINUS NK_INTEGER", + /* 357 */ "signed ::= NK_FLOAT", + /* 358 */ "signed ::= NK_PLUS NK_FLOAT", + /* 359 */ "signed ::= NK_MINUS NK_FLOAT", + /* 360 */ "signed_literal ::= signed", + /* 361 */ "signed_literal ::= NK_STRING", + /* 362 */ "signed_literal ::= NK_BOOL", + /* 363 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 364 */ "signed_literal ::= duration_literal", + /* 365 */ "signed_literal ::= NULL", + /* 366 */ "signed_literal ::= literal_func", + /* 367 */ "signed_literal ::= NK_QUESTION", + /* 368 */ "literal_list ::= signed_literal", + /* 369 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 370 */ "db_name ::= NK_ID", + /* 371 */ "table_name ::= NK_ID", + /* 372 */ "column_name ::= NK_ID", + /* 373 */ "function_name ::= NK_ID", + /* 374 */ "table_alias ::= NK_ID", + /* 375 */ "column_alias ::= NK_ID", + /* 376 */ "user_name ::= NK_ID", + /* 377 */ "topic_name ::= NK_ID", + /* 378 */ "stream_name ::= NK_ID", + /* 379 */ "cgroup_name ::= NK_ID", + /* 380 */ "index_name ::= NK_ID", + /* 381 */ "expr_or_subquery ::= expression", + /* 382 */ "expression ::= literal", + /* 383 */ "expression ::= pseudo_column", + /* 384 */ "expression ::= column_reference", + /* 385 */ "expression ::= function_expression", + /* 386 */ "expression ::= case_when_expression", + /* 387 */ "expression ::= NK_LP expression NK_RP", + /* 388 */ "expression ::= NK_PLUS expr_or_subquery", + /* 389 */ "expression ::= NK_MINUS expr_or_subquery", + /* 390 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 391 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 392 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 393 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 394 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 395 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 396 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 397 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 398 */ "expression_list ::= expr_or_subquery", + /* 399 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 400 */ "column_reference ::= column_name", + /* 401 */ "column_reference ::= table_name NK_DOT column_name", + /* 402 */ "pseudo_column ::= ROWTS", + /* 403 */ "pseudo_column ::= TBNAME", + /* 404 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 405 */ "pseudo_column ::= QSTART", + /* 406 */ "pseudo_column ::= QEND", + /* 407 */ "pseudo_column ::= QDURATION", + /* 408 */ "pseudo_column ::= WSTART", + /* 409 */ "pseudo_column ::= WEND", + /* 410 */ "pseudo_column ::= WDURATION", + /* 411 */ "pseudo_column ::= IROWTS", + /* 412 */ "pseudo_column ::= ISFILLED", + /* 413 */ "pseudo_column ::= QTAGS", + /* 414 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 415 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 416 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 417 */ "function_expression ::= literal_func", + /* 418 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 419 */ "literal_func ::= NOW", + /* 420 */ "noarg_func ::= NOW", + /* 421 */ "noarg_func ::= TODAY", + /* 422 */ "noarg_func ::= TIMEZONE", + /* 423 */ "noarg_func ::= DATABASE", + /* 424 */ "noarg_func ::= CLIENT_VERSION", + /* 425 */ "noarg_func ::= SERVER_VERSION", + /* 426 */ "noarg_func ::= SERVER_STATUS", + /* 427 */ "noarg_func ::= CURRENT_USER", + /* 428 */ "noarg_func ::= USER", + /* 429 */ "star_func ::= COUNT", + /* 430 */ "star_func ::= FIRST", + /* 431 */ "star_func ::= LAST", + /* 432 */ "star_func ::= LAST_ROW", + /* 433 */ "star_func_para_list ::= NK_STAR", + /* 434 */ "star_func_para_list ::= other_para_list", + /* 435 */ "other_para_list ::= star_func_para", + /* 436 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 437 */ "star_func_para ::= expr_or_subquery", + /* 438 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 439 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 440 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 441 */ "when_then_list ::= when_then_expr", + /* 442 */ "when_then_list ::= when_then_list when_then_expr", + /* 443 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 444 */ "case_when_else_opt ::=", + /* 445 */ "case_when_else_opt ::= ELSE common_expression", + /* 446 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 447 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 448 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 449 */ "predicate ::= expr_or_subquery IS NULL", + /* 450 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 451 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 452 */ "compare_op ::= NK_LT", + /* 453 */ "compare_op ::= NK_GT", + /* 454 */ "compare_op ::= NK_LE", + /* 455 */ "compare_op ::= NK_GE", + /* 456 */ "compare_op ::= NK_NE", + /* 457 */ "compare_op ::= NK_EQ", + /* 458 */ "compare_op ::= LIKE", + /* 459 */ "compare_op ::= NOT LIKE", + /* 460 */ "compare_op ::= MATCH", + /* 461 */ "compare_op ::= NMATCH", + /* 462 */ "compare_op ::= CONTAINS", + /* 463 */ "in_op ::= IN", + /* 464 */ "in_op ::= NOT IN", + /* 465 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 466 */ "boolean_value_expression ::= boolean_primary", + /* 467 */ "boolean_value_expression ::= NOT boolean_primary", + /* 468 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 469 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 470 */ "boolean_primary ::= predicate", + /* 471 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 472 */ "common_expression ::= expr_or_subquery", + /* 473 */ "common_expression ::= boolean_value_expression", + /* 474 */ "from_clause_opt ::=", + /* 475 */ "from_clause_opt ::= FROM table_reference_list", + /* 476 */ "table_reference_list ::= table_reference", + /* 477 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 478 */ "table_reference ::= table_primary", + /* 479 */ "table_reference ::= joined_table", + /* 480 */ "table_primary ::= table_name alias_opt", + /* 481 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 482 */ "table_primary ::= subquery alias_opt", + /* 483 */ "table_primary ::= parenthesized_joined_table", + /* 484 */ "alias_opt ::=", + /* 485 */ "alias_opt ::= table_alias", + /* 486 */ "alias_opt ::= AS table_alias", + /* 487 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 488 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 489 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 490 */ "join_type ::=", + /* 491 */ "join_type ::= INNER", + /* 492 */ "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", + /* 493 */ "set_quantifier_opt ::=", + /* 494 */ "set_quantifier_opt ::= DISTINCT", + /* 495 */ "set_quantifier_opt ::= ALL", + /* 496 */ "select_list ::= select_item", + /* 497 */ "select_list ::= select_list NK_COMMA select_item", + /* 498 */ "select_item ::= NK_STAR", + /* 499 */ "select_item ::= common_expression", + /* 500 */ "select_item ::= common_expression column_alias", + /* 501 */ "select_item ::= common_expression AS column_alias", + /* 502 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 503 */ "where_clause_opt ::=", + /* 504 */ "where_clause_opt ::= WHERE search_condition", + /* 505 */ "partition_by_clause_opt ::=", + /* 506 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 507 */ "partition_list ::= partition_item", + /* 508 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 509 */ "partition_item ::= expr_or_subquery", + /* 510 */ "partition_item ::= expr_or_subquery column_alias", + /* 511 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 512 */ "twindow_clause_opt ::=", + /* 513 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 514 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 515 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 516 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 517 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 518 */ "sliding_opt ::=", + /* 519 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 520 */ "fill_opt ::=", + /* 521 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 522 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", + /* 523 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP", + /* 524 */ "fill_mode ::= NONE", + /* 525 */ "fill_mode ::= PREV", + /* 526 */ "fill_mode ::= NULL", + /* 527 */ "fill_mode ::= NULL_F", + /* 528 */ "fill_mode ::= LINEAR", + /* 529 */ "fill_mode ::= NEXT", + /* 530 */ "group_by_clause_opt ::=", + /* 531 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 532 */ "group_by_list ::= expr_or_subquery", + /* 533 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 534 */ "having_clause_opt ::=", + /* 535 */ "having_clause_opt ::= HAVING search_condition", + /* 536 */ "range_opt ::=", + /* 537 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 538 */ "every_opt ::=", + /* 539 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 540 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 541 */ "query_simple ::= query_specification", + /* 542 */ "query_simple ::= union_query_expression", + /* 543 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 544 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 545 */ "query_simple_or_subquery ::= query_simple", + /* 546 */ "query_simple_or_subquery ::= subquery", + /* 547 */ "query_or_subquery ::= query_expression", + /* 548 */ "query_or_subquery ::= subquery", + /* 549 */ "order_by_clause_opt ::=", + /* 550 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 551 */ "slimit_clause_opt ::=", + /* 552 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 553 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 554 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 555 */ "limit_clause_opt ::=", + /* 556 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 557 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 558 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 559 */ "subquery ::= NK_LP query_expression NK_RP", + /* 560 */ "subquery ::= NK_LP subquery NK_RP", + /* 561 */ "search_condition ::= common_expression", + /* 562 */ "sort_specification_list ::= sort_specification", + /* 563 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 564 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 565 */ "ordering_specification_opt ::=", + /* 566 */ "ordering_specification_opt ::= ASC", + /* 567 */ "ordering_specification_opt ::= DESC", + /* 568 */ "null_ordering_opt ::=", + /* 569 */ "null_ordering_opt ::= NULLS FIRST", + /* 570 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -2566,82 +2562,84 @@ static void yy_destructor( case 331: /* literal */ case 344: /* db_options */ case 346: /* alter_db_options */ - case 352: /* retention */ - case 353: /* full_table_name */ - case 356: /* table_options */ - case 360: /* alter_table_clause */ - case 361: /* alter_table_options */ - case 364: /* signed_literal */ - case 365: /* create_subtable_clause */ - case 368: /* drop_table_clause */ - case 371: /* column_def */ - case 375: /* duration_literal */ - case 376: /* rollup_func_name */ - case 378: /* col_name */ - case 379: /* db_name_cond_opt */ - case 380: /* like_pattern_opt */ - case 381: /* table_name_cond */ - case 382: /* from_db_opt */ - case 384: /* tag_item */ - case 386: /* full_index_name */ - case 387: /* index_options */ - case 390: /* sliding_opt */ - case 391: /* sma_stream_opt */ - case 392: /* func */ - case 394: /* query_or_subquery */ - case 397: /* explain_options */ - case 398: /* insert_query */ - case 402: /* stream_options */ - case 405: /* subtable_opt */ - case 406: /* expression */ - case 408: /* where_clause_opt */ - case 409: /* signed */ - case 410: /* literal_func */ - case 413: /* expr_or_subquery */ - case 414: /* pseudo_column */ - case 415: /* column_reference */ - case 416: /* function_expression */ - case 417: /* case_when_expression */ - case 422: /* star_func_para */ - case 424: /* case_when_else_opt */ - case 425: /* common_expression */ - case 426: /* when_then_expr */ - case 427: /* predicate */ - case 430: /* in_predicate_value */ - case 431: /* boolean_value_expression */ - case 432: /* boolean_primary */ - case 433: /* from_clause_opt */ - case 434: /* table_reference_list */ - case 435: /* table_reference */ - case 436: /* table_primary */ - case 437: /* joined_table */ - case 439: /* subquery */ - case 440: /* parenthesized_joined_table */ - case 442: /* search_condition */ - case 443: /* query_specification */ - case 447: /* range_opt */ - case 448: /* every_opt */ - case 449: /* fill_opt */ - case 450: /* twindow_clause_opt */ - case 452: /* having_clause_opt */ - case 453: /* select_item */ - case 455: /* partition_item */ - case 458: /* query_expression */ - case 459: /* query_simple */ - case 461: /* slimit_clause_opt */ - case 462: /* limit_clause_opt */ - case 463: /* union_query_expression */ - case 464: /* query_simple_or_subquery */ - case 466: /* sort_specification */ + case 348: /* start_opt */ + case 349: /* end_opt */ + case 354: /* retention */ + case 355: /* full_table_name */ + case 358: /* table_options */ + case 362: /* alter_table_clause */ + case 363: /* alter_table_options */ + case 366: /* signed_literal */ + case 367: /* create_subtable_clause */ + case 370: /* drop_table_clause */ + case 373: /* column_def */ + case 377: /* duration_literal */ + case 378: /* rollup_func_name */ + case 380: /* col_name */ + case 381: /* db_name_cond_opt */ + case 382: /* like_pattern_opt */ + case 383: /* table_name_cond */ + case 384: /* from_db_opt */ + case 386: /* tag_item */ + case 388: /* full_index_name */ + case 389: /* index_options */ + case 392: /* sliding_opt */ + case 393: /* sma_stream_opt */ + case 394: /* func */ + case 396: /* query_or_subquery */ + case 399: /* explain_options */ + case 400: /* insert_query */ + case 404: /* stream_options */ + case 407: /* subtable_opt */ + case 408: /* expression */ + case 410: /* where_clause_opt */ + case 411: /* signed */ + case 412: /* literal_func */ + case 415: /* expr_or_subquery */ + case 416: /* pseudo_column */ + case 417: /* column_reference */ + case 418: /* function_expression */ + case 419: /* case_when_expression */ + case 424: /* star_func_para */ + case 426: /* case_when_else_opt */ + case 427: /* common_expression */ + case 428: /* when_then_expr */ + case 429: /* predicate */ + case 432: /* in_predicate_value */ + case 433: /* boolean_value_expression */ + case 434: /* boolean_primary */ + case 435: /* from_clause_opt */ + case 436: /* table_reference_list */ + case 437: /* table_reference */ + case 438: /* table_primary */ + case 439: /* joined_table */ + case 441: /* subquery */ + case 442: /* parenthesized_joined_table */ + case 444: /* search_condition */ + case 445: /* query_specification */ + case 449: /* range_opt */ + case 450: /* every_opt */ + case 451: /* fill_opt */ + case 452: /* twindow_clause_opt */ + case 454: /* having_clause_opt */ + case 455: /* select_item */ + case 457: /* partition_item */ + case 460: /* query_expression */ + case 461: /* query_simple */ + case 463: /* slimit_clause_opt */ + case 464: /* limit_clause_opt */ + case 465: /* union_query_expression */ + case 466: /* query_simple_or_subquery */ + case 468: /* sort_specification */ { - nodesDestroyNode((yypminor->yy42)); + nodesDestroyNode((yypminor->yy140)); } break; case 329: /* account_options */ case 330: /* alter_account_options */ case 332: /* alter_account_option */ case 347: /* speed_opt */ - case 400: /* bufsize_opt */ + case 402: /* bufsize_opt */ { } @@ -2651,18 +2649,18 @@ static void yy_destructor( case 339: /* db_name */ case 340: /* topic_name */ case 341: /* dnode_endpoint */ - case 362: /* column_name */ - case 370: /* table_name */ - case 377: /* function_name */ - case 385: /* column_alias */ - case 388: /* index_name */ - case 393: /* sma_func_name */ - case 395: /* cgroup_name */ - case 401: /* stream_name */ - case 412: /* table_alias */ - case 418: /* star_func */ - case 420: /* noarg_func */ - case 438: /* alias_opt */ + case 364: /* column_name */ + case 372: /* table_name */ + case 379: /* function_name */ + case 387: /* column_alias */ + case 390: /* index_name */ + case 395: /* sma_func_name */ + case 397: /* cgroup_name */ + case 403: /* stream_name */ + case 414: /* table_alias */ + case 420: /* star_func */ + case 422: /* noarg_func */ + case 440: /* alias_opt */ { } @@ -2682,79 +2680,79 @@ static void yy_destructor( case 342: /* force_opt */ case 343: /* not_exists_opt */ case 345: /* exists_opt */ - case 396: /* analyze_opt */ - case 399: /* agg_func_opt */ - case 444: /* set_quantifier_opt */ + case 398: /* analyze_opt */ + case 401: /* agg_func_opt */ + case 446: /* set_quantifier_opt */ { } break; - case 348: /* integer_list */ - case 349: /* variable_list */ - case 350: /* retention_list */ - case 354: /* column_def_list */ - case 355: /* tags_def_opt */ - case 357: /* multi_create_clause */ - case 358: /* tags_def */ - case 359: /* multi_drop_clause */ - case 366: /* specific_cols_opt */ - case 367: /* expression_list */ - case 369: /* col_name_list */ - case 372: /* duration_list */ - case 373: /* rollup_func_list */ - case 383: /* tag_list_opt */ - case 389: /* func_list */ - case 403: /* col_list_opt */ - case 404: /* tag_def_or_ref_opt */ - case 407: /* dnode_list */ - case 411: /* literal_list */ - case 419: /* star_func_para_list */ - case 421: /* other_para_list */ - case 423: /* when_then_list */ - case 445: /* select_list */ - case 446: /* partition_by_clause_opt */ - case 451: /* group_by_clause_opt */ - case 454: /* partition_list */ - case 457: /* group_by_list */ - case 460: /* order_by_clause_opt */ - case 465: /* sort_specification_list */ + case 350: /* integer_list */ + case 351: /* variable_list */ + case 352: /* retention_list */ + case 356: /* column_def_list */ + case 357: /* tags_def_opt */ + case 359: /* multi_create_clause */ + case 360: /* tags_def */ + case 361: /* multi_drop_clause */ + case 368: /* specific_cols_opt */ + case 369: /* expression_list */ + case 371: /* col_name_list */ + case 374: /* duration_list */ + case 375: /* rollup_func_list */ + case 385: /* tag_list_opt */ + case 391: /* func_list */ + case 405: /* col_list_opt */ + case 406: /* tag_def_or_ref_opt */ + case 409: /* dnode_list */ + case 413: /* literal_list */ + case 421: /* star_func_para_list */ + case 423: /* other_para_list */ + case 425: /* when_then_list */ + case 447: /* select_list */ + case 448: /* partition_by_clause_opt */ + case 453: /* group_by_clause_opt */ + case 456: /* partition_list */ + case 459: /* group_by_list */ + case 462: /* order_by_clause_opt */ + case 467: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy110)); + nodesDestroyList((yypminor->yy220)); } break; - case 351: /* alter_db_option */ - case 374: /* alter_table_option */ + case 353: /* alter_db_option */ + case 376: /* alter_table_option */ { } break; - case 363: /* type_name */ + case 365: /* type_name */ { } break; - case 428: /* compare_op */ - case 429: /* in_op */ + case 430: /* compare_op */ + case 431: /* in_op */ { } break; - case 441: /* join_type */ + case 443: /* join_type */ { } break; - case 456: /* fill_mode */ + case 458: /* fill_mode */ { } break; - case 467: /* ordering_specification_opt */ + case 469: /* ordering_specification_opt */ { } break; - case 468: /* null_ordering_opt */ + case 470: /* null_ordering_opt */ { } @@ -3125,7 +3123,7 @@ static const struct { { 328, -4 }, /* (69) cmd ::= ALTER DATABASE db_name alter_db_options */ { 328, -3 }, /* (70) cmd ::= FLUSH DATABASE db_name */ { 328, -4 }, /* (71) cmd ::= TRIM DATABASE db_name speed_opt */ - { 328, -3 }, /* (72) cmd ::= COMPACT DATABASE db_name */ + { 328, -5 }, /* (72) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ { 343, -3 }, /* (73) not_exists_opt ::= IF NOT EXISTS */ { 343, 0 }, /* (74) not_exists_opt ::= */ { 345, -2 }, /* (75) exists_opt ::= IF EXISTS */ @@ -3163,459 +3161,467 @@ static const struct { { 344, -3 }, /* (107) db_options ::= db_options TABLE_SUFFIX NK_INTEGER */ { 346, -1 }, /* (108) alter_db_options ::= alter_db_option */ { 346, -2 }, /* (109) alter_db_options ::= alter_db_options alter_db_option */ - { 351, -2 }, /* (110) alter_db_option ::= BUFFER NK_INTEGER */ - { 351, -2 }, /* (111) alter_db_option ::= CACHEMODEL NK_STRING */ - { 351, -2 }, /* (112) alter_db_option ::= CACHESIZE NK_INTEGER */ - { 351, -2 }, /* (113) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - { 351, -2 }, /* (114) alter_db_option ::= KEEP integer_list */ - { 351, -2 }, /* (115) alter_db_option ::= KEEP variable_list */ - { 351, -2 }, /* (116) alter_db_option ::= PAGES NK_INTEGER */ - { 351, -2 }, /* (117) alter_db_option ::= REPLICA NK_INTEGER */ - { 351, -2 }, /* (118) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - { 351, -2 }, /* (119) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - { 348, -1 }, /* (120) integer_list ::= NK_INTEGER */ - { 348, -3 }, /* (121) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - { 349, -1 }, /* (122) variable_list ::= NK_VARIABLE */ - { 349, -3 }, /* (123) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - { 350, -1 }, /* (124) retention_list ::= retention */ - { 350, -3 }, /* (125) retention_list ::= retention_list NK_COMMA retention */ - { 352, -3 }, /* (126) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + { 353, -2 }, /* (110) alter_db_option ::= BUFFER NK_INTEGER */ + { 353, -2 }, /* (111) alter_db_option ::= CACHEMODEL NK_STRING */ + { 353, -2 }, /* (112) alter_db_option ::= CACHESIZE NK_INTEGER */ + { 353, -2 }, /* (113) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + { 353, -2 }, /* (114) alter_db_option ::= KEEP integer_list */ + { 353, -2 }, /* (115) alter_db_option ::= KEEP variable_list */ + { 353, -2 }, /* (116) alter_db_option ::= PAGES NK_INTEGER */ + { 353, -2 }, /* (117) alter_db_option ::= REPLICA NK_INTEGER */ + { 353, -2 }, /* (118) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + { 353, -2 }, /* (119) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + { 350, -1 }, /* (120) integer_list ::= NK_INTEGER */ + { 350, -3 }, /* (121) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + { 351, -1 }, /* (122) variable_list ::= NK_VARIABLE */ + { 351, -3 }, /* (123) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + { 352, -1 }, /* (124) retention_list ::= retention */ + { 352, -3 }, /* (125) retention_list ::= retention_list NK_COMMA retention */ + { 354, -3 }, /* (126) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ { 347, 0 }, /* (127) speed_opt ::= */ { 347, -2 }, /* (128) speed_opt ::= MAX_SPEED NK_INTEGER */ - { 328, -9 }, /* (129) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - { 328, -3 }, /* (130) cmd ::= CREATE TABLE multi_create_clause */ - { 328, -9 }, /* (131) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - { 328, -3 }, /* (132) cmd ::= DROP TABLE multi_drop_clause */ - { 328, -4 }, /* (133) cmd ::= DROP STABLE exists_opt full_table_name */ - { 328, -3 }, /* (134) cmd ::= ALTER TABLE alter_table_clause */ - { 328, -3 }, /* (135) cmd ::= ALTER STABLE alter_table_clause */ - { 360, -2 }, /* (136) alter_table_clause ::= full_table_name alter_table_options */ - { 360, -5 }, /* (137) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - { 360, -4 }, /* (138) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - { 360, -5 }, /* (139) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - { 360, -5 }, /* (140) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - { 360, -5 }, /* (141) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - { 360, -4 }, /* (142) alter_table_clause ::= full_table_name DROP TAG column_name */ - { 360, -5 }, /* (143) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - { 360, -5 }, /* (144) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - { 360, -6 }, /* (145) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - { 357, -1 }, /* (146) multi_create_clause ::= create_subtable_clause */ - { 357, -2 }, /* (147) multi_create_clause ::= multi_create_clause create_subtable_clause */ - { 365, -10 }, /* (148) 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 */ - { 359, -1 }, /* (149) multi_drop_clause ::= drop_table_clause */ - { 359, -3 }, /* (150) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ - { 368, -2 }, /* (151) drop_table_clause ::= exists_opt full_table_name */ - { 366, 0 }, /* (152) specific_cols_opt ::= */ - { 366, -3 }, /* (153) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - { 353, -1 }, /* (154) full_table_name ::= table_name */ - { 353, -3 }, /* (155) full_table_name ::= db_name NK_DOT table_name */ - { 354, -1 }, /* (156) column_def_list ::= column_def */ - { 354, -3 }, /* (157) column_def_list ::= column_def_list NK_COMMA column_def */ - { 371, -2 }, /* (158) column_def ::= column_name type_name */ - { 371, -4 }, /* (159) column_def ::= column_name type_name COMMENT NK_STRING */ - { 363, -1 }, /* (160) type_name ::= BOOL */ - { 363, -1 }, /* (161) type_name ::= TINYINT */ - { 363, -1 }, /* (162) type_name ::= SMALLINT */ - { 363, -1 }, /* (163) type_name ::= INT */ - { 363, -1 }, /* (164) type_name ::= INTEGER */ - { 363, -1 }, /* (165) type_name ::= BIGINT */ - { 363, -1 }, /* (166) type_name ::= FLOAT */ - { 363, -1 }, /* (167) type_name ::= DOUBLE */ - { 363, -4 }, /* (168) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - { 363, -1 }, /* (169) type_name ::= TIMESTAMP */ - { 363, -4 }, /* (170) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - { 363, -2 }, /* (171) type_name ::= TINYINT UNSIGNED */ - { 363, -2 }, /* (172) type_name ::= SMALLINT UNSIGNED */ - { 363, -2 }, /* (173) type_name ::= INT UNSIGNED */ - { 363, -2 }, /* (174) type_name ::= BIGINT UNSIGNED */ - { 363, -1 }, /* (175) type_name ::= JSON */ - { 363, -4 }, /* (176) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - { 363, -1 }, /* (177) type_name ::= MEDIUMBLOB */ - { 363, -1 }, /* (178) type_name ::= BLOB */ - { 363, -4 }, /* (179) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - { 363, -1 }, /* (180) type_name ::= DECIMAL */ - { 363, -4 }, /* (181) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - { 363, -6 }, /* (182) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - { 355, 0 }, /* (183) tags_def_opt ::= */ - { 355, -1 }, /* (184) tags_def_opt ::= tags_def */ - { 358, -4 }, /* (185) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - { 356, 0 }, /* (186) table_options ::= */ - { 356, -3 }, /* (187) table_options ::= table_options COMMENT NK_STRING */ - { 356, -3 }, /* (188) table_options ::= table_options MAX_DELAY duration_list */ - { 356, -3 }, /* (189) table_options ::= table_options WATERMARK duration_list */ - { 356, -5 }, /* (190) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - { 356, -3 }, /* (191) table_options ::= table_options TTL NK_INTEGER */ - { 356, -5 }, /* (192) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - { 356, -3 }, /* (193) table_options ::= table_options DELETE_MARK duration_list */ - { 361, -1 }, /* (194) alter_table_options ::= alter_table_option */ - { 361, -2 }, /* (195) alter_table_options ::= alter_table_options alter_table_option */ - { 374, -2 }, /* (196) alter_table_option ::= COMMENT NK_STRING */ - { 374, -2 }, /* (197) alter_table_option ::= TTL NK_INTEGER */ - { 372, -1 }, /* (198) duration_list ::= duration_literal */ - { 372, -3 }, /* (199) duration_list ::= duration_list NK_COMMA duration_literal */ - { 373, -1 }, /* (200) rollup_func_list ::= rollup_func_name */ - { 373, -3 }, /* (201) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - { 376, -1 }, /* (202) rollup_func_name ::= function_name */ - { 376, -1 }, /* (203) rollup_func_name ::= FIRST */ - { 376, -1 }, /* (204) rollup_func_name ::= LAST */ - { 369, -1 }, /* (205) col_name_list ::= col_name */ - { 369, -3 }, /* (206) col_name_list ::= col_name_list NK_COMMA col_name */ - { 378, -1 }, /* (207) col_name ::= column_name */ - { 328, -2 }, /* (208) cmd ::= SHOW DNODES */ - { 328, -2 }, /* (209) cmd ::= SHOW USERS */ - { 328, -3 }, /* (210) cmd ::= SHOW USER PRIVILEGES */ - { 328, -2 }, /* (211) cmd ::= SHOW DATABASES */ - { 328, -4 }, /* (212) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ - { 328, -4 }, /* (213) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - { 328, -3 }, /* (214) cmd ::= SHOW db_name_cond_opt VGROUPS */ - { 328, -2 }, /* (215) cmd ::= SHOW MNODES */ - { 328, -2 }, /* (216) cmd ::= SHOW QNODES */ - { 328, -2 }, /* (217) cmd ::= SHOW FUNCTIONS */ - { 328, -5 }, /* (218) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - { 328, -2 }, /* (219) cmd ::= SHOW STREAMS */ - { 328, -2 }, /* (220) cmd ::= SHOW ACCOUNTS */ - { 328, -2 }, /* (221) cmd ::= SHOW APPS */ - { 328, -2 }, /* (222) cmd ::= SHOW CONNECTIONS */ - { 328, -2 }, /* (223) cmd ::= SHOW LICENCES */ - { 328, -2 }, /* (224) cmd ::= SHOW GRANTS */ - { 328, -4 }, /* (225) cmd ::= SHOW CREATE DATABASE db_name */ - { 328, -4 }, /* (226) cmd ::= SHOW CREATE TABLE full_table_name */ - { 328, -4 }, /* (227) cmd ::= SHOW CREATE STABLE full_table_name */ - { 328, -2 }, /* (228) cmd ::= SHOW QUERIES */ - { 328, -2 }, /* (229) cmd ::= SHOW SCORES */ - { 328, -2 }, /* (230) cmd ::= SHOW TOPICS */ - { 328, -2 }, /* (231) cmd ::= SHOW VARIABLES */ - { 328, -3 }, /* (232) cmd ::= SHOW CLUSTER VARIABLES */ - { 328, -3 }, /* (233) cmd ::= SHOW LOCAL VARIABLES */ - { 328, -5 }, /* (234) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - { 328, -2 }, /* (235) cmd ::= SHOW BNODES */ - { 328, -2 }, /* (236) cmd ::= SHOW SNODES */ - { 328, -2 }, /* (237) cmd ::= SHOW CLUSTER */ - { 328, -2 }, /* (238) cmd ::= SHOW TRANSACTIONS */ - { 328, -4 }, /* (239) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - { 328, -2 }, /* (240) cmd ::= SHOW CONSUMERS */ - { 328, -2 }, /* (241) cmd ::= SHOW SUBSCRIPTIONS */ - { 328, -5 }, /* (242) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - { 328, -7 }, /* (243) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - { 328, -3 }, /* (244) cmd ::= SHOW VNODES NK_INTEGER */ - { 328, -3 }, /* (245) cmd ::= SHOW VNODES NK_STRING */ - { 328, -3 }, /* (246) cmd ::= SHOW db_name_cond_opt ALIVE */ - { 328, -3 }, /* (247) cmd ::= SHOW CLUSTER ALIVE */ - { 379, 0 }, /* (248) db_name_cond_opt ::= */ - { 379, -2 }, /* (249) db_name_cond_opt ::= db_name NK_DOT */ - { 380, 0 }, /* (250) like_pattern_opt ::= */ - { 380, -2 }, /* (251) like_pattern_opt ::= LIKE NK_STRING */ - { 381, -1 }, /* (252) table_name_cond ::= table_name */ - { 382, 0 }, /* (253) from_db_opt ::= */ - { 382, -2 }, /* (254) from_db_opt ::= FROM db_name */ - { 383, 0 }, /* (255) tag_list_opt ::= */ - { 383, -1 }, /* (256) tag_list_opt ::= tag_item */ - { 383, -3 }, /* (257) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - { 384, -1 }, /* (258) tag_item ::= TBNAME */ - { 384, -1 }, /* (259) tag_item ::= QTAGS */ - { 384, -1 }, /* (260) tag_item ::= column_name */ - { 384, -2 }, /* (261) tag_item ::= column_name column_alias */ - { 384, -3 }, /* (262) tag_item ::= column_name AS column_alias */ - { 328, -8 }, /* (263) cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ - { 328, -9 }, /* (264) cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ - { 328, -4 }, /* (265) cmd ::= DROP INDEX exists_opt full_index_name */ - { 386, -1 }, /* (266) full_index_name ::= index_name */ - { 386, -3 }, /* (267) full_index_name ::= db_name NK_DOT index_name */ - { 387, -10 }, /* (268) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - { 387, -12 }, /* (269) 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 */ - { 389, -1 }, /* (270) func_list ::= func */ - { 389, -3 }, /* (271) func_list ::= func_list NK_COMMA func */ - { 392, -4 }, /* (272) func ::= sma_func_name NK_LP expression_list NK_RP */ - { 393, -1 }, /* (273) sma_func_name ::= function_name */ - { 393, -1 }, /* (274) sma_func_name ::= COUNT */ - { 393, -1 }, /* (275) sma_func_name ::= FIRST */ - { 393, -1 }, /* (276) sma_func_name ::= LAST */ - { 393, -1 }, /* (277) sma_func_name ::= LAST_ROW */ - { 391, 0 }, /* (278) sma_stream_opt ::= */ - { 391, -3 }, /* (279) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - { 391, -3 }, /* (280) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - { 391, -3 }, /* (281) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - { 328, -6 }, /* (282) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - { 328, -7 }, /* (283) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ - { 328, -9 }, /* (284) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ - { 328, -7 }, /* (285) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ - { 328, -9 }, /* (286) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ - { 328, -4 }, /* (287) cmd ::= DROP TOPIC exists_opt topic_name */ - { 328, -7 }, /* (288) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - { 328, -2 }, /* (289) cmd ::= DESC full_table_name */ - { 328, -2 }, /* (290) cmd ::= DESCRIBE full_table_name */ - { 328, -3 }, /* (291) cmd ::= RESET QUERY CACHE */ - { 328, -4 }, /* (292) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - { 328, -4 }, /* (293) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - { 396, 0 }, /* (294) analyze_opt ::= */ - { 396, -1 }, /* (295) analyze_opt ::= ANALYZE */ - { 397, 0 }, /* (296) explain_options ::= */ - { 397, -3 }, /* (297) explain_options ::= explain_options VERBOSE NK_BOOL */ - { 397, -3 }, /* (298) explain_options ::= explain_options RATIO NK_FLOAT */ - { 328, -10 }, /* (299) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ - { 328, -4 }, /* (300) cmd ::= DROP FUNCTION exists_opt function_name */ - { 399, 0 }, /* (301) agg_func_opt ::= */ - { 399, -1 }, /* (302) agg_func_opt ::= AGGREGATE */ - { 400, 0 }, /* (303) bufsize_opt ::= */ - { 400, -2 }, /* (304) bufsize_opt ::= BUFSIZE NK_INTEGER */ - { 328, -12 }, /* (305) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ - { 328, -4 }, /* (306) cmd ::= DROP STREAM exists_opt stream_name */ - { 403, 0 }, /* (307) col_list_opt ::= */ - { 403, -3 }, /* (308) col_list_opt ::= NK_LP col_name_list NK_RP */ - { 404, 0 }, /* (309) tag_def_or_ref_opt ::= */ - { 404, -1 }, /* (310) tag_def_or_ref_opt ::= tags_def */ - { 404, -4 }, /* (311) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ - { 402, 0 }, /* (312) stream_options ::= */ - { 402, -3 }, /* (313) stream_options ::= stream_options TRIGGER AT_ONCE */ - { 402, -3 }, /* (314) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - { 402, -4 }, /* (315) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - { 402, -3 }, /* (316) stream_options ::= stream_options WATERMARK duration_literal */ - { 402, -4 }, /* (317) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - { 402, -3 }, /* (318) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - { 402, -3 }, /* (319) stream_options ::= stream_options DELETE_MARK duration_literal */ - { 402, -4 }, /* (320) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - { 405, 0 }, /* (321) subtable_opt ::= */ - { 405, -4 }, /* (322) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - { 328, -3 }, /* (323) cmd ::= KILL CONNECTION NK_INTEGER */ - { 328, -3 }, /* (324) cmd ::= KILL QUERY NK_STRING */ - { 328, -3 }, /* (325) cmd ::= KILL TRANSACTION NK_INTEGER */ - { 328, -2 }, /* (326) cmd ::= BALANCE VGROUP */ - { 328, -4 }, /* (327) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - { 328, -4 }, /* (328) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - { 328, -3 }, /* (329) cmd ::= SPLIT VGROUP NK_INTEGER */ - { 407, -2 }, /* (330) dnode_list ::= DNODE NK_INTEGER */ - { 407, -3 }, /* (331) dnode_list ::= dnode_list DNODE NK_INTEGER */ - { 328, -4 }, /* (332) cmd ::= DELETE FROM full_table_name where_clause_opt */ - { 328, -1 }, /* (333) cmd ::= query_or_subquery */ - { 328, -1 }, /* (334) cmd ::= insert_query */ - { 398, -7 }, /* (335) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - { 398, -4 }, /* (336) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - { 331, -1 }, /* (337) literal ::= NK_INTEGER */ - { 331, -1 }, /* (338) literal ::= NK_FLOAT */ - { 331, -1 }, /* (339) literal ::= NK_STRING */ - { 331, -1 }, /* (340) literal ::= NK_BOOL */ - { 331, -2 }, /* (341) literal ::= TIMESTAMP NK_STRING */ - { 331, -1 }, /* (342) literal ::= duration_literal */ - { 331, -1 }, /* (343) literal ::= NULL */ - { 331, -1 }, /* (344) literal ::= NK_QUESTION */ - { 375, -1 }, /* (345) duration_literal ::= NK_VARIABLE */ - { 409, -1 }, /* (346) signed ::= NK_INTEGER */ - { 409, -2 }, /* (347) signed ::= NK_PLUS NK_INTEGER */ - { 409, -2 }, /* (348) signed ::= NK_MINUS NK_INTEGER */ - { 409, -1 }, /* (349) signed ::= NK_FLOAT */ - { 409, -2 }, /* (350) signed ::= NK_PLUS NK_FLOAT */ - { 409, -2 }, /* (351) signed ::= NK_MINUS NK_FLOAT */ - { 364, -1 }, /* (352) signed_literal ::= signed */ - { 364, -1 }, /* (353) signed_literal ::= NK_STRING */ - { 364, -1 }, /* (354) signed_literal ::= NK_BOOL */ - { 364, -2 }, /* (355) signed_literal ::= TIMESTAMP NK_STRING */ - { 364, -1 }, /* (356) signed_literal ::= duration_literal */ - { 364, -1 }, /* (357) signed_literal ::= NULL */ - { 364, -1 }, /* (358) signed_literal ::= literal_func */ - { 364, -1 }, /* (359) signed_literal ::= NK_QUESTION */ - { 411, -1 }, /* (360) literal_list ::= signed_literal */ - { 411, -3 }, /* (361) literal_list ::= literal_list NK_COMMA signed_literal */ - { 339, -1 }, /* (362) db_name ::= NK_ID */ - { 370, -1 }, /* (363) table_name ::= NK_ID */ - { 362, -1 }, /* (364) column_name ::= NK_ID */ - { 377, -1 }, /* (365) function_name ::= NK_ID */ - { 412, -1 }, /* (366) table_alias ::= NK_ID */ - { 385, -1 }, /* (367) column_alias ::= NK_ID */ - { 333, -1 }, /* (368) user_name ::= NK_ID */ - { 340, -1 }, /* (369) topic_name ::= NK_ID */ - { 401, -1 }, /* (370) stream_name ::= NK_ID */ - { 395, -1 }, /* (371) cgroup_name ::= NK_ID */ - { 388, -1 }, /* (372) index_name ::= NK_ID */ - { 413, -1 }, /* (373) expr_or_subquery ::= expression */ - { 406, -1 }, /* (374) expression ::= literal */ - { 406, -1 }, /* (375) expression ::= pseudo_column */ - { 406, -1 }, /* (376) expression ::= column_reference */ - { 406, -1 }, /* (377) expression ::= function_expression */ - { 406, -1 }, /* (378) expression ::= case_when_expression */ - { 406, -3 }, /* (379) expression ::= NK_LP expression NK_RP */ - { 406, -2 }, /* (380) expression ::= NK_PLUS expr_or_subquery */ - { 406, -2 }, /* (381) expression ::= NK_MINUS expr_or_subquery */ - { 406, -3 }, /* (382) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - { 406, -3 }, /* (383) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - { 406, -3 }, /* (384) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - { 406, -3 }, /* (385) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - { 406, -3 }, /* (386) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - { 406, -3 }, /* (387) expression ::= column_reference NK_ARROW NK_STRING */ - { 406, -3 }, /* (388) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - { 406, -3 }, /* (389) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - { 367, -1 }, /* (390) expression_list ::= expr_or_subquery */ - { 367, -3 }, /* (391) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - { 415, -1 }, /* (392) column_reference ::= column_name */ - { 415, -3 }, /* (393) column_reference ::= table_name NK_DOT column_name */ - { 414, -1 }, /* (394) pseudo_column ::= ROWTS */ - { 414, -1 }, /* (395) pseudo_column ::= TBNAME */ - { 414, -3 }, /* (396) pseudo_column ::= table_name NK_DOT TBNAME */ - { 414, -1 }, /* (397) pseudo_column ::= QSTART */ - { 414, -1 }, /* (398) pseudo_column ::= QEND */ - { 414, -1 }, /* (399) pseudo_column ::= QDURATION */ - { 414, -1 }, /* (400) pseudo_column ::= WSTART */ - { 414, -1 }, /* (401) pseudo_column ::= WEND */ - { 414, -1 }, /* (402) pseudo_column ::= WDURATION */ - { 414, -1 }, /* (403) pseudo_column ::= IROWTS */ - { 414, -1 }, /* (404) pseudo_column ::= ISFILLED */ - { 414, -1 }, /* (405) pseudo_column ::= QTAGS */ - { 416, -4 }, /* (406) function_expression ::= function_name NK_LP expression_list NK_RP */ - { 416, -4 }, /* (407) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - { 416, -6 }, /* (408) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - { 416, -1 }, /* (409) function_expression ::= literal_func */ - { 410, -3 }, /* (410) literal_func ::= noarg_func NK_LP NK_RP */ - { 410, -1 }, /* (411) literal_func ::= NOW */ - { 420, -1 }, /* (412) noarg_func ::= NOW */ - { 420, -1 }, /* (413) noarg_func ::= TODAY */ - { 420, -1 }, /* (414) noarg_func ::= TIMEZONE */ - { 420, -1 }, /* (415) noarg_func ::= DATABASE */ - { 420, -1 }, /* (416) noarg_func ::= CLIENT_VERSION */ - { 420, -1 }, /* (417) noarg_func ::= SERVER_VERSION */ - { 420, -1 }, /* (418) noarg_func ::= SERVER_STATUS */ - { 420, -1 }, /* (419) noarg_func ::= CURRENT_USER */ - { 420, -1 }, /* (420) noarg_func ::= USER */ - { 418, -1 }, /* (421) star_func ::= COUNT */ - { 418, -1 }, /* (422) star_func ::= FIRST */ - { 418, -1 }, /* (423) star_func ::= LAST */ - { 418, -1 }, /* (424) star_func ::= LAST_ROW */ - { 419, -1 }, /* (425) star_func_para_list ::= NK_STAR */ - { 419, -1 }, /* (426) star_func_para_list ::= other_para_list */ - { 421, -1 }, /* (427) other_para_list ::= star_func_para */ - { 421, -3 }, /* (428) other_para_list ::= other_para_list NK_COMMA star_func_para */ - { 422, -1 }, /* (429) star_func_para ::= expr_or_subquery */ - { 422, -3 }, /* (430) star_func_para ::= table_name NK_DOT NK_STAR */ - { 417, -4 }, /* (431) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - { 417, -5 }, /* (432) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - { 423, -1 }, /* (433) when_then_list ::= when_then_expr */ - { 423, -2 }, /* (434) when_then_list ::= when_then_list when_then_expr */ - { 426, -4 }, /* (435) when_then_expr ::= WHEN common_expression THEN common_expression */ - { 424, 0 }, /* (436) case_when_else_opt ::= */ - { 424, -2 }, /* (437) case_when_else_opt ::= ELSE common_expression */ - { 427, -3 }, /* (438) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - { 427, -5 }, /* (439) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - { 427, -6 }, /* (440) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - { 427, -3 }, /* (441) predicate ::= expr_or_subquery IS NULL */ - { 427, -4 }, /* (442) predicate ::= expr_or_subquery IS NOT NULL */ - { 427, -3 }, /* (443) predicate ::= expr_or_subquery in_op in_predicate_value */ - { 428, -1 }, /* (444) compare_op ::= NK_LT */ - { 428, -1 }, /* (445) compare_op ::= NK_GT */ - { 428, -1 }, /* (446) compare_op ::= NK_LE */ - { 428, -1 }, /* (447) compare_op ::= NK_GE */ - { 428, -1 }, /* (448) compare_op ::= NK_NE */ - { 428, -1 }, /* (449) compare_op ::= NK_EQ */ - { 428, -1 }, /* (450) compare_op ::= LIKE */ - { 428, -2 }, /* (451) compare_op ::= NOT LIKE */ - { 428, -1 }, /* (452) compare_op ::= MATCH */ - { 428, -1 }, /* (453) compare_op ::= NMATCH */ - { 428, -1 }, /* (454) compare_op ::= CONTAINS */ - { 429, -1 }, /* (455) in_op ::= IN */ - { 429, -2 }, /* (456) in_op ::= NOT IN */ - { 430, -3 }, /* (457) in_predicate_value ::= NK_LP literal_list NK_RP */ - { 431, -1 }, /* (458) boolean_value_expression ::= boolean_primary */ - { 431, -2 }, /* (459) boolean_value_expression ::= NOT boolean_primary */ - { 431, -3 }, /* (460) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - { 431, -3 }, /* (461) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - { 432, -1 }, /* (462) boolean_primary ::= predicate */ - { 432, -3 }, /* (463) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - { 425, -1 }, /* (464) common_expression ::= expr_or_subquery */ - { 425, -1 }, /* (465) common_expression ::= boolean_value_expression */ - { 433, 0 }, /* (466) from_clause_opt ::= */ - { 433, -2 }, /* (467) from_clause_opt ::= FROM table_reference_list */ - { 434, -1 }, /* (468) table_reference_list ::= table_reference */ - { 434, -3 }, /* (469) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - { 435, -1 }, /* (470) table_reference ::= table_primary */ - { 435, -1 }, /* (471) table_reference ::= joined_table */ - { 436, -2 }, /* (472) table_primary ::= table_name alias_opt */ - { 436, -4 }, /* (473) table_primary ::= db_name NK_DOT table_name alias_opt */ - { 436, -2 }, /* (474) table_primary ::= subquery alias_opt */ - { 436, -1 }, /* (475) table_primary ::= parenthesized_joined_table */ - { 438, 0 }, /* (476) alias_opt ::= */ - { 438, -1 }, /* (477) alias_opt ::= table_alias */ - { 438, -2 }, /* (478) alias_opt ::= AS table_alias */ - { 440, -3 }, /* (479) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - { 440, -3 }, /* (480) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - { 437, -6 }, /* (481) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - { 441, 0 }, /* (482) join_type ::= */ - { 441, -1 }, /* (483) join_type ::= INNER */ - { 443, -12 }, /* (484) 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, 0 }, /* (485) set_quantifier_opt ::= */ - { 444, -1 }, /* (486) set_quantifier_opt ::= DISTINCT */ - { 444, -1 }, /* (487) set_quantifier_opt ::= ALL */ - { 445, -1 }, /* (488) select_list ::= select_item */ - { 445, -3 }, /* (489) select_list ::= select_list NK_COMMA select_item */ - { 453, -1 }, /* (490) select_item ::= NK_STAR */ - { 453, -1 }, /* (491) select_item ::= common_expression */ - { 453, -2 }, /* (492) select_item ::= common_expression column_alias */ - { 453, -3 }, /* (493) select_item ::= common_expression AS column_alias */ - { 453, -3 }, /* (494) select_item ::= table_name NK_DOT NK_STAR */ - { 408, 0 }, /* (495) where_clause_opt ::= */ - { 408, -2 }, /* (496) where_clause_opt ::= WHERE search_condition */ - { 446, 0 }, /* (497) partition_by_clause_opt ::= */ - { 446, -3 }, /* (498) partition_by_clause_opt ::= PARTITION BY partition_list */ - { 454, -1 }, /* (499) partition_list ::= partition_item */ - { 454, -3 }, /* (500) partition_list ::= partition_list NK_COMMA partition_item */ - { 455, -1 }, /* (501) partition_item ::= expr_or_subquery */ - { 455, -2 }, /* (502) partition_item ::= expr_or_subquery column_alias */ - { 455, -3 }, /* (503) partition_item ::= expr_or_subquery AS column_alias */ - { 450, 0 }, /* (504) twindow_clause_opt ::= */ - { 450, -6 }, /* (505) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - { 450, -4 }, /* (506) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - { 450, -6 }, /* (507) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - { 450, -8 }, /* (508) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - { 450, -7 }, /* (509) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - { 390, 0 }, /* (510) sliding_opt ::= */ - { 390, -4 }, /* (511) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - { 449, 0 }, /* (512) fill_opt ::= */ - { 449, -4 }, /* (513) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - { 449, -6 }, /* (514) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - { 449, -6 }, /* (515) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */ - { 456, -1 }, /* (516) fill_mode ::= NONE */ - { 456, -1 }, /* (517) fill_mode ::= PREV */ - { 456, -1 }, /* (518) fill_mode ::= NULL */ - { 456, -1 }, /* (519) fill_mode ::= NULL_F */ - { 456, -1 }, /* (520) fill_mode ::= LINEAR */ - { 456, -1 }, /* (521) fill_mode ::= NEXT */ - { 451, 0 }, /* (522) group_by_clause_opt ::= */ - { 451, -3 }, /* (523) group_by_clause_opt ::= GROUP BY group_by_list */ - { 457, -1 }, /* (524) group_by_list ::= expr_or_subquery */ - { 457, -3 }, /* (525) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - { 452, 0 }, /* (526) having_clause_opt ::= */ - { 452, -2 }, /* (527) having_clause_opt ::= HAVING search_condition */ - { 447, 0 }, /* (528) range_opt ::= */ - { 447, -6 }, /* (529) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - { 448, 0 }, /* (530) every_opt ::= */ - { 448, -4 }, /* (531) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - { 458, -4 }, /* (532) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - { 459, -1 }, /* (533) query_simple ::= query_specification */ - { 459, -1 }, /* (534) query_simple ::= union_query_expression */ - { 463, -4 }, /* (535) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - { 463, -3 }, /* (536) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - { 464, -1 }, /* (537) query_simple_or_subquery ::= query_simple */ - { 464, -1 }, /* (538) query_simple_or_subquery ::= subquery */ - { 394, -1 }, /* (539) query_or_subquery ::= query_expression */ - { 394, -1 }, /* (540) query_or_subquery ::= subquery */ - { 460, 0 }, /* (541) order_by_clause_opt ::= */ - { 460, -3 }, /* (542) order_by_clause_opt ::= ORDER BY sort_specification_list */ - { 461, 0 }, /* (543) slimit_clause_opt ::= */ - { 461, -2 }, /* (544) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - { 461, -4 }, /* (545) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - { 461, -4 }, /* (546) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 462, 0 }, /* (547) limit_clause_opt ::= */ - { 462, -2 }, /* (548) limit_clause_opt ::= LIMIT NK_INTEGER */ - { 462, -4 }, /* (549) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - { 462, -4 }, /* (550) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 439, -3 }, /* (551) subquery ::= NK_LP query_expression NK_RP */ - { 439, -3 }, /* (552) subquery ::= NK_LP subquery NK_RP */ - { 442, -1 }, /* (553) search_condition ::= common_expression */ - { 465, -1 }, /* (554) sort_specification_list ::= sort_specification */ - { 465, -3 }, /* (555) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - { 466, -3 }, /* (556) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - { 467, 0 }, /* (557) ordering_specification_opt ::= */ - { 467, -1 }, /* (558) ordering_specification_opt ::= ASC */ - { 467, -1 }, /* (559) ordering_specification_opt ::= DESC */ - { 468, 0 }, /* (560) null_ordering_opt ::= */ - { 468, -2 }, /* (561) null_ordering_opt ::= NULLS FIRST */ - { 468, -2 }, /* (562) null_ordering_opt ::= NULLS LAST */ + { 348, 0 }, /* (129) start_opt ::= */ + { 348, -3 }, /* (130) start_opt ::= START WITH NK_INTEGER */ + { 348, -3 }, /* (131) start_opt ::= START WITH NK_STRING */ + { 348, -4 }, /* (132) start_opt ::= START WITH TIMESTAMP NK_STRING */ + { 349, 0 }, /* (133) end_opt ::= */ + { 349, -3 }, /* (134) end_opt ::= END WITH NK_INTEGER */ + { 349, -3 }, /* (135) end_opt ::= END WITH NK_STRING */ + { 349, -4 }, /* (136) end_opt ::= END WITH TIMESTAMP NK_STRING */ + { 328, -9 }, /* (137) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + { 328, -3 }, /* (138) cmd ::= CREATE TABLE multi_create_clause */ + { 328, -9 }, /* (139) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + { 328, -3 }, /* (140) cmd ::= DROP TABLE multi_drop_clause */ + { 328, -4 }, /* (141) cmd ::= DROP STABLE exists_opt full_table_name */ + { 328, -3 }, /* (142) cmd ::= ALTER TABLE alter_table_clause */ + { 328, -3 }, /* (143) cmd ::= ALTER STABLE alter_table_clause */ + { 362, -2 }, /* (144) alter_table_clause ::= full_table_name alter_table_options */ + { 362, -5 }, /* (145) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + { 362, -4 }, /* (146) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + { 362, -5 }, /* (147) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + { 362, -5 }, /* (148) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + { 362, -5 }, /* (149) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + { 362, -4 }, /* (150) alter_table_clause ::= full_table_name DROP TAG column_name */ + { 362, -5 }, /* (151) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + { 362, -5 }, /* (152) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + { 362, -6 }, /* (153) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + { 359, -1 }, /* (154) multi_create_clause ::= create_subtable_clause */ + { 359, -2 }, /* (155) multi_create_clause ::= multi_create_clause create_subtable_clause */ + { 367, -10 }, /* (156) 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 */ + { 361, -1 }, /* (157) multi_drop_clause ::= drop_table_clause */ + { 361, -3 }, /* (158) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ + { 370, -2 }, /* (159) drop_table_clause ::= exists_opt full_table_name */ + { 368, 0 }, /* (160) specific_cols_opt ::= */ + { 368, -3 }, /* (161) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + { 355, -1 }, /* (162) full_table_name ::= table_name */ + { 355, -3 }, /* (163) full_table_name ::= db_name NK_DOT table_name */ + { 356, -1 }, /* (164) column_def_list ::= column_def */ + { 356, -3 }, /* (165) column_def_list ::= column_def_list NK_COMMA column_def */ + { 373, -2 }, /* (166) column_def ::= column_name type_name */ + { 373, -4 }, /* (167) column_def ::= column_name type_name COMMENT NK_STRING */ + { 365, -1 }, /* (168) type_name ::= BOOL */ + { 365, -1 }, /* (169) type_name ::= TINYINT */ + { 365, -1 }, /* (170) type_name ::= SMALLINT */ + { 365, -1 }, /* (171) type_name ::= INT */ + { 365, -1 }, /* (172) type_name ::= INTEGER */ + { 365, -1 }, /* (173) type_name ::= BIGINT */ + { 365, -1 }, /* (174) type_name ::= FLOAT */ + { 365, -1 }, /* (175) type_name ::= DOUBLE */ + { 365, -4 }, /* (176) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + { 365, -1 }, /* (177) type_name ::= TIMESTAMP */ + { 365, -4 }, /* (178) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + { 365, -2 }, /* (179) type_name ::= TINYINT UNSIGNED */ + { 365, -2 }, /* (180) type_name ::= SMALLINT UNSIGNED */ + { 365, -2 }, /* (181) type_name ::= INT UNSIGNED */ + { 365, -2 }, /* (182) type_name ::= BIGINT UNSIGNED */ + { 365, -1 }, /* (183) type_name ::= JSON */ + { 365, -4 }, /* (184) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + { 365, -1 }, /* (185) type_name ::= MEDIUMBLOB */ + { 365, -1 }, /* (186) type_name ::= BLOB */ + { 365, -4 }, /* (187) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + { 365, -1 }, /* (188) type_name ::= DECIMAL */ + { 365, -4 }, /* (189) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + { 365, -6 }, /* (190) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + { 357, 0 }, /* (191) tags_def_opt ::= */ + { 357, -1 }, /* (192) tags_def_opt ::= tags_def */ + { 360, -4 }, /* (193) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + { 358, 0 }, /* (194) table_options ::= */ + { 358, -3 }, /* (195) table_options ::= table_options COMMENT NK_STRING */ + { 358, -3 }, /* (196) table_options ::= table_options MAX_DELAY duration_list */ + { 358, -3 }, /* (197) table_options ::= table_options WATERMARK duration_list */ + { 358, -5 }, /* (198) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + { 358, -3 }, /* (199) table_options ::= table_options TTL NK_INTEGER */ + { 358, -5 }, /* (200) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + { 358, -3 }, /* (201) table_options ::= table_options DELETE_MARK duration_list */ + { 363, -1 }, /* (202) alter_table_options ::= alter_table_option */ + { 363, -2 }, /* (203) alter_table_options ::= alter_table_options alter_table_option */ + { 376, -2 }, /* (204) alter_table_option ::= COMMENT NK_STRING */ + { 376, -2 }, /* (205) alter_table_option ::= TTL NK_INTEGER */ + { 374, -1 }, /* (206) duration_list ::= duration_literal */ + { 374, -3 }, /* (207) duration_list ::= duration_list NK_COMMA duration_literal */ + { 375, -1 }, /* (208) rollup_func_list ::= rollup_func_name */ + { 375, -3 }, /* (209) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + { 378, -1 }, /* (210) rollup_func_name ::= function_name */ + { 378, -1 }, /* (211) rollup_func_name ::= FIRST */ + { 378, -1 }, /* (212) rollup_func_name ::= LAST */ + { 371, -1 }, /* (213) col_name_list ::= col_name */ + { 371, -3 }, /* (214) col_name_list ::= col_name_list NK_COMMA col_name */ + { 380, -1 }, /* (215) col_name ::= column_name */ + { 328, -2 }, /* (216) cmd ::= SHOW DNODES */ + { 328, -2 }, /* (217) cmd ::= SHOW USERS */ + { 328, -3 }, /* (218) cmd ::= SHOW USER PRIVILEGES */ + { 328, -2 }, /* (219) cmd ::= SHOW DATABASES */ + { 328, -4 }, /* (220) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + { 328, -4 }, /* (221) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + { 328, -3 }, /* (222) cmd ::= SHOW db_name_cond_opt VGROUPS */ + { 328, -2 }, /* (223) cmd ::= SHOW MNODES */ + { 328, -2 }, /* (224) cmd ::= SHOW QNODES */ + { 328, -2 }, /* (225) cmd ::= SHOW FUNCTIONS */ + { 328, -5 }, /* (226) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + { 328, -2 }, /* (227) cmd ::= SHOW STREAMS */ + { 328, -2 }, /* (228) cmd ::= SHOW ACCOUNTS */ + { 328, -2 }, /* (229) cmd ::= SHOW APPS */ + { 328, -2 }, /* (230) cmd ::= SHOW CONNECTIONS */ + { 328, -2 }, /* (231) cmd ::= SHOW LICENCES */ + { 328, -2 }, /* (232) cmd ::= SHOW GRANTS */ + { 328, -4 }, /* (233) cmd ::= SHOW CREATE DATABASE db_name */ + { 328, -4 }, /* (234) cmd ::= SHOW CREATE TABLE full_table_name */ + { 328, -4 }, /* (235) cmd ::= SHOW CREATE STABLE full_table_name */ + { 328, -2 }, /* (236) cmd ::= SHOW QUERIES */ + { 328, -2 }, /* (237) cmd ::= SHOW SCORES */ + { 328, -2 }, /* (238) cmd ::= SHOW TOPICS */ + { 328, -2 }, /* (239) cmd ::= SHOW VARIABLES */ + { 328, -3 }, /* (240) cmd ::= SHOW CLUSTER VARIABLES */ + { 328, -3 }, /* (241) cmd ::= SHOW LOCAL VARIABLES */ + { 328, -5 }, /* (242) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + { 328, -2 }, /* (243) cmd ::= SHOW BNODES */ + { 328, -2 }, /* (244) cmd ::= SHOW SNODES */ + { 328, -2 }, /* (245) cmd ::= SHOW CLUSTER */ + { 328, -2 }, /* (246) cmd ::= SHOW TRANSACTIONS */ + { 328, -4 }, /* (247) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + { 328, -2 }, /* (248) cmd ::= SHOW CONSUMERS */ + { 328, -2 }, /* (249) cmd ::= SHOW SUBSCRIPTIONS */ + { 328, -5 }, /* (250) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + { 328, -7 }, /* (251) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + { 328, -3 }, /* (252) cmd ::= SHOW VNODES NK_INTEGER */ + { 328, -3 }, /* (253) cmd ::= SHOW VNODES NK_STRING */ + { 328, -3 }, /* (254) cmd ::= SHOW db_name_cond_opt ALIVE */ + { 328, -3 }, /* (255) cmd ::= SHOW CLUSTER ALIVE */ + { 381, 0 }, /* (256) db_name_cond_opt ::= */ + { 381, -2 }, /* (257) db_name_cond_opt ::= db_name NK_DOT */ + { 382, 0 }, /* (258) like_pattern_opt ::= */ + { 382, -2 }, /* (259) like_pattern_opt ::= LIKE NK_STRING */ + { 383, -1 }, /* (260) table_name_cond ::= table_name */ + { 384, 0 }, /* (261) from_db_opt ::= */ + { 384, -2 }, /* (262) from_db_opt ::= FROM db_name */ + { 385, 0 }, /* (263) tag_list_opt ::= */ + { 385, -1 }, /* (264) tag_list_opt ::= tag_item */ + { 385, -3 }, /* (265) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + { 386, -1 }, /* (266) tag_item ::= TBNAME */ + { 386, -1 }, /* (267) tag_item ::= QTAGS */ + { 386, -1 }, /* (268) tag_item ::= column_name */ + { 386, -2 }, /* (269) tag_item ::= column_name column_alias */ + { 386, -3 }, /* (270) tag_item ::= column_name AS column_alias */ + { 328, -8 }, /* (271) cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ + { 328, -9 }, /* (272) cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ + { 328, -4 }, /* (273) cmd ::= DROP INDEX exists_opt full_index_name */ + { 388, -1 }, /* (274) full_index_name ::= index_name */ + { 388, -3 }, /* (275) full_index_name ::= db_name NK_DOT index_name */ + { 389, -10 }, /* (276) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + { 389, -12 }, /* (277) 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 */ + { 391, -1 }, /* (278) func_list ::= func */ + { 391, -3 }, /* (279) func_list ::= func_list NK_COMMA func */ + { 394, -4 }, /* (280) func ::= sma_func_name NK_LP expression_list NK_RP */ + { 395, -1 }, /* (281) sma_func_name ::= function_name */ + { 395, -1 }, /* (282) sma_func_name ::= COUNT */ + { 395, -1 }, /* (283) sma_func_name ::= FIRST */ + { 395, -1 }, /* (284) sma_func_name ::= LAST */ + { 395, -1 }, /* (285) sma_func_name ::= LAST_ROW */ + { 393, 0 }, /* (286) sma_stream_opt ::= */ + { 393, -3 }, /* (287) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + { 393, -3 }, /* (288) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + { 393, -3 }, /* (289) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + { 328, -6 }, /* (290) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + { 328, -7 }, /* (291) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ + { 328, -9 }, /* (292) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ + { 328, -7 }, /* (293) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ + { 328, -9 }, /* (294) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ + { 328, -4 }, /* (295) cmd ::= DROP TOPIC exists_opt topic_name */ + { 328, -7 }, /* (296) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + { 328, -2 }, /* (297) cmd ::= DESC full_table_name */ + { 328, -2 }, /* (298) cmd ::= DESCRIBE full_table_name */ + { 328, -3 }, /* (299) cmd ::= RESET QUERY CACHE */ + { 328, -4 }, /* (300) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + { 328, -4 }, /* (301) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + { 398, 0 }, /* (302) analyze_opt ::= */ + { 398, -1 }, /* (303) analyze_opt ::= ANALYZE */ + { 399, 0 }, /* (304) explain_options ::= */ + { 399, -3 }, /* (305) explain_options ::= explain_options VERBOSE NK_BOOL */ + { 399, -3 }, /* (306) explain_options ::= explain_options RATIO NK_FLOAT */ + { 328, -10 }, /* (307) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + { 328, -4 }, /* (308) cmd ::= DROP FUNCTION exists_opt function_name */ + { 401, 0 }, /* (309) agg_func_opt ::= */ + { 401, -1 }, /* (310) agg_func_opt ::= AGGREGATE */ + { 402, 0 }, /* (311) bufsize_opt ::= */ + { 402, -2 }, /* (312) bufsize_opt ::= BUFSIZE NK_INTEGER */ + { 328, -12 }, /* (313) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ + { 328, -4 }, /* (314) cmd ::= DROP STREAM exists_opt stream_name */ + { 405, 0 }, /* (315) col_list_opt ::= */ + { 405, -3 }, /* (316) col_list_opt ::= NK_LP col_name_list NK_RP */ + { 406, 0 }, /* (317) tag_def_or_ref_opt ::= */ + { 406, -1 }, /* (318) tag_def_or_ref_opt ::= tags_def */ + { 406, -4 }, /* (319) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ + { 404, 0 }, /* (320) stream_options ::= */ + { 404, -3 }, /* (321) stream_options ::= stream_options TRIGGER AT_ONCE */ + { 404, -3 }, /* (322) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + { 404, -4 }, /* (323) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + { 404, -3 }, /* (324) stream_options ::= stream_options WATERMARK duration_literal */ + { 404, -4 }, /* (325) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + { 404, -3 }, /* (326) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + { 404, -3 }, /* (327) stream_options ::= stream_options DELETE_MARK duration_literal */ + { 404, -4 }, /* (328) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + { 407, 0 }, /* (329) subtable_opt ::= */ + { 407, -4 }, /* (330) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + { 328, -3 }, /* (331) cmd ::= KILL CONNECTION NK_INTEGER */ + { 328, -3 }, /* (332) cmd ::= KILL QUERY NK_STRING */ + { 328, -3 }, /* (333) cmd ::= KILL TRANSACTION NK_INTEGER */ + { 328, -2 }, /* (334) cmd ::= BALANCE VGROUP */ + { 328, -4 }, /* (335) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + { 328, -4 }, /* (336) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + { 328, -3 }, /* (337) cmd ::= SPLIT VGROUP NK_INTEGER */ + { 409, -2 }, /* (338) dnode_list ::= DNODE NK_INTEGER */ + { 409, -3 }, /* (339) dnode_list ::= dnode_list DNODE NK_INTEGER */ + { 328, -4 }, /* (340) cmd ::= DELETE FROM full_table_name where_clause_opt */ + { 328, -1 }, /* (341) cmd ::= query_or_subquery */ + { 328, -1 }, /* (342) cmd ::= insert_query */ + { 400, -7 }, /* (343) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + { 400, -4 }, /* (344) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + { 331, -1 }, /* (345) literal ::= NK_INTEGER */ + { 331, -1 }, /* (346) literal ::= NK_FLOAT */ + { 331, -1 }, /* (347) literal ::= NK_STRING */ + { 331, -1 }, /* (348) literal ::= NK_BOOL */ + { 331, -2 }, /* (349) literal ::= TIMESTAMP NK_STRING */ + { 331, -1 }, /* (350) literal ::= duration_literal */ + { 331, -1 }, /* (351) literal ::= NULL */ + { 331, -1 }, /* (352) literal ::= NK_QUESTION */ + { 377, -1 }, /* (353) duration_literal ::= NK_VARIABLE */ + { 411, -1 }, /* (354) signed ::= NK_INTEGER */ + { 411, -2 }, /* (355) signed ::= NK_PLUS NK_INTEGER */ + { 411, -2 }, /* (356) signed ::= NK_MINUS NK_INTEGER */ + { 411, -1 }, /* (357) signed ::= NK_FLOAT */ + { 411, -2 }, /* (358) signed ::= NK_PLUS NK_FLOAT */ + { 411, -2 }, /* (359) signed ::= NK_MINUS NK_FLOAT */ + { 366, -1 }, /* (360) signed_literal ::= signed */ + { 366, -1 }, /* (361) signed_literal ::= NK_STRING */ + { 366, -1 }, /* (362) signed_literal ::= NK_BOOL */ + { 366, -2 }, /* (363) signed_literal ::= TIMESTAMP NK_STRING */ + { 366, -1 }, /* (364) signed_literal ::= duration_literal */ + { 366, -1 }, /* (365) signed_literal ::= NULL */ + { 366, -1 }, /* (366) signed_literal ::= literal_func */ + { 366, -1 }, /* (367) signed_literal ::= NK_QUESTION */ + { 413, -1 }, /* (368) literal_list ::= signed_literal */ + { 413, -3 }, /* (369) literal_list ::= literal_list NK_COMMA signed_literal */ + { 339, -1 }, /* (370) db_name ::= NK_ID */ + { 372, -1 }, /* (371) table_name ::= NK_ID */ + { 364, -1 }, /* (372) column_name ::= NK_ID */ + { 379, -1 }, /* (373) function_name ::= NK_ID */ + { 414, -1 }, /* (374) table_alias ::= NK_ID */ + { 387, -1 }, /* (375) column_alias ::= NK_ID */ + { 333, -1 }, /* (376) user_name ::= NK_ID */ + { 340, -1 }, /* (377) topic_name ::= NK_ID */ + { 403, -1 }, /* (378) stream_name ::= NK_ID */ + { 397, -1 }, /* (379) cgroup_name ::= NK_ID */ + { 390, -1 }, /* (380) index_name ::= NK_ID */ + { 415, -1 }, /* (381) expr_or_subquery ::= expression */ + { 408, -1 }, /* (382) expression ::= literal */ + { 408, -1 }, /* (383) expression ::= pseudo_column */ + { 408, -1 }, /* (384) expression ::= column_reference */ + { 408, -1 }, /* (385) expression ::= function_expression */ + { 408, -1 }, /* (386) expression ::= case_when_expression */ + { 408, -3 }, /* (387) expression ::= NK_LP expression NK_RP */ + { 408, -2 }, /* (388) expression ::= NK_PLUS expr_or_subquery */ + { 408, -2 }, /* (389) expression ::= NK_MINUS expr_or_subquery */ + { 408, -3 }, /* (390) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + { 408, -3 }, /* (391) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + { 408, -3 }, /* (392) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + { 408, -3 }, /* (393) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + { 408, -3 }, /* (394) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + { 408, -3 }, /* (395) expression ::= column_reference NK_ARROW NK_STRING */ + { 408, -3 }, /* (396) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + { 408, -3 }, /* (397) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + { 369, -1 }, /* (398) expression_list ::= expr_or_subquery */ + { 369, -3 }, /* (399) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + { 417, -1 }, /* (400) column_reference ::= column_name */ + { 417, -3 }, /* (401) column_reference ::= table_name NK_DOT column_name */ + { 416, -1 }, /* (402) pseudo_column ::= ROWTS */ + { 416, -1 }, /* (403) pseudo_column ::= TBNAME */ + { 416, -3 }, /* (404) pseudo_column ::= table_name NK_DOT TBNAME */ + { 416, -1 }, /* (405) pseudo_column ::= QSTART */ + { 416, -1 }, /* (406) pseudo_column ::= QEND */ + { 416, -1 }, /* (407) pseudo_column ::= QDURATION */ + { 416, -1 }, /* (408) pseudo_column ::= WSTART */ + { 416, -1 }, /* (409) pseudo_column ::= WEND */ + { 416, -1 }, /* (410) pseudo_column ::= WDURATION */ + { 416, -1 }, /* (411) pseudo_column ::= IROWTS */ + { 416, -1 }, /* (412) pseudo_column ::= ISFILLED */ + { 416, -1 }, /* (413) pseudo_column ::= QTAGS */ + { 418, -4 }, /* (414) function_expression ::= function_name NK_LP expression_list NK_RP */ + { 418, -4 }, /* (415) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + { 418, -6 }, /* (416) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + { 418, -1 }, /* (417) function_expression ::= literal_func */ + { 412, -3 }, /* (418) literal_func ::= noarg_func NK_LP NK_RP */ + { 412, -1 }, /* (419) literal_func ::= NOW */ + { 422, -1 }, /* (420) noarg_func ::= NOW */ + { 422, -1 }, /* (421) noarg_func ::= TODAY */ + { 422, -1 }, /* (422) noarg_func ::= TIMEZONE */ + { 422, -1 }, /* (423) noarg_func ::= DATABASE */ + { 422, -1 }, /* (424) noarg_func ::= CLIENT_VERSION */ + { 422, -1 }, /* (425) noarg_func ::= SERVER_VERSION */ + { 422, -1 }, /* (426) noarg_func ::= SERVER_STATUS */ + { 422, -1 }, /* (427) noarg_func ::= CURRENT_USER */ + { 422, -1 }, /* (428) noarg_func ::= USER */ + { 420, -1 }, /* (429) star_func ::= COUNT */ + { 420, -1 }, /* (430) star_func ::= FIRST */ + { 420, -1 }, /* (431) star_func ::= LAST */ + { 420, -1 }, /* (432) star_func ::= LAST_ROW */ + { 421, -1 }, /* (433) star_func_para_list ::= NK_STAR */ + { 421, -1 }, /* (434) star_func_para_list ::= other_para_list */ + { 423, -1 }, /* (435) other_para_list ::= star_func_para */ + { 423, -3 }, /* (436) other_para_list ::= other_para_list NK_COMMA star_func_para */ + { 424, -1 }, /* (437) star_func_para ::= expr_or_subquery */ + { 424, -3 }, /* (438) star_func_para ::= table_name NK_DOT NK_STAR */ + { 419, -4 }, /* (439) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + { 419, -5 }, /* (440) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + { 425, -1 }, /* (441) when_then_list ::= when_then_expr */ + { 425, -2 }, /* (442) when_then_list ::= when_then_list when_then_expr */ + { 428, -4 }, /* (443) when_then_expr ::= WHEN common_expression THEN common_expression */ + { 426, 0 }, /* (444) case_when_else_opt ::= */ + { 426, -2 }, /* (445) case_when_else_opt ::= ELSE common_expression */ + { 429, -3 }, /* (446) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + { 429, -5 }, /* (447) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + { 429, -6 }, /* (448) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + { 429, -3 }, /* (449) predicate ::= expr_or_subquery IS NULL */ + { 429, -4 }, /* (450) predicate ::= expr_or_subquery IS NOT NULL */ + { 429, -3 }, /* (451) predicate ::= expr_or_subquery in_op in_predicate_value */ + { 430, -1 }, /* (452) compare_op ::= NK_LT */ + { 430, -1 }, /* (453) compare_op ::= NK_GT */ + { 430, -1 }, /* (454) compare_op ::= NK_LE */ + { 430, -1 }, /* (455) compare_op ::= NK_GE */ + { 430, -1 }, /* (456) compare_op ::= NK_NE */ + { 430, -1 }, /* (457) compare_op ::= NK_EQ */ + { 430, -1 }, /* (458) compare_op ::= LIKE */ + { 430, -2 }, /* (459) compare_op ::= NOT LIKE */ + { 430, -1 }, /* (460) compare_op ::= MATCH */ + { 430, -1 }, /* (461) compare_op ::= NMATCH */ + { 430, -1 }, /* (462) compare_op ::= CONTAINS */ + { 431, -1 }, /* (463) in_op ::= IN */ + { 431, -2 }, /* (464) in_op ::= NOT IN */ + { 432, -3 }, /* (465) in_predicate_value ::= NK_LP literal_list NK_RP */ + { 433, -1 }, /* (466) boolean_value_expression ::= boolean_primary */ + { 433, -2 }, /* (467) boolean_value_expression ::= NOT boolean_primary */ + { 433, -3 }, /* (468) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + { 433, -3 }, /* (469) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + { 434, -1 }, /* (470) boolean_primary ::= predicate */ + { 434, -3 }, /* (471) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + { 427, -1 }, /* (472) common_expression ::= expr_or_subquery */ + { 427, -1 }, /* (473) common_expression ::= boolean_value_expression */ + { 435, 0 }, /* (474) from_clause_opt ::= */ + { 435, -2 }, /* (475) from_clause_opt ::= FROM table_reference_list */ + { 436, -1 }, /* (476) table_reference_list ::= table_reference */ + { 436, -3 }, /* (477) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + { 437, -1 }, /* (478) table_reference ::= table_primary */ + { 437, -1 }, /* (479) table_reference ::= joined_table */ + { 438, -2 }, /* (480) table_primary ::= table_name alias_opt */ + { 438, -4 }, /* (481) table_primary ::= db_name NK_DOT table_name alias_opt */ + { 438, -2 }, /* (482) table_primary ::= subquery alias_opt */ + { 438, -1 }, /* (483) table_primary ::= parenthesized_joined_table */ + { 440, 0 }, /* (484) alias_opt ::= */ + { 440, -1 }, /* (485) alias_opt ::= table_alias */ + { 440, -2 }, /* (486) alias_opt ::= AS table_alias */ + { 442, -3 }, /* (487) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + { 442, -3 }, /* (488) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + { 439, -6 }, /* (489) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + { 443, 0 }, /* (490) join_type ::= */ + { 443, -1 }, /* (491) join_type ::= INNER */ + { 445, -12 }, /* (492) 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, 0 }, /* (493) set_quantifier_opt ::= */ + { 446, -1 }, /* (494) set_quantifier_opt ::= DISTINCT */ + { 446, -1 }, /* (495) set_quantifier_opt ::= ALL */ + { 447, -1 }, /* (496) select_list ::= select_item */ + { 447, -3 }, /* (497) select_list ::= select_list NK_COMMA select_item */ + { 455, -1 }, /* (498) select_item ::= NK_STAR */ + { 455, -1 }, /* (499) select_item ::= common_expression */ + { 455, -2 }, /* (500) select_item ::= common_expression column_alias */ + { 455, -3 }, /* (501) select_item ::= common_expression AS column_alias */ + { 455, -3 }, /* (502) select_item ::= table_name NK_DOT NK_STAR */ + { 410, 0 }, /* (503) where_clause_opt ::= */ + { 410, -2 }, /* (504) where_clause_opt ::= WHERE search_condition */ + { 448, 0 }, /* (505) partition_by_clause_opt ::= */ + { 448, -3 }, /* (506) partition_by_clause_opt ::= PARTITION BY partition_list */ + { 456, -1 }, /* (507) partition_list ::= partition_item */ + { 456, -3 }, /* (508) partition_list ::= partition_list NK_COMMA partition_item */ + { 457, -1 }, /* (509) partition_item ::= expr_or_subquery */ + { 457, -2 }, /* (510) partition_item ::= expr_or_subquery column_alias */ + { 457, -3 }, /* (511) partition_item ::= expr_or_subquery AS column_alias */ + { 452, 0 }, /* (512) twindow_clause_opt ::= */ + { 452, -6 }, /* (513) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + { 452, -4 }, /* (514) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + { 452, -6 }, /* (515) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + { 452, -8 }, /* (516) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + { 452, -7 }, /* (517) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + { 392, 0 }, /* (518) sliding_opt ::= */ + { 392, -4 }, /* (519) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + { 451, 0 }, /* (520) fill_opt ::= */ + { 451, -4 }, /* (521) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { 451, -6 }, /* (522) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + { 451, -6 }, /* (523) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */ + { 458, -1 }, /* (524) fill_mode ::= NONE */ + { 458, -1 }, /* (525) fill_mode ::= PREV */ + { 458, -1 }, /* (526) fill_mode ::= NULL */ + { 458, -1 }, /* (527) fill_mode ::= NULL_F */ + { 458, -1 }, /* (528) fill_mode ::= LINEAR */ + { 458, -1 }, /* (529) fill_mode ::= NEXT */ + { 453, 0 }, /* (530) group_by_clause_opt ::= */ + { 453, -3 }, /* (531) group_by_clause_opt ::= GROUP BY group_by_list */ + { 459, -1 }, /* (532) group_by_list ::= expr_or_subquery */ + { 459, -3 }, /* (533) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + { 454, 0 }, /* (534) having_clause_opt ::= */ + { 454, -2 }, /* (535) having_clause_opt ::= HAVING search_condition */ + { 449, 0 }, /* (536) range_opt ::= */ + { 449, -6 }, /* (537) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + { 450, 0 }, /* (538) every_opt ::= */ + { 450, -4 }, /* (539) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + { 460, -4 }, /* (540) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + { 461, -1 }, /* (541) query_simple ::= query_specification */ + { 461, -1 }, /* (542) query_simple ::= union_query_expression */ + { 465, -4 }, /* (543) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + { 465, -3 }, /* (544) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + { 466, -1 }, /* (545) query_simple_or_subquery ::= query_simple */ + { 466, -1 }, /* (546) query_simple_or_subquery ::= subquery */ + { 396, -1 }, /* (547) query_or_subquery ::= query_expression */ + { 396, -1 }, /* (548) query_or_subquery ::= subquery */ + { 462, 0 }, /* (549) order_by_clause_opt ::= */ + { 462, -3 }, /* (550) order_by_clause_opt ::= ORDER BY sort_specification_list */ + { 463, 0 }, /* (551) slimit_clause_opt ::= */ + { 463, -2 }, /* (552) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + { 463, -4 }, /* (553) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + { 463, -4 }, /* (554) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 464, 0 }, /* (555) limit_clause_opt ::= */ + { 464, -2 }, /* (556) limit_clause_opt ::= LIMIT NK_INTEGER */ + { 464, -4 }, /* (557) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + { 464, -4 }, /* (558) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 441, -3 }, /* (559) subquery ::= NK_LP query_expression NK_RP */ + { 441, -3 }, /* (560) subquery ::= NK_LP subquery NK_RP */ + { 444, -1 }, /* (561) search_condition ::= common_expression */ + { 467, -1 }, /* (562) sort_specification_list ::= sort_specification */ + { 467, -3 }, /* (563) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + { 468, -3 }, /* (564) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + { 469, 0 }, /* (565) ordering_specification_opt ::= */ + { 469, -1 }, /* (566) ordering_specification_opt ::= ASC */ + { 469, -1 }, /* (567) ordering_specification_opt ::= DESC */ + { 470, 0 }, /* (568) null_ordering_opt ::= */ + { 470, -2 }, /* (569) null_ordering_opt ::= NULLS FIRST */ + { 470, -2 }, /* (570) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3752,78 +3758,78 @@ static YYACTIONTYPE yy_reduce( yy_destructor(yypParser,331,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ -{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy225, &yymsp[-1].minor.yy0, yymsp[0].minor.yy705); } +{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy881, &yymsp[-1].minor.yy0, yymsp[0].minor.yy857); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy225, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy881, 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.yy225, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy881, 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.yy225, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy881, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } break; case 28: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy225); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy881); } break; case 29: /* sysinfo_opt ::= */ -{ yymsp[1].minor.yy705 = 1; } +{ yymsp[1].minor.yy857 = 1; } break; case 30: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ -{ yymsp[-1].minor.yy705 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy857 = 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.yy641, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225); } +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy303, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy881); } break; case 32: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy641, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225); } +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy303, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy881); } break; case 33: /* privileges ::= ALL */ -{ yymsp[0].minor.yy641 = PRIVILEGE_TYPE_ALL; } +{ yymsp[0].minor.yy303 = PRIVILEGE_TYPE_ALL; } break; case 34: /* privileges ::= priv_type_list */ case 36: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==36); -{ yylhsminor.yy641 = yymsp[0].minor.yy641; } - yymsp[0].minor.yy641 = yylhsminor.yy641; +{ yylhsminor.yy303 = yymsp[0].minor.yy303; } + yymsp[0].minor.yy303 = yylhsminor.yy303; break; case 35: /* privileges ::= SUBSCRIBE */ -{ yymsp[0].minor.yy641 = PRIVILEGE_TYPE_SUBSCRIBE; } +{ yymsp[0].minor.yy303 = PRIVILEGE_TYPE_SUBSCRIBE; } break; case 37: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy641 = yymsp[-2].minor.yy641 | yymsp[0].minor.yy641; } - yymsp[-2].minor.yy641 = yylhsminor.yy641; +{ yylhsminor.yy303 = yymsp[-2].minor.yy303 | yymsp[0].minor.yy303; } + yymsp[-2].minor.yy303 = yylhsminor.yy303; break; case 38: /* priv_type ::= READ */ -{ yymsp[0].minor.yy641 = PRIVILEGE_TYPE_READ; } +{ yymsp[0].minor.yy303 = PRIVILEGE_TYPE_READ; } break; case 39: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy641 = PRIVILEGE_TYPE_WRITE; } +{ yymsp[0].minor.yy303 = PRIVILEGE_TYPE_WRITE; } break; case 40: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy225 = yymsp[-2].minor.yy0; } - yymsp[-2].minor.yy225 = yylhsminor.yy225; +{ yylhsminor.yy881 = yymsp[-2].minor.yy0; } + yymsp[-2].minor.yy881 = yylhsminor.yy881; break; case 41: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy225 = yymsp[-2].minor.yy225; } - yymsp[-2].minor.yy225 = yylhsminor.yy225; +{ yylhsminor.yy881 = yymsp[-2].minor.yy881; } + yymsp[-2].minor.yy881 = yylhsminor.yy881; break; case 42: /* priv_level ::= topic_name */ - case 273: /* sma_func_name ::= function_name */ yytestcase(yyruleno==273); - case 477: /* alias_opt ::= table_alias */ yytestcase(yyruleno==477); -{ yylhsminor.yy225 = yymsp[0].minor.yy225; } - yymsp[0].minor.yy225 = yylhsminor.yy225; + case 281: /* sma_func_name ::= function_name */ yytestcase(yyruleno==281); + case 485: /* alias_opt ::= table_alias */ yytestcase(yyruleno==485); +{ yylhsminor.yy881 = yymsp[0].minor.yy881; } + yymsp[0].minor.yy881 = yylhsminor.yy881; break; case 43: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy225, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy881, NULL); } break; case 44: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy0); } break; case 45: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy103); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy587); } break; case 46: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy225, yymsp[0].minor.yy103); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy881, yymsp[0].minor.yy587); } break; case 47: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -3840,50 +3846,50 @@ static YYACTIONTYPE yy_reduce( case 51: /* dnode_endpoint ::= NK_STRING */ case 52: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==52); case 53: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==53); - case 274: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==274); - case 275: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==275); - case 276: /* sma_func_name ::= LAST */ yytestcase(yyruleno==276); - case 277: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==277); - case 362: /* db_name ::= NK_ID */ yytestcase(yyruleno==362); - case 363: /* table_name ::= NK_ID */ yytestcase(yyruleno==363); - case 364: /* column_name ::= NK_ID */ yytestcase(yyruleno==364); - case 365: /* function_name ::= NK_ID */ yytestcase(yyruleno==365); - case 366: /* table_alias ::= NK_ID */ yytestcase(yyruleno==366); - case 367: /* column_alias ::= NK_ID */ yytestcase(yyruleno==367); - case 368: /* user_name ::= NK_ID */ yytestcase(yyruleno==368); - case 369: /* topic_name ::= NK_ID */ yytestcase(yyruleno==369); - case 370: /* stream_name ::= NK_ID */ yytestcase(yyruleno==370); - case 371: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==371); - case 372: /* index_name ::= NK_ID */ yytestcase(yyruleno==372); - case 412: /* noarg_func ::= NOW */ yytestcase(yyruleno==412); - case 413: /* noarg_func ::= TODAY */ yytestcase(yyruleno==413); - case 414: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==414); - case 415: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==415); - case 416: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==416); - case 417: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==417); - case 418: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==418); - case 419: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==419); - case 420: /* noarg_func ::= USER */ yytestcase(yyruleno==420); - case 421: /* star_func ::= COUNT */ yytestcase(yyruleno==421); - case 422: /* star_func ::= FIRST */ yytestcase(yyruleno==422); - case 423: /* star_func ::= LAST */ yytestcase(yyruleno==423); - case 424: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==424); -{ yylhsminor.yy225 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy225 = yylhsminor.yy225; + case 282: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==282); + case 283: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==283); + case 284: /* sma_func_name ::= LAST */ yytestcase(yyruleno==284); + case 285: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==285); + case 370: /* db_name ::= NK_ID */ yytestcase(yyruleno==370); + case 371: /* table_name ::= NK_ID */ yytestcase(yyruleno==371); + case 372: /* column_name ::= NK_ID */ yytestcase(yyruleno==372); + case 373: /* function_name ::= NK_ID */ yytestcase(yyruleno==373); + case 374: /* table_alias ::= NK_ID */ yytestcase(yyruleno==374); + case 375: /* column_alias ::= NK_ID */ yytestcase(yyruleno==375); + case 376: /* user_name ::= NK_ID */ yytestcase(yyruleno==376); + case 377: /* topic_name ::= NK_ID */ yytestcase(yyruleno==377); + case 378: /* stream_name ::= NK_ID */ yytestcase(yyruleno==378); + case 379: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==379); + case 380: /* index_name ::= NK_ID */ yytestcase(yyruleno==380); + case 420: /* noarg_func ::= NOW */ yytestcase(yyruleno==420); + case 421: /* noarg_func ::= TODAY */ yytestcase(yyruleno==421); + case 422: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==422); + case 423: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==423); + case 424: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==424); + case 425: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==425); + case 426: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==426); + case 427: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==427); + case 428: /* noarg_func ::= USER */ yytestcase(yyruleno==428); + case 429: /* star_func ::= COUNT */ yytestcase(yyruleno==429); + case 430: /* star_func ::= FIRST */ yytestcase(yyruleno==430); + case 431: /* star_func ::= LAST */ yytestcase(yyruleno==431); + case 432: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==432); +{ yylhsminor.yy881 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy881 = yylhsminor.yy881; break; case 54: /* force_opt ::= */ case 74: /* not_exists_opt ::= */ yytestcase(yyruleno==74); case 76: /* exists_opt ::= */ yytestcase(yyruleno==76); - case 294: /* analyze_opt ::= */ yytestcase(yyruleno==294); - case 301: /* agg_func_opt ::= */ yytestcase(yyruleno==301); - case 485: /* set_quantifier_opt ::= */ yytestcase(yyruleno==485); -{ yymsp[1].minor.yy103 = false; } + case 302: /* analyze_opt ::= */ yytestcase(yyruleno==302); + case 309: /* agg_func_opt ::= */ yytestcase(yyruleno==309); + case 493: /* set_quantifier_opt ::= */ yytestcase(yyruleno==493); +{ yymsp[1].minor.yy587 = false; } break; case 55: /* force_opt ::= FORCE */ - case 295: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==295); - case 302: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==302); - case 486: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==486); -{ yymsp[0].minor.yy103 = true; } + case 303: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==303); + case 310: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==310); + case 494: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==494); +{ yymsp[0].minor.yy587 = true; } break; case 56: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -3916,1380 +3922,1394 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; case 66: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy103, &yymsp[-1].minor.yy225, yymsp[0].minor.yy42); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy587, &yymsp[-1].minor.yy881, yymsp[0].minor.yy140); } break; case 67: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy103, &yymsp[0].minor.yy225); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy587, &yymsp[0].minor.yy881); } break; case 68: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy225); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy881); } break; case 69: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy225, yymsp[0].minor.yy42); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy881, yymsp[0].minor.yy140); } break; case 70: /* cmd ::= FLUSH DATABASE db_name */ -{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy225); } +{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy881); } break; case 71: /* cmd ::= TRIM DATABASE db_name speed_opt */ -{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy225, yymsp[0].minor.yy508); } +{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy881, yymsp[0].minor.yy214); } break; - case 72: /* cmd ::= COMPACT DATABASE db_name */ -{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[0].minor.yy225); } + case 72: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ +{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy881, yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; case 73: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy103 = true; } +{ yymsp[-2].minor.yy587 = true; } break; case 75: /* exists_opt ::= IF EXISTS */ -{ yymsp[-1].minor.yy103 = true; } +{ yymsp[-1].minor.yy587 = true; } break; case 77: /* db_options ::= */ -{ yymsp[1].minor.yy42 = createDefaultDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy140 = createDefaultDatabaseOptions(pCxt); } break; case 78: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 79: /* db_options ::= db_options CACHEMODEL NK_STRING */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 80: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 81: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 82: /* db_options ::= db_options DURATION NK_INTEGER */ case 83: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==83); -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 84: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 85: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 86: /* db_options ::= db_options KEEP integer_list */ case 87: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==87); -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_KEEP, yymsp[0].minor.yy110); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_KEEP, yymsp[0].minor.yy220); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 88: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 89: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 90: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 91: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 92: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 93: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 94: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 95: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_RETENTIONS, yymsp[0].minor.yy110); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_RETENTIONS, yymsp[0].minor.yy220); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 96: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 97: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 98: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 99: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 100: /* 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.yy42 = setDatabaseOption(pCxt, yymsp[-3].minor.yy42, DB_OPTION_WAL_RETENTION_PERIOD, &t); + yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-3].minor.yy140, DB_OPTION_WAL_RETENTION_PERIOD, &t); } - yymsp[-3].minor.yy42 = yylhsminor.yy42; + yymsp[-3].minor.yy140 = yylhsminor.yy140; break; case 101: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 102: /* 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.yy42 = setDatabaseOption(pCxt, yymsp[-3].minor.yy42, DB_OPTION_WAL_RETENTION_SIZE, &t); + yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-3].minor.yy140, DB_OPTION_WAL_RETENTION_SIZE, &t); } - yymsp[-3].minor.yy42 = yylhsminor.yy42; + yymsp[-3].minor.yy140 = yylhsminor.yy140; break; case 103: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 104: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 105: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 106: /* db_options ::= db_options TABLE_PREFIX NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 107: /* db_options ::= db_options TABLE_SUFFIX NK_INTEGER */ -{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setDatabaseOption(pCxt, yymsp[-2].minor.yy140, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 108: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy42 = createAlterDatabaseOptions(pCxt); yylhsminor.yy42 = setAlterDatabaseOption(pCxt, yylhsminor.yy42, &yymsp[0].minor.yy459); } - yymsp[0].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = createAlterDatabaseOptions(pCxt); yylhsminor.yy140 = setAlterDatabaseOption(pCxt, yylhsminor.yy140, &yymsp[0].minor.yy809); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; case 109: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy42 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy42, &yymsp[0].minor.yy459); } - yymsp[-1].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy140, &yymsp[0].minor.yy809); } + yymsp[-1].minor.yy140 = yylhsminor.yy140; break; case 110: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy459.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy809.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy809.val = yymsp[0].minor.yy0; } break; case 111: /* alter_db_option ::= CACHEMODEL NK_STRING */ -{ yymsp[-1].minor.yy459.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy809.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy809.val = yymsp[0].minor.yy0; } break; case 112: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -{ yymsp[-1].minor.yy459.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy809.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy809.val = yymsp[0].minor.yy0; } break; case 113: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy459.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy809.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy809.val = yymsp[0].minor.yy0; } break; case 114: /* alter_db_option ::= KEEP integer_list */ case 115: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==115); -{ yymsp[-1].minor.yy459.type = DB_OPTION_KEEP; yymsp[-1].minor.yy459.pList = yymsp[0].minor.yy110; } +{ yymsp[-1].minor.yy809.type = DB_OPTION_KEEP; yymsp[-1].minor.yy809.pList = yymsp[0].minor.yy220; } break; case 116: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy459.type = DB_OPTION_PAGES; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy809.type = DB_OPTION_PAGES; yymsp[-1].minor.yy809.val = yymsp[0].minor.yy0; } break; case 117: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy459.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy809.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy809.val = yymsp[0].minor.yy0; } break; case 118: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -{ yymsp[-1].minor.yy459.type = DB_OPTION_WAL; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy809.type = DB_OPTION_WAL; yymsp[-1].minor.yy809.val = yymsp[0].minor.yy0; } break; case 119: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -{ yymsp[-1].minor.yy459.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy809.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy809.val = yymsp[0].minor.yy0; } break; case 120: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy110 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy110 = yylhsminor.yy110; +{ yylhsminor.yy220 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy220 = yylhsminor.yy220; break; case 121: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 331: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==331); -{ yylhsminor.yy110 = addNodeToList(pCxt, yymsp[-2].minor.yy110, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy110 = yylhsminor.yy110; + case 339: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==339); +{ yylhsminor.yy220 = addNodeToList(pCxt, yymsp[-2].minor.yy220, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy220 = yylhsminor.yy220; break; case 122: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy110 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy110 = yylhsminor.yy110; +{ yylhsminor.yy220 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy220 = yylhsminor.yy220; break; case 123: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy110 = addNodeToList(pCxt, yymsp[-2].minor.yy110, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy110 = yylhsminor.yy110; +{ yylhsminor.yy220 = addNodeToList(pCxt, yymsp[-2].minor.yy220, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy220 = yylhsminor.yy220; break; case 124: /* retention_list ::= retention */ - case 146: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==146); - case 149: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==149); - case 156: /* column_def_list ::= column_def */ yytestcase(yyruleno==156); - case 200: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==200); - case 205: /* col_name_list ::= col_name */ yytestcase(yyruleno==205); - case 256: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==256); - case 270: /* func_list ::= func */ yytestcase(yyruleno==270); - case 360: /* literal_list ::= signed_literal */ yytestcase(yyruleno==360); - case 427: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==427); - case 433: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==433); - case 488: /* select_list ::= select_item */ yytestcase(yyruleno==488); - case 499: /* partition_list ::= partition_item */ yytestcase(yyruleno==499); - case 554: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==554); -{ yylhsminor.yy110 = createNodeList(pCxt, yymsp[0].minor.yy42); } - yymsp[0].minor.yy110 = yylhsminor.yy110; + case 154: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==154); + case 157: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==157); + case 164: /* column_def_list ::= column_def */ yytestcase(yyruleno==164); + case 208: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==208); + case 213: /* col_name_list ::= col_name */ yytestcase(yyruleno==213); + case 264: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==264); + case 278: /* func_list ::= func */ yytestcase(yyruleno==278); + case 368: /* literal_list ::= signed_literal */ yytestcase(yyruleno==368); + case 435: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==435); + case 441: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==441); + case 496: /* select_list ::= select_item */ yytestcase(yyruleno==496); + case 507: /* partition_list ::= partition_item */ yytestcase(yyruleno==507); + case 562: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==562); +{ yylhsminor.yy220 = createNodeList(pCxt, yymsp[0].minor.yy140); } + yymsp[0].minor.yy220 = yylhsminor.yy220; break; case 125: /* retention_list ::= retention_list NK_COMMA retention */ - case 150: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==150); - case 157: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==157); - case 201: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==201); - case 206: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==206); - case 257: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==257); - case 271: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==271); - case 361: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==361); - case 428: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==428); - case 489: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==489); - case 500: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==500); - case 555: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==555); -{ yylhsminor.yy110 = addNodeToList(pCxt, yymsp[-2].minor.yy110, yymsp[0].minor.yy42); } - yymsp[-2].minor.yy110 = yylhsminor.yy110; + case 158: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==158); + case 165: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==165); + case 209: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==209); + case 214: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==214); + case 265: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==265); + case 279: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==279); + case 369: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==369); + case 436: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==436); + case 497: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==497); + case 508: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==508); + case 563: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==563); +{ yylhsminor.yy220 = addNodeToList(pCxt, yymsp[-2].minor.yy220, yymsp[0].minor.yy140); } + yymsp[-2].minor.yy220 = yylhsminor.yy220; break; case 126: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ -{ yylhsminor.yy42 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; +{ yylhsminor.yy140 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 127: /* speed_opt ::= */ - case 303: /* bufsize_opt ::= */ yytestcase(yyruleno==303); -{ yymsp[1].minor.yy508 = 0; } + case 311: /* bufsize_opt ::= */ yytestcase(yyruleno==311); +{ yymsp[1].minor.yy214 = 0; } break; case 128: /* speed_opt ::= MAX_SPEED NK_INTEGER */ - case 304: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==304); -{ yymsp[-1].minor.yy508 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } + case 312: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==312); +{ yymsp[-1].minor.yy214 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } + break; + case 129: /* start_opt ::= */ + case 133: /* end_opt ::= */ yytestcase(yyruleno==133); + case 258: /* like_pattern_opt ::= */ yytestcase(yyruleno==258); + case 329: /* subtable_opt ::= */ yytestcase(yyruleno==329); + case 444: /* case_when_else_opt ::= */ yytestcase(yyruleno==444); + case 474: /* from_clause_opt ::= */ yytestcase(yyruleno==474); + case 503: /* where_clause_opt ::= */ yytestcase(yyruleno==503); + case 512: /* twindow_clause_opt ::= */ yytestcase(yyruleno==512); + case 518: /* sliding_opt ::= */ yytestcase(yyruleno==518); + case 520: /* fill_opt ::= */ yytestcase(yyruleno==520); + case 534: /* having_clause_opt ::= */ yytestcase(yyruleno==534); + case 536: /* range_opt ::= */ yytestcase(yyruleno==536); + case 538: /* every_opt ::= */ yytestcase(yyruleno==538); + case 551: /* slimit_clause_opt ::= */ yytestcase(yyruleno==551); + case 555: /* limit_clause_opt ::= */ yytestcase(yyruleno==555); +{ yymsp[1].minor.yy140 = NULL; } + break; + case 130: /* start_opt ::= START WITH NK_INTEGER */ + case 134: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==134); +{ yymsp[-2].minor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + break; + case 131: /* start_opt ::= START WITH NK_STRING */ + case 135: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==135); +{ yymsp[-2].minor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + break; + case 132: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ + case 136: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==136); +{ yymsp[-3].minor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + break; + case 137: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + case 139: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==139); +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy587, yymsp[-5].minor.yy140, yymsp[-3].minor.yy220, yymsp[-1].minor.yy220, yymsp[0].minor.yy140); } + break; + case 138: /* cmd ::= CREATE TABLE multi_create_clause */ +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy220); } + break; + case 140: /* cmd ::= DROP TABLE multi_drop_clause */ +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy220); } + break; + case 141: /* cmd ::= DROP STABLE exists_opt full_table_name */ +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy587, yymsp[0].minor.yy140); } + break; + case 142: /* cmd ::= ALTER TABLE alter_table_clause */ + case 341: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==341); + case 342: /* cmd ::= insert_query */ yytestcase(yyruleno==342); +{ pCxt->pRootNode = yymsp[0].minor.yy140; } + break; + case 143: /* cmd ::= ALTER STABLE alter_table_clause */ +{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy140); } + break; + case 144: /* alter_table_clause ::= full_table_name alter_table_options */ +{ yylhsminor.yy140 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } + yymsp[-1].minor.yy140 = yylhsminor.yy140; + break; + case 145: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ +{ yylhsminor.yy140 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy140, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy881, yymsp[0].minor.yy682); } + yymsp[-4].minor.yy140 = yylhsminor.yy140; + break; + case 146: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ +{ yylhsminor.yy140 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy140, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy881); } + yymsp[-3].minor.yy140 = yylhsminor.yy140; + break; + case 147: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ +{ yylhsminor.yy140 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy140, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy881, yymsp[0].minor.yy682); } + yymsp[-4].minor.yy140 = yylhsminor.yy140; + break; + case 148: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ +{ yylhsminor.yy140 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy140, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy881, &yymsp[0].minor.yy881); } + yymsp[-4].minor.yy140 = yylhsminor.yy140; + break; + case 149: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ +{ yylhsminor.yy140 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy140, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy881, yymsp[0].minor.yy682); } + yymsp[-4].minor.yy140 = yylhsminor.yy140; + break; + case 150: /* alter_table_clause ::= full_table_name DROP TAG column_name */ +{ yylhsminor.yy140 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy140, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy881); } + yymsp[-3].minor.yy140 = yylhsminor.yy140; + break; + case 151: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ +{ yylhsminor.yy140 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy140, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy881, yymsp[0].minor.yy682); } + yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 129: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - case 131: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==131); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy103, yymsp[-5].minor.yy42, yymsp[-3].minor.yy110, yymsp[-1].minor.yy110, yymsp[0].minor.yy42); } + case 152: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ +{ yylhsminor.yy140 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy140, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy881, &yymsp[0].minor.yy881); } + yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 130: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy110); } + case 153: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ +{ yylhsminor.yy140 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy140, &yymsp[-2].minor.yy881, yymsp[0].minor.yy140); } + yymsp[-5].minor.yy140 = yylhsminor.yy140; break; - case 132: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy110); } + case 155: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ + case 442: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==442); +{ yylhsminor.yy220 = addNodeToList(pCxt, yymsp[-1].minor.yy220, yymsp[0].minor.yy140); } + yymsp[-1].minor.yy220 = yylhsminor.yy220; break; - case 133: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy103, yymsp[0].minor.yy42); } + case 156: /* 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.yy140 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy587, yymsp[-8].minor.yy140, yymsp[-6].minor.yy140, yymsp[-5].minor.yy220, yymsp[-2].minor.yy220, yymsp[0].minor.yy140); } + yymsp[-9].minor.yy140 = yylhsminor.yy140; break; - case 134: /* cmd ::= ALTER TABLE alter_table_clause */ - case 333: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==333); - case 334: /* cmd ::= insert_query */ yytestcase(yyruleno==334); -{ pCxt->pRootNode = yymsp[0].minor.yy42; } + case 159: /* drop_table_clause ::= exists_opt full_table_name */ +{ yylhsminor.yy140 = createDropTableClause(pCxt, yymsp[-1].minor.yy587, yymsp[0].minor.yy140); } + yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 135: /* cmd ::= ALTER STABLE alter_table_clause */ -{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy42); } + case 160: /* specific_cols_opt ::= */ + case 191: /* tags_def_opt ::= */ yytestcase(yyruleno==191); + case 263: /* tag_list_opt ::= */ yytestcase(yyruleno==263); + case 315: /* col_list_opt ::= */ yytestcase(yyruleno==315); + case 317: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==317); + case 505: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==505); + case 530: /* group_by_clause_opt ::= */ yytestcase(yyruleno==530); + case 549: /* order_by_clause_opt ::= */ yytestcase(yyruleno==549); +{ yymsp[1].minor.yy220 = NULL; } break; - case 136: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy42 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } - yymsp[-1].minor.yy42 = yylhsminor.yy42; + case 161: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ + case 316: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==316); +{ yymsp[-2].minor.yy220 = yymsp[-1].minor.yy220; } break; - case 137: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy42 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy42, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy225, yymsp[0].minor.yy448); } - yymsp[-4].minor.yy42 = yylhsminor.yy42; + case 162: /* full_table_name ::= table_name */ +{ yylhsminor.yy140 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy881, NULL); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 138: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy42 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy42, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy225); } - yymsp[-3].minor.yy42 = yylhsminor.yy42; + case 163: /* full_table_name ::= db_name NK_DOT table_name */ +{ yylhsminor.yy140 = createRealTableNode(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy881, NULL); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 139: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy42 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy42, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy225, yymsp[0].minor.yy448); } - yymsp[-4].minor.yy42 = yylhsminor.yy42; + case 166: /* column_def ::= column_name type_name */ +{ yylhsminor.yy140 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy881, yymsp[0].minor.yy682, NULL); } + yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 140: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy42 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy42, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy225, &yymsp[0].minor.yy225); } - yymsp[-4].minor.yy42 = yylhsminor.yy42; + case 167: /* column_def ::= column_name type_name COMMENT NK_STRING */ +{ yylhsminor.yy140 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy881, yymsp[-2].minor.yy682, &yymsp[0].minor.yy0); } + yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 141: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy42 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy42, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy225, yymsp[0].minor.yy448); } - yymsp[-4].minor.yy42 = yylhsminor.yy42; + case 168: /* type_name ::= BOOL */ +{ yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_BOOL); } break; - case 142: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy42 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy42, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy225); } - yymsp[-3].minor.yy42 = yylhsminor.yy42; + case 169: /* type_name ::= TINYINT */ +{ yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; - case 143: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy42 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy42, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy225, yymsp[0].minor.yy448); } - yymsp[-4].minor.yy42 = yylhsminor.yy42; + case 170: /* type_name ::= SMALLINT */ +{ yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; - case 144: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy42 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy42, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy225, &yymsp[0].minor.yy225); } - yymsp[-4].minor.yy42 = yylhsminor.yy42; + case 171: /* type_name ::= INT */ + case 172: /* type_name ::= INTEGER */ yytestcase(yyruleno==172); +{ yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_INT); } break; - case 145: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -{ yylhsminor.yy42 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy42, &yymsp[-2].minor.yy225, yymsp[0].minor.yy42); } - yymsp[-5].minor.yy42 = yylhsminor.yy42; + case 173: /* type_name ::= BIGINT */ +{ yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; - case 147: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 434: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==434); -{ yylhsminor.yy110 = addNodeToList(pCxt, yymsp[-1].minor.yy110, yymsp[0].minor.yy42); } - yymsp[-1].minor.yy110 = yylhsminor.yy110; + case 174: /* type_name ::= FLOAT */ +{ yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; - case 148: /* 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.yy42 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy103, yymsp[-8].minor.yy42, yymsp[-6].minor.yy42, yymsp[-5].minor.yy110, yymsp[-2].minor.yy110, yymsp[0].minor.yy42); } - yymsp[-9].minor.yy42 = yylhsminor.yy42; + case 175: /* type_name ::= DOUBLE */ +{ yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; - case 151: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy42 = createDropTableClause(pCxt, yymsp[-1].minor.yy103, yymsp[0].minor.yy42); } - yymsp[-1].minor.yy42 = yylhsminor.yy42; + case 176: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy682 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; - case 152: /* specific_cols_opt ::= */ - case 183: /* tags_def_opt ::= */ yytestcase(yyruleno==183); - case 255: /* tag_list_opt ::= */ yytestcase(yyruleno==255); - case 307: /* col_list_opt ::= */ yytestcase(yyruleno==307); - case 309: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==309); - case 497: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==497); - case 522: /* group_by_clause_opt ::= */ yytestcase(yyruleno==522); - case 541: /* order_by_clause_opt ::= */ yytestcase(yyruleno==541); -{ yymsp[1].minor.yy110 = NULL; } + case 177: /* type_name ::= TIMESTAMP */ +{ yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; - case 153: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ - case 308: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==308); -{ yymsp[-2].minor.yy110 = yymsp[-1].minor.yy110; } + case 178: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy682 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; - case 154: /* full_table_name ::= table_name */ -{ yylhsminor.yy42 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy225, NULL); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 179: /* type_name ::= TINYINT UNSIGNED */ +{ yymsp[-1].minor.yy682 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; - case 155: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy42 = createRealTableNode(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225, NULL); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 180: /* type_name ::= SMALLINT UNSIGNED */ +{ yymsp[-1].minor.yy682 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; - case 158: /* column_def ::= column_name type_name */ -{ yylhsminor.yy42 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy225, yymsp[0].minor.yy448, NULL); } - yymsp[-1].minor.yy42 = yylhsminor.yy42; + case 181: /* type_name ::= INT UNSIGNED */ +{ yymsp[-1].minor.yy682 = createDataType(TSDB_DATA_TYPE_UINT); } break; - case 159: /* column_def ::= column_name type_name COMMENT NK_STRING */ -{ yylhsminor.yy42 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy225, yymsp[-2].minor.yy448, &yymsp[0].minor.yy0); } - yymsp[-3].minor.yy42 = yylhsminor.yy42; + case 182: /* type_name ::= BIGINT UNSIGNED */ +{ yymsp[-1].minor.yy682 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; - case 160: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_BOOL); } + case 183: /* type_name ::= JSON */ +{ yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_JSON); } break; - case 161: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_TINYINT); } + case 184: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy682 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; - case 162: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_SMALLINT); } + case 185: /* type_name ::= MEDIUMBLOB */ +{ yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; - case 163: /* type_name ::= INT */ - case 164: /* type_name ::= INTEGER */ yytestcase(yyruleno==164); -{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_INT); } + case 186: /* type_name ::= BLOB */ +{ yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_BLOB); } break; - case 165: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_BIGINT); } + case 187: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy682 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; - case 166: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_FLOAT); } + case 188: /* type_name ::= DECIMAL */ +{ yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 167: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_DOUBLE); } + case 189: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy682 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 168: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy448 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } + case 190: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ +{ yymsp[-5].minor.yy682 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 169: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } + case 192: /* tags_def_opt ::= tags_def */ + case 318: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==318); + case 434: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==434); +{ yylhsminor.yy220 = yymsp[0].minor.yy220; } + yymsp[0].minor.yy220 = yylhsminor.yy220; break; - case 170: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy448 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } + case 193: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ + case 319: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==319); +{ yymsp[-3].minor.yy220 = yymsp[-1].minor.yy220; } break; - case 171: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy448 = createDataType(TSDB_DATA_TYPE_UTINYINT); } + case 194: /* table_options ::= */ +{ yymsp[1].minor.yy140 = createDefaultTableOptions(pCxt); } break; - case 172: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy448 = createDataType(TSDB_DATA_TYPE_USMALLINT); } + case 195: /* table_options ::= table_options COMMENT NK_STRING */ +{ yylhsminor.yy140 = setTableOption(pCxt, yymsp[-2].minor.yy140, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 173: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy448 = createDataType(TSDB_DATA_TYPE_UINT); } + case 196: /* table_options ::= table_options MAX_DELAY duration_list */ +{ yylhsminor.yy140 = setTableOption(pCxt, yymsp[-2].minor.yy140, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy220); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 174: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy448 = createDataType(TSDB_DATA_TYPE_UBIGINT); } + case 197: /* table_options ::= table_options WATERMARK duration_list */ +{ yylhsminor.yy140 = setTableOption(pCxt, yymsp[-2].minor.yy140, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy220); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 175: /* type_name ::= JSON */ -{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_JSON); } + case 198: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ +{ yylhsminor.yy140 = setTableOption(pCxt, yymsp[-4].minor.yy140, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy220); } + yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 176: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy448 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } + case 199: /* table_options ::= table_options TTL NK_INTEGER */ +{ yylhsminor.yy140 = setTableOption(pCxt, yymsp[-2].minor.yy140, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 177: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } + case 200: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ +{ yylhsminor.yy140 = setTableOption(pCxt, yymsp[-4].minor.yy140, TABLE_OPTION_SMA, yymsp[-1].minor.yy220); } + yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 178: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_BLOB); } + case 201: /* table_options ::= table_options DELETE_MARK duration_list */ +{ yylhsminor.yy140 = setTableOption(pCxt, yymsp[-2].minor.yy140, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy220); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 179: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy448 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } + case 202: /* alter_table_options ::= alter_table_option */ +{ yylhsminor.yy140 = createAlterTableOptions(pCxt); yylhsminor.yy140 = setTableOption(pCxt, yylhsminor.yy140, yymsp[0].minor.yy809.type, &yymsp[0].minor.yy809.val); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 180: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_DECIMAL); } + case 203: /* alter_table_options ::= alter_table_options alter_table_option */ +{ yylhsminor.yy140 = setTableOption(pCxt, yymsp[-1].minor.yy140, yymsp[0].minor.yy809.type, &yymsp[0].minor.yy809.val); } + yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 181: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy448 = createDataType(TSDB_DATA_TYPE_DECIMAL); } + case 204: /* alter_table_option ::= COMMENT NK_STRING */ +{ yymsp[-1].minor.yy809.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy809.val = yymsp[0].minor.yy0; } break; - case 182: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy448 = createDataType(TSDB_DATA_TYPE_DECIMAL); } + case 205: /* alter_table_option ::= TTL NK_INTEGER */ +{ yymsp[-1].minor.yy809.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy809.val = yymsp[0].minor.yy0; } break; - case 184: /* tags_def_opt ::= tags_def */ - case 310: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==310); - case 426: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==426); -{ yylhsminor.yy110 = yymsp[0].minor.yy110; } - yymsp[0].minor.yy110 = yylhsminor.yy110; + case 206: /* duration_list ::= duration_literal */ + case 398: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==398); +{ yylhsminor.yy220 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } + yymsp[0].minor.yy220 = yylhsminor.yy220; break; - case 185: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ - case 311: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==311); -{ yymsp[-3].minor.yy110 = yymsp[-1].minor.yy110; } + case 207: /* duration_list ::= duration_list NK_COMMA duration_literal */ + case 399: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==399); +{ yylhsminor.yy220 = addNodeToList(pCxt, yymsp[-2].minor.yy220, releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } + yymsp[-2].minor.yy220 = yylhsminor.yy220; break; - case 186: /* table_options ::= */ -{ yymsp[1].minor.yy42 = createDefaultTableOptions(pCxt); } + case 210: /* rollup_func_name ::= function_name */ +{ yylhsminor.yy140 = createFunctionNode(pCxt, &yymsp[0].minor.yy881, NULL); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 187: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-2].minor.yy42, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 211: /* rollup_func_name ::= FIRST */ + case 212: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==212); + case 267: /* tag_item ::= QTAGS */ yytestcase(yyruleno==267); +{ yylhsminor.yy140 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 188: /* table_options ::= table_options MAX_DELAY duration_list */ -{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-2].minor.yy42, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy110); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 215: /* col_name ::= column_name */ + case 268: /* tag_item ::= column_name */ yytestcase(yyruleno==268); +{ yylhsminor.yy140 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy881); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 189: /* table_options ::= table_options WATERMARK duration_list */ -{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-2].minor.yy42, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy110); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; - break; - case 190: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-4].minor.yy42, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy110); } - yymsp[-4].minor.yy42 = yylhsminor.yy42; - break; - case 191: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-2].minor.yy42, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; - break; - case 192: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-4].minor.yy42, TABLE_OPTION_SMA, yymsp[-1].minor.yy110); } - yymsp[-4].minor.yy42 = yylhsminor.yy42; - break; - case 193: /* table_options ::= table_options DELETE_MARK duration_list */ -{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-2].minor.yy42, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy110); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; - break; - case 194: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy42 = createAlterTableOptions(pCxt); yylhsminor.yy42 = setTableOption(pCxt, yylhsminor.yy42, yymsp[0].minor.yy459.type, &yymsp[0].minor.yy459.val); } - yymsp[0].minor.yy42 = yylhsminor.yy42; - break; - case 195: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-1].minor.yy42, yymsp[0].minor.yy459.type, &yymsp[0].minor.yy459.val); } - yymsp[-1].minor.yy42 = yylhsminor.yy42; - break; - case 196: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy459.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } - break; - case 197: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy459.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } - break; - case 198: /* duration_list ::= duration_literal */ - case 390: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==390); -{ yylhsminor.yy110 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy42)); } - yymsp[0].minor.yy110 = yylhsminor.yy110; - break; - case 199: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 391: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==391); -{ yylhsminor.yy110 = addNodeToList(pCxt, yymsp[-2].minor.yy110, releaseRawExprNode(pCxt, yymsp[0].minor.yy42)); } - yymsp[-2].minor.yy110 = yylhsminor.yy110; - break; - case 202: /* rollup_func_name ::= function_name */ -{ yylhsminor.yy42 = createFunctionNode(pCxt, &yymsp[0].minor.yy225, NULL); } - yymsp[0].minor.yy42 = yylhsminor.yy42; - break; - case 203: /* rollup_func_name ::= FIRST */ - case 204: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==204); - case 259: /* tag_item ::= QTAGS */ yytestcase(yyruleno==259); -{ yylhsminor.yy42 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy42 = yylhsminor.yy42; - break; - case 207: /* col_name ::= column_name */ - case 260: /* tag_item ::= column_name */ yytestcase(yyruleno==260); -{ yylhsminor.yy42 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy225); } - yymsp[0].minor.yy42 = yylhsminor.yy42; - break; - case 208: /* cmd ::= SHOW DNODES */ + case 216: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } break; - case 209: /* cmd ::= SHOW USERS */ + case 217: /* cmd ::= SHOW USERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } break; - case 210: /* cmd ::= SHOW USER PRIVILEGES */ + case 218: /* cmd ::= SHOW USER PRIVILEGES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); } break; - case 211: /* cmd ::= SHOW DATABASES */ + case 219: /* cmd ::= SHOW DATABASES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); } break; - case 212: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy42, yymsp[0].minor.yy42, OP_TYPE_LIKE); } + case 220: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy140, yymsp[0].minor.yy140, OP_TYPE_LIKE); } break; - case 213: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy42, yymsp[0].minor.yy42, OP_TYPE_LIKE); } + case 221: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy140, yymsp[0].minor.yy140, OP_TYPE_LIKE); } break; - case 214: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy42, NULL, OP_TYPE_LIKE); } + case 222: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy140, NULL, OP_TYPE_LIKE); } break; - case 215: /* cmd ::= SHOW MNODES */ + case 223: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } break; - case 216: /* cmd ::= SHOW QNODES */ + case 224: /* cmd ::= SHOW QNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } break; - case 217: /* cmd ::= SHOW FUNCTIONS */ + case 225: /* cmd ::= SHOW FUNCTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; - case 218: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy42, yymsp[-1].minor.yy42, OP_TYPE_EQUAL); } + case 226: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy140, yymsp[-1].minor.yy140, OP_TYPE_EQUAL); } break; - case 219: /* cmd ::= SHOW STREAMS */ + case 227: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } break; - case 220: /* cmd ::= SHOW ACCOUNTS */ + case 228: /* cmd ::= SHOW ACCOUNTS */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } break; - case 221: /* cmd ::= SHOW APPS */ + case 229: /* cmd ::= SHOW APPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } break; - case 222: /* cmd ::= SHOW CONNECTIONS */ + case 230: /* cmd ::= SHOW CONNECTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } break; - case 223: /* cmd ::= SHOW LICENCES */ - case 224: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==224); + case 231: /* cmd ::= SHOW LICENCES */ + case 232: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==232); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } break; - case 225: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy225); } + case 233: /* cmd ::= SHOW CREATE DATABASE db_name */ +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy881); } break; - case 226: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy42); } + case 234: /* cmd ::= SHOW CREATE TABLE full_table_name */ +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy140); } break; - case 227: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy42); } + case 235: /* cmd ::= SHOW CREATE STABLE full_table_name */ +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy140); } break; - case 228: /* cmd ::= SHOW QUERIES */ + case 236: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } break; - case 229: /* cmd ::= SHOW SCORES */ + case 237: /* cmd ::= SHOW SCORES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } break; - case 230: /* cmd ::= SHOW TOPICS */ + case 238: /* cmd ::= SHOW TOPICS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } break; - case 231: /* cmd ::= SHOW VARIABLES */ - case 232: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==232); + case 239: /* cmd ::= SHOW VARIABLES */ + case 240: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==240); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } break; - case 233: /* cmd ::= SHOW LOCAL VARIABLES */ + case 241: /* cmd ::= SHOW LOCAL VARIABLES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } break; - case 234: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy42); } + case 242: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ +{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy140); } break; - case 235: /* cmd ::= SHOW BNODES */ + case 243: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } break; - case 236: /* cmd ::= SHOW SNODES */ + case 244: /* cmd ::= SHOW SNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } break; - case 237: /* cmd ::= SHOW CLUSTER */ + case 245: /* cmd ::= SHOW CLUSTER */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } break; - case 238: /* cmd ::= SHOW TRANSACTIONS */ + case 246: /* cmd ::= SHOW TRANSACTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; - case 239: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy42); } + case 247: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ +{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy140); } break; - case 240: /* cmd ::= SHOW CONSUMERS */ + case 248: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } break; - case 241: /* cmd ::= SHOW SUBSCRIPTIONS */ + case 249: /* cmd ::= SHOW SUBSCRIPTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } break; - case 242: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy42, yymsp[-1].minor.yy42, OP_TYPE_EQUAL); } + case 250: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy140, yymsp[-1].minor.yy140, OP_TYPE_EQUAL); } break; - case 243: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy42, yymsp[0].minor.yy42, yymsp[-3].minor.yy110); } + case 251: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy140, yymsp[0].minor.yy140, yymsp[-3].minor.yy220); } break; - case 244: /* cmd ::= SHOW VNODES NK_INTEGER */ + case 252: /* cmd ::= SHOW VNODES NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } break; - case 245: /* cmd ::= SHOW VNODES NK_STRING */ + case 253: /* cmd ::= SHOW VNODES NK_STRING */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, createValueNode(pCxt, TSDB_DATA_TYPE_VARCHAR, &yymsp[0].minor.yy0)); } break; - case 246: /* cmd ::= SHOW db_name_cond_opt ALIVE */ -{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy42, QUERY_NODE_SHOW_DB_ALIVE_STMT); } + case 254: /* cmd ::= SHOW db_name_cond_opt ALIVE */ +{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy140, QUERY_NODE_SHOW_DB_ALIVE_STMT); } break; - case 247: /* cmd ::= SHOW CLUSTER ALIVE */ + case 255: /* cmd ::= SHOW CLUSTER ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } break; - case 248: /* db_name_cond_opt ::= */ - case 253: /* from_db_opt ::= */ yytestcase(yyruleno==253); -{ yymsp[1].minor.yy42 = createDefaultDatabaseCondValue(pCxt); } + case 256: /* db_name_cond_opt ::= */ + case 261: /* from_db_opt ::= */ yytestcase(yyruleno==261); +{ yymsp[1].minor.yy140 = createDefaultDatabaseCondValue(pCxt); } break; - case 249: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy42 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy225); } - yymsp[-1].minor.yy42 = yylhsminor.yy42; + case 257: /* db_name_cond_opt ::= db_name NK_DOT */ +{ yylhsminor.yy140 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy881); } + yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 250: /* like_pattern_opt ::= */ - case 321: /* subtable_opt ::= */ yytestcase(yyruleno==321); - case 436: /* case_when_else_opt ::= */ yytestcase(yyruleno==436); - case 466: /* from_clause_opt ::= */ yytestcase(yyruleno==466); - case 495: /* where_clause_opt ::= */ yytestcase(yyruleno==495); - case 504: /* twindow_clause_opt ::= */ yytestcase(yyruleno==504); - case 510: /* sliding_opt ::= */ yytestcase(yyruleno==510); - case 512: /* fill_opt ::= */ yytestcase(yyruleno==512); - case 526: /* having_clause_opt ::= */ yytestcase(yyruleno==526); - case 528: /* range_opt ::= */ yytestcase(yyruleno==528); - case 530: /* every_opt ::= */ yytestcase(yyruleno==530); - case 543: /* slimit_clause_opt ::= */ yytestcase(yyruleno==543); - case 547: /* limit_clause_opt ::= */ yytestcase(yyruleno==547); -{ yymsp[1].minor.yy42 = NULL; } + case 259: /* like_pattern_opt ::= LIKE NK_STRING */ +{ yymsp[-1].minor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; - case 251: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + case 260: /* table_name_cond ::= table_name */ +{ yylhsminor.yy140 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy881); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 252: /* table_name_cond ::= table_name */ -{ yylhsminor.yy42 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy225); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 262: /* from_db_opt ::= FROM db_name */ +{ yymsp[-1].minor.yy140 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy881); } break; - case 254: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy42 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy225); } + case 266: /* tag_item ::= TBNAME */ +{ yylhsminor.yy140 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 258: /* tag_item ::= TBNAME */ -{ yylhsminor.yy42 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 269: /* tag_item ::= column_name column_alias */ +{ yylhsminor.yy140 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy881), &yymsp[0].minor.yy881); } + yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 261: /* tag_item ::= column_name column_alias */ -{ yylhsminor.yy42 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy225), &yymsp[0].minor.yy225); } - yymsp[-1].minor.yy42 = yylhsminor.yy42; + case 270: /* tag_item ::= column_name AS column_alias */ +{ yylhsminor.yy140 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy881), &yymsp[0].minor.yy881); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 262: /* tag_item ::= column_name AS column_alias */ -{ yylhsminor.yy42 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy225), &yymsp[0].minor.yy225); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 271: /* cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy587, yymsp[-3].minor.yy140, yymsp[-1].minor.yy140, NULL, yymsp[0].minor.yy140); } break; - case 263: /* cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy103, yymsp[-3].minor.yy42, yymsp[-1].minor.yy42, NULL, yymsp[0].minor.yy42); } + case 272: /* cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy587, yymsp[-5].minor.yy140, yymsp[-3].minor.yy140, yymsp[-1].minor.yy220, NULL); } break; - case 264: /* cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy103, yymsp[-5].minor.yy42, yymsp[-3].minor.yy42, yymsp[-1].minor.yy110, NULL); } + case 273: /* cmd ::= DROP INDEX exists_opt full_index_name */ +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy587, yymsp[0].minor.yy140); } break; - case 265: /* cmd ::= DROP INDEX exists_opt full_index_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy103, yymsp[0].minor.yy42); } + case 274: /* full_index_name ::= index_name */ +{ yylhsminor.yy140 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy881); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 266: /* full_index_name ::= index_name */ -{ yylhsminor.yy42 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy225); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 275: /* full_index_name ::= db_name NK_DOT index_name */ +{ yylhsminor.yy140 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy881); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 267: /* full_index_name ::= db_name NK_DOT index_name */ -{ yylhsminor.yy42 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 276: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ +{ yymsp[-9].minor.yy140 = createIndexOption(pCxt, yymsp[-7].minor.yy220, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), NULL, yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; - case 268: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-9].minor.yy42 = createIndexOption(pCxt, yymsp[-7].minor.yy110, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), NULL, yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } + case 277: /* 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.yy140 = createIndexOption(pCxt, yymsp[-9].minor.yy220, releaseRawExprNode(pCxt, yymsp[-5].minor.yy140), releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; - case 269: /* 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.yy42 = createIndexOption(pCxt, yymsp[-9].minor.yy110, releaseRawExprNode(pCxt, yymsp[-5].minor.yy42), releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } + case 280: /* func ::= sma_func_name NK_LP expression_list NK_RP */ +{ yylhsminor.yy140 = createFunctionNode(pCxt, &yymsp[-3].minor.yy881, yymsp[-1].minor.yy220); } + yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 272: /* func ::= sma_func_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy42 = createFunctionNode(pCxt, &yymsp[-3].minor.yy225, yymsp[-1].minor.yy110); } - yymsp[-3].minor.yy42 = yylhsminor.yy42; + case 286: /* sma_stream_opt ::= */ + case 320: /* stream_options ::= */ yytestcase(yyruleno==320); +{ yymsp[1].minor.yy140 = createStreamOptions(pCxt); } break; - case 278: /* sma_stream_opt ::= */ - case 312: /* stream_options ::= */ yytestcase(yyruleno==312); -{ yymsp[1].minor.yy42 = createStreamOptions(pCxt); } + case 287: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy140)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy140); yylhsminor.yy140 = yymsp[-2].minor.yy140; } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 279: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy42)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy42); yylhsminor.yy42 = yymsp[-2].minor.yy42; } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 288: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy140)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy140); yylhsminor.yy140 = yymsp[-2].minor.yy140; } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 280: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy42)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy42); yylhsminor.yy42 = yymsp[-2].minor.yy42; } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 289: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy140)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy140); yylhsminor.yy140 = yymsp[-2].minor.yy140; } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 281: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy42)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy42); yylhsminor.yy42 = yymsp[-2].minor.yy42; } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 290: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ +{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy587, &yymsp[-2].minor.yy881, yymsp[0].minor.yy140); } break; - case 282: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy103, &yymsp[-2].minor.yy225, yymsp[0].minor.yy42); } + case 291: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy587, &yymsp[-3].minor.yy881, &yymsp[0].minor.yy881, false); } break; - case 283: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy103, &yymsp[-3].minor.yy225, &yymsp[0].minor.yy225, false); } + case 292: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy587, &yymsp[-5].minor.yy881, &yymsp[0].minor.yy881, true); } break; - case 284: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy103, &yymsp[-5].minor.yy225, &yymsp[0].minor.yy225, true); } + case 293: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy587, &yymsp[-3].minor.yy881, yymsp[0].minor.yy140, false); } break; - case 285: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy103, &yymsp[-3].minor.yy225, yymsp[0].minor.yy42, false); } + case 294: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy587, &yymsp[-5].minor.yy881, yymsp[0].minor.yy140, true); } break; - case 286: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy103, &yymsp[-5].minor.yy225, yymsp[0].minor.yy42, true); } + case 295: /* cmd ::= DROP TOPIC exists_opt topic_name */ +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy587, &yymsp[0].minor.yy881); } break; - case 287: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy103, &yymsp[0].minor.yy225); } + case 296: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy587, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy881); } break; - case 288: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy103, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225); } + case 297: /* cmd ::= DESC full_table_name */ + case 298: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==298); +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy140); } break; - case 289: /* cmd ::= DESC full_table_name */ - case 290: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==290); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy42); } - break; - case 291: /* cmd ::= RESET QUERY CACHE */ + case 299: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 292: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - case 293: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==293); -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy103, yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } + case 300: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + case 301: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==301); +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy587, yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; - case 296: /* explain_options ::= */ -{ yymsp[1].minor.yy42 = createDefaultExplainOptions(pCxt); } + case 304: /* explain_options ::= */ +{ yymsp[1].minor.yy140 = createDefaultExplainOptions(pCxt); } break; - case 297: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy42 = setExplainVerbose(pCxt, yymsp[-2].minor.yy42, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 305: /* explain_options ::= explain_options VERBOSE NK_BOOL */ +{ yylhsminor.yy140 = setExplainVerbose(pCxt, yymsp[-2].minor.yy140, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 298: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy42 = setExplainRatio(pCxt, yymsp[-2].minor.yy42, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 306: /* explain_options ::= explain_options RATIO NK_FLOAT */ +{ yylhsminor.yy140 = setExplainRatio(pCxt, yymsp[-2].minor.yy140, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 299: /* 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.yy103, yymsp[-8].minor.yy103, &yymsp[-5].minor.yy225, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy448, yymsp[0].minor.yy508); } + case 307: /* 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.yy587, yymsp[-8].minor.yy587, &yymsp[-5].minor.yy881, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy682, yymsp[0].minor.yy214); } break; - case 300: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy103, &yymsp[0].minor.yy225); } + case 308: /* cmd ::= DROP FUNCTION exists_opt function_name */ +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy587, &yymsp[0].minor.yy881); } break; - case 305: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy103, &yymsp[-8].minor.yy225, yymsp[-5].minor.yy42, yymsp[-7].minor.yy42, yymsp[-3].minor.yy110, yymsp[-2].minor.yy42, yymsp[0].minor.yy42, yymsp[-4].minor.yy110); } + case 313: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy587, &yymsp[-8].minor.yy881, yymsp[-5].minor.yy140, yymsp[-7].minor.yy140, yymsp[-3].minor.yy220, yymsp[-2].minor.yy140, yymsp[0].minor.yy140, yymsp[-4].minor.yy220); } break; - case 306: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy103, &yymsp[0].minor.yy225); } + case 314: /* cmd ::= DROP STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy587, &yymsp[0].minor.yy881); } break; - case 313: /* stream_options ::= stream_options TRIGGER AT_ONCE */ - case 314: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==314); -{ yylhsminor.yy42 = setStreamOptions(pCxt, yymsp[-2].minor.yy42, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 321: /* stream_options ::= stream_options TRIGGER AT_ONCE */ + case 322: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==322); +{ yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-2].minor.yy140, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 315: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -{ yylhsminor.yy42 = setStreamOptions(pCxt, yymsp[-3].minor.yy42, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy42)); } - yymsp[-3].minor.yy42 = yylhsminor.yy42; + case 323: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ +{ yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-3].minor.yy140, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } + yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 316: /* stream_options ::= stream_options WATERMARK duration_literal */ -{ yylhsminor.yy42 = setStreamOptions(pCxt, yymsp[-2].minor.yy42, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy42)); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 324: /* stream_options ::= stream_options WATERMARK duration_literal */ +{ yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-2].minor.yy140, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 317: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -{ yylhsminor.yy42 = setStreamOptions(pCxt, yymsp[-3].minor.yy42, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-3].minor.yy42 = yylhsminor.yy42; + case 325: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ +{ yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-3].minor.yy140, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 318: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -{ yylhsminor.yy42 = setStreamOptions(pCxt, yymsp[-2].minor.yy42, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 326: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ +{ yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-2].minor.yy140, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 319: /* stream_options ::= stream_options DELETE_MARK duration_literal */ -{ yylhsminor.yy42 = setStreamOptions(pCxt, yymsp[-2].minor.yy42, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy42)); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 327: /* stream_options ::= stream_options DELETE_MARK duration_literal */ +{ yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-2].minor.yy140, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 320: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ -{ yylhsminor.yy42 = setStreamOptions(pCxt, yymsp[-3].minor.yy42, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-3].minor.yy42 = yylhsminor.yy42; + case 328: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ +{ yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-3].minor.yy140, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 322: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 511: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==511); - case 531: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==531); -{ yymsp[-3].minor.yy42 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy42); } + case 330: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 519: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==519); + case 539: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==539); +{ yymsp[-3].minor.yy140 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy140); } break; - case 323: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 331: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 324: /* cmd ::= KILL QUERY NK_STRING */ + case 332: /* cmd ::= KILL QUERY NK_STRING */ { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 325: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 333: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 326: /* cmd ::= BALANCE VGROUP */ + case 334: /* cmd ::= BALANCE VGROUP */ { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } break; - case 327: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 335: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 328: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy110); } + case 336: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy220); } break; - case 329: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 337: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 330: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy110 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + case 338: /* dnode_list ::= DNODE NK_INTEGER */ +{ yymsp[-1].minor.yy220 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 332: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } + case 340: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ +{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; - case 335: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -{ yymsp[-6].minor.yy42 = createInsertStmt(pCxt, yymsp[-4].minor.yy42, yymsp[-2].minor.yy110, yymsp[0].minor.yy42); } + case 343: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ +{ yymsp[-6].minor.yy140 = createInsertStmt(pCxt, yymsp[-4].minor.yy140, yymsp[-2].minor.yy220, yymsp[0].minor.yy140); } break; - case 336: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ -{ yymsp[-3].minor.yy42 = createInsertStmt(pCxt, yymsp[-1].minor.yy42, NULL, yymsp[0].minor.yy42); } + case 344: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ +{ yymsp[-3].minor.yy140 = createInsertStmt(pCxt, yymsp[-1].minor.yy140, NULL, yymsp[0].minor.yy140); } break; - case 337: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 345: /* literal ::= NK_INTEGER */ +{ yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 338: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 346: /* literal ::= NK_FLOAT */ +{ yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 339: /* literal ::= NK_STRING */ -{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 347: /* literal ::= NK_STRING */ +{ yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 340: /* literal ::= NK_BOOL */ -{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 348: /* literal ::= NK_BOOL */ +{ yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 341: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy42 = yylhsminor.yy42; + case 349: /* literal ::= TIMESTAMP NK_STRING */ +{ yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 342: /* literal ::= duration_literal */ - case 352: /* signed_literal ::= signed */ yytestcase(yyruleno==352); - case 373: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==373); - case 374: /* expression ::= literal */ yytestcase(yyruleno==374); - case 375: /* expression ::= pseudo_column */ yytestcase(yyruleno==375); - case 376: /* expression ::= column_reference */ yytestcase(yyruleno==376); - case 377: /* expression ::= function_expression */ yytestcase(yyruleno==377); - case 378: /* expression ::= case_when_expression */ yytestcase(yyruleno==378); - case 409: /* function_expression ::= literal_func */ yytestcase(yyruleno==409); - case 458: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==458); - case 462: /* boolean_primary ::= predicate */ yytestcase(yyruleno==462); - case 464: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==464); - case 465: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==465); - case 468: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==468); - case 470: /* table_reference ::= table_primary */ yytestcase(yyruleno==470); - case 471: /* table_reference ::= joined_table */ yytestcase(yyruleno==471); - case 475: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==475); - case 533: /* query_simple ::= query_specification */ yytestcase(yyruleno==533); - case 534: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==534); - case 537: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==537); - case 539: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==539); -{ yylhsminor.yy42 = yymsp[0].minor.yy42; } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 350: /* literal ::= duration_literal */ + case 360: /* signed_literal ::= signed */ yytestcase(yyruleno==360); + case 381: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==381); + case 382: /* expression ::= literal */ yytestcase(yyruleno==382); + case 383: /* expression ::= pseudo_column */ yytestcase(yyruleno==383); + case 384: /* expression ::= column_reference */ yytestcase(yyruleno==384); + case 385: /* expression ::= function_expression */ yytestcase(yyruleno==385); + case 386: /* expression ::= case_when_expression */ yytestcase(yyruleno==386); + case 417: /* function_expression ::= literal_func */ yytestcase(yyruleno==417); + case 466: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==466); + case 470: /* boolean_primary ::= predicate */ yytestcase(yyruleno==470); + case 472: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==472); + case 473: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==473); + case 476: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==476); + case 478: /* table_reference ::= table_primary */ yytestcase(yyruleno==478); + case 479: /* table_reference ::= joined_table */ yytestcase(yyruleno==479); + case 483: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==483); + case 541: /* query_simple ::= query_specification */ yytestcase(yyruleno==541); + case 542: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==542); + case 545: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==545); + case 547: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==547); +{ yylhsminor.yy140 = yymsp[0].minor.yy140; } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 343: /* literal ::= NULL */ -{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 351: /* literal ::= NULL */ +{ yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 344: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 352: /* literal ::= NK_QUESTION */ +{ yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 345: /* duration_literal ::= NK_VARIABLE */ -{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 353: /* duration_literal ::= NK_VARIABLE */ +{ yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 346: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 354: /* signed ::= NK_INTEGER */ +{ yylhsminor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 347: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + case 355: /* signed ::= NK_PLUS NK_INTEGER */ +{ yymsp[-1].minor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; - case 348: /* signed ::= NK_MINUS NK_INTEGER */ + case 356: /* 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.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy42 = yylhsminor.yy42; + yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 349: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 357: /* signed ::= NK_FLOAT */ +{ yylhsminor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 350: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + case 358: /* signed ::= NK_PLUS NK_FLOAT */ +{ yymsp[-1].minor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 351: /* signed ::= NK_MINUS NK_FLOAT */ + case 359: /* 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.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy42 = yylhsminor.yy42; + yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 353: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 361: /* signed_literal ::= NK_STRING */ +{ yylhsminor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 354: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 362: /* signed_literal ::= NK_BOOL */ +{ yylhsminor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 355: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + case 363: /* signed_literal ::= TIMESTAMP NK_STRING */ +{ yymsp[-1].minor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 356: /* signed_literal ::= duration_literal */ - case 358: /* signed_literal ::= literal_func */ yytestcase(yyruleno==358); - case 429: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==429); - case 491: /* select_item ::= common_expression */ yytestcase(yyruleno==491); - case 501: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==501); - case 538: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==538); - case 540: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==540); - case 553: /* search_condition ::= common_expression */ yytestcase(yyruleno==553); -{ yylhsminor.yy42 = releaseRawExprNode(pCxt, yymsp[0].minor.yy42); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 364: /* signed_literal ::= duration_literal */ + case 366: /* signed_literal ::= literal_func */ yytestcase(yyruleno==366); + case 437: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==437); + case 499: /* select_item ::= common_expression */ yytestcase(yyruleno==499); + case 509: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==509); + case 546: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==546); + case 548: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==548); + case 561: /* search_condition ::= common_expression */ yytestcase(yyruleno==561); +{ yylhsminor.yy140 = releaseRawExprNode(pCxt, yymsp[0].minor.yy140); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 357: /* signed_literal ::= NULL */ -{ yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 365: /* signed_literal ::= NULL */ +{ yylhsminor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 359: /* signed_literal ::= NK_QUESTION */ -{ yylhsminor.yy42 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 367: /* signed_literal ::= NK_QUESTION */ +{ yylhsminor.yy140 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 379: /* expression ::= NK_LP expression NK_RP */ - case 463: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==463); - case 552: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==552); -{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy42)); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 387: /* expression ::= NK_LP expression NK_RP */ + case 471: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==471); + case 560: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==560); +{ yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy140)); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 380: /* expression ::= NK_PLUS expr_or_subquery */ + case 388: /* expression ::= NK_PLUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); - yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy42)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); + yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } - yymsp[-1].minor.yy42 = yylhsminor.yy42; + yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 381: /* expression ::= NK_MINUS expr_or_subquery */ + case 389: /* expression ::= NK_MINUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); - yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy42), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); + yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy140), NULL)); } - yymsp[-1].minor.yy42 = yylhsminor.yy42; + yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 382: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + case 390: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); - yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); + yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), releaseRawExprNode(pCxt, yymsp[0].minor.yy140))); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 383: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + case 391: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); - yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); + yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), releaseRawExprNode(pCxt, yymsp[0].minor.yy140))); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 384: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + case 392: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); - yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); + yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), releaseRawExprNode(pCxt, yymsp[0].minor.yy140))); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 385: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + case 393: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); - yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); + yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), releaseRawExprNode(pCxt, yymsp[0].minor.yy140))); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 386: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ + case 394: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); - yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); + yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), releaseRawExprNode(pCxt, yymsp[0].minor.yy140))); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 387: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 395: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); - yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); + yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 388: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + case 396: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); - yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); + yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), releaseRawExprNode(pCxt, yymsp[0].minor.yy140))); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 389: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + case 397: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); - yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); + yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), releaseRawExprNode(pCxt, yymsp[0].minor.yy140))); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 392: /* column_reference ::= column_name */ -{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy225, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy225)); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 400: /* column_reference ::= column_name */ +{ yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy881, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy881)); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 393: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225, createColumnNode(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225)); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 401: /* column_reference ::= table_name NK_DOT column_name */ +{ yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy881, createColumnNode(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy881)); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 394: /* pseudo_column ::= ROWTS */ - case 395: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==395); - case 397: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==397); - case 398: /* pseudo_column ::= QEND */ yytestcase(yyruleno==398); - case 399: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==399); - case 400: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==400); - case 401: /* pseudo_column ::= WEND */ yytestcase(yyruleno==401); - case 402: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==402); - case 403: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==403); - case 404: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==404); - case 405: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==405); - case 411: /* literal_func ::= NOW */ yytestcase(yyruleno==411); -{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 402: /* pseudo_column ::= ROWTS */ + case 403: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==403); + case 405: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==405); + case 406: /* pseudo_column ::= QEND */ yytestcase(yyruleno==406); + case 407: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==407); + case 408: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==408); + case 409: /* pseudo_column ::= WEND */ yytestcase(yyruleno==409); + case 410: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==410); + case 411: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==411); + case 412: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==412); + case 413: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==413); + case 419: /* literal_func ::= NOW */ yytestcase(yyruleno==419); +{ yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 396: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy225)))); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 404: /* pseudo_column ::= table_name NK_DOT TBNAME */ +{ yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy881)))); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 406: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 407: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==407); -{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy225, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy225, yymsp[-1].minor.yy110)); } - yymsp[-3].minor.yy42 = yylhsminor.yy42; + case 414: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 415: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==415); +{ yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy881, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy881, yymsp[-1].minor.yy220)); } + yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 408: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ -{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), yymsp[-1].minor.yy448)); } - yymsp[-5].minor.yy42 = yylhsminor.yy42; + case 416: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ +{ yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), yymsp[-1].minor.yy682)); } + yymsp[-5].minor.yy140 = yylhsminor.yy140; break; - case 410: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy225, NULL)); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 418: /* literal_func ::= noarg_func NK_LP NK_RP */ +{ yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy881, NULL)); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 425: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy110 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy110 = yylhsminor.yy110; + case 433: /* star_func_para_list ::= NK_STAR */ +{ yylhsminor.yy220 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy220 = yylhsminor.yy220; break; - case 430: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 494: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==494); -{ yylhsminor.yy42 = createColumnNode(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 438: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 502: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==502); +{ yylhsminor.yy140 = createColumnNode(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 431: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ -{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy110, yymsp[-1].minor.yy42)); } - yymsp[-3].minor.yy42 = yylhsminor.yy42; + case 439: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ +{ yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy220, yymsp[-1].minor.yy140)); } + yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 432: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ -{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), yymsp[-2].minor.yy110, yymsp[-1].minor.yy42)); } - yymsp[-4].minor.yy42 = yylhsminor.yy42; + case 440: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ +{ yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), yymsp[-2].minor.yy220, yymsp[-1].minor.yy140)); } + yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 435: /* when_then_expr ::= WHEN common_expression THEN common_expression */ -{ yymsp[-3].minor.yy42 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42)); } + case 443: /* when_then_expr ::= WHEN common_expression THEN common_expression */ +{ yymsp[-3].minor.yy140 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } break; - case 437: /* case_when_else_opt ::= ELSE common_expression */ -{ yymsp[-1].minor.yy42 = releaseRawExprNode(pCxt, yymsp[0].minor.yy42); } + case 445: /* case_when_else_opt ::= ELSE common_expression */ +{ yymsp[-1].minor.yy140 = releaseRawExprNode(pCxt, yymsp[0].minor.yy140); } break; - case 438: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 443: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==443); + case 446: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 451: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==451); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); - yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy2, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); + yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy794, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), releaseRawExprNode(pCxt, yymsp[0].minor.yy140))); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 439: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 447: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy42); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); - yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy42), releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy140); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); + yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy140), releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), releaseRawExprNode(pCxt, yymsp[0].minor.yy140))); } - yymsp[-4].minor.yy42 = yylhsminor.yy42; + yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 440: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 448: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy42); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); - yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy42), releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy140); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); + yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy140), releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), releaseRawExprNode(pCxt, yymsp[0].minor.yy140))); } - yymsp[-5].minor.yy42 = yylhsminor.yy42; + yymsp[-5].minor.yy140 = yylhsminor.yy140; break; - case 441: /* predicate ::= expr_or_subquery IS NULL */ + case 449: /* predicate ::= expr_or_subquery IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); - yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); + yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), NULL)); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 442: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 450: /* predicate ::= expr_or_subquery IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy42); - yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy140); + yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), NULL)); } - yymsp[-3].minor.yy42 = yylhsminor.yy42; + yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 444: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy2 = OP_TYPE_LOWER_THAN; } + case 452: /* compare_op ::= NK_LT */ +{ yymsp[0].minor.yy794 = OP_TYPE_LOWER_THAN; } break; - case 445: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy2 = OP_TYPE_GREATER_THAN; } + case 453: /* compare_op ::= NK_GT */ +{ yymsp[0].minor.yy794 = OP_TYPE_GREATER_THAN; } break; - case 446: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy2 = OP_TYPE_LOWER_EQUAL; } + case 454: /* compare_op ::= NK_LE */ +{ yymsp[0].minor.yy794 = OP_TYPE_LOWER_EQUAL; } break; - case 447: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy2 = OP_TYPE_GREATER_EQUAL; } + case 455: /* compare_op ::= NK_GE */ +{ yymsp[0].minor.yy794 = OP_TYPE_GREATER_EQUAL; } break; - case 448: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy2 = OP_TYPE_NOT_EQUAL; } + case 456: /* compare_op ::= NK_NE */ +{ yymsp[0].minor.yy794 = OP_TYPE_NOT_EQUAL; } break; - case 449: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy2 = OP_TYPE_EQUAL; } + case 457: /* compare_op ::= NK_EQ */ +{ yymsp[0].minor.yy794 = OP_TYPE_EQUAL; } break; - case 450: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy2 = OP_TYPE_LIKE; } + case 458: /* compare_op ::= LIKE */ +{ yymsp[0].minor.yy794 = OP_TYPE_LIKE; } break; - case 451: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy2 = OP_TYPE_NOT_LIKE; } + case 459: /* compare_op ::= NOT LIKE */ +{ yymsp[-1].minor.yy794 = OP_TYPE_NOT_LIKE; } break; - case 452: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy2 = OP_TYPE_MATCH; } + case 460: /* compare_op ::= MATCH */ +{ yymsp[0].minor.yy794 = OP_TYPE_MATCH; } break; - case 453: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy2 = OP_TYPE_NMATCH; } + case 461: /* compare_op ::= NMATCH */ +{ yymsp[0].minor.yy794 = OP_TYPE_NMATCH; } break; - case 454: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy2 = OP_TYPE_JSON_CONTAINS; } + case 462: /* compare_op ::= CONTAINS */ +{ yymsp[0].minor.yy794 = OP_TYPE_JSON_CONTAINS; } break; - case 455: /* in_op ::= IN */ -{ yymsp[0].minor.yy2 = OP_TYPE_IN; } + case 463: /* in_op ::= IN */ +{ yymsp[0].minor.yy794 = OP_TYPE_IN; } break; - case 456: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy2 = OP_TYPE_NOT_IN; } + case 464: /* in_op ::= NOT IN */ +{ yymsp[-1].minor.yy794 = OP_TYPE_NOT_IN; } break; - case 457: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy110)); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 465: /* in_predicate_value ::= NK_LP literal_list NK_RP */ +{ yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy220)); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 459: /* boolean_value_expression ::= NOT boolean_primary */ + case 467: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); - yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy42), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); + yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy140), NULL)); } - yymsp[-1].minor.yy42 = yylhsminor.yy42; + yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 460: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 468: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); - yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); + yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), releaseRawExprNode(pCxt, yymsp[0].minor.yy140))); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 461: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 469: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); - yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); + yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), releaseRawExprNode(pCxt, yymsp[0].minor.yy140))); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 467: /* from_clause_opt ::= FROM table_reference_list */ - case 496: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==496); - case 527: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==527); -{ yymsp[-1].minor.yy42 = yymsp[0].minor.yy42; } + case 475: /* from_clause_opt ::= FROM table_reference_list */ + case 504: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==504); + case 535: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==535); +{ yymsp[-1].minor.yy140 = yymsp[0].minor.yy140; } break; - case 469: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy42 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy42, yymsp[0].minor.yy42, NULL); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 477: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +{ yylhsminor.yy140 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy140, yymsp[0].minor.yy140, NULL); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 472: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy42 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy225, &yymsp[0].minor.yy225); } - yymsp[-1].minor.yy42 = yylhsminor.yy42; + case 480: /* table_primary ::= table_name alias_opt */ +{ yylhsminor.yy140 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy881, &yymsp[0].minor.yy881); } + yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 473: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy42 = createRealTableNode(pCxt, &yymsp[-3].minor.yy225, &yymsp[-1].minor.yy225, &yymsp[0].minor.yy225); } - yymsp[-3].minor.yy42 = yylhsminor.yy42; + case 481: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +{ yylhsminor.yy140 = createRealTableNode(pCxt, &yymsp[-3].minor.yy881, &yymsp[-1].minor.yy881, &yymsp[0].minor.yy881); } + yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 474: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy42 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy42), &yymsp[0].minor.yy225); } - yymsp[-1].minor.yy42 = yylhsminor.yy42; + case 482: /* table_primary ::= subquery alias_opt */ +{ yylhsminor.yy140 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy140), &yymsp[0].minor.yy881); } + yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 476: /* alias_opt ::= */ -{ yymsp[1].minor.yy225 = nil_token; } + case 484: /* alias_opt ::= */ +{ yymsp[1].minor.yy881 = nil_token; } break; - case 478: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy225 = yymsp[0].minor.yy225; } + case 486: /* alias_opt ::= AS table_alias */ +{ yymsp[-1].minor.yy881 = yymsp[0].minor.yy881; } break; - case 479: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 480: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==480); -{ yymsp[-2].minor.yy42 = yymsp[-1].minor.yy42; } + case 487: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 488: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==488); +{ yymsp[-2].minor.yy140 = yymsp[-1].minor.yy140; } break; - case 481: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy42 = createJoinTableNode(pCxt, yymsp[-4].minor.yy638, yymsp[-5].minor.yy42, yymsp[-2].minor.yy42, yymsp[0].minor.yy42); } - yymsp[-5].minor.yy42 = yylhsminor.yy42; + case 489: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ +{ yylhsminor.yy140 = createJoinTableNode(pCxt, yymsp[-4].minor.yy852, yymsp[-5].minor.yy140, yymsp[-2].minor.yy140, yymsp[0].minor.yy140); } + yymsp[-5].minor.yy140 = yylhsminor.yy140; break; - case 482: /* join_type ::= */ -{ yymsp[1].minor.yy638 = JOIN_TYPE_INNER; } + case 490: /* join_type ::= */ +{ yymsp[1].minor.yy852 = JOIN_TYPE_INNER; } break; - case 483: /* join_type ::= INNER */ -{ yymsp[0].minor.yy638 = JOIN_TYPE_INNER; } + case 491: /* join_type ::= INNER */ +{ yymsp[0].minor.yy852 = JOIN_TYPE_INNER; } break; - case 484: /* 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 492: /* 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.yy42 = createSelectStmt(pCxt, yymsp[-10].minor.yy103, yymsp[-9].minor.yy110, yymsp[-8].minor.yy42); - yymsp[-11].minor.yy42 = addWhereClause(pCxt, yymsp[-11].minor.yy42, yymsp[-7].minor.yy42); - yymsp[-11].minor.yy42 = addPartitionByClause(pCxt, yymsp[-11].minor.yy42, yymsp[-6].minor.yy110); - yymsp[-11].minor.yy42 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy42, yymsp[-2].minor.yy42); - yymsp[-11].minor.yy42 = addGroupByClause(pCxt, yymsp[-11].minor.yy42, yymsp[-1].minor.yy110); - yymsp[-11].minor.yy42 = addHavingClause(pCxt, yymsp[-11].minor.yy42, yymsp[0].minor.yy42); - yymsp[-11].minor.yy42 = addRangeClause(pCxt, yymsp[-11].minor.yy42, yymsp[-5].minor.yy42); - yymsp[-11].minor.yy42 = addEveryClause(pCxt, yymsp[-11].minor.yy42, yymsp[-4].minor.yy42); - yymsp[-11].minor.yy42 = addFillClause(pCxt, yymsp[-11].minor.yy42, yymsp[-3].minor.yy42); + yymsp[-11].minor.yy140 = createSelectStmt(pCxt, yymsp[-10].minor.yy587, yymsp[-9].minor.yy220, yymsp[-8].minor.yy140); + yymsp[-11].minor.yy140 = addWhereClause(pCxt, yymsp[-11].minor.yy140, yymsp[-7].minor.yy140); + yymsp[-11].minor.yy140 = addPartitionByClause(pCxt, yymsp[-11].minor.yy140, yymsp[-6].minor.yy220); + yymsp[-11].minor.yy140 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy140, yymsp[-2].minor.yy140); + yymsp[-11].minor.yy140 = addGroupByClause(pCxt, yymsp[-11].minor.yy140, yymsp[-1].minor.yy220); + yymsp[-11].minor.yy140 = addHavingClause(pCxt, yymsp[-11].minor.yy140, yymsp[0].minor.yy140); + yymsp[-11].minor.yy140 = addRangeClause(pCxt, yymsp[-11].minor.yy140, yymsp[-5].minor.yy140); + yymsp[-11].minor.yy140 = addEveryClause(pCxt, yymsp[-11].minor.yy140, yymsp[-4].minor.yy140); + yymsp[-11].minor.yy140 = addFillClause(pCxt, yymsp[-11].minor.yy140, yymsp[-3].minor.yy140); } break; - case 487: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy103 = false; } + case 495: /* set_quantifier_opt ::= ALL */ +{ yymsp[0].minor.yy587 = false; } break; - case 490: /* select_item ::= NK_STAR */ -{ yylhsminor.yy42 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy42 = yylhsminor.yy42; + case 498: /* select_item ::= NK_STAR */ +{ yylhsminor.yy140 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 492: /* select_item ::= common_expression column_alias */ - case 502: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==502); -{ yylhsminor.yy42 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy42), &yymsp[0].minor.yy225); } - yymsp[-1].minor.yy42 = yylhsminor.yy42; + case 500: /* select_item ::= common_expression column_alias */ + case 510: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==510); +{ yylhsminor.yy140 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy140), &yymsp[0].minor.yy881); } + yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 493: /* select_item ::= common_expression AS column_alias */ - case 503: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==503); -{ yylhsminor.yy42 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), &yymsp[0].minor.yy225); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 501: /* select_item ::= common_expression AS column_alias */ + case 511: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==511); +{ yylhsminor.yy140 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), &yymsp[0].minor.yy881); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 498: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 523: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==523); - case 542: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==542); -{ yymsp[-2].minor.yy110 = yymsp[0].minor.yy110; } + case 506: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 531: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==531); + case 550: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==550); +{ yymsp[-2].minor.yy220 = yymsp[0].minor.yy220; } break; - case 505: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ -{ yymsp[-5].minor.yy42 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), releaseRawExprNode(pCxt, yymsp[-1].minor.yy42)); } + case 513: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ +{ yymsp[-5].minor.yy140 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), releaseRawExprNode(pCxt, yymsp[-1].minor.yy140)); } break; - case 506: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy42 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy42)); } + case 514: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ +{ yymsp[-3].minor.yy140 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy140)); } break; - case 507: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy42 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), NULL, yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } + case 515: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-5].minor.yy140 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), NULL, yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; - case 508: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-7].minor.yy42 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy42), releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } + case 516: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-7].minor.yy140 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy140), releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; - case 509: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ -{ yymsp[-6].minor.yy42 = createEventWindowNode(pCxt, yymsp[-3].minor.yy42, yymsp[0].minor.yy42); } + case 517: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ +{ yymsp[-6].minor.yy140 = createEventWindowNode(pCxt, yymsp[-3].minor.yy140, yymsp[0].minor.yy140); } break; - case 513: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy42 = createFillNode(pCxt, yymsp[-1].minor.yy410, NULL); } + case 521: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy140 = createFillNode(pCxt, yymsp[-1].minor.yy174, NULL); } break; - case 514: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ -{ yymsp[-5].minor.yy42 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy110)); } + case 522: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ +{ yymsp[-5].minor.yy140 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy220)); } break; - case 515: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */ -{ yymsp[-5].minor.yy42 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy110)); } + case 523: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */ +{ yymsp[-5].minor.yy140 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy220)); } break; - case 516: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy410 = FILL_MODE_NONE; } + case 524: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy174 = FILL_MODE_NONE; } break; - case 517: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy410 = FILL_MODE_PREV; } + case 525: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy174 = FILL_MODE_PREV; } break; - case 518: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy410 = FILL_MODE_NULL; } + case 526: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy174 = FILL_MODE_NULL; } break; - case 519: /* fill_mode ::= NULL_F */ -{ yymsp[0].minor.yy410 = FILL_MODE_NULL_F; } + case 527: /* fill_mode ::= NULL_F */ +{ yymsp[0].minor.yy174 = FILL_MODE_NULL_F; } break; - case 520: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy410 = FILL_MODE_LINEAR; } + case 528: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy174 = FILL_MODE_LINEAR; } break; - case 521: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy410 = FILL_MODE_NEXT; } + case 529: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy174 = FILL_MODE_NEXT; } break; - case 524: /* group_by_list ::= expr_or_subquery */ -{ yylhsminor.yy110 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[0].minor.yy110 = yylhsminor.yy110; + case 532: /* group_by_list ::= expr_or_subquery */ +{ yylhsminor.yy220 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy140))); } + yymsp[0].minor.yy220 = yylhsminor.yy220; break; - case 525: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ -{ yylhsminor.yy110 = addNodeToList(pCxt, yymsp[-2].minor.yy110, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy110 = yylhsminor.yy110; + case 533: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ +{ yylhsminor.yy220 = addNodeToList(pCxt, yymsp[-2].minor.yy220, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy140))); } + yymsp[-2].minor.yy220 = yylhsminor.yy220; break; - case 529: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ -{ yymsp[-5].minor.yy42 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), releaseRawExprNode(pCxt, yymsp[-1].minor.yy42)); } + case 537: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ +{ yymsp[-5].minor.yy140 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), releaseRawExprNode(pCxt, yymsp[-1].minor.yy140)); } break; - case 532: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 540: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy42 = addOrderByClause(pCxt, yymsp[-3].minor.yy42, yymsp[-2].minor.yy110); - yylhsminor.yy42 = addSlimitClause(pCxt, yylhsminor.yy42, yymsp[-1].minor.yy42); - yylhsminor.yy42 = addLimitClause(pCxt, yylhsminor.yy42, yymsp[0].minor.yy42); + yylhsminor.yy140 = addOrderByClause(pCxt, yymsp[-3].minor.yy140, yymsp[-2].minor.yy220); + yylhsminor.yy140 = addSlimitClause(pCxt, yylhsminor.yy140, yymsp[-1].minor.yy140); + yylhsminor.yy140 = addLimitClause(pCxt, yylhsminor.yy140, yymsp[0].minor.yy140); } - yymsp[-3].minor.yy42 = yylhsminor.yy42; + yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 535: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ -{ yylhsminor.yy42 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy42, yymsp[0].minor.yy42); } - yymsp[-3].minor.yy42 = yylhsminor.yy42; + case 543: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ +{ yylhsminor.yy140 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy140, yymsp[0].minor.yy140); } + yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 536: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ -{ yylhsminor.yy42 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy42, yymsp[0].minor.yy42); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 544: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ +{ yylhsminor.yy140 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy140, yymsp[0].minor.yy140); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 544: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 548: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==548); -{ yymsp[-1].minor.yy42 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 552: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 556: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==556); +{ yymsp[-1].minor.yy140 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 545: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 549: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==549); -{ yymsp[-3].minor.yy42 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 553: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 557: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==557); +{ yymsp[-3].minor.yy140 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 546: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 550: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==550); -{ yymsp[-3].minor.yy42 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 554: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 558: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==558); +{ yymsp[-3].minor.yy140 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 551: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy42); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 559: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy140); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 556: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy42 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), yymsp[-1].minor.yy106, yymsp[0].minor.yy599); } - yymsp[-2].minor.yy42 = yylhsminor.yy42; + case 564: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy140 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), yymsp[-1].minor.yy866, yymsp[0].minor.yy697); } + yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 557: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy106 = ORDER_ASC; } + case 565: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy866 = ORDER_ASC; } break; - case 558: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy106 = ORDER_ASC; } + case 566: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy866 = ORDER_ASC; } break; - case 559: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy106 = ORDER_DESC; } + case 567: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy866 = ORDER_DESC; } break; - case 560: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy599 = NULL_ORDER_DEFAULT; } + case 568: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy697 = NULL_ORDER_DEFAULT; } break; - case 561: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy599 = NULL_ORDER_FIRST; } + case 569: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy697 = NULL_ORDER_FIRST; } break; - case 562: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy599 = NULL_ORDER_LAST; } + case 570: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy697 = NULL_ORDER_LAST; } break; default: break; diff --git a/source/libs/parser/test/mockCatalog.cpp b/source/libs/parser/test/mockCatalog.cpp index c3f6c3ac72..1af214bfb4 100644 --- a/source/libs/parser/test/mockCatalog.cpp +++ b/source/libs/parser/test/mockCatalog.cpp @@ -226,6 +226,7 @@ void generateDatabases(MockCatalogService* mcs) { generateTestTables(g_mockCatalogService.get(), "cache_db"); generateTestStables(g_mockCatalogService.get(), "cache_db"); mcs->createDatabase("rollup_db", true); + mcs->createDatabase("testus", false, 0, TSDB_TIME_PRECISION_NANO); } } // namespace @@ -252,7 +253,8 @@ int32_t __catalogGetCachedTableHashVgroup(SCatalog* pCtg, const SName* pTableNam return code; } -int32_t __catalogGetCachedTableVgMeta(SCatalog* pCtg, const SName* pTableName, SVgroupInfo* pVgroup, STableMeta** pTableMeta) { +int32_t __catalogGetCachedTableVgMeta(SCatalog* pCtg, const SName* pTableName, SVgroupInfo* pVgroup, + STableMeta** pTableMeta) { int32_t code = g_mockCatalogService->catalogGetTableMeta(pTableName, pTableMeta, true); if (code) return code; code = g_mockCatalogService->catalogGetTableHashVgroup(pTableName, pVgroup, true); diff --git a/source/libs/parser/test/mockCatalogService.cpp b/source/libs/parser/test/mockCatalogService.cpp index 71b7c1a678..4d1ef597d0 100644 --- a/source/libs/parser/test/mockCatalogService.cpp +++ b/source/libs/parser/test/mockCatalogService.cpp @@ -346,12 +346,13 @@ class MockCatalogServiceImpl { dnode_.insert(std::make_pair(dnodeId, epSet)); } - void createDatabase(const string& db, bool rollup, int8_t cacheLast) { + void createDatabase(const string& db, bool rollup, int8_t cacheLast, int8_t precision) { SDbCfgInfo cfg = {0}; if (rollup) { cfg.pRetensions = taosArrayInit(TARRAY_MIN_SIZE, sizeof(SRetention)); } cfg.cacheLast = cacheLast; + cfg.precision = precision; dbCfg_.insert(std::make_pair(db, cfg)); } @@ -681,8 +682,8 @@ void MockCatalogService::createDnode(int32_t dnodeId, const string& host, int16_ impl_->createDnode(dnodeId, host, port); } -void MockCatalogService::createDatabase(const string& db, bool rollup, int8_t cacheLast) { - impl_->createDatabase(db, rollup, cacheLast); +void MockCatalogService::createDatabase(const string& db, bool rollup, int8_t cacheLast, int8_t precision) { + impl_->createDatabase(db, rollup, cacheLast, precision); } int32_t MockCatalogService::catalogGetTableMeta(const SName* pTableName, STableMeta** pTableMeta, diff --git a/source/libs/parser/test/mockCatalogService.h b/source/libs/parser/test/mockCatalogService.h index acd7fab8e1..cc955df2b0 100644 --- a/source/libs/parser/test/mockCatalogService.h +++ b/source/libs/parser/test/mockCatalogService.h @@ -65,7 +65,8 @@ class MockCatalogService { void createFunction(const std::string& func, int8_t funcType, int8_t outputType, int32_t outputLen, int32_t bufSize); void createSmaIndex(const SMCreateSmaReq* pReq); void createDnode(int32_t dnodeId, const std::string& host, int16_t port); - void createDatabase(const std::string& db, bool rollup = false, int8_t cacheLast = 0); + void createDatabase(const std::string& db, bool rollup = false, int8_t cacheLast = 0, + int8_t precision = TSDB_TIME_PRECISION_MILLI); int32_t catalogGetTableMeta(const SName* pTableName, STableMeta** pTableMeta, bool onlyCache = false) const; int32_t catalogGetTableHashVgroup(const SName* pTableName, SVgroupInfo* vgInfo, bool onlyCache = false) const; diff --git a/source/libs/parser/test/parInitialCTest.cpp b/source/libs/parser/test/parInitialCTest.cpp index 2dac35590e..c36402e8e0 100644 --- a/source/libs/parser/test/parInitialCTest.cpp +++ b/source/libs/parser/test/parInitialCTest.cpp @@ -22,12 +22,16 @@ namespace ParserTest { class ParserInitialCTest : public ParserDdlTest {}; /* - * COMPACT DATABASE db_name + * COMPACT DATABASE db_name [START WITH start_time] [END WITH END_time] */ TEST_F(ParserInitialCTest, compact) { SCompactDbReq expect = {0}; - auto setCompactDbReq = [&](const char* pDb) { snprintf(expect.db, sizeof(expect.db), "0.%s", pDb); }; + auto setCompactDbReq = [&](const char* pDb, int64_t start = INT64_MIN, int64_t end = INT64_MAX) { + snprintf(expect.db, sizeof(expect.db), "0.%s", pDb); + expect.timeRange.skey = start; + expect.timeRange.ekey = end; + }; setCheckDdlFunc([&](const SQuery* pQuery, ParserStage stage) { ASSERT_EQ(nodeType(pQuery->pRoot), QUERY_NODE_COMPACT_DATABASE_STMT); @@ -35,10 +39,21 @@ TEST_F(ParserInitialCTest, compact) { SCompactDbReq req = {0}; ASSERT_EQ(tDeserializeSCompactDbReq(pQuery->pCmdMsg->pMsg, pQuery->pCmdMsg->msgLen, &req), TSDB_CODE_SUCCESS); ASSERT_EQ(std::string(req.db), std::string(expect.db)); + ASSERT_EQ(req.timeRange.skey, expect.timeRange.skey); + ASSERT_EQ(req.timeRange.ekey, expect.timeRange.ekey); }); - setCompactDbReq("wxy_db"); - run("COMPACT DATABASE wxy_db"); + setCompactDbReq("test"); + run("COMPACT DATABASE test"); + + setCompactDbReq("test", 1678168883000, 1678255283000); + run("COMPACT DATABASE test START WITH '2023-03-07 14:01:23' END WITH '2023-03-08 14:01:23'"); + + setCompactDbReq("testus", 1673071283000000000); + run("COMPACT DATABASE testus START WITH TIMESTAMP '2023-01-07 14:01:23'"); + + setCompactDbReq("testus", INT64_MIN, 1675749683000000000); + run("COMPACT DATABASE testus END WITH 1675749683000000000"); } /* diff --git a/source/libs/parser/test/parTestUtil.cpp b/source/libs/parser/test/parTestUtil.cpp index f18dd4f17f..dfe9fcf96e 100644 --- a/source/libs/parser/test/parTestUtil.cpp +++ b/source/libs/parser/test/parTestUtil.cpp @@ -65,15 +65,16 @@ int32_t getLogLevel() { return g_logLevel; } class ParserTestBaseImpl { public: - ParserTestBaseImpl(ParserTestBase* pBase) : pBase_(pBase), sqlNo_(0), sqlNum_(0) {} + ParserTestBaseImpl(ParserTestBase* pBase) : pBase_(pBase), sqlNo_(0), sqlNum_(0) { + caseEnv_.numOfSkipSql_ = g_skipSql; + caseEnv_.numOfLimitSql_ = g_limitSql; + } void login(const std::string& user) { caseEnv_.user_ = user; } void useDb(const string& acctId, const string& db) { caseEnv_.acctId_ = acctId; caseEnv_.db_ = db; - caseEnv_.numOfSkipSql_ = g_skipSql; - caseEnv_.numOfLimitSql_ = g_limitSql; } void run(const string& sql, int32_t expect, ParserStage checkStage) { From 383459441d9c12a64ff2f6017a9fe97f344f91f1 Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Mon, 6 Mar 2023 20:24:47 +0800 Subject: [PATCH 050/154] enh: simplify conditions of triggering snapshot --- source/libs/sync/src/syncPipeline.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/libs/sync/src/syncPipeline.c b/source/libs/sync/src/syncPipeline.c index faa44a626c..cc1a40a430 100644 --- a/source/libs/sync/src/syncPipeline.c +++ b/source/libs/sync/src/syncPipeline.c @@ -742,7 +742,8 @@ int32_t syncLogReplMgrProcessReplyAsRecovery(SSyncLogReplMgr* pMgr, SSyncNode* p if (pMsg->matchIndex < pNode->pLogBuf->matchIndex) { term = syncLogReplMgrGetPrevLogTerm(pMgr, pNode, index + 1); - if (term < 0 || (term != pMsg->lastMatchTerm && (index + 1 == firstVer || index == firstVer))) { + if ((index + 1 < firstVer) || (term < 0) || + (term != pMsg->lastMatchTerm && (index + 1 == firstVer || index == firstVer))) { ASSERT(term >= 0 || terrno == TSDB_CODE_WAL_LOG_NOT_EXIST); if (syncNodeStartSnapshot(pNode, &destId) < 0) { sError("vgId:%d, failed to start snapshot for peer dnode:%d", pNode->vgId, DID(&destId)); From 8e6534d9f3c55c757268b5ee5dd9d9c2189c0548 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 7 Mar 2023 16:06:56 +0800 Subject: [PATCH 051/154] fix: insert data crash after empty table last_row cache --- source/dnode/vnode/src/tsdb/tsdbCache.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index 425bd2ca1c..1fdb9dd972 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -257,9 +257,6 @@ int32_t tsdbCacheInsertLastrow(SLRUCache *pCache, STsdb *pTsdb, tb_uid_t uid, TS SLastCol lastCol = {.ts = keyTs, .colVal = colVal}; if (IS_VAR_DATA_TYPE(colVal.type) && colVal.value.nData > 0) { - SLastCol *pLastCol = (SLastCol *)taosArrayGet(pLast, iCol); - taosMemoryFree(pLastCol->colVal.value.pData); - lastCol.colVal.value.pData = taosMemoryMalloc(colVal.value.nData); if (lastCol.colVal.value.pData == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; From ab5cce806c8b9d7406381917512f1de21186efed Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 7 Mar 2023 16:25:46 +0800 Subject: [PATCH 052/154] fix: fix: after the last_row cache is created, modify the schema and query again, resulting in taosd crash --- source/dnode/vnode/src/tsdb/tsdbCacheRead.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbCacheRead.c b/source/dnode/vnode/src/tsdb/tsdbCacheRead.c index 0ee42366de..5528b6313c 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCacheRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbCacheRead.c @@ -80,7 +80,12 @@ static int32_t saveOneRow(SArray* pRow, SSDataBlock* pBlock, SCacheRowsReader* p SLastCol* pColVal = (SLastCol*)taosArrayGet(pRow, 0); colDataSetVal(pColInfoData, numOfRows, (const char*)&pColVal->ts, false); } else { - int32_t slotId = slotIds[i]; + int32_t slotId = slotIds[i]; + // add check for null value, caused by the modification of table schema (new column added). + if (slotId >= taosArrayGetSize(pRow)) { + colDataSetNULL(pColInfoData, numOfRows); + continue; + } SLastCol* pColVal = (SLastCol*)taosArrayGet(pRow, slotId); SColVal* pVal = &pColVal->colVal; From 21c18a4a9b14064371067664e03cc8185eda1224 Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Tue, 7 Mar 2023 16:34:02 +0800 Subject: [PATCH 053/154] enh: use syncNodeReplicateReset in syncNodeOnSnapshotRsp --- source/libs/sync/inc/syncReplication.h | 2 +- source/libs/sync/src/syncReplication.c | 9 +++++++++ source/libs/sync/src/syncSnapshot.c | 10 +++------- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/source/libs/sync/inc/syncReplication.h b/source/libs/sync/inc/syncReplication.h index f2e240344f..a55fd7ead3 100644 --- a/source/libs/sync/inc/syncReplication.h +++ b/source/libs/sync/inc/syncReplication.h @@ -51,7 +51,7 @@ int32_t syncNodeHeartbeatPeers(SSyncNode* pSyncNode); int32_t syncNodeSendHeartbeat(SSyncNode* pSyncNode, const SRaftId* pDestId, SRpcMsg* pMsg); int32_t syncNodeReplicate(SSyncNode* pSyncNode); -int32_t syncNodeReplicateOne(SSyncNode* pSyncNode, SRaftId* pDestId, bool snapshot); +int32_t syncNodeReplicateReset(SSyncNode* pSyncNode, SRaftId* pDestId); int32_t syncNodeReplicateWithoutLock(SSyncNode* pNode); int32_t syncNodeSendAppendEntries(SSyncNode* pNode, const SRaftId* destRaftId, SRpcMsg* pRpcMsg); diff --git a/source/libs/sync/src/syncReplication.c b/source/libs/sync/src/syncReplication.c index 8cdf821cff..1d94b288d3 100644 --- a/source/libs/sync/src/syncReplication.c +++ b/source/libs/sync/src/syncReplication.c @@ -48,6 +48,15 @@ int32_t syncNodeMaybeSendAppendEntries(SSyncNode* pSyncNode, const SRaftId* destRaftId, SRpcMsg* pRpcMsg); +int32_t syncNodeReplicateReset(SSyncNode* pNode, SRaftId* pDestId) { + SSyncLogBuffer* pBuf = pNode->pLogBuf; + taosThreadMutexLock(&pBuf->mutex); + SSyncLogReplMgr* pMgr = syncNodeGetLogReplMgr(pNode, pDestId); + syncLogReplMgrReset(pMgr); + taosThreadMutexUnlock(&pBuf->mutex); + return 0; +} + int32_t syncNodeReplicate(SSyncNode* pNode) { SSyncLogBuffer* pBuf = pNode->pLogBuf; taosThreadMutexLock(&pBuf->mutex); diff --git a/source/libs/sync/src/syncSnapshot.c b/source/libs/sync/src/syncSnapshot.c index 381327d4d7..413d6adf05 100644 --- a/source/libs/sync/src/syncSnapshot.c +++ b/source/libs/sync/src/syncSnapshot.c @@ -992,8 +992,7 @@ int32_t syncNodeOnSnapshotRsp(SSyncNode *pSyncNode, const SRpcMsg *pRpcMsg) { if (pMsg->ack == SYNC_SNAPSHOT_SEQ_END) { syncLogRecvSyncSnapshotRsp(pSyncNode, pMsg, "process seq end"); snapshotSenderStop(pSender, true); - SSyncLogReplMgr *pMgr = syncNodeGetLogReplMgr(pSyncNode, &pMsg->srcId); - syncLogReplMgrReset(pMgr); + syncNodeReplicateReset(pSyncNode, &pMsg->srcId); return 0; } @@ -1018,8 +1017,7 @@ int32_t syncNodeOnSnapshotRsp(SSyncNode *pSyncNode, const SRpcMsg *pRpcMsg) { syncLogRecvSyncSnapshotRsp(pSyncNode, pMsg, "receive error ack"); sSError(pSender, "snapshot sender receive error ack:%d, my seq:%d", pMsg->ack, pSender->seq); snapshotSenderStop(pSender, true); - SSyncLogReplMgr *pMgr = syncNodeGetLogReplMgr(pSyncNode, &pMsg->srcId); - syncLogReplMgrReset(pMgr); + syncNodeReplicateReset(pSyncNode, &pMsg->srcId); return -1; } @@ -1027,8 +1025,6 @@ int32_t syncNodeOnSnapshotRsp(SSyncNode *pSyncNode, const SRpcMsg *pRpcMsg) { _ERROR: snapshotSenderStop(pSender, true); - SSyncLogReplMgr *pMgr = syncNodeGetLogReplMgr(pSyncNode, &pMsg->srcId); - syncLogReplMgrReset(pMgr); - + syncNodeReplicateReset(pSyncNode, &pMsg->srcId); return -1; } From eca97bf5b49e4f1ceb251a193b877b8873fbd7fc Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Tue, 7 Mar 2023 16:44:47 +0800 Subject: [PATCH 054/154] enh: keep extra raft Logs before minimum match index --- source/libs/sync/src/syncMain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 9601cd6ab0..04e4859c5e 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -301,7 +301,7 @@ int32_t syncBeginSnapshot(int64_t rid, int64_t lastApplyIndex) { syncNodeRelease(pSyncNode); return 0; } - logRetention = TMAX(logRetention, lastApplyIndex - pSyncNode->minMatchIndex); + logRetention = TMAX(logRetention, lastApplyIndex - pSyncNode->minMatchIndex + logRetention); } _DEL_WAL: From 14e62eca8cd295bfffec1fb6f6166a13f887cbda Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Tue, 7 Mar 2023 17:51:54 +0800 Subject: [PATCH 055/154] test: add stream and topic in compatibility case --- tests/system-test/0-others/compa4096.json | 2 +- tests/system-test/0-others/compatibility.py | 12 +++++------ tests/system-test/0-others/tmqBasic.json | 24 +++++++++++++++++++++ tests/system-test/2-query/tsbsQuery.py | 2 +- 4 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 tests/system-test/0-others/tmqBasic.json diff --git a/tests/system-test/0-others/compa4096.json b/tests/system-test/0-others/compa4096.json index 49e0ec1d8a..5cc5d2084d 100644 --- a/tests/system-test/0-others/compa4096.json +++ b/tests/system-test/0-others/compa4096.json @@ -41,7 +41,7 @@ "interlace_rows": 0, "line_protocol": null, "tcp_transfer": "no", - "insert_rows": 1000, + "insert_rows": 10000, "childtable_limit": 0, "childtable_offset": 0, "rows_per_tbl": 0, diff --git a/tests/system-test/0-others/compatibility.py b/tests/system-test/0-others/compatibility.py index b9d0e1844b..21d307ce37 100644 --- a/tests/system-test/0-others/compatibility.py +++ b/tests/system-test/0-others/compatibility.py @@ -134,11 +134,11 @@ class TDTestCase: os.system(f"LD_LIBRARY_PATH=/usr/lib taos -s 'use test;create stream current_stream into current_stream_output_stb as select _wstart as `start`, _wend as wend, max(current) as max_current from meters where voltage <= 220 interval (5s);' ") os.system('LD_LIBRARY_PATH=/usr/lib taos -s "use test;create stream power_stream into power_stream_output_stb as select ts, concat_ws(\\".\\", location, tbname) as meter_location, current*voltage*cos(phase) as active_power, current*voltage*sin(phase) as reactive_power from meters partition by tbname;" ') os.system('LD_LIBRARY_PATH=/usr/lib taos -s "use test;show streams;" ') - os.system(f"cd {scriptsPath} && python3 testRoll.py") + os.system(f"sed -i 's/\/etc\/taos/{cPath}/' 0-others/tmqBasic.json ") + # os.system("LD_LIBRARY_PATH=/usr/lib taosBenchmark -f 0-others/tmqBasic.json -y ") + os.system('LD_LIBRARY_PATH=/usr/lib taos -s "create topic if not exists tmq_test_topic as select current,voltage,phase from test.meters where voltage <= 106 and current <= 5;" ') os.system('LD_LIBRARY_PATH=/usr/lib taos -s "use test;show topics;" ') - # print(f"start taosd: nohup taosd -c {cPath} & ") - # os.system(f" nohup taosd -c {cPath} & " ) tdLog.info(" LD_LIBRARY_PATH=/usr/lib taosBenchmark -f 0-others/compa4096.json -y ") os.system("LD_LIBRARY_PATH=/usr/lib taosBenchmark -f 0-others/compa4096.json -y") os.system("LD_LIBRARY_PATH=/usr/lib taos -s 'flush database db4096 '") @@ -170,7 +170,7 @@ class TDTestCase: # tdsql.query(f"select count(*) from {stb}") # tdsql.checkData(0,0,tableNumbers*recordNumbers2) tdsql.query(f"select count(*) from db4096.stb0") - tdsql.checkData(0,0,5000) + tdsql.checkData(0,0,50000) tdsql=tdCom.newTdSql() tdLog.printNoPrefix(f"==========step4:verify backticks in taos Sql-TD18542") @@ -209,8 +209,8 @@ class TDTestCase: tdLog.exit("%s(%d) failed" % args) tdsql.query("show streams;") tdsql.checkRows(2) - tdsql.execute("insert into tmq_test.tb1 values (now, 11, 3.0, 'tmq test1');") - tdsql.execute("insert into tmq_test.tb2 values (now, 22, 3.0, 'tmq test2');") + tdsql.execute("insert into test.d80 values (now+1s, 11, 103, 0.21);") + tdsql.execute("insert into test.d9 values (now+5s, 4.3, 104, 0.4);") conn = taos.connect() diff --git a/tests/system-test/0-others/tmqBasic.json b/tests/system-test/0-others/tmqBasic.json new file mode 100644 index 0000000000..24e815708a --- /dev/null +++ b/tests/system-test/0-others/tmqBasic.json @@ -0,0 +1,24 @@ +{ + "filetype": "subscribe", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "confirm_parameter_prompt": "no", + "tmq_info": { + "concurrent": 1, + "poll_delay": 10000, + "group.id": "grpId_0", + "client.id": "clientId", + "auto.offset.reset": "earliest", + "enable.auto.commit": "true", + "auto.commit.interval.ms": 1000, + "enable.heartbeat.background": "true", + "experimental.snapshot.enable": "true", + "msg.with.table.name": "false", + "topic_list": [ + {"name": "tmq_topic_1", "sql": "select current,voltage,phase from test.meters where voltage <= 106 ;"} + ] + } +} \ No newline at end of file diff --git a/tests/system-test/2-query/tsbsQuery.py b/tests/system-test/2-query/tsbsQuery.py index 106d43ea38..4f415550b8 100644 --- a/tests/system-test/2-query/tsbsQuery.py +++ b/tests/system-test/2-query/tsbsQuery.py @@ -86,7 +86,7 @@ class TDTestCase: self.ctbNums=ctbNums rowNUms=5000 ts=1451606400000 - tdSql.execute(f"create database {dbname};") + tdSql.execute(f"create database {dbname} cachemodel 'both';") tdSql.execute(f"use {dbname} ") tdSql.execute(f''' create table {stabname1} (ts timestamp,latitude double,longitude double,elevation double,velocity double,heading double,grade double,fuel_consumption double) tags (name binary(30),fleet binary(30),driver binary(30),model binary(30),device_version binary(30),load_capacity double,fuel_capacity double,nominal_fuel_consumption double); From 9e49229f0e9b39bdc9c7a0971c5b9b778f31cae6 Mon Sep 17 00:00:00 2001 From: sunpeng Date: Tue, 7 Mar 2023 18:10:06 +0800 Subject: [PATCH 056/154] enh: reqid to hex --- cmake/taosadapter_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taosadapter_CMakeLists.txt.in b/cmake/taosadapter_CMakeLists.txt.in index 0ff1371618..357a79715a 100644 --- a/cmake/taosadapter_CMakeLists.txt.in +++ b/cmake/taosadapter_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taosadapter ExternalProject_Add(taosadapter GIT_REPOSITORY https://github.com/taosdata/taosadapter.git - GIT_TAG 7920f98 + GIT_TAG 97d717d SOURCE_DIR "${TD_SOURCE_DIR}/tools/taosadapter" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From ab86f6abee379c2f4e5d4c6f4743463e4b106f55 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 7 Mar 2023 18:15:17 +0800 Subject: [PATCH 057/154] fix: taosd crash when modify the schema and query last_row --- source/dnode/vnode/src/tsdb/tsdbCache.c | 118 +++++++++++++----------- 1 file changed, 63 insertions(+), 55 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index 1fdb9dd972..3e34c3b048 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -1262,17 +1262,57 @@ _err: return code; } -static int32_t mergeLastRow(tb_uid_t uid, STsdb *pTsdb, bool *dup, SArray **ppColArray, SCacheRowsReader *pr) { - int32_t code = 0; +static int32_t initLastColArray(STSchema *pTSchema, SArray **ppColArray) { + SArray *pColArray = taosArrayInit(pTSchema->numOfCols, sizeof(SLastCol)); + if (NULL == pColArray) { + return TSDB_CODE_OUT_OF_MEMORY; + } + for (int32_t i = 0; i < pTSchema->numOfCols; ++i) { + SLastCol col = {.ts = 0, .colVal = COL_VAL_NULL(pTSchema->columns[i].colId, pTSchema->columns[i].type)}; + taosArrayPush(pColArray, &col); + } + *ppColArray = pColArray; + return TSDB_CODE_SUCCESS; +} + +static int32_t cloneTSchema(STSchema *pSrc, STSchema **ppDst) { + int32_t len = sizeof(STSchema) + sizeof(STColumn) * pSrc->numOfCols; + *ppDst = taosMemoryMalloc(len); + if (NULL == *ppDst) { + return TSDB_CODE_OUT_OF_MEMORY; + } + memcpy(*ppDst, pSrc, len); + return TSDB_CODE_SUCCESS; +} + +static int32_t updateTSchema(int32_t sversion, SCacheRowsReader *pReader, uint64_t uid) { + if (NULL == pReader->pCurrSchema && sversion == pReader->pSchema->version) { + return cloneTSchema(pReader->pSchema, &pReader->pCurrSchema); + } + + if (NULL != pReader->pCurrSchema && sversion == pReader->pCurrSchema->version) { + return TSDB_CODE_SUCCESS; + } + + taosMemoryFreeClear(pReader->pCurrSchema); + return metaGetTbTSchemaEx(pReader->pTsdb->pVnode->pMeta, pReader->suid, uid, sversion, &pReader->pCurrSchema); +} + +static int32_t mergeLastRow(tb_uid_t uid, STsdb *pTsdb, bool *dup, SArray **ppColArray, SCacheRowsReader *pr) { STSchema *pTSchema = pr->pSchema; // metaGetTbTSchema(pTsdb->pVnode->pMeta, uid, -1, 1); - int16_t nCol = pTSchema->numOfCols; + int16_t nLastCol = pTSchema->numOfCols; int16_t iCol = 0; int16_t noneCol = 0; bool setNoneCol = false; - SArray *pColArray = taosArrayInit(nCol, sizeof(SLastCol)); + SArray *pColArray = NULL; SColVal *pColVal = &(SColVal){0}; + int32_t code = initLastColArray(pTSchema, &pColArray); + if (TSDB_CODE_SUCCESS != code) { + return code; + } + TSKEY lastRowTs = TSKEY_MAX; CacheNextRowIter iter = {0}; @@ -1287,6 +1327,13 @@ static int32_t mergeLastRow(tb_uid_t uid, STsdb *pTsdb, bool *dup, SArray **ppCo break; } + code = updateTSchema(TSDBROW_SVERSION(pRow), pr, uid); + if (TSDB_CODE_SUCCESS != code) { + goto _err; + } + pTSchema = pr->pCurrSchema; + int16_t nCol = pTSchema->numOfCols; + TSKEY rowTs = TSDBROW_TS(pRow); if (lastRowTs == TSKEY_MAX) { @@ -1294,29 +1341,27 @@ static int32_t mergeLastRow(tb_uid_t uid, STsdb *pTsdb, bool *dup, SArray **ppCo STColumn *pTColumn = &pTSchema->columns[0]; *pColVal = COL_VAL_VALUE(pTColumn->colId, pTColumn->type, (SValue){.val = lastRowTs}); - if (taosArrayPush(pColArray, &(SLastCol){.ts = lastRowTs, .colVal = *pColVal}) == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - code = TSDB_CODE_OUT_OF_MEMORY; - goto _err; - } + taosArraySet(pColArray, 0, &(SLastCol){.ts = lastRowTs, .colVal = *pColVal}); for (iCol = 1; iCol < nCol; ++iCol) { + if (iCol >= nLastCol) { + break; + } + SLastCol *pCol = taosArrayGet(pColArray, iCol); + if (pCol->colVal.cid != pTSchema->columns[iCol].colId) { + continue; + } tsdbRowGetColVal(pRow, pTSchema, iCol, pColVal); - SLastCol lastCol = {.ts = lastRowTs, .colVal = *pColVal}; + *pCol = (SLastCol){.ts = lastRowTs, .colVal = *pColVal}; if (IS_VAR_DATA_TYPE(pColVal->type) && pColVal->value.nData > 0) { - lastCol.colVal.value.pData = taosMemoryMalloc(lastCol.colVal.value.nData); - if (lastCol.colVal.value.pData == NULL) { + pCol->colVal.value.pData = taosMemoryMalloc(pCol->colVal.value.nData); + if (pCol->colVal.value.pData == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; code = TSDB_CODE_OUT_OF_MEMORY; goto _err; } - memcpy(lastCol.colVal.value.pData, pColVal->value.pData, pColVal->value.nData); - } - - if (taosArrayPush(pColArray, &lastCol) == NULL) { - code = TSDB_CODE_OUT_OF_MEMORY; - goto _err; + memcpy(pCol->colVal.value.pData, pColVal->value.pData, pColVal->value.nData); } if (COL_VAL_IS_NONE(pColVal) && !setNoneCol) { @@ -1387,43 +1432,6 @@ _err: return code; } -static int32_t cloneTSchema(STSchema *pSrc, STSchema **ppDst) { - int32_t len = sizeof(STSchema) + sizeof(STColumn) * pSrc->numOfCols; - *ppDst = taosMemoryMalloc(len); - if (NULL == *ppDst) { - return TSDB_CODE_OUT_OF_MEMORY; - } - memcpy(*ppDst, pSrc, len); - return TSDB_CODE_SUCCESS; -} - -static int32_t updateTSchema(int32_t sversion, SCacheRowsReader *pReader, uint64_t uid) { - if (NULL == pReader->pCurrSchema && sversion == pReader->pSchema->version) { - return cloneTSchema(pReader->pSchema, &pReader->pCurrSchema); - } - - if (NULL != pReader->pCurrSchema && sversion == pReader->pCurrSchema->version) { - return TSDB_CODE_SUCCESS; - } - - taosMemoryFreeClear(pReader->pCurrSchema); - return metaGetTbTSchemaEx(pReader->pTsdb->pVnode->pMeta, pReader->suid, uid, sversion, &pReader->pCurrSchema); -} - -static int32_t initLastColArray(STSchema *pTSchema, SArray **ppColArray) { - SArray *pColArray = taosArrayInit(pTSchema->numOfCols, sizeof(SLastCol)); - if (NULL == pColArray) { - return TSDB_CODE_OUT_OF_MEMORY; - } - - for (int32_t i = 0; i < pTSchema->numOfCols; ++i) { - SLastCol col = {.ts = 0, .colVal = COL_VAL_NULL(pTSchema->columns[i].colId, pTSchema->columns[i].type)}; - taosArrayPush(pColArray, &col); - } - *ppColArray = pColArray; - return TSDB_CODE_SUCCESS; -} - static int32_t mergeLast(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SCacheRowsReader *pr) { STSchema *pTSchema = pr->pSchema; // metaGetTbTSchema(pTsdb->pVnode->pMeta, uid, -1, 1); int16_t nLastCol = pTSchema->numOfCols; From a063d698901e1a9f4574c29149b683ffbeaa323f Mon Sep 17 00:00:00 2001 From: cadem Date: Tue, 7 Mar 2023 18:27:26 +0800 Subject: [PATCH 058/154] feat/add-reboot-time --- source/common/src/systable.c | 2 ++ source/dnode/mnode/impl/src/mndDnode.c | 3 +++ source/dnode/mnode/impl/src/mndMnode.c | 3 +++ 3 files changed, 8 insertions(+) diff --git a/source/common/src/systable.c b/source/common/src/systable.c index 6198f923f4..4aa47a3819 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -33,6 +33,7 @@ static const SSysDbTableSchema dnodesSchema[] = { {.name = "support_vnodes", .bytes = 2, .type = TSDB_DATA_TYPE_SMALLINT, .sysInfo = true}, {.name = "status", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "create_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, + {.name = "reboot_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, {.name = "note", .bytes = 256 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, }; @@ -42,6 +43,7 @@ static const SSysDbTableSchema mnodesSchema[] = { {.name = "role", .bytes = 12 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "status", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "create_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, + {.name = "reboot_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, }; static const SSysDbTableSchema modulesSchema[] = { diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index 5dd1742e5e..1d9db37a7d 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -1074,6 +1074,9 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); colDataSetVal(pColInfo, numOfRows, (const char *)&pDnode->createdTime, false); + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + colDataSetVal(pColInfo, numOfRows, (const char *)&pDnode->rebootTime, false); + char *b = taosMemoryCalloc(VARSTR_HEADER_SIZE + strlen(offlineReason[pDnode->offlineReason]) + 1, 1); STR_TO_VARSTR(b, online ? "" : offlineReason[pDnode->offlineReason]); diff --git a/source/dnode/mnode/impl/src/mndMnode.c b/source/dnode/mnode/impl/src/mndMnode.c index aada00296e..50fab447e3 100644 --- a/source/dnode/mnode/impl/src/mndMnode.c +++ b/source/dnode/mnode/impl/src/mndMnode.c @@ -644,6 +644,9 @@ static int32_t mndRetrieveMnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); colDataSetVal(pColInfo, numOfRows, (const char *)&pObj->createdTime, false); + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + colDataSetVal(pColInfo, numOfRows, (const char *)&pObj->stateStartTime, false); + numOfRows++; sdbRelease(pSdb, pObj); } From 163224f4e2fb0053bf0d6a3eb78b6cd66adcf787 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 7 Mar 2023 19:42:05 +0800 Subject: [PATCH 059/154] fix: taosd crash when modify the schema and query last_row --- source/dnode/vnode/src/tsdb/tsdbCache.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index 3e34c3b048..c92967f7f4 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -1305,6 +1305,7 @@ static int32_t mergeLastRow(tb_uid_t uid, STsdb *pTsdb, bool *dup, SArray **ppCo int16_t iCol = 0; int16_t noneCol = 0; bool setNoneCol = false; + bool hasRow = false; SArray *pColArray = NULL; SColVal *pColVal = &(SColVal){0}; @@ -1327,6 +1328,8 @@ static int32_t mergeLastRow(tb_uid_t uid, STsdb *pTsdb, bool *dup, SArray **ppCo break; } + hasRow = true; + code = updateTSchema(TSDBROW_SVERSION(pRow), pr, uid); if (TSDB_CODE_SUCCESS != code) { goto _err; @@ -1418,6 +1421,9 @@ static int32_t mergeLastRow(tb_uid_t uid, STsdb *pTsdb, bool *dup, SArray **ppCo //*ppColArray = NULL; // taosArrayDestroy(pColArray); //} else { + if (!hasRow) { + taosArrayClear(pColArray); + } *ppColArray = pColArray; //} From de2fa190293a059c160574a8d51c5bf47e5c4d5c Mon Sep 17 00:00:00 2001 From: xleili Date: Tue, 7 Mar 2023 20:17:01 +0800 Subject: [PATCH 060/154] release: update version in main --- cmake/cmake.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/cmake.version b/cmake/cmake.version index d0d455c73d..d38ac40b90 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.2.6") + SET(TD_VER_NUMBER "3.0.3.0") ENDIF () IF (DEFINED VERCOMPATIBLE) From b876f2d44765f30703be1d5a90b11d3308b10881 Mon Sep 17 00:00:00 2001 From: haoranchen Date: Tue, 7 Mar 2023 20:34:04 +0800 Subject: [PATCH 061/154] test:comment testcase of tmq (#20308) --- tests/parallel_test/cases.task | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 0945c4a7f7..9fbc2155ad 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -733,7 +733,7 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-1ctb-funcNFilter.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py +#,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqAutoCreateTbl.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDnodeRestart.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDnodeRestart1.py From 89281ee488c01e64c1010260d6566406d966691a Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Tue, 7 Mar 2023 21:46:34 +0800 Subject: [PATCH 062/154] compact with time range --- include/common/tmsg.h | 7 ++++--- source/common/src/tmsg.c | 17 ++++++++++++++++- source/dnode/mnode/impl/inc/mndVgroup.h | 3 ++- source/dnode/mnode/impl/src/mndVgroup.c | 16 +++++++++------- source/dnode/vnode/src/inc/vnodeInt.h | 9 ++++----- 5 files changed, 35 insertions(+), 17 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 308246df64..eb283d6534 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1291,9 +1291,10 @@ int32_t tSerializeSDropIdxReq(void* buf, int32_t bufLen, SDropIndexReq* pReq); int32_t tDeserializeSDropIdxReq(void* buf, int32_t bufLen, SDropIndexReq* pReq); typedef struct { - int64_t dbUid; - char db[TSDB_DB_FNAME_LEN]; - int64_t compactStartTime; + int64_t dbUid; + char db[TSDB_DB_FNAME_LEN]; + int64_t compactStartTime; + STimeWindow tw; } SCompactVnodeReq; int32_t tSerializeSCompactVnodeReq(void* buf, int32_t bufLen, SCompactVnodeReq* pReq); diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 5018a517e1..3a9dfa677c 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -4108,6 +4108,11 @@ int32_t tSerializeSCompactVnodeReq(void *buf, int32_t bufLen, SCompactVnodeReq * if (tEncodeI64(&encoder, pReq->dbUid) < 0) return -1; if (tEncodeCStr(&encoder, pReq->db) < 0) return -1; if (tEncodeI64(&encoder, pReq->compactStartTime) < 0) return -1; + + // 1.1 add tw.skey and tw.ekey + if (tEncodeI64(&encoder, pReq->tw.skey) < 0) return -1; + if (tEncodeI64(&encoder, pReq->tw.ekey) < 0) return -1; + tEndEncode(&encoder); int32_t tlen = encoder.pos; @@ -4120,11 +4125,21 @@ int32_t tDeserializeSCompactVnodeReq(void *buf, int32_t bufLen, SCompactVnodeReq tDecoderInit(&decoder, buf, bufLen); if (tStartDecode(&decoder) < 0) return -1; + if (tDecodeI64(&decoder, &pReq->dbUid) < 0) return -1; if (tDecodeCStrTo(&decoder, pReq->db) < 0) return -1; if (tDecodeI64(&decoder, &pReq->compactStartTime) < 0) return -1; - tEndDecode(&decoder); + // 1.1 + if (tDecodeIsEnd(&decoder)) { + pReq->tw.skey = TSKEY_MIN; + pReq->tw.ekey = TSKEY_MAX; + } else { + if (tDecodeI64(&decoder, &pReq->tw.skey) < 0) return -1; + if (tDecodeI64(&decoder, &pReq->tw.ekey) < 0) return -1; + } + + tEndDecode(&decoder); tDecoderClear(&decoder); return 0; } diff --git a/source/dnode/mnode/impl/inc/mndVgroup.h b/source/dnode/mnode/impl/inc/mndVgroup.h index 51eb24f402..0229735952 100644 --- a/source/dnode/mnode/impl/inc/mndVgroup.h +++ b/source/dnode/mnode/impl/inc/mndVgroup.h @@ -43,7 +43,8 @@ int32_t mndAddDropVnodeAction(SMnode *, STrans *pTrans, SDbObj *pDb, SVgObj *pVg int32_t mndSetMoveVgroupsInfoToTrans(SMnode *, STrans *pTrans, int32_t dropDnodeId, bool force); int32_t mndBuildAlterVgroupAction(SMnode *pMnode, STrans *pTrans, SDbObj *pOldDb, SDbObj *pNewDb, SVgObj *pVgroup, SArray *pArray); -int32_t mndBuildCompactVgroupAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup, int64_t compactTs); +int32_t mndBuildCompactVgroupAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup, int64_t compactTs, + STimeWindow tw); void *mndBuildCreateVnodeReq(SMnode *, SDnodeObj *pDnode, SDbObj *pDb, SVgObj *pVgroup, int32_t *pContLen); void *mndBuildDropVnodeReq(SMnode *, SDnodeObj *pDnode, SDbObj *pDb, SVgObj *pVgroup, int32_t *pContLen); diff --git a/source/dnode/mnode/impl/src/mndVgroup.c b/source/dnode/mnode/impl/src/mndVgroup.c index b7bcaf41fd..b5d9353b68 100644 --- a/source/dnode/mnode/impl/src/mndVgroup.c +++ b/source/dnode/mnode/impl/src/mndVgroup.c @@ -2209,11 +2209,12 @@ _OVER: bool mndVgroupInDb(SVgObj *pVgroup, int64_t dbUid) { return !pVgroup->isTsma && pVgroup->dbUid == dbUid; } -static void *mndBuildCompactVnodeReq(SMnode *pMnode, SDbObj *pDb, SVgObj *pVgroup, int32_t *pContLen, - int64_t compactTs) { +static void *mndBuildCompactVnodeReq(SMnode *pMnode, SDbObj *pDb, SVgObj *pVgroup, int32_t *pContLen, int64_t compactTs, + STimeWindow tw) { SCompactVnodeReq compactReq = {0}; compactReq.dbUid = pDb->uid; compactReq.compactStartTime = compactTs; + compactReq.tw = tw; tstrncpy(compactReq.db, pDb->name, TSDB_DB_FNAME_LEN); mInfo("vgId:%d, build compact vnode config req", pVgroup->vgId); @@ -2239,13 +2240,13 @@ static void *mndBuildCompactVnodeReq(SMnode *pMnode, SDbObj *pDb, SVgObj *pVgrou return pReq; } -static int32_t mndAddCompactVnodeAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup, - int64_t compactTs) { +static int32_t mndAddCompactVnodeAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup, int64_t compactTs, + STimeWindow tw) { STransAction action = {0}; action.epSet = mndGetVgroupEpset(pMnode, pVgroup); int32_t contLen = 0; - void *pReq = mndBuildCompactVnodeReq(pMnode, pDb, pVgroup, &contLen, compactTs); + void *pReq = mndBuildCompactVnodeReq(pMnode, pDb, pVgroup, &contLen, compactTs, tw); if (pReq == NULL) return -1; action.pCont = pReq; @@ -2260,7 +2261,8 @@ static int32_t mndAddCompactVnodeAction(SMnode *pMnode, STrans *pTrans, SDbObj * return 0; } -int32_t mndBuildCompactVgroupAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup, int64_t compactTs) { - if (mndAddCompactVnodeAction(pMnode, pTrans, pDb, pVgroup, compactTs) != 0) return -1; +int32_t mndBuildCompactVgroupAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup, int64_t compactTs, + STimeWindow tw) { + if (mndAddCompactVnodeAction(pMnode, pTrans, pDb, pVgroup, compactTs, tw) != 0) return -1; return 0; } \ No newline at end of file diff --git a/source/dnode/vnode/src/inc/vnodeInt.h b/source/dnode/vnode/src/inc/vnodeInt.h index ca61a4dfce..0dff2420ec 100644 --- a/source/dnode/vnode/src/inc/vnodeInt.h +++ b/source/dnode/vnode/src/inc/vnodeInt.h @@ -457,11 +457,10 @@ struct SCommitInfo { }; struct SCompactInfo { - SVnode* pVnode; - int32_t flag; - int64_t commitID; - int64_t stime; - int64_t etime; + SVnode* pVnode; + int32_t flag; + int64_t commitID; + STimeWindow tw; }; #ifdef __cplusplus From f0e23812a168333f12fb46df3c0853955912be55 Mon Sep 17 00:00:00 2001 From: cadem Date: Wed, 8 Mar 2023 09:57:07 +0800 Subject: [PATCH 063/154] fix offline_reason.sim --- tests/script/tsim/dnode/offline_reason.sim | 48 +++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/script/tsim/dnode/offline_reason.sim b/tests/script/tsim/dnode/offline_reason.sim index 6b1686dbb4..8c4d8b47f7 100644 --- a/tests/script/tsim/dnode/offline_reason.sim +++ b/tests/script/tsim/dnode/offline_reason.sim @@ -8,10 +8,10 @@ sql connect sql create dnode $hostname port 7200 sql select * from information_schema.ins_dnodes -print dnode1 off: $data(1)[6] -print dnode2 off: $data(2)[6] +print dnode1 off: $data(1)[7] +print dnode2 off: $data(2)[7] -if $data(2)[6] != @status not received@ then +if $data(2)[7] != @status not received@ then return -1 endi @@ -50,9 +50,9 @@ step3: return -1 endi sql select * from information_schema.ins_dnodes -print dnode1 off: $data(1)[6] -print dnode2 off: $data(2)[6] -if $data(2)[6] != @status msg timeout@ then +print dnode1 off: $data(1)[7] +print dnode2 off: $data(2)[7] +if $data(2)[7] != @status msg timeout@ then goto step3 endi @@ -77,9 +77,9 @@ step5: endi sql select * from information_schema.ins_dnodes -print dnode1 off: $data(1)[6] -print dnode2 off: $data(3)[6] -if $data(3)[6] != @dnodeId not match@ then +print dnode1 off: $data(1)[7] +print dnode2 off: $data(3)[7] +if $data(3)[7] != @dnodeId not match@ then goto step5 endi @@ -98,10 +98,10 @@ step6: endi sql select * from information_schema.ins_dnodes -print dnode1 off: $data(1)[6] -print dnode2 off: $data(3)[6] -print dnode3 off: $data(4)[6] -if $data(4)[6] != @interval not match@ then +print dnode1 off: $data(1)[7] +print dnode2 off: $data(3)[7] +print dnode3 off: $data(4)[67 +if $data(4)[7] != @interval not match@ then goto step6 endi @@ -120,11 +120,11 @@ step7: endi sql select * from information_schema.ins_dnodes -print dnode1 off: $data(1)[6] -print dnode3 off: $data(3)[6] -print dnode4 off: $data(4)[6] -print dnode5 off: $data(5)[6] -if $data(5)[6] != @locale not match@ then +print dnode1 off: $data(1)[7] +print dnode3 off: $data(3)[7] +print dnode4 off: $data(4)[7] +print dnode5 off: $data(5)[7] +if $data(5)[7] != @locale not match@ then goto step7 endi @@ -143,12 +143,12 @@ step8: endi sql select * from information_schema.ins_dnodes -print dnode1 off: $data(1)[6] -print dnode3 off: $data(3)[6] -print dnode4 off: $data(4)[6] -print dnode5 off: $data(5)[6] -print dnode6 off: $data(6)[6] -if $data(6)[6] != @charset not match@ then +print dnode1 off: $data(1)[7] +print dnode3 off: $data(3)[7] +print dnode4 off: $data(4)[7] +print dnode5 off: $data(5)[7] +print dnode6 off: $data(6)[7] +if $data(6)[7] != @charset not match@ then goto step8 endi From 0dc34018b691719b4a8f4bf0f8b88aff8d331025 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Wed, 8 Mar 2023 10:06:48 +0800 Subject: [PATCH 064/154] fix: insert data crash after empty table last cache --- source/dnode/vnode/src/tsdb/tsdbCache.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index c92967f7f4..dcf7286c00 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -375,9 +375,6 @@ int32_t tsdbCacheInsertLast(SLRUCache *pCache, tb_uid_t uid, TSDBROW *row, STsdb SLastCol lastCol = {.ts = keyTs, .colVal = colVal}; if (IS_VAR_DATA_TYPE(colVal.type) && colVal.value.nData > 0) { - SLastCol *pLastCol = (SLastCol *)taosArrayGet(pLast, iCol); - taosMemoryFree(pLastCol->colVal.value.pData); - lastCol.colVal.value.pData = taosMemoryMalloc(colVal.value.nData); if (lastCol.colVal.value.pData == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; From 839758f2d6785409ec1a0daf239255d3a47cbafc Mon Sep 17 00:00:00 2001 From: cademfly Date: Wed, 8 Mar 2023 10:26:28 +0800 Subject: [PATCH 065/154] fix odbc.py total columns numbers --- tests/system-test/2-query/odbc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system-test/2-query/odbc.py b/tests/system-test/2-query/odbc.py index 2325b01c35..832734d4a8 100644 --- a/tests/system-test/2-query/odbc.py +++ b/tests/system-test/2-query/odbc.py @@ -22,7 +22,7 @@ class TDTestCase: tdSql.execute("insert into db.ctb using db.stb tags(1) (ts, c1) values (now, 1)") tdSql.query("select count(*) from information_schema.ins_columns") - tdSql.checkData(0, 0, 269) + tdSql.checkData(0, 0, 271) tdSql.query("select * from information_schema.ins_columns where table_name = 'ntb'") tdSql.checkRows(14) From 733bdf9fcb4728298d1d3f05d8f3d7b065189b1a Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 8 Mar 2023 10:45:48 +0800 Subject: [PATCH 066/154] remove log --- source/libs/transport/src/transCli.c | 96 +++++++++++----------------- 1 file changed, 37 insertions(+), 59 deletions(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index b6f995b11e..787b494719 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -12,6 +12,7 @@ * along with this program. If not, see . */ +#include "tlog.h" #include "transComm.h" typedef struct { @@ -425,21 +426,6 @@ void cliHandleResp(SCliConn* conn) { tDebug("%s conn %p ref by app", CONN_GET_INST_LABEL(conn), conn); } - // if (TMSG_INFO(pHead->msgType - 1) != 0) { - // char buf[128] = {0}; - // sprintf(buf, "%s", TMSG_INFO(pHead->msgType - 1)); - // int* count = taosHashGet(pThrd->msgCount, TMSG_INFO(pHead->msgType - 1), strlen(TMSG_INFO(pHead->msgType - 1))); - // if (NULL == 0) { - // int localCount = 1; - // taosHashPut(pThrd->msgCount, TMSG_INFO(pHead->msgType - 1), strlen(TMSG_INFO(pHead->msgType - 1)), &localCount, - // sizeof(localCount)); - // } else { - // int localCount = *count - 1; - // taosHashPut(pThrd->msgCount, TMSG_INFO(pHead->msgType - 1), strlen(TMSG_INFO(pHead->msgType - 1)), &localCount, - // sizeof(localCount)); - // } - // } - STraceId* trace = &transMsg.info.traceId; tGDebug("%s conn %p %s received from %s, local info:%s, len:%d, code str:%s", CONN_GET_INST_LABEL(conn), conn, TMSG_INFO(pHead->msgType), conn->dst, conn->src, pHead->msgLen, tstrerror(transMsg.code)); @@ -1118,19 +1104,6 @@ void cliSend(SCliConn* pConn) { msgLen = (int32_t)ntohl((uint32_t)(pHead->msgLen)); } - // if (tmsgIsValid(pHead->msgType)) { - // char buf[128] = {0}; - // sprintf(buf, "%s", TMSG_INFO(pHead->msgType)); - // int* count = taosHashGet(pThrd->msgCount, buf, sizeof(buf)); - // if (NULL == 0) { - // int localCount = 1; - // taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); - // } else { - // int localCount = *count + 1; - // taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); - // } - // } - tGDebug("%s conn %p %s is sent to %s, local info %s, len:%d", CONN_GET_INST_LABEL(pConn), pConn, TMSG_INFO(pHead->msgType), pConn->dst, pConn->src, msgLen); @@ -1525,16 +1498,18 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) { destroyCmsg(pMsg); return; } - if (tmsgIsValid(pMsg->msg.msgType)) { - char buf[128] = {0}; - sprintf(buf, "%s", TMSG_INFO(pMsg->msg.msgType)); - int* count = taosHashGet(pThrd->msgCount, buf, sizeof(buf)); - if (NULL == 0) { - int localCount = 1; - taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); - } else { - int localCount = *count + 1; - taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); + if (rpcDebugFlag & DEBUG_TRACE) { + if (tmsgIsValid(pMsg->msg.msgType)) { + char buf[128] = {0}; + sprintf(buf, "%s", TMSG_INFO(pMsg->msg.msgType)); + int* count = taosHashGet(pThrd->msgCount, buf, sizeof(buf)); + if (NULL == 0) { + int localCount = 1; + taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); + } else { + int localCount = *count + 1; + taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); + } } } @@ -1782,18 +1757,20 @@ static void cliAsyncCb(uv_async_t* handle) { QUEUE_MOVE(&item->qmsg, &wq); taosThreadMutexUnlock(&item->mtx); - void* pIter = taosHashIterate(pThrd->msgCount, NULL); - while (pIter != NULL) { - int* count = pIter; - size_t len = 0; - char* key = taosHashGetKey(pIter, &len); - if (*count != 0) { - tDebug("key: %s count: %d", key, *count); - } + if (rpcDebugFlag & DEBUG_TRACE) { + void* pIter = taosHashIterate(pThrd->msgCount, NULL); + while (pIter != NULL) { + int* count = pIter; + size_t len = 0; + char* key = taosHashGetKey(pIter, &len); + if (*count != 0) { + tDebug("key: %s count: %d", key, *count); + } - pIter = taosHashIterate(pThrd->msgCount, pIter); + pIter = taosHashIterate(pThrd->msgCount, pIter); + } + tDebug("all conn count: %d", pThrd->newConnCount); } - tDebug("all conn count: %d", pThrd->newConnCount); int8_t supportBatch = pTransInst->supportBatch; if (supportBatch == 0) { @@ -2379,17 +2356,18 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { tGTrace("%s conn %p extract epset from msg", CONN_GET_INST_LABEL(pConn), pConn); } } - - if (tmsgIsValid(pResp->msgType - 1)) { - char buf[128] = {0}; - sprintf(buf, "%s", TMSG_INFO(pResp->msgType - 1)); - int* count = taosHashGet(pThrd->msgCount, buf, sizeof(buf)); - if (NULL == 0) { - int localCount = 0; - taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); - } else { - int localCount = *count - 1; - taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); + if (rpcDebugFlag & DEBUG_TRACE) { + if (tmsgIsValid(pResp->msgType - 1)) { + char buf[128] = {0}; + sprintf(buf, "%s", TMSG_INFO(pResp->msgType - 1)); + int* count = taosHashGet(pThrd->msgCount, buf, sizeof(buf)); + if (NULL == 0) { + int localCount = 0; + taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); + } else { + int localCount = *count - 1; + taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); + } } } if (pCtx->pSem != NULL) { From a03d9778a61ae193e88bbb8c6ff3d3b431853df1 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 8 Mar 2023 11:03:29 +0800 Subject: [PATCH 067/154] fix: update tfs storage size every 1 second by default --- source/dnode/mgmt/mgmt_vnode/src/vmHandle.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c b/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c index 5cf408a905..d7f91b74a8 100644 --- a/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c +++ b/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c @@ -20,6 +20,8 @@ void vmGetVnodeLoads(SVnodeMgmt *pMgmt, SMonVloadInfo *pInfo, bool isReset) { pInfo->pVloads = taosArrayInit(pMgmt->state.totalVnodes, sizeof(SVnodeLoad)); if (pInfo->pVloads == NULL) return; + tfsUpdateSize(pMgmt->pTfs); + taosThreadRwlockRdlock(&pMgmt->lock); void *pIter = taosHashIterate(pMgmt->hash, NULL); From 6cfebd072a3d80e6ed34a912250d19f206c48bcb Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 8 Mar 2023 13:20:37 +0800 Subject: [PATCH 068/154] remove log --- source/libs/transport/src/transCli.c | 1 - 1 file changed, 1 deletion(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 787b494719..9bd50bddc7 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -12,7 +12,6 @@ * along with this program. If not, see . */ -#include "tlog.h" #include "transComm.h" typedef struct { From 4a682ebe7ba2e78c74ebf09d4f6d54131d87d8bf Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Wed, 8 Mar 2023 14:04:20 +0800 Subject: [PATCH 069/154] feat: taosbenchmark support sample data per child table (#20317) --- cmake/taostools_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index aecb8a1750..5fe8f6ea13 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG 0111c66 + GIT_TAG d4b3967 SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From 6dcb9c7f0f4908c3980fe02098190db3b377a46c Mon Sep 17 00:00:00 2001 From: cademfly Date: Wed, 8 Mar 2023 14:04:33 +0800 Subject: [PATCH 070/154] trigger ci --- tests/system-test/2-query/odbc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system-test/2-query/odbc.py b/tests/system-test/2-query/odbc.py index 832734d4a8..f26f0abda0 100644 --- a/tests/system-test/2-query/odbc.py +++ b/tests/system-test/2-query/odbc.py @@ -22,7 +22,7 @@ class TDTestCase: tdSql.execute("insert into db.ctb using db.stb tags(1) (ts, c1) values (now, 1)") tdSql.query("select count(*) from information_schema.ins_columns") - tdSql.checkData(0, 0, 271) + tdSql.checkData(0, 0, 271) tdSql.query("select * from information_schema.ins_columns where table_name = 'ntb'") tdSql.checkRows(14) From 8ca7b91520d8ffb96a6c31f11c68e3abc9a23803 Mon Sep 17 00:00:00 2001 From: t_max <1172915550@qq.com> Date: Wed, 8 Mar 2023 14:31:27 +0800 Subject: [PATCH 071/154] fix(taosAdapter): remove influxdb affected rows check --- cmake/taosadapter_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taosadapter_CMakeLists.txt.in b/cmake/taosadapter_CMakeLists.txt.in index 357a79715a..1c401ae80e 100644 --- a/cmake/taosadapter_CMakeLists.txt.in +++ b/cmake/taosadapter_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taosadapter ExternalProject_Add(taosadapter GIT_REPOSITORY https://github.com/taosdata/taosadapter.git - GIT_TAG 97d717d + GIT_TAG d8059ff SOURCE_DIR "${TD_SOURCE_DIR}/tools/taosadapter" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From c408a434d6a9c90ee3b9eb1aa3e82eb784884d58 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 8 Mar 2023 14:31:38 +0800 Subject: [PATCH 072/154] fix tbname in error --- source/libs/executor/src/executil.c | 2 -- tests/script/tsim/tag/tbNameIn.sim | 10 ++++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index 9537751ff0..0ac458af49 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -957,9 +957,7 @@ static int32_t doFilterByTagCond(STableListInfo* pListInfo, SArray* pUidList, SN STUidTagInfo* pInfo = taosArrayGet(pUidTagList, i); taosArrayPush(pUidList, &pInfo->uid); } - terrno = 0; - goto end; } else { if ((condType == FILTER_NO_LOGIC || condType == FILTER_AND) && status != SFLT_NOT_INDEX) { code = metaGetTableTagsByUids(metaHandle, pListInfo->suid, pUidTagList); diff --git a/tests/script/tsim/tag/tbNameIn.sim b/tests/script/tsim/tag/tbNameIn.sim index 1af4bd6a9e..f5119208ba 100644 --- a/tests/script/tsim/tag/tbNameIn.sim +++ b/tests/script/tsim/tag/tbNameIn.sim @@ -99,4 +99,14 @@ if $rows != 7 then return -1 endi +sql select * from st1 where tbname in('tb1') and tbname in ('tb2'); +if $rows != 0 then + return -1 +endi + +sql select * from st1 where tbname in ('tb1') and tbname != 'tb1'; +if $rows != 0 then + return -1 +endi + system sh/exec.sh -n dnode1 -s stop -x SIGINT From a56c99daac1976b9276593c3dfc54e22e41280f4 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 8 Mar 2023 14:45:04 +0800 Subject: [PATCH 073/154] fix: add more msg check --- source/dnode/vnode/src/vnd/vnodeSvr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index 2b275f5122..fc40f81ed5 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -211,6 +211,11 @@ static int32_t vnodePreProcessSubmitMsg(SVnode *pVnode, SRpcMsg *pMsg) { SDecoder *pCoder = &(SDecoder){0}; + if (((SSubmitReq2Msg *)pMsg->pCont)->version != 1) { + code = TSDB_CODE_INVALID_MSG; + TSDB_CHECK_CODE(code, lino, _exit); + } + tDecoderInit(pCoder, (uint8_t *)pMsg->pCont + sizeof(SSubmitReq2Msg), pMsg->contLen - sizeof(SSubmitReq2Msg)); if (tStartDecode(pCoder) < 0) { @@ -1218,6 +1223,11 @@ static int32_t vnodeProcessSubmitReq(SVnode *pVnode, int64_t version, void *pReq for (int32_t i = 0; i < TARRAY_SIZE(pSubmitReq->aSubmitTbData); ++i) { SSubmitTbData *pSubmitTbData = taosArrayGet(pSubmitReq->aSubmitTbData, i); + if (pSubmitTbData->pCreateTbReq && pSubmitTbData->pCreateTbReq->uid == 0) { + code = TSDB_CODE_INVALID_MSG; + goto _exit; + } + if (pSubmitTbData->flags & SUBMIT_REQ_COLUMN_DATA_FORMAT) { if (TARRAY_SIZE(pSubmitTbData->aCol) <= 0) { code = TSDB_CODE_INVALID_MSG; From 9be3e2027625ece6cfc10419e23898a8ed019265 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Wed, 8 Mar 2023 15:13:11 +0800 Subject: [PATCH 074/154] fix: check the compatibility of client version and server version --- include/common/tmsg.h | 1 + include/util/tversion.h | 8 +++-- source/client/src/clientImpl.c | 1 + source/client/src/clientMsgHandler.c | 43 ++++++++++++++---------- source/common/src/tmsg.c | 7 ++++ source/dnode/mnode/impl/src/mndProfile.c | 11 ++++-- source/util/src/tversion.c | 17 ++++++++++ 7 files changed, 65 insertions(+), 23 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 308246df64..75240cef4f 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -612,6 +612,7 @@ typedef struct { char user[TSDB_USER_LEN]; char passwd[TSDB_PASSWORD_LEN]; int64_t startTime; + char sVer[TSDB_VERSION_LEN]; } SConnectReq; int32_t tSerializeSConnectReq(void* buf, int32_t bufLen, SConnectReq* pReq); diff --git a/include/util/tversion.h b/include/util/tversion.h index c924752a01..f5c42b2a22 100644 --- a/include/util/tversion.h +++ b/include/util/tversion.h @@ -13,8 +13,8 @@ * along with this program. If not, see . */ -#ifndef _TD_UTIL_VERSION_H_ -#define _TD_UTIL_VERSION_H_ +#ifndef _TD_UTIL_TVERSION_H_ +#define _TD_UTIL_TVERSION_H_ #include "os.h" @@ -25,9 +25,11 @@ extern "C" { int32_t taosVersionStrToInt(const char *vstr, int32_t *vint); int32_t taosVersionIntToStr(int32_t vint, char *vstr, int32_t len); int32_t taosCheckVersionCompatible(int32_t clientVer, int32_t serverVer, int32_t comparedSegments); +int32_t taosCheckVersionCompatibleFromStr(const char *pClientVersion, const char *pServerVersion, + int32_t comparedSegments); #ifdef __cplusplus } #endif -#endif /*_TD_UTIL_VERSION_H_*/ +#endif /*_TD_UTIL_TVERSION_H_*/ diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 7bdbc3dc56..70185a1395 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -1307,6 +1307,7 @@ static SMsgSendInfo* buildConnectMsg(SRequestObj* pRequest) { tstrncpy(connectReq.app, appInfo.appName, sizeof(connectReq.app)); tstrncpy(connectReq.user, pObj->user, sizeof(connectReq.user)); tstrncpy(connectReq.passwd, pObj->pass, sizeof(connectReq.passwd)); + tstrncpy(connectReq.sVer, version, sizeof(connectReq.sVer)); int32_t contLen = tSerializeSConnectReq(NULL, 0, &connectReq); void* pReq = taosMemoryMalloc(contLen); diff --git a/source/client/src/clientMsgHandler.c b/source/client/src/clientMsgHandler.c index a5f963a956..be1b6b07a3 100644 --- a/source/client/src/clientMsgHandler.c +++ b/source/client/src/clientMsgHandler.c @@ -18,10 +18,12 @@ #include "clientLog.h" #include "os.h" #include "query.h" -#include "tdef.h" -#include "tname.h" -#include "tdatablock.h" #include "systable.h" +#include "tdatablock.h" +#include "tdef.h" +#include "tglobal.h" +#include "tname.h" +#include "tversion.h" static void setErrno(SRequestObj* pRequest, int32_t code) { pRequest->code = code; @@ -47,11 +49,11 @@ int32_t genericRspCallback(void* param, SDataBuf* pMsg, int32_t code) { } int32_t processConnectRsp(void* param, SDataBuf* pMsg, int32_t code) { - SRequestObj *pRequest = acquireRequest(*(int64_t*)param); + SRequestObj* pRequest = acquireRequest(*(int64_t*)param); if (NULL == pRequest) { goto End; } - + if (code != TSDB_CODE_SUCCESS) { setErrno(pRequest, code); tsem_post(&pRequest->body.rspSem); @@ -65,7 +67,7 @@ int32_t processConnectRsp(void* param, SDataBuf* pMsg, int32_t code) { tsem_post(&pRequest->body.rspSem); goto End; } - + SConnectRsp connectRsp = {0}; if (tDeserializeSConnectRsp(pMsg->pData, pMsg->len, &connectRsp) != 0) { code = TSDB_CODE_TSC_INVALID_VERSION; @@ -74,6 +76,12 @@ int32_t processConnectRsp(void* param, SDataBuf* pMsg, int32_t code) { goto End; } + if ((code = taosCheckVersionCompatibleFromStr(version, connectRsp.sVer, 2)) != 0) { + setErrno(pRequest, code); + tsem_post(&pRequest->body.rspSem); + goto End; + } + int32_t now = taosGetTimestampSec(); int32_t delta = abs(now - connectRsp.svrTimestamp); if (delta > timestampDeltaLimit) { @@ -127,14 +135,14 @@ int32_t processConnectRsp(void* param, SDataBuf* pMsg, int32_t code) { tscDebug("0x%" PRIx64 " clusterId:%" PRId64 ", totalConn:%" PRId64, pRequest->requestId, connectRsp.clusterId, pTscObj->pAppInfo->numOfConns); - + tsem_post(&pRequest->body.rspSem); End: if (pRequest) { releaseRequest(pRequest->self); } - + taosMemoryFree(param); taosMemoryFree(pMsg->pEpSet); taosMemoryFree(pMsg->pData); @@ -166,18 +174,18 @@ int32_t processCreateDbRsp(void* param, SDataBuf* pMsg, int32_t code) { struct SCatalog* pCatalog = NULL; int32_t code = catalogGetHandle(pRequest->pTscObj->pAppInfo->clusterId, &pCatalog); if (TSDB_CODE_SUCCESS == code) { - STscObj* pTscObj = pRequest->pTscObj; + STscObj* pTscObj = pRequest->pTscObj; SRequestConnInfo conn = {.pTrans = pTscObj->pAppInfo->pTransporter, .requestId = pRequest->requestId, .requestObjRefId = pRequest->self, .mgmtEps = getEpSet_s(&pTscObj->pAppInfo->mgmtEp)}; - char dbFName[TSDB_DB_FNAME_LEN]; + char dbFName[TSDB_DB_FNAME_LEN]; snprintf(dbFName, sizeof(dbFName) - 1, "%d.%s", pTscObj->acctId, TSDB_INFORMATION_SCHEMA_DB); catalogRefreshDBVgInfo(pCatalog, &conn, dbFName); snprintf(dbFName, sizeof(dbFName) - 1, "%d.%s", pTscObj->acctId, TSDB_PERFORMANCE_SCHEMA_DB); catalogRefreshDBVgInfo(pCatalog, &conn, dbFName); - } + } } if (pRequest->body.queryFp) { @@ -197,7 +205,7 @@ int32_t processUseDbRsp(void* param, SDataBuf* pMsg, int32_t code) { tDeserializeSUseDbRsp(pMsg->pData, pMsg->len, &usedbRsp); struct SCatalog* pCatalog = NULL; - if (usedbRsp.vgVersion >= 0) { // cached in local + if (usedbRsp.vgVersion >= 0) { // cached in local uint64_t clusterId = pRequest->pTscObj->pAppInfo->clusterId; int32_t code1 = catalogGetHandle(clusterId, &pCatalog); if (code1 != TSDB_CODE_SUCCESS) { @@ -289,7 +297,7 @@ int32_t processUseDbRsp(void* param, SDataBuf* pMsg, int32_t code) { } int32_t processCreateSTableRsp(void* param, SDataBuf* pMsg, int32_t code) { - if(pMsg == NULL || param == NULL){ + if (pMsg == NULL || param == NULL) { return TSDB_CODE_TSC_INVALID_INPUT; } SRequestObj* pRequest = param; @@ -344,13 +352,13 @@ int32_t processDropDbRsp(void* param, SDataBuf* pMsg, int32_t code) { int32_t code = catalogGetHandle(pRequest->pTscObj->pAppInfo->clusterId, &pCatalog); if (TSDB_CODE_SUCCESS == code) { catalogRemoveDB(pCatalog, dropdbRsp.db, dropdbRsp.uid); - STscObj* pTscObj = pRequest->pTscObj; + STscObj* pTscObj = pRequest->pTscObj; SRequestConnInfo conn = {.pTrans = pTscObj->pAppInfo->pTransporter, .requestId = pRequest->requestId, .requestObjRefId = pRequest->self, .mgmtEps = getEpSet_s(&pTscObj->pAppInfo->mgmtEp)}; - char dbFName[TSDB_DB_FNAME_LEN]; + char dbFName[TSDB_DB_FNAME_LEN]; snprintf(dbFName, sizeof(dbFName) - 1, "%d.%s", pTscObj->acctId, TSDB_INFORMATION_SCHEMA_DB); catalogRefreshDBVgInfo(pCatalog, &conn, dbFName); snprintf(dbFName, sizeof(dbFName) - 1, "%d.%s", pTscObj->acctId, TSDB_PERFORMANCE_SCHEMA_DB); @@ -474,8 +482,9 @@ static int32_t buildShowVariablesRsp(SArray* pVars, SRetrieveTableRsp** pRsp) { int32_t len = blockEncode(pBlock, (*pRsp)->data, SHOW_VARIABLES_RESULT_COLS); blockDataDestroy(pBlock); - if(len != rspSize - sizeof(SRetrieveTableRsp)){ - uError("buildShowVariablesRsp error, len:%d != rspSize - sizeof(SRetrieveTableRsp):%" PRIu64, len, (uint64_t) (rspSize - sizeof(SRetrieveTableRsp))); + if (len != rspSize - sizeof(SRetrieveTableRsp)) { + uError("buildShowVariablesRsp error, len:%d != rspSize - sizeof(SRetrieveTableRsp):%" PRIu64, len, + (uint64_t)(rspSize - sizeof(SRetrieveTableRsp))); return TSDB_CODE_TSC_INVALID_INPUT; } diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 5018a517e1..84a09f0fb5 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -3741,6 +3741,7 @@ int32_t tSerializeSConnectReq(void *buf, int32_t bufLen, SConnectReq *pReq) { if (tEncodeCStr(&encoder, pReq->user) < 0) return -1; if (tEncodeCStrWithLen(&encoder, pReq->passwd, TSDB_PASSWORD_LEN) < 0) return -1; if (tEncodeI64(&encoder, pReq->startTime) < 0) return -1; + if (tEncodeCStr(&encoder, pReq->sVer) < 0) return -1; tEndEncode(&encoder); int32_t tlen = encoder.pos; @@ -3760,6 +3761,12 @@ int32_t tDeserializeSConnectReq(void *buf, int32_t bufLen, SConnectReq *pReq) { if (tDecodeCStrTo(&decoder, pReq->user) < 0) return -1; if (tDecodeCStrTo(&decoder, pReq->passwd) < 0) return -1; if (tDecodeI64(&decoder, &pReq->startTime) < 0) return -1; + // Check the client version from version 3.0.3.0 + if (tDecodeIsEnd(&decoder)) { + tDecoderClear(&decoder); + return TSDB_CODE_VERSION_NOT_COMPATIBLE; + } + if (tDecodeCStrTo(&decoder, pReq->sVer) < 0) return -1; tEndDecode(&decoder); tDecoderClear(&decoder); diff --git a/source/dnode/mnode/impl/src/mndProfile.c b/source/dnode/mnode/impl/src/mndProfile.c index 41dc57f32e..0eb891fa1f 100644 --- a/source/dnode/mnode/impl/src/mndProfile.c +++ b/source/dnode/mnode/impl/src/mndProfile.c @@ -24,7 +24,7 @@ #include "mndStb.h" #include "mndUser.h" #include "tglobal.h" -#include "version.h" +#include "tversion.h" typedef struct { uint32_t id; @@ -221,8 +221,13 @@ static int32_t mndProcessConnectReq(SRpcMsg *pReq) { char ip[24] = {0}; const STraceId *trace = &pReq->info.traceId; - if (tDeserializeSConnectReq(pReq->pCont, pReq->contLen, &connReq) != 0) { - terrno = TSDB_CODE_INVALID_MSG; + if ((code = tDeserializeSConnectReq(pReq->pCont, pReq->contLen, &connReq)) != 0) { + terrno = (-1 == code ? TSDB_CODE_INVALID_MSG : code); + goto _OVER; + } + + if ((code = taosCheckVersionCompatibleFromStr(connReq.sVer, version, 2)) != 0) { + terrno = code; goto _OVER; } diff --git a/source/util/src/tversion.c b/source/util/src/tversion.c index c70fdc87a6..dc357c61a1 100644 --- a/source/util/src/tversion.c +++ b/source/util/src/tversion.c @@ -89,3 +89,20 @@ int32_t taosCheckVersionCompatible(int32_t clientVer, int32_t serverVer, int32_t return -1; } } + +int32_t taosCheckVersionCompatibleFromStr(const char *pClientVersion, const char *pServerVersion, + int32_t comparedSegments) { + int32_t clientVersion = 0; + int32_t serverVersion = 0; + int32_t code = taosVersionStrToInt(pClientVersion, &clientVersion); + if (TSDB_CODE_SUCCESS == code) { + code = taosVersionStrToInt(pServerVersion, &serverVersion); + } + if (TSDB_CODE_SUCCESS == code) { + code = taosCheckVersionCompatible(clientVersion, serverVersion, comparedSegments); + } + if (TSDB_CODE_SUCCESS != code) { + code = terrno; + } + return code; +} \ No newline at end of file From 05688386a0901f4db0a43b008199320a6829aea0 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 8 Mar 2023 15:19:55 +0800 Subject: [PATCH 075/154] little fix --- source/dnode/vnode/src/vnd/vnodeSvr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index fc40f81ed5..fb8d230eba 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -211,7 +211,7 @@ static int32_t vnodePreProcessSubmitMsg(SVnode *pVnode, SRpcMsg *pMsg) { SDecoder *pCoder = &(SDecoder){0}; - if (((SSubmitReq2Msg *)pMsg->pCont)->version != 1) { + if (taosHton64(((SSubmitReq2Msg *)pMsg->pCont)->version) != 1) { code = TSDB_CODE_INVALID_MSG; TSDB_CHECK_CODE(code, lino, _exit); } From 38c9501396387dd8900c473d2b14f6aa0ca787b3 Mon Sep 17 00:00:00 2001 From: Adam Ji Date: Wed, 8 Mar 2023 15:49:19 +0800 Subject: [PATCH 076/154] docs: this line is inaccurate, in current connector-python repo, it require python >= 3.6.2 because there is a dependence iso8601 (#20331) --- docs/zh/08-connector/30-python.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/08-connector/30-python.mdx b/docs/zh/08-connector/30-python.mdx index 1962df9607..b2f2118f39 100644 --- a/docs/zh/08-connector/30-python.mdx +++ b/docs/zh/08-connector/30-python.mdx @@ -32,7 +32,7 @@ Python 连接器的源码托管在 [GitHub](https://github.com/taosdata/taos-con ### 准备 -1. 安装 Python。新近版本 taospy 包要求 Python 3.6+。早期版本 taospy 包要求 Python 3.7+。taos-ws-py 包要求 Python 3.7+。如果系统上还没有 Python 可参考 [Python BeginnersGuide](https://wiki.python.org/moin/BeginnersGuide/Download) 安装。 +1. 安装 Python。新近版本 taospy 包要求 Python 3.6.2+。早期版本 taospy 包要求 Python 3.7+。taos-ws-py 包要求 Python 3.7+。如果系统上还没有 Python 可参考 [Python BeginnersGuide](https://wiki.python.org/moin/BeginnersGuide/Download) 安装。 2. 安装 [pip](https://pypi.org/project/pip/)。大部分情况下 Python 的安装包都自带了 pip 工具, 如果没有请参考 [pip documentation](https://pip.pypa.io/en/stable/installation/) 安装。 3. 如果使用原生连接,还需[安装客户端驱动](../#安装客户端驱动)。客户端软件包含了 TDengine 客户端动态链接库(libtaos.so 或 taos.dll) 和 TDengine CLI。 From d1c24cd44bdc93370768240b3349d1a94e606c16 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 8 Mar 2023 15:50:24 +0800 Subject: [PATCH 077/154] unit sma/tag index error msg --- source/util/src/terror.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 33b562c8dd..65ab22c2e1 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -211,8 +211,8 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_FUNC_BUFSIZE, "Invalid func bufSize" TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_FUNC_COMMENT, "Invalid func comment") TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_FUNC_RETRIEVE, "Invalid func retrieve msg") -TAOS_DEFINE_ERROR(TSDB_CODE_MND_TAG_INDEX_ALREADY_EXIST, "Tag index already exists") -TAOS_DEFINE_ERROR(TSDB_CODE_MND_TAG_INDEX_NOT_EXIST, "Tag index not exists") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_TAG_INDEX_ALREADY_EXIST, "index already exists") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_TAG_INDEX_NOT_EXIST, "index not exist") // mnode-db @@ -301,8 +301,8 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_TOO_MANY_STREAMS, "Too many streams") TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_TARGET_TABLE, "Cannot write the same stable as other stream") // mnode-sma -TAOS_DEFINE_ERROR(TSDB_CODE_MND_SMA_ALREADY_EXIST, "SMA already exists") -TAOS_DEFINE_ERROR(TSDB_CODE_MND_SMA_NOT_EXIST, "SMA does not exist") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_SMA_ALREADY_EXIST, "index already exists") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_SMA_NOT_EXIST, "index not exist") TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_SMA_OPTION, "Invalid sma option") // dnode From fe4b9a65dae922f82a7b98d500b2a07cdb39e65d Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 8 Mar 2023 15:58:13 +0800 Subject: [PATCH 078/154] unit sma and tag index error msg --- source/util/src/terror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 65ab22c2e1..a19a022b01 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -303,7 +303,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_TARGET_TABLE, "Cannot write the same // mnode-sma TAOS_DEFINE_ERROR(TSDB_CODE_MND_SMA_ALREADY_EXIST, "index already exists") TAOS_DEFINE_ERROR(TSDB_CODE_MND_SMA_NOT_EXIST, "index not exist") -TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_SMA_OPTION, "Invalid sma option") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_SMA_OPTION, "Invalid sma index option") // dnode TAOS_DEFINE_ERROR(TSDB_CODE_DNODE_OFFLINE, "Dnode is offline") From d8d74b3514a8e33dc91bc30ae5ccba12b317cc34 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 8 Mar 2023 16:02:46 +0800 Subject: [PATCH 079/154] unit sma and tag index error msg --- source/dnode/vnode/src/vnd/vnodeSvr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index 2b275f5122..8e219c2b12 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -1646,7 +1646,7 @@ _err: } static int32_t vnodeProcessDropIndexReq(SVnode *pVnode, int64_t version, void *pReq, int32_t len, SRpcMsg *pRsp) { SDropIndexReq req = {0}; - pRsp->msgType = TDMT_VND_CREATE_INDEX_RSP; + pRsp->msgType = TDMT_VND_DROP_INDEX_RSP; pRsp->code = TSDB_CODE_SUCCESS; pRsp->pCont = NULL; pRsp->contLen = 0; From 3db2c59581e6e509b266b43a6fc70ab7a79b3ae3 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Wed, 8 Mar 2023 16:10:11 +0800 Subject: [PATCH 080/154] fix: check the compatibility of client version and server version --- source/dnode/mnode/impl/test/profile/profile.cpp | 6 ++++-- source/dnode/mnode/impl/test/show/show.cpp | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/source/dnode/mnode/impl/test/profile/profile.cpp b/source/dnode/mnode/impl/test/profile/profile.cpp index 2ae113e051..6ab6d364cb 100644 --- a/source/dnode/mnode/impl/test/profile/profile.cpp +++ b/source/dnode/mnode/impl/test/profile/profile.cpp @@ -32,13 +32,14 @@ TEST_F(MndTestProfile, 01_ConnectMsg) { connectReq.pid = 1234; char passwd[] = "taosdata"; - char secretEncrypt[TSDB_PASSWORD_LEN] = {0}; + char secretEncrypt[TSDB_PASSWORD_LEN + 1] = {0}; taosEncryptPass_c((uint8_t*)passwd, strlen(passwd), secretEncrypt); strcpy(connectReq.app, "mnode_test_profile"); strcpy(connectReq.db, ""); strcpy(connectReq.user, "root"); strcpy(connectReq.passwd, secretEncrypt); + strcpy(connectReq.sVer, version); int32_t contLen = tSerializeSConnectReq(NULL, 0, &connectReq); void* pReq = rpcMallocCont(contLen); @@ -66,7 +67,7 @@ TEST_F(MndTestProfile, 01_ConnectMsg) { TEST_F(MndTestProfile, 02_ConnectMsg_InvalidDB) { char passwd[] = "taosdata"; - char secretEncrypt[TSDB_PASSWORD_LEN] = {0}; + char secretEncrypt[TSDB_PASSWORD_LEN + 1] = {0}; taosEncryptPass_c((uint8_t*)passwd, strlen(passwd), secretEncrypt); SConnectReq connectReq = {0}; @@ -75,6 +76,7 @@ TEST_F(MndTestProfile, 02_ConnectMsg_InvalidDB) { strcpy(connectReq.db, "invalid_db"); strcpy(connectReq.user, "root"); strcpy(connectReq.passwd, secretEncrypt); + strcpy(connectReq.sVer, version); int32_t contLen = tSerializeSConnectReq(NULL, 0, &connectReq); void* pReq = rpcMallocCont(contLen); diff --git a/source/dnode/mnode/impl/test/show/show.cpp b/source/dnode/mnode/impl/test/show/show.cpp index 0ccefa7ca2..2e67ffa946 100644 --- a/source/dnode/mnode/impl/test/show/show.cpp +++ b/source/dnode/mnode/impl/test/show/show.cpp @@ -55,7 +55,7 @@ TEST_F(MndTestShow, 02_ShowMsg_InvalidMsgStart) { TEST_F(MndTestShow, 03_ShowMsg_Conn) { char passwd[] = "taosdata"; - char secretEncrypt[TSDB_PASSWORD_LEN] = {0}; + char secretEncrypt[TSDB_PASSWORD_LEN + 1] = {0}; taosEncryptPass_c((uint8_t*)passwd, strlen(passwd), secretEncrypt); SConnectReq connectReq = {0}; @@ -64,6 +64,7 @@ TEST_F(MndTestShow, 03_ShowMsg_Conn) { strcpy(connectReq.db, ""); strcpy(connectReq.user, "root"); strcpy(connectReq.passwd, secretEncrypt); + strcpy(connectReq.sVer, version); int32_t contLen = tSerializeSConnectReq(NULL, 0, &connectReq); void* pReq = rpcMallocCont(contLen); From 5d80e71d9e52d79369cdd75b524e5522be7324a3 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Wed, 8 Mar 2023 16:42:09 +0800 Subject: [PATCH 081/154] fix: check the compatibility of client version and server version --- source/dnode/mnode/impl/src/mndProfile.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/dnode/mnode/impl/src/mndProfile.c b/source/dnode/mnode/impl/src/mndProfile.c index 0eb891fa1f..41dea50731 100644 --- a/source/dnode/mnode/impl/src/mndProfile.c +++ b/source/dnode/mnode/impl/src/mndProfile.c @@ -231,6 +231,8 @@ static int32_t mndProcessConnectReq(SRpcMsg *pReq) { goto _OVER; } + code = -1; + taosIp2String(pReq->info.conn.clientIp, ip); if (mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_CONNECT) != 0) { mGError("user:%s, failed to login from %s since %s", pReq->info.conn.user, ip, terrstr()); From 49e2924f1d8e31de47a6759846a812f7506ce6f0 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 8 Mar 2023 17:02:19 +0800 Subject: [PATCH 082/154] fix:add error log --- source/client/src/clientSmlLine.c | 6 ++++-- source/libs/executor/src/executor.c | 5 +---- source/libs/executor/src/scanoperator.c | 2 -- source/libs/parser/src/parInsertSml.c | 1 + 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/source/client/src/clientSmlLine.c b/source/client/src/clientSmlLine.c index 66f1316cd5..a8b9248abd 100644 --- a/source/client/src/clientSmlLine.c +++ b/source/client/src/clientSmlLine.c @@ -582,8 +582,10 @@ int32_t smlParseInfluxString(SSmlHandle *info, char *sql, char *sqlEnd, SSmlLine .i = ts, .length = (size_t)tDataTypes[TSDB_DATA_TYPE_TIMESTAMP].bytes}; if (info->dataFormat) { - smlBuildCol(info->currTableDataCtx, info->currSTableMeta->schema, &kv, 0); - smlBuildRow(info->currTableDataCtx); + ret = smlBuildCol(info->currTableDataCtx, info->currSTableMeta->schema, &kv, 0); + if(ret != TSDB_CODE_SUCCESS){return ret;} + ret = smlBuildRow(info->currTableDataCtx); + if(ret != TSDB_CODE_SUCCESS){return ret;} clearColValArray(info->currTableDataCtx->pValues); } else { taosArraySet(elements->colArray, 0, &kv); diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c index 04d54a95ae..ac78ddc23c 100644 --- a/source/libs/executor/src/executor.c +++ b/source/libs/executor/src/executor.c @@ -1110,11 +1110,8 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT STableScanInfo* pTableScanInfo = pInfo->pTableScanOp->info; int32_t numOfTables = tableListGetSize(pTaskInfo->pTableInfoList); -#ifndef NDEBUG - qDebug("switch to next table %" PRId64 " (cursor %d), %" PRId64 " rows returned", uid, - pTableScanInfo->currentTable, pInfo->pTableScanOp->resultInfo.totalRows); + qDebug("switch to next table %" PRId64 " ts %" PRId64 "% "PRId64 " rows returned", uid, ts, pInfo->pTableScanOp->resultInfo.totalRows); pInfo->pTableScanOp->resultInfo.totalRows = 0; -#endif bool found = false; for (int32_t i = 0; i < numOfTables; i++) { diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 2f3b757241..f709aadc39 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -1608,8 +1608,6 @@ static SSDataBlock* doQueueScan(SOperatorInfo* pOperator) { if (pTaskInfo->streamInfo.prepareStatus.type == TMQ_OFFSET__SNAPSHOT_DATA) { SSDataBlock* pResult = doTableScan(pInfo->pTableScanOp); if (pResult && pResult->info.rows > 0) { - qDebug("queue scan tsdb return %d rows min:%" PRId64 " max:%" PRId64, pResult->info.rows, - pResult->info.window.skey, pResult->info.window.ekey); qDebug("queue scan tsdb return %d rows min:%" PRId64 " max:%" PRId64 " wal curVersion:%" PRId64, pResult->info.rows, pResult->info.window.skey, pResult->info.window.ekey, pInfo->tqReader->pWalReader->curVersion); pTaskInfo->streamInfo.returned = 1; diff --git a/source/libs/parser/src/parInsertSml.c b/source/libs/parser/src/parInsertSml.c index 4742921d08..d6c1072669 100644 --- a/source/libs/parser/src/parInsertSml.c +++ b/source/libs/parser/src/parInsertSml.c @@ -201,6 +201,7 @@ int32_t smlBuildCol(STableDataCxt* pTableCxt, SSchema* schema, void* data, int32 SSmlKv* kv = (SSmlKv*)data; if(kv->keyLen != strlen(pColSchema->name) || memcmp(kv->key, pColSchema->name, kv->keyLen) != 0 || kv->type != pColSchema->type){ ret = TSDB_CODE_SML_INVALID_DATA; + uError("SML smlBuildCol error col not same %s", pColSchema->name); goto end; } if (kv->type == TSDB_DATA_TYPE_NCHAR) { From 3cea46db0022b5ed8dfc2aa04bceb5edaa5e7258 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Wed, 8 Mar 2023 17:45:25 +0800 Subject: [PATCH 083/154] fix(query): fix scalar calculation crash in stream when input rows is 0 --- source/libs/scalar/src/scalar.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/libs/scalar/src/scalar.c b/source/libs/scalar/src/scalar.c index 25938a7678..fe01977b2e 100644 --- a/source/libs/scalar/src/scalar.c +++ b/source/libs/scalar/src/scalar.c @@ -59,6 +59,8 @@ int32_t sclCreateColumnInfoData(SDataType *pType, int32_t numOfRows, SScalarPara pParam->columnData = pColumnData; pParam->colAlloced = true; + pParam->numOfRows = numOfRows; + return TSDB_CODE_SUCCESS; } @@ -740,6 +742,10 @@ int32_t sclExecFunction(SFunctionNode *node, SScalarCtx *ctx, SScalarParam *outp SCL_ERR_JRET(code); } + if (rowNum == 0) { + goto _return; + } + code = (*ffpSet.process)(params, paramNum, output); if (code) { sclError("scalar function exec failed, funcId:%d, code:%s", node->funcId, tstrerror(code)); From 7a7efac81076a9eddd8d6b6ba16e2231acd538e1 Mon Sep 17 00:00:00 2001 From: plum-lihui Date: Wed, 8 Mar 2023 18:08:52 +0800 Subject: [PATCH 084/154] test: modify tmq test cases --- tests/parallel_test/cases.task | 2 +- .../tmqConsFromTsdb1-mutilVg-mutilCtb.py | 22 +++++++++---------- .../7-tmq/tmqConsFromTsdb1-mutilVg.py | 20 ++++++++--------- tests/system-test/7-tmq/tmqConsFromTsdb1.py | 17 +++++++------- 4 files changed, 30 insertions(+), 31 deletions(-) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 9fbc2155ad..0945c4a7f7 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -733,7 +733,7 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-1ctb-funcNFilter.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py -#,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqAutoCreateTbl.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDnodeRestart.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDnodeRestart1.py diff --git a/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py b/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py index 8ff01444f8..439845aa54 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py @@ -18,8 +18,8 @@ from tmqCommon import * class TDTestCase: def __init__(self): self.vgroups = 4 - self.ctbNum = 3000 - self.rowsPerTbl = 70 + self.ctbNum = 1000 + self.rowsPerTbl = 100 def init(self, conn, logSql, replicaVar=1): self.replicaVar = int(replicaVar) @@ -112,15 +112,15 @@ class TDTestCase: # init consume info, and start tmq_sim, then check consume result tdLog.info("insert consume info to consume processor") consumerId = 3 - expectrowcnt = math.ceil(paraDict["rowsPerTbl"] * paraDict["ctbNum"] / 3) + expectrowcnt = math.ceil(paraDict["rowsPerTbl"] * paraDict["ctbNum"]) topicList = topicNameList[0] ifcheckdata = 1 ifManualCommit = 1 - keyList = 'group.id:cgrp1, enable.auto.commit:true, auto.commit.interval.ms:1000, auto.offset.reset:earliest' + keyList = 'group.id:cgrp3, enable.auto.commit:true, auto.commit.interval.ms:100, auto.offset.reset:earliest' tmqCom.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit) consumerId = 4 - expectrowcnt = math.ceil(paraDict["rowsPerTbl"] * paraDict["ctbNum"] * 2/3) + expectrowcnt = math.ceil(paraDict["rowsPerTbl"] * paraDict["ctbNum"]) tmqCom.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume processor 0") @@ -131,8 +131,8 @@ class TDTestCase: resultList = tmqCom.selectConsumeResult(expectRows) actConsumeTotalRows = resultList[0] + resultList[1] - if not (totalRowsInserted == actConsumeTotalRows): - tdLog.info("sum of two consume rows: %d should be equal to total inserted rows: %d"%(actConsumeTotalRows, totalRowsInserted)) + tdLog.info("sum of two consume rows: %d should be greater than or equal to total inserted rows: %d"%(actConsumeTotalRows, totalRowsInserted)) + if not (totalRowsInserted <= actConsumeTotalRows): tdLog.exit("%d tmq consume rows error!"%consumerId) time.sleep(10) @@ -188,7 +188,7 @@ class TDTestCase: topicList = topicNameList[0] ifcheckdata = 1 ifManualCommit = 1 - keyList = 'group.id:cgrp1, enable.auto.commit:true, auto.commit.interval.ms:1000, auto.offset.reset:earliest' + keyList = 'group.id:cgrp4, enable.auto.commit:true, auto.commit.interval.ms:100, auto.offset.reset:earliest' tmqCom.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume processor 0") @@ -216,9 +216,9 @@ class TDTestCase: actConsumeTotalRows = resultList[0] - if not (actConsumeTotalRows > 0 and actConsumeTotalRows < totalRowsInserted): - tdLog.info("act consume rows: %d"%(actConsumeTotalRows)) - tdLog.info("and second consume rows should be between 0 and %d"%(totalRowsInserted)) + tdLog.info("act consume rows: %d"%(actConsumeTotalRows)) + tdLog.info("and second consume rows should be between 0 and %d"%(totalRowsInserted)) + if not (actConsumeTotalRows > 0 and actConsumeTotalRows <= totalRowsInserted): tdLog.exit("%d tmq consume rows error!"%consumerId) time.sleep(10) diff --git a/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg.py b/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg.py index da8ac6c57d..53ff020b08 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg.py @@ -18,7 +18,7 @@ from tmqCommon import * class TDTestCase: def __init__(self): self.vgroups = 4 - self.ctbNum = 10 + self.ctbNum = 4 self.rowsPerTbl = 10000 def init(self, conn, logSql, replicaVar=1): @@ -41,7 +41,7 @@ class TDTestCase: 'ctbStartIdx': 0, 'ctbNum': 10, 'rowsPerTbl': 10000, - 'batchNum': 10, + 'batchNum': 1000, 'startTs': 1640966400000, # 2022-01-01 00:00:00.000 'pollDelay': 3, 'showMsg': 1, @@ -112,15 +112,15 @@ class TDTestCase: # init consume info, and start tmq_sim, then check consume result tdLog.info("insert consume info to consume processor") consumerId = 3 - expectrowcnt = math.ceil(paraDict["rowsPerTbl"] * paraDict["ctbNum"] / 3) + expectrowcnt = math.ceil(paraDict["rowsPerTbl"] * paraDict["ctbNum"]) topicList = topicNameList[0] ifcheckdata = 1 ifManualCommit = 1 - keyList = 'group.id:cgrp1, enable.auto.commit:true, auto.commit.interval.ms:200, auto.offset.reset:earliest' + keyList = 'group.id:cgrp3, enable.auto.commit:true, auto.commit.interval.ms:200, auto.offset.reset:earliest' tmqCom.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit) consumerId = 4 - expectrowcnt = math.ceil(paraDict["rowsPerTbl"] * paraDict["ctbNum"] * 2/3) + expectrowcnt = math.ceil(paraDict["rowsPerTbl"] * paraDict["ctbNum"]) tmqCom.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume processor 0") @@ -130,9 +130,9 @@ class TDTestCase: expectRows = 2 resultList = tmqCom.selectConsumeResult(expectRows) actConsumeTotalRows = resultList[0] + resultList[1] - - if not (totalRowsInserted == actConsumeTotalRows): - tdLog.info("sum of two consume rows: %d should be equal to total inserted rows: %d"%(actConsumeTotalRows, totalRowsInserted)) + + tdLog.info("sum of two consume rows: %d should be greater than or equal to total inserted rows: %d"%(actConsumeTotalRows, totalRowsInserted)) + if not (totalRowsInserted <= actConsumeTotalRows): tdLog.exit("%d tmq consume rows error!"%consumerId) time.sleep(10) @@ -188,7 +188,7 @@ class TDTestCase: topicList = topicNameList[0] ifcheckdata = 1 ifManualCommit = 1 - keyList = 'group.id:cgrp1, enable.auto.commit:true, auto.commit.interval.ms:200, auto.offset.reset:earliest' + keyList = 'group.id:cgrp4, enable.auto.commit:true, auto.commit.interval.ms:200, auto.offset.reset:earliest' tmqCom.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume processor 0") @@ -216,7 +216,7 @@ class TDTestCase: actConsumeTotalRows = resultList[0] - if not (actConsumeTotalRows > 0 and actConsumeTotalRows < totalRowsInserted): + if not (actConsumeTotalRows > 0 and actConsumeTotalRows <= totalRowsInserted): tdLog.info("act consume rows: %d"%(actConsumeTotalRows)) tdLog.info("and second consume rows should be between 0 and %d"%(totalRowsInserted)) tdLog.exit("%d tmq consume rows error!"%consumerId) diff --git a/tests/system-test/7-tmq/tmqConsFromTsdb1.py b/tests/system-test/7-tmq/tmqConsFromTsdb1.py index b910caf420..4bb6cf463f 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb1.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb1.py @@ -41,7 +41,7 @@ class TDTestCase: 'ctbStartIdx': 0, 'ctbNum': 10, 'rowsPerTbl': 10000, - 'batchNum': 10, + 'batchNum': 100, 'startTs': 1640966400000, # 2022-01-01 00:00:00.000 'pollDelay': 3, 'showMsg': 1, @@ -87,7 +87,7 @@ class TDTestCase: 'rowsPerTbl': 10000, 'batchNum': 10, 'startTs': 1640966400000, # 2022-01-01 00:00:00.000 - 'pollDelay': 25, + 'pollDelay': 10, 'showMsg': 1, 'showRow': 1, 'snapshot': 1} @@ -116,7 +116,7 @@ class TDTestCase: topicList = topicNameList[0] ifcheckdata = 1 ifManualCommit = 1 - keyList = 'group.id:cgrp1, enable.auto.commit:true, auto.commit.interval.ms:200, auto.offset.reset:earliest' + keyList = 'group.id:cgrp3, enable.auto.commit:true, auto.commit.interval.ms:200, auto.offset.reset:earliest' tmqCom.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit) consumerId = 4 @@ -131,8 +131,8 @@ class TDTestCase: resultList = tmqCom.selectConsumeResult(expectRows) actConsumeTotalRows = resultList[0] + resultList[1] + tdLog.info("sum of two consume rows: %d should be equal to total inserted rows: %d"%(actConsumeTotalRows, totalRowsInserted)) if not (totalRowsInserted == actConsumeTotalRows): - tdLog.info("sum of two consume rows: %d should be equal to total inserted rows: %d"%(actConsumeTotalRows, totalRowsInserted)) tdLog.exit("%d tmq consume rows error!"%consumerId) time.sleep(10) @@ -188,7 +188,7 @@ class TDTestCase: topicList = topicNameList[0] ifcheckdata = 1 ifManualCommit = 1 - keyList = 'group.id:cgrp1, enable.auto.commit:true, auto.commit.interval.ms:200, auto.offset.reset:earliest' + keyList = 'group.id:cgrp4, enable.auto.commit:true, auto.commit.interval.ms:200, auto.offset.reset:earliest' tmqCom.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume processor 0") @@ -213,12 +213,11 @@ class TDTestCase: expectRows = 1 resultList = tmqCom.selectConsumeResult(expectRows) - actConsumeTotalRows = resultList[0] - if not (actConsumeTotalRows > 0 and actConsumeTotalRows < totalRowsInserted): - tdLog.info("act consume rows: %d"%(actConsumeTotalRows)) - tdLog.info("and second consume rows should be between 0 and %d"%(totalRowsInserted)) + tdLog.info("act consume rows: %d"%(actConsumeTotalRows)) + tdLog.info("and second consume rows should be between 0 and %d"%(totalRowsInserted)) + if not ((actConsumeTotalRows > 0) and (actConsumeTotalRows <= totalRowsInserted)): tdLog.exit("%d tmq consume rows error!"%consumerId) time.sleep(10) From ba42791271ee6ee7e3a4ae89a44e090ffbcbb6da Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 8 Mar 2023 18:14:06 +0800 Subject: [PATCH 085/154] remove unused log --- source/libs/transport/src/transCli.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 9bd50bddc7..50ed9fa61b 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -1497,6 +1497,7 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) { destroyCmsg(pMsg); return; } + if (rpcDebugFlag & DEBUG_TRACE) { if (tmsgIsValid(pMsg->msg.msgType)) { char buf[128] = {0}; From 01a5d5d219776e063c1cdd9ffba475ae7543bcc9 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 8 Mar 2023 18:16:29 +0800 Subject: [PATCH 086/154] unit sma and tag index error msg --- source/dnode/vnode/src/vnd/vnodeSvr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index 8e219c2b12..d1e5bb36f3 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -1655,6 +1655,7 @@ static int32_t vnodeProcessDropIndexReq(SVnode *pVnode, int64_t version, void *p terrno = TSDB_CODE_INVALID_MSG; return -1; } + if (metaDropIndexFromSTable(pVnode->pMeta, version, &req) < 0) { pRsp->code = terrno; return -1; From 9291156585437d1290dd223c6489aa4e109f41bb Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Wed, 8 Mar 2023 18:44:16 +0800 Subject: [PATCH 087/154] fix: remove test case has random results --- tests/system-test/2-query/mavg.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/system-test/2-query/mavg.py b/tests/system-test/2-query/mavg.py index d659a682b1..798d0e290b 100644 --- a/tests/system-test/2-query/mavg.py +++ b/tests/system-test/2-query/mavg.py @@ -716,8 +716,6 @@ class TDTestCase: tdSql.checkRows(2) # partition by col - tdSql.query(f"select c1 , mavg(c1,3) from {dbname}.stb1 partition by c1") - tdSql.checkRows(0) tdSql.query(f"select c1 , mavg(c1,1) from {dbname}.stb1 partition by c1") tdSql.checkRows(40) tdSql.query(f"select c1, c2, c3, c4, mavg(c1,3) from {dbname}.stb1 partition by tbname ") From 87ba6cb0197739c0e13cb1a5b55b3e5af77d7db2 Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao@163.com> Date: Wed, 8 Mar 2023 18:15:35 +0800 Subject: [PATCH 088/154] fix:fill history check update --- source/common/src/tdatablock.c | 4 +- source/libs/executor/inc/executorimpl.h | 3 +- source/libs/executor/src/scanoperator.c | 43 +++++++++++++++---- source/libs/executor/src/timewindowoperator.c | 3 +- 4 files changed, 40 insertions(+), 13 deletions(-) diff --git a/source/common/src/tdatablock.c b/source/common/src/tdatablock.c index 453e4a8d8e..3c8d394b43 100644 --- a/source/common/src/tdatablock.c +++ b/source/common/src/tdatablock.c @@ -2044,8 +2044,8 @@ char* dumpBlockData(SSDataBlock* pDataBlock, const char* flag, char** pDataBuf) if (len >= size - 1) return dumpBuf; break; case TSDB_DATA_TYPE_DOUBLE: - // len += snprintf(dumpBuf + len, size - len, " %15lf |", *(double*)var); - // if (len >= size - 1) return dumpBuf; + len += snprintf(dumpBuf + len, size - len, " %15f |", *(double*)var); + if (len >= size - 1) return dumpBuf; break; case TSDB_DATA_TYPE_BOOL: len += snprintf(dumpBuf + len, size - len, " %15d |", *(bool*)var); diff --git a/source/libs/executor/inc/executorimpl.h b/source/libs/executor/inc/executorimpl.h index 0b55eb4a45..55bf8b37d0 100644 --- a/source/libs/executor/inc/executorimpl.h +++ b/source/libs/executor/inc/executorimpl.h @@ -121,7 +121,8 @@ enum { STREAM_RECOVER_STEP__NONE = 0, STREAM_RECOVER_STEP__PREPARE1, STREAM_RECOVER_STEP__PREPARE2, - STREAM_RECOVER_STEP__SCAN, + STREAM_RECOVER_STEP__SCAN1, + STREAM_RECOVER_STEP__SCAN2, }; typedef struct { diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 2f3b757241..fccb53f0cd 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -1724,9 +1724,9 @@ static void setBlockGroupIdByUid(SStreamScanInfo* pInfo, SSDataBlock* pBlock) { } } -static void doCheckUpdate(SStreamScanInfo* pInfo, TSKEY endKey) { +static void doCheckUpdate(SStreamScanInfo* pInfo, TSKEY endKey, SSDataBlock* pBlock) { if (pInfo->pUpdateInfo) { - checkUpdateData(pInfo, true, pInfo->pRes, true); + checkUpdateData(pInfo, true, pBlock, true); pInfo->twAggSup.maxTs = TMAX(pInfo->twAggSup.maxTs, endKey); if (pInfo->pUpdateDataRes->info.rows > 0) { pInfo->updateResIndex = 0; @@ -1758,11 +1758,13 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) { pTSInfo->base.cond.endVersion = pTaskInfo->streamInfo.fillHistoryVer1; qDebug("stream recover step 1, from %" PRId64 " to %" PRId64, pTSInfo->base.cond.startVersion, pTSInfo->base.cond.endVersion); + pTaskInfo->streamInfo.recoverStep = STREAM_RECOVER_STEP__SCAN1; } else { pTSInfo->base.cond.startVersion = pTaskInfo->streamInfo.fillHistoryVer1 + 1; pTSInfo->base.cond.endVersion = pTaskInfo->streamInfo.fillHistoryVer2; qDebug("stream recover step 2, from %" PRId64 " to %" PRId64, pTSInfo->base.cond.startVersion, pTSInfo->base.cond.endVersion); + pTaskInfo->streamInfo.recoverStep = STREAM_RECOVER_STEP__SCAN2; } /*resetTableScanInfo(pTSInfo, pWin);*/ @@ -1772,11 +1774,11 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) { pTSInfo->scanTimes = 0; pTSInfo->currentGroupId = -1; - pTaskInfo->streamInfo.recoverStep = STREAM_RECOVER_STEP__SCAN; pTaskInfo->streamInfo.recoverScanFinished = false; } - if (pTaskInfo->streamInfo.recoverStep == STREAM_RECOVER_STEP__SCAN) { + if (pTaskInfo->streamInfo.recoverStep == STREAM_RECOVER_STEP__SCAN1 || + pTaskInfo->streamInfo.recoverStep == STREAM_RECOVER_STEP__SCAN2) { if (pInfo->blockRecoverContiCnt > 100) { pInfo->blockRecoverTotCnt += pInfo->blockRecoverContiCnt; pInfo->blockRecoverContiCnt = 0; @@ -1789,6 +1791,27 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) { printDataBlock(pInfo->pRecoverRes, "scan recover"); return pInfo->pRecoverRes; } break; + case STREAM_SCAN_FROM_UPDATERES: { + generateScanRange(pInfo, pInfo->pUpdateDataRes, pInfo->pUpdateRes); + prepareRangeScan(pInfo, pInfo->pUpdateRes, &pInfo->updateResIndex); + pInfo->scanMode = STREAM_SCAN_FROM_DATAREADER_RANGE; + return pInfo->pUpdateRes; + } break; + case STREAM_SCAN_FROM_DATAREADER_RANGE: { + SSDataBlock* pSDB = doRangeScan(pInfo, pInfo->pUpdateRes, pInfo->primaryTsIndex, &pInfo->updateResIndex); + if (pSDB) { + STableScanInfo* pTableScanInfo = pInfo->pTableScanOp->info; + uint64_t version = getReaderMaxVersion(pTableScanInfo->base.dataReader); + updateInfoSetScanRange(pInfo->pUpdateInfo, &pTableScanInfo->base.cond.twindows, pInfo->groupId, version); + pSDB->info.type = pInfo->scanMode == STREAM_SCAN_FROM_DATAREADER_RANGE ? STREAM_NORMAL : STREAM_PULL_DATA; + checkUpdateData(pInfo, true, pSDB, false); + // printDataBlock(pSDB, "stream scan update"); + calBlockTbName(pInfo, pSDB); + return pSDB; + } + blockDataCleanup(pInfo->pUpdateDataRes); + pInfo->scanMode = STREAM_SCAN_FROM_READERHANDLE; + } break; default: break; } @@ -1798,8 +1821,12 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) { pInfo->blockRecoverContiCnt++; calBlockTbName(pInfo, pInfo->pRecoverRes); if (pInfo->pUpdateInfo) { - TSKEY maxTs = updateInfoFillBlockData(pInfo->pUpdateInfo, pInfo->pRecoverRes, pInfo->primaryTsIndex); - pInfo->twAggSup.maxTs = TMAX(pInfo->twAggSup.maxTs, maxTs); + if (pTaskInfo->streamInfo.recoverStep == STREAM_RECOVER_STEP__SCAN1) { + TSKEY maxTs = updateInfoFillBlockData(pInfo->pUpdateInfo, pInfo->pRecoverRes, pInfo->primaryTsIndex); + pInfo->twAggSup.maxTs = TMAX(pInfo->twAggSup.maxTs, maxTs); + } else { + doCheckUpdate(pInfo, pInfo->pRecoverRes->info.window.ekey, pInfo->pRecoverRes); + } } if (pInfo->pCreateTbRes->info.rows > 0) { pInfo->scanMode = STREAM_SCAN_FROM_RES; @@ -1910,7 +1937,7 @@ FETCH_NEXT_BLOCK: switch (pInfo->scanMode) { case STREAM_SCAN_FROM_RES: { pInfo->scanMode = STREAM_SCAN_FROM_READERHANDLE; - doCheckUpdate(pInfo, pInfo->pRes->info.window.ekey); + doCheckUpdate(pInfo, pInfo->pRes->info.window.ekey, pInfo->pRes); doFilter(pInfo->pRes, pOperator->exprSupp.pFilterInfo, NULL); pInfo->pRes->info.dataLoad = 1; blockDataUpdateTsWindow(pInfo->pRes, pInfo->primaryTsIndex); @@ -2011,7 +2038,7 @@ FETCH_NEXT_BLOCK: return pInfo->pCreateTbRes; } - doCheckUpdate(pInfo, pBlockInfo->window.ekey); + doCheckUpdate(pInfo, pBlockInfo->window.ekey, pInfo->pRes); doFilter(pInfo->pRes, pOperator->exprSupp.pFilterInfo, NULL); pInfo->pRes->info.dataLoad = 1; blockDataUpdateTsWindow(pInfo->pRes, pInfo->primaryTsIndex); diff --git a/source/libs/executor/src/timewindowoperator.c b/source/libs/executor/src/timewindowoperator.c index 6411d862ae..bfdf5ea89b 100644 --- a/source/libs/executor/src/timewindowoperator.c +++ b/source/libs/executor/src/timewindowoperator.c @@ -4805,10 +4805,9 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo* pOperator) { setInverFunction(pSup->pCtx, pOperator->exprSupp.numOfExprs, pBlock->info.type); } + doStreamIntervalAggImpl(pOperator, pBlock, pBlock->info.id.groupId, pInfo->pUpdatedMap); pInfo->twAggSup.maxTs = TMAX(pInfo->twAggSup.maxTs, pBlock->info.window.ekey); pInfo->twAggSup.minTs = TMIN(pInfo->twAggSup.minTs, pBlock->info.window.skey); - - doStreamIntervalAggImpl(pOperator, pBlock, pBlock->info.id.groupId, pInfo->pUpdatedMap); } pOperator->status = OP_RES_TO_RETURN; removeDeleteResults(pInfo->pUpdatedMap, pInfo->pDelWins); From 24ebb2f5473b2328c7134511e1d8d204e8672d57 Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Wed, 8 Mar 2023 17:34:24 +0800 Subject: [PATCH 089/154] enh: no need to wait for emptying apply queue in syncNodePreClose --- source/dnode/mgmt/mgmt_vnode/src/vmInt.c | 2 +- source/libs/sync/src/syncMain.c | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c index 8008e5f810..0524e2713a 100644 --- a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c +++ b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c @@ -124,7 +124,7 @@ void vmCloseVnode(SVnodeMgmt *pMgmt, SVnodeObj *pVnode, bool commitAndRemoveWal) vmFreeQueue(pMgmt, pVnode); if (commitAndRemoveWal) { - dInfo("vgId:%d, commit data", pVnode->vgId); + dInfo("vgId:%d, commit data for vnode split", pVnode->vgId); vnodeSyncCommit(pVnode->pImpl); vnodeBegin(pVnode->pImpl); dInfo("vgId:%d, commit data finished", pVnode->vgId); diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 9601cd6ab0..a19ad299be 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -1082,21 +1082,15 @@ void syncNodePreClose(SSyncNode* pSyncNode) { ASSERT(pSyncNode->pFsm != NULL); ASSERT(pSyncNode->pFsm->FpApplyQueueItems != NULL); - while (1) { - int32_t aqItems = pSyncNode->pFsm->FpApplyQueueItems(pSyncNode->pFsm); - sTrace("vgId:%d, pre close, %d items in apply queue", pSyncNode->vgId, aqItems); - if (aqItems == 0 || aqItems == -1) { - break; - } - taosMsleep(20); - } - // stop elect timer syncNodeStopElectTimer(pSyncNode); // stop heartbeat timer syncNodeStopHeartbeatTimer(pSyncNode); + // stop ping timer + syncNodeStopPingTimer(pSyncNode); + // clean rsp syncRespCleanRsp(pSyncNode->pSyncRespMgr); } @@ -1120,10 +1114,11 @@ void syncNodeClose(SSyncNode* pSyncNode) { if (pSyncNode == NULL) return; sNInfo(pSyncNode, "sync close, node:%p", pSyncNode); + syncRespCleanRsp(pSyncNode->pSyncRespMgr); + syncNodeStopPingTimer(pSyncNode); syncNodeStopElectTimer(pSyncNode); syncNodeStopHeartbeatTimer(pSyncNode); - syncNodeLogReplMgrDestroy(pSyncNode); syncRespMgrDestroy(pSyncNode->pSyncRespMgr); From 273d0c0c0768eace9d540d056c1a560c12a2eca4 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Thu, 9 Mar 2023 10:40:27 +0800 Subject: [PATCH 090/154] fix: all columns are invisiable in system table query --- source/libs/nodes/src/nodesUtilFuncs.c | 2 +- source/libs/parser/src/parTranslater.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 22afc7ef55..8d6c3288b9 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -1462,7 +1462,7 @@ SListCell* nodesListErase(SNodeList* pList, SListCell* pCell) { } void nodesListInsertList(SNodeList* pTarget, SListCell* pPos, SNodeList* pSrc) { - if (NULL == pTarget || NULL == pPos || NULL == pSrc) { + if (NULL == pTarget || NULL == pPos || NULL == pSrc || NULL == pSrc->pHead) { return; } diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 99dca701c9..b937eeb9d8 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -2935,6 +2935,9 @@ static int32_t translateSelectList(STranslateContext* pCxt, SSelectStmt* pSelect if (TSDB_CODE_SUCCESS == code) { code = translateFillValues(pCxt, pSelect); } + if (NULL == pSelect->pProjectionList || 0 >= pSelect->pProjectionList->length) { + code = TSDB_CODE_PAR_INVALID_SELECTED_EXPR; + } return code; } From b2610da03c5edd75b78c9fe4593a9b9611ba3a15 Mon Sep 17 00:00:00 2001 From: t_max <1172915550@qq.com> Date: Thu, 9 Mar 2023 14:29:05 +0800 Subject: [PATCH 091/154] fix: TIMETRUNCATE with 1d return unexpected result --- source/libs/scalar/src/sclfunc.c | 10 +++++----- source/os/src/osRand.c | 10 +++++++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/source/libs/scalar/src/sclfunc.c b/source/libs/scalar/src/sclfunc.c index f4c3669574..195a08525c 100644 --- a/source/libs/scalar/src/sclfunc.c +++ b/source/libs/scalar/src/sclfunc.c @@ -1055,9 +1055,9 @@ int32_t toISO8601Function(SScalarParam *pInput, int32_t inputNum, SScalarParam * if (tsDigits == TSDB_TIME_PRECISION_MILLI_DIGITS) { timeVal = timeVal / 1000; } else if (tsDigits == TSDB_TIME_PRECISION_MICRO_DIGITS) { - timeVal = timeVal / (1000 * 1000); + timeVal = timeVal / ((int64_t)(1000 * 1000)); } else if (tsDigits == TSDB_TIME_PRECISION_NANO_DIGITS) { - timeVal = timeVal / (1000 * 1000 * 1000); + timeVal = timeVal / ((int64_t)(1000 * 1000 * 1000)); } else { colDataSetNULL(pOutput->columnData, i); continue; @@ -1317,19 +1317,19 @@ int32_t timeTruncateFunction(SScalarParam *pInput, int32_t inputNum, SScalarPara case 86400000: { /* 1d */ if (tsDigits == TSDB_TIME_PRECISION_MILLI_DIGITS) { if (ignoreTz) { - timeVal = timeVal - (timeVal + offsetFromTz(timezone, 1000)) % (86400L * 1000); + timeVal = timeVal - (timeVal + offsetFromTz(timezone, 1000)) % (((int64_t)86400) * 1000); } else { timeVal = timeVal / 1000 / 86400 * 86400 * 1000; } } else if (tsDigits == TSDB_TIME_PRECISION_MICRO_DIGITS) { if (ignoreTz) { - timeVal = timeVal - (timeVal + offsetFromTz(timezone, 1000000)) % (86400L * 1000000); + timeVal = timeVal - (timeVal + offsetFromTz(timezone, 1000000)) % (((int64_t)86400) * 1000000); } else { timeVal = timeVal / 1000000 / 86400 * 86400 * 1000000; } } else if (tsDigits == TSDB_TIME_PRECISION_NANO_DIGITS) { if (ignoreTz) { - timeVal = timeVal - (timeVal + offsetFromTz(timezone, 1000000000)) % (86400L * 1000000000); + timeVal = timeVal - (timeVal + offsetFromTz(timezone, 1000000000)) % (((int64_t)86400) * 1000000000); } else { timeVal = timeVal / 1000000000 / 86400 * 86400 * 1000000000; } diff --git a/source/os/src/osRand.c b/source/os/src/osRand.c index 4998eb45a4..83c36a422d 100644 --- a/source/os/src/osRand.c +++ b/source/os/src/osRand.c @@ -25,7 +25,15 @@ void taosSeedRand(uint32_t seed) { return srand(seed); } -uint32_t taosRand(void) { return rand(); } +uint32_t taosRand(void) { +#ifdef WINDOWS + unsigned int pSeed; + rand_s(&pSeed); + return pSeed; +#else + return rand(); +#endif +} uint32_t taosRandR(uint32_t* pSeed) { #ifdef WINDOWS From 16262512b270373700fec9ad5494cd127b7622cf Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 9 Mar 2023 15:25:47 +0800 Subject: [PATCH 092/154] feat: alter stt_trigger and minrows --- include/common/tmsg.h | 3 +++ source/common/src/tmsg.c | 14 ++++++++++++++ source/dnode/mnode/impl/inc/mndDef.h | 2 +- source/dnode/mnode/impl/src/mndVgroup.c | 2 ++ source/dnode/vnode/src/vnd/vnodeSvr.c | 8 ++++++++ 5 files changed, 28 insertions(+), 1 deletion(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 17fde6a536..2a0602a813 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1316,6 +1316,9 @@ typedef struct { int8_t strict; int8_t cacheLast; int64_t reserved[8]; + // 1.0 modification + int16_t sttTrigger; + int32_t minRows; } SAlterVnodeConfigReq; int32_t tSerializeSAlterVnodeConfigReq(void* buf, int32_t bufLen, SAlterVnodeConfigReq* pReq); diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 6dd28094cb..4dbe974ccd 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -4172,6 +4172,11 @@ int32_t tSerializeSAlterVnodeConfigReq(void *buf, int32_t bufLen, SAlterVnodeCon for (int32_t i = 0; i < 8; ++i) { if (tEncodeI64(&encoder, pReq->reserved[i]) < 0) return -1; } + + // 1.0 modification + if (tEncodeI16(&encoder, pReq->sttTrigger) < 0) return -1; + if (tEncodeI32(&encoder, pReq->minRows) < 0) return -1; + tEndEncode(&encoder); int32_t tlen = encoder.pos; @@ -4201,6 +4206,15 @@ int32_t tDeserializeSAlterVnodeConfigReq(void *buf, int32_t bufLen, SAlterVnodeC if (tDecodeI64(&decoder, &pReq->reserved[i]) < 0) return -1; } + // 1.0 modification + if (tDecodeIsEnd(&decoder)) { + pReq->sttTrigger = -1; + pReq->minRows = -1; + } else { + if (tDecodeI16(&decoder, &pReq->sttTrigger) < 0) return -1; + if (tDecodeI32(&decoder, &pReq->minRows) < 0) return -1; + } + tEndDecode(&decoder); tDecoderClear(&decoder); return 0; diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index fe2c58e29e..ebe96fd740 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -543,7 +543,7 @@ void* tDecodeSMqConsumerObj(const void* buf, SMqConsumerObj* pConsumer typedef struct { int32_t vgId; - char* qmsg; //SubPlanToString + char* qmsg; // SubPlanToString SEpSet epSet; } SMqVgEp; diff --git a/source/dnode/mnode/impl/src/mndVgroup.c b/source/dnode/mnode/impl/src/mndVgroup.c index b5d9353b68..84e8a9ec43 100644 --- a/source/dnode/mnode/impl/src/mndVgroup.c +++ b/source/dnode/mnode/impl/src/mndVgroup.c @@ -319,6 +319,8 @@ static void *mndBuildAlterVnodeConfigReq(SMnode *pMnode, SDbObj *pDb, SVgObj *pV alterReq.walLevel = pDb->cfg.walLevel; alterReq.strict = pDb->cfg.strict; alterReq.cacheLast = pDb->cfg.cacheLast; + alterReq.sttTrigger = pDb->cfg.sstTrigger; + alterReq.minRows = pDb->cfg.minRows; mInfo("vgId:%d, build alter vnode config req", pVgroup->vgId); int32_t contLen = tSerializeSAlterVnodeConfigReq(NULL, 0, &alterReq); diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index fb8d230eba..7cdac9385a 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -1541,6 +1541,14 @@ static int32_t vnodeProcessAlterConfigReq(SVnode *pVnode, int64_t version, void } } + if (req.sttTrigger != -1 && req.sttTrigger != pVnode->config.sttTrigger) { + pVnode->config.sttTrigger = req.sttTrigger; + } + + if (req.minRows != -1 && req.minRows != pVnode->config.tsdbCfg.minRows) { + pVnode->config.tsdbCfg.minRows = req.minRows; + } + if (walChanged) { walAlter(pVnode->pWal, &pVnode->config.walCfg); } From 8ecfaa5a7cbe28449758de8d2ce654d2a84e4207 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 9 Mar 2023 15:42:09 +0800 Subject: [PATCH 093/154] refact --- include/common/tmsg.h | 2 +- source/common/src/tmsg.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 2a0602a813..7580f6602b 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1316,7 +1316,7 @@ typedef struct { int8_t strict; int8_t cacheLast; int64_t reserved[8]; - // 1.0 modification + // 1st modification int16_t sttTrigger; int32_t minRows; } SAlterVnodeConfigReq; diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 4dbe974ccd..bf3705fb86 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -4173,7 +4173,7 @@ int32_t tSerializeSAlterVnodeConfigReq(void *buf, int32_t bufLen, SAlterVnodeCon if (tEncodeI64(&encoder, pReq->reserved[i]) < 0) return -1; } - // 1.0 modification + // 1st modification if (tEncodeI16(&encoder, pReq->sttTrigger) < 0) return -1; if (tEncodeI32(&encoder, pReq->minRows) < 0) return -1; @@ -4206,7 +4206,7 @@ int32_t tDeserializeSAlterVnodeConfigReq(void *buf, int32_t bufLen, SAlterVnodeC if (tDecodeI64(&decoder, &pReq->reserved[i]) < 0) return -1; } - // 1.0 modification + // 1st modification if (tDecodeIsEnd(&decoder)) { pReq->sttTrigger = -1; pReq->minRows = -1; From e5de317f4499f07c0ab66923c442bfb8a0ba157c Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 9 Mar 2023 16:04:38 +0800 Subject: [PATCH 094/154] feat: alter database stt_trigger/minrows --- include/common/tmsg.h | 1 + source/common/src/tmsg.c | 4 + source/dnode/mnode/impl/src/mndDb.c | 12 + source/libs/parser/inc/sql.y | 1 + source/libs/parser/src/parTranslater.c | 6 +- source/libs/parser/src/sql.c | 4041 +++++++++-------- .../parser/test/parAlterToBalanceTest.cpp | 13 + 7 files changed, 2057 insertions(+), 2021 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 2a0602a813..2e47e4d3b3 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -845,6 +845,7 @@ typedef struct { int8_t cacheLast; int8_t replications; int32_t sstTrigger; + int32_t minRows; } SAlterDbReq; int32_t tSerializeSAlterDbReq(void* buf, int32_t bufLen, SAlterDbReq* pReq); diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 4dbe974ccd..3cf2baa370 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -2219,6 +2219,7 @@ int32_t tSerializeSAlterDbReq(void *buf, int32_t bufLen, SAlterDbReq *pReq) { if (tEncodeI8(&encoder, pReq->cacheLast) < 0) return -1; if (tEncodeI8(&encoder, pReq->replications) < 0) return -1; if (tEncodeI32(&encoder, pReq->sstTrigger) < 0) return -1; + if (tEncodeI32(&encoder, pReq->minRows) < 0) return -1; tEndEncode(&encoder); int32_t tlen = encoder.pos; @@ -2246,6 +2247,9 @@ int32_t tDeserializeSAlterDbReq(void *buf, int32_t bufLen, SAlterDbReq *pReq) { if (tDecodeI8(&decoder, &pReq->cacheLast) < 0) return -1; if (tDecodeI8(&decoder, &pReq->replications) < 0) return -1; if (tDecodeI32(&decoder, &pReq->sstTrigger) < 0) return -1; + if (!tDecodeIsEnd(&decoder)) { + if (tDecodeI32(&decoder, &pReq->minRows) < 0) return -1; + } tEndDecode(&decoder); tDecoderClear(&decoder); diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c index af76971304..e848a81d40 100644 --- a/source/dnode/mnode/impl/src/mndDb.c +++ b/source/dnode/mnode/impl/src/mndDb.c @@ -725,6 +725,18 @@ static int32_t mndSetDbCfgFromAlterDbReq(SDbObj *pDb, SAlterDbReq *pAlter) { terrno = 0; } + if (pAlter->sstTrigger > 0 && pAlter->sstTrigger != pDb->cfg.sstTrigger) { + pDb->cfg.sstTrigger = pAlter->sstTrigger; + pDb->vgVersion++; + terrno = 0; + } + + if (pAlter->minRows > 0 && pAlter->minRows != pDb->cfg.minRows) { + pDb->cfg.minRows = pAlter->minRows; + pDb->vgVersion++; + terrno = 0; + } + return terrno; } diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index db418169a5..9fd8d5415a 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -236,6 +236,7 @@ alter_db_option(A) ::= REPLICA NK_INTEGER(B). //alter_db_option(A) ::= STRICT NK_STRING(B). { A.type = DB_OPTION_STRICT; A.val = B; } alter_db_option(A) ::= WAL_LEVEL NK_INTEGER(B). { A.type = DB_OPTION_WAL; A.val = B; } alter_db_option(A) ::= STT_TRIGGER NK_INTEGER(B). { A.type = DB_OPTION_STT_TRIGGER; A.val = B; } +alter_db_option(A) ::= MINROWS NK_INTEGER(B). { A.type = DB_OPTION_MINROWS; A.val = B; } %type integer_list { SNodeList* } %destructor integer_list { nodesDestroyList($$); } diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index b937eeb9d8..9d1fd3218e 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -2500,9 +2500,8 @@ static int32_t translateTable(STranslateContext* pCxt, SNode* pTable) { STempTableNode* pTempTable = (STempTableNode*)pTable; code = translateSubquery(pCxt, pTempTable->pSubquery); if (TSDB_CODE_SUCCESS == code) { - if (QUERY_NODE_SELECT_STMT == nodeType(pTempTable->pSubquery) && - ((SSelectStmt*)pTempTable->pSubquery)->isEmptyResult && - isSelectStmt(pCxt->pCurrStmt)) { + if (QUERY_NODE_SELECT_STMT == nodeType(pTempTable->pSubquery) && + ((SSelectStmt*)pTempTable->pSubquery)->isEmptyResult && isSelectStmt(pCxt->pCurrStmt)) { ((SSelectStmt*)pCxt->pCurrStmt)->isEmptyResult = true; } @@ -4254,6 +4253,7 @@ static void buildAlterDbReq(STranslateContext* pCxt, SAlterDatabaseStmt* pStmt, pReq->cacheLastSize = pStmt->pOptions->cacheLastSize; pReq->replications = pStmt->pOptions->replica; pReq->sstTrigger = pStmt->pOptions->sstTrigger; + pReq->minRows = pStmt->pOptions->minRowsPerBlock; return; } diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 6df57cd32b..291d35ebe3 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -139,17 +139,17 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 751 -#define YYNRULE 571 +#define YYNSTATE 752 +#define YYNRULE 572 #define YYNTOKEN 328 -#define YY_MAX_SHIFT 750 -#define YY_MIN_SHIFTREDUCE 1116 -#define YY_MAX_SHIFTREDUCE 1686 -#define YY_ERROR_ACTION 1687 -#define YY_ACCEPT_ACTION 1688 -#define YY_NO_ACTION 1689 -#define YY_MIN_REDUCE 1690 -#define YY_MAX_REDUCE 2260 +#define YY_MAX_SHIFT 751 +#define YY_MIN_SHIFTREDUCE 1118 +#define YY_MAX_SHIFTREDUCE 1689 +#define YY_ERROR_ACTION 1690 +#define YY_ACCEPT_ACTION 1691 +#define YY_NO_ACTION 1692 +#define YY_MIN_REDUCE 1693 +#define YY_MAX_REDUCE 2264 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -218,506 +218,506 @@ typedef union { *********** Begin parsing tables **********************************************/ #define YY_ACTTAB_COUNT (2669) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 387, 376, 490, 2072, 491, 1726, 603, 1841, 161, 164, - /* 10 */ 2231, 1149, 45, 43, 1614, 363, 176, 1854, 1854, 549, - /* 20 */ 384, 1843, 1463, 615, 1903, 602, 182, 1971, 1247, 2058, - /* 30 */ 2232, 604, 2054, 1544, 559, 1461, 2090, 351, 1954, 375, - /* 40 */ 2054, 1246, 1968, 627, 618, 1971, 13, 12, 236, 2040, - /* 50 */ 1151, 656, 1154, 1155, 1488, 166, 139, 1702, 1539, 1488, - /* 60 */ 1969, 627, 1905, 552, 18, 1905, 2050, 2056, 546, 349, - /* 70 */ 1688, 1469, 362, 235, 2050, 2056, 365, 650, 1903, 640, - /* 80 */ 2071, 1903, 429, 178, 2107, 650, 2235, 109, 2073, 660, - /* 90 */ 2075, 2076, 655, 639, 650, 132, 1892, 747, 2236, 179, - /* 100 */ 14, 2160, 529, 476, 389, 378, 2156, 1898, 1900, 167, - /* 110 */ 45, 43, 1852, 625, 69, 1490, 1798, 68, 384, 184, - /* 120 */ 1463, 269, 2168, 614, 332, 133, 613, 2186, 508, 2231, - /* 130 */ 1490, 1544, 499, 1461, 491, 1726, 1546, 1547, 397, 603, - /* 140 */ 621, 31, 396, 2231, 602, 182, 1587, 38, 37, 2232, - /* 150 */ 604, 44, 42, 41, 40, 39, 1539, 489, 602, 182, - /* 160 */ 494, 1732, 18, 2232, 604, 1489, 1519, 1529, 1713, 1469, - /* 170 */ 1756, 122, 1545, 1548, 121, 120, 119, 118, 117, 116, - /* 180 */ 115, 114, 113, 578, 598, 578, 1464, 2231, 1462, 2231, - /* 190 */ 44, 42, 41, 40, 39, 747, 1676, 639, 14, 694, - /* 200 */ 1382, 1383, 2237, 182, 2237, 182, 593, 2232, 604, 2232, - /* 210 */ 604, 176, 1467, 1468, 2040, 1518, 1521, 1522, 1523, 1524, - /* 220 */ 1525, 1526, 1527, 1528, 652, 648, 1537, 1538, 1540, 1541, - /* 230 */ 1542, 1543, 2, 1955, 1546, 1547, 724, 723, 722, 721, - /* 240 */ 394, 1712, 720, 719, 143, 714, 713, 712, 711, 710, - /* 250 */ 709, 708, 156, 704, 703, 702, 393, 392, 699, 698, - /* 260 */ 697, 696, 695, 271, 1519, 1529, 639, 567, 38, 37, - /* 270 */ 1545, 1548, 44, 42, 41, 40, 39, 48, 271, 640, - /* 280 */ 1491, 1327, 1328, 467, 1464, 692, 1462, 2040, 238, 599, - /* 290 */ 594, 587, 237, 38, 37, 132, 1487, 44, 42, 41, - /* 300 */ 40, 39, 534, 154, 153, 689, 688, 687, 151, 86, - /* 310 */ 1467, 1468, 1852, 1518, 1521, 1522, 1523, 1524, 1525, 1526, - /* 320 */ 1527, 1528, 652, 648, 1537, 1538, 1540, 1541, 1542, 1543, - /* 330 */ 2, 11, 45, 43, 1848, 498, 626, 2059, 494, 1732, - /* 340 */ 384, 1293, 1463, 423, 198, 197, 48, 422, 2054, 344, - /* 350 */ 89, 339, 606, 1544, 361, 1461, 560, 1284, 682, 681, - /* 360 */ 680, 1288, 679, 1290, 1291, 678, 675, 466, 1299, 672, - /* 370 */ 1301, 1302, 669, 666, 1691, 194, 35, 290, 1539, 1829, - /* 380 */ 496, 2072, 2050, 2056, 18, 506, 492, 1964, 578, 610, - /* 390 */ 2033, 1469, 2231, 650, 1573, 122, 1899, 1900, 121, 120, - /* 400 */ 119, 118, 117, 116, 115, 114, 113, 2237, 182, 86, - /* 410 */ 281, 282, 2232, 604, 2090, 280, 83, 747, 1618, 82, - /* 420 */ 14, 1168, 657, 1167, 1488, 353, 185, 2040, 249, 656, - /* 430 */ 45, 43, 1549, 61, 1847, 578, 222, 1554, 384, 2231, - /* 440 */ 1463, 38, 37, 1488, 49, 44, 42, 41, 40, 39, - /* 450 */ 1574, 1544, 1169, 1461, 2237, 182, 1546, 1547, 2071, 2232, - /* 460 */ 604, 100, 2107, 272, 106, 109, 2073, 660, 2075, 2076, - /* 470 */ 655, 1690, 650, 1711, 1710, 142, 1539, 149, 2131, 2160, - /* 480 */ 140, 718, 716, 378, 2156, 1845, 1519, 1529, 1844, 1469, - /* 490 */ 1759, 692, 1545, 1548, 1746, 131, 130, 129, 128, 127, - /* 500 */ 126, 125, 124, 123, 11, 61, 1464, 92, 1462, 154, - /* 510 */ 153, 689, 688, 687, 151, 747, 545, 1488, 46, 2040, - /* 520 */ 2040, 34, 382, 1568, 1569, 1570, 1571, 1572, 1576, 1577, - /* 530 */ 1578, 1579, 1467, 1468, 1469, 1518, 1521, 1522, 1523, 1524, - /* 540 */ 1525, 1526, 1527, 1528, 652, 648, 1537, 1538, 1540, 1541, - /* 550 */ 1542, 1543, 2, 1251, 1546, 1547, 544, 543, 542, 544, - /* 560 */ 543, 542, 1489, 685, 136, 538, 1250, 136, 538, 537, - /* 570 */ 1520, 1611, 537, 2090, 536, 541, 2058, 536, 541, 2072, - /* 580 */ 535, 597, 185, 535, 1519, 1529, 615, 2054, 706, 1520, - /* 590 */ 1545, 1548, 558, 185, 38, 37, 65, 61, 44, 42, - /* 600 */ 41, 40, 39, 33, 1464, 556, 1462, 554, 1491, 38, - /* 610 */ 37, 1683, 2090, 44, 42, 41, 40, 39, 611, 139, - /* 620 */ 618, 2050, 2056, 366, 1837, 2040, 596, 656, 478, 1839, - /* 630 */ 1467, 1468, 650, 1518, 1521, 1522, 1523, 1524, 1525, 1526, - /* 640 */ 1527, 1528, 652, 648, 1537, 1538, 1540, 1541, 1542, 1543, - /* 650 */ 2, 45, 43, 61, 185, 1905, 2071, 640, 239, 384, - /* 660 */ 2107, 1463, 372, 109, 2073, 660, 2075, 2076, 655, 1642, - /* 670 */ 650, 1903, 1544, 187, 1461, 179, 577, 2160, 1399, 1400, - /* 680 */ 1950, 378, 2156, 617, 180, 2168, 2169, 1653, 137, 2173, - /* 690 */ 1852, 190, 61, 640, 38, 37, 2072, 1539, 44, 42, - /* 700 */ 41, 40, 39, 2187, 41, 40, 39, 1682, 1835, 54, - /* 710 */ 1469, 626, 1709, 684, 1398, 1401, 590, 589, 1640, 1641, - /* 720 */ 1643, 1644, 1645, 1437, 1438, 2175, 1852, 38, 37, 2090, - /* 730 */ 27, 44, 42, 41, 40, 39, 747, 657, 421, 46, - /* 740 */ 420, 2236, 2040, 2236, 656, 2231, 185, 2231, 52, 45, - /* 750 */ 43, 2172, 2175, 640, 2034, 1236, 191, 384, 2040, 1463, - /* 760 */ 624, 2235, 1964, 2235, 419, 2232, 2234, 2232, 2233, 427, - /* 770 */ 1544, 387, 1461, 2071, 640, 1546, 1547, 2107, 2171, 164, - /* 780 */ 168, 2073, 660, 2075, 2076, 655, 1852, 650, 1854, 626, - /* 790 */ 241, 1238, 416, 640, 1905, 1539, 1708, 640, 2072, 578, - /* 800 */ 640, 377, 185, 2231, 1707, 1519, 1529, 1852, 1469, 428, - /* 810 */ 1903, 1545, 1548, 437, 418, 414, 452, 1610, 2237, 182, - /* 820 */ 1630, 579, 2197, 2232, 604, 1464, 1852, 1462, 390, 1828, - /* 830 */ 1852, 2090, 1935, 1852, 747, 430, 164, 14, 635, 657, - /* 840 */ 1964, 185, 2040, 615, 2040, 1854, 656, 1168, 431, 1167, - /* 850 */ 2040, 1467, 1468, 1575, 1518, 1521, 1522, 1523, 1524, 1525, - /* 860 */ 1526, 1527, 1528, 652, 648, 1537, 1538, 1540, 1541, 1542, - /* 870 */ 1543, 2, 1488, 1546, 1547, 2071, 139, 244, 1169, 2107, - /* 880 */ 1706, 1705, 109, 2073, 660, 2075, 2076, 655, 165, 650, - /* 890 */ 1905, 2058, 694, 310, 2135, 615, 2160, 388, 540, 539, - /* 900 */ 378, 2156, 2054, 1519, 1529, 1704, 1903, 308, 72, 1545, - /* 910 */ 1548, 71, 141, 38, 37, 2131, 8, 44, 42, 41, - /* 920 */ 40, 39, 2175, 1464, 32, 1462, 2040, 2040, 139, 205, - /* 930 */ 486, 484, 481, 1701, 1580, 1700, 2050, 2056, 379, 1154, - /* 940 */ 1155, 181, 2168, 2169, 2072, 137, 2173, 650, 2170, 1467, - /* 950 */ 1468, 2040, 1518, 1521, 1522, 1523, 1524, 1525, 1526, 1527, - /* 960 */ 1528, 652, 648, 1537, 1538, 1540, 1541, 1542, 1543, 2, - /* 970 */ 61, 335, 640, 1486, 2072, 2180, 1607, 2090, 1699, 2040, - /* 980 */ 460, 2040, 651, 474, 640, 657, 473, 447, 453, 1703, - /* 990 */ 2040, 1698, 656, 183, 2168, 2169, 446, 137, 2173, 1697, - /* 1000 */ 507, 443, 11, 475, 9, 1852, 445, 2090, 108, 1799, - /* 1010 */ 640, 640, 373, 13, 12, 657, 1827, 1852, 1520, 152, - /* 1020 */ 2040, 2071, 656, 640, 2040, 2107, 1849, 623, 109, 2073, - /* 1030 */ 660, 2075, 2076, 655, 642, 650, 2132, 2040, 640, 574, - /* 1040 */ 2251, 1696, 2160, 1852, 1852, 2040, 378, 2156, 80, 79, - /* 1050 */ 426, 2071, 352, 189, 619, 2107, 1852, 2194, 327, 2073, - /* 1060 */ 660, 2075, 2076, 655, 433, 650, 644, 1695, 2132, 1463, - /* 1070 */ 1491, 1852, 333, 163, 1694, 412, 53, 410, 406, 402, - /* 1080 */ 399, 419, 1461, 1950, 1950, 1693, 2008, 2040, 573, 2072, - /* 1090 */ 707, 565, 1814, 471, 192, 196, 465, 464, 463, 462, + /* 0 */ 1975, 1845, 387, 2076, 429, 604, 627, 2062, 141, 2235, + /* 10 */ 161, 2135, 45, 43, 1617, 1973, 628, 363, 2058, 1858, + /* 20 */ 384, 2062, 1466, 616, 603, 182, 1907, 2062, 496, 2236, + /* 30 */ 605, 2030, 2058, 1547, 492, 1464, 2094, 640, 2058, 44, + /* 40 */ 42, 41, 40, 39, 619, 1170, 332, 1169, 640, 2044, + /* 50 */ 1491, 657, 2054, 2060, 365, 506, 139, 1968, 1542, 1909, + /* 60 */ 222, 2240, 1909, 651, 18, 2235, 2054, 2060, 366, 349, + /* 70 */ 1691, 1472, 2054, 2060, 379, 1908, 1171, 651, 1907, 404, + /* 80 */ 2075, 2239, 176, 651, 2111, 2236, 2238, 109, 2077, 661, + /* 90 */ 2079, 2080, 656, 1151, 651, 166, 167, 748, 1705, 179, + /* 100 */ 14, 2164, 1801, 351, 1958, 378, 2160, 1491, 38, 37, + /* 110 */ 45, 43, 44, 42, 41, 40, 39, 48, 384, 184, + /* 120 */ 1466, 269, 2172, 615, 176, 133, 614, 2190, 48, 2235, + /* 130 */ 61, 1547, 1153, 1464, 1156, 1157, 1549, 1550, 397, 604, + /* 140 */ 622, 31, 396, 2235, 603, 182, 1959, 38, 37, 2236, + /* 150 */ 605, 44, 42, 41, 40, 39, 1542, 389, 603, 182, + /* 160 */ 1902, 1904, 18, 2236, 605, 1492, 1522, 1532, 1716, 1472, + /* 170 */ 1759, 122, 1548, 1551, 121, 120, 119, 118, 117, 116, + /* 180 */ 115, 114, 113, 579, 1975, 579, 1467, 2235, 1465, 2235, + /* 190 */ 490, 1493, 491, 1729, 65, 748, 375, 1239, 14, 1972, + /* 200 */ 628, 105, 2241, 182, 2241, 182, 640, 2236, 605, 2236, + /* 210 */ 605, 102, 1470, 1471, 2044, 1521, 1524, 1525, 1526, 1527, + /* 220 */ 1528, 1529, 1530, 1531, 653, 649, 1540, 1541, 1543, 1544, + /* 230 */ 1545, 1546, 2, 1241, 1549, 1550, 725, 724, 723, 722, + /* 240 */ 394, 626, 721, 720, 143, 715, 714, 713, 712, 711, + /* 250 */ 710, 709, 156, 705, 704, 703, 393, 392, 700, 699, + /* 260 */ 698, 697, 696, 2240, 1522, 1532, 1715, 2235, 38, 37, + /* 270 */ 1548, 1551, 44, 42, 41, 40, 39, 185, 1686, 185, + /* 280 */ 1494, 1330, 1331, 2239, 1467, 693, 1465, 2236, 2237, 508, + /* 290 */ 61, 1847, 489, 38, 37, 494, 1735, 44, 42, 41, + /* 300 */ 40, 39, 2058, 154, 153, 690, 689, 688, 151, 599, + /* 310 */ 1470, 1471, 2044, 1521, 1524, 1525, 1526, 1527, 1528, 1529, + /* 320 */ 1530, 1531, 653, 649, 1540, 1541, 1543, 1544, 1545, 1546, + /* 330 */ 2, 11, 45, 43, 1762, 1491, 2054, 2060, 1909, 271, + /* 340 */ 384, 1296, 1466, 1492, 695, 362, 1170, 651, 1169, 344, + /* 350 */ 594, 106, 194, 1547, 1907, 1464, 100, 1287, 683, 682, + /* 360 */ 681, 1291, 680, 1293, 1294, 679, 676, 140, 1302, 673, + /* 370 */ 1304, 1305, 670, 667, 1685, 1848, 33, 1171, 1542, 1833, + /* 380 */ 1849, 2076, 38, 37, 18, 568, 44, 42, 41, 40, + /* 390 */ 39, 1472, 1490, 83, 1576, 1645, 82, 545, 544, 543, + /* 400 */ 545, 544, 543, 1714, 535, 136, 539, 535, 136, 539, + /* 410 */ 538, 35, 290, 538, 2094, 537, 542, 748, 537, 542, + /* 420 */ 14, 536, 658, 499, 536, 491, 1729, 2044, 249, 657, + /* 430 */ 45, 43, 1552, 600, 595, 588, 86, 2179, 384, 185, + /* 440 */ 1466, 1250, 591, 590, 1643, 1644, 1646, 1647, 1648, 2044, + /* 450 */ 1577, 1547, 353, 1464, 1249, 641, 1549, 1550, 2075, 1402, + /* 460 */ 1403, 1851, 2111, 2176, 533, 109, 2077, 661, 2079, 2080, + /* 470 */ 656, 187, 651, 1694, 641, 142, 1542, 149, 2135, 2164, + /* 480 */ 61, 1385, 1386, 378, 2160, 532, 1522, 1532, 1856, 1472, + /* 490 */ 54, 693, 1548, 1551, 122, 1401, 1404, 121, 120, 119, + /* 500 */ 118, 117, 116, 115, 114, 113, 1467, 1856, 1465, 154, + /* 510 */ 153, 690, 689, 688, 151, 748, 476, 239, 46, 467, + /* 520 */ 49, 34, 382, 1571, 1572, 1573, 1574, 1575, 1579, 1580, + /* 530 */ 1581, 1582, 1470, 1471, 1693, 1521, 1524, 1525, 1526, 1527, + /* 540 */ 1528, 1529, 1530, 1531, 653, 649, 1540, 1541, 1543, 1544, + /* 550 */ 1545, 1546, 2, 423, 1549, 1550, 1472, 422, 131, 130, + /* 560 */ 129, 128, 127, 126, 125, 124, 123, 272, 498, 38, + /* 570 */ 37, 494, 1735, 44, 42, 41, 40, 39, 164, 2076, + /* 580 */ 198, 197, 1440, 1441, 1522, 1532, 616, 1859, 38, 37, + /* 590 */ 1548, 1551, 44, 42, 41, 40, 39, 2240, 579, 686, + /* 600 */ 1909, 86, 2235, 466, 1467, 2094, 1465, 372, 643, 61, + /* 610 */ 2136, 92, 2094, 598, 1493, 178, 1907, 2241, 182, 139, + /* 620 */ 619, 1831, 2236, 605, 27, 2044, 1852, 657, 1896, 185, + /* 630 */ 1470, 1471, 416, 1521, 1524, 1525, 1526, 1527, 1528, 1529, + /* 640 */ 1530, 1531, 653, 649, 1540, 1541, 1543, 1544, 1545, 1546, + /* 650 */ 2, 45, 43, 2037, 418, 414, 2075, 641, 597, 384, + /* 660 */ 2111, 1466, 1656, 109, 2077, 661, 2079, 2080, 656, 185, + /* 670 */ 651, 641, 1547, 132, 1464, 179, 641, 2164, 1903, 1904, + /* 680 */ 529, 378, 2160, 618, 180, 2172, 2173, 132, 137, 2177, + /* 690 */ 1856, 550, 427, 2179, 534, 1679, 2076, 1542, 579, 73, + /* 700 */ 1713, 616, 2235, 2191, 1856, 641, 560, 38, 37, 1856, + /* 710 */ 1472, 44, 42, 41, 40, 39, 627, 2241, 182, 2175, + /* 720 */ 236, 428, 2236, 605, 41, 40, 39, 641, 238, 2094, + /* 730 */ 616, 641, 237, 693, 139, 553, 748, 658, 1856, 46, + /* 740 */ 547, 11, 2044, 437, 657, 235, 2044, 452, 81, 45, + /* 750 */ 43, 154, 153, 690, 689, 688, 151, 384, 185, 1466, + /* 760 */ 1856, 376, 271, 139, 1856, 625, 627, 1968, 2063, 164, + /* 770 */ 1547, 2038, 1464, 2075, 707, 1549, 1550, 2111, 1858, 2058, + /* 780 */ 168, 2077, 661, 2079, 2080, 656, 69, 651, 1841, 68, + /* 790 */ 89, 339, 1712, 641, 361, 1542, 561, 1711, 2076, 181, + /* 800 */ 2172, 2173, 387, 137, 2177, 1522, 1532, 1954, 1472, 453, + /* 810 */ 164, 1548, 1551, 2054, 2060, 636, 579, 1968, 190, 1858, + /* 820 */ 2235, 580, 2201, 1939, 651, 1467, 1856, 1465, 183, 2172, + /* 830 */ 2173, 2094, 137, 2177, 748, 2241, 182, 14, 2044, 658, + /* 840 */ 2236, 605, 1621, 2044, 2044, 1710, 657, 1557, 1491, 1709, + /* 850 */ 2179, 1470, 1471, 1491, 1521, 1524, 1525, 1526, 1527, 1528, + /* 860 */ 1529, 1530, 1531, 653, 649, 1540, 1541, 1543, 1544, 1545, + /* 870 */ 1546, 2, 1843, 1549, 1550, 2075, 2174, 559, 1708, 2111, + /* 880 */ 1839, 641, 109, 2077, 661, 2079, 2080, 656, 165, 651, + /* 890 */ 557, 2044, 555, 310, 2139, 2044, 2164, 507, 685, 1909, + /* 900 */ 378, 2160, 1707, 1522, 1532, 1704, 377, 308, 72, 1548, + /* 910 */ 1551, 71, 38, 37, 1856, 1907, 44, 42, 41, 40, + /* 920 */ 39, 281, 282, 1467, 2044, 1465, 280, 356, 390, 205, + /* 930 */ 486, 484, 481, 8, 38, 37, 164, 2239, 44, 42, + /* 940 */ 41, 40, 39, 1703, 2076, 1858, 541, 540, 2044, 1470, + /* 950 */ 1471, 2044, 1521, 1524, 1525, 1526, 1527, 1528, 1529, 1530, + /* 960 */ 1531, 653, 649, 1540, 1541, 1543, 1544, 1545, 1546, 2, + /* 970 */ 61, 335, 1909, 1489, 2076, 719, 717, 2094, 447, 388, + /* 980 */ 460, 641, 1614, 474, 641, 658, 473, 446, 1907, 2044, + /* 990 */ 2044, 1254, 657, 357, 1523, 355, 354, 1853, 531, 1523, + /* 1000 */ 241, 443, 533, 475, 1253, 1633, 445, 2094, 108, 244, + /* 1010 */ 641, 641, 373, 1832, 1856, 658, 11, 1856, 9, 1491, + /* 1020 */ 2044, 2075, 657, 532, 652, 2111, 575, 620, 109, 2077, + /* 1030 */ 661, 2079, 2080, 656, 708, 651, 1818, 1702, 1701, 61, + /* 1040 */ 2255, 1494, 2164, 1856, 1856, 1700, 378, 2160, 80, 79, + /* 1050 */ 426, 2075, 352, 189, 641, 2111, 1494, 2198, 327, 2077, + /* 1060 */ 661, 2079, 2080, 656, 433, 651, 478, 13, 12, 1466, + /* 1070 */ 624, 1699, 333, 1749, 1578, 412, 695, 410, 406, 402, + /* 1080 */ 399, 419, 1464, 2044, 2044, 1698, 1697, 1856, 1696, 2076, + /* 1090 */ 645, 2044, 2136, 471, 163, 546, 465, 464, 463, 462, /* 1100 */ 459, 458, 457, 456, 455, 451, 450, 449, 448, 334, - /* 1110 */ 440, 439, 438, 2040, 435, 434, 350, 647, 1469, 185, - /* 1120 */ 2040, 2200, 2090, 1905, 164, 1607, 640, 1472, 692, 640, - /* 1130 */ 657, 2040, 240, 1855, 2026, 2040, 578, 656, 2072, 1904, - /* 1140 */ 2231, 356, 285, 533, 747, 637, 154, 153, 689, 688, - /* 1150 */ 687, 151, 73, 1198, 686, 2237, 182, 1896, 266, 1852, - /* 1160 */ 2232, 604, 1852, 591, 532, 640, 2071, 640, 607, 690, - /* 1170 */ 2107, 2090, 1896, 109, 2073, 660, 2075, 2076, 655, 657, - /* 1180 */ 650, 638, 404, 291, 2040, 2251, 656, 2160, 1830, 1199, - /* 1190 */ 691, 378, 2156, 1896, 221, 640, 304, 2072, 1852, 1882, - /* 1200 */ 1852, 81, 2207, 51, 145, 3, 134, 357, 1471, 355, - /* 1210 */ 354, 391, 531, 247, 228, 2071, 533, 226, 248, 2107, - /* 1220 */ 2072, 105, 109, 2073, 660, 2075, 2076, 655, 1852, 650, - /* 1230 */ 2090, 102, 147, 1464, 2251, 1462, 2160, 532, 657, 230, - /* 1240 */ 378, 2156, 229, 2040, 232, 656, 234, 231, 1739, 233, - /* 1250 */ 1737, 585, 562, 2090, 561, 152, 152, 90, 260, 1467, - /* 1260 */ 1468, 657, 63, 63, 253, 1565, 2040, 700, 656, 152, - /* 1270 */ 547, 47, 550, 278, 2071, 1685, 1686, 70, 2107, 150, - /* 1280 */ 1475, 109, 2073, 660, 2075, 2076, 655, 2061, 650, 1217, - /* 1290 */ 152, 2091, 395, 2251, 1959, 2160, 1727, 2071, 2072, 378, - /* 1300 */ 2156, 2107, 63, 701, 109, 2073, 660, 2075, 2076, 655, - /* 1310 */ 2225, 650, 1432, 1435, 381, 380, 2251, 47, 2160, 1639, - /* 1320 */ 1638, 255, 378, 2156, 1477, 1215, 622, 1733, 1396, 2190, - /* 1330 */ 283, 2090, 1893, 2179, 632, 1544, 287, 1470, 616, 657, - /* 1340 */ 2063, 268, 1, 223, 2040, 47, 656, 1277, 38, 37, - /* 1350 */ 664, 150, 44, 42, 41, 40, 39, 2072, 171, 1581, - /* 1360 */ 1539, 1474, 152, 135, 525, 521, 517, 513, 220, 265, - /* 1370 */ 4, 398, 403, 1469, 1530, 2071, 742, 348, 150, 2107, - /* 1380 */ 2072, 1419, 109, 2073, 660, 2075, 2076, 655, 298, 650, - /* 1390 */ 2090, 195, 432, 1491, 2133, 608, 2160, 1960, 657, 646, - /* 1400 */ 378, 2156, 303, 2040, 436, 656, 469, 1305, 1309, 87, - /* 1410 */ 441, 1486, 218, 2090, 454, 1952, 461, 468, 470, 1316, - /* 1420 */ 1314, 657, 480, 479, 477, 199, 2040, 200, 656, 482, - /* 1430 */ 483, 1492, 202, 485, 2071, 155, 487, 1494, 2107, 488, - /* 1440 */ 497, 109, 2073, 660, 2075, 2076, 655, 500, 650, 1489, - /* 1450 */ 208, 501, 1493, 643, 210, 2160, 502, 2071, 1495, 378, - /* 1460 */ 2156, 2107, 2072, 503, 110, 2073, 660, 2075, 2076, 655, - /* 1470 */ 213, 650, 505, 215, 84, 85, 509, 1171, 2160, 217, - /* 1480 */ 211, 219, 2159, 2156, 216, 526, 504, 527, 1478, 528, - /* 1490 */ 1473, 530, 2017, 564, 2014, 2090, 338, 1842, 566, 112, - /* 1500 */ 2013, 88, 209, 657, 148, 225, 299, 242, 2040, 245, - /* 1510 */ 656, 2072, 1838, 227, 1481, 1483, 157, 158, 1840, 568, - /* 1520 */ 575, 1836, 159, 160, 569, 572, 592, 648, 1537, 1538, - /* 1530 */ 1540, 1541, 1542, 1543, 2072, 2206, 630, 2191, 2201, 2071, - /* 1540 */ 2205, 2182, 582, 2107, 2090, 588, 110, 2073, 660, 2075, - /* 1550 */ 2076, 655, 657, 650, 367, 595, 601, 2040, 261, 656, - /* 1560 */ 2160, 251, 254, 7, 645, 2156, 259, 2090, 583, 580, - /* 1570 */ 581, 172, 2254, 138, 263, 654, 2230, 264, 609, 368, - /* 1580 */ 2040, 612, 656, 1490, 1607, 2176, 620, 262, 658, 371, - /* 1590 */ 1496, 300, 2107, 628, 273, 110, 2073, 660, 2075, 2076, - /* 1600 */ 655, 629, 650, 95, 1965, 1979, 2072, 267, 1978, 2160, - /* 1610 */ 633, 2071, 634, 343, 2156, 2107, 1977, 97, 326, 2073, - /* 1620 */ 660, 2075, 2076, 655, 653, 650, 641, 2125, 301, 2072, - /* 1630 */ 374, 302, 99, 1853, 60, 101, 2141, 662, 1815, 2090, - /* 1640 */ 1897, 743, 294, 750, 305, 744, 746, 657, 329, 340, - /* 1650 */ 341, 50, 2040, 314, 656, 309, 307, 297, 2032, 2031, - /* 1660 */ 2030, 77, 2090, 2072, 2027, 400, 401, 1454, 1455, 188, - /* 1670 */ 657, 405, 175, 328, 318, 2040, 407, 656, 740, 736, - /* 1680 */ 732, 728, 295, 2071, 2025, 408, 409, 2107, 2024, 2072, - /* 1690 */ 169, 2073, 660, 2075, 2076, 655, 2090, 650, 411, 2023, - /* 1700 */ 413, 2022, 415, 2021, 657, 417, 2071, 78, 1422, 2040, - /* 1710 */ 2107, 656, 1421, 110, 2073, 660, 2075, 2076, 655, 1991, - /* 1720 */ 650, 1990, 2090, 107, 1989, 424, 288, 2160, 425, 1988, - /* 1730 */ 657, 1987, 2157, 1373, 1943, 2040, 1942, 656, 1940, 144, - /* 1740 */ 2071, 1939, 605, 2252, 2107, 1938, 1941, 168, 2073, 660, - /* 1750 */ 2075, 2076, 655, 2072, 650, 1937, 1936, 1934, 636, 193, - /* 1760 */ 442, 1931, 444, 1945, 1930, 1929, 2071, 1933, 1932, 1928, - /* 1770 */ 2107, 1927, 1926, 320, 2073, 660, 2075, 2076, 655, 1925, - /* 1780 */ 650, 1924, 1923, 1922, 1921, 2072, 2090, 1920, 1919, 2198, - /* 1790 */ 1918, 1917, 1916, 275, 657, 146, 1915, 1914, 274, 2040, - /* 1800 */ 1913, 656, 1944, 1912, 1911, 1910, 1909, 1375, 1908, 1907, - /* 1810 */ 2072, 472, 1906, 336, 1426, 1248, 243, 600, 2090, 337, - /* 1820 */ 1252, 1762, 1761, 1760, 201, 1758, 654, 1722, 203, 1244, - /* 1830 */ 2071, 2040, 204, 656, 2107, 1721, 2060, 169, 2073, 660, - /* 1840 */ 2075, 2076, 655, 2090, 650, 177, 493, 1157, 383, 206, - /* 1850 */ 75, 657, 1156, 207, 76, 2004, 2040, 495, 656, 2072, - /* 1860 */ 1998, 1986, 2071, 212, 214, 1985, 2107, 1963, 1831, 326, - /* 1870 */ 2073, 660, 2075, 2076, 655, 2072, 650, 1757, 2126, 1191, - /* 1880 */ 1755, 510, 511, 512, 1753, 514, 516, 2071, 515, 1751, - /* 1890 */ 2253, 2107, 2090, 518, 327, 2073, 660, 2075, 2076, 655, - /* 1900 */ 657, 650, 519, 520, 1749, 2040, 522, 656, 2090, 524, - /* 1910 */ 523, 1736, 1735, 385, 1321, 1320, 657, 1718, 1833, 1832, - /* 1920 */ 1235, 2040, 1234, 656, 2072, 62, 224, 1233, 1227, 1232, - /* 1930 */ 715, 1229, 717, 1747, 1228, 1226, 563, 358, 1740, 1738, - /* 1940 */ 2107, 2072, 359, 322, 2073, 660, 2075, 2076, 655, 360, - /* 1950 */ 650, 548, 2071, 1717, 1716, 1715, 2107, 2090, 2072, 327, - /* 1960 */ 2073, 660, 2075, 2076, 655, 657, 650, 551, 557, 553, - /* 1970 */ 2040, 555, 656, 1446, 2090, 1442, 111, 1444, 1441, 2003, - /* 1980 */ 1428, 26, 657, 66, 1997, 55, 570, 2040, 571, 656, - /* 1990 */ 1984, 2090, 1982, 576, 2236, 19, 246, 364, 1655, 657, - /* 2000 */ 16, 2071, 28, 250, 2040, 2107, 656, 2072, 311, 2073, - /* 2010 */ 660, 2075, 2076, 655, 584, 650, 586, 162, 2071, 5, - /* 2020 */ 6, 58, 2107, 2072, 59, 312, 2073, 660, 2075, 2076, - /* 2030 */ 655, 252, 650, 257, 258, 2071, 1637, 170, 30, 2107, - /* 2040 */ 2090, 2072, 313, 2073, 660, 2075, 2076, 655, 657, 650, - /* 2050 */ 256, 2061, 29, 2040, 64, 656, 2090, 21, 1629, 91, - /* 2060 */ 1670, 1675, 1676, 1669, 657, 369, 1674, 1673, 370, 2040, - /* 2070 */ 1604, 656, 1603, 270, 2090, 1983, 173, 1981, 56, 57, - /* 2080 */ 1980, 1962, 657, 20, 2071, 93, 94, 2040, 2107, 656, - /* 2090 */ 2072, 319, 2073, 660, 2075, 2076, 655, 276, 650, 22, - /* 2100 */ 2071, 17, 277, 1635, 2107, 279, 2072, 323, 2073, 660, - /* 2110 */ 2075, 2076, 655, 1961, 650, 284, 67, 96, 2071, 631, - /* 2120 */ 98, 102, 2107, 2090, 10, 315, 2073, 660, 2075, 2076, - /* 2130 */ 655, 657, 650, 289, 286, 23, 2040, 1556, 656, 2090, - /* 2140 */ 1555, 12, 1479, 1566, 2110, 174, 1534, 657, 649, 186, - /* 2150 */ 1532, 1511, 2040, 36, 656, 1531, 15, 24, 659, 1503, - /* 2160 */ 25, 663, 1306, 2072, 665, 386, 661, 2071, 1303, 667, - /* 2170 */ 668, 2107, 1300, 670, 324, 2073, 660, 2075, 2076, 655, - /* 2180 */ 2072, 650, 671, 2071, 673, 1294, 1292, 2107, 674, 676, - /* 2190 */ 316, 2073, 660, 2075, 2076, 655, 2090, 650, 1283, 677, - /* 2200 */ 103, 292, 1298, 104, 657, 683, 1315, 74, 1311, 2040, - /* 2210 */ 1297, 656, 1296, 2090, 693, 1295, 1189, 1223, 1222, 1221, - /* 2220 */ 1220, 657, 1219, 1218, 1216, 1214, 2040, 1213, 656, 2072, - /* 2230 */ 1212, 1242, 1207, 705, 1210, 293, 1209, 1208, 1206, 1205, - /* 2240 */ 2071, 1204, 1237, 1239, 2107, 2072, 1201, 325, 2073, 660, - /* 2250 */ 2075, 2076, 655, 1200, 650, 1197, 1196, 2071, 1195, 1194, - /* 2260 */ 1754, 2107, 2090, 725, 317, 2073, 660, 2075, 2076, 655, - /* 2270 */ 657, 650, 727, 726, 1752, 2040, 729, 656, 2090, 730, - /* 2280 */ 1750, 731, 733, 734, 735, 1748, 657, 737, 738, 739, - /* 2290 */ 1734, 2040, 741, 656, 2072, 1714, 1146, 296, 745, 1689, - /* 2300 */ 1465, 306, 748, 749, 1689, 1689, 2071, 1689, 1689, 1689, - /* 2310 */ 2107, 1689, 1689, 330, 2073, 660, 2075, 2076, 655, 2072, - /* 2320 */ 650, 1689, 2071, 1689, 1689, 1689, 2107, 2090, 1689, 331, - /* 2330 */ 2073, 660, 2075, 2076, 655, 657, 650, 1689, 1689, 1689, - /* 2340 */ 2040, 1689, 656, 2072, 1689, 1689, 1689, 1689, 1689, 1689, - /* 2350 */ 1689, 1689, 2090, 1689, 1689, 1689, 1689, 1689, 1689, 1689, - /* 2360 */ 657, 1689, 1689, 1689, 1689, 2040, 1689, 656, 1689, 1689, - /* 2370 */ 1689, 2071, 1689, 1689, 1689, 2107, 2090, 1689, 2084, 2073, - /* 2380 */ 660, 2075, 2076, 655, 657, 650, 1689, 1689, 1689, 2040, - /* 2390 */ 1689, 656, 1689, 1689, 1689, 1689, 2071, 1689, 1689, 1689, - /* 2400 */ 2107, 1689, 1689, 2083, 2073, 660, 2075, 2076, 655, 1689, - /* 2410 */ 650, 1689, 1689, 1689, 2072, 1689, 1689, 1689, 1689, 1689, - /* 2420 */ 2071, 1689, 1689, 1689, 2107, 1689, 1689, 2082, 2073, 660, - /* 2430 */ 2075, 2076, 655, 1689, 650, 1689, 2072, 1689, 1689, 1689, - /* 2440 */ 1689, 1689, 1689, 1689, 1689, 1689, 1689, 2090, 1689, 1689, - /* 2450 */ 1689, 1689, 1689, 1689, 1689, 657, 1689, 1689, 1689, 1689, - /* 2460 */ 2040, 1689, 656, 2072, 1689, 1689, 1689, 1689, 1689, 2090, - /* 2470 */ 1689, 1689, 1689, 1689, 1689, 1689, 1689, 657, 1689, 1689, - /* 2480 */ 1689, 1689, 2040, 1689, 656, 1689, 1689, 1689, 1689, 1689, - /* 2490 */ 1689, 2071, 1689, 1689, 1689, 2107, 2090, 1689, 345, 2073, - /* 2500 */ 660, 2075, 2076, 655, 657, 650, 1689, 1689, 1689, 2040, - /* 2510 */ 1689, 656, 2072, 2071, 1689, 1689, 1689, 2107, 1689, 1689, - /* 2520 */ 346, 2073, 660, 2075, 2076, 655, 1689, 650, 2072, 1689, - /* 2530 */ 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, - /* 2540 */ 2071, 1689, 1689, 1689, 2107, 2090, 1689, 342, 2073, 660, - /* 2550 */ 2075, 2076, 655, 657, 650, 1689, 1689, 1689, 2040, 1689, - /* 2560 */ 656, 2090, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 657, - /* 2570 */ 1689, 1689, 1689, 1689, 2040, 1689, 656, 2072, 1689, 1689, - /* 2580 */ 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 2071, - /* 2590 */ 1689, 1689, 1689, 2107, 1689, 1689, 347, 2073, 660, 2075, - /* 2600 */ 2076, 655, 1689, 650, 1689, 658, 1689, 1689, 1689, 2107, - /* 2610 */ 2090, 1689, 322, 2073, 660, 2075, 2076, 655, 657, 650, - /* 2620 */ 1689, 1689, 1689, 2040, 1689, 656, 1689, 1689, 1689, 1689, - /* 2630 */ 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, - /* 2640 */ 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, - /* 2650 */ 1689, 1689, 1689, 1689, 2071, 1689, 1689, 1689, 2107, 1689, - /* 2660 */ 1689, 321, 2073, 660, 2075, 2076, 655, 1689, 650, + /* 1110 */ 440, 439, 438, 641, 435, 434, 350, 2044, 1472, 185, + /* 1120 */ 641, 608, 2094, 641, 421, 641, 420, 641, 574, 285, + /* 1130 */ 658, 2044, 2044, 152, 2044, 2044, 638, 657, 2076, 639, + /* 1140 */ 1954, 291, 1610, 391, 748, 32, 1856, 2012, 1954, 304, + /* 1150 */ 419, 192, 1886, 1856, 687, 1583, 1856, 1900, 1856, 196, + /* 1160 */ 1856, 1156, 1157, 2184, 1610, 1523, 2075, 1590, 1834, 691, + /* 1170 */ 2111, 2094, 1900, 109, 2077, 661, 2079, 2080, 656, 658, + /* 1180 */ 651, 51, 611, 3, 2044, 2255, 657, 2164, 185, 191, + /* 1190 */ 53, 378, 2160, 240, 430, 692, 1742, 2076, 1900, 145, + /* 1200 */ 152, 134, 2211, 607, 248, 228, 230, 431, 226, 229, + /* 1210 */ 232, 234, 147, 231, 233, 2075, 1688, 1689, 548, 2111, + /* 1220 */ 2076, 247, 109, 2077, 661, 2079, 2080, 656, 1613, 651, + /* 1230 */ 2094, 1802, 152, 1467, 2255, 1465, 2164, 563, 658, 562, + /* 1240 */ 378, 2160, 1740, 2044, 1475, 657, 63, 578, 13, 12, + /* 1250 */ 1706, 586, 2204, 2094, 648, 63, 253, 1435, 701, 1470, + /* 1260 */ 1471, 658, 266, 152, 551, 90, 2044, 592, 657, 47, + /* 1270 */ 278, 70, 150, 152, 2075, 63, 1474, 47, 2111, 47, + /* 1280 */ 1219, 109, 2077, 661, 2079, 2080, 656, 2065, 651, 1438, + /* 1290 */ 665, 221, 150, 2255, 152, 2164, 135, 2075, 2076, 378, + /* 1300 */ 2160, 2111, 150, 1642, 109, 2077, 661, 2079, 2080, 656, + /* 1310 */ 2229, 651, 1641, 255, 381, 380, 2255, 395, 2164, 52, + /* 1320 */ 623, 1736, 378, 2160, 1480, 1200, 1399, 283, 633, 287, + /* 1330 */ 1280, 2094, 1584, 2183, 1533, 1547, 303, 1473, 260, 658, + /* 1340 */ 2067, 702, 1963, 223, 2044, 2095, 657, 1308, 609, 1312, + /* 1350 */ 1730, 1319, 2194, 1317, 617, 1897, 265, 2076, 171, 155, + /* 1360 */ 1542, 1201, 268, 1217, 525, 521, 517, 513, 220, 1, + /* 1370 */ 743, 4, 398, 1472, 403, 2075, 1422, 348, 298, 2111, + /* 1380 */ 2076, 195, 109, 2077, 661, 2079, 2080, 656, 432, 651, + /* 1390 */ 2094, 1494, 1964, 436, 2137, 469, 2164, 1478, 658, 647, + /* 1400 */ 378, 2160, 1568, 2044, 441, 657, 1489, 454, 1956, 87, + /* 1410 */ 468, 612, 218, 2094, 461, 470, 479, 477, 200, 480, + /* 1420 */ 199, 658, 483, 482, 202, 485, 2044, 566, 657, 1477, + /* 1430 */ 487, 1495, 488, 497, 2075, 1497, 1492, 500, 2111, 208, + /* 1440 */ 501, 109, 2077, 661, 2079, 2080, 656, 1496, 651, 210, + /* 1450 */ 502, 1498, 503, 644, 213, 2164, 215, 2075, 505, 378, + /* 1460 */ 2160, 2111, 2076, 509, 110, 2077, 661, 2079, 2080, 656, + /* 1470 */ 84, 651, 579, 85, 219, 1173, 2235, 526, 2164, 217, + /* 1480 */ 211, 528, 2163, 2160, 216, 527, 504, 530, 1481, 111, + /* 1490 */ 1476, 2241, 182, 338, 1846, 2094, 2236, 605, 225, 2021, + /* 1500 */ 1842, 227, 209, 658, 157, 158, 1844, 565, 2044, 1840, + /* 1510 */ 657, 2076, 567, 159, 1484, 1486, 160, 88, 148, 242, + /* 1520 */ 299, 2018, 569, 2017, 245, 576, 573, 649, 1540, 1541, + /* 1530 */ 1543, 1544, 1545, 1546, 2076, 570, 583, 593, 2210, 2075, + /* 1540 */ 2195, 2205, 631, 2111, 2094, 602, 110, 2077, 661, 2079, + /* 1550 */ 2080, 656, 658, 651, 251, 589, 254, 2044, 7, 657, + /* 1560 */ 2164, 367, 596, 2209, 646, 2160, 172, 2094, 2186, 584, + /* 1570 */ 582, 261, 259, 2258, 263, 655, 262, 581, 1610, 264, + /* 1580 */ 2044, 613, 657, 368, 610, 138, 1493, 2180, 659, 371, + /* 1590 */ 621, 1499, 2111, 300, 1969, 110, 2077, 661, 2079, 2080, + /* 1600 */ 656, 629, 651, 273, 95, 634, 2076, 301, 97, 2164, + /* 1610 */ 635, 2075, 99, 343, 2160, 2111, 630, 60, 326, 2077, + /* 1620 */ 661, 2079, 2080, 656, 654, 651, 642, 2129, 267, 2076, + /* 1630 */ 2234, 1983, 1982, 1981, 374, 1857, 302, 2145, 101, 2094, + /* 1640 */ 663, 1901, 1819, 751, 305, 744, 745, 658, 747, 314, + /* 1650 */ 294, 328, 2044, 318, 657, 307, 309, 297, 50, 340, + /* 1660 */ 341, 2036, 2094, 2076, 2035, 2034, 329, 77, 2031, 400, + /* 1670 */ 658, 401, 175, 1457, 1458, 2044, 188, 657, 741, 737, + /* 1680 */ 733, 729, 295, 2075, 405, 2029, 407, 2111, 408, 2076, + /* 1690 */ 169, 2077, 661, 2079, 2080, 656, 2094, 651, 409, 2028, + /* 1700 */ 411, 2027, 413, 2026, 658, 415, 2075, 2025, 417, 2044, + /* 1710 */ 2111, 657, 78, 110, 2077, 661, 2079, 2080, 656, 1425, + /* 1720 */ 651, 1424, 2094, 107, 1995, 1994, 288, 2164, 1993, 424, + /* 1730 */ 658, 425, 2161, 1992, 1991, 2044, 1376, 657, 1947, 1946, + /* 1740 */ 2075, 1944, 606, 2256, 2111, 1943, 144, 168, 2077, 661, + /* 1750 */ 2079, 2080, 656, 2076, 651, 1942, 1945, 1941, 637, 193, + /* 1760 */ 1935, 442, 444, 1949, 1934, 1933, 2075, 1940, 1938, 1937, + /* 1770 */ 2111, 1936, 1932, 320, 2077, 661, 2079, 2080, 656, 1931, + /* 1780 */ 651, 1930, 1929, 1928, 1927, 2076, 2094, 1926, 1925, 2202, + /* 1790 */ 1924, 1923, 1922, 275, 658, 1921, 1920, 1919, 274, 2044, + /* 1800 */ 146, 657, 1918, 1917, 1948, 1916, 1915, 1378, 1914, 1913, + /* 1810 */ 2076, 1912, 1911, 472, 1429, 1910, 243, 601, 2094, 336, + /* 1820 */ 1251, 1255, 1765, 337, 201, 1764, 655, 1763, 1247, 1761, + /* 1830 */ 2075, 2044, 203, 657, 2111, 204, 1725, 169, 2077, 661, + /* 1840 */ 2079, 2080, 656, 2094, 651, 177, 1724, 2064, 383, 206, + /* 1850 */ 2008, 658, 75, 1159, 1158, 76, 2044, 493, 657, 2076, + /* 1860 */ 207, 495, 2075, 2002, 1990, 212, 2111, 214, 1989, 326, + /* 1870 */ 2077, 661, 2079, 2080, 656, 2076, 651, 1967, 2130, 1835, + /* 1880 */ 1760, 1758, 1193, 510, 512, 511, 1756, 2075, 514, 515, + /* 1890 */ 2257, 2111, 2094, 516, 327, 2077, 661, 2079, 2080, 656, + /* 1900 */ 658, 651, 1754, 519, 518, 2044, 520, 657, 2094, 1752, + /* 1910 */ 522, 524, 1739, 385, 523, 1738, 658, 1721, 1837, 1324, + /* 1920 */ 1836, 2044, 1323, 657, 2076, 1238, 224, 62, 1237, 1236, + /* 1930 */ 1235, 1234, 716, 718, 1231, 1229, 564, 1750, 1230, 1228, + /* 1940 */ 2111, 2076, 1743, 322, 2077, 661, 2079, 2080, 656, 358, + /* 1950 */ 651, 359, 2075, 1741, 360, 549, 2111, 2094, 2076, 327, + /* 1960 */ 2077, 661, 2079, 2080, 656, 658, 651, 1720, 552, 554, + /* 1970 */ 2044, 1719, 657, 556, 2094, 1718, 558, 112, 1445, 1447, + /* 1980 */ 1444, 2007, 658, 1449, 1431, 26, 2001, 2044, 571, 657, + /* 1990 */ 1988, 2094, 55, 246, 1986, 2240, 577, 66, 572, 658, + /* 2000 */ 19, 2075, 364, 16, 2044, 2111, 657, 2076, 311, 2077, + /* 2010 */ 661, 2079, 2080, 656, 58, 651, 28, 162, 2075, 5, + /* 2020 */ 1658, 250, 2111, 2076, 585, 312, 2077, 661, 2079, 2080, + /* 2030 */ 656, 6, 651, 59, 587, 2075, 64, 252, 258, 2111, + /* 2040 */ 2094, 2076, 313, 2077, 661, 2079, 2080, 656, 658, 651, + /* 2050 */ 257, 1640, 170, 2044, 2065, 657, 2094, 30, 256, 29, + /* 2060 */ 21, 1632, 91, 1673, 658, 1678, 1679, 1672, 270, 2044, + /* 2070 */ 369, 657, 1677, 1676, 2094, 370, 173, 1607, 1606, 1987, + /* 2080 */ 57, 1985, 658, 93, 2075, 56, 20, 2044, 2111, 657, + /* 2090 */ 2076, 319, 2077, 661, 2079, 2080, 656, 17, 651, 1984, + /* 2100 */ 2075, 1966, 94, 276, 2111, 22, 2076, 323, 2077, 661, + /* 2110 */ 2079, 2080, 656, 1965, 651, 277, 1638, 279, 2075, 284, + /* 2120 */ 67, 96, 2111, 2094, 286, 315, 2077, 661, 2079, 2080, + /* 2130 */ 656, 658, 651, 102, 98, 289, 2044, 23, 657, 2094, + /* 2140 */ 632, 1559, 10, 1558, 12, 1482, 2114, 658, 1537, 650, + /* 2150 */ 174, 1535, 2044, 1569, 657, 36, 186, 1514, 1534, 15, + /* 2160 */ 24, 660, 1506, 2076, 25, 662, 1309, 2075, 664, 386, + /* 2170 */ 666, 2111, 1306, 668, 324, 2077, 661, 2079, 2080, 656, + /* 2180 */ 2076, 651, 671, 2075, 669, 674, 1303, 2111, 1297, 672, + /* 2190 */ 316, 2077, 661, 2079, 2080, 656, 2094, 651, 675, 677, + /* 2200 */ 1301, 1295, 678, 1300, 658, 1286, 684, 103, 104, 2044, + /* 2210 */ 292, 657, 1318, 2094, 1299, 1298, 74, 1314, 1191, 694, + /* 2220 */ 1225, 658, 1224, 1223, 1222, 1221, 2044, 1220, 657, 2076, + /* 2230 */ 1245, 1218, 706, 1216, 1215, 1214, 1212, 293, 1211, 1210, + /* 2240 */ 2075, 1209, 1208, 1207, 2111, 2076, 1206, 325, 2077, 661, + /* 2250 */ 2079, 2080, 656, 1242, 651, 1240, 1203, 2075, 1202, 1199, + /* 2260 */ 1198, 2111, 2094, 1197, 317, 2077, 661, 2079, 2080, 656, + /* 2270 */ 658, 651, 1196, 1757, 726, 2044, 727, 657, 2094, 728, + /* 2280 */ 1755, 731, 730, 732, 1753, 734, 658, 736, 1751, 738, + /* 2290 */ 735, 2044, 740, 657, 2076, 1737, 742, 739, 1148, 1717, + /* 2300 */ 296, 1468, 746, 750, 306, 1692, 2075, 749, 1692, 1692, + /* 2310 */ 2111, 1692, 1692, 330, 2077, 661, 2079, 2080, 656, 2076, + /* 2320 */ 651, 1692, 2075, 1692, 1692, 1692, 2111, 2094, 1692, 331, + /* 2330 */ 2077, 661, 2079, 2080, 656, 658, 651, 1692, 1692, 1692, + /* 2340 */ 2044, 1692, 657, 2076, 1692, 1692, 1692, 1692, 1692, 1692, + /* 2350 */ 1692, 1692, 2094, 1692, 1692, 1692, 1692, 1692, 1692, 1692, + /* 2360 */ 658, 1692, 1692, 1692, 1692, 2044, 1692, 657, 1692, 1692, + /* 2370 */ 1692, 2075, 1692, 1692, 1692, 2111, 2094, 1692, 2088, 2077, + /* 2380 */ 661, 2079, 2080, 656, 658, 651, 1692, 1692, 1692, 2044, + /* 2390 */ 1692, 657, 1692, 1692, 1692, 1692, 2075, 1692, 1692, 1692, + /* 2400 */ 2111, 1692, 1692, 2087, 2077, 661, 2079, 2080, 656, 1692, + /* 2410 */ 651, 1692, 1692, 1692, 2076, 1692, 1692, 1692, 1692, 1692, + /* 2420 */ 2075, 1692, 1692, 1692, 2111, 1692, 1692, 2086, 2077, 661, + /* 2430 */ 2079, 2080, 656, 1692, 651, 1692, 2076, 1692, 1692, 1692, + /* 2440 */ 1692, 1692, 1692, 1692, 1692, 1692, 1692, 2094, 1692, 1692, + /* 2450 */ 1692, 1692, 1692, 1692, 1692, 658, 1692, 1692, 1692, 1692, + /* 2460 */ 2044, 1692, 657, 2076, 1692, 1692, 1692, 1692, 1692, 2094, + /* 2470 */ 1692, 1692, 1692, 1692, 1692, 1692, 1692, 658, 1692, 1692, + /* 2480 */ 1692, 1692, 2044, 1692, 657, 1692, 1692, 1692, 1692, 1692, + /* 2490 */ 1692, 2075, 1692, 1692, 1692, 2111, 2094, 1692, 345, 2077, + /* 2500 */ 661, 2079, 2080, 656, 658, 651, 1692, 1692, 1692, 2044, + /* 2510 */ 1692, 657, 2076, 2075, 1692, 1692, 1692, 2111, 1692, 1692, + /* 2520 */ 346, 2077, 661, 2079, 2080, 656, 1692, 651, 2076, 1692, + /* 2530 */ 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, + /* 2540 */ 2075, 1692, 1692, 1692, 2111, 2094, 1692, 342, 2077, 661, + /* 2550 */ 2079, 2080, 656, 658, 651, 1692, 1692, 1692, 2044, 1692, + /* 2560 */ 657, 2094, 1692, 1692, 1692, 1692, 1692, 1692, 1692, 658, + /* 2570 */ 1692, 1692, 1692, 1692, 2044, 1692, 657, 2076, 1692, 1692, + /* 2580 */ 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, 2075, + /* 2590 */ 1692, 1692, 1692, 2111, 1692, 1692, 347, 2077, 661, 2079, + /* 2600 */ 2080, 656, 1692, 651, 1692, 659, 1692, 1692, 1692, 2111, + /* 2610 */ 2094, 1692, 322, 2077, 661, 2079, 2080, 656, 658, 651, + /* 2620 */ 1692, 1692, 1692, 2044, 1692, 657, 1692, 1692, 1692, 1692, + /* 2630 */ 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, + /* 2640 */ 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, + /* 2650 */ 1692, 1692, 1692, 1692, 2075, 1692, 1692, 1692, 2111, 1692, + /* 2660 */ 1692, 321, 2077, 661, 2079, 2080, 656, 1692, 651, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 356, 356, 335, 331, 337, 338, 441, 365, 364, 364, - /* 10 */ 445, 4, 12, 13, 14, 371, 364, 373, 373, 4, - /* 20 */ 20, 366, 22, 339, 380, 460, 461, 379, 22, 366, - /* 30 */ 465, 466, 377, 33, 19, 35, 364, 385, 386, 391, - /* 40 */ 377, 35, 394, 395, 372, 379, 1, 2, 33, 377, - /* 50 */ 43, 379, 45, 46, 20, 330, 372, 332, 58, 20, - /* 60 */ 394, 395, 364, 48, 64, 364, 411, 412, 53, 371, - /* 70 */ 328, 71, 371, 58, 411, 412, 413, 422, 380, 339, - /* 80 */ 408, 380, 339, 363, 412, 422, 3, 415, 416, 417, - /* 90 */ 418, 419, 420, 20, 422, 355, 376, 97, 3, 427, - /* 100 */ 100, 429, 362, 97, 375, 433, 434, 378, 379, 346, - /* 110 */ 12, 13, 372, 20, 99, 20, 353, 102, 20, 447, - /* 120 */ 22, 437, 438, 439, 381, 441, 442, 455, 63, 445, - /* 130 */ 20, 33, 335, 35, 337, 338, 136, 137, 396, 441, - /* 140 */ 396, 2, 400, 445, 460, 461, 101, 8, 9, 465, - /* 150 */ 466, 12, 13, 14, 15, 16, 58, 336, 460, 461, - /* 160 */ 339, 340, 64, 465, 466, 20, 166, 167, 331, 71, + /* 0 */ 379, 365, 356, 331, 339, 441, 339, 366, 425, 445, + /* 10 */ 364, 428, 12, 13, 14, 394, 395, 371, 377, 373, + /* 20 */ 20, 366, 22, 339, 460, 461, 380, 366, 14, 465, + /* 30 */ 466, 0, 377, 33, 20, 35, 364, 20, 377, 12, + /* 40 */ 13, 14, 15, 16, 372, 20, 381, 22, 20, 377, + /* 50 */ 20, 379, 411, 412, 413, 388, 372, 390, 58, 364, + /* 60 */ 35, 441, 364, 422, 64, 445, 411, 412, 413, 371, + /* 70 */ 328, 71, 411, 412, 413, 380, 51, 422, 380, 48, + /* 80 */ 408, 461, 364, 422, 412, 465, 466, 415, 416, 417, + /* 90 */ 418, 419, 420, 4, 422, 346, 330, 97, 332, 427, + /* 100 */ 100, 429, 353, 385, 386, 433, 434, 20, 8, 9, + /* 110 */ 12, 13, 12, 13, 14, 15, 16, 100, 20, 447, + /* 120 */ 22, 437, 438, 439, 364, 441, 442, 455, 100, 445, + /* 130 */ 100, 33, 43, 35, 45, 46, 136, 137, 396, 441, + /* 140 */ 396, 2, 400, 445, 460, 461, 386, 8, 9, 465, + /* 150 */ 466, 12, 13, 14, 15, 16, 58, 375, 460, 461, + /* 160 */ 378, 379, 64, 465, 466, 20, 166, 167, 331, 71, /* 170 */ 0, 21, 172, 173, 24, 25, 26, 27, 28, 29, - /* 180 */ 30, 31, 32, 441, 20, 441, 186, 445, 188, 445, - /* 190 */ 12, 13, 14, 15, 16, 97, 101, 20, 100, 63, - /* 200 */ 166, 167, 460, 461, 460, 461, 171, 465, 466, 465, - /* 210 */ 466, 364, 212, 213, 377, 215, 216, 217, 218, 219, + /* 180 */ 30, 31, 32, 441, 379, 441, 186, 445, 188, 445, + /* 190 */ 335, 20, 337, 338, 4, 97, 391, 35, 100, 394, + /* 200 */ 395, 100, 460, 461, 460, 461, 20, 465, 466, 465, + /* 210 */ 466, 110, 212, 213, 377, 215, 216, 217, 218, 219, /* 220 */ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, - /* 230 */ 230, 231, 232, 386, 136, 137, 66, 67, 68, 69, - /* 240 */ 70, 331, 72, 73, 74, 75, 76, 77, 78, 79, + /* 230 */ 230, 231, 232, 71, 136, 137, 66, 67, 68, 69, + /* 240 */ 70, 20, 72, 73, 74, 75, 76, 77, 78, 79, /* 250 */ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - /* 260 */ 90, 91, 92, 168, 166, 167, 20, 111, 8, 9, - /* 270 */ 172, 173, 12, 13, 14, 15, 16, 100, 168, 339, - /* 280 */ 20, 136, 137, 80, 186, 112, 188, 377, 131, 254, - /* 290 */ 255, 256, 135, 8, 9, 355, 20, 12, 13, 14, - /* 300 */ 15, 16, 362, 130, 131, 132, 133, 134, 135, 345, - /* 310 */ 212, 213, 372, 215, 216, 217, 218, 219, 220, 221, + /* 260 */ 90, 91, 92, 441, 166, 167, 331, 445, 8, 9, + /* 270 */ 172, 173, 12, 13, 14, 15, 16, 249, 178, 249, + /* 280 */ 20, 136, 137, 461, 186, 112, 188, 465, 466, 63, + /* 290 */ 100, 366, 336, 8, 9, 339, 340, 12, 13, 14, + /* 300 */ 15, 16, 377, 130, 131, 132, 133, 134, 135, 20, + /* 310 */ 212, 213, 377, 215, 216, 217, 218, 219, 220, 221, /* 320 */ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, - /* 330 */ 232, 233, 12, 13, 370, 336, 339, 366, 339, 340, - /* 340 */ 20, 97, 22, 396, 141, 142, 100, 400, 377, 64, - /* 350 */ 193, 194, 269, 33, 197, 35, 199, 113, 114, 115, - /* 360 */ 116, 117, 118, 119, 120, 121, 122, 164, 124, 125, - /* 370 */ 126, 127, 128, 129, 0, 58, 430, 431, 58, 0, - /* 380 */ 14, 331, 411, 412, 64, 388, 20, 390, 441, 44, - /* 390 */ 396, 71, 445, 422, 109, 21, 378, 379, 24, 25, - /* 400 */ 26, 27, 28, 29, 30, 31, 32, 460, 461, 345, - /* 410 */ 130, 131, 465, 466, 364, 135, 99, 97, 14, 102, - /* 420 */ 100, 20, 372, 22, 20, 361, 249, 377, 168, 379, - /* 430 */ 12, 13, 14, 100, 370, 441, 35, 14, 20, 445, - /* 440 */ 22, 8, 9, 20, 100, 12, 13, 14, 15, 16, - /* 450 */ 165, 33, 51, 35, 460, 461, 136, 137, 408, 465, - /* 460 */ 466, 343, 412, 58, 343, 415, 416, 417, 418, 419, - /* 470 */ 420, 0, 422, 331, 331, 425, 58, 427, 428, 429, - /* 480 */ 359, 350, 351, 433, 434, 367, 166, 167, 367, 71, - /* 490 */ 0, 112, 172, 173, 0, 24, 25, 26, 27, 28, - /* 500 */ 29, 30, 31, 32, 233, 100, 186, 102, 188, 130, - /* 510 */ 131, 132, 133, 134, 135, 97, 22, 20, 100, 377, - /* 520 */ 377, 236, 237, 238, 239, 240, 241, 242, 243, 244, - /* 530 */ 245, 246, 212, 213, 71, 215, 216, 217, 218, 219, + /* 330 */ 232, 233, 12, 13, 0, 20, 411, 412, 364, 168, + /* 340 */ 20, 97, 22, 20, 63, 371, 20, 422, 22, 64, + /* 350 */ 171, 343, 58, 33, 380, 35, 343, 113, 114, 115, + /* 360 */ 116, 117, 118, 119, 120, 121, 122, 359, 124, 125, + /* 370 */ 126, 127, 128, 129, 274, 367, 2, 51, 58, 0, + /* 380 */ 367, 331, 8, 9, 64, 111, 12, 13, 14, 15, + /* 390 */ 16, 71, 20, 99, 109, 212, 102, 66, 67, 68, + /* 400 */ 66, 67, 68, 331, 73, 74, 75, 73, 74, 75, + /* 410 */ 79, 430, 431, 79, 364, 84, 85, 97, 84, 85, + /* 420 */ 100, 90, 372, 335, 90, 337, 338, 377, 168, 379, + /* 430 */ 12, 13, 14, 254, 255, 256, 345, 414, 20, 249, + /* 440 */ 22, 22, 259, 260, 261, 262, 263, 264, 265, 377, + /* 450 */ 165, 33, 361, 35, 35, 339, 136, 137, 408, 136, + /* 460 */ 137, 370, 412, 440, 112, 415, 416, 417, 418, 419, + /* 470 */ 420, 355, 422, 0, 339, 425, 58, 427, 428, 429, + /* 480 */ 100, 166, 167, 433, 434, 133, 166, 167, 372, 71, + /* 490 */ 355, 112, 172, 173, 21, 172, 173, 24, 25, 26, + /* 500 */ 27, 28, 29, 30, 31, 32, 186, 372, 188, 130, + /* 510 */ 131, 132, 133, 134, 135, 97, 97, 130, 100, 80, + /* 520 */ 100, 236, 237, 238, 239, 240, 241, 242, 243, 244, + /* 530 */ 245, 246, 212, 213, 0, 215, 216, 217, 218, 219, /* 540 */ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, - /* 550 */ 230, 231, 232, 22, 136, 137, 66, 67, 68, 66, - /* 560 */ 67, 68, 20, 111, 74, 75, 35, 74, 75, 79, - /* 570 */ 166, 4, 79, 364, 84, 85, 366, 84, 85, 331, - /* 580 */ 90, 372, 249, 90, 166, 167, 339, 377, 71, 166, - /* 590 */ 172, 173, 21, 249, 8, 9, 4, 100, 12, 13, - /* 600 */ 14, 15, 16, 2, 186, 34, 188, 36, 20, 8, - /* 610 */ 9, 178, 364, 12, 13, 14, 15, 16, 273, 372, - /* 620 */ 372, 411, 412, 413, 365, 377, 417, 379, 97, 365, - /* 630 */ 212, 213, 422, 215, 216, 217, 218, 219, 220, 221, + /* 550 */ 230, 231, 232, 396, 136, 137, 71, 400, 24, 25, + /* 560 */ 26, 27, 28, 29, 30, 31, 32, 58, 336, 8, + /* 570 */ 9, 339, 340, 12, 13, 14, 15, 16, 364, 331, + /* 580 */ 141, 142, 195, 196, 166, 167, 339, 373, 8, 9, + /* 590 */ 172, 173, 12, 13, 14, 15, 16, 3, 441, 111, + /* 600 */ 364, 345, 445, 164, 186, 364, 188, 371, 426, 100, + /* 610 */ 428, 102, 364, 372, 20, 363, 380, 460, 461, 372, + /* 620 */ 372, 0, 465, 466, 44, 377, 370, 379, 376, 249, + /* 630 */ 212, 213, 181, 215, 216, 217, 218, 219, 220, 221, /* 640 */ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, - /* 650 */ 232, 12, 13, 100, 249, 364, 408, 339, 130, 20, - /* 660 */ 412, 22, 371, 415, 416, 417, 418, 419, 420, 212, - /* 670 */ 422, 380, 33, 355, 35, 427, 96, 429, 136, 137, - /* 680 */ 372, 433, 434, 436, 437, 438, 439, 101, 441, 442, - /* 690 */ 372, 383, 100, 339, 8, 9, 331, 58, 12, 13, - /* 700 */ 14, 15, 16, 455, 14, 15, 16, 274, 365, 355, - /* 710 */ 71, 339, 331, 365, 172, 173, 259, 260, 261, 262, - /* 720 */ 263, 264, 265, 195, 196, 414, 372, 8, 9, 364, - /* 730 */ 44, 12, 13, 14, 15, 16, 97, 372, 185, 100, - /* 740 */ 187, 441, 377, 441, 379, 445, 249, 445, 168, 12, - /* 750 */ 13, 440, 414, 339, 396, 35, 168, 20, 377, 22, - /* 760 */ 388, 461, 390, 461, 211, 465, 466, 465, 466, 355, - /* 770 */ 33, 356, 35, 408, 339, 136, 137, 412, 440, 364, - /* 780 */ 415, 416, 417, 418, 419, 420, 372, 422, 373, 339, - /* 790 */ 355, 71, 181, 339, 364, 58, 331, 339, 331, 441, - /* 800 */ 339, 371, 249, 445, 331, 166, 167, 372, 71, 355, - /* 810 */ 380, 172, 173, 355, 203, 204, 355, 250, 460, 461, - /* 820 */ 101, 456, 457, 465, 466, 186, 372, 188, 356, 0, - /* 830 */ 372, 364, 0, 372, 97, 22, 364, 100, 388, 372, - /* 840 */ 390, 249, 377, 339, 377, 373, 379, 20, 35, 22, - /* 850 */ 377, 212, 213, 165, 215, 216, 217, 218, 219, 220, + /* 650 */ 232, 12, 13, 396, 203, 204, 408, 339, 417, 20, + /* 660 */ 412, 22, 101, 415, 416, 417, 418, 419, 420, 249, + /* 670 */ 422, 339, 33, 355, 35, 427, 339, 429, 378, 379, + /* 680 */ 362, 433, 434, 436, 437, 438, 439, 355, 441, 442, + /* 690 */ 372, 4, 355, 414, 362, 101, 331, 58, 441, 111, + /* 700 */ 331, 339, 445, 455, 372, 339, 19, 8, 9, 372, + /* 710 */ 71, 12, 13, 14, 15, 16, 339, 460, 461, 440, + /* 720 */ 33, 355, 465, 466, 14, 15, 16, 339, 131, 364, + /* 730 */ 339, 339, 135, 112, 372, 48, 97, 372, 372, 100, + /* 740 */ 53, 233, 377, 355, 379, 58, 377, 355, 160, 12, + /* 750 */ 13, 130, 131, 132, 133, 134, 135, 20, 249, 22, + /* 760 */ 372, 356, 168, 372, 372, 388, 339, 390, 366, 364, + /* 770 */ 33, 396, 35, 408, 71, 136, 137, 412, 373, 377, + /* 780 */ 415, 416, 417, 418, 419, 420, 99, 422, 365, 102, + /* 790 */ 193, 194, 331, 339, 197, 58, 199, 331, 331, 437, + /* 800 */ 438, 439, 356, 441, 442, 166, 167, 372, 71, 355, + /* 810 */ 364, 172, 173, 411, 412, 388, 441, 390, 383, 373, + /* 820 */ 445, 456, 457, 0, 422, 186, 372, 188, 437, 438, + /* 830 */ 439, 364, 441, 442, 97, 460, 461, 100, 377, 372, + /* 840 */ 465, 466, 14, 377, 377, 331, 379, 14, 20, 331, + /* 850 */ 414, 212, 213, 20, 215, 216, 217, 218, 219, 220, /* 860 */ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - /* 870 */ 231, 232, 20, 136, 137, 408, 372, 365, 51, 412, - /* 880 */ 331, 331, 415, 416, 417, 418, 419, 420, 18, 422, - /* 890 */ 364, 366, 63, 23, 427, 339, 429, 371, 350, 351, - /* 900 */ 433, 434, 377, 166, 167, 331, 380, 37, 38, 172, - /* 910 */ 173, 41, 425, 8, 9, 428, 39, 12, 13, 14, - /* 920 */ 15, 16, 414, 186, 236, 188, 377, 377, 372, 59, - /* 930 */ 60, 61, 62, 331, 246, 331, 411, 412, 413, 45, - /* 940 */ 46, 437, 438, 439, 331, 441, 442, 422, 440, 212, + /* 870 */ 231, 232, 365, 136, 137, 408, 440, 21, 331, 412, + /* 880 */ 365, 339, 415, 416, 417, 418, 419, 420, 18, 422, + /* 890 */ 34, 377, 36, 23, 427, 377, 429, 355, 365, 364, + /* 900 */ 433, 434, 331, 166, 167, 331, 371, 37, 38, 172, + /* 910 */ 173, 41, 8, 9, 372, 380, 12, 13, 14, 15, + /* 920 */ 16, 130, 131, 186, 377, 188, 135, 37, 356, 59, + /* 930 */ 60, 61, 62, 39, 8, 9, 364, 3, 12, 13, + /* 940 */ 14, 15, 16, 331, 331, 373, 350, 351, 377, 212, /* 950 */ 213, 377, 215, 216, 217, 218, 219, 220, 221, 222, /* 960 */ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, - /* 970 */ 100, 18, 339, 20, 331, 247, 248, 364, 331, 377, - /* 980 */ 27, 377, 365, 30, 339, 372, 33, 155, 355, 332, - /* 990 */ 377, 331, 379, 437, 438, 439, 164, 441, 442, 331, - /* 1000 */ 355, 48, 233, 50, 235, 372, 53, 364, 138, 353, - /* 1010 */ 339, 339, 369, 1, 2, 372, 0, 372, 166, 44, - /* 1020 */ 377, 408, 379, 339, 377, 412, 355, 355, 415, 416, - /* 1030 */ 417, 418, 419, 420, 426, 422, 428, 377, 339, 355, - /* 1040 */ 427, 331, 429, 372, 372, 377, 433, 434, 178, 179, - /* 1050 */ 180, 408, 99, 183, 355, 412, 372, 444, 415, 416, - /* 1060 */ 417, 418, 419, 420, 111, 422, 426, 331, 428, 22, - /* 1070 */ 20, 372, 202, 168, 331, 205, 101, 207, 208, 209, - /* 1080 */ 210, 211, 35, 372, 372, 331, 360, 377, 401, 331, - /* 1090 */ 352, 396, 354, 140, 383, 383, 143, 144, 145, 146, + /* 970 */ 100, 18, 364, 20, 331, 350, 351, 364, 155, 371, + /* 980 */ 27, 339, 4, 30, 339, 372, 33, 164, 380, 377, + /* 990 */ 377, 22, 379, 103, 166, 105, 106, 355, 108, 166, + /* 1000 */ 355, 48, 112, 50, 35, 101, 53, 364, 138, 365, + /* 1010 */ 339, 339, 369, 0, 372, 372, 233, 372, 235, 20, + /* 1020 */ 377, 408, 379, 133, 365, 412, 355, 355, 415, 416, + /* 1030 */ 417, 418, 419, 420, 352, 422, 354, 331, 331, 100, + /* 1040 */ 427, 20, 429, 372, 372, 331, 433, 434, 178, 179, + /* 1050 */ 180, 408, 99, 183, 339, 412, 20, 444, 415, 416, + /* 1060 */ 417, 418, 419, 420, 111, 422, 97, 1, 2, 22, + /* 1070 */ 355, 331, 202, 0, 165, 205, 63, 207, 208, 209, + /* 1080 */ 210, 211, 35, 377, 377, 331, 331, 372, 331, 331, + /* 1090 */ 426, 377, 428, 140, 168, 22, 143, 144, 145, 146, /* 1100 */ 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, - /* 1110 */ 157, 158, 159, 377, 161, 162, 163, 64, 71, 249, - /* 1120 */ 377, 387, 364, 364, 364, 248, 339, 35, 112, 339, - /* 1130 */ 372, 377, 406, 373, 0, 377, 441, 379, 331, 380, - /* 1140 */ 445, 37, 355, 112, 97, 355, 130, 131, 132, 133, - /* 1150 */ 134, 135, 111, 35, 374, 460, 461, 377, 469, 372, - /* 1160 */ 465, 466, 372, 458, 133, 339, 408, 339, 44, 374, + /* 1110 */ 157, 158, 159, 339, 161, 162, 163, 377, 71, 249, + /* 1120 */ 339, 44, 364, 339, 185, 339, 187, 339, 401, 355, + /* 1130 */ 372, 377, 377, 44, 377, 377, 355, 379, 331, 355, + /* 1140 */ 372, 355, 248, 355, 97, 236, 372, 360, 372, 357, + /* 1150 */ 211, 383, 360, 372, 374, 246, 372, 377, 372, 383, + /* 1160 */ 372, 45, 46, 247, 248, 166, 408, 101, 0, 374, /* 1170 */ 412, 364, 377, 415, 416, 417, 418, 419, 420, 372, - /* 1180 */ 422, 355, 48, 355, 377, 427, 379, 429, 0, 71, - /* 1190 */ 374, 433, 434, 377, 341, 339, 357, 331, 372, 360, - /* 1200 */ 372, 160, 444, 42, 42, 44, 44, 103, 35, 105, - /* 1210 */ 106, 355, 108, 58, 104, 408, 112, 107, 168, 412, - /* 1220 */ 331, 100, 415, 416, 417, 418, 419, 420, 372, 422, - /* 1230 */ 364, 110, 44, 186, 427, 188, 429, 133, 372, 104, - /* 1240 */ 433, 434, 107, 377, 104, 379, 104, 107, 0, 107, - /* 1250 */ 0, 444, 198, 364, 200, 44, 44, 102, 452, 212, - /* 1260 */ 213, 372, 44, 44, 44, 212, 377, 13, 379, 44, - /* 1270 */ 22, 44, 22, 44, 408, 136, 137, 44, 412, 44, - /* 1280 */ 188, 415, 416, 417, 418, 419, 420, 47, 422, 35, - /* 1290 */ 44, 364, 341, 427, 387, 429, 338, 408, 331, 433, - /* 1300 */ 434, 412, 44, 13, 415, 416, 417, 418, 419, 420, - /* 1310 */ 444, 422, 101, 101, 12, 13, 427, 44, 429, 101, - /* 1320 */ 101, 101, 433, 434, 22, 35, 101, 0, 101, 387, - /* 1330 */ 101, 364, 376, 444, 101, 33, 101, 35, 443, 372, - /* 1340 */ 100, 462, 446, 33, 377, 44, 379, 101, 8, 9, - /* 1350 */ 44, 44, 12, 13, 14, 15, 16, 331, 48, 101, - /* 1360 */ 58, 188, 44, 44, 54, 55, 56, 57, 58, 435, - /* 1370 */ 251, 410, 48, 71, 101, 408, 49, 409, 44, 412, - /* 1380 */ 331, 184, 415, 416, 417, 418, 419, 420, 398, 422, - /* 1390 */ 364, 42, 384, 20, 427, 271, 429, 387, 372, 97, - /* 1400 */ 433, 434, 101, 377, 384, 379, 165, 101, 101, 99, - /* 1410 */ 382, 20, 102, 364, 339, 339, 384, 382, 382, 101, - /* 1420 */ 101, 372, 349, 98, 95, 348, 377, 339, 379, 94, - /* 1430 */ 347, 20, 339, 339, 408, 101, 339, 20, 412, 333, - /* 1440 */ 333, 415, 416, 417, 418, 419, 420, 403, 422, 20, - /* 1450 */ 345, 379, 20, 427, 345, 429, 340, 408, 20, 433, - /* 1460 */ 434, 412, 331, 397, 415, 416, 417, 418, 419, 420, - /* 1470 */ 345, 422, 340, 345, 345, 345, 339, 52, 429, 169, - /* 1480 */ 170, 345, 433, 434, 174, 342, 176, 342, 186, 333, - /* 1490 */ 188, 364, 377, 201, 377, 364, 333, 364, 407, 339, - /* 1500 */ 377, 100, 192, 372, 405, 364, 403, 343, 377, 343, - /* 1510 */ 379, 331, 364, 364, 212, 213, 364, 364, 364, 191, - /* 1520 */ 339, 364, 364, 364, 402, 379, 258, 225, 226, 227, - /* 1530 */ 228, 229, 230, 231, 331, 451, 257, 387, 387, 408, - /* 1540 */ 451, 454, 377, 412, 364, 377, 415, 416, 417, 418, - /* 1550 */ 419, 420, 372, 422, 377, 377, 177, 377, 450, 379, - /* 1560 */ 429, 392, 392, 266, 433, 434, 453, 364, 268, 252, - /* 1570 */ 267, 451, 470, 372, 448, 372, 464, 410, 270, 275, - /* 1580 */ 377, 272, 379, 20, 248, 414, 339, 449, 408, 340, - /* 1590 */ 20, 392, 412, 377, 343, 415, 416, 417, 418, 419, - /* 1600 */ 420, 377, 422, 343, 390, 377, 331, 463, 377, 429, - /* 1610 */ 170, 408, 389, 433, 434, 412, 377, 343, 415, 416, - /* 1620 */ 417, 418, 419, 420, 421, 422, 423, 424, 392, 331, - /* 1630 */ 377, 360, 343, 372, 100, 100, 432, 368, 354, 364, - /* 1640 */ 377, 36, 343, 19, 339, 334, 333, 372, 404, 393, - /* 1650 */ 393, 399, 377, 358, 379, 329, 344, 33, 0, 0, - /* 1660 */ 0, 42, 364, 331, 0, 35, 206, 35, 35, 35, - /* 1670 */ 372, 206, 48, 358, 358, 377, 35, 379, 54, 55, - /* 1680 */ 56, 57, 58, 408, 0, 35, 206, 412, 0, 331, + /* 1180 */ 422, 42, 44, 44, 377, 427, 379, 429, 249, 168, + /* 1190 */ 101, 433, 434, 406, 22, 374, 0, 331, 377, 42, + /* 1200 */ 44, 44, 444, 269, 168, 104, 104, 35, 107, 107, + /* 1210 */ 104, 104, 44, 107, 107, 408, 136, 137, 22, 412, + /* 1220 */ 331, 58, 415, 416, 417, 418, 419, 420, 250, 422, + /* 1230 */ 364, 353, 44, 186, 427, 188, 429, 198, 372, 200, + /* 1240 */ 433, 434, 0, 377, 35, 379, 44, 96, 1, 2, + /* 1250 */ 332, 444, 387, 364, 64, 44, 44, 101, 13, 212, + /* 1260 */ 213, 372, 469, 44, 22, 102, 377, 458, 379, 44, + /* 1270 */ 44, 44, 44, 44, 408, 44, 35, 44, 412, 44, + /* 1280 */ 35, 415, 416, 417, 418, 419, 420, 47, 422, 101, + /* 1290 */ 44, 341, 44, 427, 44, 429, 44, 408, 331, 433, + /* 1300 */ 434, 412, 44, 101, 415, 416, 417, 418, 419, 420, + /* 1310 */ 444, 422, 101, 101, 12, 13, 427, 341, 429, 168, + /* 1320 */ 101, 0, 433, 434, 22, 35, 101, 101, 101, 101, + /* 1330 */ 101, 364, 101, 444, 101, 33, 101, 35, 452, 372, + /* 1340 */ 100, 13, 387, 33, 377, 364, 379, 101, 271, 101, + /* 1350 */ 338, 101, 387, 101, 443, 376, 435, 331, 48, 101, + /* 1360 */ 58, 71, 462, 35, 54, 55, 56, 57, 58, 446, + /* 1370 */ 49, 251, 410, 71, 48, 408, 184, 409, 398, 412, + /* 1380 */ 331, 42, 415, 416, 417, 418, 419, 420, 384, 422, + /* 1390 */ 364, 20, 387, 384, 427, 165, 429, 188, 372, 97, + /* 1400 */ 433, 434, 212, 377, 382, 379, 20, 339, 339, 99, + /* 1410 */ 382, 273, 102, 364, 384, 382, 98, 95, 339, 349, + /* 1420 */ 348, 372, 347, 94, 339, 339, 377, 396, 379, 188, + /* 1430 */ 339, 20, 333, 333, 408, 20, 20, 403, 412, 345, + /* 1440 */ 379, 415, 416, 417, 418, 419, 420, 20, 422, 345, + /* 1450 */ 340, 20, 397, 427, 345, 429, 345, 408, 340, 433, + /* 1460 */ 434, 412, 331, 339, 415, 416, 417, 418, 419, 420, + /* 1470 */ 345, 422, 441, 345, 345, 52, 445, 342, 429, 169, + /* 1480 */ 170, 333, 433, 434, 174, 342, 176, 364, 186, 339, + /* 1490 */ 188, 460, 461, 333, 364, 364, 465, 466, 364, 377, + /* 1500 */ 364, 364, 192, 372, 364, 364, 364, 201, 377, 364, + /* 1510 */ 379, 331, 407, 364, 212, 213, 364, 100, 405, 343, + /* 1520 */ 403, 377, 191, 377, 343, 339, 379, 225, 226, 227, + /* 1530 */ 228, 229, 230, 231, 331, 402, 377, 258, 451, 408, + /* 1540 */ 387, 387, 257, 412, 364, 177, 415, 416, 417, 418, + /* 1550 */ 419, 420, 372, 422, 392, 377, 392, 377, 266, 379, + /* 1560 */ 429, 377, 377, 451, 433, 434, 451, 364, 454, 268, + /* 1570 */ 267, 450, 453, 470, 448, 372, 449, 252, 248, 410, + /* 1580 */ 377, 272, 379, 275, 270, 372, 20, 414, 408, 340, + /* 1590 */ 339, 20, 412, 392, 390, 415, 416, 417, 418, 419, + /* 1600 */ 420, 377, 422, 343, 343, 170, 331, 392, 343, 429, + /* 1610 */ 389, 408, 343, 433, 434, 412, 377, 100, 415, 416, + /* 1620 */ 417, 418, 419, 420, 421, 422, 423, 424, 463, 331, + /* 1630 */ 464, 377, 377, 377, 377, 372, 360, 432, 100, 364, + /* 1640 */ 368, 377, 354, 19, 339, 36, 334, 372, 333, 358, + /* 1650 */ 343, 358, 377, 358, 379, 344, 329, 33, 399, 393, + /* 1660 */ 393, 0, 364, 331, 0, 0, 404, 42, 0, 35, + /* 1670 */ 372, 206, 48, 35, 35, 377, 35, 379, 54, 55, + /* 1680 */ 56, 57, 58, 408, 206, 0, 35, 412, 35, 331, /* 1690 */ 415, 416, 417, 418, 419, 420, 364, 422, 206, 0, - /* 1700 */ 35, 0, 22, 0, 372, 35, 408, 193, 188, 377, - /* 1710 */ 412, 379, 186, 415, 416, 417, 418, 419, 420, 0, - /* 1720 */ 422, 0, 364, 99, 0, 182, 102, 429, 181, 0, - /* 1730 */ 372, 0, 434, 47, 0, 377, 0, 379, 0, 42, - /* 1740 */ 408, 0, 467, 468, 412, 0, 0, 415, 416, 417, + /* 1700 */ 206, 0, 35, 0, 372, 22, 408, 0, 35, 377, + /* 1710 */ 412, 379, 193, 415, 416, 417, 418, 419, 420, 188, + /* 1720 */ 422, 186, 364, 99, 0, 0, 102, 429, 0, 182, + /* 1730 */ 372, 181, 434, 0, 0, 377, 47, 379, 0, 0, + /* 1740 */ 408, 0, 467, 468, 412, 0, 42, 415, 416, 417, /* 1750 */ 418, 419, 420, 331, 422, 0, 0, 0, 134, 155, - /* 1760 */ 35, 0, 155, 0, 0, 0, 408, 0, 0, 0, + /* 1760 */ 0, 35, 155, 0, 0, 0, 408, 0, 0, 0, /* 1770 */ 412, 0, 0, 415, 416, 417, 418, 419, 420, 0, /* 1780 */ 422, 0, 0, 0, 0, 331, 364, 0, 0, 457, - /* 1790 */ 0, 0, 0, 169, 372, 42, 0, 0, 174, 377, - /* 1800 */ 0, 379, 0, 0, 0, 0, 0, 22, 0, 0, - /* 1810 */ 331, 139, 0, 96, 190, 22, 192, 459, 364, 96, - /* 1820 */ 22, 0, 0, 0, 58, 0, 372, 0, 58, 35, - /* 1830 */ 408, 377, 58, 379, 412, 0, 47, 415, 416, 417, - /* 1840 */ 418, 419, 420, 364, 422, 44, 47, 14, 369, 42, - /* 1850 */ 39, 372, 14, 40, 39, 0, 377, 47, 379, 331, - /* 1860 */ 0, 0, 408, 39, 177, 0, 412, 0, 0, 415, - /* 1870 */ 416, 417, 418, 419, 420, 331, 422, 0, 424, 65, - /* 1880 */ 0, 35, 48, 39, 0, 35, 39, 408, 48, 0, - /* 1890 */ 468, 412, 364, 35, 415, 416, 417, 418, 419, 420, - /* 1900 */ 372, 422, 48, 39, 0, 377, 35, 379, 364, 39, - /* 1910 */ 48, 0, 0, 369, 35, 22, 372, 0, 0, 0, - /* 1920 */ 35, 377, 35, 379, 331, 109, 107, 35, 22, 35, - /* 1930 */ 44, 35, 44, 0, 35, 35, 408, 22, 0, 0, - /* 1940 */ 412, 331, 22, 415, 416, 417, 418, 419, 420, 22, - /* 1950 */ 422, 50, 408, 0, 0, 0, 412, 364, 331, 415, - /* 1960 */ 416, 417, 418, 419, 420, 372, 422, 35, 22, 35, - /* 1970 */ 377, 35, 379, 101, 364, 35, 20, 35, 35, 0, - /* 1980 */ 35, 100, 372, 100, 0, 168, 22, 377, 168, 379, - /* 1990 */ 0, 364, 0, 175, 3, 44, 170, 168, 101, 372, - /* 2000 */ 253, 408, 100, 100, 377, 412, 379, 331, 415, 416, - /* 2010 */ 417, 418, 419, 420, 98, 422, 95, 189, 408, 96, - /* 2020 */ 96, 44, 412, 331, 44, 415, 416, 417, 418, 419, - /* 2030 */ 420, 101, 422, 44, 47, 408, 101, 100, 44, 412, + /* 1790 */ 0, 0, 0, 169, 372, 0, 0, 0, 174, 377, + /* 1800 */ 42, 379, 0, 0, 0, 0, 0, 22, 0, 0, + /* 1810 */ 331, 0, 0, 139, 190, 0, 192, 459, 364, 96, + /* 1820 */ 22, 22, 0, 96, 58, 0, 372, 0, 35, 0, + /* 1830 */ 408, 377, 58, 379, 412, 58, 0, 415, 416, 417, + /* 1840 */ 418, 419, 420, 364, 422, 44, 0, 47, 369, 42, + /* 1850 */ 0, 372, 39, 14, 14, 39, 377, 47, 379, 331, + /* 1860 */ 40, 47, 408, 0, 0, 39, 412, 177, 0, 415, + /* 1870 */ 416, 417, 418, 419, 420, 331, 422, 0, 424, 0, + /* 1880 */ 0, 0, 65, 35, 39, 48, 0, 408, 35, 48, + /* 1890 */ 468, 412, 364, 39, 415, 416, 417, 418, 419, 420, + /* 1900 */ 372, 422, 0, 48, 35, 377, 39, 379, 364, 0, + /* 1910 */ 35, 39, 0, 369, 48, 0, 372, 0, 0, 35, + /* 1920 */ 0, 377, 22, 379, 331, 35, 107, 109, 35, 35, + /* 1930 */ 35, 35, 44, 44, 35, 22, 408, 0, 35, 35, + /* 1940 */ 412, 331, 0, 415, 416, 417, 418, 419, 420, 22, + /* 1950 */ 422, 22, 408, 0, 22, 50, 412, 364, 331, 415, + /* 1960 */ 416, 417, 418, 419, 420, 372, 422, 0, 35, 35, + /* 1970 */ 377, 0, 379, 35, 364, 0, 22, 20, 35, 35, + /* 1980 */ 35, 0, 372, 101, 35, 100, 0, 377, 22, 379, + /* 1990 */ 0, 364, 168, 170, 0, 3, 175, 100, 168, 372, + /* 2000 */ 44, 408, 168, 253, 377, 412, 379, 331, 415, 416, + /* 2010 */ 417, 418, 419, 420, 44, 422, 100, 189, 408, 96, + /* 2020 */ 101, 100, 412, 331, 98, 415, 416, 417, 418, 419, + /* 2030 */ 420, 96, 422, 44, 95, 408, 3, 101, 47, 412, /* 2040 */ 364, 331, 415, 416, 417, 418, 419, 420, 372, 422, - /* 2050 */ 100, 47, 100, 377, 3, 379, 364, 44, 101, 100, - /* 2060 */ 35, 101, 101, 35, 372, 35, 35, 35, 35, 377, - /* 2070 */ 101, 379, 101, 47, 364, 0, 47, 0, 247, 44, - /* 2080 */ 0, 0, 372, 253, 408, 100, 39, 377, 412, 379, - /* 2090 */ 331, 415, 416, 417, 418, 419, 420, 47, 422, 100, - /* 2100 */ 408, 253, 101, 101, 412, 100, 331, 415, 416, 417, - /* 2110 */ 418, 419, 420, 0, 422, 100, 100, 39, 408, 171, - /* 2120 */ 100, 110, 412, 364, 234, 415, 416, 417, 418, 419, - /* 2130 */ 420, 372, 422, 47, 169, 44, 377, 98, 379, 364, - /* 2140 */ 98, 2, 22, 212, 100, 47, 101, 372, 100, 47, - /* 2150 */ 101, 22, 377, 100, 379, 101, 100, 100, 214, 101, - /* 2160 */ 100, 35, 101, 331, 100, 35, 111, 408, 101, 35, + /* 2050 */ 44, 101, 100, 377, 47, 379, 364, 44, 100, 100, + /* 2060 */ 44, 101, 100, 35, 372, 101, 101, 35, 47, 377, + /* 2070 */ 35, 379, 35, 35, 364, 35, 47, 101, 101, 0, + /* 2080 */ 44, 0, 372, 100, 408, 247, 253, 377, 412, 379, + /* 2090 */ 331, 415, 416, 417, 418, 419, 420, 253, 422, 0, + /* 2100 */ 408, 0, 39, 47, 412, 100, 331, 415, 416, 417, + /* 2110 */ 418, 419, 420, 0, 422, 101, 101, 100, 408, 100, + /* 2120 */ 100, 39, 412, 364, 169, 415, 416, 417, 418, 419, + /* 2130 */ 420, 372, 422, 110, 100, 47, 377, 44, 379, 364, + /* 2140 */ 171, 98, 234, 98, 2, 22, 100, 372, 101, 100, + /* 2150 */ 47, 101, 377, 212, 379, 100, 47, 22, 101, 100, + /* 2160 */ 100, 214, 101, 331, 100, 111, 101, 408, 35, 35, /* 2170 */ 100, 412, 101, 35, 415, 416, 417, 418, 419, 420, - /* 2180 */ 331, 422, 100, 408, 35, 101, 101, 412, 100, 35, - /* 2190 */ 415, 416, 417, 418, 419, 420, 364, 422, 22, 100, - /* 2200 */ 100, 44, 123, 100, 372, 112, 35, 100, 22, 377, - /* 2210 */ 123, 379, 123, 364, 64, 123, 65, 35, 35, 35, + /* 2180 */ 331, 422, 35, 408, 100, 35, 101, 412, 101, 100, + /* 2190 */ 415, 416, 417, 418, 419, 420, 364, 422, 100, 35, + /* 2200 */ 123, 101, 100, 123, 372, 22, 112, 100, 100, 377, + /* 2210 */ 44, 379, 35, 364, 123, 123, 100, 22, 65, 64, /* 2220 */ 35, 372, 35, 35, 35, 35, 377, 35, 379, 331, - /* 2230 */ 35, 71, 22, 93, 35, 44, 35, 35, 35, 35, - /* 2240 */ 408, 35, 35, 71, 412, 331, 35, 415, 416, 417, - /* 2250 */ 418, 419, 420, 35, 422, 35, 35, 408, 22, 35, - /* 2260 */ 0, 412, 364, 35, 415, 416, 417, 418, 419, 420, - /* 2270 */ 372, 422, 39, 48, 0, 377, 35, 379, 364, 48, - /* 2280 */ 0, 39, 35, 48, 39, 0, 372, 35, 48, 39, - /* 2290 */ 0, 377, 35, 379, 331, 0, 35, 22, 21, 471, - /* 2300 */ 22, 22, 21, 20, 471, 471, 408, 471, 471, 471, + /* 2230 */ 71, 35, 93, 35, 35, 35, 35, 44, 35, 35, + /* 2240 */ 408, 22, 35, 35, 412, 331, 35, 415, 416, 417, + /* 2250 */ 418, 419, 420, 71, 422, 35, 35, 408, 35, 35, + /* 2260 */ 35, 412, 364, 22, 415, 416, 417, 418, 419, 420, + /* 2270 */ 372, 422, 35, 0, 35, 377, 48, 379, 364, 39, + /* 2280 */ 0, 48, 35, 39, 0, 35, 372, 39, 0, 35, + /* 2290 */ 48, 377, 39, 379, 331, 0, 35, 48, 35, 0, + /* 2300 */ 22, 22, 21, 20, 22, 471, 408, 21, 471, 471, /* 2310 */ 412, 471, 471, 415, 416, 417, 418, 419, 420, 331, /* 2320 */ 422, 471, 408, 471, 471, 471, 412, 364, 471, 415, /* 2330 */ 416, 417, 418, 419, 420, 372, 422, 471, 471, 471, @@ -755,89 +755,89 @@ static const YYCODETYPE yy_lookahead[] = { /* 2650 */ 471, 471, 471, 471, 408, 471, 471, 471, 412, 471, /* 2660 */ 471, 415, 416, 417, 418, 419, 420, 471, 422, }; -#define YY_SHIFT_COUNT (750) +#define YY_SHIFT_COUNT (751) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2295) +#define YY_SHIFT_MAX (2299) static const unsigned short int yy_shift_ofst[] = { /* 0 */ 870, 0, 98, 0, 320, 320, 320, 320, 320, 320, /* 10 */ 320, 320, 320, 320, 320, 418, 639, 639, 737, 639, /* 20 */ 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, /* 30 */ 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, - /* 40 */ 639, 639, 639, 639, 639, 639, 639, 639, 177, 497, - /* 50 */ 553, 246, 405, 333, 344, 333, 246, 246, 1302, 1302, - /* 60 */ 1302, 333, 1302, 1302, 592, 333, 39, 542, 73, 73, - /* 70 */ 542, 7, 7, 34, 145, 366, 366, 73, 73, 73, - /* 80 */ 73, 73, 73, 73, 93, 73, 73, 65, 39, 73, - /* 90 */ 73, 164, 73, 39, 73, 93, 73, 93, 39, 73, - /* 100 */ 73, 39, 73, 39, 39, 39, 73, 136, 953, 285, - /* 110 */ 285, 150, 493, 1047, 1047, 1047, 1047, 1047, 1047, 1047, + /* 40 */ 639, 639, 639, 639, 639, 639, 639, 639, 28, 30, + /* 50 */ 939, 17, 509, 380, 420, 380, 17, 17, 1302, 1302, + /* 60 */ 1302, 380, 1302, 1302, 190, 380, 87, 323, 186, 186, + /* 70 */ 323, 89, 89, 315, 145, 14, 14, 186, 186, 186, + /* 80 */ 186, 186, 186, 186, 221, 186, 186, 226, 87, 186, + /* 90 */ 186, 289, 186, 87, 186, 221, 186, 221, 87, 186, + /* 100 */ 186, 87, 186, 87, 87, 87, 186, 281, 953, 285, + /* 110 */ 285, 331, 150, 1047, 1047, 1047, 1047, 1047, 1047, 1047, /* 120 */ 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, - /* 130 */ 1047, 1047, 1104, 95, 34, 145, 720, 110, 110, 110, - /* 140 */ 829, 769, 769, 720, 276, 276, 276, 65, 156, 271, - /* 150 */ 39, 463, 39, 463, 463, 452, 517, 244, 244, 244, - /* 160 */ 244, 244, 244, 244, 244, 1624, 374, 490, 260, 433, - /* 170 */ 457, 401, 35, 404, 423, 827, 588, 894, 1031, 1050, - /* 180 */ 728, 877, 83, 728, 1161, 567, 852, 1119, 1324, 1197, - /* 190 */ 1349, 1373, 1349, 1241, 1391, 1391, 1349, 1241, 1241, 1325, - /* 200 */ 1329, 1391, 1335, 1391, 1391, 1391, 1411, 1411, 1417, 65, - /* 210 */ 1429, 65, 1432, 1438, 65, 1432, 65, 65, 65, 1391, - /* 220 */ 65, 1425, 1425, 1411, 39, 39, 39, 39, 39, 39, - /* 230 */ 39, 39, 39, 39, 39, 1391, 1411, 463, 463, 463, - /* 240 */ 1292, 1401, 1417, 136, 1328, 1429, 136, 1391, 1373, 1373, - /* 250 */ 463, 1268, 1279, 463, 1268, 1279, 463, 463, 39, 1297, - /* 260 */ 1379, 1268, 1300, 1303, 1317, 1119, 1304, 1309, 1308, 1336, - /* 270 */ 276, 1563, 1391, 1432, 136, 136, 1570, 1279, 463, 463, - /* 280 */ 463, 463, 463, 1279, 463, 1440, 136, 452, 136, 276, - /* 290 */ 1534, 1535, 463, 517, 1391, 136, 1605, 1411, 2669, 2669, - /* 300 */ 2669, 2669, 2669, 2669, 2669, 2669, 2669, 170, 1310, 471, - /* 310 */ 15, 586, 686, 719, 379, 139, 601, 905, 1016, 1340, - /* 320 */ 1340, 1340, 1340, 1340, 1340, 1340, 1340, 1340, 173, 157, - /* 330 */ 178, 178, 203, 611, 832, 317, 6, 531, 571, 528, - /* 340 */ 280, 280, 690, 45, 688, 690, 690, 690, 1134, 975, - /* 350 */ 813, 1162, 1041, 1188, 1110, 1135, 1140, 1142, 494, 1248, - /* 360 */ 1250, 1054, 1211, 1212, 1155, 1218, 1219, 1220, 1139, 1124, - /* 370 */ 345, 580, 1225, 1227, 1229, 1233, 1235, 1246, 1012, 1258, - /* 380 */ 1092, 1173, 1053, 1273, 1240, 1301, 1306, 1307, 1318, 1319, - /* 390 */ 1334, 1121, 1254, 1290, 1118, 1327, 1658, 1659, 1660, 1619, - /* 400 */ 1664, 1630, 1460, 1632, 1633, 1634, 1465, 1684, 1641, 1650, - /* 410 */ 1480, 1688, 1492, 1699, 1665, 1701, 1680, 1703, 1670, 1514, - /* 420 */ 1520, 1526, 1719, 1721, 1724, 1543, 1547, 1729, 1731, 1686, - /* 430 */ 1734, 1736, 1738, 1697, 1741, 1745, 1746, 1755, 1756, 1757, - /* 440 */ 1767, 1768, 1604, 1725, 1761, 1607, 1763, 1764, 1765, 1769, - /* 450 */ 1771, 1772, 1779, 1781, 1782, 1783, 1784, 1787, 1788, 1790, - /* 460 */ 1791, 1792, 1753, 1796, 1797, 1800, 1802, 1803, 1804, 1785, - /* 470 */ 1805, 1806, 1808, 1672, 1809, 1812, 1793, 1717, 1798, 1723, - /* 480 */ 1821, 1766, 1794, 1822, 1770, 1823, 1774, 1825, 1827, 1807, - /* 490 */ 1811, 1801, 1789, 1833, 1799, 1838, 1810, 1835, 1813, 1815, - /* 500 */ 1855, 1860, 1861, 1824, 1687, 1865, 1867, 1868, 1814, 1877, - /* 510 */ 1880, 1846, 1834, 1844, 1884, 1850, 1840, 1847, 1889, 1858, - /* 520 */ 1854, 1864, 1904, 1871, 1862, 1870, 1911, 1912, 1917, 1918, - /* 530 */ 1816, 1819, 1879, 1893, 1919, 1885, 1887, 1892, 1894, 1886, - /* 540 */ 1888, 1896, 1899, 1906, 1900, 1933, 1915, 1938, 1920, 1901, - /* 550 */ 1939, 1927, 1932, 1953, 1934, 1954, 1936, 1955, 1946, 1956, - /* 560 */ 1940, 1942, 1943, 1872, 1881, 1979, 1817, 1883, 1945, 1984, - /* 570 */ 1828, 1964, 1820, 1826, 1990, 1992, 1829, 1818, 1991, 1951, - /* 580 */ 1747, 1902, 1897, 1903, 1923, 1916, 1924, 1921, 1930, 1977, - /* 590 */ 1980, 1935, 1937, 1950, 1952, 1957, 1989, 1987, 2004, 1959, - /* 600 */ 1994, 1830, 1960, 1961, 2051, 2013, 1848, 2025, 2028, 2030, - /* 610 */ 2031, 2032, 2033, 1969, 1971, 2026, 1831, 2035, 2029, 2075, - /* 620 */ 2077, 2080, 2081, 1985, 2047, 1789, 2050, 1999, 2001, 2002, - /* 630 */ 2005, 2015, 1948, 2016, 2113, 2078, 1965, 2020, 2011, 1789, - /* 640 */ 2086, 2091, 2039, 1890, 2042, 2139, 2120, 1931, 2044, 2045, - /* 650 */ 2048, 2049, 2053, 2054, 2098, 2056, 2057, 2102, 2058, 2129, - /* 660 */ 1944, 2060, 2055, 2061, 2126, 2130, 2064, 2067, 2134, 2070, - /* 670 */ 2071, 2138, 2082, 2084, 2149, 2088, 2085, 2154, 2099, 2079, - /* 680 */ 2087, 2089, 2092, 2176, 2093, 2100, 2157, 2103, 2171, 2107, - /* 690 */ 2157, 2157, 2186, 2151, 2150, 2182, 2183, 2184, 2185, 2187, - /* 700 */ 2188, 2189, 2190, 2192, 2195, 2160, 2140, 2191, 2199, 2201, - /* 710 */ 2202, 2210, 2203, 2204, 2206, 2172, 1886, 2207, 1888, 2211, - /* 720 */ 2218, 2220, 2221, 2236, 2224, 2260, 2228, 2225, 2233, 2274, - /* 730 */ 2241, 2231, 2242, 2280, 2247, 2235, 2245, 2285, 2252, 2240, - /* 740 */ 2250, 2290, 2257, 2261, 2295, 2275, 2277, 2278, 2279, 2281, - /* 750 */ 2283, + /* 130 */ 1047, 1047, 890, 594, 315, 145, 162, 171, 171, 171, + /* 140 */ 1013, 783, 783, 162, 372, 372, 372, 226, 274, 508, + /* 150 */ 87, 485, 87, 485, 485, 488, 703, 244, 244, 244, + /* 160 */ 244, 244, 244, 244, 244, 1624, 334, 473, 260, 100, + /* 170 */ 183, 25, 179, 828, 833, 326, 1021, 1116, 352, 1036, + /* 180 */ 916, 894, 934, 916, 1139, 978, 999, 1120, 1326, 1192, + /* 190 */ 1339, 1371, 1339, 1230, 1386, 1386, 1339, 1230, 1230, 1318, + /* 200 */ 1322, 1386, 1329, 1386, 1386, 1386, 1411, 1411, 1415, 226, + /* 210 */ 1416, 226, 1427, 1431, 226, 1427, 226, 226, 226, 1386, + /* 220 */ 226, 1423, 1423, 1411, 87, 87, 87, 87, 87, 87, + /* 230 */ 87, 87, 87, 87, 87, 1386, 1411, 485, 485, 485, + /* 240 */ 1306, 1417, 1415, 281, 1331, 1416, 281, 1386, 1371, 1371, + /* 250 */ 485, 1279, 1285, 485, 1279, 1285, 485, 485, 87, 1292, + /* 260 */ 1368, 1279, 1301, 1303, 1325, 1120, 1308, 1309, 1314, 1330, + /* 270 */ 372, 1566, 1386, 1427, 281, 281, 1571, 1285, 485, 485, + /* 280 */ 485, 485, 485, 1285, 485, 1435, 281, 488, 281, 372, + /* 290 */ 1517, 1538, 485, 703, 1386, 281, 1609, 1411, 2669, 2669, + /* 300 */ 2669, 2669, 2669, 2669, 2669, 2669, 2669, 170, 1310, 534, + /* 310 */ 687, 561, 580, 904, 379, 139, 374, 926, 621, 699, + /* 320 */ 699, 699, 699, 699, 699, 699, 699, 699, 173, 597, + /* 330 */ 27, 27, 439, 451, 823, 294, 419, 969, 856, 387, + /* 340 */ 791, 791, 710, 1066, 909, 710, 710, 710, 31, 1089, + /* 350 */ 1172, 1157, 588, 1168, 1101, 1102, 1106, 1107, 1073, 1196, + /* 360 */ 1242, 1039, 1156, 1188, 1163, 1202, 1211, 1212, 1080, 1077, + /* 370 */ 1138, 1151, 1219, 1225, 1226, 1227, 1228, 1229, 1247, 1231, + /* 380 */ 1209, 1241, 1190, 1233, 1240, 1235, 1246, 1248, 1250, 1252, + /* 390 */ 1258, 101, 1245, 1328, 1290, 1321, 1661, 1664, 1665, 1625, + /* 400 */ 1668, 1634, 1465, 1638, 1639, 1641, 1478, 1685, 1651, 1653, + /* 410 */ 1492, 1699, 1494, 1701, 1667, 1703, 1683, 1707, 1673, 1519, + /* 420 */ 1531, 1535, 1724, 1725, 1728, 1547, 1550, 1733, 1734, 1689, + /* 430 */ 1738, 1739, 1741, 1704, 1745, 1755, 1756, 1757, 1767, 1768, + /* 440 */ 1769, 1771, 1604, 1726, 1760, 1607, 1763, 1764, 1765, 1772, + /* 450 */ 1779, 1781, 1782, 1783, 1784, 1787, 1788, 1790, 1791, 1792, + /* 460 */ 1795, 1796, 1758, 1797, 1802, 1803, 1804, 1805, 1806, 1785, + /* 470 */ 1808, 1809, 1811, 1674, 1812, 1815, 1798, 1723, 1799, 1727, + /* 480 */ 1822, 1766, 1793, 1825, 1774, 1827, 1777, 1829, 1836, 1807, + /* 490 */ 1813, 1801, 1800, 1839, 1810, 1840, 1814, 1846, 1820, 1816, + /* 500 */ 1850, 1863, 1864, 1826, 1690, 1868, 1877, 1879, 1817, 1880, + /* 510 */ 1881, 1848, 1837, 1845, 1886, 1853, 1841, 1854, 1902, 1869, + /* 520 */ 1855, 1867, 1909, 1875, 1866, 1872, 1912, 1915, 1917, 1918, + /* 530 */ 1818, 1819, 1884, 1900, 1920, 1890, 1893, 1894, 1895, 1896, + /* 540 */ 1888, 1889, 1899, 1903, 1913, 1904, 1937, 1927, 1942, 1929, + /* 550 */ 1905, 1953, 1932, 1933, 1967, 1934, 1971, 1938, 1975, 1954, + /* 560 */ 1957, 1943, 1944, 1945, 1882, 1885, 1981, 1824, 1897, 1949, + /* 570 */ 1986, 1828, 1966, 1830, 1823, 1990, 1994, 1834, 1821, 1992, + /* 580 */ 1956, 1750, 1916, 1919, 1921, 1923, 1926, 1935, 1939, 1936, + /* 590 */ 1970, 1989, 1950, 1952, 1958, 1959, 1960, 2006, 1991, 2007, + /* 600 */ 1962, 2013, 1833, 1964, 1965, 2033, 2016, 1844, 2028, 2032, + /* 610 */ 2035, 2037, 2038, 2040, 1976, 1977, 2021, 1838, 2036, 2029, + /* 620 */ 2079, 2081, 2099, 2101, 1983, 2063, 1800, 2056, 2005, 2014, + /* 630 */ 2015, 2017, 2019, 1969, 2020, 2113, 2082, 1955, 2034, 2023, + /* 640 */ 1800, 2088, 2093, 2043, 1908, 2045, 2142, 2123, 1941, 2046, + /* 650 */ 2047, 2049, 2050, 2055, 2057, 2103, 2059, 2060, 2109, 2061, + /* 660 */ 2135, 1947, 2064, 2054, 2065, 2133, 2134, 2070, 2071, 2138, + /* 670 */ 2084, 2085, 2147, 2089, 2087, 2150, 2098, 2100, 2164, 2102, + /* 680 */ 2077, 2080, 2091, 2092, 2183, 2094, 2107, 2166, 2108, 2177, + /* 690 */ 2116, 2166, 2166, 2195, 2153, 2155, 2185, 2187, 2188, 2189, + /* 700 */ 2190, 2192, 2196, 2198, 2199, 2200, 2159, 2139, 2193, 2201, + /* 710 */ 2203, 2204, 2219, 2207, 2208, 2211, 2182, 1888, 2220, 1889, + /* 720 */ 2221, 2223, 2224, 2225, 2241, 2237, 2273, 2239, 2228, 2240, + /* 730 */ 2280, 2247, 2233, 2244, 2284, 2250, 2242, 2248, 2288, 2254, + /* 740 */ 2249, 2253, 2295, 2261, 2263, 2299, 2278, 2281, 2279, 2282, + /* 750 */ 2286, 2283, }; #define YY_REDUCE_COUNT (306) -#define YY_REDUCE_MIN (-435) +#define YY_REDUCE_MIN (-436) #define YY_REDUCE_MAX (2246) static const short yy_reduce_ofst[] = { /* 0 */ -258, -328, 50, 248, 613, 758, 807, 866, 889, 467, @@ -845,110 +845,110 @@ static const short yy_reduce_ofst[] = { /* 20 */ 1358, 1422, 643, 1454, 1479, 1544, 1528, 1593, 1610, 1627, /* 30 */ 1676, 1692, 1710, 1759, 1775, 1832, 1849, 1898, 1914, 1963, /* 40 */ 1988, 2012, 2083, 2105, 2132, 2181, 2197, 2246, -316, -302, - /* 50 */ -53, 247, -256, -6, 358, 695, 504, 556, -337, 210, - /* 60 */ 525, -435, -345, -29, 300, 302, -356, -352, -260, -60, - /* 70 */ -334, -333, -203, -348, -271, -179, -1, 318, 354, 414, - /* 80 */ 454, 458, 461, 633, -3, 645, 671, 64, -299, 435, - /* 90 */ 684, 209, 699, 291, 672, 372, 787, 450, -355, 790, - /* 100 */ 826, 430, 828, 415, 526, 472, 856, 121, -257, -54, - /* 110 */ -54, -275, -237, -163, -90, 142, 143, 381, 465, 473, - /* 120 */ 549, 550, 574, 602, 604, 647, 660, 668, 710, 736, - /* 130 */ 743, 754, -280, 311, -153, 18, 548, 311, 338, 508, - /* 140 */ 118, 608, 640, 131, 308, 711, 712, -36, 726, 487, - /* 150 */ 760, 780, 759, 795, 816, 839, 738, -358, 259, 264, - /* 160 */ 343, 348, 512, 617, 348, 687, 657, 656, 734, 689, - /* 170 */ 705, 853, 806, 927, 927, 951, 907, 958, 956, 942, - /* 180 */ 895, 895, 879, 895, 934, 896, 927, 961, 968, 990, - /* 190 */ 1008, 1010, 1020, 1028, 1075, 1076, 1032, 1035, 1036, 1073, - /* 200 */ 1077, 1088, 1083, 1093, 1094, 1097, 1106, 1107, 1044, 1105, - /* 210 */ 1072, 1109, 1116, 1066, 1125, 1132, 1128, 1129, 1130, 1137, - /* 220 */ 1136, 1143, 1145, 1156, 1127, 1133, 1141, 1148, 1149, 1152, - /* 230 */ 1153, 1154, 1157, 1158, 1159, 1160, 1163, 1115, 1117, 1123, - /* 240 */ 1091, 1099, 1103, 1164, 1122, 1146, 1166, 1181, 1150, 1151, - /* 250 */ 1165, 1084, 1169, 1168, 1089, 1170, 1177, 1178, 927, 1087, - /* 260 */ 1113, 1120, 1108, 1138, 1126, 1167, 1102, 1112, 1144, 895, - /* 270 */ 1201, 1171, 1247, 1249, 1251, 1260, 1214, 1199, 1216, 1224, - /* 280 */ 1228, 1231, 1239, 1236, 1253, 1223, 1274, 1271, 1289, 1261, - /* 290 */ 1204, 1269, 1263, 1284, 1305, 1299, 1311, 1313, 1252, 1244, - /* 300 */ 1256, 1257, 1295, 1315, 1316, 1312, 1326, + /* 50 */ 157, 247, -256, 257, 375, 1031, 362, 391, -359, -345, + /* 60 */ -339, -436, -75, 402, -380, -178, -354, -195, 318, 332, + /* 70 */ -379, -145, 88, -282, -218, -44, 232, 116, 135, 337, + /* 80 */ 366, 388, 392, 454, -333, 542, 642, 91, -26, 645, + /* 90 */ 671, 241, 672, 236, 715, 377, 774, 427, 405, 781, + /* 100 */ 784, 535, 786, 446, 608, 572, 788, 8, -335, -19, + /* 110 */ -19, -251, -234, -163, -65, 72, 369, 461, 466, 514, + /* 120 */ 518, 547, 571, 574, 612, 706, 707, 714, 740, 754, + /* 130 */ 755, 757, 252, 23, -240, 300, 596, 23, 279, 436, + /* 140 */ 13, 182, 664, 625, 435, 768, 776, 256, 787, -417, + /* 150 */ 214, 780, -305, 795, 821, 792, 682, -364, 423, 507, + /* 160 */ 515, 533, 644, 659, 533, 727, 878, 918, 865, 793, + /* 170 */ 809, 950, 886, 981, 981, 976, 955, 1012, 979, 965, + /* 180 */ 911, 911, 900, 911, 921, 923, 981, 962, 968, 980, + /* 190 */ 1004, 1005, 1009, 1022, 1068, 1069, 1030, 1028, 1033, 1070, + /* 200 */ 1072, 1079, 1075, 1085, 1086, 1091, 1099, 1100, 1034, 1094, + /* 210 */ 1061, 1104, 1110, 1055, 1109, 1118, 1111, 1125, 1128, 1124, + /* 220 */ 1129, 1135, 1143, 1148, 1123, 1130, 1134, 1136, 1137, 1140, + /* 230 */ 1141, 1142, 1145, 1149, 1152, 1150, 1160, 1122, 1144, 1146, + /* 240 */ 1105, 1113, 1117, 1176, 1133, 1147, 1181, 1186, 1153, 1154, + /* 250 */ 1159, 1087, 1162, 1178, 1112, 1164, 1184, 1185, 981, 1114, + /* 260 */ 1119, 1115, 1121, 1127, 1126, 1169, 1103, 1166, 1165, 911, + /* 270 */ 1213, 1173, 1251, 1249, 1260, 1261, 1204, 1201, 1224, 1239, + /* 280 */ 1254, 1255, 1256, 1215, 1257, 1221, 1265, 1276, 1269, 1263, + /* 290 */ 1205, 1272, 1264, 1288, 1305, 1307, 1312, 1315, 1259, 1262, + /* 300 */ 1266, 1267, 1291, 1293, 1295, 1311, 1327, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 10 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 20 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 30 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 40 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 50 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 60 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 70 */ 1687, 1687, 1687, 1953, 1687, 1687, 1687, 1687, 1687, 1687, - /* 80 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1766, 1687, 1687, - /* 90 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 100 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1764, 1946, 2162, - /* 110 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 120 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 130 */ 1687, 1687, 1687, 2174, 1687, 1687, 1687, 2174, 2174, 2174, - /* 140 */ 1764, 2134, 2134, 1687, 1687, 1687, 1687, 1766, 2007, 1687, - /* 150 */ 1687, 1687, 1687, 1687, 1687, 1881, 1687, 1687, 1687, 1687, - /* 160 */ 1687, 1905, 1687, 1687, 1687, 1999, 1687, 1687, 2199, 2255, - /* 170 */ 1687, 1687, 2202, 1687, 1687, 1687, 1958, 1687, 1834, 2189, - /* 180 */ 2166, 2180, 2239, 2167, 2164, 2183, 1687, 2193, 1687, 1992, - /* 190 */ 1951, 1687, 1951, 1948, 1687, 1687, 1951, 1948, 1948, 1823, - /* 200 */ 1819, 1687, 1817, 1687, 1687, 1687, 1687, 1687, 1687, 1766, - /* 210 */ 1687, 1766, 1687, 1687, 1766, 1687, 1766, 1766, 1766, 1687, - /* 220 */ 1766, 1744, 1744, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 230 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 240 */ 2019, 2005, 1687, 1764, 2001, 1687, 1764, 1687, 1687, 1687, - /* 250 */ 1687, 2210, 2208, 1687, 2210, 2208, 1687, 1687, 1687, 2224, - /* 260 */ 2220, 2210, 2228, 2226, 2195, 2193, 2258, 2245, 2241, 2180, - /* 270 */ 1687, 1687, 1687, 1687, 1764, 1764, 1687, 2208, 1687, 1687, - /* 280 */ 1687, 1687, 1687, 2208, 1687, 1687, 1764, 1687, 1764, 1687, - /* 290 */ 1687, 1850, 1687, 1687, 1687, 1764, 1719, 1687, 1994, 2010, - /* 300 */ 1976, 1976, 1884, 1884, 1884, 1767, 1692, 1687, 1687, 1687, - /* 310 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2223, - /* 320 */ 2222, 2089, 1687, 2138, 2137, 2136, 2127, 2088, 1846, 1687, - /* 330 */ 2087, 2086, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 340 */ 1967, 1966, 2080, 1687, 1687, 2081, 2079, 2078, 1687, 1687, - /* 350 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 360 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2242, - /* 370 */ 2246, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2163, 1687, - /* 380 */ 1687, 1687, 1687, 1687, 2062, 1687, 1687, 1687, 1687, 1687, - /* 390 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 400 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 410 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 420 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 430 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 440 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 450 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 460 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 470 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 480 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 490 */ 1687, 1724, 2067, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 500 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 510 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 520 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 530 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1805, - /* 540 */ 1804, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 550 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 560 */ 1687, 1687, 1687, 2071, 1687, 1687, 1687, 1687, 1687, 1687, - /* 570 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2238, 2196, - /* 580 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 590 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2062, 1687, - /* 600 */ 2221, 1687, 1687, 2236, 1687, 2240, 1687, 1687, 1687, 1687, - /* 610 */ 1687, 1687, 1687, 2173, 2169, 1687, 1687, 2165, 1687, 1687, - /* 620 */ 1687, 1687, 1687, 1687, 1687, 2070, 1687, 1687, 1687, 1687, - /* 630 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2061, - /* 640 */ 1687, 2124, 1687, 1687, 1687, 2158, 1687, 1687, 2109, 1687, - /* 650 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2071, 1687, - /* 660 */ 2074, 1687, 1687, 1687, 1687, 1687, 1878, 1687, 1687, 1687, - /* 670 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1863, - /* 680 */ 1861, 1860, 1859, 1687, 1856, 1687, 1891, 1687, 1687, 1687, - /* 690 */ 1887, 1886, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 700 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1785, 1687, 1687, - /* 710 */ 1687, 1687, 1687, 1687, 1687, 1687, 1777, 1687, 1776, 1687, - /* 720 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 730 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 740 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, - /* 750 */ 1687, + /* 0 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 10 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 20 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 30 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 40 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 50 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 60 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 70 */ 1690, 1690, 1690, 1957, 1690, 1690, 1690, 1690, 1690, 1690, + /* 80 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1769, 1690, 1690, + /* 90 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 100 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1767, 1950, 2166, + /* 110 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 120 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 130 */ 1690, 1690, 1690, 2178, 1690, 1690, 1690, 2178, 2178, 2178, + /* 140 */ 1767, 2138, 2138, 1690, 1690, 1690, 1690, 1769, 2011, 1690, + /* 150 */ 1690, 1690, 1690, 1690, 1690, 1885, 1690, 1690, 1690, 1690, + /* 160 */ 1690, 1909, 1690, 1690, 1690, 2003, 1690, 1690, 2203, 2259, + /* 170 */ 1690, 1690, 2206, 1690, 1690, 1690, 1962, 1690, 1838, 2193, + /* 180 */ 2170, 2184, 2243, 2171, 2168, 2187, 1690, 2197, 1690, 1996, + /* 190 */ 1955, 1690, 1955, 1952, 1690, 1690, 1955, 1952, 1952, 1827, + /* 200 */ 1823, 1690, 1821, 1690, 1690, 1690, 1690, 1690, 1690, 1769, + /* 210 */ 1690, 1769, 1690, 1690, 1769, 1690, 1769, 1769, 1769, 1690, + /* 220 */ 1769, 1747, 1747, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 230 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 240 */ 2023, 2009, 1690, 1767, 2005, 1690, 1767, 1690, 1690, 1690, + /* 250 */ 1690, 2214, 2212, 1690, 2214, 2212, 1690, 1690, 1690, 2228, + /* 260 */ 2224, 2214, 2232, 2230, 2199, 2197, 2262, 2249, 2245, 2184, + /* 270 */ 1690, 1690, 1690, 1690, 1767, 1767, 1690, 2212, 1690, 1690, + /* 280 */ 1690, 1690, 1690, 2212, 1690, 1690, 1767, 1690, 1767, 1690, + /* 290 */ 1690, 1854, 1690, 1690, 1690, 1767, 1722, 1690, 1998, 2014, + /* 300 */ 1980, 1980, 1888, 1888, 1888, 1770, 1695, 1690, 1690, 1690, + /* 310 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 2227, + /* 320 */ 2226, 2093, 1690, 2142, 2141, 2140, 2131, 2092, 1850, 1690, + /* 330 */ 2091, 2090, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 340 */ 1971, 1970, 2084, 1690, 1690, 2085, 2083, 2082, 1690, 1690, + /* 350 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 360 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 2246, + /* 370 */ 2250, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 2167, 1690, + /* 380 */ 1690, 1690, 1690, 1690, 2066, 1690, 1690, 1690, 1690, 1690, + /* 390 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 400 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 410 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 420 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 430 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 440 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 450 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 460 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 470 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 480 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 490 */ 1690, 1727, 2071, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 500 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 510 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 520 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 530 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 540 */ 1808, 1807, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 550 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 560 */ 1690, 1690, 1690, 1690, 2075, 1690, 1690, 1690, 1690, 1690, + /* 570 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 2242, + /* 580 */ 2200, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 590 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 2066, + /* 600 */ 1690, 2225, 1690, 1690, 2240, 1690, 2244, 1690, 1690, 1690, + /* 610 */ 1690, 1690, 1690, 1690, 2177, 2173, 1690, 1690, 2169, 1690, + /* 620 */ 1690, 1690, 1690, 1690, 1690, 1690, 2074, 1690, 1690, 1690, + /* 630 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 640 */ 2065, 1690, 2128, 1690, 1690, 1690, 2162, 1690, 1690, 2113, + /* 650 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 2075, + /* 660 */ 1690, 2078, 1690, 1690, 1690, 1690, 1690, 1882, 1690, 1690, + /* 670 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 680 */ 1867, 1865, 1864, 1863, 1690, 1860, 1690, 1895, 1690, 1690, + /* 690 */ 1690, 1891, 1890, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 700 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1788, 1690, + /* 710 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1780, 1690, 1779, + /* 720 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 730 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 740 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, + /* 750 */ 1690, 1690, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1981,457 +1981,458 @@ static const char *const yyRuleName[] = { /* 117 */ "alter_db_option ::= REPLICA NK_INTEGER", /* 118 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", /* 119 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", - /* 120 */ "integer_list ::= NK_INTEGER", - /* 121 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", - /* 122 */ "variable_list ::= NK_VARIABLE", - /* 123 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", - /* 124 */ "retention_list ::= retention", - /* 125 */ "retention_list ::= retention_list NK_COMMA retention", - /* 126 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", - /* 127 */ "speed_opt ::=", - /* 128 */ "speed_opt ::= MAX_SPEED NK_INTEGER", - /* 129 */ "start_opt ::=", - /* 130 */ "start_opt ::= START WITH NK_INTEGER", - /* 131 */ "start_opt ::= START WITH NK_STRING", - /* 132 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", - /* 133 */ "end_opt ::=", - /* 134 */ "end_opt ::= END WITH NK_INTEGER", - /* 135 */ "end_opt ::= END WITH NK_STRING", - /* 136 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", - /* 137 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", - /* 138 */ "cmd ::= CREATE TABLE multi_create_clause", - /* 139 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", - /* 140 */ "cmd ::= DROP TABLE multi_drop_clause", - /* 141 */ "cmd ::= DROP STABLE exists_opt full_table_name", - /* 142 */ "cmd ::= ALTER TABLE alter_table_clause", - /* 143 */ "cmd ::= ALTER STABLE alter_table_clause", - /* 144 */ "alter_table_clause ::= full_table_name alter_table_options", - /* 145 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name", - /* 146 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", - /* 147 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", - /* 148 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", - /* 149 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", - /* 150 */ "alter_table_clause ::= full_table_name DROP TAG column_name", - /* 151 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", - /* 152 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", - /* 153 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal", - /* 154 */ "multi_create_clause ::= create_subtable_clause", - /* 155 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", - /* 156 */ "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", - /* 157 */ "multi_drop_clause ::= drop_table_clause", - /* 158 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", - /* 159 */ "drop_table_clause ::= exists_opt full_table_name", - /* 160 */ "specific_cols_opt ::=", - /* 161 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", - /* 162 */ "full_table_name ::= table_name", - /* 163 */ "full_table_name ::= db_name NK_DOT table_name", - /* 164 */ "column_def_list ::= column_def", - /* 165 */ "column_def_list ::= column_def_list NK_COMMA column_def", - /* 166 */ "column_def ::= column_name type_name", - /* 167 */ "column_def ::= column_name type_name COMMENT NK_STRING", - /* 168 */ "type_name ::= BOOL", - /* 169 */ "type_name ::= TINYINT", - /* 170 */ "type_name ::= SMALLINT", - /* 171 */ "type_name ::= INT", - /* 172 */ "type_name ::= INTEGER", - /* 173 */ "type_name ::= BIGINT", - /* 174 */ "type_name ::= FLOAT", - /* 175 */ "type_name ::= DOUBLE", - /* 176 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", - /* 177 */ "type_name ::= TIMESTAMP", - /* 178 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", - /* 179 */ "type_name ::= TINYINT UNSIGNED", - /* 180 */ "type_name ::= SMALLINT UNSIGNED", - /* 181 */ "type_name ::= INT UNSIGNED", - /* 182 */ "type_name ::= BIGINT UNSIGNED", - /* 183 */ "type_name ::= JSON", - /* 184 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", - /* 185 */ "type_name ::= MEDIUMBLOB", - /* 186 */ "type_name ::= BLOB", - /* 187 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", - /* 188 */ "type_name ::= DECIMAL", - /* 189 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", - /* 190 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 191 */ "tags_def_opt ::=", - /* 192 */ "tags_def_opt ::= tags_def", - /* 193 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", - /* 194 */ "table_options ::=", - /* 195 */ "table_options ::= table_options COMMENT NK_STRING", - /* 196 */ "table_options ::= table_options MAX_DELAY duration_list", - /* 197 */ "table_options ::= table_options WATERMARK duration_list", - /* 198 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", - /* 199 */ "table_options ::= table_options TTL NK_INTEGER", - /* 200 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", - /* 201 */ "table_options ::= table_options DELETE_MARK duration_list", - /* 202 */ "alter_table_options ::= alter_table_option", - /* 203 */ "alter_table_options ::= alter_table_options alter_table_option", - /* 204 */ "alter_table_option ::= COMMENT NK_STRING", - /* 205 */ "alter_table_option ::= TTL NK_INTEGER", - /* 206 */ "duration_list ::= duration_literal", - /* 207 */ "duration_list ::= duration_list NK_COMMA duration_literal", - /* 208 */ "rollup_func_list ::= rollup_func_name", - /* 209 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", - /* 210 */ "rollup_func_name ::= function_name", - /* 211 */ "rollup_func_name ::= FIRST", - /* 212 */ "rollup_func_name ::= LAST", - /* 213 */ "col_name_list ::= col_name", - /* 214 */ "col_name_list ::= col_name_list NK_COMMA col_name", - /* 215 */ "col_name ::= column_name", - /* 216 */ "cmd ::= SHOW DNODES", - /* 217 */ "cmd ::= SHOW USERS", - /* 218 */ "cmd ::= SHOW USER PRIVILEGES", - /* 219 */ "cmd ::= SHOW DATABASES", - /* 220 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt", - /* 221 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", - /* 222 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", - /* 223 */ "cmd ::= SHOW MNODES", - /* 224 */ "cmd ::= SHOW QNODES", - /* 225 */ "cmd ::= SHOW FUNCTIONS", - /* 226 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", - /* 227 */ "cmd ::= SHOW STREAMS", - /* 228 */ "cmd ::= SHOW ACCOUNTS", - /* 229 */ "cmd ::= SHOW APPS", - /* 230 */ "cmd ::= SHOW CONNECTIONS", - /* 231 */ "cmd ::= SHOW LICENCES", - /* 232 */ "cmd ::= SHOW GRANTS", - /* 233 */ "cmd ::= SHOW CREATE DATABASE db_name", - /* 234 */ "cmd ::= SHOW CREATE TABLE full_table_name", - /* 235 */ "cmd ::= SHOW CREATE STABLE full_table_name", - /* 236 */ "cmd ::= SHOW QUERIES", - /* 237 */ "cmd ::= SHOW SCORES", - /* 238 */ "cmd ::= SHOW TOPICS", - /* 239 */ "cmd ::= SHOW VARIABLES", - /* 240 */ "cmd ::= SHOW CLUSTER VARIABLES", - /* 241 */ "cmd ::= SHOW LOCAL VARIABLES", - /* 242 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", - /* 243 */ "cmd ::= SHOW BNODES", - /* 244 */ "cmd ::= SHOW SNODES", - /* 245 */ "cmd ::= SHOW CLUSTER", - /* 246 */ "cmd ::= SHOW TRANSACTIONS", - /* 247 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", - /* 248 */ "cmd ::= SHOW CONSUMERS", - /* 249 */ "cmd ::= SHOW SUBSCRIPTIONS", - /* 250 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", - /* 251 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", - /* 252 */ "cmd ::= SHOW VNODES NK_INTEGER", - /* 253 */ "cmd ::= SHOW VNODES NK_STRING", - /* 254 */ "cmd ::= SHOW db_name_cond_opt ALIVE", - /* 255 */ "cmd ::= SHOW CLUSTER ALIVE", - /* 256 */ "db_name_cond_opt ::=", - /* 257 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 258 */ "like_pattern_opt ::=", - /* 259 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 260 */ "table_name_cond ::= table_name", - /* 261 */ "from_db_opt ::=", - /* 262 */ "from_db_opt ::= FROM db_name", - /* 263 */ "tag_list_opt ::=", - /* 264 */ "tag_list_opt ::= tag_item", - /* 265 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", - /* 266 */ "tag_item ::= TBNAME", - /* 267 */ "tag_item ::= QTAGS", - /* 268 */ "tag_item ::= column_name", - /* 269 */ "tag_item ::= column_name column_alias", - /* 270 */ "tag_item ::= column_name AS column_alias", - /* 271 */ "cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options", - /* 272 */ "cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP", - /* 273 */ "cmd ::= DROP INDEX exists_opt full_index_name", - /* 274 */ "full_index_name ::= index_name", - /* 275 */ "full_index_name ::= db_name NK_DOT index_name", - /* 276 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", - /* 277 */ "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", - /* 278 */ "func_list ::= func", - /* 279 */ "func_list ::= func_list NK_COMMA func", - /* 280 */ "func ::= sma_func_name NK_LP expression_list NK_RP", - /* 281 */ "sma_func_name ::= function_name", - /* 282 */ "sma_func_name ::= COUNT", - /* 283 */ "sma_func_name ::= FIRST", - /* 284 */ "sma_func_name ::= LAST", - /* 285 */ "sma_func_name ::= LAST_ROW", - /* 286 */ "sma_stream_opt ::=", - /* 287 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", - /* 288 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", - /* 289 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", - /* 290 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", - /* 291 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", - /* 292 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name", - /* 293 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", - /* 294 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name", - /* 295 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 296 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 297 */ "cmd ::= DESC full_table_name", - /* 298 */ "cmd ::= DESCRIBE full_table_name", - /* 299 */ "cmd ::= RESET QUERY CACHE", - /* 300 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", - /* 301 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", - /* 302 */ "analyze_opt ::=", - /* 303 */ "analyze_opt ::= ANALYZE", - /* 304 */ "explain_options ::=", - /* 305 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 306 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 307 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", - /* 308 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 309 */ "agg_func_opt ::=", - /* 310 */ "agg_func_opt ::= AGGREGATE", - /* 311 */ "bufsize_opt ::=", - /* 312 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 313 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery", - /* 314 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 315 */ "col_list_opt ::=", - /* 316 */ "col_list_opt ::= NK_LP col_name_list NK_RP", - /* 317 */ "tag_def_or_ref_opt ::=", - /* 318 */ "tag_def_or_ref_opt ::= tags_def", - /* 319 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP", - /* 320 */ "stream_options ::=", - /* 321 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 322 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 323 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 324 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 325 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", - /* 326 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", - /* 327 */ "stream_options ::= stream_options DELETE_MARK duration_literal", - /* 328 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", - /* 329 */ "subtable_opt ::=", - /* 330 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 331 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 332 */ "cmd ::= KILL QUERY NK_STRING", - /* 333 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 334 */ "cmd ::= BALANCE VGROUP", - /* 335 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 336 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 337 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 338 */ "dnode_list ::= DNODE NK_INTEGER", - /* 339 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 340 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 341 */ "cmd ::= query_or_subquery", - /* 342 */ "cmd ::= insert_query", - /* 343 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 344 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", - /* 345 */ "literal ::= NK_INTEGER", - /* 346 */ "literal ::= NK_FLOAT", - /* 347 */ "literal ::= NK_STRING", - /* 348 */ "literal ::= NK_BOOL", - /* 349 */ "literal ::= TIMESTAMP NK_STRING", - /* 350 */ "literal ::= duration_literal", - /* 351 */ "literal ::= NULL", - /* 352 */ "literal ::= NK_QUESTION", - /* 353 */ "duration_literal ::= NK_VARIABLE", - /* 354 */ "signed ::= NK_INTEGER", - /* 355 */ "signed ::= NK_PLUS NK_INTEGER", - /* 356 */ "signed ::= NK_MINUS NK_INTEGER", - /* 357 */ "signed ::= NK_FLOAT", - /* 358 */ "signed ::= NK_PLUS NK_FLOAT", - /* 359 */ "signed ::= NK_MINUS NK_FLOAT", - /* 360 */ "signed_literal ::= signed", - /* 361 */ "signed_literal ::= NK_STRING", - /* 362 */ "signed_literal ::= NK_BOOL", - /* 363 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 364 */ "signed_literal ::= duration_literal", - /* 365 */ "signed_literal ::= NULL", - /* 366 */ "signed_literal ::= literal_func", - /* 367 */ "signed_literal ::= NK_QUESTION", - /* 368 */ "literal_list ::= signed_literal", - /* 369 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 370 */ "db_name ::= NK_ID", - /* 371 */ "table_name ::= NK_ID", - /* 372 */ "column_name ::= NK_ID", - /* 373 */ "function_name ::= NK_ID", - /* 374 */ "table_alias ::= NK_ID", - /* 375 */ "column_alias ::= NK_ID", - /* 376 */ "user_name ::= NK_ID", - /* 377 */ "topic_name ::= NK_ID", - /* 378 */ "stream_name ::= NK_ID", - /* 379 */ "cgroup_name ::= NK_ID", - /* 380 */ "index_name ::= NK_ID", - /* 381 */ "expr_or_subquery ::= expression", - /* 382 */ "expression ::= literal", - /* 383 */ "expression ::= pseudo_column", - /* 384 */ "expression ::= column_reference", - /* 385 */ "expression ::= function_expression", - /* 386 */ "expression ::= case_when_expression", - /* 387 */ "expression ::= NK_LP expression NK_RP", - /* 388 */ "expression ::= NK_PLUS expr_or_subquery", - /* 389 */ "expression ::= NK_MINUS expr_or_subquery", - /* 390 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 391 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 392 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 393 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 394 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 395 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 396 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 397 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 398 */ "expression_list ::= expr_or_subquery", - /* 399 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 400 */ "column_reference ::= column_name", - /* 401 */ "column_reference ::= table_name NK_DOT column_name", - /* 402 */ "pseudo_column ::= ROWTS", - /* 403 */ "pseudo_column ::= TBNAME", - /* 404 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 405 */ "pseudo_column ::= QSTART", - /* 406 */ "pseudo_column ::= QEND", - /* 407 */ "pseudo_column ::= QDURATION", - /* 408 */ "pseudo_column ::= WSTART", - /* 409 */ "pseudo_column ::= WEND", - /* 410 */ "pseudo_column ::= WDURATION", - /* 411 */ "pseudo_column ::= IROWTS", - /* 412 */ "pseudo_column ::= ISFILLED", - /* 413 */ "pseudo_column ::= QTAGS", - /* 414 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 415 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 416 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 417 */ "function_expression ::= literal_func", - /* 418 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 419 */ "literal_func ::= NOW", - /* 420 */ "noarg_func ::= NOW", - /* 421 */ "noarg_func ::= TODAY", - /* 422 */ "noarg_func ::= TIMEZONE", - /* 423 */ "noarg_func ::= DATABASE", - /* 424 */ "noarg_func ::= CLIENT_VERSION", - /* 425 */ "noarg_func ::= SERVER_VERSION", - /* 426 */ "noarg_func ::= SERVER_STATUS", - /* 427 */ "noarg_func ::= CURRENT_USER", - /* 428 */ "noarg_func ::= USER", - /* 429 */ "star_func ::= COUNT", - /* 430 */ "star_func ::= FIRST", - /* 431 */ "star_func ::= LAST", - /* 432 */ "star_func ::= LAST_ROW", - /* 433 */ "star_func_para_list ::= NK_STAR", - /* 434 */ "star_func_para_list ::= other_para_list", - /* 435 */ "other_para_list ::= star_func_para", - /* 436 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 437 */ "star_func_para ::= expr_or_subquery", - /* 438 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 439 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 440 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 441 */ "when_then_list ::= when_then_expr", - /* 442 */ "when_then_list ::= when_then_list when_then_expr", - /* 443 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 444 */ "case_when_else_opt ::=", - /* 445 */ "case_when_else_opt ::= ELSE common_expression", - /* 446 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 447 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 448 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 449 */ "predicate ::= expr_or_subquery IS NULL", - /* 450 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 451 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 452 */ "compare_op ::= NK_LT", - /* 453 */ "compare_op ::= NK_GT", - /* 454 */ "compare_op ::= NK_LE", - /* 455 */ "compare_op ::= NK_GE", - /* 456 */ "compare_op ::= NK_NE", - /* 457 */ "compare_op ::= NK_EQ", - /* 458 */ "compare_op ::= LIKE", - /* 459 */ "compare_op ::= NOT LIKE", - /* 460 */ "compare_op ::= MATCH", - /* 461 */ "compare_op ::= NMATCH", - /* 462 */ "compare_op ::= CONTAINS", - /* 463 */ "in_op ::= IN", - /* 464 */ "in_op ::= NOT IN", - /* 465 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 466 */ "boolean_value_expression ::= boolean_primary", - /* 467 */ "boolean_value_expression ::= NOT boolean_primary", - /* 468 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 469 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 470 */ "boolean_primary ::= predicate", - /* 471 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 472 */ "common_expression ::= expr_or_subquery", - /* 473 */ "common_expression ::= boolean_value_expression", - /* 474 */ "from_clause_opt ::=", - /* 475 */ "from_clause_opt ::= FROM table_reference_list", - /* 476 */ "table_reference_list ::= table_reference", - /* 477 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 478 */ "table_reference ::= table_primary", - /* 479 */ "table_reference ::= joined_table", - /* 480 */ "table_primary ::= table_name alias_opt", - /* 481 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 482 */ "table_primary ::= subquery alias_opt", - /* 483 */ "table_primary ::= parenthesized_joined_table", - /* 484 */ "alias_opt ::=", - /* 485 */ "alias_opt ::= table_alias", - /* 486 */ "alias_opt ::= AS table_alias", - /* 487 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 488 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 489 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 490 */ "join_type ::=", - /* 491 */ "join_type ::= INNER", - /* 492 */ "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", - /* 493 */ "set_quantifier_opt ::=", - /* 494 */ "set_quantifier_opt ::= DISTINCT", - /* 495 */ "set_quantifier_opt ::= ALL", - /* 496 */ "select_list ::= select_item", - /* 497 */ "select_list ::= select_list NK_COMMA select_item", - /* 498 */ "select_item ::= NK_STAR", - /* 499 */ "select_item ::= common_expression", - /* 500 */ "select_item ::= common_expression column_alias", - /* 501 */ "select_item ::= common_expression AS column_alias", - /* 502 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 503 */ "where_clause_opt ::=", - /* 504 */ "where_clause_opt ::= WHERE search_condition", - /* 505 */ "partition_by_clause_opt ::=", - /* 506 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 507 */ "partition_list ::= partition_item", - /* 508 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 509 */ "partition_item ::= expr_or_subquery", - /* 510 */ "partition_item ::= expr_or_subquery column_alias", - /* 511 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 512 */ "twindow_clause_opt ::=", - /* 513 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 514 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 515 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 516 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 517 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 518 */ "sliding_opt ::=", - /* 519 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 520 */ "fill_opt ::=", - /* 521 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 522 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 523 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP", - /* 524 */ "fill_mode ::= NONE", - /* 525 */ "fill_mode ::= PREV", - /* 526 */ "fill_mode ::= NULL", - /* 527 */ "fill_mode ::= NULL_F", - /* 528 */ "fill_mode ::= LINEAR", - /* 529 */ "fill_mode ::= NEXT", - /* 530 */ "group_by_clause_opt ::=", - /* 531 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 532 */ "group_by_list ::= expr_or_subquery", - /* 533 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 534 */ "having_clause_opt ::=", - /* 535 */ "having_clause_opt ::= HAVING search_condition", - /* 536 */ "range_opt ::=", - /* 537 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 538 */ "every_opt ::=", - /* 539 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 540 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 541 */ "query_simple ::= query_specification", - /* 542 */ "query_simple ::= union_query_expression", - /* 543 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 544 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 545 */ "query_simple_or_subquery ::= query_simple", - /* 546 */ "query_simple_or_subquery ::= subquery", - /* 547 */ "query_or_subquery ::= query_expression", - /* 548 */ "query_or_subquery ::= subquery", - /* 549 */ "order_by_clause_opt ::=", - /* 550 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 551 */ "slimit_clause_opt ::=", - /* 552 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 553 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 554 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 555 */ "limit_clause_opt ::=", - /* 556 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 557 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 558 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 559 */ "subquery ::= NK_LP query_expression NK_RP", - /* 560 */ "subquery ::= NK_LP subquery NK_RP", - /* 561 */ "search_condition ::= common_expression", - /* 562 */ "sort_specification_list ::= sort_specification", - /* 563 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 564 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 565 */ "ordering_specification_opt ::=", - /* 566 */ "ordering_specification_opt ::= ASC", - /* 567 */ "ordering_specification_opt ::= DESC", - /* 568 */ "null_ordering_opt ::=", - /* 569 */ "null_ordering_opt ::= NULLS FIRST", - /* 570 */ "null_ordering_opt ::= NULLS LAST", + /* 120 */ "alter_db_option ::= MINROWS NK_INTEGER", + /* 121 */ "integer_list ::= NK_INTEGER", + /* 122 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", + /* 123 */ "variable_list ::= NK_VARIABLE", + /* 124 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", + /* 125 */ "retention_list ::= retention", + /* 126 */ "retention_list ::= retention_list NK_COMMA retention", + /* 127 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", + /* 128 */ "speed_opt ::=", + /* 129 */ "speed_opt ::= MAX_SPEED NK_INTEGER", + /* 130 */ "start_opt ::=", + /* 131 */ "start_opt ::= START WITH NK_INTEGER", + /* 132 */ "start_opt ::= START WITH NK_STRING", + /* 133 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", + /* 134 */ "end_opt ::=", + /* 135 */ "end_opt ::= END WITH NK_INTEGER", + /* 136 */ "end_opt ::= END WITH NK_STRING", + /* 137 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", + /* 138 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", + /* 139 */ "cmd ::= CREATE TABLE multi_create_clause", + /* 140 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", + /* 141 */ "cmd ::= DROP TABLE multi_drop_clause", + /* 142 */ "cmd ::= DROP STABLE exists_opt full_table_name", + /* 143 */ "cmd ::= ALTER TABLE alter_table_clause", + /* 144 */ "cmd ::= ALTER STABLE alter_table_clause", + /* 145 */ "alter_table_clause ::= full_table_name alter_table_options", + /* 146 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name", + /* 147 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", + /* 148 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", + /* 149 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", + /* 150 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", + /* 151 */ "alter_table_clause ::= full_table_name DROP TAG column_name", + /* 152 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", + /* 153 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", + /* 154 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal", + /* 155 */ "multi_create_clause ::= create_subtable_clause", + /* 156 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", + /* 157 */ "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", + /* 158 */ "multi_drop_clause ::= drop_table_clause", + /* 159 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", + /* 160 */ "drop_table_clause ::= exists_opt full_table_name", + /* 161 */ "specific_cols_opt ::=", + /* 162 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", + /* 163 */ "full_table_name ::= table_name", + /* 164 */ "full_table_name ::= db_name NK_DOT table_name", + /* 165 */ "column_def_list ::= column_def", + /* 166 */ "column_def_list ::= column_def_list NK_COMMA column_def", + /* 167 */ "column_def ::= column_name type_name", + /* 168 */ "column_def ::= column_name type_name COMMENT NK_STRING", + /* 169 */ "type_name ::= BOOL", + /* 170 */ "type_name ::= TINYINT", + /* 171 */ "type_name ::= SMALLINT", + /* 172 */ "type_name ::= INT", + /* 173 */ "type_name ::= INTEGER", + /* 174 */ "type_name ::= BIGINT", + /* 175 */ "type_name ::= FLOAT", + /* 176 */ "type_name ::= DOUBLE", + /* 177 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", + /* 178 */ "type_name ::= TIMESTAMP", + /* 179 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", + /* 180 */ "type_name ::= TINYINT UNSIGNED", + /* 181 */ "type_name ::= SMALLINT UNSIGNED", + /* 182 */ "type_name ::= INT UNSIGNED", + /* 183 */ "type_name ::= BIGINT UNSIGNED", + /* 184 */ "type_name ::= JSON", + /* 185 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", + /* 186 */ "type_name ::= MEDIUMBLOB", + /* 187 */ "type_name ::= BLOB", + /* 188 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", + /* 189 */ "type_name ::= DECIMAL", + /* 190 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", + /* 191 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 192 */ "tags_def_opt ::=", + /* 193 */ "tags_def_opt ::= tags_def", + /* 194 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", + /* 195 */ "table_options ::=", + /* 196 */ "table_options ::= table_options COMMENT NK_STRING", + /* 197 */ "table_options ::= table_options MAX_DELAY duration_list", + /* 198 */ "table_options ::= table_options WATERMARK duration_list", + /* 199 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", + /* 200 */ "table_options ::= table_options TTL NK_INTEGER", + /* 201 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", + /* 202 */ "table_options ::= table_options DELETE_MARK duration_list", + /* 203 */ "alter_table_options ::= alter_table_option", + /* 204 */ "alter_table_options ::= alter_table_options alter_table_option", + /* 205 */ "alter_table_option ::= COMMENT NK_STRING", + /* 206 */ "alter_table_option ::= TTL NK_INTEGER", + /* 207 */ "duration_list ::= duration_literal", + /* 208 */ "duration_list ::= duration_list NK_COMMA duration_literal", + /* 209 */ "rollup_func_list ::= rollup_func_name", + /* 210 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", + /* 211 */ "rollup_func_name ::= function_name", + /* 212 */ "rollup_func_name ::= FIRST", + /* 213 */ "rollup_func_name ::= LAST", + /* 214 */ "col_name_list ::= col_name", + /* 215 */ "col_name_list ::= col_name_list NK_COMMA col_name", + /* 216 */ "col_name ::= column_name", + /* 217 */ "cmd ::= SHOW DNODES", + /* 218 */ "cmd ::= SHOW USERS", + /* 219 */ "cmd ::= SHOW USER PRIVILEGES", + /* 220 */ "cmd ::= SHOW DATABASES", + /* 221 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt", + /* 222 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", + /* 223 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", + /* 224 */ "cmd ::= SHOW MNODES", + /* 225 */ "cmd ::= SHOW QNODES", + /* 226 */ "cmd ::= SHOW FUNCTIONS", + /* 227 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", + /* 228 */ "cmd ::= SHOW STREAMS", + /* 229 */ "cmd ::= SHOW ACCOUNTS", + /* 230 */ "cmd ::= SHOW APPS", + /* 231 */ "cmd ::= SHOW CONNECTIONS", + /* 232 */ "cmd ::= SHOW LICENCES", + /* 233 */ "cmd ::= SHOW GRANTS", + /* 234 */ "cmd ::= SHOW CREATE DATABASE db_name", + /* 235 */ "cmd ::= SHOW CREATE TABLE full_table_name", + /* 236 */ "cmd ::= SHOW CREATE STABLE full_table_name", + /* 237 */ "cmd ::= SHOW QUERIES", + /* 238 */ "cmd ::= SHOW SCORES", + /* 239 */ "cmd ::= SHOW TOPICS", + /* 240 */ "cmd ::= SHOW VARIABLES", + /* 241 */ "cmd ::= SHOW CLUSTER VARIABLES", + /* 242 */ "cmd ::= SHOW LOCAL VARIABLES", + /* 243 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", + /* 244 */ "cmd ::= SHOW BNODES", + /* 245 */ "cmd ::= SHOW SNODES", + /* 246 */ "cmd ::= SHOW CLUSTER", + /* 247 */ "cmd ::= SHOW TRANSACTIONS", + /* 248 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", + /* 249 */ "cmd ::= SHOW CONSUMERS", + /* 250 */ "cmd ::= SHOW SUBSCRIPTIONS", + /* 251 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", + /* 252 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", + /* 253 */ "cmd ::= SHOW VNODES NK_INTEGER", + /* 254 */ "cmd ::= SHOW VNODES NK_STRING", + /* 255 */ "cmd ::= SHOW db_name_cond_opt ALIVE", + /* 256 */ "cmd ::= SHOW CLUSTER ALIVE", + /* 257 */ "db_name_cond_opt ::=", + /* 258 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 259 */ "like_pattern_opt ::=", + /* 260 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 261 */ "table_name_cond ::= table_name", + /* 262 */ "from_db_opt ::=", + /* 263 */ "from_db_opt ::= FROM db_name", + /* 264 */ "tag_list_opt ::=", + /* 265 */ "tag_list_opt ::= tag_item", + /* 266 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", + /* 267 */ "tag_item ::= TBNAME", + /* 268 */ "tag_item ::= QTAGS", + /* 269 */ "tag_item ::= column_name", + /* 270 */ "tag_item ::= column_name column_alias", + /* 271 */ "tag_item ::= column_name AS column_alias", + /* 272 */ "cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options", + /* 273 */ "cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP", + /* 274 */ "cmd ::= DROP INDEX exists_opt full_index_name", + /* 275 */ "full_index_name ::= index_name", + /* 276 */ "full_index_name ::= db_name NK_DOT index_name", + /* 277 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", + /* 278 */ "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", + /* 279 */ "func_list ::= func", + /* 280 */ "func_list ::= func_list NK_COMMA func", + /* 281 */ "func ::= sma_func_name NK_LP expression_list NK_RP", + /* 282 */ "sma_func_name ::= function_name", + /* 283 */ "sma_func_name ::= COUNT", + /* 284 */ "sma_func_name ::= FIRST", + /* 285 */ "sma_func_name ::= LAST", + /* 286 */ "sma_func_name ::= LAST_ROW", + /* 287 */ "sma_stream_opt ::=", + /* 288 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", + /* 289 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", + /* 290 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", + /* 291 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", + /* 292 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", + /* 293 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name", + /* 294 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", + /* 295 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name", + /* 296 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 297 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 298 */ "cmd ::= DESC full_table_name", + /* 299 */ "cmd ::= DESCRIBE full_table_name", + /* 300 */ "cmd ::= RESET QUERY CACHE", + /* 301 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", + /* 302 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", + /* 303 */ "analyze_opt ::=", + /* 304 */ "analyze_opt ::= ANALYZE", + /* 305 */ "explain_options ::=", + /* 306 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 307 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 308 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", + /* 309 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 310 */ "agg_func_opt ::=", + /* 311 */ "agg_func_opt ::= AGGREGATE", + /* 312 */ "bufsize_opt ::=", + /* 313 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 314 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery", + /* 315 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 316 */ "col_list_opt ::=", + /* 317 */ "col_list_opt ::= NK_LP col_name_list NK_RP", + /* 318 */ "tag_def_or_ref_opt ::=", + /* 319 */ "tag_def_or_ref_opt ::= tags_def", + /* 320 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP", + /* 321 */ "stream_options ::=", + /* 322 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 323 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 324 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 325 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 326 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", + /* 327 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", + /* 328 */ "stream_options ::= stream_options DELETE_MARK duration_literal", + /* 329 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", + /* 330 */ "subtable_opt ::=", + /* 331 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 332 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 333 */ "cmd ::= KILL QUERY NK_STRING", + /* 334 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 335 */ "cmd ::= BALANCE VGROUP", + /* 336 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 337 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 338 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 339 */ "dnode_list ::= DNODE NK_INTEGER", + /* 340 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 341 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 342 */ "cmd ::= query_or_subquery", + /* 343 */ "cmd ::= insert_query", + /* 344 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 345 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", + /* 346 */ "literal ::= NK_INTEGER", + /* 347 */ "literal ::= NK_FLOAT", + /* 348 */ "literal ::= NK_STRING", + /* 349 */ "literal ::= NK_BOOL", + /* 350 */ "literal ::= TIMESTAMP NK_STRING", + /* 351 */ "literal ::= duration_literal", + /* 352 */ "literal ::= NULL", + /* 353 */ "literal ::= NK_QUESTION", + /* 354 */ "duration_literal ::= NK_VARIABLE", + /* 355 */ "signed ::= NK_INTEGER", + /* 356 */ "signed ::= NK_PLUS NK_INTEGER", + /* 357 */ "signed ::= NK_MINUS NK_INTEGER", + /* 358 */ "signed ::= NK_FLOAT", + /* 359 */ "signed ::= NK_PLUS NK_FLOAT", + /* 360 */ "signed ::= NK_MINUS NK_FLOAT", + /* 361 */ "signed_literal ::= signed", + /* 362 */ "signed_literal ::= NK_STRING", + /* 363 */ "signed_literal ::= NK_BOOL", + /* 364 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 365 */ "signed_literal ::= duration_literal", + /* 366 */ "signed_literal ::= NULL", + /* 367 */ "signed_literal ::= literal_func", + /* 368 */ "signed_literal ::= NK_QUESTION", + /* 369 */ "literal_list ::= signed_literal", + /* 370 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 371 */ "db_name ::= NK_ID", + /* 372 */ "table_name ::= NK_ID", + /* 373 */ "column_name ::= NK_ID", + /* 374 */ "function_name ::= NK_ID", + /* 375 */ "table_alias ::= NK_ID", + /* 376 */ "column_alias ::= NK_ID", + /* 377 */ "user_name ::= NK_ID", + /* 378 */ "topic_name ::= NK_ID", + /* 379 */ "stream_name ::= NK_ID", + /* 380 */ "cgroup_name ::= NK_ID", + /* 381 */ "index_name ::= NK_ID", + /* 382 */ "expr_or_subquery ::= expression", + /* 383 */ "expression ::= literal", + /* 384 */ "expression ::= pseudo_column", + /* 385 */ "expression ::= column_reference", + /* 386 */ "expression ::= function_expression", + /* 387 */ "expression ::= case_when_expression", + /* 388 */ "expression ::= NK_LP expression NK_RP", + /* 389 */ "expression ::= NK_PLUS expr_or_subquery", + /* 390 */ "expression ::= NK_MINUS expr_or_subquery", + /* 391 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 392 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 393 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 394 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 395 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 396 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 397 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 398 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 399 */ "expression_list ::= expr_or_subquery", + /* 400 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 401 */ "column_reference ::= column_name", + /* 402 */ "column_reference ::= table_name NK_DOT column_name", + /* 403 */ "pseudo_column ::= ROWTS", + /* 404 */ "pseudo_column ::= TBNAME", + /* 405 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 406 */ "pseudo_column ::= QSTART", + /* 407 */ "pseudo_column ::= QEND", + /* 408 */ "pseudo_column ::= QDURATION", + /* 409 */ "pseudo_column ::= WSTART", + /* 410 */ "pseudo_column ::= WEND", + /* 411 */ "pseudo_column ::= WDURATION", + /* 412 */ "pseudo_column ::= IROWTS", + /* 413 */ "pseudo_column ::= ISFILLED", + /* 414 */ "pseudo_column ::= QTAGS", + /* 415 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 416 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 417 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 418 */ "function_expression ::= literal_func", + /* 419 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 420 */ "literal_func ::= NOW", + /* 421 */ "noarg_func ::= NOW", + /* 422 */ "noarg_func ::= TODAY", + /* 423 */ "noarg_func ::= TIMEZONE", + /* 424 */ "noarg_func ::= DATABASE", + /* 425 */ "noarg_func ::= CLIENT_VERSION", + /* 426 */ "noarg_func ::= SERVER_VERSION", + /* 427 */ "noarg_func ::= SERVER_STATUS", + /* 428 */ "noarg_func ::= CURRENT_USER", + /* 429 */ "noarg_func ::= USER", + /* 430 */ "star_func ::= COUNT", + /* 431 */ "star_func ::= FIRST", + /* 432 */ "star_func ::= LAST", + /* 433 */ "star_func ::= LAST_ROW", + /* 434 */ "star_func_para_list ::= NK_STAR", + /* 435 */ "star_func_para_list ::= other_para_list", + /* 436 */ "other_para_list ::= star_func_para", + /* 437 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 438 */ "star_func_para ::= expr_or_subquery", + /* 439 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 440 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 441 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 442 */ "when_then_list ::= when_then_expr", + /* 443 */ "when_then_list ::= when_then_list when_then_expr", + /* 444 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 445 */ "case_when_else_opt ::=", + /* 446 */ "case_when_else_opt ::= ELSE common_expression", + /* 447 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 448 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 449 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 450 */ "predicate ::= expr_or_subquery IS NULL", + /* 451 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 452 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 453 */ "compare_op ::= NK_LT", + /* 454 */ "compare_op ::= NK_GT", + /* 455 */ "compare_op ::= NK_LE", + /* 456 */ "compare_op ::= NK_GE", + /* 457 */ "compare_op ::= NK_NE", + /* 458 */ "compare_op ::= NK_EQ", + /* 459 */ "compare_op ::= LIKE", + /* 460 */ "compare_op ::= NOT LIKE", + /* 461 */ "compare_op ::= MATCH", + /* 462 */ "compare_op ::= NMATCH", + /* 463 */ "compare_op ::= CONTAINS", + /* 464 */ "in_op ::= IN", + /* 465 */ "in_op ::= NOT IN", + /* 466 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 467 */ "boolean_value_expression ::= boolean_primary", + /* 468 */ "boolean_value_expression ::= NOT boolean_primary", + /* 469 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 470 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 471 */ "boolean_primary ::= predicate", + /* 472 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 473 */ "common_expression ::= expr_or_subquery", + /* 474 */ "common_expression ::= boolean_value_expression", + /* 475 */ "from_clause_opt ::=", + /* 476 */ "from_clause_opt ::= FROM table_reference_list", + /* 477 */ "table_reference_list ::= table_reference", + /* 478 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 479 */ "table_reference ::= table_primary", + /* 480 */ "table_reference ::= joined_table", + /* 481 */ "table_primary ::= table_name alias_opt", + /* 482 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 483 */ "table_primary ::= subquery alias_opt", + /* 484 */ "table_primary ::= parenthesized_joined_table", + /* 485 */ "alias_opt ::=", + /* 486 */ "alias_opt ::= table_alias", + /* 487 */ "alias_opt ::= AS table_alias", + /* 488 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 489 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 490 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 491 */ "join_type ::=", + /* 492 */ "join_type ::= INNER", + /* 493 */ "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", + /* 494 */ "set_quantifier_opt ::=", + /* 495 */ "set_quantifier_opt ::= DISTINCT", + /* 496 */ "set_quantifier_opt ::= ALL", + /* 497 */ "select_list ::= select_item", + /* 498 */ "select_list ::= select_list NK_COMMA select_item", + /* 499 */ "select_item ::= NK_STAR", + /* 500 */ "select_item ::= common_expression", + /* 501 */ "select_item ::= common_expression column_alias", + /* 502 */ "select_item ::= common_expression AS column_alias", + /* 503 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 504 */ "where_clause_opt ::=", + /* 505 */ "where_clause_opt ::= WHERE search_condition", + /* 506 */ "partition_by_clause_opt ::=", + /* 507 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 508 */ "partition_list ::= partition_item", + /* 509 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 510 */ "partition_item ::= expr_or_subquery", + /* 511 */ "partition_item ::= expr_or_subquery column_alias", + /* 512 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 513 */ "twindow_clause_opt ::=", + /* 514 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 515 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 516 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 517 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 518 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 519 */ "sliding_opt ::=", + /* 520 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 521 */ "fill_opt ::=", + /* 522 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 523 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", + /* 524 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP", + /* 525 */ "fill_mode ::= NONE", + /* 526 */ "fill_mode ::= PREV", + /* 527 */ "fill_mode ::= NULL", + /* 528 */ "fill_mode ::= NULL_F", + /* 529 */ "fill_mode ::= LINEAR", + /* 530 */ "fill_mode ::= NEXT", + /* 531 */ "group_by_clause_opt ::=", + /* 532 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 533 */ "group_by_list ::= expr_or_subquery", + /* 534 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 535 */ "having_clause_opt ::=", + /* 536 */ "having_clause_opt ::= HAVING search_condition", + /* 537 */ "range_opt ::=", + /* 538 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 539 */ "every_opt ::=", + /* 540 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 541 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 542 */ "query_simple ::= query_specification", + /* 543 */ "query_simple ::= union_query_expression", + /* 544 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 545 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 546 */ "query_simple_or_subquery ::= query_simple", + /* 547 */ "query_simple_or_subquery ::= subquery", + /* 548 */ "query_or_subquery ::= query_expression", + /* 549 */ "query_or_subquery ::= subquery", + /* 550 */ "order_by_clause_opt ::=", + /* 551 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 552 */ "slimit_clause_opt ::=", + /* 553 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 554 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 555 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 556 */ "limit_clause_opt ::=", + /* 557 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 558 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 559 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 560 */ "subquery ::= NK_LP query_expression NK_RP", + /* 561 */ "subquery ::= NK_LP subquery NK_RP", + /* 562 */ "search_condition ::= common_expression", + /* 563 */ "sort_specification_list ::= sort_specification", + /* 564 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 565 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 566 */ "ordering_specification_opt ::=", + /* 567 */ "ordering_specification_opt ::= ASC", + /* 568 */ "ordering_specification_opt ::= DESC", + /* 569 */ "null_ordering_opt ::=", + /* 570 */ "null_ordering_opt ::= NULLS FIRST", + /* 571 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -3171,457 +3172,458 @@ static const struct { { 353, -2 }, /* (117) alter_db_option ::= REPLICA NK_INTEGER */ { 353, -2 }, /* (118) alter_db_option ::= WAL_LEVEL NK_INTEGER */ { 353, -2 }, /* (119) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - { 350, -1 }, /* (120) integer_list ::= NK_INTEGER */ - { 350, -3 }, /* (121) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - { 351, -1 }, /* (122) variable_list ::= NK_VARIABLE */ - { 351, -3 }, /* (123) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - { 352, -1 }, /* (124) retention_list ::= retention */ - { 352, -3 }, /* (125) retention_list ::= retention_list NK_COMMA retention */ - { 354, -3 }, /* (126) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - { 347, 0 }, /* (127) speed_opt ::= */ - { 347, -2 }, /* (128) speed_opt ::= MAX_SPEED NK_INTEGER */ - { 348, 0 }, /* (129) start_opt ::= */ - { 348, -3 }, /* (130) start_opt ::= START WITH NK_INTEGER */ - { 348, -3 }, /* (131) start_opt ::= START WITH NK_STRING */ - { 348, -4 }, /* (132) start_opt ::= START WITH TIMESTAMP NK_STRING */ - { 349, 0 }, /* (133) end_opt ::= */ - { 349, -3 }, /* (134) end_opt ::= END WITH NK_INTEGER */ - { 349, -3 }, /* (135) end_opt ::= END WITH NK_STRING */ - { 349, -4 }, /* (136) end_opt ::= END WITH TIMESTAMP NK_STRING */ - { 328, -9 }, /* (137) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - { 328, -3 }, /* (138) cmd ::= CREATE TABLE multi_create_clause */ - { 328, -9 }, /* (139) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - { 328, -3 }, /* (140) cmd ::= DROP TABLE multi_drop_clause */ - { 328, -4 }, /* (141) cmd ::= DROP STABLE exists_opt full_table_name */ - { 328, -3 }, /* (142) cmd ::= ALTER TABLE alter_table_clause */ - { 328, -3 }, /* (143) cmd ::= ALTER STABLE alter_table_clause */ - { 362, -2 }, /* (144) alter_table_clause ::= full_table_name alter_table_options */ - { 362, -5 }, /* (145) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - { 362, -4 }, /* (146) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - { 362, -5 }, /* (147) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - { 362, -5 }, /* (148) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - { 362, -5 }, /* (149) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - { 362, -4 }, /* (150) alter_table_clause ::= full_table_name DROP TAG column_name */ - { 362, -5 }, /* (151) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - { 362, -5 }, /* (152) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - { 362, -6 }, /* (153) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - { 359, -1 }, /* (154) multi_create_clause ::= create_subtable_clause */ - { 359, -2 }, /* (155) multi_create_clause ::= multi_create_clause create_subtable_clause */ - { 367, -10 }, /* (156) 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 */ - { 361, -1 }, /* (157) multi_drop_clause ::= drop_table_clause */ - { 361, -3 }, /* (158) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ - { 370, -2 }, /* (159) drop_table_clause ::= exists_opt full_table_name */ - { 368, 0 }, /* (160) specific_cols_opt ::= */ - { 368, -3 }, /* (161) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - { 355, -1 }, /* (162) full_table_name ::= table_name */ - { 355, -3 }, /* (163) full_table_name ::= db_name NK_DOT table_name */ - { 356, -1 }, /* (164) column_def_list ::= column_def */ - { 356, -3 }, /* (165) column_def_list ::= column_def_list NK_COMMA column_def */ - { 373, -2 }, /* (166) column_def ::= column_name type_name */ - { 373, -4 }, /* (167) column_def ::= column_name type_name COMMENT NK_STRING */ - { 365, -1 }, /* (168) type_name ::= BOOL */ - { 365, -1 }, /* (169) type_name ::= TINYINT */ - { 365, -1 }, /* (170) type_name ::= SMALLINT */ - { 365, -1 }, /* (171) type_name ::= INT */ - { 365, -1 }, /* (172) type_name ::= INTEGER */ - { 365, -1 }, /* (173) type_name ::= BIGINT */ - { 365, -1 }, /* (174) type_name ::= FLOAT */ - { 365, -1 }, /* (175) type_name ::= DOUBLE */ - { 365, -4 }, /* (176) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - { 365, -1 }, /* (177) type_name ::= TIMESTAMP */ - { 365, -4 }, /* (178) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - { 365, -2 }, /* (179) type_name ::= TINYINT UNSIGNED */ - { 365, -2 }, /* (180) type_name ::= SMALLINT UNSIGNED */ - { 365, -2 }, /* (181) type_name ::= INT UNSIGNED */ - { 365, -2 }, /* (182) type_name ::= BIGINT UNSIGNED */ - { 365, -1 }, /* (183) type_name ::= JSON */ - { 365, -4 }, /* (184) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - { 365, -1 }, /* (185) type_name ::= MEDIUMBLOB */ - { 365, -1 }, /* (186) type_name ::= BLOB */ - { 365, -4 }, /* (187) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - { 365, -1 }, /* (188) type_name ::= DECIMAL */ - { 365, -4 }, /* (189) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - { 365, -6 }, /* (190) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - { 357, 0 }, /* (191) tags_def_opt ::= */ - { 357, -1 }, /* (192) tags_def_opt ::= tags_def */ - { 360, -4 }, /* (193) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - { 358, 0 }, /* (194) table_options ::= */ - { 358, -3 }, /* (195) table_options ::= table_options COMMENT NK_STRING */ - { 358, -3 }, /* (196) table_options ::= table_options MAX_DELAY duration_list */ - { 358, -3 }, /* (197) table_options ::= table_options WATERMARK duration_list */ - { 358, -5 }, /* (198) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - { 358, -3 }, /* (199) table_options ::= table_options TTL NK_INTEGER */ - { 358, -5 }, /* (200) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - { 358, -3 }, /* (201) table_options ::= table_options DELETE_MARK duration_list */ - { 363, -1 }, /* (202) alter_table_options ::= alter_table_option */ - { 363, -2 }, /* (203) alter_table_options ::= alter_table_options alter_table_option */ - { 376, -2 }, /* (204) alter_table_option ::= COMMENT NK_STRING */ - { 376, -2 }, /* (205) alter_table_option ::= TTL NK_INTEGER */ - { 374, -1 }, /* (206) duration_list ::= duration_literal */ - { 374, -3 }, /* (207) duration_list ::= duration_list NK_COMMA duration_literal */ - { 375, -1 }, /* (208) rollup_func_list ::= rollup_func_name */ - { 375, -3 }, /* (209) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - { 378, -1 }, /* (210) rollup_func_name ::= function_name */ - { 378, -1 }, /* (211) rollup_func_name ::= FIRST */ - { 378, -1 }, /* (212) rollup_func_name ::= LAST */ - { 371, -1 }, /* (213) col_name_list ::= col_name */ - { 371, -3 }, /* (214) col_name_list ::= col_name_list NK_COMMA col_name */ - { 380, -1 }, /* (215) col_name ::= column_name */ - { 328, -2 }, /* (216) cmd ::= SHOW DNODES */ - { 328, -2 }, /* (217) cmd ::= SHOW USERS */ - { 328, -3 }, /* (218) cmd ::= SHOW USER PRIVILEGES */ - { 328, -2 }, /* (219) cmd ::= SHOW DATABASES */ - { 328, -4 }, /* (220) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ - { 328, -4 }, /* (221) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - { 328, -3 }, /* (222) cmd ::= SHOW db_name_cond_opt VGROUPS */ - { 328, -2 }, /* (223) cmd ::= SHOW MNODES */ - { 328, -2 }, /* (224) cmd ::= SHOW QNODES */ - { 328, -2 }, /* (225) cmd ::= SHOW FUNCTIONS */ - { 328, -5 }, /* (226) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - { 328, -2 }, /* (227) cmd ::= SHOW STREAMS */ - { 328, -2 }, /* (228) cmd ::= SHOW ACCOUNTS */ - { 328, -2 }, /* (229) cmd ::= SHOW APPS */ - { 328, -2 }, /* (230) cmd ::= SHOW CONNECTIONS */ - { 328, -2 }, /* (231) cmd ::= SHOW LICENCES */ - { 328, -2 }, /* (232) cmd ::= SHOW GRANTS */ - { 328, -4 }, /* (233) cmd ::= SHOW CREATE DATABASE db_name */ - { 328, -4 }, /* (234) cmd ::= SHOW CREATE TABLE full_table_name */ - { 328, -4 }, /* (235) cmd ::= SHOW CREATE STABLE full_table_name */ - { 328, -2 }, /* (236) cmd ::= SHOW QUERIES */ - { 328, -2 }, /* (237) cmd ::= SHOW SCORES */ - { 328, -2 }, /* (238) cmd ::= SHOW TOPICS */ - { 328, -2 }, /* (239) cmd ::= SHOW VARIABLES */ - { 328, -3 }, /* (240) cmd ::= SHOW CLUSTER VARIABLES */ - { 328, -3 }, /* (241) cmd ::= SHOW LOCAL VARIABLES */ - { 328, -5 }, /* (242) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - { 328, -2 }, /* (243) cmd ::= SHOW BNODES */ - { 328, -2 }, /* (244) cmd ::= SHOW SNODES */ - { 328, -2 }, /* (245) cmd ::= SHOW CLUSTER */ - { 328, -2 }, /* (246) cmd ::= SHOW TRANSACTIONS */ - { 328, -4 }, /* (247) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - { 328, -2 }, /* (248) cmd ::= SHOW CONSUMERS */ - { 328, -2 }, /* (249) cmd ::= SHOW SUBSCRIPTIONS */ - { 328, -5 }, /* (250) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - { 328, -7 }, /* (251) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - { 328, -3 }, /* (252) cmd ::= SHOW VNODES NK_INTEGER */ - { 328, -3 }, /* (253) cmd ::= SHOW VNODES NK_STRING */ - { 328, -3 }, /* (254) cmd ::= SHOW db_name_cond_opt ALIVE */ - { 328, -3 }, /* (255) cmd ::= SHOW CLUSTER ALIVE */ - { 381, 0 }, /* (256) db_name_cond_opt ::= */ - { 381, -2 }, /* (257) db_name_cond_opt ::= db_name NK_DOT */ - { 382, 0 }, /* (258) like_pattern_opt ::= */ - { 382, -2 }, /* (259) like_pattern_opt ::= LIKE NK_STRING */ - { 383, -1 }, /* (260) table_name_cond ::= table_name */ - { 384, 0 }, /* (261) from_db_opt ::= */ - { 384, -2 }, /* (262) from_db_opt ::= FROM db_name */ - { 385, 0 }, /* (263) tag_list_opt ::= */ - { 385, -1 }, /* (264) tag_list_opt ::= tag_item */ - { 385, -3 }, /* (265) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - { 386, -1 }, /* (266) tag_item ::= TBNAME */ - { 386, -1 }, /* (267) tag_item ::= QTAGS */ - { 386, -1 }, /* (268) tag_item ::= column_name */ - { 386, -2 }, /* (269) tag_item ::= column_name column_alias */ - { 386, -3 }, /* (270) tag_item ::= column_name AS column_alias */ - { 328, -8 }, /* (271) cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ - { 328, -9 }, /* (272) cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ - { 328, -4 }, /* (273) cmd ::= DROP INDEX exists_opt full_index_name */ - { 388, -1 }, /* (274) full_index_name ::= index_name */ - { 388, -3 }, /* (275) full_index_name ::= db_name NK_DOT index_name */ - { 389, -10 }, /* (276) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - { 389, -12 }, /* (277) 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 */ - { 391, -1 }, /* (278) func_list ::= func */ - { 391, -3 }, /* (279) func_list ::= func_list NK_COMMA func */ - { 394, -4 }, /* (280) func ::= sma_func_name NK_LP expression_list NK_RP */ - { 395, -1 }, /* (281) sma_func_name ::= function_name */ - { 395, -1 }, /* (282) sma_func_name ::= COUNT */ - { 395, -1 }, /* (283) sma_func_name ::= FIRST */ - { 395, -1 }, /* (284) sma_func_name ::= LAST */ - { 395, -1 }, /* (285) sma_func_name ::= LAST_ROW */ - { 393, 0 }, /* (286) sma_stream_opt ::= */ - { 393, -3 }, /* (287) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - { 393, -3 }, /* (288) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - { 393, -3 }, /* (289) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - { 328, -6 }, /* (290) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - { 328, -7 }, /* (291) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ - { 328, -9 }, /* (292) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ - { 328, -7 }, /* (293) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ - { 328, -9 }, /* (294) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ - { 328, -4 }, /* (295) cmd ::= DROP TOPIC exists_opt topic_name */ - { 328, -7 }, /* (296) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - { 328, -2 }, /* (297) cmd ::= DESC full_table_name */ - { 328, -2 }, /* (298) cmd ::= DESCRIBE full_table_name */ - { 328, -3 }, /* (299) cmd ::= RESET QUERY CACHE */ - { 328, -4 }, /* (300) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - { 328, -4 }, /* (301) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - { 398, 0 }, /* (302) analyze_opt ::= */ - { 398, -1 }, /* (303) analyze_opt ::= ANALYZE */ - { 399, 0 }, /* (304) explain_options ::= */ - { 399, -3 }, /* (305) explain_options ::= explain_options VERBOSE NK_BOOL */ - { 399, -3 }, /* (306) explain_options ::= explain_options RATIO NK_FLOAT */ - { 328, -10 }, /* (307) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ - { 328, -4 }, /* (308) cmd ::= DROP FUNCTION exists_opt function_name */ - { 401, 0 }, /* (309) agg_func_opt ::= */ - { 401, -1 }, /* (310) agg_func_opt ::= AGGREGATE */ - { 402, 0 }, /* (311) bufsize_opt ::= */ - { 402, -2 }, /* (312) bufsize_opt ::= BUFSIZE NK_INTEGER */ - { 328, -12 }, /* (313) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ - { 328, -4 }, /* (314) cmd ::= DROP STREAM exists_opt stream_name */ - { 405, 0 }, /* (315) col_list_opt ::= */ - { 405, -3 }, /* (316) col_list_opt ::= NK_LP col_name_list NK_RP */ - { 406, 0 }, /* (317) tag_def_or_ref_opt ::= */ - { 406, -1 }, /* (318) tag_def_or_ref_opt ::= tags_def */ - { 406, -4 }, /* (319) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ - { 404, 0 }, /* (320) stream_options ::= */ - { 404, -3 }, /* (321) stream_options ::= stream_options TRIGGER AT_ONCE */ - { 404, -3 }, /* (322) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - { 404, -4 }, /* (323) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - { 404, -3 }, /* (324) stream_options ::= stream_options WATERMARK duration_literal */ - { 404, -4 }, /* (325) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - { 404, -3 }, /* (326) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - { 404, -3 }, /* (327) stream_options ::= stream_options DELETE_MARK duration_literal */ - { 404, -4 }, /* (328) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - { 407, 0 }, /* (329) subtable_opt ::= */ - { 407, -4 }, /* (330) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - { 328, -3 }, /* (331) cmd ::= KILL CONNECTION NK_INTEGER */ - { 328, -3 }, /* (332) cmd ::= KILL QUERY NK_STRING */ - { 328, -3 }, /* (333) cmd ::= KILL TRANSACTION NK_INTEGER */ - { 328, -2 }, /* (334) cmd ::= BALANCE VGROUP */ - { 328, -4 }, /* (335) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - { 328, -4 }, /* (336) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - { 328, -3 }, /* (337) cmd ::= SPLIT VGROUP NK_INTEGER */ - { 409, -2 }, /* (338) dnode_list ::= DNODE NK_INTEGER */ - { 409, -3 }, /* (339) dnode_list ::= dnode_list DNODE NK_INTEGER */ - { 328, -4 }, /* (340) cmd ::= DELETE FROM full_table_name where_clause_opt */ - { 328, -1 }, /* (341) cmd ::= query_or_subquery */ - { 328, -1 }, /* (342) cmd ::= insert_query */ - { 400, -7 }, /* (343) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - { 400, -4 }, /* (344) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - { 331, -1 }, /* (345) literal ::= NK_INTEGER */ - { 331, -1 }, /* (346) literal ::= NK_FLOAT */ - { 331, -1 }, /* (347) literal ::= NK_STRING */ - { 331, -1 }, /* (348) literal ::= NK_BOOL */ - { 331, -2 }, /* (349) literal ::= TIMESTAMP NK_STRING */ - { 331, -1 }, /* (350) literal ::= duration_literal */ - { 331, -1 }, /* (351) literal ::= NULL */ - { 331, -1 }, /* (352) literal ::= NK_QUESTION */ - { 377, -1 }, /* (353) duration_literal ::= NK_VARIABLE */ - { 411, -1 }, /* (354) signed ::= NK_INTEGER */ - { 411, -2 }, /* (355) signed ::= NK_PLUS NK_INTEGER */ - { 411, -2 }, /* (356) signed ::= NK_MINUS NK_INTEGER */ - { 411, -1 }, /* (357) signed ::= NK_FLOAT */ - { 411, -2 }, /* (358) signed ::= NK_PLUS NK_FLOAT */ - { 411, -2 }, /* (359) signed ::= NK_MINUS NK_FLOAT */ - { 366, -1 }, /* (360) signed_literal ::= signed */ - { 366, -1 }, /* (361) signed_literal ::= NK_STRING */ - { 366, -1 }, /* (362) signed_literal ::= NK_BOOL */ - { 366, -2 }, /* (363) signed_literal ::= TIMESTAMP NK_STRING */ - { 366, -1 }, /* (364) signed_literal ::= duration_literal */ - { 366, -1 }, /* (365) signed_literal ::= NULL */ - { 366, -1 }, /* (366) signed_literal ::= literal_func */ - { 366, -1 }, /* (367) signed_literal ::= NK_QUESTION */ - { 413, -1 }, /* (368) literal_list ::= signed_literal */ - { 413, -3 }, /* (369) literal_list ::= literal_list NK_COMMA signed_literal */ - { 339, -1 }, /* (370) db_name ::= NK_ID */ - { 372, -1 }, /* (371) table_name ::= NK_ID */ - { 364, -1 }, /* (372) column_name ::= NK_ID */ - { 379, -1 }, /* (373) function_name ::= NK_ID */ - { 414, -1 }, /* (374) table_alias ::= NK_ID */ - { 387, -1 }, /* (375) column_alias ::= NK_ID */ - { 333, -1 }, /* (376) user_name ::= NK_ID */ - { 340, -1 }, /* (377) topic_name ::= NK_ID */ - { 403, -1 }, /* (378) stream_name ::= NK_ID */ - { 397, -1 }, /* (379) cgroup_name ::= NK_ID */ - { 390, -1 }, /* (380) index_name ::= NK_ID */ - { 415, -1 }, /* (381) expr_or_subquery ::= expression */ - { 408, -1 }, /* (382) expression ::= literal */ - { 408, -1 }, /* (383) expression ::= pseudo_column */ - { 408, -1 }, /* (384) expression ::= column_reference */ - { 408, -1 }, /* (385) expression ::= function_expression */ - { 408, -1 }, /* (386) expression ::= case_when_expression */ - { 408, -3 }, /* (387) expression ::= NK_LP expression NK_RP */ - { 408, -2 }, /* (388) expression ::= NK_PLUS expr_or_subquery */ - { 408, -2 }, /* (389) expression ::= NK_MINUS expr_or_subquery */ - { 408, -3 }, /* (390) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - { 408, -3 }, /* (391) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - { 408, -3 }, /* (392) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - { 408, -3 }, /* (393) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - { 408, -3 }, /* (394) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - { 408, -3 }, /* (395) expression ::= column_reference NK_ARROW NK_STRING */ - { 408, -3 }, /* (396) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - { 408, -3 }, /* (397) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - { 369, -1 }, /* (398) expression_list ::= expr_or_subquery */ - { 369, -3 }, /* (399) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - { 417, -1 }, /* (400) column_reference ::= column_name */ - { 417, -3 }, /* (401) column_reference ::= table_name NK_DOT column_name */ - { 416, -1 }, /* (402) pseudo_column ::= ROWTS */ - { 416, -1 }, /* (403) pseudo_column ::= TBNAME */ - { 416, -3 }, /* (404) pseudo_column ::= table_name NK_DOT TBNAME */ - { 416, -1 }, /* (405) pseudo_column ::= QSTART */ - { 416, -1 }, /* (406) pseudo_column ::= QEND */ - { 416, -1 }, /* (407) pseudo_column ::= QDURATION */ - { 416, -1 }, /* (408) pseudo_column ::= WSTART */ - { 416, -1 }, /* (409) pseudo_column ::= WEND */ - { 416, -1 }, /* (410) pseudo_column ::= WDURATION */ - { 416, -1 }, /* (411) pseudo_column ::= IROWTS */ - { 416, -1 }, /* (412) pseudo_column ::= ISFILLED */ - { 416, -1 }, /* (413) pseudo_column ::= QTAGS */ - { 418, -4 }, /* (414) function_expression ::= function_name NK_LP expression_list NK_RP */ - { 418, -4 }, /* (415) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - { 418, -6 }, /* (416) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - { 418, -1 }, /* (417) function_expression ::= literal_func */ - { 412, -3 }, /* (418) literal_func ::= noarg_func NK_LP NK_RP */ - { 412, -1 }, /* (419) literal_func ::= NOW */ - { 422, -1 }, /* (420) noarg_func ::= NOW */ - { 422, -1 }, /* (421) noarg_func ::= TODAY */ - { 422, -1 }, /* (422) noarg_func ::= TIMEZONE */ - { 422, -1 }, /* (423) noarg_func ::= DATABASE */ - { 422, -1 }, /* (424) noarg_func ::= CLIENT_VERSION */ - { 422, -1 }, /* (425) noarg_func ::= SERVER_VERSION */ - { 422, -1 }, /* (426) noarg_func ::= SERVER_STATUS */ - { 422, -1 }, /* (427) noarg_func ::= CURRENT_USER */ - { 422, -1 }, /* (428) noarg_func ::= USER */ - { 420, -1 }, /* (429) star_func ::= COUNT */ - { 420, -1 }, /* (430) star_func ::= FIRST */ - { 420, -1 }, /* (431) star_func ::= LAST */ - { 420, -1 }, /* (432) star_func ::= LAST_ROW */ - { 421, -1 }, /* (433) star_func_para_list ::= NK_STAR */ - { 421, -1 }, /* (434) star_func_para_list ::= other_para_list */ - { 423, -1 }, /* (435) other_para_list ::= star_func_para */ - { 423, -3 }, /* (436) other_para_list ::= other_para_list NK_COMMA star_func_para */ - { 424, -1 }, /* (437) star_func_para ::= expr_or_subquery */ - { 424, -3 }, /* (438) star_func_para ::= table_name NK_DOT NK_STAR */ - { 419, -4 }, /* (439) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - { 419, -5 }, /* (440) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - { 425, -1 }, /* (441) when_then_list ::= when_then_expr */ - { 425, -2 }, /* (442) when_then_list ::= when_then_list when_then_expr */ - { 428, -4 }, /* (443) when_then_expr ::= WHEN common_expression THEN common_expression */ - { 426, 0 }, /* (444) case_when_else_opt ::= */ - { 426, -2 }, /* (445) case_when_else_opt ::= ELSE common_expression */ - { 429, -3 }, /* (446) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - { 429, -5 }, /* (447) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - { 429, -6 }, /* (448) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - { 429, -3 }, /* (449) predicate ::= expr_or_subquery IS NULL */ - { 429, -4 }, /* (450) predicate ::= expr_or_subquery IS NOT NULL */ - { 429, -3 }, /* (451) predicate ::= expr_or_subquery in_op in_predicate_value */ - { 430, -1 }, /* (452) compare_op ::= NK_LT */ - { 430, -1 }, /* (453) compare_op ::= NK_GT */ - { 430, -1 }, /* (454) compare_op ::= NK_LE */ - { 430, -1 }, /* (455) compare_op ::= NK_GE */ - { 430, -1 }, /* (456) compare_op ::= NK_NE */ - { 430, -1 }, /* (457) compare_op ::= NK_EQ */ - { 430, -1 }, /* (458) compare_op ::= LIKE */ - { 430, -2 }, /* (459) compare_op ::= NOT LIKE */ - { 430, -1 }, /* (460) compare_op ::= MATCH */ - { 430, -1 }, /* (461) compare_op ::= NMATCH */ - { 430, -1 }, /* (462) compare_op ::= CONTAINS */ - { 431, -1 }, /* (463) in_op ::= IN */ - { 431, -2 }, /* (464) in_op ::= NOT IN */ - { 432, -3 }, /* (465) in_predicate_value ::= NK_LP literal_list NK_RP */ - { 433, -1 }, /* (466) boolean_value_expression ::= boolean_primary */ - { 433, -2 }, /* (467) boolean_value_expression ::= NOT boolean_primary */ - { 433, -3 }, /* (468) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - { 433, -3 }, /* (469) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - { 434, -1 }, /* (470) boolean_primary ::= predicate */ - { 434, -3 }, /* (471) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - { 427, -1 }, /* (472) common_expression ::= expr_or_subquery */ - { 427, -1 }, /* (473) common_expression ::= boolean_value_expression */ - { 435, 0 }, /* (474) from_clause_opt ::= */ - { 435, -2 }, /* (475) from_clause_opt ::= FROM table_reference_list */ - { 436, -1 }, /* (476) table_reference_list ::= table_reference */ - { 436, -3 }, /* (477) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - { 437, -1 }, /* (478) table_reference ::= table_primary */ - { 437, -1 }, /* (479) table_reference ::= joined_table */ - { 438, -2 }, /* (480) table_primary ::= table_name alias_opt */ - { 438, -4 }, /* (481) table_primary ::= db_name NK_DOT table_name alias_opt */ - { 438, -2 }, /* (482) table_primary ::= subquery alias_opt */ - { 438, -1 }, /* (483) table_primary ::= parenthesized_joined_table */ - { 440, 0 }, /* (484) alias_opt ::= */ - { 440, -1 }, /* (485) alias_opt ::= table_alias */ - { 440, -2 }, /* (486) alias_opt ::= AS table_alias */ - { 442, -3 }, /* (487) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - { 442, -3 }, /* (488) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - { 439, -6 }, /* (489) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - { 443, 0 }, /* (490) join_type ::= */ - { 443, -1 }, /* (491) join_type ::= INNER */ - { 445, -12 }, /* (492) 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, 0 }, /* (493) set_quantifier_opt ::= */ - { 446, -1 }, /* (494) set_quantifier_opt ::= DISTINCT */ - { 446, -1 }, /* (495) set_quantifier_opt ::= ALL */ - { 447, -1 }, /* (496) select_list ::= select_item */ - { 447, -3 }, /* (497) select_list ::= select_list NK_COMMA select_item */ - { 455, -1 }, /* (498) select_item ::= NK_STAR */ - { 455, -1 }, /* (499) select_item ::= common_expression */ - { 455, -2 }, /* (500) select_item ::= common_expression column_alias */ - { 455, -3 }, /* (501) select_item ::= common_expression AS column_alias */ - { 455, -3 }, /* (502) select_item ::= table_name NK_DOT NK_STAR */ - { 410, 0 }, /* (503) where_clause_opt ::= */ - { 410, -2 }, /* (504) where_clause_opt ::= WHERE search_condition */ - { 448, 0 }, /* (505) partition_by_clause_opt ::= */ - { 448, -3 }, /* (506) partition_by_clause_opt ::= PARTITION BY partition_list */ - { 456, -1 }, /* (507) partition_list ::= partition_item */ - { 456, -3 }, /* (508) partition_list ::= partition_list NK_COMMA partition_item */ - { 457, -1 }, /* (509) partition_item ::= expr_or_subquery */ - { 457, -2 }, /* (510) partition_item ::= expr_or_subquery column_alias */ - { 457, -3 }, /* (511) partition_item ::= expr_or_subquery AS column_alias */ - { 452, 0 }, /* (512) twindow_clause_opt ::= */ - { 452, -6 }, /* (513) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - { 452, -4 }, /* (514) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - { 452, -6 }, /* (515) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - { 452, -8 }, /* (516) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - { 452, -7 }, /* (517) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - { 392, 0 }, /* (518) sliding_opt ::= */ - { 392, -4 }, /* (519) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - { 451, 0 }, /* (520) fill_opt ::= */ - { 451, -4 }, /* (521) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - { 451, -6 }, /* (522) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - { 451, -6 }, /* (523) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */ - { 458, -1 }, /* (524) fill_mode ::= NONE */ - { 458, -1 }, /* (525) fill_mode ::= PREV */ - { 458, -1 }, /* (526) fill_mode ::= NULL */ - { 458, -1 }, /* (527) fill_mode ::= NULL_F */ - { 458, -1 }, /* (528) fill_mode ::= LINEAR */ - { 458, -1 }, /* (529) fill_mode ::= NEXT */ - { 453, 0 }, /* (530) group_by_clause_opt ::= */ - { 453, -3 }, /* (531) group_by_clause_opt ::= GROUP BY group_by_list */ - { 459, -1 }, /* (532) group_by_list ::= expr_or_subquery */ - { 459, -3 }, /* (533) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - { 454, 0 }, /* (534) having_clause_opt ::= */ - { 454, -2 }, /* (535) having_clause_opt ::= HAVING search_condition */ - { 449, 0 }, /* (536) range_opt ::= */ - { 449, -6 }, /* (537) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - { 450, 0 }, /* (538) every_opt ::= */ - { 450, -4 }, /* (539) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - { 460, -4 }, /* (540) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - { 461, -1 }, /* (541) query_simple ::= query_specification */ - { 461, -1 }, /* (542) query_simple ::= union_query_expression */ - { 465, -4 }, /* (543) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - { 465, -3 }, /* (544) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - { 466, -1 }, /* (545) query_simple_or_subquery ::= query_simple */ - { 466, -1 }, /* (546) query_simple_or_subquery ::= subquery */ - { 396, -1 }, /* (547) query_or_subquery ::= query_expression */ - { 396, -1 }, /* (548) query_or_subquery ::= subquery */ - { 462, 0 }, /* (549) order_by_clause_opt ::= */ - { 462, -3 }, /* (550) order_by_clause_opt ::= ORDER BY sort_specification_list */ - { 463, 0 }, /* (551) slimit_clause_opt ::= */ - { 463, -2 }, /* (552) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - { 463, -4 }, /* (553) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - { 463, -4 }, /* (554) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 464, 0 }, /* (555) limit_clause_opt ::= */ - { 464, -2 }, /* (556) limit_clause_opt ::= LIMIT NK_INTEGER */ - { 464, -4 }, /* (557) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - { 464, -4 }, /* (558) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 441, -3 }, /* (559) subquery ::= NK_LP query_expression NK_RP */ - { 441, -3 }, /* (560) subquery ::= NK_LP subquery NK_RP */ - { 444, -1 }, /* (561) search_condition ::= common_expression */ - { 467, -1 }, /* (562) sort_specification_list ::= sort_specification */ - { 467, -3 }, /* (563) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - { 468, -3 }, /* (564) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - { 469, 0 }, /* (565) ordering_specification_opt ::= */ - { 469, -1 }, /* (566) ordering_specification_opt ::= ASC */ - { 469, -1 }, /* (567) ordering_specification_opt ::= DESC */ - { 470, 0 }, /* (568) null_ordering_opt ::= */ - { 470, -2 }, /* (569) null_ordering_opt ::= NULLS FIRST */ - { 470, -2 }, /* (570) null_ordering_opt ::= NULLS LAST */ + { 353, -2 }, /* (120) alter_db_option ::= MINROWS NK_INTEGER */ + { 350, -1 }, /* (121) integer_list ::= NK_INTEGER */ + { 350, -3 }, /* (122) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + { 351, -1 }, /* (123) variable_list ::= NK_VARIABLE */ + { 351, -3 }, /* (124) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + { 352, -1 }, /* (125) retention_list ::= retention */ + { 352, -3 }, /* (126) retention_list ::= retention_list NK_COMMA retention */ + { 354, -3 }, /* (127) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + { 347, 0 }, /* (128) speed_opt ::= */ + { 347, -2 }, /* (129) speed_opt ::= MAX_SPEED NK_INTEGER */ + { 348, 0 }, /* (130) start_opt ::= */ + { 348, -3 }, /* (131) start_opt ::= START WITH NK_INTEGER */ + { 348, -3 }, /* (132) start_opt ::= START WITH NK_STRING */ + { 348, -4 }, /* (133) start_opt ::= START WITH TIMESTAMP NK_STRING */ + { 349, 0 }, /* (134) end_opt ::= */ + { 349, -3 }, /* (135) end_opt ::= END WITH NK_INTEGER */ + { 349, -3 }, /* (136) end_opt ::= END WITH NK_STRING */ + { 349, -4 }, /* (137) end_opt ::= END WITH TIMESTAMP NK_STRING */ + { 328, -9 }, /* (138) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + { 328, -3 }, /* (139) cmd ::= CREATE TABLE multi_create_clause */ + { 328, -9 }, /* (140) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + { 328, -3 }, /* (141) cmd ::= DROP TABLE multi_drop_clause */ + { 328, -4 }, /* (142) cmd ::= DROP STABLE exists_opt full_table_name */ + { 328, -3 }, /* (143) cmd ::= ALTER TABLE alter_table_clause */ + { 328, -3 }, /* (144) cmd ::= ALTER STABLE alter_table_clause */ + { 362, -2 }, /* (145) alter_table_clause ::= full_table_name alter_table_options */ + { 362, -5 }, /* (146) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + { 362, -4 }, /* (147) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + { 362, -5 }, /* (148) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + { 362, -5 }, /* (149) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + { 362, -5 }, /* (150) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + { 362, -4 }, /* (151) alter_table_clause ::= full_table_name DROP TAG column_name */ + { 362, -5 }, /* (152) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + { 362, -5 }, /* (153) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + { 362, -6 }, /* (154) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + { 359, -1 }, /* (155) multi_create_clause ::= create_subtable_clause */ + { 359, -2 }, /* (156) multi_create_clause ::= multi_create_clause create_subtable_clause */ + { 367, -10 }, /* (157) 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 */ + { 361, -1 }, /* (158) multi_drop_clause ::= drop_table_clause */ + { 361, -3 }, /* (159) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ + { 370, -2 }, /* (160) drop_table_clause ::= exists_opt full_table_name */ + { 368, 0 }, /* (161) specific_cols_opt ::= */ + { 368, -3 }, /* (162) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + { 355, -1 }, /* (163) full_table_name ::= table_name */ + { 355, -3 }, /* (164) full_table_name ::= db_name NK_DOT table_name */ + { 356, -1 }, /* (165) column_def_list ::= column_def */ + { 356, -3 }, /* (166) column_def_list ::= column_def_list NK_COMMA column_def */ + { 373, -2 }, /* (167) column_def ::= column_name type_name */ + { 373, -4 }, /* (168) column_def ::= column_name type_name COMMENT NK_STRING */ + { 365, -1 }, /* (169) type_name ::= BOOL */ + { 365, -1 }, /* (170) type_name ::= TINYINT */ + { 365, -1 }, /* (171) type_name ::= SMALLINT */ + { 365, -1 }, /* (172) type_name ::= INT */ + { 365, -1 }, /* (173) type_name ::= INTEGER */ + { 365, -1 }, /* (174) type_name ::= BIGINT */ + { 365, -1 }, /* (175) type_name ::= FLOAT */ + { 365, -1 }, /* (176) type_name ::= DOUBLE */ + { 365, -4 }, /* (177) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + { 365, -1 }, /* (178) type_name ::= TIMESTAMP */ + { 365, -4 }, /* (179) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + { 365, -2 }, /* (180) type_name ::= TINYINT UNSIGNED */ + { 365, -2 }, /* (181) type_name ::= SMALLINT UNSIGNED */ + { 365, -2 }, /* (182) type_name ::= INT UNSIGNED */ + { 365, -2 }, /* (183) type_name ::= BIGINT UNSIGNED */ + { 365, -1 }, /* (184) type_name ::= JSON */ + { 365, -4 }, /* (185) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + { 365, -1 }, /* (186) type_name ::= MEDIUMBLOB */ + { 365, -1 }, /* (187) type_name ::= BLOB */ + { 365, -4 }, /* (188) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + { 365, -1 }, /* (189) type_name ::= DECIMAL */ + { 365, -4 }, /* (190) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + { 365, -6 }, /* (191) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + { 357, 0 }, /* (192) tags_def_opt ::= */ + { 357, -1 }, /* (193) tags_def_opt ::= tags_def */ + { 360, -4 }, /* (194) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + { 358, 0 }, /* (195) table_options ::= */ + { 358, -3 }, /* (196) table_options ::= table_options COMMENT NK_STRING */ + { 358, -3 }, /* (197) table_options ::= table_options MAX_DELAY duration_list */ + { 358, -3 }, /* (198) table_options ::= table_options WATERMARK duration_list */ + { 358, -5 }, /* (199) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + { 358, -3 }, /* (200) table_options ::= table_options TTL NK_INTEGER */ + { 358, -5 }, /* (201) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + { 358, -3 }, /* (202) table_options ::= table_options DELETE_MARK duration_list */ + { 363, -1 }, /* (203) alter_table_options ::= alter_table_option */ + { 363, -2 }, /* (204) alter_table_options ::= alter_table_options alter_table_option */ + { 376, -2 }, /* (205) alter_table_option ::= COMMENT NK_STRING */ + { 376, -2 }, /* (206) alter_table_option ::= TTL NK_INTEGER */ + { 374, -1 }, /* (207) duration_list ::= duration_literal */ + { 374, -3 }, /* (208) duration_list ::= duration_list NK_COMMA duration_literal */ + { 375, -1 }, /* (209) rollup_func_list ::= rollup_func_name */ + { 375, -3 }, /* (210) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + { 378, -1 }, /* (211) rollup_func_name ::= function_name */ + { 378, -1 }, /* (212) rollup_func_name ::= FIRST */ + { 378, -1 }, /* (213) rollup_func_name ::= LAST */ + { 371, -1 }, /* (214) col_name_list ::= col_name */ + { 371, -3 }, /* (215) col_name_list ::= col_name_list NK_COMMA col_name */ + { 380, -1 }, /* (216) col_name ::= column_name */ + { 328, -2 }, /* (217) cmd ::= SHOW DNODES */ + { 328, -2 }, /* (218) cmd ::= SHOW USERS */ + { 328, -3 }, /* (219) cmd ::= SHOW USER PRIVILEGES */ + { 328, -2 }, /* (220) cmd ::= SHOW DATABASES */ + { 328, -4 }, /* (221) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + { 328, -4 }, /* (222) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + { 328, -3 }, /* (223) cmd ::= SHOW db_name_cond_opt VGROUPS */ + { 328, -2 }, /* (224) cmd ::= SHOW MNODES */ + { 328, -2 }, /* (225) cmd ::= SHOW QNODES */ + { 328, -2 }, /* (226) cmd ::= SHOW FUNCTIONS */ + { 328, -5 }, /* (227) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + { 328, -2 }, /* (228) cmd ::= SHOW STREAMS */ + { 328, -2 }, /* (229) cmd ::= SHOW ACCOUNTS */ + { 328, -2 }, /* (230) cmd ::= SHOW APPS */ + { 328, -2 }, /* (231) cmd ::= SHOW CONNECTIONS */ + { 328, -2 }, /* (232) cmd ::= SHOW LICENCES */ + { 328, -2 }, /* (233) cmd ::= SHOW GRANTS */ + { 328, -4 }, /* (234) cmd ::= SHOW CREATE DATABASE db_name */ + { 328, -4 }, /* (235) cmd ::= SHOW CREATE TABLE full_table_name */ + { 328, -4 }, /* (236) cmd ::= SHOW CREATE STABLE full_table_name */ + { 328, -2 }, /* (237) cmd ::= SHOW QUERIES */ + { 328, -2 }, /* (238) cmd ::= SHOW SCORES */ + { 328, -2 }, /* (239) cmd ::= SHOW TOPICS */ + { 328, -2 }, /* (240) cmd ::= SHOW VARIABLES */ + { 328, -3 }, /* (241) cmd ::= SHOW CLUSTER VARIABLES */ + { 328, -3 }, /* (242) cmd ::= SHOW LOCAL VARIABLES */ + { 328, -5 }, /* (243) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + { 328, -2 }, /* (244) cmd ::= SHOW BNODES */ + { 328, -2 }, /* (245) cmd ::= SHOW SNODES */ + { 328, -2 }, /* (246) cmd ::= SHOW CLUSTER */ + { 328, -2 }, /* (247) cmd ::= SHOW TRANSACTIONS */ + { 328, -4 }, /* (248) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + { 328, -2 }, /* (249) cmd ::= SHOW CONSUMERS */ + { 328, -2 }, /* (250) cmd ::= SHOW SUBSCRIPTIONS */ + { 328, -5 }, /* (251) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + { 328, -7 }, /* (252) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + { 328, -3 }, /* (253) cmd ::= SHOW VNODES NK_INTEGER */ + { 328, -3 }, /* (254) cmd ::= SHOW VNODES NK_STRING */ + { 328, -3 }, /* (255) cmd ::= SHOW db_name_cond_opt ALIVE */ + { 328, -3 }, /* (256) cmd ::= SHOW CLUSTER ALIVE */ + { 381, 0 }, /* (257) db_name_cond_opt ::= */ + { 381, -2 }, /* (258) db_name_cond_opt ::= db_name NK_DOT */ + { 382, 0 }, /* (259) like_pattern_opt ::= */ + { 382, -2 }, /* (260) like_pattern_opt ::= LIKE NK_STRING */ + { 383, -1 }, /* (261) table_name_cond ::= table_name */ + { 384, 0 }, /* (262) from_db_opt ::= */ + { 384, -2 }, /* (263) from_db_opt ::= FROM db_name */ + { 385, 0 }, /* (264) tag_list_opt ::= */ + { 385, -1 }, /* (265) tag_list_opt ::= tag_item */ + { 385, -3 }, /* (266) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + { 386, -1 }, /* (267) tag_item ::= TBNAME */ + { 386, -1 }, /* (268) tag_item ::= QTAGS */ + { 386, -1 }, /* (269) tag_item ::= column_name */ + { 386, -2 }, /* (270) tag_item ::= column_name column_alias */ + { 386, -3 }, /* (271) tag_item ::= column_name AS column_alias */ + { 328, -8 }, /* (272) cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ + { 328, -9 }, /* (273) cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ + { 328, -4 }, /* (274) cmd ::= DROP INDEX exists_opt full_index_name */ + { 388, -1 }, /* (275) full_index_name ::= index_name */ + { 388, -3 }, /* (276) full_index_name ::= db_name NK_DOT index_name */ + { 389, -10 }, /* (277) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + { 389, -12 }, /* (278) 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 */ + { 391, -1 }, /* (279) func_list ::= func */ + { 391, -3 }, /* (280) func_list ::= func_list NK_COMMA func */ + { 394, -4 }, /* (281) func ::= sma_func_name NK_LP expression_list NK_RP */ + { 395, -1 }, /* (282) sma_func_name ::= function_name */ + { 395, -1 }, /* (283) sma_func_name ::= COUNT */ + { 395, -1 }, /* (284) sma_func_name ::= FIRST */ + { 395, -1 }, /* (285) sma_func_name ::= LAST */ + { 395, -1 }, /* (286) sma_func_name ::= LAST_ROW */ + { 393, 0 }, /* (287) sma_stream_opt ::= */ + { 393, -3 }, /* (288) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + { 393, -3 }, /* (289) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + { 393, -3 }, /* (290) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + { 328, -6 }, /* (291) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + { 328, -7 }, /* (292) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ + { 328, -9 }, /* (293) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ + { 328, -7 }, /* (294) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ + { 328, -9 }, /* (295) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ + { 328, -4 }, /* (296) cmd ::= DROP TOPIC exists_opt topic_name */ + { 328, -7 }, /* (297) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + { 328, -2 }, /* (298) cmd ::= DESC full_table_name */ + { 328, -2 }, /* (299) cmd ::= DESCRIBE full_table_name */ + { 328, -3 }, /* (300) cmd ::= RESET QUERY CACHE */ + { 328, -4 }, /* (301) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + { 328, -4 }, /* (302) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + { 398, 0 }, /* (303) analyze_opt ::= */ + { 398, -1 }, /* (304) analyze_opt ::= ANALYZE */ + { 399, 0 }, /* (305) explain_options ::= */ + { 399, -3 }, /* (306) explain_options ::= explain_options VERBOSE NK_BOOL */ + { 399, -3 }, /* (307) explain_options ::= explain_options RATIO NK_FLOAT */ + { 328, -10 }, /* (308) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + { 328, -4 }, /* (309) cmd ::= DROP FUNCTION exists_opt function_name */ + { 401, 0 }, /* (310) agg_func_opt ::= */ + { 401, -1 }, /* (311) agg_func_opt ::= AGGREGATE */ + { 402, 0 }, /* (312) bufsize_opt ::= */ + { 402, -2 }, /* (313) bufsize_opt ::= BUFSIZE NK_INTEGER */ + { 328, -12 }, /* (314) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ + { 328, -4 }, /* (315) cmd ::= DROP STREAM exists_opt stream_name */ + { 405, 0 }, /* (316) col_list_opt ::= */ + { 405, -3 }, /* (317) col_list_opt ::= NK_LP col_name_list NK_RP */ + { 406, 0 }, /* (318) tag_def_or_ref_opt ::= */ + { 406, -1 }, /* (319) tag_def_or_ref_opt ::= tags_def */ + { 406, -4 }, /* (320) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ + { 404, 0 }, /* (321) stream_options ::= */ + { 404, -3 }, /* (322) stream_options ::= stream_options TRIGGER AT_ONCE */ + { 404, -3 }, /* (323) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + { 404, -4 }, /* (324) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + { 404, -3 }, /* (325) stream_options ::= stream_options WATERMARK duration_literal */ + { 404, -4 }, /* (326) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + { 404, -3 }, /* (327) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + { 404, -3 }, /* (328) stream_options ::= stream_options DELETE_MARK duration_literal */ + { 404, -4 }, /* (329) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + { 407, 0 }, /* (330) subtable_opt ::= */ + { 407, -4 }, /* (331) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + { 328, -3 }, /* (332) cmd ::= KILL CONNECTION NK_INTEGER */ + { 328, -3 }, /* (333) cmd ::= KILL QUERY NK_STRING */ + { 328, -3 }, /* (334) cmd ::= KILL TRANSACTION NK_INTEGER */ + { 328, -2 }, /* (335) cmd ::= BALANCE VGROUP */ + { 328, -4 }, /* (336) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + { 328, -4 }, /* (337) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + { 328, -3 }, /* (338) cmd ::= SPLIT VGROUP NK_INTEGER */ + { 409, -2 }, /* (339) dnode_list ::= DNODE NK_INTEGER */ + { 409, -3 }, /* (340) dnode_list ::= dnode_list DNODE NK_INTEGER */ + { 328, -4 }, /* (341) cmd ::= DELETE FROM full_table_name where_clause_opt */ + { 328, -1 }, /* (342) cmd ::= query_or_subquery */ + { 328, -1 }, /* (343) cmd ::= insert_query */ + { 400, -7 }, /* (344) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + { 400, -4 }, /* (345) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + { 331, -1 }, /* (346) literal ::= NK_INTEGER */ + { 331, -1 }, /* (347) literal ::= NK_FLOAT */ + { 331, -1 }, /* (348) literal ::= NK_STRING */ + { 331, -1 }, /* (349) literal ::= NK_BOOL */ + { 331, -2 }, /* (350) literal ::= TIMESTAMP NK_STRING */ + { 331, -1 }, /* (351) literal ::= duration_literal */ + { 331, -1 }, /* (352) literal ::= NULL */ + { 331, -1 }, /* (353) literal ::= NK_QUESTION */ + { 377, -1 }, /* (354) duration_literal ::= NK_VARIABLE */ + { 411, -1 }, /* (355) signed ::= NK_INTEGER */ + { 411, -2 }, /* (356) signed ::= NK_PLUS NK_INTEGER */ + { 411, -2 }, /* (357) signed ::= NK_MINUS NK_INTEGER */ + { 411, -1 }, /* (358) signed ::= NK_FLOAT */ + { 411, -2 }, /* (359) signed ::= NK_PLUS NK_FLOAT */ + { 411, -2 }, /* (360) signed ::= NK_MINUS NK_FLOAT */ + { 366, -1 }, /* (361) signed_literal ::= signed */ + { 366, -1 }, /* (362) signed_literal ::= NK_STRING */ + { 366, -1 }, /* (363) signed_literal ::= NK_BOOL */ + { 366, -2 }, /* (364) signed_literal ::= TIMESTAMP NK_STRING */ + { 366, -1 }, /* (365) signed_literal ::= duration_literal */ + { 366, -1 }, /* (366) signed_literal ::= NULL */ + { 366, -1 }, /* (367) signed_literal ::= literal_func */ + { 366, -1 }, /* (368) signed_literal ::= NK_QUESTION */ + { 413, -1 }, /* (369) literal_list ::= signed_literal */ + { 413, -3 }, /* (370) literal_list ::= literal_list NK_COMMA signed_literal */ + { 339, -1 }, /* (371) db_name ::= NK_ID */ + { 372, -1 }, /* (372) table_name ::= NK_ID */ + { 364, -1 }, /* (373) column_name ::= NK_ID */ + { 379, -1 }, /* (374) function_name ::= NK_ID */ + { 414, -1 }, /* (375) table_alias ::= NK_ID */ + { 387, -1 }, /* (376) column_alias ::= NK_ID */ + { 333, -1 }, /* (377) user_name ::= NK_ID */ + { 340, -1 }, /* (378) topic_name ::= NK_ID */ + { 403, -1 }, /* (379) stream_name ::= NK_ID */ + { 397, -1 }, /* (380) cgroup_name ::= NK_ID */ + { 390, -1 }, /* (381) index_name ::= NK_ID */ + { 415, -1 }, /* (382) expr_or_subquery ::= expression */ + { 408, -1 }, /* (383) expression ::= literal */ + { 408, -1 }, /* (384) expression ::= pseudo_column */ + { 408, -1 }, /* (385) expression ::= column_reference */ + { 408, -1 }, /* (386) expression ::= function_expression */ + { 408, -1 }, /* (387) expression ::= case_when_expression */ + { 408, -3 }, /* (388) expression ::= NK_LP expression NK_RP */ + { 408, -2 }, /* (389) expression ::= NK_PLUS expr_or_subquery */ + { 408, -2 }, /* (390) expression ::= NK_MINUS expr_or_subquery */ + { 408, -3 }, /* (391) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + { 408, -3 }, /* (392) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + { 408, -3 }, /* (393) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + { 408, -3 }, /* (394) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + { 408, -3 }, /* (395) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + { 408, -3 }, /* (396) expression ::= column_reference NK_ARROW NK_STRING */ + { 408, -3 }, /* (397) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + { 408, -3 }, /* (398) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + { 369, -1 }, /* (399) expression_list ::= expr_or_subquery */ + { 369, -3 }, /* (400) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + { 417, -1 }, /* (401) column_reference ::= column_name */ + { 417, -3 }, /* (402) column_reference ::= table_name NK_DOT column_name */ + { 416, -1 }, /* (403) pseudo_column ::= ROWTS */ + { 416, -1 }, /* (404) pseudo_column ::= TBNAME */ + { 416, -3 }, /* (405) pseudo_column ::= table_name NK_DOT TBNAME */ + { 416, -1 }, /* (406) pseudo_column ::= QSTART */ + { 416, -1 }, /* (407) pseudo_column ::= QEND */ + { 416, -1 }, /* (408) pseudo_column ::= QDURATION */ + { 416, -1 }, /* (409) pseudo_column ::= WSTART */ + { 416, -1 }, /* (410) pseudo_column ::= WEND */ + { 416, -1 }, /* (411) pseudo_column ::= WDURATION */ + { 416, -1 }, /* (412) pseudo_column ::= IROWTS */ + { 416, -1 }, /* (413) pseudo_column ::= ISFILLED */ + { 416, -1 }, /* (414) pseudo_column ::= QTAGS */ + { 418, -4 }, /* (415) function_expression ::= function_name NK_LP expression_list NK_RP */ + { 418, -4 }, /* (416) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + { 418, -6 }, /* (417) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + { 418, -1 }, /* (418) function_expression ::= literal_func */ + { 412, -3 }, /* (419) literal_func ::= noarg_func NK_LP NK_RP */ + { 412, -1 }, /* (420) literal_func ::= NOW */ + { 422, -1 }, /* (421) noarg_func ::= NOW */ + { 422, -1 }, /* (422) noarg_func ::= TODAY */ + { 422, -1 }, /* (423) noarg_func ::= TIMEZONE */ + { 422, -1 }, /* (424) noarg_func ::= DATABASE */ + { 422, -1 }, /* (425) noarg_func ::= CLIENT_VERSION */ + { 422, -1 }, /* (426) noarg_func ::= SERVER_VERSION */ + { 422, -1 }, /* (427) noarg_func ::= SERVER_STATUS */ + { 422, -1 }, /* (428) noarg_func ::= CURRENT_USER */ + { 422, -1 }, /* (429) noarg_func ::= USER */ + { 420, -1 }, /* (430) star_func ::= COUNT */ + { 420, -1 }, /* (431) star_func ::= FIRST */ + { 420, -1 }, /* (432) star_func ::= LAST */ + { 420, -1 }, /* (433) star_func ::= LAST_ROW */ + { 421, -1 }, /* (434) star_func_para_list ::= NK_STAR */ + { 421, -1 }, /* (435) star_func_para_list ::= other_para_list */ + { 423, -1 }, /* (436) other_para_list ::= star_func_para */ + { 423, -3 }, /* (437) other_para_list ::= other_para_list NK_COMMA star_func_para */ + { 424, -1 }, /* (438) star_func_para ::= expr_or_subquery */ + { 424, -3 }, /* (439) star_func_para ::= table_name NK_DOT NK_STAR */ + { 419, -4 }, /* (440) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + { 419, -5 }, /* (441) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + { 425, -1 }, /* (442) when_then_list ::= when_then_expr */ + { 425, -2 }, /* (443) when_then_list ::= when_then_list when_then_expr */ + { 428, -4 }, /* (444) when_then_expr ::= WHEN common_expression THEN common_expression */ + { 426, 0 }, /* (445) case_when_else_opt ::= */ + { 426, -2 }, /* (446) case_when_else_opt ::= ELSE common_expression */ + { 429, -3 }, /* (447) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + { 429, -5 }, /* (448) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + { 429, -6 }, /* (449) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + { 429, -3 }, /* (450) predicate ::= expr_or_subquery IS NULL */ + { 429, -4 }, /* (451) predicate ::= expr_or_subquery IS NOT NULL */ + { 429, -3 }, /* (452) predicate ::= expr_or_subquery in_op in_predicate_value */ + { 430, -1 }, /* (453) compare_op ::= NK_LT */ + { 430, -1 }, /* (454) compare_op ::= NK_GT */ + { 430, -1 }, /* (455) compare_op ::= NK_LE */ + { 430, -1 }, /* (456) compare_op ::= NK_GE */ + { 430, -1 }, /* (457) compare_op ::= NK_NE */ + { 430, -1 }, /* (458) compare_op ::= NK_EQ */ + { 430, -1 }, /* (459) compare_op ::= LIKE */ + { 430, -2 }, /* (460) compare_op ::= NOT LIKE */ + { 430, -1 }, /* (461) compare_op ::= MATCH */ + { 430, -1 }, /* (462) compare_op ::= NMATCH */ + { 430, -1 }, /* (463) compare_op ::= CONTAINS */ + { 431, -1 }, /* (464) in_op ::= IN */ + { 431, -2 }, /* (465) in_op ::= NOT IN */ + { 432, -3 }, /* (466) in_predicate_value ::= NK_LP literal_list NK_RP */ + { 433, -1 }, /* (467) boolean_value_expression ::= boolean_primary */ + { 433, -2 }, /* (468) boolean_value_expression ::= NOT boolean_primary */ + { 433, -3 }, /* (469) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + { 433, -3 }, /* (470) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + { 434, -1 }, /* (471) boolean_primary ::= predicate */ + { 434, -3 }, /* (472) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + { 427, -1 }, /* (473) common_expression ::= expr_or_subquery */ + { 427, -1 }, /* (474) common_expression ::= boolean_value_expression */ + { 435, 0 }, /* (475) from_clause_opt ::= */ + { 435, -2 }, /* (476) from_clause_opt ::= FROM table_reference_list */ + { 436, -1 }, /* (477) table_reference_list ::= table_reference */ + { 436, -3 }, /* (478) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + { 437, -1 }, /* (479) table_reference ::= table_primary */ + { 437, -1 }, /* (480) table_reference ::= joined_table */ + { 438, -2 }, /* (481) table_primary ::= table_name alias_opt */ + { 438, -4 }, /* (482) table_primary ::= db_name NK_DOT table_name alias_opt */ + { 438, -2 }, /* (483) table_primary ::= subquery alias_opt */ + { 438, -1 }, /* (484) table_primary ::= parenthesized_joined_table */ + { 440, 0 }, /* (485) alias_opt ::= */ + { 440, -1 }, /* (486) alias_opt ::= table_alias */ + { 440, -2 }, /* (487) alias_opt ::= AS table_alias */ + { 442, -3 }, /* (488) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + { 442, -3 }, /* (489) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + { 439, -6 }, /* (490) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + { 443, 0 }, /* (491) join_type ::= */ + { 443, -1 }, /* (492) join_type ::= INNER */ + { 445, -12 }, /* (493) 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, 0 }, /* (494) set_quantifier_opt ::= */ + { 446, -1 }, /* (495) set_quantifier_opt ::= DISTINCT */ + { 446, -1 }, /* (496) set_quantifier_opt ::= ALL */ + { 447, -1 }, /* (497) select_list ::= select_item */ + { 447, -3 }, /* (498) select_list ::= select_list NK_COMMA select_item */ + { 455, -1 }, /* (499) select_item ::= NK_STAR */ + { 455, -1 }, /* (500) select_item ::= common_expression */ + { 455, -2 }, /* (501) select_item ::= common_expression column_alias */ + { 455, -3 }, /* (502) select_item ::= common_expression AS column_alias */ + { 455, -3 }, /* (503) select_item ::= table_name NK_DOT NK_STAR */ + { 410, 0 }, /* (504) where_clause_opt ::= */ + { 410, -2 }, /* (505) where_clause_opt ::= WHERE search_condition */ + { 448, 0 }, /* (506) partition_by_clause_opt ::= */ + { 448, -3 }, /* (507) partition_by_clause_opt ::= PARTITION BY partition_list */ + { 456, -1 }, /* (508) partition_list ::= partition_item */ + { 456, -3 }, /* (509) partition_list ::= partition_list NK_COMMA partition_item */ + { 457, -1 }, /* (510) partition_item ::= expr_or_subquery */ + { 457, -2 }, /* (511) partition_item ::= expr_or_subquery column_alias */ + { 457, -3 }, /* (512) partition_item ::= expr_or_subquery AS column_alias */ + { 452, 0 }, /* (513) twindow_clause_opt ::= */ + { 452, -6 }, /* (514) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + { 452, -4 }, /* (515) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + { 452, -6 }, /* (516) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + { 452, -8 }, /* (517) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + { 452, -7 }, /* (518) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + { 392, 0 }, /* (519) sliding_opt ::= */ + { 392, -4 }, /* (520) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + { 451, 0 }, /* (521) fill_opt ::= */ + { 451, -4 }, /* (522) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { 451, -6 }, /* (523) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + { 451, -6 }, /* (524) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */ + { 458, -1 }, /* (525) fill_mode ::= NONE */ + { 458, -1 }, /* (526) fill_mode ::= PREV */ + { 458, -1 }, /* (527) fill_mode ::= NULL */ + { 458, -1 }, /* (528) fill_mode ::= NULL_F */ + { 458, -1 }, /* (529) fill_mode ::= LINEAR */ + { 458, -1 }, /* (530) fill_mode ::= NEXT */ + { 453, 0 }, /* (531) group_by_clause_opt ::= */ + { 453, -3 }, /* (532) group_by_clause_opt ::= GROUP BY group_by_list */ + { 459, -1 }, /* (533) group_by_list ::= expr_or_subquery */ + { 459, -3 }, /* (534) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + { 454, 0 }, /* (535) having_clause_opt ::= */ + { 454, -2 }, /* (536) having_clause_opt ::= HAVING search_condition */ + { 449, 0 }, /* (537) range_opt ::= */ + { 449, -6 }, /* (538) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + { 450, 0 }, /* (539) every_opt ::= */ + { 450, -4 }, /* (540) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + { 460, -4 }, /* (541) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + { 461, -1 }, /* (542) query_simple ::= query_specification */ + { 461, -1 }, /* (543) query_simple ::= union_query_expression */ + { 465, -4 }, /* (544) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + { 465, -3 }, /* (545) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + { 466, -1 }, /* (546) query_simple_or_subquery ::= query_simple */ + { 466, -1 }, /* (547) query_simple_or_subquery ::= subquery */ + { 396, -1 }, /* (548) query_or_subquery ::= query_expression */ + { 396, -1 }, /* (549) query_or_subquery ::= subquery */ + { 462, 0 }, /* (550) order_by_clause_opt ::= */ + { 462, -3 }, /* (551) order_by_clause_opt ::= ORDER BY sort_specification_list */ + { 463, 0 }, /* (552) slimit_clause_opt ::= */ + { 463, -2 }, /* (553) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + { 463, -4 }, /* (554) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + { 463, -4 }, /* (555) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 464, 0 }, /* (556) limit_clause_opt ::= */ + { 464, -2 }, /* (557) limit_clause_opt ::= LIMIT NK_INTEGER */ + { 464, -4 }, /* (558) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + { 464, -4 }, /* (559) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 441, -3 }, /* (560) subquery ::= NK_LP query_expression NK_RP */ + { 441, -3 }, /* (561) subquery ::= NK_LP subquery NK_RP */ + { 444, -1 }, /* (562) search_condition ::= common_expression */ + { 467, -1 }, /* (563) sort_specification_list ::= sort_specification */ + { 467, -3 }, /* (564) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + { 468, -3 }, /* (565) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + { 469, 0 }, /* (566) ordering_specification_opt ::= */ + { 469, -1 }, /* (567) ordering_specification_opt ::= ASC */ + { 469, -1 }, /* (568) ordering_specification_opt ::= DESC */ + { 470, 0 }, /* (569) null_ordering_opt ::= */ + { 470, -2 }, /* (570) null_ordering_opt ::= NULLS FIRST */ + { 470, -2 }, /* (571) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3814,8 +3816,8 @@ static YYACTIONTYPE yy_reduce( yymsp[-2].minor.yy881 = yylhsminor.yy881; break; case 42: /* priv_level ::= topic_name */ - case 281: /* sma_func_name ::= function_name */ yytestcase(yyruleno==281); - case 485: /* alias_opt ::= table_alias */ yytestcase(yyruleno==485); + case 282: /* sma_func_name ::= function_name */ yytestcase(yyruleno==282); + case 486: /* alias_opt ::= table_alias */ yytestcase(yyruleno==486); { yylhsminor.yy881 = yymsp[0].minor.yy881; } yymsp[0].minor.yy881 = yylhsminor.yy881; break; @@ -3846,49 +3848,49 @@ static YYACTIONTYPE yy_reduce( case 51: /* dnode_endpoint ::= NK_STRING */ case 52: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==52); case 53: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==53); - case 282: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==282); - case 283: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==283); - case 284: /* sma_func_name ::= LAST */ yytestcase(yyruleno==284); - case 285: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==285); - case 370: /* db_name ::= NK_ID */ yytestcase(yyruleno==370); - case 371: /* table_name ::= NK_ID */ yytestcase(yyruleno==371); - case 372: /* column_name ::= NK_ID */ yytestcase(yyruleno==372); - case 373: /* function_name ::= NK_ID */ yytestcase(yyruleno==373); - case 374: /* table_alias ::= NK_ID */ yytestcase(yyruleno==374); - case 375: /* column_alias ::= NK_ID */ yytestcase(yyruleno==375); - case 376: /* user_name ::= NK_ID */ yytestcase(yyruleno==376); - case 377: /* topic_name ::= NK_ID */ yytestcase(yyruleno==377); - case 378: /* stream_name ::= NK_ID */ yytestcase(yyruleno==378); - case 379: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==379); - case 380: /* index_name ::= NK_ID */ yytestcase(yyruleno==380); - case 420: /* noarg_func ::= NOW */ yytestcase(yyruleno==420); - case 421: /* noarg_func ::= TODAY */ yytestcase(yyruleno==421); - case 422: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==422); - case 423: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==423); - case 424: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==424); - case 425: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==425); - case 426: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==426); - case 427: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==427); - case 428: /* noarg_func ::= USER */ yytestcase(yyruleno==428); - case 429: /* star_func ::= COUNT */ yytestcase(yyruleno==429); - case 430: /* star_func ::= FIRST */ yytestcase(yyruleno==430); - case 431: /* star_func ::= LAST */ yytestcase(yyruleno==431); - case 432: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==432); + case 283: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==283); + case 284: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==284); + case 285: /* sma_func_name ::= LAST */ yytestcase(yyruleno==285); + case 286: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==286); + case 371: /* db_name ::= NK_ID */ yytestcase(yyruleno==371); + case 372: /* table_name ::= NK_ID */ yytestcase(yyruleno==372); + case 373: /* column_name ::= NK_ID */ yytestcase(yyruleno==373); + case 374: /* function_name ::= NK_ID */ yytestcase(yyruleno==374); + case 375: /* table_alias ::= NK_ID */ yytestcase(yyruleno==375); + case 376: /* column_alias ::= NK_ID */ yytestcase(yyruleno==376); + case 377: /* user_name ::= NK_ID */ yytestcase(yyruleno==377); + case 378: /* topic_name ::= NK_ID */ yytestcase(yyruleno==378); + case 379: /* stream_name ::= NK_ID */ yytestcase(yyruleno==379); + case 380: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==380); + case 381: /* index_name ::= NK_ID */ yytestcase(yyruleno==381); + case 421: /* noarg_func ::= NOW */ yytestcase(yyruleno==421); + case 422: /* noarg_func ::= TODAY */ yytestcase(yyruleno==422); + case 423: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==423); + case 424: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==424); + case 425: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==425); + case 426: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==426); + case 427: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==427); + case 428: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==428); + case 429: /* noarg_func ::= USER */ yytestcase(yyruleno==429); + case 430: /* star_func ::= COUNT */ yytestcase(yyruleno==430); + case 431: /* star_func ::= FIRST */ yytestcase(yyruleno==431); + case 432: /* star_func ::= LAST */ yytestcase(yyruleno==432); + case 433: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==433); { yylhsminor.yy881 = yymsp[0].minor.yy0; } yymsp[0].minor.yy881 = yylhsminor.yy881; break; case 54: /* force_opt ::= */ case 74: /* not_exists_opt ::= */ yytestcase(yyruleno==74); case 76: /* exists_opt ::= */ yytestcase(yyruleno==76); - case 302: /* analyze_opt ::= */ yytestcase(yyruleno==302); - case 309: /* agg_func_opt ::= */ yytestcase(yyruleno==309); - case 493: /* set_quantifier_opt ::= */ yytestcase(yyruleno==493); + case 303: /* analyze_opt ::= */ yytestcase(yyruleno==303); + case 310: /* agg_func_opt ::= */ yytestcase(yyruleno==310); + case 494: /* set_quantifier_opt ::= */ yytestcase(yyruleno==494); { yymsp[1].minor.yy587 = false; } break; case 55: /* force_opt ::= FORCE */ - case 303: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==303); - case 310: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==310); - case 494: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==494); + case 304: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==304); + case 311: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==311); + case 495: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==495); { yymsp[0].minor.yy587 = true; } break; case 56: /* cmd ::= ALTER LOCAL NK_STRING */ @@ -4109,722 +4111,725 @@ static YYACTIONTYPE yy_reduce( case 119: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ { yymsp[-1].minor.yy809.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy809.val = yymsp[0].minor.yy0; } break; - case 120: /* integer_list ::= NK_INTEGER */ + case 120: /* alter_db_option ::= MINROWS NK_INTEGER */ +{ yymsp[-1].minor.yy809.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy809.val = yymsp[0].minor.yy0; } + break; + case 121: /* integer_list ::= NK_INTEGER */ { yylhsminor.yy220 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy220 = yylhsminor.yy220; break; - case 121: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 339: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==339); + case 122: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ + case 340: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==340); { yylhsminor.yy220 = addNodeToList(pCxt, yymsp[-2].minor.yy220, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy220 = yylhsminor.yy220; break; - case 122: /* variable_list ::= NK_VARIABLE */ + case 123: /* variable_list ::= NK_VARIABLE */ { yylhsminor.yy220 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy220 = yylhsminor.yy220; break; - case 123: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + case 124: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ { yylhsminor.yy220 = addNodeToList(pCxt, yymsp[-2].minor.yy220, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy220 = yylhsminor.yy220; break; - case 124: /* retention_list ::= retention */ - case 154: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==154); - case 157: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==157); - case 164: /* column_def_list ::= column_def */ yytestcase(yyruleno==164); - case 208: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==208); - case 213: /* col_name_list ::= col_name */ yytestcase(yyruleno==213); - case 264: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==264); - case 278: /* func_list ::= func */ yytestcase(yyruleno==278); - case 368: /* literal_list ::= signed_literal */ yytestcase(yyruleno==368); - case 435: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==435); - case 441: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==441); - case 496: /* select_list ::= select_item */ yytestcase(yyruleno==496); - case 507: /* partition_list ::= partition_item */ yytestcase(yyruleno==507); - case 562: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==562); + case 125: /* retention_list ::= retention */ + case 155: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==155); + case 158: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==158); + case 165: /* column_def_list ::= column_def */ yytestcase(yyruleno==165); + case 209: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==209); + case 214: /* col_name_list ::= col_name */ yytestcase(yyruleno==214); + case 265: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==265); + case 279: /* func_list ::= func */ yytestcase(yyruleno==279); + case 369: /* literal_list ::= signed_literal */ yytestcase(yyruleno==369); + case 436: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==436); + case 442: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==442); + case 497: /* select_list ::= select_item */ yytestcase(yyruleno==497); + case 508: /* partition_list ::= partition_item */ yytestcase(yyruleno==508); + case 563: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==563); { yylhsminor.yy220 = createNodeList(pCxt, yymsp[0].minor.yy140); } yymsp[0].minor.yy220 = yylhsminor.yy220; break; - case 125: /* retention_list ::= retention_list NK_COMMA retention */ - case 158: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==158); - case 165: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==165); - case 209: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==209); - case 214: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==214); - case 265: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==265); - case 279: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==279); - case 369: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==369); - case 436: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==436); - case 497: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==497); - case 508: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==508); - case 563: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==563); + case 126: /* retention_list ::= retention_list NK_COMMA retention */ + case 159: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==159); + case 166: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==166); + case 210: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==210); + case 215: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==215); + case 266: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==266); + case 280: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==280); + case 370: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==370); + case 437: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==437); + case 498: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==498); + case 509: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==509); + case 564: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==564); { yylhsminor.yy220 = addNodeToList(pCxt, yymsp[-2].minor.yy220, yymsp[0].minor.yy140); } yymsp[-2].minor.yy220 = yylhsminor.yy220; break; - case 126: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + case 127: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ { yylhsminor.yy140 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 127: /* speed_opt ::= */ - case 311: /* bufsize_opt ::= */ yytestcase(yyruleno==311); + case 128: /* speed_opt ::= */ + case 312: /* bufsize_opt ::= */ yytestcase(yyruleno==312); { yymsp[1].minor.yy214 = 0; } break; - case 128: /* speed_opt ::= MAX_SPEED NK_INTEGER */ - case 312: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==312); + case 129: /* speed_opt ::= MAX_SPEED NK_INTEGER */ + case 313: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==313); { yymsp[-1].minor.yy214 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; - case 129: /* start_opt ::= */ - case 133: /* end_opt ::= */ yytestcase(yyruleno==133); - case 258: /* like_pattern_opt ::= */ yytestcase(yyruleno==258); - case 329: /* subtable_opt ::= */ yytestcase(yyruleno==329); - case 444: /* case_when_else_opt ::= */ yytestcase(yyruleno==444); - case 474: /* from_clause_opt ::= */ yytestcase(yyruleno==474); - case 503: /* where_clause_opt ::= */ yytestcase(yyruleno==503); - case 512: /* twindow_clause_opt ::= */ yytestcase(yyruleno==512); - case 518: /* sliding_opt ::= */ yytestcase(yyruleno==518); - case 520: /* fill_opt ::= */ yytestcase(yyruleno==520); - case 534: /* having_clause_opt ::= */ yytestcase(yyruleno==534); - case 536: /* range_opt ::= */ yytestcase(yyruleno==536); - case 538: /* every_opt ::= */ yytestcase(yyruleno==538); - case 551: /* slimit_clause_opt ::= */ yytestcase(yyruleno==551); - case 555: /* limit_clause_opt ::= */ yytestcase(yyruleno==555); + case 130: /* start_opt ::= */ + case 134: /* end_opt ::= */ yytestcase(yyruleno==134); + case 259: /* like_pattern_opt ::= */ yytestcase(yyruleno==259); + case 330: /* subtable_opt ::= */ yytestcase(yyruleno==330); + case 445: /* case_when_else_opt ::= */ yytestcase(yyruleno==445); + case 475: /* from_clause_opt ::= */ yytestcase(yyruleno==475); + case 504: /* where_clause_opt ::= */ yytestcase(yyruleno==504); + case 513: /* twindow_clause_opt ::= */ yytestcase(yyruleno==513); + case 519: /* sliding_opt ::= */ yytestcase(yyruleno==519); + case 521: /* fill_opt ::= */ yytestcase(yyruleno==521); + case 535: /* having_clause_opt ::= */ yytestcase(yyruleno==535); + case 537: /* range_opt ::= */ yytestcase(yyruleno==537); + case 539: /* every_opt ::= */ yytestcase(yyruleno==539); + case 552: /* slimit_clause_opt ::= */ yytestcase(yyruleno==552); + case 556: /* limit_clause_opt ::= */ yytestcase(yyruleno==556); { yymsp[1].minor.yy140 = NULL; } break; - case 130: /* start_opt ::= START WITH NK_INTEGER */ - case 134: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==134); + case 131: /* start_opt ::= START WITH NK_INTEGER */ + case 135: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==135); { yymsp[-2].minor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; - case 131: /* start_opt ::= START WITH NK_STRING */ - case 135: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==135); + case 132: /* start_opt ::= START WITH NK_STRING */ + case 136: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==136); { yymsp[-2].minor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 132: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ - case 136: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==136); + case 133: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ + case 137: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==137); { yymsp[-3].minor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 137: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - case 139: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==139); + case 138: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + case 140: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==140); { pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy587, yymsp[-5].minor.yy140, yymsp[-3].minor.yy220, yymsp[-1].minor.yy220, yymsp[0].minor.yy140); } break; - case 138: /* cmd ::= CREATE TABLE multi_create_clause */ + case 139: /* cmd ::= CREATE TABLE multi_create_clause */ { pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy220); } break; - case 140: /* cmd ::= DROP TABLE multi_drop_clause */ + case 141: /* cmd ::= DROP TABLE multi_drop_clause */ { pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy220); } break; - case 141: /* cmd ::= DROP STABLE exists_opt full_table_name */ + case 142: /* cmd ::= DROP STABLE exists_opt full_table_name */ { pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy587, yymsp[0].minor.yy140); } break; - case 142: /* cmd ::= ALTER TABLE alter_table_clause */ - case 341: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==341); - case 342: /* cmd ::= insert_query */ yytestcase(yyruleno==342); + case 143: /* cmd ::= ALTER TABLE alter_table_clause */ + case 342: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==342); + case 343: /* cmd ::= insert_query */ yytestcase(yyruleno==343); { pCxt->pRootNode = yymsp[0].minor.yy140; } break; - case 143: /* cmd ::= ALTER STABLE alter_table_clause */ + case 144: /* cmd ::= ALTER STABLE alter_table_clause */ { pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy140); } break; - case 144: /* alter_table_clause ::= full_table_name alter_table_options */ + case 145: /* alter_table_clause ::= full_table_name alter_table_options */ { yylhsminor.yy140 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 145: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + case 146: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ { yylhsminor.yy140 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy140, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy881, yymsp[0].minor.yy682); } yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 146: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ + case 147: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ { yylhsminor.yy140 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy140, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy881); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 147: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + case 148: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ { yylhsminor.yy140 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy140, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy881, yymsp[0].minor.yy682); } yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 148: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + case 149: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ { yylhsminor.yy140 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy140, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy881, &yymsp[0].minor.yy881); } yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 149: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + case 150: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ { yylhsminor.yy140 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy140, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy881, yymsp[0].minor.yy682); } yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 150: /* alter_table_clause ::= full_table_name DROP TAG column_name */ + case 151: /* alter_table_clause ::= full_table_name DROP TAG column_name */ { yylhsminor.yy140 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy140, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy881); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 151: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + case 152: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ { yylhsminor.yy140 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy140, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy881, yymsp[0].minor.yy682); } yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 152: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + case 153: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ { yylhsminor.yy140 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy140, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy881, &yymsp[0].minor.yy881); } yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 153: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + case 154: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ { yylhsminor.yy140 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy140, &yymsp[-2].minor.yy881, yymsp[0].minor.yy140); } yymsp[-5].minor.yy140 = yylhsminor.yy140; break; - case 155: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 442: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==442); + case 156: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ + case 443: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==443); { yylhsminor.yy220 = addNodeToList(pCxt, yymsp[-1].minor.yy220, yymsp[0].minor.yy140); } yymsp[-1].minor.yy220 = yylhsminor.yy220; break; - case 156: /* 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 */ + case 157: /* 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.yy140 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy587, yymsp[-8].minor.yy140, yymsp[-6].minor.yy140, yymsp[-5].minor.yy220, yymsp[-2].minor.yy220, yymsp[0].minor.yy140); } yymsp[-9].minor.yy140 = yylhsminor.yy140; break; - case 159: /* drop_table_clause ::= exists_opt full_table_name */ + case 160: /* drop_table_clause ::= exists_opt full_table_name */ { yylhsminor.yy140 = createDropTableClause(pCxt, yymsp[-1].minor.yy587, yymsp[0].minor.yy140); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 160: /* specific_cols_opt ::= */ - case 191: /* tags_def_opt ::= */ yytestcase(yyruleno==191); - case 263: /* tag_list_opt ::= */ yytestcase(yyruleno==263); - case 315: /* col_list_opt ::= */ yytestcase(yyruleno==315); - case 317: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==317); - case 505: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==505); - case 530: /* group_by_clause_opt ::= */ yytestcase(yyruleno==530); - case 549: /* order_by_clause_opt ::= */ yytestcase(yyruleno==549); + case 161: /* specific_cols_opt ::= */ + case 192: /* tags_def_opt ::= */ yytestcase(yyruleno==192); + case 264: /* tag_list_opt ::= */ yytestcase(yyruleno==264); + case 316: /* col_list_opt ::= */ yytestcase(yyruleno==316); + case 318: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==318); + case 506: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==506); + case 531: /* group_by_clause_opt ::= */ yytestcase(yyruleno==531); + case 550: /* order_by_clause_opt ::= */ yytestcase(yyruleno==550); { yymsp[1].minor.yy220 = NULL; } break; - case 161: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ - case 316: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==316); + case 162: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ + case 317: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==317); { yymsp[-2].minor.yy220 = yymsp[-1].minor.yy220; } break; - case 162: /* full_table_name ::= table_name */ + case 163: /* full_table_name ::= table_name */ { yylhsminor.yy140 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy881, NULL); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 163: /* full_table_name ::= db_name NK_DOT table_name */ + case 164: /* full_table_name ::= db_name NK_DOT table_name */ { yylhsminor.yy140 = createRealTableNode(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy881, NULL); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 166: /* column_def ::= column_name type_name */ + case 167: /* column_def ::= column_name type_name */ { yylhsminor.yy140 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy881, yymsp[0].minor.yy682, NULL); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 167: /* column_def ::= column_name type_name COMMENT NK_STRING */ + case 168: /* column_def ::= column_name type_name COMMENT NK_STRING */ { yylhsminor.yy140 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy881, yymsp[-2].minor.yy682, &yymsp[0].minor.yy0); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 168: /* type_name ::= BOOL */ + case 169: /* type_name ::= BOOL */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_BOOL); } break; - case 169: /* type_name ::= TINYINT */ + case 170: /* type_name ::= TINYINT */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; - case 170: /* type_name ::= SMALLINT */ + case 171: /* type_name ::= SMALLINT */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; - case 171: /* type_name ::= INT */ - case 172: /* type_name ::= INTEGER */ yytestcase(yyruleno==172); + case 172: /* type_name ::= INT */ + case 173: /* type_name ::= INTEGER */ yytestcase(yyruleno==173); { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_INT); } break; - case 173: /* type_name ::= BIGINT */ + case 174: /* type_name ::= BIGINT */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; - case 174: /* type_name ::= FLOAT */ + case 175: /* type_name ::= FLOAT */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; - case 175: /* type_name ::= DOUBLE */ + case 176: /* type_name ::= DOUBLE */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; - case 176: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + case 177: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy682 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; - case 177: /* type_name ::= TIMESTAMP */ + case 178: /* type_name ::= TIMESTAMP */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; - case 178: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + case 179: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy682 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; - case 179: /* type_name ::= TINYINT UNSIGNED */ + case 180: /* type_name ::= TINYINT UNSIGNED */ { yymsp[-1].minor.yy682 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; - case 180: /* type_name ::= SMALLINT UNSIGNED */ + case 181: /* type_name ::= SMALLINT UNSIGNED */ { yymsp[-1].minor.yy682 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; - case 181: /* type_name ::= INT UNSIGNED */ + case 182: /* type_name ::= INT UNSIGNED */ { yymsp[-1].minor.yy682 = createDataType(TSDB_DATA_TYPE_UINT); } break; - case 182: /* type_name ::= BIGINT UNSIGNED */ + case 183: /* type_name ::= BIGINT UNSIGNED */ { yymsp[-1].minor.yy682 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; - case 183: /* type_name ::= JSON */ + case 184: /* type_name ::= JSON */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_JSON); } break; - case 184: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + case 185: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy682 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; - case 185: /* type_name ::= MEDIUMBLOB */ + case 186: /* type_name ::= MEDIUMBLOB */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; - case 186: /* type_name ::= BLOB */ + case 187: /* type_name ::= BLOB */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_BLOB); } break; - case 187: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + case 188: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy682 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; - case 188: /* type_name ::= DECIMAL */ + case 189: /* type_name ::= DECIMAL */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 189: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + case 190: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy682 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 190: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + case 191: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ { yymsp[-5].minor.yy682 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 192: /* tags_def_opt ::= tags_def */ - case 318: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==318); - case 434: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==434); + case 193: /* tags_def_opt ::= tags_def */ + case 319: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==319); + case 435: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==435); { yylhsminor.yy220 = yymsp[0].minor.yy220; } yymsp[0].minor.yy220 = yylhsminor.yy220; break; - case 193: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ - case 319: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==319); + case 194: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ + case 320: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==320); { yymsp[-3].minor.yy220 = yymsp[-1].minor.yy220; } break; - case 194: /* table_options ::= */ + case 195: /* table_options ::= */ { yymsp[1].minor.yy140 = createDefaultTableOptions(pCxt); } break; - case 195: /* table_options ::= table_options COMMENT NK_STRING */ + case 196: /* table_options ::= table_options COMMENT NK_STRING */ { yylhsminor.yy140 = setTableOption(pCxt, yymsp[-2].minor.yy140, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 196: /* table_options ::= table_options MAX_DELAY duration_list */ + case 197: /* table_options ::= table_options MAX_DELAY duration_list */ { yylhsminor.yy140 = setTableOption(pCxt, yymsp[-2].minor.yy140, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy220); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 197: /* table_options ::= table_options WATERMARK duration_list */ + case 198: /* table_options ::= table_options WATERMARK duration_list */ { yylhsminor.yy140 = setTableOption(pCxt, yymsp[-2].minor.yy140, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy220); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 198: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + case 199: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ { yylhsminor.yy140 = setTableOption(pCxt, yymsp[-4].minor.yy140, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy220); } yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 199: /* table_options ::= table_options TTL NK_INTEGER */ + case 200: /* table_options ::= table_options TTL NK_INTEGER */ { yylhsminor.yy140 = setTableOption(pCxt, yymsp[-2].minor.yy140, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 200: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + case 201: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ { yylhsminor.yy140 = setTableOption(pCxt, yymsp[-4].minor.yy140, TABLE_OPTION_SMA, yymsp[-1].minor.yy220); } yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 201: /* table_options ::= table_options DELETE_MARK duration_list */ + case 202: /* table_options ::= table_options DELETE_MARK duration_list */ { yylhsminor.yy140 = setTableOption(pCxt, yymsp[-2].minor.yy140, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy220); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 202: /* alter_table_options ::= alter_table_option */ + case 203: /* alter_table_options ::= alter_table_option */ { yylhsminor.yy140 = createAlterTableOptions(pCxt); yylhsminor.yy140 = setTableOption(pCxt, yylhsminor.yy140, yymsp[0].minor.yy809.type, &yymsp[0].minor.yy809.val); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 203: /* alter_table_options ::= alter_table_options alter_table_option */ + case 204: /* alter_table_options ::= alter_table_options alter_table_option */ { yylhsminor.yy140 = setTableOption(pCxt, yymsp[-1].minor.yy140, yymsp[0].minor.yy809.type, &yymsp[0].minor.yy809.val); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 204: /* alter_table_option ::= COMMENT NK_STRING */ + case 205: /* alter_table_option ::= COMMENT NK_STRING */ { yymsp[-1].minor.yy809.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy809.val = yymsp[0].minor.yy0; } break; - case 205: /* alter_table_option ::= TTL NK_INTEGER */ + case 206: /* alter_table_option ::= TTL NK_INTEGER */ { yymsp[-1].minor.yy809.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy809.val = yymsp[0].minor.yy0; } break; - case 206: /* duration_list ::= duration_literal */ - case 398: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==398); + case 207: /* duration_list ::= duration_literal */ + case 399: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==399); { yylhsminor.yy220 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } yymsp[0].minor.yy220 = yylhsminor.yy220; break; - case 207: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 399: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==399); + case 208: /* duration_list ::= duration_list NK_COMMA duration_literal */ + case 400: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==400); { yylhsminor.yy220 = addNodeToList(pCxt, yymsp[-2].minor.yy220, releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } yymsp[-2].minor.yy220 = yylhsminor.yy220; break; - case 210: /* rollup_func_name ::= function_name */ + case 211: /* rollup_func_name ::= function_name */ { yylhsminor.yy140 = createFunctionNode(pCxt, &yymsp[0].minor.yy881, NULL); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 211: /* rollup_func_name ::= FIRST */ - case 212: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==212); - case 267: /* tag_item ::= QTAGS */ yytestcase(yyruleno==267); + case 212: /* rollup_func_name ::= FIRST */ + case 213: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==213); + case 268: /* tag_item ::= QTAGS */ yytestcase(yyruleno==268); { yylhsminor.yy140 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 215: /* col_name ::= column_name */ - case 268: /* tag_item ::= column_name */ yytestcase(yyruleno==268); + case 216: /* col_name ::= column_name */ + case 269: /* tag_item ::= column_name */ yytestcase(yyruleno==269); { yylhsminor.yy140 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy881); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 216: /* cmd ::= SHOW DNODES */ + case 217: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } break; - case 217: /* cmd ::= SHOW USERS */ + case 218: /* cmd ::= SHOW USERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } break; - case 218: /* cmd ::= SHOW USER PRIVILEGES */ + case 219: /* cmd ::= SHOW USER PRIVILEGES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); } break; - case 219: /* cmd ::= SHOW DATABASES */ + case 220: /* cmd ::= SHOW DATABASES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); } break; - case 220: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + case 221: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy140, yymsp[0].minor.yy140, OP_TYPE_LIKE); } break; - case 221: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + case 222: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy140, yymsp[0].minor.yy140, OP_TYPE_LIKE); } break; - case 222: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ + case 223: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy140, NULL, OP_TYPE_LIKE); } break; - case 223: /* cmd ::= SHOW MNODES */ + case 224: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } break; - case 224: /* cmd ::= SHOW QNODES */ + case 225: /* cmd ::= SHOW QNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } break; - case 225: /* cmd ::= SHOW FUNCTIONS */ + case 226: /* cmd ::= SHOW FUNCTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; - case 226: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + case 227: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy140, yymsp[-1].minor.yy140, OP_TYPE_EQUAL); } break; - case 227: /* cmd ::= SHOW STREAMS */ + case 228: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } break; - case 228: /* cmd ::= SHOW ACCOUNTS */ + case 229: /* cmd ::= SHOW ACCOUNTS */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } break; - case 229: /* cmd ::= SHOW APPS */ + case 230: /* cmd ::= SHOW APPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } break; - case 230: /* cmd ::= SHOW CONNECTIONS */ + case 231: /* cmd ::= SHOW CONNECTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } break; - case 231: /* cmd ::= SHOW LICENCES */ - case 232: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==232); + case 232: /* cmd ::= SHOW LICENCES */ + case 233: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==233); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } break; - case 233: /* cmd ::= SHOW CREATE DATABASE db_name */ + case 234: /* cmd ::= SHOW CREATE DATABASE db_name */ { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy881); } break; - case 234: /* cmd ::= SHOW CREATE TABLE full_table_name */ + case 235: /* cmd ::= SHOW CREATE TABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy140); } break; - case 235: /* cmd ::= SHOW CREATE STABLE full_table_name */ + case 236: /* cmd ::= SHOW CREATE STABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy140); } break; - case 236: /* cmd ::= SHOW QUERIES */ + case 237: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } break; - case 237: /* cmd ::= SHOW SCORES */ + case 238: /* cmd ::= SHOW SCORES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } break; - case 238: /* cmd ::= SHOW TOPICS */ + case 239: /* cmd ::= SHOW TOPICS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } break; - case 239: /* cmd ::= SHOW VARIABLES */ - case 240: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==240); + case 240: /* cmd ::= SHOW VARIABLES */ + case 241: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==241); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } break; - case 241: /* cmd ::= SHOW LOCAL VARIABLES */ + case 242: /* cmd ::= SHOW LOCAL VARIABLES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } break; - case 242: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + case 243: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ { pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy140); } break; - case 243: /* cmd ::= SHOW BNODES */ + case 244: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } break; - case 244: /* cmd ::= SHOW SNODES */ + case 245: /* cmd ::= SHOW SNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } break; - case 245: /* cmd ::= SHOW CLUSTER */ + case 246: /* cmd ::= SHOW CLUSTER */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } break; - case 246: /* cmd ::= SHOW TRANSACTIONS */ + case 247: /* cmd ::= SHOW TRANSACTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; - case 247: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + case 248: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ { pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy140); } break; - case 248: /* cmd ::= SHOW CONSUMERS */ + case 249: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } break; - case 249: /* cmd ::= SHOW SUBSCRIPTIONS */ + case 250: /* cmd ::= SHOW SUBSCRIPTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } break; - case 250: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + case 251: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy140, yymsp[-1].minor.yy140, OP_TYPE_EQUAL); } break; - case 251: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + case 252: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy140, yymsp[0].minor.yy140, yymsp[-3].minor.yy220); } break; - case 252: /* cmd ::= SHOW VNODES NK_INTEGER */ + case 253: /* cmd ::= SHOW VNODES NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } break; - case 253: /* cmd ::= SHOW VNODES NK_STRING */ + case 254: /* cmd ::= SHOW VNODES NK_STRING */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, createValueNode(pCxt, TSDB_DATA_TYPE_VARCHAR, &yymsp[0].minor.yy0)); } break; - case 254: /* cmd ::= SHOW db_name_cond_opt ALIVE */ + case 255: /* cmd ::= SHOW db_name_cond_opt ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy140, QUERY_NODE_SHOW_DB_ALIVE_STMT); } break; - case 255: /* cmd ::= SHOW CLUSTER ALIVE */ + case 256: /* cmd ::= SHOW CLUSTER ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } break; - case 256: /* db_name_cond_opt ::= */ - case 261: /* from_db_opt ::= */ yytestcase(yyruleno==261); + case 257: /* db_name_cond_opt ::= */ + case 262: /* from_db_opt ::= */ yytestcase(yyruleno==262); { yymsp[1].minor.yy140 = createDefaultDatabaseCondValue(pCxt); } break; - case 257: /* db_name_cond_opt ::= db_name NK_DOT */ + case 258: /* db_name_cond_opt ::= db_name NK_DOT */ { yylhsminor.yy140 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy881); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 259: /* like_pattern_opt ::= LIKE NK_STRING */ + case 260: /* like_pattern_opt ::= LIKE NK_STRING */ { yymsp[-1].minor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; - case 260: /* table_name_cond ::= table_name */ + case 261: /* table_name_cond ::= table_name */ { yylhsminor.yy140 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy881); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 262: /* from_db_opt ::= FROM db_name */ + case 263: /* from_db_opt ::= FROM db_name */ { yymsp[-1].minor.yy140 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy881); } break; - case 266: /* tag_item ::= TBNAME */ + case 267: /* tag_item ::= TBNAME */ { yylhsminor.yy140 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 269: /* tag_item ::= column_name column_alias */ + case 270: /* tag_item ::= column_name column_alias */ { yylhsminor.yy140 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy881), &yymsp[0].minor.yy881); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 270: /* tag_item ::= column_name AS column_alias */ + case 271: /* tag_item ::= column_name AS column_alias */ { yylhsminor.yy140 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy881), &yymsp[0].minor.yy881); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 271: /* cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ + case 272: /* cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy587, yymsp[-3].minor.yy140, yymsp[-1].minor.yy140, NULL, yymsp[0].minor.yy140); } break; - case 272: /* cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ + case 273: /* cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy587, yymsp[-5].minor.yy140, yymsp[-3].minor.yy140, yymsp[-1].minor.yy220, NULL); } break; - case 273: /* cmd ::= DROP INDEX exists_opt full_index_name */ + case 274: /* cmd ::= DROP INDEX exists_opt full_index_name */ { pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy587, yymsp[0].minor.yy140); } break; - case 274: /* full_index_name ::= index_name */ + case 275: /* full_index_name ::= index_name */ { yylhsminor.yy140 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy881); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 275: /* full_index_name ::= db_name NK_DOT index_name */ + case 276: /* full_index_name ::= db_name NK_DOT index_name */ { yylhsminor.yy140 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy881); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 276: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + case 277: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ { yymsp[-9].minor.yy140 = createIndexOption(pCxt, yymsp[-7].minor.yy220, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), NULL, yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; - case 277: /* 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 */ + case 278: /* 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.yy140 = createIndexOption(pCxt, yymsp[-9].minor.yy220, releaseRawExprNode(pCxt, yymsp[-5].minor.yy140), releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; - case 280: /* func ::= sma_func_name NK_LP expression_list NK_RP */ + case 281: /* func ::= sma_func_name NK_LP expression_list NK_RP */ { yylhsminor.yy140 = createFunctionNode(pCxt, &yymsp[-3].minor.yy881, yymsp[-1].minor.yy220); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 286: /* sma_stream_opt ::= */ - case 320: /* stream_options ::= */ yytestcase(yyruleno==320); + case 287: /* sma_stream_opt ::= */ + case 321: /* stream_options ::= */ yytestcase(yyruleno==321); { yymsp[1].minor.yy140 = createStreamOptions(pCxt); } break; - case 287: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + case 288: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy140)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy140); yylhsminor.yy140 = yymsp[-2].minor.yy140; } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 288: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + case 289: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy140)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy140); yylhsminor.yy140 = yymsp[-2].minor.yy140; } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 289: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + case 290: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy140)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy140); yylhsminor.yy140 = yymsp[-2].minor.yy140; } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 290: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + case 291: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ { pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy587, &yymsp[-2].minor.yy881, yymsp[0].minor.yy140); } break; - case 291: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ + case 292: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ { pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy587, &yymsp[-3].minor.yy881, &yymsp[0].minor.yy881, false); } break; - case 292: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ + case 293: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ { pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy587, &yymsp[-5].minor.yy881, &yymsp[0].minor.yy881, true); } break; - case 293: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ + case 294: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ { pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy587, &yymsp[-3].minor.yy881, yymsp[0].minor.yy140, false); } break; - case 294: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ + case 295: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ { pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy587, &yymsp[-5].minor.yy881, yymsp[0].minor.yy140, true); } break; - case 295: /* cmd ::= DROP TOPIC exists_opt topic_name */ + case 296: /* cmd ::= DROP TOPIC exists_opt topic_name */ { pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy587, &yymsp[0].minor.yy881); } break; - case 296: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + case 297: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ { pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy587, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy881); } break; - case 297: /* cmd ::= DESC full_table_name */ - case 298: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==298); + case 298: /* cmd ::= DESC full_table_name */ + case 299: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==299); { pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy140); } break; - case 299: /* cmd ::= RESET QUERY CACHE */ + case 300: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 300: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - case 301: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==301); + case 301: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + case 302: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==302); { pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy587, yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; - case 304: /* explain_options ::= */ + case 305: /* explain_options ::= */ { yymsp[1].minor.yy140 = createDefaultExplainOptions(pCxt); } break; - case 305: /* explain_options ::= explain_options VERBOSE NK_BOOL */ + case 306: /* explain_options ::= explain_options VERBOSE NK_BOOL */ { yylhsminor.yy140 = setExplainVerbose(pCxt, yymsp[-2].minor.yy140, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 306: /* explain_options ::= explain_options RATIO NK_FLOAT */ + case 307: /* explain_options ::= explain_options RATIO NK_FLOAT */ { yylhsminor.yy140 = setExplainRatio(pCxt, yymsp[-2].minor.yy140, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 307: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + case 308: /* 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.yy587, yymsp[-8].minor.yy587, &yymsp[-5].minor.yy881, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy682, yymsp[0].minor.yy214); } break; - case 308: /* cmd ::= DROP FUNCTION exists_opt function_name */ + case 309: /* cmd ::= DROP FUNCTION exists_opt function_name */ { pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy587, &yymsp[0].minor.yy881); } break; - case 313: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ + case 314: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ { pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy587, &yymsp[-8].minor.yy881, yymsp[-5].minor.yy140, yymsp[-7].minor.yy140, yymsp[-3].minor.yy220, yymsp[-2].minor.yy140, yymsp[0].minor.yy140, yymsp[-4].minor.yy220); } break; - case 314: /* cmd ::= DROP STREAM exists_opt stream_name */ + case 315: /* cmd ::= DROP STREAM exists_opt stream_name */ { pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy587, &yymsp[0].minor.yy881); } break; - case 321: /* stream_options ::= stream_options TRIGGER AT_ONCE */ - case 322: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==322); + case 322: /* stream_options ::= stream_options TRIGGER AT_ONCE */ + case 323: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==323); { yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-2].minor.yy140, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 323: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + case 324: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ { yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-3].minor.yy140, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 324: /* stream_options ::= stream_options WATERMARK duration_literal */ + case 325: /* stream_options ::= stream_options WATERMARK duration_literal */ { yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-2].minor.yy140, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 325: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + case 326: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ { yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-3].minor.yy140, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 326: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + case 327: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ { yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-2].minor.yy140, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 327: /* stream_options ::= stream_options DELETE_MARK duration_literal */ + case 328: /* stream_options ::= stream_options DELETE_MARK duration_literal */ { yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-2].minor.yy140, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 328: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + case 329: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ { yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-3].minor.yy140, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 330: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 519: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==519); - case 539: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==539); + case 331: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 520: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==520); + case 540: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==540); { yymsp[-3].minor.yy140 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy140); } break; - case 331: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 332: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 332: /* cmd ::= KILL QUERY NK_STRING */ + case 333: /* cmd ::= KILL QUERY NK_STRING */ { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 333: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 334: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 334: /* cmd ::= BALANCE VGROUP */ + case 335: /* cmd ::= BALANCE VGROUP */ { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } break; - case 335: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 336: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 336: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + case 337: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ { pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy220); } break; - case 337: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 338: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 338: /* dnode_list ::= DNODE NK_INTEGER */ + case 339: /* dnode_list ::= DNODE NK_INTEGER */ { yymsp[-1].minor.yy220 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 340: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ + case 341: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ { pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; - case 343: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + case 344: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ { yymsp[-6].minor.yy140 = createInsertStmt(pCxt, yymsp[-4].minor.yy140, yymsp[-2].minor.yy220, yymsp[0].minor.yy140); } break; - case 344: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ + case 345: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ { yymsp[-3].minor.yy140 = createInsertStmt(pCxt, yymsp[-1].minor.yy140, NULL, yymsp[0].minor.yy140); } break; - case 345: /* literal ::= NK_INTEGER */ + case 346: /* literal ::= NK_INTEGER */ { yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 346: /* literal ::= NK_FLOAT */ + case 347: /* literal ::= NK_FLOAT */ { yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 347: /* literal ::= NK_STRING */ + case 348: /* literal ::= NK_STRING */ { yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 348: /* literal ::= NK_BOOL */ + case 349: /* literal ::= NK_BOOL */ { yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 349: /* literal ::= TIMESTAMP NK_STRING */ + case 350: /* literal ::= TIMESTAMP NK_STRING */ { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 350: /* literal ::= duration_literal */ - case 360: /* signed_literal ::= signed */ yytestcase(yyruleno==360); - case 381: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==381); - case 382: /* expression ::= literal */ yytestcase(yyruleno==382); - case 383: /* expression ::= pseudo_column */ yytestcase(yyruleno==383); - case 384: /* expression ::= column_reference */ yytestcase(yyruleno==384); - case 385: /* expression ::= function_expression */ yytestcase(yyruleno==385); - case 386: /* expression ::= case_when_expression */ yytestcase(yyruleno==386); - case 417: /* function_expression ::= literal_func */ yytestcase(yyruleno==417); - case 466: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==466); - case 470: /* boolean_primary ::= predicate */ yytestcase(yyruleno==470); - case 472: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==472); - case 473: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==473); - case 476: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==476); - case 478: /* table_reference ::= table_primary */ yytestcase(yyruleno==478); - case 479: /* table_reference ::= joined_table */ yytestcase(yyruleno==479); - case 483: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==483); - case 541: /* query_simple ::= query_specification */ yytestcase(yyruleno==541); - case 542: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==542); - case 545: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==545); - case 547: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==547); + case 351: /* literal ::= duration_literal */ + case 361: /* signed_literal ::= signed */ yytestcase(yyruleno==361); + case 382: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==382); + case 383: /* expression ::= literal */ yytestcase(yyruleno==383); + case 384: /* expression ::= pseudo_column */ yytestcase(yyruleno==384); + case 385: /* expression ::= column_reference */ yytestcase(yyruleno==385); + case 386: /* expression ::= function_expression */ yytestcase(yyruleno==386); + case 387: /* expression ::= case_when_expression */ yytestcase(yyruleno==387); + case 418: /* function_expression ::= literal_func */ yytestcase(yyruleno==418); + case 467: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==467); + case 471: /* boolean_primary ::= predicate */ yytestcase(yyruleno==471); + case 473: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==473); + case 474: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==474); + case 477: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==477); + case 479: /* table_reference ::= table_primary */ yytestcase(yyruleno==479); + case 480: /* table_reference ::= joined_table */ yytestcase(yyruleno==480); + case 484: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==484); + case 542: /* query_simple ::= query_specification */ yytestcase(yyruleno==542); + case 543: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==543); + case 546: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==546); + case 548: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==548); { yylhsminor.yy140 = yymsp[0].minor.yy140; } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 351: /* literal ::= NULL */ + case 352: /* literal ::= NULL */ { yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 352: /* literal ::= NK_QUESTION */ + case 353: /* literal ::= NK_QUESTION */ { yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 353: /* duration_literal ::= NK_VARIABLE */ + case 354: /* duration_literal ::= NK_VARIABLE */ { yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 354: /* signed ::= NK_INTEGER */ + case 355: /* signed ::= NK_INTEGER */ { yylhsminor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 355: /* signed ::= NK_PLUS NK_INTEGER */ + case 356: /* signed ::= NK_PLUS NK_INTEGER */ { yymsp[-1].minor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; - case 356: /* signed ::= NK_MINUS NK_INTEGER */ + case 357: /* 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; @@ -4832,14 +4837,14 @@ static YYACTIONTYPE yy_reduce( } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 357: /* signed ::= NK_FLOAT */ + case 358: /* signed ::= NK_FLOAT */ { yylhsminor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 358: /* signed ::= NK_PLUS NK_FLOAT */ + case 359: /* signed ::= NK_PLUS NK_FLOAT */ { yymsp[-1].minor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 359: /* signed ::= NK_MINUS NK_FLOAT */ + case 360: /* 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; @@ -4847,57 +4852,57 @@ static YYACTIONTYPE yy_reduce( } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 361: /* signed_literal ::= NK_STRING */ + case 362: /* signed_literal ::= NK_STRING */ { yylhsminor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 362: /* signed_literal ::= NK_BOOL */ + case 363: /* signed_literal ::= NK_BOOL */ { yylhsminor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 363: /* signed_literal ::= TIMESTAMP NK_STRING */ + case 364: /* signed_literal ::= TIMESTAMP NK_STRING */ { yymsp[-1].minor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 364: /* signed_literal ::= duration_literal */ - case 366: /* signed_literal ::= literal_func */ yytestcase(yyruleno==366); - case 437: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==437); - case 499: /* select_item ::= common_expression */ yytestcase(yyruleno==499); - case 509: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==509); - case 546: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==546); - case 548: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==548); - case 561: /* search_condition ::= common_expression */ yytestcase(yyruleno==561); + case 365: /* signed_literal ::= duration_literal */ + case 367: /* signed_literal ::= literal_func */ yytestcase(yyruleno==367); + case 438: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==438); + case 500: /* select_item ::= common_expression */ yytestcase(yyruleno==500); + case 510: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==510); + case 547: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==547); + case 549: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==549); + case 562: /* search_condition ::= common_expression */ yytestcase(yyruleno==562); { yylhsminor.yy140 = releaseRawExprNode(pCxt, yymsp[0].minor.yy140); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 365: /* signed_literal ::= NULL */ + case 366: /* signed_literal ::= NULL */ { yylhsminor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 367: /* signed_literal ::= NK_QUESTION */ + case 368: /* signed_literal ::= NK_QUESTION */ { yylhsminor.yy140 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 387: /* expression ::= NK_LP expression NK_RP */ - case 471: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==471); - case 560: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==560); + case 388: /* expression ::= NK_LP expression NK_RP */ + case 472: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==472); + case 561: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==561); { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy140)); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 388: /* expression ::= NK_PLUS expr_or_subquery */ + case 389: /* expression ::= NK_PLUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 389: /* expression ::= NK_MINUS expr_or_subquery */ + case 390: /* expression ::= NK_MINUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy140), NULL)); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 390: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + case 391: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -4905,7 +4910,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 391: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + case 392: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -4913,7 +4918,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 392: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + case 393: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -4921,7 +4926,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 393: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + case 394: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -4929,7 +4934,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 394: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ + case 395: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -4937,14 +4942,14 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 395: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 396: /* expression ::= column_reference NK_ARROW NK_STRING */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 396: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + case 397: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -4952,7 +4957,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 397: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + case 398: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -4960,71 +4965,71 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 400: /* column_reference ::= column_name */ + case 401: /* column_reference ::= column_name */ { yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy881, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy881)); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 401: /* column_reference ::= table_name NK_DOT column_name */ + case 402: /* column_reference ::= table_name NK_DOT column_name */ { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy881, createColumnNode(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy881)); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 402: /* pseudo_column ::= ROWTS */ - case 403: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==403); - case 405: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==405); - case 406: /* pseudo_column ::= QEND */ yytestcase(yyruleno==406); - case 407: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==407); - case 408: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==408); - case 409: /* pseudo_column ::= WEND */ yytestcase(yyruleno==409); - case 410: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==410); - case 411: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==411); - case 412: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==412); - case 413: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==413); - case 419: /* literal_func ::= NOW */ yytestcase(yyruleno==419); + case 403: /* pseudo_column ::= ROWTS */ + case 404: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==404); + case 406: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==406); + case 407: /* pseudo_column ::= QEND */ yytestcase(yyruleno==407); + case 408: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==408); + case 409: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==409); + case 410: /* pseudo_column ::= WEND */ yytestcase(yyruleno==410); + case 411: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==411); + case 412: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==412); + case 413: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==413); + case 414: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==414); + case 420: /* literal_func ::= NOW */ yytestcase(yyruleno==420); { yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 404: /* pseudo_column ::= table_name NK_DOT TBNAME */ + case 405: /* pseudo_column ::= table_name NK_DOT TBNAME */ { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy881)))); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 414: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 415: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==415); + case 415: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 416: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==416); { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy881, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy881, yymsp[-1].minor.yy220)); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 416: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + case 417: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), yymsp[-1].minor.yy682)); } yymsp[-5].minor.yy140 = yylhsminor.yy140; break; - case 418: /* literal_func ::= noarg_func NK_LP NK_RP */ + case 419: /* literal_func ::= noarg_func NK_LP NK_RP */ { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy881, NULL)); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 433: /* star_func_para_list ::= NK_STAR */ + case 434: /* star_func_para_list ::= NK_STAR */ { yylhsminor.yy220 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy220 = yylhsminor.yy220; break; - case 438: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 502: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==502); + case 439: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 503: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==503); { yylhsminor.yy140 = createColumnNode(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 439: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ + case 440: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy220, yymsp[-1].minor.yy140)); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 440: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + case 441: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), yymsp[-2].minor.yy220, yymsp[-1].minor.yy140)); } yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 443: /* when_then_expr ::= WHEN common_expression THEN common_expression */ + case 444: /* when_then_expr ::= WHEN common_expression THEN common_expression */ { yymsp[-3].minor.yy140 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } break; - case 445: /* case_when_else_opt ::= ELSE common_expression */ + case 446: /* case_when_else_opt ::= ELSE common_expression */ { yymsp[-1].minor.yy140 = releaseRawExprNode(pCxt, yymsp[0].minor.yy140); } break; - case 446: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 451: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==451); + case 447: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 452: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==452); { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -5032,7 +5037,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 447: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 448: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -5040,7 +5045,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 448: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 449: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -5048,71 +5053,71 @@ static YYACTIONTYPE yy_reduce( } yymsp[-5].minor.yy140 = yylhsminor.yy140; break; - case 449: /* predicate ::= expr_or_subquery IS NULL */ + case 450: /* predicate ::= expr_or_subquery IS NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), NULL)); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 450: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 451: /* predicate ::= expr_or_subquery IS NOT NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy140); yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), NULL)); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 452: /* compare_op ::= NK_LT */ + case 453: /* compare_op ::= NK_LT */ { yymsp[0].minor.yy794 = OP_TYPE_LOWER_THAN; } break; - case 453: /* compare_op ::= NK_GT */ + case 454: /* compare_op ::= NK_GT */ { yymsp[0].minor.yy794 = OP_TYPE_GREATER_THAN; } break; - case 454: /* compare_op ::= NK_LE */ + case 455: /* compare_op ::= NK_LE */ { yymsp[0].minor.yy794 = OP_TYPE_LOWER_EQUAL; } break; - case 455: /* compare_op ::= NK_GE */ + case 456: /* compare_op ::= NK_GE */ { yymsp[0].minor.yy794 = OP_TYPE_GREATER_EQUAL; } break; - case 456: /* compare_op ::= NK_NE */ + case 457: /* compare_op ::= NK_NE */ { yymsp[0].minor.yy794 = OP_TYPE_NOT_EQUAL; } break; - case 457: /* compare_op ::= NK_EQ */ + case 458: /* compare_op ::= NK_EQ */ { yymsp[0].minor.yy794 = OP_TYPE_EQUAL; } break; - case 458: /* compare_op ::= LIKE */ + case 459: /* compare_op ::= LIKE */ { yymsp[0].minor.yy794 = OP_TYPE_LIKE; } break; - case 459: /* compare_op ::= NOT LIKE */ + case 460: /* compare_op ::= NOT LIKE */ { yymsp[-1].minor.yy794 = OP_TYPE_NOT_LIKE; } break; - case 460: /* compare_op ::= MATCH */ + case 461: /* compare_op ::= MATCH */ { yymsp[0].minor.yy794 = OP_TYPE_MATCH; } break; - case 461: /* compare_op ::= NMATCH */ + case 462: /* compare_op ::= NMATCH */ { yymsp[0].minor.yy794 = OP_TYPE_NMATCH; } break; - case 462: /* compare_op ::= CONTAINS */ + case 463: /* compare_op ::= CONTAINS */ { yymsp[0].minor.yy794 = OP_TYPE_JSON_CONTAINS; } break; - case 463: /* in_op ::= IN */ + case 464: /* in_op ::= IN */ { yymsp[0].minor.yy794 = OP_TYPE_IN; } break; - case 464: /* in_op ::= NOT IN */ + case 465: /* in_op ::= NOT IN */ { yymsp[-1].minor.yy794 = OP_TYPE_NOT_IN; } break; - case 465: /* in_predicate_value ::= NK_LP literal_list NK_RP */ + case 466: /* in_predicate_value ::= NK_LP literal_list NK_RP */ { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy220)); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 467: /* boolean_value_expression ::= NOT boolean_primary */ + case 468: /* boolean_value_expression ::= NOT boolean_primary */ { SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy140), NULL)); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 468: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 469: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -5120,7 +5125,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 469: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 470: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -5128,48 +5133,48 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 475: /* from_clause_opt ::= FROM table_reference_list */ - case 504: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==504); - case 535: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==535); + case 476: /* from_clause_opt ::= FROM table_reference_list */ + case 505: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==505); + case 536: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==536); { yymsp[-1].minor.yy140 = yymsp[0].minor.yy140; } break; - case 477: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ + case 478: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ { yylhsminor.yy140 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy140, yymsp[0].minor.yy140, NULL); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 480: /* table_primary ::= table_name alias_opt */ + case 481: /* table_primary ::= table_name alias_opt */ { yylhsminor.yy140 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy881, &yymsp[0].minor.yy881); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 481: /* table_primary ::= db_name NK_DOT table_name alias_opt */ + case 482: /* table_primary ::= db_name NK_DOT table_name alias_opt */ { yylhsminor.yy140 = createRealTableNode(pCxt, &yymsp[-3].minor.yy881, &yymsp[-1].minor.yy881, &yymsp[0].minor.yy881); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 482: /* table_primary ::= subquery alias_opt */ + case 483: /* table_primary ::= subquery alias_opt */ { yylhsminor.yy140 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy140), &yymsp[0].minor.yy881); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 484: /* alias_opt ::= */ + case 485: /* alias_opt ::= */ { yymsp[1].minor.yy881 = nil_token; } break; - case 486: /* alias_opt ::= AS table_alias */ + case 487: /* alias_opt ::= AS table_alias */ { yymsp[-1].minor.yy881 = yymsp[0].minor.yy881; } break; - case 487: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 488: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==488); + case 488: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 489: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==489); { yymsp[-2].minor.yy140 = yymsp[-1].minor.yy140; } break; - case 489: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + case 490: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ { yylhsminor.yy140 = createJoinTableNode(pCxt, yymsp[-4].minor.yy852, yymsp[-5].minor.yy140, yymsp[-2].minor.yy140, yymsp[0].minor.yy140); } yymsp[-5].minor.yy140 = yylhsminor.yy140; break; - case 490: /* join_type ::= */ + case 491: /* join_type ::= */ { yymsp[1].minor.yy852 = JOIN_TYPE_INNER; } break; - case 491: /* join_type ::= INNER */ + case 492: /* join_type ::= INNER */ { yymsp[0].minor.yy852 = JOIN_TYPE_INNER; } break; - case 492: /* 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 493: /* 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.yy140 = createSelectStmt(pCxt, yymsp[-10].minor.yy587, yymsp[-9].minor.yy220, yymsp[-8].minor.yy140); yymsp[-11].minor.yy140 = addWhereClause(pCxt, yymsp[-11].minor.yy140, yymsp[-7].minor.yy140); @@ -5182,82 +5187,82 @@ static YYACTIONTYPE yy_reduce( yymsp[-11].minor.yy140 = addFillClause(pCxt, yymsp[-11].minor.yy140, yymsp[-3].minor.yy140); } break; - case 495: /* set_quantifier_opt ::= ALL */ + case 496: /* set_quantifier_opt ::= ALL */ { yymsp[0].minor.yy587 = false; } break; - case 498: /* select_item ::= NK_STAR */ + case 499: /* select_item ::= NK_STAR */ { yylhsminor.yy140 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 500: /* select_item ::= common_expression column_alias */ - case 510: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==510); + case 501: /* select_item ::= common_expression column_alias */ + case 511: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==511); { yylhsminor.yy140 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy140), &yymsp[0].minor.yy881); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 501: /* select_item ::= common_expression AS column_alias */ - case 511: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==511); + case 502: /* select_item ::= common_expression AS column_alias */ + case 512: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==512); { yylhsminor.yy140 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), &yymsp[0].minor.yy881); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 506: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 531: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==531); - case 550: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==550); + case 507: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 532: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==532); + case 551: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==551); { yymsp[-2].minor.yy220 = yymsp[0].minor.yy220; } break; - case 513: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + case 514: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ { yymsp[-5].minor.yy140 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), releaseRawExprNode(pCxt, yymsp[-1].minor.yy140)); } break; - case 514: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + case 515: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ { yymsp[-3].minor.yy140 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy140)); } break; - case 515: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + case 516: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-5].minor.yy140 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), NULL, yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; - case 516: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + case 517: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-7].minor.yy140 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy140), releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; - case 517: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + case 518: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ { yymsp[-6].minor.yy140 = createEventWindowNode(pCxt, yymsp[-3].minor.yy140, yymsp[0].minor.yy140); } break; - case 521: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ + case 522: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ { yymsp[-3].minor.yy140 = createFillNode(pCxt, yymsp[-1].minor.yy174, NULL); } break; - case 522: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + case 523: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ { yymsp[-5].minor.yy140 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy220)); } break; - case 523: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */ + case 524: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */ { yymsp[-5].minor.yy140 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy220)); } break; - case 524: /* fill_mode ::= NONE */ + case 525: /* fill_mode ::= NONE */ { yymsp[0].minor.yy174 = FILL_MODE_NONE; } break; - case 525: /* fill_mode ::= PREV */ + case 526: /* fill_mode ::= PREV */ { yymsp[0].minor.yy174 = FILL_MODE_PREV; } break; - case 526: /* fill_mode ::= NULL */ + case 527: /* fill_mode ::= NULL */ { yymsp[0].minor.yy174 = FILL_MODE_NULL; } break; - case 527: /* fill_mode ::= NULL_F */ + case 528: /* fill_mode ::= NULL_F */ { yymsp[0].minor.yy174 = FILL_MODE_NULL_F; } break; - case 528: /* fill_mode ::= LINEAR */ + case 529: /* fill_mode ::= LINEAR */ { yymsp[0].minor.yy174 = FILL_MODE_LINEAR; } break; - case 529: /* fill_mode ::= NEXT */ + case 530: /* fill_mode ::= NEXT */ { yymsp[0].minor.yy174 = FILL_MODE_NEXT; } break; - case 532: /* group_by_list ::= expr_or_subquery */ + case 533: /* group_by_list ::= expr_or_subquery */ { yylhsminor.yy220 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy140))); } yymsp[0].minor.yy220 = yylhsminor.yy220; break; - case 533: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + case 534: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ { yylhsminor.yy220 = addNodeToList(pCxt, yymsp[-2].minor.yy220, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy140))); } yymsp[-2].minor.yy220 = yylhsminor.yy220; break; - case 537: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + case 538: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ { yymsp[-5].minor.yy140 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), releaseRawExprNode(pCxt, yymsp[-1].minor.yy140)); } break; - case 540: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 541: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { yylhsminor.yy140 = addOrderByClause(pCxt, yymsp[-3].minor.yy140, yymsp[-2].minor.yy220); yylhsminor.yy140 = addSlimitClause(pCxt, yylhsminor.yy140, yymsp[-1].minor.yy140); @@ -5265,50 +5270,50 @@ static YYACTIONTYPE yy_reduce( } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 543: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + case 544: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ { yylhsminor.yy140 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy140, yymsp[0].minor.yy140); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 544: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + case 545: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ { yylhsminor.yy140 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy140, yymsp[0].minor.yy140); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 552: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 556: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==556); + case 553: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 557: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==557); { yymsp[-1].minor.yy140 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 553: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 557: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==557); + case 554: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 558: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==558); { yymsp[-3].minor.yy140 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 554: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 558: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==558); + case 555: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 559: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==559); { yymsp[-3].minor.yy140 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 559: /* subquery ::= NK_LP query_expression NK_RP */ + case 560: /* subquery ::= NK_LP query_expression NK_RP */ { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy140); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 564: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + case 565: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ { yylhsminor.yy140 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), yymsp[-1].minor.yy866, yymsp[0].minor.yy697); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 565: /* ordering_specification_opt ::= */ + case 566: /* ordering_specification_opt ::= */ { yymsp[1].minor.yy866 = ORDER_ASC; } break; - case 566: /* ordering_specification_opt ::= ASC */ + case 567: /* ordering_specification_opt ::= ASC */ { yymsp[0].minor.yy866 = ORDER_ASC; } break; - case 567: /* ordering_specification_opt ::= DESC */ + case 568: /* ordering_specification_opt ::= DESC */ { yymsp[0].minor.yy866 = ORDER_DESC; } break; - case 568: /* null_ordering_opt ::= */ + case 569: /* null_ordering_opt ::= */ { yymsp[1].minor.yy697 = NULL_ORDER_DEFAULT; } break; - case 569: /* null_ordering_opt ::= NULLS FIRST */ + case 570: /* null_ordering_opt ::= NULLS FIRST */ { yymsp[-1].minor.yy697 = NULL_ORDER_FIRST; } break; - case 570: /* null_ordering_opt ::= NULLS LAST */ + case 571: /* null_ordering_opt ::= NULLS LAST */ { yymsp[-1].minor.yy697 = NULL_ORDER_LAST; } break; default: diff --git a/source/libs/parser/test/parAlterToBalanceTest.cpp b/source/libs/parser/test/parAlterToBalanceTest.cpp index bfcf6ec27e..4cccfd449c 100644 --- a/source/libs/parser/test/parAlterToBalanceTest.cpp +++ b/source/libs/parser/test/parAlterToBalanceTest.cpp @@ -108,6 +108,7 @@ TEST_F(ParserInitialATest, alterDnode) { * | REPLICA int_value -- todo: enum 1, 3, default 1, unit replica * | WAL_LEVEL int_value -- enum 1, 2, default 1 * | STT_TRIGGER int_value -- rang [1, 16], default 8 + * | MINROWS int_value -- rang [10, 1000], default 100 * } */ TEST_F(ParserInitialATest, alterDatabase) { @@ -133,6 +134,7 @@ TEST_F(ParserInitialATest, alterDatabase) { expect.cacheLastSize = -1; expect.replications = -1; expect.sstTrigger = -1; + expect.minRows = -1; }; auto setAlterDbBuffer = [&](int32_t buffer) { expect.buffer = buffer; }; auto setAlterDbPageSize = [&](int32_t pageSize) { expect.pageSize = pageSize; }; @@ -150,6 +152,7 @@ TEST_F(ParserInitialATest, alterDatabase) { auto setAlterDbCacheModel = [&](int8_t cacheModel) { expect.cacheLast = cacheModel; }; auto setAlterDbReplica = [&](int8_t replications) { expect.replications = replications; }; auto setAlterDbSttTrigger = [&](int8_t sstTrigger) { expect.sstTrigger = sstTrigger; }; + auto setAlterDbMinRows = [&](int32_t minRows) { expect.minRows = minRows; }; setCheckDdlFunc([&](const SQuery* pQuery, ParserStage stage) { ASSERT_EQ(nodeType(pQuery->pRoot), QUERY_NODE_ALTER_DATABASE_STMT); @@ -170,6 +173,7 @@ TEST_F(ParserInitialATest, alterDatabase) { ASSERT_EQ(req.cacheLast, expect.cacheLast); ASSERT_EQ(req.replications, expect.replications); ASSERT_EQ(req.sstTrigger, expect.sstTrigger); + ASSERT_EQ(req.minRows, expect.minRows); }); const int32_t MINUTE_PER_DAY = MILLISECOND_PER_DAY / MILLISECOND_PER_MINUTE; @@ -277,6 +281,15 @@ TEST_F(ParserInitialATest, alterDatabase) { setAlterDbSttTrigger(16); run("ALTER DATABASE test STT_TRIGGER 16"); clearAlterDbReq(); + + initAlterDb("test"); + setAlterDbMinRows(10); + run("ALTER DATABASE test MINROWS 10"); + setAlterDbMinRows(50); + run("ALTER DATABASE test MINROWS 50"); + setAlterDbMinRows(1000); + run("ALTER DATABASE test MINROWS 1000"); + clearAlterDbReq(); } TEST_F(ParserInitialATest, alterDatabaseSemanticCheck) { From 780a81c67cbeb897ffaad3edcfba888276ae18e5 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 9 Mar 2023 16:12:40 +0800 Subject: [PATCH 095/154] little fix --- source/common/src/tmsg.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index bb6ef9eedb..9ad7c72bc0 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -2219,7 +2219,10 @@ int32_t tSerializeSAlterDbReq(void *buf, int32_t bufLen, SAlterDbReq *pReq) { if (tEncodeI8(&encoder, pReq->cacheLast) < 0) return -1; if (tEncodeI8(&encoder, pReq->replications) < 0) return -1; if (tEncodeI32(&encoder, pReq->sstTrigger) < 0) return -1; + + // 1st modification if (tEncodeI32(&encoder, pReq->minRows) < 0) return -1; + tEndEncode(&encoder); int32_t tlen = encoder.pos; @@ -2247,8 +2250,12 @@ int32_t tDeserializeSAlterDbReq(void *buf, int32_t bufLen, SAlterDbReq *pReq) { if (tDecodeI8(&decoder, &pReq->cacheLast) < 0) return -1; if (tDecodeI8(&decoder, &pReq->replications) < 0) return -1; if (tDecodeI32(&decoder, &pReq->sstTrigger) < 0) return -1; + + // 1st modification if (!tDecodeIsEnd(&decoder)) { if (tDecodeI32(&decoder, &pReq->minRows) < 0) return -1; + } else { + pReq->minRows = -1; } tEndDecode(&decoder); From 9d107399081ee79fca069fba94fcc7008bcfd516 Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Thu, 9 Mar 2023 16:18:44 +0800 Subject: [PATCH 096/154] enh: send rsp of negotiation failure ahead of apply queue --- source/dnode/vnode/src/vnd/vnodeSvr.c | 8 +------- source/dnode/vnode/src/vnd/vnodeSync.c | 13 ++++++++++++- source/libs/sync/src/syncPipeline.c | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index fb8d230eba..222e795424 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -306,13 +306,7 @@ int32_t vnodeProcessWriteMsg(SVnode *pVnode, SRpcMsg *pMsg, int64_t version, SRp void *pReq; int32_t len; int32_t ret; - /* - if (!pVnode->inUse) { - terrno = TSDB_CODE_VND_NO_AVAIL_BUFPOOL; - vError("vgId:%d, not ready to write since %s", TD_VID(pVnode), terrstr()); - return -1; - } - */ + if (version <= pVnode->state.applied) { vError("vgId:%d, duplicate write request. version: %" PRId64 ", applied: %" PRId64 "", TD_VID(pVnode), version, pVnode->state.applied); diff --git a/source/dnode/vnode/src/vnd/vnodeSync.c b/source/dnode/vnode/src/vnd/vnodeSync.c index e71b03d2af..989fdaf515 100644 --- a/source/dnode/vnode/src/vnd/vnodeSync.c +++ b/source/dnode/vnode/src/vnd/vnodeSync.c @@ -429,7 +429,18 @@ static int32_t vnodeSyncApplyMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsm pVnode->config.vgId, pFsm, pMeta->index, pMeta->term, pMsg->info.conn.applyIndex, pMeta->isWeak, pMeta->code, pMeta->state, syncStr(pMeta->state), TMSG_INFO(pMsg->msgType), pMsg->code); - return tmsgPutToQueue(&pVnode->msgCb, APPLY_QUEUE, pMsg); + if (pMsg->code == 0) { + return tmsgPutToQueue(&pVnode->msgCb, APPLY_QUEUE, pMsg); + } + + vnodePostBlockMsg(pVnode, pMsg); + SRpcMsg rsp = {.code = pMsg->code, .info = pMsg->info}; + if (rsp.info.handle != NULL) { + tmsgSendRsp(&rsp); + } + rpcFreeCont(pMsg->pCont); + pMsg->pCont = NULL; + return 0; } static int32_t vnodeSyncCommitMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsmCbMeta *pMeta) { diff --git a/source/libs/sync/src/syncPipeline.c b/source/libs/sync/src/syncPipeline.c index cc1a40a430..0dc723e316 100644 --- a/source/libs/sync/src/syncPipeline.c +++ b/source/libs/sync/src/syncPipeline.c @@ -475,7 +475,7 @@ _out: int32_t syncLogFsmExecute(SSyncNode* pNode, SSyncFSM* pFsm, ESyncState role, SyncTerm term, SSyncRaftEntry* pEntry, int32_t applyCode) { - if ((pNode->replicaNum == 1) && pNode->restoreFinish && pNode->vgId != 1) { + if (pNode->replicaNum == 1 && pNode->restoreFinish && pNode->vgId != 1) { return 0; } From b86c23b9638c7d564b2245ecea3b650520c36aa2 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 9 Mar 2023 18:07:38 +0800 Subject: [PATCH 097/154] change test case --- tests/script/tsim/db/alter_option.sim | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/script/tsim/db/alter_option.sim b/tests/script/tsim/db/alter_option.sim index f4392fbca4..6f568ecdb1 100644 --- a/tests/script/tsim/db/alter_option.sim +++ b/tests/script/tsim/db/alter_option.sim @@ -285,8 +285,6 @@ sql_error alter database db keep -1 print ============== modify minrows sql_error alter database db minrows 8 -sql_error alter database db minrows 200 -sql_error alter database db minrows 11 sql_error alter database db minrows 8000 sql_error alter database db minrows 8001 From 1392711e66ccbd144c1ae16cf0f1ffc818a50872 Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Thu, 9 Mar 2023 18:12:40 +0800 Subject: [PATCH 098/154] enh: add fsm FpAppliedIndexCb to get the current applied index --- include/libs/sync/sync.h | 1 + source/dnode/mnode/impl/inc/mndInt.h | 1 + source/dnode/mnode/impl/src/mndSync.c | 14 ++++++++++++++ source/dnode/vnode/src/vnd/vnodeSvr.c | 4 ++-- source/dnode/vnode/src/vnd/vnodeSync.c | 6 ++++++ 5 files changed, 24 insertions(+), 2 deletions(-) diff --git a/include/libs/sync/sync.h b/include/libs/sync/sync.h index 189484d1a6..5ea90906a8 100644 --- a/include/libs/sync/sync.h +++ b/include/libs/sync/sync.h @@ -143,6 +143,7 @@ typedef struct SSyncFSM { void* data; int32_t (*FpCommitCb)(const struct SSyncFSM* pFsm, SRpcMsg* pMsg, const SFsmCbMeta* pMeta); + SyncIndex (*FpAppliedIndexCb)(const struct SSyncFSM* pFsm); int32_t (*FpPreCommitCb)(const struct SSyncFSM* pFsm, SRpcMsg* pMsg, const SFsmCbMeta* pMeta); void (*FpRollBackCb)(const struct SSyncFSM* pFsm, SRpcMsg* pMsg, const SFsmCbMeta* pMeta); diff --git a/source/dnode/mnode/impl/inc/mndInt.h b/source/dnode/mnode/impl/inc/mndInt.h index 006c74ef3d..ffb2443808 100644 --- a/source/dnode/mnode/impl/inc/mndInt.h +++ b/source/dnode/mnode/impl/inc/mndInt.h @@ -113,6 +113,7 @@ typedef struct SMnode { bool deploy; char *path; int64_t checkTime; + SyncIndex applied; SSdb *pSdb; SArray *pSteps; SQHandle *pQuery; diff --git a/source/dnode/mnode/impl/src/mndSync.c b/source/dnode/mnode/impl/src/mndSync.c index f702d8f148..ce3caaad6c 100644 --- a/source/dnode/mnode/impl/src/mndSync.c +++ b/source/dnode/mnode/impl/src/mndSync.c @@ -129,9 +129,13 @@ int32_t mndProcessWriteMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsmCbMeta int32_t mndSyncCommitMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsmCbMeta *pMeta) { int32_t code = 0; + SMnode *pMnode = pFsm->data; + atomic_store_64(&pMnode->applied, pMsg->info.conn.applyIndex); + if (!syncUtilUserCommit(pMsg->msgType)) { goto _out; } + code = mndProcessWriteMsg(pFsm, pMsg, pMeta); _out: @@ -140,6 +144,11 @@ _out: return code; } +SyncIndex mndSyncAppliedIndex(const SSyncFSM *pFSM) { + SMnode *pMnode = pFSM->data; + return atomic_load_64(&pMnode->applied); +} + int32_t mndSyncGetSnapshot(const SSyncFSM *pFsm, SSnapshot *pSnapshot, void *pReaderParam, void **ppReader) { mInfo("start to read snapshot from sdb in atomic way"); SMnode *pMnode = pFsm->data; @@ -253,6 +262,7 @@ SSyncFSM *mndSyncMakeFsm(SMnode *pMnode) { SSyncFSM *pFsm = taosMemoryCalloc(1, sizeof(SSyncFSM)); pFsm->data = pMnode; pFsm->FpCommitCb = mndSyncCommitMsg; + pFsm->FpAppliedIndexCb = mndSyncAppliedIndex; pFsm->FpPreCommitCb = NULL; pFsm->FpRollBackCb = NULL; pFsm->FpRestoreFinishCb = mndRestoreFinish; @@ -321,6 +331,10 @@ int32_t mndInitSync(SMnode *pMnode) { } pMnode->pSdb->sync = pMgmt->sync; + SSnapshot snap = {0}; + sdbGetCommitInfo(pMnode->pSdb, &snap.lastApplyIndex, &snap.lastApplyTerm, &snap.lastConfigIndex); + atomic_store_64(&pMnode->applied, snap.lastApplyIndex); + mInfo("mnode-sync is opened, id:%" PRId64, pMgmt->sync); return 0; } diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index 222e795424..bfcf401ca8 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -320,8 +320,8 @@ int32_t vnodeProcessWriteMsg(SVnode *pVnode, SRpcMsg *pMsg, int64_t version, SRp ASSERT(pVnode->state.applyTerm <= pMsg->info.conn.applyTerm); ASSERT(pVnode->state.applied + 1 == version); - pVnode->state.applied = version; - pVnode->state.applyTerm = pMsg->info.conn.applyTerm; + atomic_store_64(&pVnode->state.applied, version); + atomic_store_64(&pVnode->state.applyTerm, pMsg->info.conn.applyTerm); if (!syncUtilUserCommit(pMsg->msgType)) goto _exit; diff --git a/source/dnode/vnode/src/vnd/vnodeSync.c b/source/dnode/vnode/src/vnd/vnodeSync.c index 989fdaf515..9613afd837 100644 --- a/source/dnode/vnode/src/vnd/vnodeSync.c +++ b/source/dnode/vnode/src/vnd/vnodeSync.c @@ -454,6 +454,11 @@ static int32_t vnodeSyncPreCommitMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const return 0; } +static SyncIndex vnodeSyncAppliedIndex(const SSyncFSM *pFSM) { + SVnode *pVnode = pFSM->data; + return atomic_load_64(&pVnode->state.applied); +} + static void vnodeSyncRollBackMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsmCbMeta *pMeta) { SVnode *pVnode = pFsm->data; vTrace("vgId:%d, rollback-cb is excuted, fsm:%p, index:%" PRId64 ", weak:%d, code:%d, state:%d %s, type:%s", @@ -580,6 +585,7 @@ static SSyncFSM *vnodeSyncMakeFsm(SVnode *pVnode) { SSyncFSM *pFsm = taosMemoryCalloc(1, sizeof(SSyncFSM)); pFsm->data = pVnode; pFsm->FpCommitCb = vnodeSyncCommitMsg; + pFsm->FpAppliedIndexCb = vnodeSyncAppliedIndex; pFsm->FpPreCommitCb = vnodeSyncPreCommitMsg; pFsm->FpRollBackCb = vnodeSyncRollBackMsg; pFsm->FpGetSnapshotInfo = vnodeSyncGetSnapshotInfo; From 47417e003e4257c002939bc3d1e0801993861a1f Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 9 Mar 2023 18:54:15 +0800 Subject: [PATCH 099/154] enh: optimize last/last_row cost when the cache was first loaded --- source/dnode/vnode/src/inc/tsdb.h | 1 + source/dnode/vnode/src/tsdb/tsdbCache.c | 14 ++++++++------ source/dnode/vnode/src/tsdb/tsdbCacheRead.c | 15 +++++++++++++++ 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/source/dnode/vnode/src/inc/tsdb.h b/source/dnode/vnode/src/inc/tsdb.h index 15087e90f0..b2e1e8ab34 100644 --- a/source/dnode/vnode/src/inc/tsdb.h +++ b/source/dnode/vnode/src/inc/tsdb.h @@ -780,6 +780,7 @@ typedef struct SCacheRowsReader { SDataFReader *pDataFReader; SDataFReader *pDataFReaderLast; const char *idstr; + int64_t lastTs; } SCacheRowsReader; typedef struct { diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index dcf7286c00..244530314a 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -722,6 +722,7 @@ typedef struct SFSNextRowIter { int32_t iRow; TSDBROW row; SSttBlockLoadInfo *pLoadInfo; + int64_t lastTs; } SFSNextRowIter; static int32_t getNextRowFromFS(void *iter, TSDBROW **ppRow) { @@ -816,12 +817,12 @@ static int32_t getNextRowFromFS(void *iter, TSDBROW **ppRow) { SDataBlk block = {0}; tDataBlkReset(&block); - // tBlockDataReset(&state->blockData); tBlockDataReset(state->pBlockData); tMapDataGetItemByIdx(&state->blockMap, state->iBlock, &block, tGetDataBlk); - /* code = tsdbReadBlockData(state->pDataFReader, &state->blockIdx, &block, &state->blockData, NULL, NULL); - */ + if (block.maxKey.ts <= state->lastTs) { + goto _next_fileset; + } tBlockDataReset(state->pBlockData); TABLEID tid = {.suid = state->suid, .uid = state->uid}; code = tBlockDataInit(state->pBlockData, &tid, state->pTSchema, NULL, 0); @@ -1070,7 +1071,7 @@ typedef struct { static int32_t nextRowIterOpen(CacheNextRowIter *pIter, tb_uid_t uid, STsdb *pTsdb, STSchema *pTSchema, tb_uid_t suid, SSttBlockLoadInfo *pLoadInfo, STsdbReadSnap *pReadSnap, SDataFReader **pDataFReader, - SDataFReader **pDataFReaderLast) { + SDataFReader **pDataFReaderLast, int64_t lastTs) { int code = 0; STbData *pMem = NULL; @@ -1141,6 +1142,7 @@ static int32_t nextRowIterOpen(CacheNextRowIter *pIter, tb_uid_t uid, STsdb *pTs pIter->fsState.uid = uid; pIter->fsState.pLoadInfo = pLoadInfo; pIter->fsState.pDataFReader = pDataFReader; + pIter->fsState.lastTs = lastTs; pIter->input[0] = (TsdbNextRowState){&pIter->memRow, true, false, &pIter->memState, getNextRowFromMem, NULL}; pIter->input[1] = (TsdbNextRowState){&pIter->imemRow, true, false, &pIter->imemState, getNextRowFromMem, NULL}; @@ -1315,7 +1317,7 @@ static int32_t mergeLastRow(tb_uid_t uid, STsdb *pTsdb, bool *dup, SArray **ppCo CacheNextRowIter iter = {0}; nextRowIterOpen(&iter, uid, pTsdb, pTSchema, pr->suid, pr->pLoadInfo, pr->pReadSnap, &pr->pDataFReader, - &pr->pDataFReaderLast); + &pr->pDataFReaderLast, pr->lastTs); do { TSDBROW *pRow = NULL; @@ -1453,7 +1455,7 @@ static int32_t mergeLast(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SCach CacheNextRowIter iter = {0}; nextRowIterOpen(&iter, uid, pTsdb, pTSchema, pr->suid, pr->pLoadInfo, pr->pReadSnap, &pr->pDataFReader, - &pr->pDataFReaderLast); + &pr->pDataFReaderLast, pr->lastTs); do { TSDBROW *pRow = NULL; diff --git a/source/dnode/vnode/src/tsdb/tsdbCacheRead.c b/source/dnode/vnode/src/tsdb/tsdbCacheRead.c index 5528b6313c..d925950703 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCacheRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbCacheRead.c @@ -199,6 +199,8 @@ int32_t tsdbCacherowsReaderOpen(void* pVnode, int32_t type, void* pTableIdList, p->idstr = taosStrdup(idstr); taosThreadMutexInit(&p->readerMutex, NULL); + p->lastTs = INT64_MIN; + *pReader = p; return TSDB_CODE_SUCCESS; } @@ -347,6 +349,8 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32 } { + bool hasNotNullRow = true; + int64_t minTs = INT64_MAX; for (int32_t k = 0; k < pr->numOfCols; ++k) { int32_t slotId = slotIds[k]; @@ -357,6 +361,7 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32 hasRes = true; p->ts = pCol->ts; p->colVal = pCol->colVal; + minTs = pCol->ts; // only set value for last row query if (HASTYPE(pr->type, CACHESCAN_RETRIEVE_LAST_ROW)) { @@ -373,11 +378,17 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32 if (pColVal->ts > p->ts) { if (!COL_VAL_IS_VALUE(&pColVal->colVal) && HASTYPE(pr->type, CACHESCAN_RETRIEVE_LAST)) { + if (!COL_VAL_IS_VALUE(&p->colVal)) { + hasNotNullRow = false; + } continue; } hasRes = true; p->ts = pColVal->ts; + if (pColVal->ts < minTs && HASTYPE(pr->type, CACHESCAN_RETRIEVE_LAST)) { + minTs = pColVal->ts; + } if (!IS_VAR_DATA_TYPE(pColVal->colVal.type)) { p->colVal = pColVal->colVal; @@ -394,6 +405,10 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32 } } } + + if (hasNotNullRow) { + pr->lastTs = minTs; + } } tsdbCacheRelease(lruCache, h); From 552d0bc8a024fc257edb8a8d0ed452988efefd8c Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Thu, 9 Mar 2023 18:56:12 +0800 Subject: [PATCH 100/154] enh: not allow to insert if Tsdb applied lagging behind too far --- include/util/taoserror.h | 3 ++- source/libs/sync/src/syncMain.c | 4 ++-- source/libs/sync/src/syncPipeline.c | 11 ++++++++++- source/util/src/terror.c | 1 + 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 5106196ccd..1e04cbf6e3 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -541,7 +541,8 @@ int32_t* taosGetErrno(); #define TSDB_CODE_SYN_BATCH_ERROR TAOS_DEF_ERROR_CODE(0, 0x0913) #define TSDB_CODE_SYN_RESTORING TAOS_DEF_ERROR_CODE(0, 0x0914) #define TSDB_CODE_SYN_INVALID_SNAPSHOT_MSG TAOS_DEF_ERROR_CODE(0, 0x0915) // internal -#define TSDB_CODE_SYN_BUFFER_FULL TAOS_DEF_ERROR_CODE(0, 0x0916) // +#define TSDB_CODE_SYN_BUFFER_FULL TAOS_DEF_ERROR_CODE(0, 0x0916) +#define TSDB_CODE_SYN_WRITE_STALL TAOS_DEF_ERROR_CODE(0, 0x0917) #define TSDB_CODE_SYN_INTERNAL_ERROR TAOS_DEF_ERROR_CODE(0, 0x09FF) // tq diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 04e4859c5e..592fe7ce7f 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -2165,8 +2165,8 @@ int32_t syncNodeAppend(SSyncNode* ths, SSyncRaftEntry* pEntry) { // append to log buffer if (syncLogBufferAppend(ths->pLogBuf, ths, pEntry) < 0) { sError("vgId:%d, failed to enqueue sync log buffer, index:%" PRId64, ths->vgId, pEntry->index); - terrno = TSDB_CODE_SYN_BUFFER_FULL; - (void)syncLogFsmExecute(ths, ths->pFsm, ths->state, raftStoreGetTerm(ths), pEntry, TSDB_CODE_SYN_BUFFER_FULL); + ASSERT(terrno != 0); + (void)syncLogFsmExecute(ths, ths->pFsm, ths->state, raftStoreGetTerm(ths), pEntry, terrno); syncEntryDestroy(pEntry); return -1; } diff --git a/source/libs/sync/src/syncPipeline.c b/source/libs/sync/src/syncPipeline.c index 0dc723e316..e28a2a6872 100644 --- a/source/libs/sync/src/syncPipeline.c +++ b/source/libs/sync/src/syncPipeline.c @@ -48,7 +48,16 @@ int32_t syncLogBufferAppend(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt SyncIndex index = pEntry->index; if (index - pBuf->startIndex >= pBuf->size) { - sError("vgId:%d, failed to append due to sync log buffer full. index:%" PRId64 "", pNode->vgId, index); + terrno = TSDB_CODE_SYN_BUFFER_FULL; + sError("vgId:%d, failed to append since %s. index:%" PRId64 "", pNode->vgId, terrstr(), index); + goto _err; + } + + SyncIndex appliedIndex = pNode->pFsm->FpAppliedIndexCb(pNode->pFsm); + if (index - appliedIndex >= pBuf->size) { + terrno = TSDB_CODE_SYN_WRITE_STALL; + sError("vgId:%d, failed to append since %s. index:%" PRId64 ", commit-index:%" PRId64 ", applied-index:%" PRId64, + pNode->vgId, terrstr(), index, pBuf->commitIndex, appliedIndex); goto _err; } diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 33b562c8dd..8340a82761 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -422,6 +422,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_SYN_BATCH_ERROR, "Sync batch error") TAOS_DEFINE_ERROR(TSDB_CODE_SYN_RESTORING, "Sync is restoring") TAOS_DEFINE_ERROR(TSDB_CODE_SYN_INVALID_SNAPSHOT_MSG, "Sync invalid snapshot msg") TAOS_DEFINE_ERROR(TSDB_CODE_SYN_BUFFER_FULL, "Sync buffer is full") +TAOS_DEFINE_ERROR(TSDB_CODE_SYN_WRITE_STALL, "Sync write stall") TAOS_DEFINE_ERROR(TSDB_CODE_SYN_INTERNAL_ERROR, "Sync internal error") //tq From fa8d9a62f216118257e1553b00294ac3a3550498 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 9 Mar 2023 19:04:25 +0800 Subject: [PATCH 101/154] fix: cus prompt length lead hang (#20371) --- tools/shell/inc/shellInt.h | 2 +- tools/shell/src/shellArguments.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/shell/inc/shellInt.h b/tools/shell/inc/shellInt.h index 113853bd83..08d4b167ea 100644 --- a/tools/shell/inc/shellInt.h +++ b/tools/shell/inc/shellInt.h @@ -83,7 +83,7 @@ typedef struct { const char *clientVersion; char cusName[32]; char promptHeader[32]; - const char* promptContinue; + char promptContinue[32]; const char* osname; int32_t promptSize; char programVersion[256]; diff --git a/tools/shell/src/shellArguments.c b/tools/shell/src/shellArguments.c index 19275cce82..636138fac7 100644 --- a/tools/shell/src/shellArguments.c +++ b/tools/shell/src/shellArguments.c @@ -411,7 +411,9 @@ int32_t shellParseArgs(int32_t argc, char *argv[]) { "Copyright (c) 2022 by %s, all rights reserved.\r\n\r\n"; strcpy(shell.info.cusName, cusName); sprintf(shell.info.promptHeader, "%s> ", cusPrompt); - shell.info.promptContinue = TAOS_CONSOLE_PROMPT_CONTINUE; + char promptContinueFormat[32] = {0}; + sprintf(promptContinueFormat, "%%%zus> ", strlen(cusPrompt)); + sprintf(shell.info.promptContinue, promptContinueFormat, " "); shell.info.promptSize = strlen(shell.info.promptHeader); snprintf(shell.info.programVersion, sizeof(shell.info.programVersion), "version: %s compatible_version: %s\ngitinfo: %s\nbuildInfo: %s", version, compatible_version, gitinfo, From 5e53b1225b74ed4d2a7ef288ddcf731e8a9ed97b Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Thu, 9 Mar 2023 19:29:09 +0800 Subject: [PATCH 102/154] enh: finish restore with commit and applied indexes instead of num of items in apply queue --- include/libs/sync/sync.h | 2 +- source/dnode/mnode/impl/src/mndSync.c | 2 +- source/dnode/vnode/src/vnd/vnodeSync.c | 18 ++++++++++++------ source/libs/sync/src/syncPipeline.c | 6 +++--- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/include/libs/sync/sync.h b/include/libs/sync/sync.h index 5ea90906a8..08a6be8015 100644 --- a/include/libs/sync/sync.h +++ b/include/libs/sync/sync.h @@ -147,7 +147,7 @@ typedef struct SSyncFSM { int32_t (*FpPreCommitCb)(const struct SSyncFSM* pFsm, SRpcMsg* pMsg, const SFsmCbMeta* pMeta); void (*FpRollBackCb)(const struct SSyncFSM* pFsm, SRpcMsg* pMsg, const SFsmCbMeta* pMeta); - void (*FpRestoreFinishCb)(const struct SSyncFSM* pFsm); + void (*FpRestoreFinishCb)(const struct SSyncFSM* pFsm, const SyncIndex commitIdx); void (*FpReConfigCb)(const struct SSyncFSM* pFsm, SRpcMsg* pMsg, const SReConfigCbMeta* pMeta); void (*FpLeaderTransferCb)(const struct SSyncFSM* pFsm, SRpcMsg* pMsg, const SFsmCbMeta* pMeta); bool (*FpApplyQueueEmptyCb)(const struct SSyncFSM* pFsm); diff --git a/source/dnode/mnode/impl/src/mndSync.c b/source/dnode/mnode/impl/src/mndSync.c index ce3caaad6c..998e8b71ab 100644 --- a/source/dnode/mnode/impl/src/mndSync.c +++ b/source/dnode/mnode/impl/src/mndSync.c @@ -162,7 +162,7 @@ static void mndSyncGetSnapshotInfo(const SSyncFSM *pFsm, SSnapshot *pSnapshot) { sdbGetCommitInfo(pMnode->pSdb, &pSnapshot->lastApplyIndex, &pSnapshot->lastApplyTerm, &pSnapshot->lastConfigIndex); } -void mndRestoreFinish(const SSyncFSM *pFsm) { +void mndRestoreFinish(const SSyncFSM *pFsm, const SyncIndex commitIdx) { SMnode *pMnode = pFsm->data; if (!pMnode->deploy) { diff --git a/source/dnode/vnode/src/vnd/vnodeSync.c b/source/dnode/vnode/src/vnd/vnodeSync.c index 9613afd837..594a64ea37 100644 --- a/source/dnode/vnode/src/vnd/vnodeSync.c +++ b/source/dnode/vnode/src/vnd/vnodeSync.c @@ -521,21 +521,27 @@ static int32_t vnodeSnapshotDoWrite(const SSyncFSM *pFsm, void *pWriter, void *p return code; } -static void vnodeRestoreFinish(const SSyncFSM *pFsm) { +static void vnodeRestoreFinish(const SSyncFSM *pFsm, const SyncIndex commitIdx) { SVnode *pVnode = pFsm->data; + SyncIndex appliedIdx = -1; do { - int32_t itemSize = tmsgGetQueueSize(&pVnode->msgCb, pVnode->config.vgId, APPLY_QUEUE); - if (itemSize == 0) { - vInfo("vgId:%d, apply queue is empty, restore finish", pVnode->config.vgId); + appliedIdx = vnodeSyncAppliedIndex(pFsm); + ASSERT(appliedIdx <= commitIdx); + if (appliedIdx == commitIdx) { + vInfo("vgId:%d, no more items to be applied, restore finish", pVnode->config.vgId); break; } else { - vInfo("vgId:%d, restore not finish since %d items in apply queue", pVnode->config.vgId, itemSize); + int32_t itemSize = tmsgGetQueueSize(&pVnode->msgCb, pVnode->config.vgId, APPLY_QUEUE); + vInfo("vgId:%d, restore not finish since %" PRId64 + " items to be applied, and %d in apply queue. commit-index:%" PRId64 ", applied-index:%" PRId64, + pVnode->config.vgId, commitIdx - appliedIdx, itemSize, commitIdx, appliedIdx); taosMsleep(10); } } while (true); - walApplyVer(pVnode->pWal, pVnode->state.applied); + ASSERT(appliedIdx == commitIdx); + walApplyVer(pVnode->pWal, commitIdx); pVnode->restored = true; vInfo("vgId:%d, sync restore finished", pVnode->config.vgId); diff --git a/source/libs/sync/src/syncPipeline.c b/source/libs/sync/src/syncPipeline.c index e28a2a6872..ee68824dc8 100644 --- a/source/libs/sync/src/syncPipeline.c +++ b/source/libs/sync/src/syncPipeline.c @@ -596,10 +596,10 @@ _out: // mark as restored if needed if (!pNode->restoreFinish && pBuf->commitIndex >= pNode->commitIndex && pEntry != NULL && currentTerm <= pEntry->term) { - pNode->pFsm->FpRestoreFinishCb(pNode->pFsm); + pNode->pFsm->FpRestoreFinishCb(pNode->pFsm, pBuf->commitIndex); pNode->restoreFinish = true; - sInfo("vgId:%d, restore finished. log buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, - pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex); + sInfo("vgId:%d, restore finished. term:%" PRId64 ", log buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", + pNode->vgId, currentTerm, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex); } if (!inBuf) { From 5acf665b7ef046d3ea8f183d36a126581f52bebc Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao@163.com> Date: Thu, 9 Mar 2023 19:36:10 +0800 Subject: [PATCH 103/154] fix:get dest table version --- source/dnode/vnode/src/tq/tq.c | 10 ++- .../script/tsim/stream/checkStreamSTable1.sim | 71 +++++++++++++++++++ 2 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 tests/script/tsim/stream/checkStreamSTable1.sim diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 4d21a2e7f3..5d3350a69a 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -983,11 +983,15 @@ int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask, int64_t ver) { pTask->tbSink.vnode = pTq->pVnode; pTask->tbSink.tbSinkFunc = tqSinkToTablePipeline2; - /*A(pTask->tbSink.pSchemaWrapper);*/ - /*A(pTask->tbSink.pSchemaWrapper->pSchema);*/ + int32_t version = 1; + SMetaInfo info = {0}; + int32_t code = metaGetInfo(pTq->pVnode->pMeta, pTask->tbSink.stbUid, &info, NULL); + if (code == TSDB_CODE_SUCCESS) { + version = info.skmVer; + } pTask->tbSink.pTSchema = - tBuildTSchema(pTask->tbSink.pSchemaWrapper->pSchema, pTask->tbSink.pSchemaWrapper->nCols, 1); + tBuildTSchema(pTask->tbSink.pSchemaWrapper->pSchema, pTask->tbSink.pSchemaWrapper->nCols, version); ASSERT(pTask->tbSink.pTSchema); } diff --git a/tests/script/tsim/stream/checkStreamSTable1.sim b/tests/script/tsim/stream/checkStreamSTable1.sim new file mode 100644 index 0000000000..495e1cf358 --- /dev/null +++ b/tests/script/tsim/stream/checkStreamSTable1.sim @@ -0,0 +1,71 @@ +system sh/stop_dnodes.sh +system sh/deploy.sh -n dnode1 -i 1 + +print ===== step1 + +system sh/exec.sh -n dnode1 -s start +sleep 50 +sql connect + +print ===== step2 + +sql create database test vgroups 4; +sql use test; +sql create stable st(ts timestamp,a int,b int,c int) tags(ta int,tb int,tc int); +sql create table t1 using st tags(1,1,1); +sql create table t2 using st tags(2,2,2); +sql create stream streams1 trigger at_once into streamt1 as select _wstart, count(*) c1, count(a) c2 from st interval(1s) ; +sql insert into t1 values(1648791211000,1,2,3); +sql insert into t1 values(1648791212000,2,2,3); + +$loop_count = 0 +loop0: + +sleep 300 + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +print 1 select * from streamt1; +sql select * from streamt1; + +if $rows != 2 then + print rows=$rows + goto loop0 +endi + +print drop stream streams1 +sql drop stream streams1; + +print alter table streamt1 add column c3 double +sql alter table streamt1 add column c3 double; + +print create stream streams1 trigger at_once into streamt1 as select _wstart, count(*) c1, count(a) c2, avg(b) c3 from st interval(1s) ; +sql create stream streams1 trigger at_once into streamt1 as select _wstart, count(*) c1, count(a) c2, avg(b) c3 from st interval(1s) ; + +sql insert into t2 values(1648791213000,1,2,3); +sql insert into t1 values(1648791214000,1,2,3); + +$loop_count = 0 +loop1: + +sleep 300 + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +print 2 select * from streamt1; +sql select * from streamt1; + +if $rows != 4 then + print rows=$rows + goto loop1 +endi + +print ======over + +system sh/stop_dnodes.sh From 88c3d0d4b34426fba1a8a8ffe98507665a49f402 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Thu, 9 Mar 2023 19:48:21 +0800 Subject: [PATCH 104/154] fix:[TS-2828] retry if ver is old --- source/client/src/clientSml.c | 119 +++++++++++++++++------------- source/client/src/clientSmlLine.c | 2 +- 2 files changed, 67 insertions(+), 54 deletions(-) diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index c438196e71..3a3d549ef6 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -1422,6 +1422,7 @@ static int smlProcess(SSmlHandle *info, char *lines[], char *rawLine, char *rawL do { code = smlModifyDBSchemas(info); if (code == 0) break; + taosMsleep(200); } while (retryNum++ < taosHashGetSize(info->superTables) * MAX_RETRY_TIMES); if (code != 0) { @@ -1446,62 +1447,74 @@ TAOS_RES *taos_schemaless_insert_inner(TAOS *taos, char *lines[], char *rawLine, terrno = TSDB_CODE_TSC_DISCONNECTED; return NULL; } + SRequestObj *request = NULL; + SSmlHandle *info = NULL; + while(1){ + request = (SRequestObj *)createRequest(*(int64_t *)taos, TSDB_SQL_INSERT, reqid); + if (request == NULL) { + uError("SML:taos_schemaless_insert error request is null"); + return NULL; + } - SRequestObj *request = (SRequestObj *)createRequest(*(int64_t *)taos, TSDB_SQL_INSERT, reqid); - if (request == NULL) { - uError("SML:taos_schemaless_insert error request is null"); - return NULL; + info = smlBuildSmlInfo(taos); + if (info == NULL) { + request->code = TSDB_CODE_OUT_OF_MEMORY; + uError("SML:taos_schemaless_insert error SSmlHandle is null"); + return (TAOS_RES *)request; + } + info->pRequest = request; + info->isRawLine = rawLine != NULL; + info->ttl = ttl; + info->precision = precision; + info->protocol = (TSDB_SML_PROTOCOL_TYPE)protocol; + info->msgBuf.buf = info->pRequest->msgBuf; + info->msgBuf.len = ERROR_MSG_BUF_DEFAULT_SIZE; + info->lineNum = numLines; + + SSmlMsgBuf msg = {ERROR_MSG_BUF_DEFAULT_SIZE, request->msgBuf}; + if (request->pDb == NULL) { + request->code = TSDB_CODE_PAR_DB_NOT_SPECIFIED; + smlBuildInvalidDataMsg(&msg, "Database not specified", NULL); + goto end; + } + + if (protocol < TSDB_SML_LINE_PROTOCOL || protocol > TSDB_SML_JSON_PROTOCOL) { + request->code = TSDB_CODE_SML_INVALID_PROTOCOL_TYPE; + smlBuildInvalidDataMsg(&msg, "protocol invalidate", NULL); + goto end; + } + + if (protocol == TSDB_SML_LINE_PROTOCOL && + (precision < TSDB_SML_TIMESTAMP_NOT_CONFIGURED || precision > TSDB_SML_TIMESTAMP_NANO_SECONDS)) { + request->code = TSDB_CODE_SML_INVALID_PRECISION_TYPE; + smlBuildInvalidDataMsg(&msg, "precision invalidate for line protocol", NULL); + goto end; + } + + if (protocol == TSDB_SML_JSON_PROTOCOL) { + numLines = 1; + } else if (numLines <= 0) { + request->code = TSDB_CODE_SML_INVALID_DATA; + smlBuildInvalidDataMsg(&msg, "line num is invalid", NULL); + goto end; + } + + code = smlProcess(info, lines, rawLine, rawLineEnd, numLines); + request->code = code; + info->cost.endTime = taosGetTimestampUs(); + info->cost.code = code; + smlPrintStatisticInfo(info); + if(code == TSDB_CODE_TDB_INVALID_TABLE_SCHEMA_VER || code == TSDB_CODE_SDB_OBJ_CREATING){ + uInfo("SML:%"PRIx64" ver is old retry", info->id); + smlDestroyInfo(info); + info = NULL; + taos_free_result(request); + request = NULL; + continue; + } + break; } - SSmlHandle *info = smlBuildSmlInfo(taos); - if (info == NULL) { - request->code = TSDB_CODE_OUT_OF_MEMORY; - uError("SML:taos_schemaless_insert error SSmlHandle is null"); - return (TAOS_RES *)request; - } - info->pRequest = request; - info->isRawLine = rawLine != NULL; - info->ttl = ttl; - info->precision = precision; - info->protocol = (TSDB_SML_PROTOCOL_TYPE)protocol; - info->msgBuf.buf = info->pRequest->msgBuf; - info->msgBuf.len = ERROR_MSG_BUF_DEFAULT_SIZE; - info->lineNum = numLines; - - SSmlMsgBuf msg = {ERROR_MSG_BUF_DEFAULT_SIZE, request->msgBuf}; - if (request->pDb == NULL) { - request->code = TSDB_CODE_PAR_DB_NOT_SPECIFIED; - smlBuildInvalidDataMsg(&msg, "Database not specified", NULL); - goto end; - } - - if (protocol < TSDB_SML_LINE_PROTOCOL || protocol > TSDB_SML_JSON_PROTOCOL) { - request->code = TSDB_CODE_SML_INVALID_PROTOCOL_TYPE; - smlBuildInvalidDataMsg(&msg, "protocol invalidate", NULL); - goto end; - } - - if (protocol == TSDB_SML_LINE_PROTOCOL && - (precision < TSDB_SML_TIMESTAMP_NOT_CONFIGURED || precision > TSDB_SML_TIMESTAMP_NANO_SECONDS)) { - request->code = TSDB_CODE_SML_INVALID_PRECISION_TYPE; - smlBuildInvalidDataMsg(&msg, "precision invalidate for line protocol", NULL); - goto end; - } - - if (protocol == TSDB_SML_JSON_PROTOCOL) { - numLines = 1; - } else if (numLines <= 0) { - request->code = TSDB_CODE_SML_INVALID_DATA; - smlBuildInvalidDataMsg(&msg, "line num is invalid", NULL); - goto end; - } - - code = smlProcess(info, lines, rawLine, rawLineEnd, numLines); - request->code = code; - info->cost.endTime = taosGetTimestampUs(); - info->cost.code = code; - smlPrintStatisticInfo(info); - end: smlDestroyInfo(info); return (TAOS_RES *)request; diff --git a/source/client/src/clientSmlLine.c b/source/client/src/clientSmlLine.c index 66f1316cd5..6cc345aaa3 100644 --- a/source/client/src/clientSmlLine.c +++ b/source/client/src/clientSmlLine.c @@ -436,7 +436,7 @@ static int32_t smlParseColKv(SSmlHandle *info, char **sql, char *sqlEnd, SSmlLin // bind data ret = smlBuildCol(info->currTableDataCtx, info->currSTableMeta->schema, &kv, cnt + 1); if (unlikely(ret != TSDB_CODE_SUCCESS)) { - uError("smlBuildCol error, retry"); + uDebug("smlBuildCol error, retry"); info->dataFormat = false; info->reRun = true; return TSDB_CODE_SUCCESS; From 96e70c2795b1ffe823955dd8191443f968129098 Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Thu, 9 Mar 2023 20:00:25 +0800 Subject: [PATCH 105/154] enh: update logging msg in vnodeRestoreFinish --- source/dnode/vnode/src/vnd/vnodeSync.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/dnode/vnode/src/vnd/vnodeSync.c b/source/dnode/vnode/src/vnd/vnodeSync.c index 594a64ea37..f942b3fa49 100644 --- a/source/dnode/vnode/src/vnd/vnodeSync.c +++ b/source/dnode/vnode/src/vnd/vnodeSync.c @@ -529,13 +529,12 @@ static void vnodeRestoreFinish(const SSyncFSM *pFsm, const SyncIndex commitIdx) appliedIdx = vnodeSyncAppliedIndex(pFsm); ASSERT(appliedIdx <= commitIdx); if (appliedIdx == commitIdx) { - vInfo("vgId:%d, no more items to be applied, restore finish", pVnode->config.vgId); + vInfo("vgId:%d, no items to be applied, restore finish", pVnode->config.vgId); break; } else { - int32_t itemSize = tmsgGetQueueSize(&pVnode->msgCb, pVnode->config.vgId, APPLY_QUEUE); - vInfo("vgId:%d, restore not finish since %" PRId64 - " items to be applied, and %d in apply queue. commit-index:%" PRId64 ", applied-index:%" PRId64, - pVnode->config.vgId, commitIdx - appliedIdx, itemSize, commitIdx, appliedIdx); + vInfo("vgId:%d, restore not finish since %" PRId64 " items to be applied. commit-index:%" PRId64 + ", applied-index:%" PRId64, + pVnode->config.vgId, commitIdx - appliedIdx, commitIdx, appliedIdx); taosMsleep(10); } } while (true); From 50af4587850f5c47806805ca001c849f1bf89186 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Fri, 10 Mar 2023 08:52:39 +0800 Subject: [PATCH 106/154] fix: taosbenchmark socket close properly for main (#20365) * fix: taosbenchmark socket close properly for main * fix: update taos-tools 41d4f95 --- cmake/taostools_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index 5fe8f6ea13..10677f0208 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG d4b3967 + GIT_TAG 41d4f95 SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From 66631229ebf0f4650ba3ae6d2b47d1cd3427ea12 Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Thu, 9 Mar 2023 20:31:11 +0800 Subject: [PATCH 107/154] fix: initialize and update pMnode->applied properly --- source/dnode/mnode/impl/src/mndMain.c | 8 +++++--- source/dnode/mnode/impl/src/mndSync.c | 9 +++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndMain.c b/source/dnode/mnode/impl/src/mndMain.c index d83b969e2d..c32212dfc1 100644 --- a/source/dnode/mnode/impl/src/mndMain.c +++ b/source/dnode/mnode/impl/src/mndMain.c @@ -380,11 +380,13 @@ static int32_t mndInitSdb(SMnode *pMnode) { } static int32_t mndOpenSdb(SMnode *pMnode) { + int32_t code = 0; if (!pMnode->deploy) { - return sdbReadFile(pMnode->pSdb); - } else { - return 0; + code = sdbReadFile(pMnode->pSdb); } + + atomic_store_64(&pMnode->applied, pMnode->pSdb->commitIndex); + return code; } static void mndCleanupSdb(SMnode *pMnode) { diff --git a/source/dnode/mnode/impl/src/mndSync.c b/source/dnode/mnode/impl/src/mndSync.c index 998e8b71ab..dce7a9aadf 100644 --- a/source/dnode/mnode/impl/src/mndSync.c +++ b/source/dnode/mnode/impl/src/mndSync.c @@ -130,6 +130,9 @@ int32_t mndProcessWriteMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsmCbMeta int32_t mndSyncCommitMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsmCbMeta *pMeta) { int32_t code = 0; SMnode *pMnode = pFsm->data; + pMsg->info.conn.applyIndex = pMeta->index; + pMsg->info.conn.applyTerm = pMeta->term; + atomic_store_64(&pMnode->applied, pMsg->info.conn.applyIndex); if (!syncUtilUserCommit(pMsg->msgType)) { @@ -176,6 +179,8 @@ void mndRestoreFinish(const SSyncFSM *pFsm, const SyncIndex commitIdx) { } else { mInfo("vgId:1, sync restore finished"); } + + ASSERT(commitIdx == mndSyncAppliedIndex(pFsm)); } int32_t mndSnapshotStartRead(const SSyncFSM *pFsm, void *pParam, void **ppReader) { @@ -331,10 +336,6 @@ int32_t mndInitSync(SMnode *pMnode) { } pMnode->pSdb->sync = pMgmt->sync; - SSnapshot snap = {0}; - sdbGetCommitInfo(pMnode->pSdb, &snap.lastApplyIndex, &snap.lastApplyTerm, &snap.lastConfigIndex); - atomic_store_64(&pMnode->applied, snap.lastApplyIndex); - mInfo("mnode-sync is opened, id:%" PRId64, pMgmt->sync); return 0; } From d020753cdb90d1cde5b215b5fe163d640f6ed08e Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Fri, 10 Mar 2023 10:03:43 +0800 Subject: [PATCH 108/154] fix:[TS-2828] retry if ver is old --- source/client/src/clientSml.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index 3a3d549ef6..984670ec1d 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -1213,6 +1213,11 @@ static int32_t smlParseLineBottom(SSmlHandle *info) { static int32_t smlInsertData(SSmlHandle *info) { int32_t code = TSDB_CODE_SUCCESS; + if(info->pRequest->dbList == NULL){ + info->pRequest->dbList = taosArrayInit(1, TSDB_DB_FNAME_LEN); + } + taosArrayPush(info->pRequest->dbList, info->pRequest->pDb); + SSmlTableInfo **oneTable = (SSmlTableInfo **)taosHashIterate(info->childTables, NULL); while (oneTable) { SSmlTableInfo *tableData = *oneTable; @@ -1221,6 +1226,11 @@ static int32_t smlInsertData(SSmlHandle *info) { tstrncpy(pName.dbname, info->pRequest->pDb, sizeof(pName.dbname)); memcpy(pName.tname, tableData->childTableName, strlen(tableData->childTableName)); + if(info->pRequest->tableList == NULL){ + info->pRequest->tableList = taosArrayInit(1, sizeof(SName)); + } + taosArrayPush(info->pRequest->tableList, &pName); + SRequestConnInfo conn = {0}; conn.pTrans = info->taos->pAppInfo->pTransporter; conn.requestId = info->pRequest->requestId; @@ -1505,7 +1515,8 @@ TAOS_RES *taos_schemaless_insert_inner(TAOS *taos, char *lines[], char *rawLine, info->cost.code = code; smlPrintStatisticInfo(info); if(code == TSDB_CODE_TDB_INVALID_TABLE_SCHEMA_VER || code == TSDB_CODE_SDB_OBJ_CREATING){ - uInfo("SML:%"PRIx64" ver is old retry", info->id); + refreshMeta(request->pTscObj, request); + uInfo("SML:%"PRIx64" ver is old retry or object is creating:%d", info->id, code); smlDestroyInfo(info); info = NULL; taos_free_result(request); From 3a586a525ddafca7652742bc7a3bfbd9d14f5b8d Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 10 Mar 2023 10:34:26 +0800 Subject: [PATCH 109/154] add user err code --- include/util/taoserror.h | 1 + source/util/src/terror.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 5106196ccd..3dc3aa69b7 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -240,6 +240,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_MND_TOO_MANY_USERS TAOS_DEF_ERROR_CODE(0, 0x0355) #define TSDB_CODE_MND_INVALID_ALTER_OPER TAOS_DEF_ERROR_CODE(0, 0x0356) #define TSDB_CODE_MND_AUTH_FAILURE TAOS_DEF_ERROR_CODE(0, 0x0357) +#define TSDB_CODE_MND_USER_NOT_AVAILABLE TAOS_DEF_ERROR_CODE(0, 0x0358) // mnode-stable-part1 #define TSDB_CODE_MND_STB_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0360) diff --git a/source/util/src/terror.c b/source/util/src/terror.c index a19a022b01..cfaeca8038 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -184,6 +184,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_TOO_MANY_ACCTS, "Too many accounts") TAOS_DEFINE_ERROR(TSDB_CODE_MND_USER_ALREADY_EXIST, "User already exists") TAOS_DEFINE_ERROR(TSDB_CODE_MND_USER_NOT_EXIST, "Invalid user") TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_USER_FORMAT, "Invalid user format") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_USER_NOT_AVAILABLE, "User not available") TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_PASS_FORMAT, "Invalid password format") TAOS_DEFINE_ERROR(TSDB_CODE_MND_NO_USER_FROM_CONN, "Can not get user from conn") TAOS_DEFINE_ERROR(TSDB_CODE_MND_TOO_MANY_USERS, "Too many users") From f7ed0b184f7782ca8b46df037bb803fb8094e403 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Fri, 10 Mar 2023 10:49:51 +0800 Subject: [PATCH 110/154] fix:add log --- source/client/src/clientSml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index 984670ec1d..46cca54e42 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -1516,7 +1516,7 @@ TAOS_RES *taos_schemaless_insert_inner(TAOS *taos, char *lines[], char *rawLine, smlPrintStatisticInfo(info); if(code == TSDB_CODE_TDB_INVALID_TABLE_SCHEMA_VER || code == TSDB_CODE_SDB_OBJ_CREATING){ refreshMeta(request->pTscObj, request); - uInfo("SML:%"PRIx64" ver is old retry or object is creating:%d", info->id, code); + uInfo("SML:%"PRIx64" ver is old retry or object is creating code:%d", info->id, code); smlDestroyInfo(info); info = NULL; taos_free_result(request); From 8139b725d2320a2a8d6380996806af188b54295f Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Fri, 10 Mar 2023 10:57:39 +0800 Subject: [PATCH 111/154] fix: refuse to write when applying progress lagging behind on restored only --- source/libs/sync/src/syncPipeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/sync/src/syncPipeline.c b/source/libs/sync/src/syncPipeline.c index ee68824dc8..6600b505c1 100644 --- a/source/libs/sync/src/syncPipeline.c +++ b/source/libs/sync/src/syncPipeline.c @@ -54,7 +54,7 @@ int32_t syncLogBufferAppend(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt } SyncIndex appliedIndex = pNode->pFsm->FpAppliedIndexCb(pNode->pFsm); - if (index - appliedIndex >= pBuf->size) { + if (pNode->restoreFinish && pBuf->commitIndex - appliedIndex >= pBuf->size) { terrno = TSDB_CODE_SYN_WRITE_STALL; sError("vgId:%d, failed to append since %s. index:%" PRId64 ", commit-index:%" PRId64 ", applied-index:%" PRId64, pNode->vgId, terrstr(), index, pBuf->commitIndex, appliedIndex); From 4e4f7de0ab37f704e0b118fbb6cd32851ea6e457 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Fri, 10 Mar 2023 12:00:17 +0800 Subject: [PATCH 112/154] enh: optimize last/last_row cost when the cache was first loaded --- source/dnode/vnode/src/tsdb/tsdbCache.c | 86 ++++++++++++++++++------- 1 file changed, 63 insertions(+), 23 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index 244530314a..786d1c36fb 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -593,9 +593,10 @@ typedef struct { SMergeTree mergeTree; SMergeTree *pMergeTree; SSttBlockLoadInfo *pLoadInfo; + int64_t lastTs; } SFSLastNextRowIter; -static int32_t getNextRowFromFSLast(void *iter, TSDBROW **ppRow) { +static int32_t getNextRowFromFSLast(void *iter, TSDBROW **ppRow, bool *pIgnoreEarlierTs) { SFSLastNextRowIter *state = (SFSLastNextRowIter *)iter; int32_t code = 0; @@ -641,15 +642,27 @@ static int32_t getNextRowFromFSLast(void *iter, TSDBROW **ppRow) { } state->state = SFSLASTNEXTROW_BLOCKROW; } - case SFSLASTNEXTROW_BLOCKROW: - state->row = tMergeTreeGetRow(&state->mergeTree); - *ppRow = &state->row; - bool hasVal = tMergeTreeNext(&state->mergeTree); + case SFSLASTNEXTROW_BLOCKROW: { + bool hasVal = false; + do { + state->row = tMergeTreeGetRow(&state->mergeTree); + *ppRow = &state->row; + hasVal = tMergeTreeNext(&state->mergeTree); + } while (TSDBROW_TS(&state->row) <= state->lastTs && hasVal); + + if (TSDBROW_TS(&state->row) <= state->lastTs) { + *pIgnoreEarlierTs = true; + state->state = SFSLASTNEXTROW_FILESET; + goto _next_fileset; + } + + *pIgnoreEarlierTs = false; if (!hasVal) { state->state = SFSLASTNEXTROW_FILESET; } return code; + } default: ASSERT(0); break; @@ -725,7 +738,7 @@ typedef struct SFSNextRowIter { int64_t lastTs; } SFSNextRowIter; -static int32_t getNextRowFromFS(void *iter, TSDBROW **ppRow) { +static int32_t getNextRowFromFS(void *iter, TSDBROW **ppRow, bool *pIgnoreEarlierTs) { SFSNextRowIter *state = (SFSNextRowIter *)iter; int32_t code = 0; @@ -821,8 +834,10 @@ static int32_t getNextRowFromFS(void *iter, TSDBROW **ppRow) { tMapDataGetItemByIdx(&state->blockMap, state->iBlock, &block, tGetDataBlk); if (block.maxKey.ts <= state->lastTs) { + *pIgnoreEarlierTs = true; goto _next_fileset; } + *pIgnoreEarlierTs = false; tBlockDataReset(state->pBlockData); TABLEID tid = {.suid = state->suid, .uid = state->uid}; code = tBlockDataInit(state->pBlockData, &tid, state->pTSchema, NULL, 0); @@ -932,16 +947,23 @@ typedef struct SMemNextRowIter { SMEMNEXTROWSTATES state; STbData *pMem; // [input] STbDataIter iter; // mem buffer skip list iterator + int64_t lastTs; // bool iterOpened; // TSDBROW *curRow; } SMemNextRowIter; -static int32_t getNextRowFromMem(void *iter, TSDBROW **ppRow) { +static int32_t getNextRowFromMem(void *iter, TSDBROW **ppRow, bool *pIgnoreEarlierTs) { SMemNextRowIter *state = (SMemNextRowIter *)iter; int32_t code = 0; + *pIgnoreEarlierTs = false; switch (state->state) { case SMEMNEXTROW_ENTER: { if (state->pMem != NULL) { + if (state->pMem->maxKey <= state->lastTs) { + *ppRow = NULL; + *pIgnoreEarlierTs = true; + return code; + } tsdbTbDataIterOpen(state->pMem, NULL, 1, &state->iter); TSDBROW *pMemRow = tsdbTbDataIterGet(&state->iter); @@ -1042,13 +1064,14 @@ static bool tsdbKeyDeleted(TSDBKEY *key, SArray *pSkyline, int64_t *iSkyline) { return deleted; } -typedef int32_t (*_next_row_fn_t)(void *iter, TSDBROW **ppRow); +typedef int32_t (*_next_row_fn_t)(void *iter, TSDBROW **ppRow, bool *pIgnoreEarlierTs); typedef int32_t (*_next_row_clear_fn_t)(void *iter); typedef struct { TSDBROW *pRow; bool stop; bool next; + bool ignoreEarlierTs; void *iter; _next_row_fn_t nextRowFn; _next_row_clear_fn_t nextRowClearFn; @@ -1132,6 +1155,7 @@ static int32_t nextRowIterOpen(CacheNextRowIter *pIter, tb_uid_t uid, STsdb *pTs pIter->fsLastState.uid = uid; pIter->fsLastState.pLoadInfo = pLoadInfo; pIter->fsLastState.pDataFReader = pDataFReaderLast; + pIter->fsLastState.lastTs = lastTs; pIter->fsState.state = SFSNEXTROW_FS; pIter->fsState.pTsdb = pTsdb; @@ -1144,16 +1168,17 @@ static int32_t nextRowIterOpen(CacheNextRowIter *pIter, tb_uid_t uid, STsdb *pTs pIter->fsState.pDataFReader = pDataFReader; pIter->fsState.lastTs = lastTs; - pIter->input[0] = (TsdbNextRowState){&pIter->memRow, true, false, &pIter->memState, getNextRowFromMem, NULL}; - pIter->input[1] = (TsdbNextRowState){&pIter->imemRow, true, false, &pIter->imemState, getNextRowFromMem, NULL}; - pIter->input[2] = (TsdbNextRowState){&pIter->fsLastRow, false, true, &pIter->fsLastState, getNextRowFromFSLast, - clearNextRowFromFSLast}; + pIter->input[0] = (TsdbNextRowState){&pIter->memRow, true, false, false, &pIter->memState, getNextRowFromMem, NULL}; + pIter->input[1] = (TsdbNextRowState){&pIter->imemRow, true, false, false, &pIter->imemState, getNextRowFromMem, NULL}; + pIter->input[2] = (TsdbNextRowState){ + &pIter->fsLastRow, false, true, false, &pIter->fsLastState, getNextRowFromFSLast, clearNextRowFromFSLast}; pIter->input[3] = - (TsdbNextRowState){&pIter->fsRow, false, true, &pIter->fsState, getNextRowFromFS, clearNextRowFromFS}; + (TsdbNextRowState){&pIter->fsRow, false, true, false, &pIter->fsState, getNextRowFromFS, clearNextRowFromFS}; if (pMem) { pIter->memState.pMem = pMem; pIter->memState.state = SMEMNEXTROW_ENTER; + pIter->memState.lastTs = lastTs; pIter->input[0].stop = false; pIter->input[0].next = true; } @@ -1161,6 +1186,7 @@ static int32_t nextRowIterOpen(CacheNextRowIter *pIter, tb_uid_t uid, STsdb *pTs if (pIMem) { pIter->imemState.pMem = pIMem; pIter->imemState.state = SMEMNEXTROW_ENTER; + pIter->imemState.lastTs = lastTs; pIter->input[1].stop = false; pIter->input[1].next = true; } @@ -1188,12 +1214,12 @@ _err: } // iterate next row non deleted backward ts, version (from high to low) -static int32_t nextRowIterGet(CacheNextRowIter *pIter, TSDBROW **ppRow) { +static int32_t nextRowIterGet(CacheNextRowIter *pIter, TSDBROW **ppRow, bool *pIgnoreEarlierTs) { int code = 0; for (;;) { for (int i = 0; i < 4; ++i) { if (pIter->input[i].next && !pIter->input[i].stop) { - code = pIter->input[i].nextRowFn(pIter->input[i].iter, &pIter->input[i].pRow); + code = pIter->input[i].nextRowFn(pIter->input[i].iter, &pIter->input[i].pRow, &pIter->input[i].ignoreEarlierTs); if (code) goto _err; if (pIter->input[i].pRow == NULL) { @@ -1205,6 +1231,8 @@ static int32_t nextRowIterGet(CacheNextRowIter *pIter, TSDBROW **ppRow) { if (pIter->input[0].stop && pIter->input[1].stop && pIter->input[2].stop && pIter->input[3].stop) { *ppRow = NULL; + *pIgnoreEarlierTs = (pIter->input[0].ignoreEarlierTs || pIter->input[1].ignoreEarlierTs || + pIter->input[2].ignoreEarlierTs || pIter->input[3].ignoreEarlierTs); return code; } @@ -1305,6 +1333,7 @@ static int32_t mergeLastRow(tb_uid_t uid, STsdb *pTsdb, bool *dup, SArray **ppCo int16_t noneCol = 0; bool setNoneCol = false; bool hasRow = false; + bool ignoreEarlierTs = false; SArray *pColArray = NULL; SColVal *pColVal = &(SColVal){0}; @@ -1321,7 +1350,7 @@ static int32_t mergeLastRow(tb_uid_t uid, STsdb *pTsdb, bool *dup, SArray **ppCo do { TSDBROW *pRow = NULL; - nextRowIterGet(&iter, &pRow); + nextRowIterGet(&iter, &pRow, &ignoreEarlierTs); if (!pRow) { break; @@ -1421,7 +1450,12 @@ static int32_t mergeLastRow(tb_uid_t uid, STsdb *pTsdb, bool *dup, SArray **ppCo // taosArrayDestroy(pColArray); //} else { if (!hasRow) { - taosArrayClear(pColArray); + if (ignoreEarlierTs) { + taosArrayDestroy(pColArray); + pColArray = NULL; + } else { + taosArrayClear(pColArray); + } } *ppColArray = pColArray; //} @@ -1443,6 +1477,7 @@ static int32_t mergeLast(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SCach int16_t noneCol = 0; bool setNoneCol = false; bool hasRow = false; + bool ignoreEarlierTs = false; SArray *pColArray = NULL; SColVal *pColVal = &(SColVal){0}; @@ -1459,7 +1494,7 @@ static int32_t mergeLast(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SCach do { TSDBROW *pRow = NULL; - nextRowIterGet(&iter, &pRow); + nextRowIterGet(&iter, &pRow, &ignoreEarlierTs); if (!pRow) { break; @@ -1559,7 +1594,12 @@ static int32_t mergeLast(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SCach // taosArrayDestroy(pColArray); //} else { if (!hasRow) { - taosArrayClear(pColArray); + if (ignoreEarlierTs) { + taosArrayDestroy(pColArray); + pColArray = NULL; + } else { + taosArrayClear(pColArray); + } } *ppLastArray = pColArray; //} @@ -1593,8 +1633,8 @@ int32_t tsdbCacheGetLastrowH(SLRUCache *pCache, tb_uid_t uid, SCacheRowsReader * SArray *pArray = NULL; bool dup = false; // which is always false for now code = mergeLastRow(uid, pTsdb, &dup, &pArray, pr); - // if table's empty or error, set handle NULL and return - if (code < 0 /* || pArray == NULL*/) { + // if table's empty or error or ignore ignore earlier ts, set handle NULL and return + if (code < 0 || pArray == NULL) { if (!dup && pArray) { taosArrayDestroy(pArray); } @@ -1637,8 +1677,8 @@ int32_t tsdbCacheGetLastH(SLRUCache *pCache, tb_uid_t uid, SCacheRowsReader *pr, if (!h) { SArray *pLastArray = NULL; code = mergeLast(uid, pTsdb, &pLastArray, pr); - // if table's empty or error, set handle NULL and return - if (code < 0 /* || pLastArray == NULL*/) { + // if table's empty or error or ignore ignore earlier ts, set handle NULL and return + if (code < 0 || pLastArray == NULL) { taosThreadMutexUnlock(&pTsdb->lruMutex); *handle = NULL; From 80e0aad1f02de708f274075a8e7e7543b286fd44 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Fri, 10 Mar 2023 12:11:46 +0800 Subject: [PATCH 113/154] fix:heap overflow --- source/client/src/clientSml.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index 46cca54e42..0de4a98141 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -1216,7 +1216,8 @@ static int32_t smlInsertData(SSmlHandle *info) { if(info->pRequest->dbList == NULL){ info->pRequest->dbList = taosArrayInit(1, TSDB_DB_FNAME_LEN); } - taosArrayPush(info->pRequest->dbList, info->pRequest->pDb); + void* data = taosArrayReserve(info->pRequest->dbList, 1); + memcpy(data, info->pRequest->pDb, TSDB_DB_FNAME_LEN > strlen(info->pRequest->pDb) ? strlen(info->pRequest->pDb) : TSDB_DB_FNAME_LEN); SSmlTableInfo **oneTable = (SSmlTableInfo **)taosHashIterate(info->childTables, NULL); while (oneTable) { From 3865404674093b166b1c3997b3a7820b8cda630f Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 10 Mar 2023 14:19:03 +0800 Subject: [PATCH 114/154] add user err code --- source/dnode/mnode/impl/src/mndUser.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/dnode/mnode/impl/src/mndUser.c b/source/dnode/mnode/impl/src/mndUser.c index 23822c8f20..92b73aed96 100644 --- a/source/dnode/mnode/impl/src/mndUser.c +++ b/source/dnode/mnode/impl/src/mndUser.c @@ -337,7 +337,11 @@ SUserObj *mndAcquireUser(SMnode *pMnode, const char *userName) { SSdb *pSdb = pMnode->pSdb; SUserObj *pUser = sdbAcquire(pSdb, SDB_USER, userName); if (pUser == NULL) { - terrno = TSDB_CODE_MND_USER_NOT_EXIST; + if (terrno == TSDB_CODE_SDB_OBJ_NOT_THERE) { + terrno = TSDB_CODE_MND_USER_NOT_EXIST; + } else { + terrno = TSDB_CODE_MND_USER_NOT_AVAILABLE; + } } return pUser; } From 7e071ff458f8e93a90367535c309b18660280658 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Fri, 10 Mar 2023 16:01:40 +0800 Subject: [PATCH 115/154] enh: optimize snapshot transfer --- source/dnode/vnode/src/tsdb/tsdbSnapshot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbSnapshot.c b/source/dnode/vnode/src/tsdb/tsdbSnapshot.c index 1a98134d70..aed863d194 100644 --- a/source/dnode/vnode/src/tsdb/tsdbSnapshot.c +++ b/source/dnode/vnode/src/tsdb/tsdbSnapshot.c @@ -198,7 +198,7 @@ static int32_t tsdbSnapCmprData(STsdbSnapReader* pReader, uint8_t** ppData) { ASSERT(pReader->bData.nRow); int32_t aBufN[5] = {0}; - code = tCmprBlockData(&pReader->bData, TWO_STAGE_COMP, NULL, NULL, pReader->aBuf, aBufN); + code = tCmprBlockData(&pReader->bData, NO_COMPRESSION, NULL, NULL, pReader->aBuf, aBufN); if (code) goto _exit; int32_t size = aBufN[0] + aBufN[1] + aBufN[2] + aBufN[3]; @@ -276,7 +276,7 @@ static int32_t tsdbSnapReadTimeSeriesData(STsdbSnapReader* pReader, uint8_t** pp code = tsdbSnapReadNextRow(pReader, &pRowInfo); TSDB_CHECK_CODE(code, lino, _exit); - if (pReader->bData.nRow >= 4096) break; + if (pReader->bData.nRow >= 81920) break; } while (pRowInfo); ASSERT(pReader->bData.nRow > 0); From f82dcf0316b03ca4819a90a2e85db32ef7cd8ceb Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Fri, 10 Mar 2023 16:45:13 +0800 Subject: [PATCH 116/154] fix(query): remove assert --- source/libs/executor/src/timewindowoperator.c | 1 - 1 file changed, 1 deletion(-) diff --git a/source/libs/executor/src/timewindowoperator.c b/source/libs/executor/src/timewindowoperator.c index bfdf5ea89b..33554d593f 100644 --- a/source/libs/executor/src/timewindowoperator.c +++ b/source/libs/executor/src/timewindowoperator.c @@ -939,7 +939,6 @@ static void hashIntervalAgg(SOperatorInfo* pOperatorInfo, SResultRowInfo* pResul TSKEY ekey = ascScan ? win.ekey : win.skey; int32_t forwardRows = getNumOfRowsInTimeWindow(&pBlock->info, tsCols, startPos, ekey, binarySearchForKey, NULL, pInfo->inputOrder); - ASSERT(forwardRows > 0); // prev time window not interpolation yet. if (pInfo->timeWindowInterpo) { From 11e55f028b3a3e1248b85eddb1bb2ce6a6b87b56 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Fri, 10 Mar 2023 17:49:27 +0800 Subject: [PATCH 117/154] fix: error in last cache handle deleted data --- source/dnode/vnode/src/tsdb/tsdbCache.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index 786d1c36fb..58401cdf44 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -506,6 +506,11 @@ static int32_t getTableDelData(STbData *pMem, STbData *pIMem, SDelFReader *pDelR SArray *aDelData) { int32_t code = 0; + if (pDelIdx) { + code = getTableDelDataFromDelIdx(pDelReader, pDelIdx, aDelData); + if (code) goto _err; + } + if (pMem) { code = getTableDelDataFromTbData(pMem, aDelData); if (code) goto _err; @@ -516,11 +521,6 @@ static int32_t getTableDelData(STbData *pMem, STbData *pIMem, SDelFReader *pDelR if (code) goto _err; } - if (pDelIdx) { - code = getTableDelDataFromDelIdx(pDelReader, pDelIdx, aDelData); - if (code) goto _err; - } - _err: return code; } From d679eaf6481d89fc1c1d3fdbb217e4094abcc67f Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Fri, 10 Mar 2023 18:10:25 +0800 Subject: [PATCH 118/154] enh: update pMnode->applied only when pMsg->code as zero --- source/dnode/mnode/impl/src/mndSync.c | 7 ++++--- source/dnode/vnode/src/vnd/vnodeSync.c | 17 +++++++++++------ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndSync.c b/source/dnode/mnode/impl/src/mndSync.c index dce7a9aadf..18548db56f 100644 --- a/source/dnode/mnode/impl/src/mndSync.c +++ b/source/dnode/mnode/impl/src/mndSync.c @@ -129,16 +129,17 @@ int32_t mndProcessWriteMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsmCbMeta int32_t mndSyncCommitMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsmCbMeta *pMeta) { int32_t code = 0; - SMnode *pMnode = pFsm->data; pMsg->info.conn.applyIndex = pMeta->index; pMsg->info.conn.applyTerm = pMeta->term; - atomic_store_64(&pMnode->applied, pMsg->info.conn.applyIndex); + if (pMsg->code == 0) { + SMnode *pMnode = pFsm->data; + atomic_store_64(&pMnode->applied, pMsg->info.conn.applyIndex); + } if (!syncUtilUserCommit(pMsg->msgType)) { goto _out; } - code = mndProcessWriteMsg(pFsm, pMsg, pMeta); _out: diff --git a/source/dnode/vnode/src/vnd/vnodeSync.c b/source/dnode/vnode/src/vnd/vnodeSync.c index f942b3fa49..b49ca70bfa 100644 --- a/source/dnode/vnode/src/vnd/vnodeSync.c +++ b/source/dnode/vnode/src/vnd/vnodeSync.c @@ -429,24 +429,29 @@ static int32_t vnodeSyncApplyMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsm pVnode->config.vgId, pFsm, pMeta->index, pMeta->term, pMsg->info.conn.applyIndex, pMeta->isWeak, pMeta->code, pMeta->state, syncStr(pMeta->state), TMSG_INFO(pMsg->msgType), pMsg->code); + return tmsgPutToQueue(&pVnode->msgCb, APPLY_QUEUE, pMsg); +} + +static int32_t vnodeSyncCommitMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsmCbMeta *pMeta) { if (pMsg->code == 0) { - return tmsgPutToQueue(&pVnode->msgCb, APPLY_QUEUE, pMsg); + return vnodeSyncApplyMsg(pFsm, pMsg, pMeta); } + const STraceId *trace = &pMsg->info.traceId; + SVnode *pVnode = pFsm->data; vnodePostBlockMsg(pVnode, pMsg); + SRpcMsg rsp = {.code = pMsg->code, .info = pMsg->info}; if (rsp.info.handle != NULL) { tmsgSendRsp(&rsp); } + + vGTrace("vgId:%d, msg:%p is freed, code:0x%x index:%" PRId64, TD_VID(pVnode), pMsg, rsp.code, pMeta->index); rpcFreeCont(pMsg->pCont); pMsg->pCont = NULL; return 0; } -static int32_t vnodeSyncCommitMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsmCbMeta *pMeta) { - return vnodeSyncApplyMsg(pFsm, pMsg, pMeta); -} - static int32_t vnodeSyncPreCommitMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsmCbMeta *pMeta) { if (pMeta->isWeak == 1) { return vnodeSyncApplyMsg(pFsm, pMsg, pMeta); @@ -539,7 +544,7 @@ static void vnodeRestoreFinish(const SSyncFSM *pFsm, const SyncIndex commitIdx) } } while (true); - ASSERT(appliedIdx == commitIdx); + ASSERT(commitIdx == vnodeSyncAppliedIndex(pFsm)); walApplyVer(pVnode->pWal, commitIdx); pVnode->restored = true; From 822bb11a26ee7e646153b92275615b769e2903ce Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Fri, 10 Mar 2023 18:23:30 +0800 Subject: [PATCH 119/154] fix: invalid topic query --- source/libs/parser/src/parTranslater.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 9d1fd3218e..85bf8d9462 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -5573,7 +5573,8 @@ static int32_t checkCreateTopic(STranslateContext* pCxt, SCreateTopicStmt* pStmt if (QUERY_NODE_SELECT_STMT == nodeType(pStmt->pQuery)) { SSelectStmt* pSelect = (SSelectStmt*)pStmt->pQuery; - if (!pSelect->isDistinct && QUERY_NODE_REAL_TABLE == nodeType(pSelect->pFromTable) && + if (!pSelect->isDistinct && + (NULL != pSelect->pFromTable && QUERY_NODE_REAL_TABLE == nodeType(pSelect->pFromTable)) && NULL == pSelect->pGroupByList && NULL == pSelect->pLimit && NULL == pSelect->pSlimit && NULL == pSelect->pOrderByList && NULL == pSelect->pPartitionByList) { return TSDB_CODE_SUCCESS; From 60603343f680f625db40f0e48ecbe660a4c3db32 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Fri, 10 Mar 2023 20:10:45 +0800 Subject: [PATCH 120/154] ci:Specify the version of the python connector --- tests/parallel_test/run_case.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/parallel_test/run_case.sh b/tests/parallel_test/run_case.sh index e0b905375a..a1b867c9e4 100755 --- a/tests/parallel_test/run_case.sh +++ b/tests/parallel_test/run_case.sh @@ -74,6 +74,7 @@ RET=$? echo "cmd exit code: $RET" md5sum /usr/lib/libtaos.so.1 md5sum /home/TDinternal/debug/build/lib/libtaos.so +pip3 install taospy==2.7.3 if [ $RET -ne 0 ]; then pwd From ac1711fd19e3c21d22d14268b26630daa4a3fa04 Mon Sep 17 00:00:00 2001 From: haoranchen Date: Fri, 10 Mar 2023 20:20:36 +0800 Subject: [PATCH 121/154] ci:Specify the version of the python connector (#20407) * ci:Specify the version of the python connector * ci:Specify the version of the python connector --- tests/parallel_test/run_case.sh | 2 ++ tests/parallel_test/run_container.sh | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/parallel_test/run_case.sh b/tests/parallel_test/run_case.sh index e0b905375a..08698a15f7 100755 --- a/tests/parallel_test/run_case.sh +++ b/tests/parallel_test/run_case.sh @@ -74,6 +74,8 @@ RET=$? echo "cmd exit code: $RET" md5sum /usr/lib/libtaos.so.1 md5sum /home/TDinternal/debug/build/lib/libtaos.so +#define taospy 2.7.3 +pip3 install taospy==2.7.3 if [ $RET -ne 0 ]; then pwd diff --git a/tests/parallel_test/run_container.sh b/tests/parallel_test/run_container.sh index b5deb09341..8ea2f249c1 100755 --- a/tests/parallel_test/run_container.sh +++ b/tests/parallel_test/run_container.sh @@ -130,8 +130,6 @@ docker run \ -v ${SOURCEDIR}:/usr/local/src/ \ -v "$TMP_DIR/thread_volume/$thread_no/sim:${SIM_DIR}" \ -v ${TMP_DIR}/thread_volume/$thread_no/coredump:$coredump_dir \ - -v $WORKDIR/taos-connector-python/taos:/usr/local/lib/python3.8/site-packages/taos:ro \ - -v $WORKDIR/taos-connector-python/taosrest:/usr/local/lib/python3.8/site-packages/taosrest:ro \ --rm --ulimit core=-1 taos_test:v1.0 $CONTAINER_TESTDIR/tests/parallel_test/run_case.sh -d "$exec_dir" -c "$cmd" $extra_param ret=$? exit $ret From f3ad6375767108f2b12dac88b9fdddc6622c31f8 Mon Sep 17 00:00:00 2001 From: haoranchen Date: Sat, 11 Mar 2023 10:38:21 +0800 Subject: [PATCH 122/154] ci:Specify the version of the python connector (#20408) * ci:Specify the version of the python connector * ci:Specify the version of the python connector * ci:Specify the version of the python connector * ci:Specify the version of the python connector * ci:Specify the version of the python connector * ci:Specify the version of the windows python connector --- Jenkinsfile2 | 5 ++--- tests/parallel_test/run_case.sh | 9 +++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile2 b/Jenkinsfile2 index 0177c57538..715a9283d6 100644 --- a/Jenkinsfile2 +++ b/Jenkinsfile2 @@ -313,7 +313,8 @@ def pre_test_build_win() { bat ''' cd %WIN_CONNECTOR_ROOT% python.exe -m pip install --upgrade pip - python -m pip install . + python -m pip uninstall taospy -y + python -m pip install taospy==2.7.3 xcopy /e/y/i/f %WIN_INTERNAL_ROOT%\\debug\\build\\lib\\taos.dll C:\\Windows\\System32 ''' return 1 @@ -331,8 +332,6 @@ def run_win_test() { bat ''' echo "windows test ..." cd %WIN_CONNECTOR_ROOT% - python.exe -m pip install --upgrade pip - python -m pip install . xcopy /e/y/i/f %WIN_INTERNAL_ROOT%\\debug\\build\\lib\\taos.dll C:\\Windows\\System32 ls -l C:\\Windows\\System32\\taos.dll time /t diff --git a/tests/parallel_test/run_case.sh b/tests/parallel_test/run_case.sh index 08698a15f7..dfbb2b2ede 100755 --- a/tests/parallel_test/run_case.sh +++ b/tests/parallel_test/run_case.sh @@ -69,13 +69,18 @@ ulimit -c unlimited md5sum /usr/lib/libtaos.so.1 md5sum /home/TDinternal/debug/build/lib/libtaos.so + +#define taospy 2.7.3 +pip3 list|grep taospy +pip3 uninstall taospy -y +pip3 install taospy==2.7.3 + $TIMEOUT_CMD $cmd RET=$? echo "cmd exit code: $RET" md5sum /usr/lib/libtaos.so.1 md5sum /home/TDinternal/debug/build/lib/libtaos.so -#define taospy 2.7.3 -pip3 install taospy==2.7.3 + if [ $RET -ne 0 ]; then pwd From 84ef1c78d4a1a98a92aff67fd30f8927340a51a4 Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao@163.com> Date: Sat, 11 Mar 2023 11:33:50 +0800 Subject: [PATCH 123/154] fix:auto fill null column --- source/dnode/vnode/src/tq/tqRead.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/dnode/vnode/src/tq/tqRead.c b/source/dnode/vnode/src/tq/tqRead.c index bf73cca925..24a9e1d9dc 100644 --- a/source/dnode/vnode/src/tq/tqRead.c +++ b/source/dnode/vnode/src/tq/tqRead.c @@ -707,7 +707,10 @@ int32_t tqRetrieveDataBlock2(SSDataBlock* pBlock, STqReader* pReader, SSubmitTbD sourceIdx++; targetIdx++; } else { - ASSERT(0); + for (int32_t i = 0; i < pCol->nVal; i++) { + colDataSetNULL(pColData, i); + } + targetIdx++; } } } else { @@ -749,7 +752,8 @@ int32_t tqRetrieveDataBlock2(SSDataBlock* pBlock, STqReader* pReader, SSubmitTbD sourceIdx++; break; } else { - ASSERT(0); + colDataSetNULL(pColData, i); + break; } } } From 5df32cbc78c3ab7b5af633c8d5c705a93863a887 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Sat, 11 Mar 2023 13:08:20 +0800 Subject: [PATCH 124/154] feat: correct slimit&limit clause --- include/util/taoserror.h | 2 +- source/libs/executor/src/groupoperator.c | 7 +- source/libs/parser/src/parTranslater.c | 4 +- source/libs/parser/src/parUtil.c | 4 +- source/util/src/terror.c | 2 +- tests/parallel_test/cases.task | 1 + tests/script/tsim/parser/slimit_limit.sim | 113 ++++++++++++++++++++++ 7 files changed, 125 insertions(+), 8 deletions(-) create mode 100644 tests/script/tsim/parser/slimit_limit.sim diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 5106196ccd..1d55731637 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -641,7 +641,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_PAR_INCORRECT_NUM_OF_COL TAOS_DEF_ERROR_CODE(0, 0x2634) #define TSDB_CODE_PAR_INCORRECT_TIMESTAMP_VAL TAOS_DEF_ERROR_CODE(0, 0x2635) #define TSDB_CODE_PAR_OFFSET_LESS_ZERO TAOS_DEF_ERROR_CODE(0, 0x2637) -#define TSDB_CODE_PAR_SLIMIT_LEAK_PARTITION_BY TAOS_DEF_ERROR_CODE(0, 0x2638) +#define TSDB_CODE_PAR_SLIMIT_LEAK_PARTITION_GROUP_BY TAOS_DEF_ERROR_CODE(0, 0x2638) #define TSDB_CODE_PAR_INVALID_TOPIC_QUERY TAOS_DEF_ERROR_CODE(0, 0x2639) #define TSDB_CODE_PAR_INVALID_DROP_STABLE TAOS_DEF_ERROR_CODE(0, 0x263A) #define TSDB_CODE_PAR_INVALID_FILL_TIME_RANGE TAOS_DEF_ERROR_CODE(0, 0x263B) diff --git a/source/libs/executor/src/groupoperator.c b/source/libs/executor/src/groupoperator.c index 65146edfac..a5398678d0 100644 --- a/source/libs/executor/src/groupoperator.c +++ b/source/libs/executor/src/groupoperator.c @@ -277,6 +277,7 @@ static void doHashGroupbyAgg(SOperatorInfo* pOperator, SSDataBlock* pBlock) { terrno = TSDB_CODE_SUCCESS; int32_t num = 0; + uint64_t groupId = 0; for (int32_t j = 0; j < pBlock->info.rows; ++j) { // Compare with the previous row of this column, and do not set the output buffer again if they are identical. if (!pInfo->isInit) { @@ -306,8 +307,9 @@ static void doHashGroupbyAgg(SOperatorInfo* pOperator, SSDataBlock* pBlock) { } len = buildGroupKeys(pInfo->keyBuf, pInfo->pGroupColVals); + groupId = calcGroupId(pInfo->keyBuf, len); int32_t ret = setGroupResultOutputBuf(pOperator, &(pInfo->binfo), pOperator->exprSupp.numOfExprs, pInfo->keyBuf, - len, pBlock->info.id.groupId, pInfo->aggSup.pResultBuf, &pInfo->aggSup); + len, groupId, pInfo->aggSup.pResultBuf, &pInfo->aggSup); if (ret != TSDB_CODE_SUCCESS) { // null data, too many state code T_LONG_JMP(pTaskInfo->env, TSDB_CODE_APP_ERROR); } @@ -324,8 +326,9 @@ static void doHashGroupbyAgg(SOperatorInfo* pOperator, SSDataBlock* pBlock) { if (num > 0) { len = buildGroupKeys(pInfo->keyBuf, pInfo->pGroupColVals); + groupId = calcGroupId(pInfo->keyBuf, len); int32_t ret = setGroupResultOutputBuf(pOperator, &(pInfo->binfo), pOperator->exprSupp.numOfExprs, pInfo->keyBuf, - len, pBlock->info.id.groupId, pInfo->aggSup.pResultBuf, &pInfo->aggSup); + len, groupId, pInfo->aggSup.pResultBuf, &pInfo->aggSup); if (ret != TSDB_CODE_SUCCESS) { T_LONG_JMP(pTaskInfo->env, TSDB_CODE_APP_ERROR); } diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index b937eeb9d8..22ca8ea160 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -3373,8 +3373,8 @@ static int32_t checkLimit(STranslateContext* pCxt, SSelectStmt* pSelect) { return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_OFFSET_LESS_ZERO); } - if (NULL != pSelect->pSlimit && NULL == pSelect->pPartitionByList) { - return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SLIMIT_LEAK_PARTITION_BY); + if (NULL != pSelect->pSlimit && (NULL == pSelect->pPartitionByList && NULL == pSelect->pGroupByList)) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SLIMIT_LEAK_PARTITION_GROUP_BY); } return TSDB_CODE_SUCCESS; diff --git a/source/libs/parser/src/parUtil.c b/source/libs/parser/src/parUtil.c index 89a42cb03c..a4cf2f603d 100644 --- a/source/libs/parser/src/parUtil.c +++ b/source/libs/parser/src/parUtil.c @@ -103,8 +103,8 @@ static char* getSyntaxErrFormat(int32_t errCode) { return "Incorrect TIMESTAMP value: %s"; case TSDB_CODE_PAR_OFFSET_LESS_ZERO: return "soffset/offset can not be less than 0"; - case TSDB_CODE_PAR_SLIMIT_LEAK_PARTITION_BY: - return "slimit/soffset only available for PARTITION BY query"; + case TSDB_CODE_PAR_SLIMIT_LEAK_PARTITION_GROUP_BY: + return "slimit/soffset only available for PARTITION/GROUP BY query"; case TSDB_CODE_PAR_INVALID_TOPIC_QUERY: return "Invalid topic query"; case TSDB_CODE_PAR_INVALID_DROP_STABLE: diff --git a/source/util/src/terror.c b/source/util/src/terror.c index a19a022b01..dc758fc05c 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -514,7 +514,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_PAR_ONLY_ONE_JSON_TAG, "Only one tag if ther TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INCORRECT_NUM_OF_COL, "Query block has incorrect number of result columns") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INCORRECT_TIMESTAMP_VAL, "Incorrect TIMESTAMP value") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_OFFSET_LESS_ZERO, "soffset/offset can not be less than 0") -TAOS_DEFINE_ERROR(TSDB_CODE_PAR_SLIMIT_LEAK_PARTITION_BY, "slimit/soffset only available for PARTITION BY query") +TAOS_DEFINE_ERROR(TSDB_CODE_PAR_SLIMIT_LEAK_PARTITION_GROUP_BY, "slimit/soffset only available for PARTITION/GROUP BY query") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_TOPIC_QUERY, "Invalid topic query") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_DROP_STABLE, "Cannot drop super table in batch") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_FILL_TIME_RANGE, "Start(end) time of query range required or time range too large") diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 0945c4a7f7..4ff6ce99ad 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -168,6 +168,7 @@ ,,y,script,./test.sh -f tsim/parser/union.sim ,,y,script,./test.sh -f tsim/parser/union_sysinfo.sim ,,y,script,./test.sh -f tsim/parser/where.sim +,,y,script,./test.sh -f tsim/parser/slimit_limit.sim ,,y,script,./test.sh -f tsim/query/tagLikeFilter.sim ,,y,script,./test.sh -f tsim/query/charScalarFunction.sim ,,y,script,./test.sh -f tsim/query/explain.sim diff --git a/tests/script/tsim/parser/slimit_limit.sim b/tests/script/tsim/parser/slimit_limit.sim new file mode 100644 index 0000000000..546ef57687 --- /dev/null +++ b/tests/script/tsim/parser/slimit_limit.sim @@ -0,0 +1,113 @@ +system sh/stop_dnodes.sh +system sh/deploy.sh -n dnode1 -i 1 +system sh/exec.sh -n dnode1 -s start +sql connect + +sql drop database if exists db1; +sql create database db1 vgroups 1; +sql use db1; +sql create stable sta (ts timestamp, f1 int, f2 binary(200)) tags(t1 int, t2 int, t3 int); +sql create table tba1 using sta tags(1, 1, 1); +sql create table tba2 using sta tags(2, 2, 2); +sql create table tba3 using sta tags(3, 3, 3); +sql create table tba4 using sta tags(4, 4, 4); +sql create table tba5 using sta tags(5, 5, 5); +sql create table tba6 using sta tags(6, 6, 6); +sql create table tba7 using sta tags(7, 7, 7); +sql create table tba8 using sta tags(8, 8, 8); +sql create index index1 on sta (t2); +sql insert into tba1 values ('2022-04-26 15:15:01', 1, "a"); +sql insert into tba1 values ('2022-04-26 15:15:02', 11, "a"); +sql insert into tba2 values ('2022-04-26 15:15:01', 2, "a"); +sql insert into tba2 values ('2022-04-26 15:15:02', 22, "a"); +sql insert into tba3 values ('2022-04-26 15:15:01', 3, "a"); +sql insert into tba4 values ('2022-04-26 15:15:01', 4, "a"); +sql insert into tba5 values ('2022-04-26 15:15:01', 5, "a"); +sql insert into tba6 values ('2022-04-26 15:15:01', 6, "a"); +sql insert into tba7 values ('2022-04-26 15:15:01', 7, "a"); +sql insert into tba8 values ('2022-04-26 15:15:01', 8, "a"); + +sql select t1,count(*) from sta group by t1 limit 1; +if $rows != 8 then + return -1 +endi +sql select t1,count(*) from sta group by t1 slimit 1; +if $rows != 1 then + return -1 +endi +sql select f1,count(*) from sta group by f1 limit 1; +if $rows != 10 then + return -1 +endi +sql select f1,count(*) from sta group by f1 slimit 1; +if $rows != 1 then + return -1 +endi +sql select t1,f1,count(*) from sta group by t1, f1 limit 1; +if $rows != 10 then + return -1 +endi +sql select t1,f1,count(*) from sta group by t1, f1 slimit 1; +if $rows != 1 then + return -1 +endi +sql select t1,f1,count(*) from sta group by f1, t1 limit 1; +if $rows != 10 then + return -1 +endi +sql select t1,f1,count(*) from sta group by f1, t1 slimit 1; +if $rows != 1 then + return -1 +endi + +sql select t1,count(*) from sta group by t1 order by t1 limit 1; +if $rows != 1 then + return -1 +endi +sql select t1,count(*) from sta group by t1 order by t1 slimit 1; +if $rows != 8 then + return -1 +endi +sql select f1,count(*) from sta group by f1 order by f1 limit 1; +if $rows != 1 then + return -1 +endi +sql select f1,count(*) from sta group by f1 order by f1 slimit 1; +if $rows != 10 then + return -1 +endi +sql select t1,f1,count(*) from sta group by t1, f1 order by t1,f1 limit 1; +if $rows != 1 then + return -1 +endi +sql select t1,f1,count(*) from sta group by t1, f1 order by t1,f1 slimit 1; +if $rows != 10 then + return -1 +endi +sql select t1,f1,count(*) from sta group by f1, t1 order by f1,t1 limit 1; +if $rows != 1 then + return -1 +endi +sql select t1,f1,count(*) from sta group by f1, t1 order by f1,t1 slimit 1; +if $rows != 10 then + return -1 +endi + +sql select t1,count(*) from sta group by t1 slimit 1 limit 1; +if $rows != 1 then + return -1 +endi +sql select f1,count(*) from sta group by f1 slimit 1 limit 1; +if $rows != 1 then + return -1 +endi +sql select t1,f1,count(*) from sta group by t1, f1 slimit 1 limit 1; +if $rows != 1 then + return -1 +endi +sql select t1,f1,count(*) from sta group by f1, t1 slimit 1 limit 1; +if $rows != 1 then + return -1 +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT From a952f5ce1cd61a69ed9898f44b525941f51e639d Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Sat, 11 Mar 2023 14:19:01 +0800 Subject: [PATCH 125/154] fix: slimit/limit doc --- docs/zh/12-taos-sql/06-select.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/zh/12-taos-sql/06-select.md b/docs/zh/12-taos-sql/06-select.md index dcc085b3bd..e4ba5b76e4 100644 --- a/docs/zh/12-taos-sql/06-select.md +++ b/docs/zh/12-taos-sql/06-select.md @@ -248,11 +248,11 @@ NULLS 语法用来指定 NULL 值在排序中输出的位置。NULLS LAST 是升 LIMIT 控制输出条数,OFFSET 指定从第几条之后开始输出。LIMIT/OFFSET 对结果集的执行顺序在 ORDER BY 之后。LIMIT 5 OFFSET 2 可以简写为 LIMIT 2, 5,都输出第 3 行到第 7 行数据。 -在有 PARTITION BY 子句时,LIMIT 控制的是每个切分的分片中的输出,而不是总的结果集输出。 +在有 PARTITION BY/GROUP BY 子句时,LIMIT 控制的是每个切分的分片中的输出,而不是总的结果集输出。 ## SLIMIT -SLIMIT 和 PARTITION BY 子句一起使用,用来控制输出的分片的数量。SLIMIT 5 SOFFSET 2 可以简写为 SLIMIT 2, 5,都表示输出第 3 个到第 7 个分片。 +SLIMIT 和 PARTITION BY/GROUP BY 子句一起使用,用来控制输出的分片的数量。SLIMIT 5 SOFFSET 2 可以简写为 SLIMIT 2, 5,都表示输出第 3 个到第 7 个分片。 需要注意,如果有 ORDER BY 子句,则输出只有一个分片。 From bc13432661bd29218df923613c017ee2165bf544 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sat, 11 Mar 2023 15:39:16 +0800 Subject: [PATCH 126/154] change tag index case --- .../system-test/0-others/tag_index_advance.py | 194 +++++++++--------- 1 file changed, 99 insertions(+), 95 deletions(-) diff --git a/tests/system-test/0-others/tag_index_advance.py b/tests/system-test/0-others/tag_index_advance.py index a8d6cde85a..cc942bbf03 100644 --- a/tests/system-test/0-others/tag_index_advance.py +++ b/tests/system-test/0-others/tag_index_advance.py @@ -11,45 +11,42 @@ # -*- coding: utf-8 -*- -from ssl import ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE -import taos +import os +import random +import socket +import string +import subprocess import sys import time -import os -import socket -import subprocess -import random -import string -import random +from ssl import ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE - -from util.log import * -from util.sql import * +import taos from util.cases import * from util.common import * +from util.dnodes import * +from util.dnodes import TDDnode, TDDnodes +from util.log import * +from util.sql import * from util.sqlset import * -from util.dnodes import * -from util.dnodes import TDDnodes -from util.dnodes import TDDnode # # -------------- util -------------------------- # def pathSize(path): - + total_size = 0 for dirpath, dirnames, filenames in os.walk(path): for i in filenames: - #use join to concatenate all the components of path + # use join to concatenate all the components of path f = os.path.join(dirpath, i) - #use getsize to generate size in bytes and add it to the total size + # use getsize to generate size in bytes and add it to the total size total_size += os.path.getsize(f) - #print(dirpath) + # print(dirpath) - print(" %s %.02f MB"%(path, total_size/1024/1024)) + print(" %s %.02f MB" % (path, total_size/1024/1024)) return total_size - + ''' total = 0 with os.scandir(path) as it: @@ -67,24 +64,27 @@ def pathSize(path): # --------------- cluster ------------------------ # + class MyDnodes(TDDnodes): - def __init__(self ,dnodes_lists): - super(MyDnodes,self).__init__() + def __init__(self, dnodes_lists): + super(MyDnodes, self).__init__() self.dnodes = dnodes_lists # dnode must be TDDnode instance self.simDeployed = False + class TagCluster: noConn = True + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None self.depoly_cluster(5) self.master_dnode = self.TDDnodes.dnodes[0] - self.host=self.master_dnode.cfgDict["fqdn"] - conn1 = taos.connect(self.master_dnode.cfgDict["fqdn"] , config=self.master_dnode.cfgDir) + self.host = self.master_dnode.cfgDict["fqdn"] + conn1 = taos.connect( + self.master_dnode.cfgDict["fqdn"], config=self.master_dnode.cfgDir) tdSql.init(conn1.cursor()) - def getBuildPath(self): selfPath = os.path.dirname(os.path.realpath(__file__)) @@ -101,8 +101,7 @@ class TagCluster: break return buildPath - - def depoly_cluster(self ,dnodes_nums): + def depoly_cluster(self, dnodes_nums): testCluster = False valgrind = 0 @@ -126,7 +125,7 @@ class TagCluster: self.TDDnodes.setAsan(tdDnodes.getAsan()) self.TDDnodes.stopAll() for dnode in self.TDDnodes.dnodes: - self.TDDnodes.deploy(dnode.index,{}) + self.TDDnodes.deploy(dnode.index, {}) for dnode in self.TDDnodes.dnodes: self.TDDnodes.starttaosd(dnode.index) @@ -136,7 +135,8 @@ class TagCluster: sql = "" for dnode in self.TDDnodes.dnodes[1:]: # print(dnode.cfgDict) - dnode_id = dnode.cfgDict["fqdn"] + ":" +dnode.cfgDict["serverPort"] + dnode_id = dnode.cfgDict["fqdn"] + \ + ":" + dnode.cfgDict["serverPort"] if dnode_first_host == "": dnode_first_host = dnode.cfgDict["firstEp"].split(":")[0] dnode_first_port = dnode.cfgDict["firstEp"].split(":")[-1] @@ -145,18 +145,17 @@ class TagCluster: cmd = f"{self.getBuildPath()}/build/bin/taos -h {dnode_first_host} -P {dnode_first_port} -s " cmd += f'"{sql}"' print(cmd) - os.system(cmd) + os.system(cmd) time.sleep(2) tdLog.info(" create cluster done! ") - def getConnection(self, dnode): host = dnode.cfgDict["fqdn"] port = dnode.cfgDict["serverPort"] config_dir = dnode.cfgDir return taos.connect(host=host, port=int(port), config=config_dir) - + def run(self): tdLog.info(" create cluster ok.") @@ -168,22 +167,22 @@ class TagCluster: class PerfDB: def __init__(self): self.sqls = [] - self.spends= [] - + self.spends = [] + # execute def execute(self, sql): - print(f" perfdb execute {sql}") + print(f" perfdb execute {sql}") stime = time.time() ret = tdSql.execute(sql, 1) spend = time.time() - stime - + self.sqls.append(sql) self.spends.append(spend) return ret # query def query(self, sql): - print(f" perfdb query {sql}") + print(f" perfdb query {sql}") start = time.time() ret = tdSql.query(sql, None, 1) spend = time.time() - start @@ -203,9 +202,9 @@ class TDTestCase: self.tagCluster = TagCluster() self.tagCluster.init(conn, logSql, replicaVar) self.lenBinary = 64 - self.lenNchar = 32 - - # column + self.lenNchar = 32 + + # column self.column_dict = { 'ts': 'timestamp', 'col1': 'tinyint', @@ -252,14 +251,14 @@ class TDTestCase: # query def query(self, sql): - return self.dbs[self.cur].query(sql) - - def set_stb_sql(self,stbname,column_dict,tag_dict): + return self.dbs[self.cur].query(sql) + + def set_stb_sql(self, stbname, column_dict, tag_dict): column_sql = '' tag_sql = '' - for k,v in column_dict.items(): + for k, v in column_dict.items(): column_sql += f"{k} {v}, " - for k,v in tag_dict.items(): + for k, v in tag_dict.items(): tag_sql += f"{k} {v}, " create_stb_sql = f'create stable {stbname} ({column_sql[:-2]}) tags ({tag_sql[:-2]})' return create_stb_sql @@ -268,37 +267,41 @@ class TDTestCase: def create_database(self, dbname, vgroups, replica): sql = f'create database {dbname} vgroups {vgroups} replica {replica}' tdSql.execute(sql) - #tdSql.execute(sql) + # tdSql.execute(sql) tdSql.execute(f'use {dbname}') - + # create stable and child tables def create_table(self, stbname, tbname, count): # create stable - create_table_sql = self.set_stb_sql(stbname, self.column_dict, self.tag_dict) + create_table_sql = self.set_stb_sql( + stbname, self.column_dict, self.tag_dict) tdSql.execute(create_table_sql) # create child table tdLog.info(f" start create {count} child tables.") - for i in range(count): - ti = i % 128 - binTxt = self.random_string(self.lenBinary) - tags = f'{ti},{ti},{i},{i},{ti},{ti},{i},{i},{i}.000{i},{i}.000{i},true,"{binTxt}","nch{i}",now' - sql = f'create table {tbname}{i} using {stbname} tags({tags})' - tdSql.execute(sql) - if i > 0 and i % 1000 == 0: - tdLog.info(f" child table count = {i}") + batchSql = "" + batchSize = 5000 + for i in range(int(count/batchSize)): + batchSql = "create table" + for j in range(batchSize): + ti = (i * batchSize + j) % 128 + binTxt = self.random_string(self.lenBinary) + idx = i * batchSize + j + tags = f'{ti},{ti},{idx},{idx},{ti},{ti},{idx},{idx},{idx}.000{idx},{idx}.000{idx},true,"{binTxt}","nch{idx}",now' + sql = f'{tbname}{idx} using {stbname} tags({tags})' + batchSql = batchSql + " " + sql + tdSql.execute(batchSql) + tdLog.info(f" child table count = {i * batchSize}") - tdLog.info(f" end create {count} child tables.") - - # create stable and child tables + def create_tagidx(self, stbname): cnt = -1 for key in self.tag_dict.keys(): # first tag have default index, so skip if cnt == -1: cnt = 0 - continue; + continue sql = f'create index idx_{key} on {stbname} ({key})' tdLog.info(f" sql={sql}") tdSql.execute(sql) @@ -309,11 +312,11 @@ class TDTestCase: def insert_data(self, tbname): # d1 insert 3 rows for i in range(3): - sql = f'insert into {tbname}1(ts,col1) values(now+{i}s,{i});' + sql = f'insert into {tbname}1(ts,col1) values(now+{i}s,{i});' tdSql.execute(sql) # d20 insert 4 for i in range(4): - sql = f'insert into {tbname}20(ts,col1) values(now+{i}s,{i});' + sql = f'insert into {tbname}20(ts,col1) values(now+{i}s,{i});' tdSql.execute(sql) # check show indexs @@ -376,17 +379,17 @@ class TDTestCase: self.query(sql) tdSql.checkRows(4) - # drop child table + def drop_tables(self, tbname, count): # table d1 and d20 have verify data , so can not drop start = random.randint(21, count/2) - end = random.randint(count/2 + 1, count - 1) + end = random.randint(count/2 + 1, count - 1) for i in range(start, end): sql = f'drop table {tbname}{i}' tdSql.execute(sql) - cnt = end - start + 1 - tdLog.info(f' drop table from {start} to {end} count={cnt}') + cnt = end - start + 1 + tdLog.info(f' drop table from {start} to {end} count={cnt}') # drop tag index def drop_tagidx(self, dbname, stbname): @@ -396,11 +399,11 @@ class TDTestCase: # first tag have default index, so skip if cnt == -1: cnt = 0 - continue; + continue sql = f'drop index idx_{key}' tdSql.execute(sql) cnt += 1 - + # check idx result is 0 sql = f'select index_name,column_name from information_schema.ins_indexes where db_name="{dbname}"' tdSql.query(sql) @@ -408,17 +411,19 @@ class TDTestCase: tdLog.info(f' drop {cnt} tag indexs ok.') # show performance - def show_performance(self, count) : - db = self.dbs[0] + def show_performance(self, count): + db = self.dbs[0] db1 = self.dbs[1] cnt = len(db.sqls) cnt1 = len(db1.sqls) - if cnt != len(db1.sqls): - tdLog.info(f" datebase sql count not equal. cnt={cnt} cnt1={cnt1}\n") + if cnt != len(db1.sqls): + tdLog.info( + f" datebase sql count not equal. cnt={cnt} cnt1={cnt1}\n") return False tdLog.info(f" database sql cnt ={cnt}") - print(f" ----------------- performance (child tables = {count})--------------------") + print( + f" ----------------- performance (child tables = {count})--------------------") print(" No time(index) time(no-index) diff(col3-col2) rate(col2/col3) sql") for i in range(cnt): key = db.sqls[i] @@ -427,12 +432,13 @@ class TDTestCase: value1 = db1.spends[i] diff = value1 - value rate = value/value1*100 - print(" %d %.3fs %.3fs %.3fs %d%% %s"%(i+1, value, value1, diff, rate, key)) + print(" %d %.3fs %.3fs %.3fs %d%% %s" % ( + i+1, value, value1, diff, rate, key)) print(" --------------------- end ------------------------") - return True - + return True + def show_diskspace(self): - #calc + # calc selfPath = os.path.dirname(os.path.realpath(__file__)) projPath = "" if ("community" in selfPath): @@ -451,43 +457,41 @@ class TDTestCase: idx_size = vnode2_size + vnode3_size noidx_size = vnode4_size + vnode5_size - print(" index = %.02f M"%(idx_size/1024/1024)) - print(" no-index = %.02f M"%(noidx_size/1024/1024)) - print(" index/no-index = %.2f multiple"%(idx_size/noidx_size)) + print(" index = %.02f M" % (idx_size/1024/1024)) + print(" no-index = %.02f M" % (noidx_size/1024/1024)) + print(" index/no-index = %.2f multiple" % (idx_size/noidx_size)) print(" -------------------- end ------------------------") - - - # main + def testdb(self, dbname, stable, tbname, count, createidx): # cur if createidx: self.cur = 0 - else : + else: self.cur = 1 - # do + # do self.create_database(dbname, 2, 1) self.create_table(stable, tbname, count) - if(createidx): - self.create_tagidx(stable) + if (createidx): + self.create_tagidx(stable) self.insert_data(tbname) - if(createidx): - self.show_tagidx(dbname,stable) + if (createidx): + self.show_tagidx(dbname, stable) self.query_tagidx(stable) - #self.drop_tables(tbname, count) - #if(createidx): + # self.drop_tables(tbname, count) + # if(createidx): # self.drop_tagidx(dbname, stable) # query after delete , expect no crash - #self.query_tagidx(stable) + # self.query_tagidx(stable) tdSql.execute(f'flush database {dbname}') # run def run(self): self.tagCluster.run() - + # var dbname = "tagindex" dbname1 = dbname + "1" @@ -511,10 +515,10 @@ class TDTestCase: self.show_diskspace() - def stop(self): self.tagCluster.stop() tdLog.success("%s successfully executed" % __file__) + tdCases.addWindows(__file__, TDTestCase()) -tdCases.addLinux(__file__, TDTestCase()) \ No newline at end of file +tdCases.addLinux(__file__, TDTestCase()) From c2f075a7c1b02a2de22607f971073d18498209f0 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Sat, 11 Mar 2023 15:51:54 +0800 Subject: [PATCH 127/154] ci: add successful log --- tests/parallel_test/run.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/parallel_test/run.sh b/tests/parallel_test/run.sh index 43533d4f36..7c686db188 100755 --- a/tests/parallel_test/run.sh +++ b/tests/parallel_test/run.sh @@ -274,6 +274,7 @@ function run_thread() { # echo "$thread_no ${line} DONE" if [ $ret -eq 0 ]; then echo -e "$case_index \e[34m DONE <<<<< \e[0m ${case_info} \e[34m[${total_time}s]\e[0m \e[32m success\e[0m" + flock -x $lock_file -c "echo \" ${case_info},success,${total_time}\" >>${success_case_file}" else if [ ! -z ${web_server} ]; then flock -x $lock_file -c "echo -e \"${hosts[index]} ret:${ret} ${line}\n ${web_server}/$test_log_dir/${case_file}.txt\" >>${failed_case_file}" @@ -365,6 +366,8 @@ lock_file=$log_dir/$$.lock index_file=$log_dir/case_index.txt stat_file=$log_dir/stat.txt failed_case_file=$log_dir/failed.txt +success_case_file=$log_dir/success.txt + echo "0" >$index_file i=0 From d1a7cf93fb1a3be17984e63e2b274d77a5ca46a0 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Sat, 11 Mar 2023 15:53:26 +0800 Subject: [PATCH 128/154] ci: add successful log --- tests/parallel_test/run_case.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/parallel_test/run_case.sh b/tests/parallel_test/run_case.sh index 616373e8b6..dfbb2b2ede 100755 --- a/tests/parallel_test/run_case.sh +++ b/tests/parallel_test/run_case.sh @@ -80,7 +80,6 @@ RET=$? echo "cmd exit code: $RET" md5sum /usr/lib/libtaos.so.1 md5sum /home/TDinternal/debug/build/lib/libtaos.so -pip3 install taospy==2.7.3 if [ $RET -ne 0 ]; then From 76896536d06a0da9116535ff7d814c09b2f48ce9 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Sat, 11 Mar 2023 15:55:35 +0800 Subject: [PATCH 129/154] ci: add successful log --- tests/parallel_test/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/parallel_test/run.sh b/tests/parallel_test/run.sh index 7c686db188..f0880bdb04 100755 --- a/tests/parallel_test/run.sh +++ b/tests/parallel_test/run.sh @@ -274,7 +274,7 @@ function run_thread() { # echo "$thread_no ${line} DONE" if [ $ret -eq 0 ]; then echo -e "$case_index \e[34m DONE <<<<< \e[0m ${case_info} \e[34m[${total_time}s]\e[0m \e[32m success\e[0m" - flock -x $lock_file -c "echo \" ${case_info},success,${total_time}\" >>${success_case_file}" + flock -x $lock_file -c "echo \"${case_info}|success|${total_time}\" >>${success_case_file}" else if [ ! -z ${web_server} ]; then flock -x $lock_file -c "echo -e \"${hosts[index]} ret:${ret} ${line}\n ${web_server}/$test_log_dir/${case_file}.txt\" >>${failed_case_file}" From 9cc7a9f504d79842f7155f95d4615862908f816f Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Sat, 11 Mar 2023 16:12:11 +0800 Subject: [PATCH 130/154] fix:deal with ASSERT in tmq --- source/dnode/vnode/src/tq/tq.c | 62 +---------------------------- source/dnode/vnode/src/tq/tqExec.c | 5 ++- source/dnode/vnode/src/tq/tqPush.c | 4 +- source/libs/executor/src/executor.c | 44 ++++++++++---------- 4 files changed, 31 insertions(+), 84 deletions(-) diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 5d3350a69a..d27713579f 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -169,18 +169,6 @@ int32_t tqSendMetaPollRsp(STQ* pTq, const SRpcMsg* pMsg, const SMqPollReq* pReq, int32_t tqPushDataRsp(STQ* pTq, STqPushEntry* pPushEntry) { SMqDataRsp* pRsp = &pPushEntry->dataRsp; -#if 0 - A(taosArrayGetSize(pRsp->blockData) == pRsp->blockNum); - A(taosArrayGetSize(pRsp->blockDataLen) == pRsp->blockNum); - - A(!pRsp->withSchema); - A(taosArrayGetSize(pRsp->blockSchema) == 0); - - if (pRsp->reqOffset.type == TMQ_OFFSET__LOG) { - A(pRsp->rspOffset.version > pRsp->reqOffset.version); - } -#endif - int32_t len = 0; int32_t code = 0; tEncodeSize(tEncodeSMqDataRsp, pRsp, len, code); @@ -224,22 +212,6 @@ int32_t tqPushDataRsp(STQ* pTq, STqPushEntry* pPushEntry) { } int32_t tqSendDataRsp(STQ* pTq, const SRpcMsg* pMsg, const SMqPollReq* pReq, const SMqDataRsp* pRsp) { -#if 0 - A(taosArrayGetSize(pRsp->blockData) == pRsp->blockNum); - A(taosArrayGetSize(pRsp->blockDataLen) == pRsp->blockNum); - - A(!pRsp->withSchema); - A(taosArrayGetSize(pRsp->blockSchema) == 0); - - if (pRsp->reqOffset.type == TMQ_OFFSET__LOG) { - if (pRsp->blockNum > 0) { - A(pRsp->rspOffset.version > pRsp->reqOffset.version); - } else { - A(pRsp->rspOffset.version >= pRsp->reqOffset.version); - } - } -#endif - int32_t len = 0; int32_t code = 0; tEncodeSize(tEncodeSMqDataRsp, pRsp, len, code); @@ -282,25 +254,6 @@ int32_t tqSendDataRsp(STQ* pTq, const SRpcMsg* pMsg, const SMqPollReq* pReq, con } int32_t tqSendTaosxRsp(STQ* pTq, const SRpcMsg* pMsg, const SMqPollReq* pReq, const STaosxRsp* pRsp) { -#if 0 - A(taosArrayGetSize(pRsp->blockData) == pRsp->blockNum); - A(taosArrayGetSize(pRsp->blockDataLen) == pRsp->blockNum); - - if (pRsp->withSchema) { - A(taosArrayGetSize(pRsp->blockSchema) == pRsp->blockNum); - } else { - A(taosArrayGetSize(pRsp->blockSchema) == 0); - } - - if (pRsp->reqOffset.type == TMQ_OFFSET__LOG) { - if (pRsp->blockNum > 0) { - A(pRsp->rspOffset.version > pRsp->reqOffset.version); - } else { - A(pRsp->rspOffset.version >= pRsp->reqOffset.version); - } - } -#endif - int32_t len = 0; int32_t code = 0; tEncodeSize(tEncodeSTaosxRsp, pRsp, len, code); @@ -429,18 +382,6 @@ static int32_t tqInitDataRsp(SMqDataRsp* pRsp, const SMqPollReq* pReq, int8_t su } pRsp->withTbName = 0; -#if 0 - pRsp->withTbName = pReq->withTbName; - if (pRsp->withTbName) { - pRsp->blockTbName = taosArrayInit(0, sizeof(void*)); - if (pRsp->blockTbName == NULL) { - // TODO free - return -1; - } - } -#endif - - /*A(subType == TOPIC_SUB_TYPE__COLUMN);*/ pRsp->withSchema = false; return 0; @@ -992,7 +933,8 @@ int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask, int64_t ver) { pTask->tbSink.pTSchema = tBuildTSchema(pTask->tbSink.pSchemaWrapper->pSchema, pTask->tbSink.pSchemaWrapper->nCols, version); - ASSERT(pTask->tbSink.pTSchema); + if(pTask->tbSink.pTSchema == NULL){ + return -1; } streamSetupTrigger(pTask); diff --git a/source/dnode/vnode/src/tq/tqExec.c b/source/dnode/vnode/src/tq/tqExec.c index f97c5ce93c..f7eba3fbc1 100644 --- a/source/dnode/vnode/src/tq/tqExec.c +++ b/source/dnode/vnode/src/tq/tqExec.c @@ -113,7 +113,10 @@ int32_t tqScanData(STQ* pTq, const STqHandle* pHandle, SMqDataRsp* pRsp, STqOffs return -1; } - ASSERT(!(pRsp->withTbName || pRsp->withSchema)); + if(pRsp->withTbName || pRsp->withSchema){ + tqError("get column should not with meta:%d,%d", pRsp->withTbName, pRsp->withSchema); + return -1; + } return 0; } diff --git a/source/dnode/vnode/src/tq/tqPush.c b/source/dnode/vnode/src/tq/tqPush.c index 5a25d7e894..e80cb24216 100644 --- a/source/dnode/vnode/src/tq/tqPush.c +++ b/source/dnode/vnode/src/tq/tqPush.c @@ -265,7 +265,9 @@ int tqPushMsg(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_t ver) .msgLen = len, .ver = ver, }; - qStreamSetScanMemData(task, submit); + if(qStreamSetScanMemData(task, submit) != 0){ + continue; + } // here start to scan submit block to extract the subscribed data while (1) { diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c index ac78ddc23c..8b52a401f1 100644 --- a/source/libs/executor/src/executor.c +++ b/source/libs/executor/src/executor.c @@ -992,19 +992,16 @@ const char* qExtractTbnameFromTask(qTaskInfo_t tinfo) { SMqMetaRsp* qStreamExtractMetaMsg(qTaskInfo_t tinfo) { SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo; - ASSERT(pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE); return &pTaskInfo->streamInfo.metaRsp; } int64_t qStreamExtractPrepareUid(qTaskInfo_t tinfo) { SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo; - ASSERT(pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE); return pTaskInfo->streamInfo.prepareStatus.uid; } int32_t qStreamExtractOffset(qTaskInfo_t tinfo, STqOffsetVal* pOffset) { SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo; - ASSERT(pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE); memcpy(pOffset, &pTaskInfo->streamInfo.lastStatus, sizeof(STqOffsetVal)); return 0; } @@ -1040,20 +1037,12 @@ int32_t initQueryTableDataCondForTmq(SQueryTableDataCond* pCond, SSnapContext* s return TSDB_CODE_SUCCESS; } -#if 0 -int32_t qStreamScanMemData(qTaskInfo_t tinfo, const SSubmitReq* pReq, int64_t scanVer) { - SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo; - ASSERT(pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE); - ASSERT(pTaskInfo->streamInfo.pReq == NULL); - pTaskInfo->streamInfo.pReq = pReq; - pTaskInfo->streamInfo.scanVer = scanVer; - return 0; -} -#endif - int32_t qStreamSetScanMemData(qTaskInfo_t tinfo, SPackedData submit) { SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo; - ASSERT((pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE )&& (pTaskInfo->streamInfo.submit.msgStr == NULL)); + if((pTaskInfo->execModel != OPTR_EXEC_MODEL_QUEUE) || (pTaskInfo->streamInfo.submit.msgStr != NULL)){ + qError("qStreamSetScanMemData err:%d,%p", pTaskInfo->execModel, pTaskInfo->streamInfo.submit.msgStr); + return -1; + } qDebug("set the submit block for future scan"); pTaskInfo->streamInfo.submit = submit; @@ -1063,7 +1052,6 @@ int32_t qStreamSetScanMemData(qTaskInfo_t tinfo, SPackedData submit) { int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subType) { SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo; SOperatorInfo* pOperator = pTaskInfo->pRoot; - ASSERT(pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE); pTaskInfo->streamInfo.prepareStatus = *pOffset; pTaskInfo->streamInfo.returned = 0; @@ -1076,7 +1064,10 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT // TODO add more check if (pOperator->operatorType != QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN) { - ASSERT(pOperator->numOfDownstream == 1); + if(pOperator->numOfDownstream != 1){ + qError("pOperator->numOfDownstream != 1:%d", pOperator->numOfDownstream); + return -1; + } pOperator = pOperator->pDownstream[0]; } @@ -1087,6 +1078,7 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT pTSInfo->base.dataReader = NULL; // let's seek to the next version in wal file if (tqSeekVer(pInfo->tqReader, pOffset->version + 1, pTaskInfo->id.str) < 0) { + qError("tqSeekVer failed ver:" PRId64, pOffset->version + 1); return -1; } } else if (pOffset->type == TMQ_OFFSET__SNAPSHOT_DATA) { @@ -1101,6 +1093,7 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT uid = pTableInfo->uid; ts = INT64_MIN; } else { + qError("uid == 0 and tablelist size is 0"); return -1; } } @@ -1124,7 +1117,10 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT } // TODO after dropping table, table may not found - ASSERT(found); + if(!found){ + qError("uid not found in tablelist %" PRId64, uid); + return -1; + } if (pTableScanInfo->base.dataReader == NULL) { STableKeyInfo* pList = tableListGetInfo(pTaskInfo->pTableInfoList, 0); @@ -1133,7 +1129,8 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT if (tsdbReaderOpen(pTableScanInfo->base.readHandle.vnode, &pTableScanInfo->base.cond, pList, num, pTableScanInfo->pResBlock, &pTableScanInfo->base.dataReader, NULL) < 0 || pTableScanInfo->base.dataReader == NULL) { - ASSERT(0); + qError("tsdbReaderOpen failed. uid:%" PRIi64, pOffset->uid); + return -1; } } @@ -1148,7 +1145,8 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT qDebug("tsdb reader offset seek to uid %" PRId64 " ts %" PRId64 ", table cur set to %d , all table num %d", uid, ts, pTableScanInfo->currentTable, numOfTables); } else { - ASSERT(0); + qError("invalid pOffset->type:%d", pOffset->type); + return -1; } } else if (pOffset->type == TMQ_OFFSET__SNAPSHOT_DATA) { SStreamRawScanInfo* pInfo = pOperator->info; @@ -1180,7 +1178,6 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT STableKeyInfo* pList = tableListGetInfo(pTaskInfo->pTableInfoList, 0); int32_t size = tableListGetSize(pTaskInfo->pTableInfoList); - ASSERT(size == 1); tsdbReaderOpen(pInfo->vnode, &pTaskInfo->streamInfo.tableCond, pList, size, NULL, &pInfo->dataReader, NULL); @@ -1209,7 +1206,10 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT void qProcessRspMsg(void* parent, SRpcMsg* pMsg, SEpSet* pEpSet) { SMsgSendInfo* pSendInfo = (SMsgSendInfo*)pMsg->info.ahandle; - assert(pMsg->info.ahandle != NULL); + if(pMsg->info.ahandle == NULL){ + qError("pMsg->info.ahandle is NULL"); + return; + } SDataBuf buf = {.len = pMsg->contLen, .pData = NULL}; From 0e2cf0ed733b1bab43f73b7bb6e12c5c6092df5c Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Sat, 11 Mar 2023 16:51:34 +0800 Subject: [PATCH 131/154] fix:deal with ASSERT in tmq --- 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 d27713579f..cd67dc23ad 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -933,8 +933,9 @@ int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask, int64_t ver) { pTask->tbSink.pTSchema = tBuildTSchema(pTask->tbSink.pSchemaWrapper->pSchema, pTask->tbSink.pSchemaWrapper->nCols, version); - if(pTask->tbSink.pTSchema == NULL){ + if(pTask->tbSink.pTSchema == NULL) { return -1; + } } streamSetupTrigger(pTask); From 16209644c47dc8864311cf82c2cdec2c865afa83 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Sat, 11 Mar 2023 17:24:54 +0800 Subject: [PATCH 132/154] fix: regenerate groupId and case issue --- source/libs/executor/src/executorimpl.c | 1 + source/libs/executor/src/groupoperator.c | 6 ++---- tests/script/tsim/parser/groupby.sim | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index 0dcefec93d..748a28aacf 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -197,6 +197,7 @@ SResultRow* doSetResultOutBufByKey(SDiskbasedBuf* pResultBuf, SResultRowInfo* pR int16_t bytes, bool masterscan, uint64_t groupId, SExecTaskInfo* pTaskInfo, bool isIntervalQuery, SAggSupporter* pSup) { SET_RES_WINDOW_KEY(pSup->keyBuf, pData, bytes, groupId); + *(uint64_t*)pSup->keyBuf = calcGroupId(pSup->keyBuf, GET_RES_WINDOW_KEY_LEN(bytes)); SResultRowPosition* p1 = (SResultRowPosition*)tSimpleHashGet(pSup->pResultRowHashTable, pSup->keyBuf, GET_RES_WINDOW_KEY_LEN(bytes)); diff --git a/source/libs/executor/src/groupoperator.c b/source/libs/executor/src/groupoperator.c index a5398678d0..0098c3e875 100644 --- a/source/libs/executor/src/groupoperator.c +++ b/source/libs/executor/src/groupoperator.c @@ -307,9 +307,8 @@ static void doHashGroupbyAgg(SOperatorInfo* pOperator, SSDataBlock* pBlock) { } len = buildGroupKeys(pInfo->keyBuf, pInfo->pGroupColVals); - groupId = calcGroupId(pInfo->keyBuf, len); int32_t ret = setGroupResultOutputBuf(pOperator, &(pInfo->binfo), pOperator->exprSupp.numOfExprs, pInfo->keyBuf, - len, groupId, pInfo->aggSup.pResultBuf, &pInfo->aggSup); + len, pBlock->info.id.groupId, pInfo->aggSup.pResultBuf, &pInfo->aggSup); if (ret != TSDB_CODE_SUCCESS) { // null data, too many state code T_LONG_JMP(pTaskInfo->env, TSDB_CODE_APP_ERROR); } @@ -326,9 +325,8 @@ static void doHashGroupbyAgg(SOperatorInfo* pOperator, SSDataBlock* pBlock) { if (num > 0) { len = buildGroupKeys(pInfo->keyBuf, pInfo->pGroupColVals); - groupId = calcGroupId(pInfo->keyBuf, len); int32_t ret = setGroupResultOutputBuf(pOperator, &(pInfo->binfo), pOperator->exprSupp.numOfExprs, pInfo->keyBuf, - len, groupId, pInfo->aggSup.pResultBuf, &pInfo->aggSup); + len, pBlock->info.id.groupId, pInfo->aggSup.pResultBuf, &pInfo->aggSup); if (ret != TSDB_CODE_SUCCESS) { T_LONG_JMP(pTaskInfo->env, TSDB_CODE_APP_ERROR); } diff --git a/tests/script/tsim/parser/groupby.sim b/tests/script/tsim/parser/groupby.sim index 4ee9c530a7..68e70c5765 100644 --- a/tests/script/tsim/parser/groupby.sim +++ b/tests/script/tsim/parser/groupby.sim @@ -415,12 +415,12 @@ if $data03 != 0 then return -1 endi -sql select count(*),first(ts),last(ts),min(c3) from group_tb1 group by c4 limit 1; +sql select count(*),first(ts),last(ts),min(c3) from group_tb1 group by c4 slimit 1; if $rows != 1 then return -1 endi -sql select count(*),first(ts),last(ts),min(c3) from group_tb1 group by c4 limit 20 offset 9990; +sql select count(*),first(ts),last(ts),min(c3) from group_tb1 group by c4 slimit 20 soffset 9990; if $rows != 10 then return -1 endi From 322a1c05dc58caaa56e2badcf367ada1d6882e8c Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Sat, 11 Mar 2023 18:57:46 +0800 Subject: [PATCH 133/154] fix: taosbenchmark sub on 2.6 for main (#20409) * fix: taosbenchmark sub on 2.6 for main * fix: upgrade taospy to 2.7.6 and fix unstable test case --- Jenkinsfile2 | 2 +- cmake/taostools_CMakeLists.txt.in | 2 +- .../taosbenchmark/auto_create_table_json.py | 32 +++++++++---------- .../json/rest_auto_create_table.json | 2 +- .../json/sml_auto_create_table.json | 2 +- .../json/stmt_auto_create_table.json | 2 +- tests/parallel_test/run_case.sh | 4 +-- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Jenkinsfile2 b/Jenkinsfile2 index 715a9283d6..bb7fa70c57 100644 --- a/Jenkinsfile2 +++ b/Jenkinsfile2 @@ -314,7 +314,7 @@ def pre_test_build_win() { cd %WIN_CONNECTOR_ROOT% python.exe -m pip install --upgrade pip python -m pip uninstall taospy -y - python -m pip install taospy==2.7.3 + python -m pip install taospy==2.7.6 xcopy /e/y/i/f %WIN_INTERNAL_ROOT%\\debug\\build\\lib\\taos.dll C:\\Windows\\System32 ''' return 1 diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index 10677f0208..736ab0b095 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG 41d4f95 + GIT_TAG d9ec91d SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py index a6167158a2..9da678bf81 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py @@ -108,49 +108,49 @@ class TDTestCase: tdLog.info("%s" % cmd) os.system("%s" % cmd) tdSql.execute("reset query cache") - tdSql.query("select count(*) from (select distinct(tbname) from db.stb2)") + tdSql.query("select count(*) from (select distinct(tbname) from stmt_db.stb2)") tdSql.checkData(0, 0, 8) - tdSql.query("select count(*) from db.stb2") + tdSql.query("select count(*) from stmt_db.stb2") tdSql.checkData(0, 0, 160) - tdSql.query("select * from information_schema.ins_databases") - tdSql.checkData(2, 14, "us") + tdSql.query("select * from information_schema.ins_databases where name='stmt_db'") + tdSql.checkData(0, 14, "us") tdSql.execute("reset query cache") - tdSql.query("select count(*) from (select distinct(tbname) from db.`stb2-2`)") + tdSql.query("select count(*) from (select distinct(tbname) from stmt_db.`stb2-2`)") tdSql.checkData(0, 0, 8) - tdSql.query("select count(*) from db.`stb2-2`") + tdSql.query("select count(*) from stmt_db.`stb2-2`") tdSql.checkData(0, 0, 160) cmd = "%s -f ./5-taos-tools/taosbenchmark/json/rest_auto_create_table.json" %binPath tdLog.info("%s" % cmd) os.system("%s" % cmd) tdSql.execute("reset query cache") - tdSql.query("select count(*) from (select distinct(tbname) from db.stb3)") + tdSql.query("select count(*) from (select distinct(tbname) from rest_db.stb3)") tdSql.checkData(0, 0, 8) - tdSql.query("select count(*) from db.stb3") + tdSql.query("select count(*) from rest_db.stb3") tdSql.checkData(0, 0, 160) - tdSql.query("select * from information_schema.ins_databases") - tdSql.checkData(2, 14, "ns") + tdSql.query("select * from information_schema.ins_databases where name='rest_db'") + tdSql.checkData(0, 14, "ns") tdSql.execute("reset query cache") - tdSql.query("select count(*) from (select distinct(tbname) from db.`stb3-2`)") + tdSql.query("select count(*) from (select distinct(tbname) from rest_db.`stb3-2`)") tdSql.checkData(0, 0, 8) - tdSql.query("select count(*) from db.`stb3-2`") + tdSql.query("select count(*) from rest_db.`stb3-2`") tdSql.checkData(0, 0, 160) cmd = "%s -f ./5-taos-tools/taosbenchmark/json/sml_auto_create_table.json" %binPath tdLog.info("%s" % cmd) os.system("%s" % cmd) tdSql.execute("reset query cache") - tdSql.query("select count(*) from (select distinct(tbname) from db.stb4)") + tdSql.query("select count(*) from (select distinct(tbname) from sml_db.stb4)") tdSql.checkData(0, 0, 8) - tdSql.query("select count(*) from db.stb4") + tdSql.query("select count(*) from sml_db.stb4") tdSql.checkData(0, 0, 160) tdSql.execute("reset query cache") - tdSql.query("select count(*) from (select distinct(tbname) from db.`stb4-2`)") + tdSql.query("select count(*) from (select distinct(tbname) from sml_db.`stb4-2`)") tdSql.checkData(0, 0, 8) - tdSql.query("select count(*) from db.`stb4-2`") + tdSql.query("select count(*) from sml_db.`stb4-2`") tdSql.checkData(0, 0, 160) tAdapter.stop() diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/json/rest_auto_create_table.json b/tests/develop-test/5-taos-tools/taosbenchmark/json/rest_auto_create_table.json index 868ff99842..9b99521f52 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/json/rest_auto_create_table.json +++ b/tests/develop-test/5-taos-tools/taosbenchmark/json/rest_auto_create_table.json @@ -15,7 +15,7 @@ "num_of_records_per_req": 10, "databases": [{ "dbinfo": { - "name": "db", + "name": "rest_db", "drop": "yes", "replica": 1, "precision": "ns", diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/json/sml_auto_create_table.json b/tests/develop-test/5-taos-tools/taosbenchmark/json/sml_auto_create_table.json index 1bbeca672b..7b87919a6d 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/json/sml_auto_create_table.json +++ b/tests/develop-test/5-taos-tools/taosbenchmark/json/sml_auto_create_table.json @@ -15,7 +15,7 @@ "num_of_records_per_req": 10, "databases": [{ "dbinfo": { - "name": "db", + "name": "sml_db", "drop": "yes", "replica": 1, "precision": "ms", diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/json/stmt_auto_create_table.json b/tests/develop-test/5-taos-tools/taosbenchmark/json/stmt_auto_create_table.json index e6e773f616..baf0384e46 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/json/stmt_auto_create_table.json +++ b/tests/develop-test/5-taos-tools/taosbenchmark/json/stmt_auto_create_table.json @@ -15,7 +15,7 @@ "num_of_records_per_req": 10, "databases": [{ "dbinfo": { - "name": "db", + "name": "stmt_db", "drop": "yes", "replica": 1, "precision": "us", diff --git a/tests/parallel_test/run_case.sh b/tests/parallel_test/run_case.sh index dfbb2b2ede..e00e59f46b 100755 --- a/tests/parallel_test/run_case.sh +++ b/tests/parallel_test/run_case.sh @@ -70,10 +70,10 @@ ulimit -c unlimited md5sum /usr/lib/libtaos.so.1 md5sum /home/TDinternal/debug/build/lib/libtaos.so -#define taospy 2.7.3 +#define taospy 2.7.6 pip3 list|grep taospy pip3 uninstall taospy -y -pip3 install taospy==2.7.3 +pip3 install taospy==2.7.6 $TIMEOUT_CMD $cmd RET=$? From 5b75ee43966a51c89bbfc8febc9af16a024bf56e Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Sat, 11 Mar 2023 19:13:50 +0800 Subject: [PATCH 134/154] opti:modify tmq logic --- source/client/src/clientTmq.c | 3 +-- source/libs/executor/src/executor.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 9f24deff94..d32b5a1beb 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1243,7 +1243,6 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { /*pRspWrapper->vgHandle = pVg;*/ /*pRspWrapper->topicHandle = pTopic;*/ taosWriteQitem(tmq->mqueue, pRspWrapper); - tsem_post(&tmq->rspSem); } goto CREATE_MSG_FAIL; @@ -1923,7 +1922,7 @@ TAOS_RES* tmq_consumer_poll(tmq_t* tmq, int64_t timeout) { return NULL; } - if (atomic_load_8(&tmq->status) == TMQ_CONSUMER_STATUS__RECOVER) { + while (atomic_load_8(&tmq->status) == TMQ_CONSUMER_STATUS__RECOVER) { int32_t retryCnt = 0; while (TSDB_CODE_MND_CONSUMER_NOT_READY == tmqAskEp(tmq, false)) { if (retryCnt++ > 40) { diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c index 8b52a401f1..af625be0b1 100644 --- a/source/libs/executor/src/executor.c +++ b/source/libs/executor/src/executor.c @@ -1078,7 +1078,7 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT pTSInfo->base.dataReader = NULL; // let's seek to the next version in wal file if (tqSeekVer(pInfo->tqReader, pOffset->version + 1, pTaskInfo->id.str) < 0) { - qError("tqSeekVer failed ver:" PRId64, pOffset->version + 1); + qError("tqSeekVer failed ver:%" PRId64, pOffset->version + 1); return -1; } } else if (pOffset->type == TMQ_OFFSET__SNAPSHOT_DATA) { From f74c488c425b087c5f9ac253281cffb7a2c474bc Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Sun, 12 Mar 2023 11:03:41 +0800 Subject: [PATCH 135/154] fix: keep group for interval query --- source/libs/executor/inc/executorimpl.h | 2 +- source/libs/executor/src/executorimpl.c | 10 ++++++---- source/libs/executor/src/groupoperator.c | 2 +- source/libs/executor/src/projectoperator.c | 2 +- source/libs/executor/src/timewindowoperator.c | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/source/libs/executor/inc/executorimpl.h b/source/libs/executor/inc/executorimpl.h index 0b55eb4a45..434441adec 100644 --- a/source/libs/executor/inc/executorimpl.h +++ b/source/libs/executor/inc/executorimpl.h @@ -749,7 +749,7 @@ void clearResultRowInitFlag(SqlFunctionCtx* pCtx, int32_t numOfOutput); SResultRow* doSetResultOutBufByKey(SDiskbasedBuf* pResultBuf, SResultRowInfo* pResultRowInfo, char* pData, int16_t bytes, bool masterscan, uint64_t groupId, SExecTaskInfo* pTaskInfo, - bool isIntervalQuery, SAggSupporter* pSup); + bool isIntervalQuery, SAggSupporter* pSup, bool keepGroup); // operator creater functions // clang-format off SOperatorInfo* createExchangeOperatorInfo(void* pTransporter, SExchangePhysiNode* pExNode, SExecTaskInfo* pTaskInfo); diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index 748a28aacf..835a70f313 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -195,10 +195,12 @@ SResultRow* getNewResultRow(SDiskbasedBuf* pResultBuf, int32_t* currentPageId, i */ SResultRow* doSetResultOutBufByKey(SDiskbasedBuf* pResultBuf, SResultRowInfo* pResultRowInfo, char* pData, int16_t bytes, bool masterscan, uint64_t groupId, SExecTaskInfo* pTaskInfo, - bool isIntervalQuery, SAggSupporter* pSup) { + bool isIntervalQuery, SAggSupporter* pSup, bool keepGroup) { SET_RES_WINDOW_KEY(pSup->keyBuf, pData, bytes, groupId); - *(uint64_t*)pSup->keyBuf = calcGroupId(pSup->keyBuf, GET_RES_WINDOW_KEY_LEN(bytes)); - + if (!keepGroup) { + *(uint64_t*)pSup->keyBuf = calcGroupId(pSup->keyBuf, GET_RES_WINDOW_KEY_LEN(bytes)); + } + SResultRowPosition* p1 = (SResultRowPosition*)tSimpleHashGet(pSup->pResultRowHashTable, pSup->keyBuf, GET_RES_WINDOW_KEY_LEN(bytes)); @@ -1035,7 +1037,7 @@ void doSetTableGroupOutputBuf(SOperatorInfo* pOperator, int32_t numOfOutput, uin int32_t* rowEntryInfoOffset = pOperator->exprSupp.rowEntryInfoOffset; SResultRow* pResultRow = doSetResultOutBufByKey(pAggInfo->aggSup.pResultBuf, pResultRowInfo, (char*)&groupId, - sizeof(groupId), true, groupId, pTaskInfo, false, &pAggInfo->aggSup); + sizeof(groupId), true, groupId, pTaskInfo, false, &pAggInfo->aggSup, true); /* * not assign result buffer yet, add new result buffer * all group belong to one result set, and each group result has different group id so set the id to be one diff --git a/source/libs/executor/src/groupoperator.c b/source/libs/executor/src/groupoperator.c index 0098c3e875..b21140bb9d 100644 --- a/source/libs/executor/src/groupoperator.c +++ b/source/libs/executor/src/groupoperator.c @@ -918,7 +918,7 @@ int32_t setGroupResultOutputBuf(SOperatorInfo* pOperator, SOptrBasicInfo* binfo, SqlFunctionCtx* pCtx = pOperator->exprSupp.pCtx; SResultRow* pResultRow = - doSetResultOutBufByKey(pBuf, pResultRowInfo, (char*)pData, bytes, true, groupId, pTaskInfo, false, pAggSup); + doSetResultOutBufByKey(pBuf, pResultRowInfo, (char*)pData, bytes, true, groupId, pTaskInfo, false, pAggSup, false); assert(pResultRow != NULL); setResultRowInitCtx(pResultRow, pCtx, numOfCols, pOperator->exprSupp.rowEntryInfoOffset); diff --git a/source/libs/executor/src/projectoperator.c b/source/libs/executor/src/projectoperator.c index 49bc5af634..9fff7a4943 100644 --- a/source/libs/executor/src/projectoperator.c +++ b/source/libs/executor/src/projectoperator.c @@ -580,7 +580,7 @@ void setFunctionResultOutput(SOperatorInfo* pOperator, SOptrBasicInfo* pInfo, SA int64_t tid = 0; int64_t groupId = 0; SResultRow* pRow = doSetResultOutBufByKey(pSup->pResultBuf, pResultRowInfo, (char*)&tid, sizeof(tid), true, groupId, - pTaskInfo, false, pSup); + pTaskInfo, false, pSup, true); for (int32_t i = 0; i < numOfExprs; ++i) { struct SResultRowEntryInfo* pEntry = getResultEntryInfo(pRow, i, rowEntryInfoOffset); diff --git a/source/libs/executor/src/timewindowoperator.c b/source/libs/executor/src/timewindowoperator.c index 6411d862ae..f4d07e8550 100644 --- a/source/libs/executor/src/timewindowoperator.c +++ b/source/libs/executor/src/timewindowoperator.c @@ -78,7 +78,7 @@ static int32_t setTimeWindowOutputBuf(SResultRowInfo* pResultRowInfo, STimeWindo int32_t numOfOutput, int32_t* rowEntryInfoOffset, SAggSupporter* pAggSup, SExecTaskInfo* pTaskInfo) { SResultRow* pResultRow = doSetResultOutBufByKey(pAggSup->pResultBuf, pResultRowInfo, (char*)&win->skey, TSDB_KEYSIZE, - masterscan, tableGroupId, pTaskInfo, true, pAggSup); + masterscan, tableGroupId, pTaskInfo, true, pAggSup, true); if (pResultRow == NULL) { *pResult = NULL; From c9d4b843a4b2050a57214b7513683cdb1bf23387 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Sun, 12 Mar 2023 11:50:20 +0800 Subject: [PATCH 136/154] fix: taos-tools gcc 12 compile for main (#20425) --- cmake/taostools_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index 736ab0b095..1d06995380 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG d9ec91d + GIT_TAG 41affde SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From c011e7d75fc5bca10c178bb11994b14d562dca00 Mon Sep 17 00:00:00 2001 From: Echo <109679879+LookSin@users.noreply.github.com> Date: Sun, 12 Mar 2023 12:18:31 +0800 Subject: [PATCH 137/154] Add the Chinese version of CODE_OF_CONDUCT.md (#18572) --- CODE_OF_CONDUCT-CN.md | 47 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 CODE_OF_CONDUCT-CN.md diff --git a/CODE_OF_CONDUCT-CN.md b/CODE_OF_CONDUCT-CN.md new file mode 100644 index 0000000000..cd14ea9c1c --- /dev/null +++ b/CODE_OF_CONDUCT-CN.md @@ -0,0 +1,47 @@ +# 贡献者契约行为准则 + +[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](code_of_conduct.md) + +## 我们的承诺 + +为了营造一个开放和热情的环境,作为贡献者和维护者,我们承诺让每个人参与我们的项目和社区成为一种无骚扰的体验,无论年龄、体型、残疾、种族、性别特征、性别认同和表达、经验水平、教育、社会经济地位、国籍、个人外表、种族、宗教或性认同和取向如何。 + +## 我们的标准 + +有助于创造积极环境的行为示例包括: + +- 使用热情和包容的语言 +- 尊重不同的观点和经历 +- 优雅地接受建设性的批评 +- 专注于对社区最有利的事情 +- 对其他社区成员表示同情 + +参与者不可接受的行为示例包括: + +- 使用性感的语言或图像以及不受欢迎的性关注或进步 +- 拖钓、侮辱/贬损评论以及人身或政治攻击 +- 公共或私人骚扰 +- 未经明确许可发布他人的私人信息,例如物理地址或电子地址 +- 在专业环境中可能被合理认为不适当的其他行为 + +## 我们的责任 + +项目维护人员负责阐明可接受行为的标准,并期望针对任何不可接受行为的情况采取适当和公平的纠正措施。 + +项目维护者有权利和责任删除、编辑或拒绝评论、提交、代码、wiki 编辑、问题和其他不符合本行为准则的贡献,或暂时或永久禁止任何贡献者从事他们认为不适当、威胁、冒犯或有害的其他行为。 + +## 范围 + +本行为准则适用于所有项目空间,也适用于个人在公共场所代表项目或其社区时。 代表项目或社区的示例包括使用官方项目电子邮件地址、通过官方社交媒体帐户发布信息或在在线或离线活动中担任指定代表。 项目的表示可以由项目维护者进一步定义和澄清。 + +## 执法 + +可以通过 support@taosdata.com 联系项目团队来报告辱骂、骚扰或其他不可接受的行为。 所有投诉都将被审查和调查,并将产生被认为必要且适合具体情况的回应。 项目团队有义务对事件的报告者保密。 具体执行政策的更多细节可能会单独发布。 + +不善意遵守或执行行为准则的项目维护者可能会面临由项目领导的其他成员确定的临时或永久影响。 + +## 来源 + +本行为准则改编自贡献者公约 1.4 版,可在 https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 获取 + +有关此行为准则的常见问题的答案,请参阅 https://www.contributor-covenant.org/faq \ No newline at end of file From 91df1b32981abc66bef54177364530b510a352c7 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Sun, 12 Mar 2023 15:04:53 +0800 Subject: [PATCH 138/154] fix: group merge issue --- source/libs/executor/src/groupoperator.c | 2 ++ tests/system-test/2-query/sample.py | 11 +---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/source/libs/executor/src/groupoperator.c b/source/libs/executor/src/groupoperator.c index b21140bb9d..a05761382e 100644 --- a/source/libs/executor/src/groupoperator.c +++ b/source/libs/executor/src/groupoperator.c @@ -474,6 +474,8 @@ SOperatorInfo* createGroupOperatorInfo(SOperatorInfo* downstream, SAggPhysiNode* initResultRowInfo(&pInfo->binfo.resultRowInfo); setOperatorInfo(pOperator, "GroupbyAggOperator", 0, true, OP_NOT_OPENED, pInfo, pTaskInfo); + pInfo->binfo.mergeResultBlock = pAggNode->mergeDataBlock; + pOperator->fpSet = createOperatorFpSet(optrDummyOpenFn, hashGroupbyAggregate, NULL, destroyGroupOperatorInfo, optrDefaultBufFn, NULL); code = appendDownstream(pOperator, &downstream, 1); diff --git a/tests/system-test/2-query/sample.py b/tests/system-test/2-query/sample.py index a09d6a2b85..a43c2e635e 100644 --- a/tests/system-test/2-query/sample.py +++ b/tests/system-test/2-query/sample.py @@ -171,6 +171,7 @@ class TDTestCase: if any(parm in condition.lower().strip() for parm in condition_exception): print(f"case in {line}: ", end='') + print(f"condition : {condition}: ", end='') return tdSql.error(self.sample_query_form( sel=sel, func=func, col=col, m_comm=m_comm, k=k, r_comm=r_comm, alias=alias, fr=fr, table_expr=table_expr, condition=condition @@ -391,16 +392,6 @@ class TDTestCase: self.checksample(**case25) case26 = {"k": 1000} self.checksample(**case26) - case27 = { - "table_expr": f"{DBNAME}.stb1", - "condition": "group by tbname slimit 1 " - } - self.checksample(**case27) # with slimit - case28 = { - "table_expr": f"{DBNAME}.stb1", - "condition": "group by tbname slimit 1 soffset 1" - } - self.checksample(**case28) # with soffset pass From 45e38d258cd95ae04e7c33e64a1e9fdb55963fbb Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Sun, 12 Mar 2023 20:40:17 +0800 Subject: [PATCH 139/154] fix: last redundant read stt file --- source/dnode/vnode/src/tsdb/tsdbCache.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index 58401cdf44..d5aa6f2381 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -644,12 +644,9 @@ static int32_t getNextRowFromFSLast(void *iter, TSDBROW **ppRow, bool *pIgnoreEa } case SFSLASTNEXTROW_BLOCKROW: { bool hasVal = false; - do { - state->row = tMergeTreeGetRow(&state->mergeTree); - *ppRow = &state->row; - hasVal = tMergeTreeNext(&state->mergeTree); - } while (TSDBROW_TS(&state->row) <= state->lastTs && hasVal); - + state->row = tMergeTreeGetRow(&state->mergeTree); + *ppRow = &state->row; + hasVal = tMergeTreeNext(&state->mergeTree); if (TSDBROW_TS(&state->row) <= state->lastTs) { *pIgnoreEarlierTs = true; state->state = SFSLASTNEXTROW_FILESET; From 25778754e25bea908d77159bbd793dcef071184a Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Sun, 12 Mar 2023 22:36:26 +0800 Subject: [PATCH 140/154] fix: last redundant read stt file --- source/dnode/vnode/src/tsdb/tsdbCache.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index d5aa6f2381..bfac2c2549 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -649,8 +649,8 @@ static int32_t getNextRowFromFSLast(void *iter, TSDBROW **ppRow, bool *pIgnoreEa hasVal = tMergeTreeNext(&state->mergeTree); if (TSDBROW_TS(&state->row) <= state->lastTs) { *pIgnoreEarlierTs = true; - state->state = SFSLASTNEXTROW_FILESET; - goto _next_fileset; + *ppRow = NULL; + return code; } *pIgnoreEarlierTs = false; @@ -832,7 +832,13 @@ static int32_t getNextRowFromFS(void *iter, TSDBROW **ppRow, bool *pIgnoreEarlie tMapDataGetItemByIdx(&state->blockMap, state->iBlock, &block, tGetDataBlk); if (block.maxKey.ts <= state->lastTs) { *pIgnoreEarlierTs = true; - goto _next_fileset; + if (state->pBlockData) { + tBlockDataDestroy(state->pBlockData); + state->pBlockData = NULL; + } + + *ppRow = NULL; + return code; } *pIgnoreEarlierTs = false; tBlockDataReset(state->pBlockData); From 292bb81f11c269aed1fda63fd5e8c0a723fc2bf0 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Mon, 13 Mar 2023 12:30:55 +0800 Subject: [PATCH 141/154] ci:adjust the order of testcases --- tests/parallel_test/cases.task | 233 +++++++++++++++++---------------- 1 file changed, 120 insertions(+), 113 deletions(-) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 0945c4a7f7..fb746fd673 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -6,13 +6,38 @@ ,,y,unit-test,bash test.sh #tsim test +,,y,script,./test.sh -f tsim/tmq/basic2Of2ConsOverlap.sim +,,y,script,./test.sh -f tsim/parser/where.sim +,,y,script,./test.sh -f tsim/parser/join_manyblocks.sim +,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_leader.sim +,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_follower.sim +,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v2.sim +,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v3.sim +,,y,script,./test.sh -f tsim/parser/limit1.sim +,,y,script,./test.sh -f tsim/parser/union.sim +,,y,script,./test.sh -f tsim/parser/commit.sim +,,y,script,./test.sh -f tsim/parser/nestquery.sim +,,n,script,./test.sh -f tsim/valgrind/checkError7.sim +,,y,script,./test.sh -f tsim/parser/groupby.sim +,,y,script,./test.sh -f tsim/parser/sliding.sim +,,y,script,./test.sh -f tsim/dnode/balance2.sim +,,y,script,./test.sh -f tsim/vnode/replica3_repeat.sim +,,y,script,./test.sh -f tsim/parser/col_arithmetic_operation.sim +,,y,script,./test.sh -f tsim/trans/create_db.sim +,,y,script,./test.sh -f tsim/dnode/balance3.sim +,,y,script,./test.sh -f tsim/vnode/replica3_many.sim +,,y,script,./test.sh -f tsim/stable/metrics_idx.sim +,,y,script,./test.sh -f tsim/db/alter_replica_13.sim +,,y,script,./test.sh -f tsim/sync/3Replica1VgElect.sim +,,y,script,./test.sh -f tsim/sync/3Replica5VgElect.sim +,,n,script,./test.sh -f tsim/valgrind/checkError6.sim + ,,y,script,./test.sh -f tsim/user/basic.sim ,,y,script,./test.sh -f tsim/user/password.sim ,,y,script,./test.sh -f tsim/user/privilege_db.sim ,,y,script,./test.sh -f tsim/user/privilege_sysinfo.sim ,,y,script,./test.sh -f tsim/user/privilege_topic.sim ,,y,script,./test.sh -f tsim/db/alter_option.sim -,,y,script,./test.sh -f tsim/db/alter_replica_13.sim ,,y,script,./test.sh -f tsim/db/alter_replica_31.sim ,,y,script,./test.sh -f tsim/db/basic1.sim ,,y,script,./test.sh -f tsim/db/basic2.sim @@ -39,8 +64,6 @@ ,,y,script,./test.sh -f tsim/dnode/balance_replica1.sim ,,y,script,./test.sh -f tsim/dnode/balance_replica3.sim ,,y,script,./test.sh -f tsim/dnode/balance1.sim -,,y,script,./test.sh -f tsim/dnode/balance2.sim -,,y,script,./test.sh -f tsim/dnode/balance3.sim ,,y,script,./test.sh -f tsim/dnode/balancex.sim ,,y,script,./test.sh -f tsim/dnode/create_dnode.sim ,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_mnode.sim @@ -52,10 +75,6 @@ ,,y,script,./test.sh -f tsim/dnode/drop_dnode_force.sim ,,y,script,./test.sh -f tsim/dnode/offline_reason.sim ,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica1.sim -,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_leader.sim -,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_follower.sim -,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v2.sim -,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v3.sim ,,y,script,./test.sh -f tsim/dnode/vnode_clean.sim ,,y,script,./test.sh -f tsim/dnode/use_dropped_dnode.sim ,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica1.sim @@ -92,7 +111,6 @@ ,,y,script,./test.sh -f tsim/parser/auto_create_tb.sim ,,y,script,./test.sh -f tsim/parser/between_and.sim ,,y,script,./test.sh -f tsim/parser/binary_escapeCharacter.sim -,,y,script,./test.sh -f tsim/parser/col_arithmetic_operation.sim ,,y,script,./test.sh -f tsim/parser/columnValue_bigint.sim ,,y,script,./test.sh -f tsim/parser/columnValue_bool.sim ,,y,script,./test.sh -f tsim/parser/columnValue_double.sim @@ -101,7 +119,6 @@ ,,y,script,./test.sh -f tsim/parser/columnValue_smallint.sim ,,y,script,./test.sh -f tsim/parser/columnValue_tinyint.sim ,,y,script,./test.sh -f tsim/parser/columnValue_unsign.sim -,,y,script,./test.sh -f tsim/parser/commit.sim ,,y,script,./test.sh -f tsim/parser/condition.sim ,,y,script,./test.sh -f tsim/parser/constCol.sim ,,y,script,./test.sh -f tsim/parser/create_db.sim @@ -118,7 +135,6 @@ ,,y,script,./test.sh -f tsim/parser/fourArithmetic-basic.sim ,,y,script,./test.sh -f tsim/parser/function.sim ,,y,script,./test.sh -f tsim/parser/groupby-basic.sim -,,y,script,./test.sh -f tsim/parser/groupby.sim ,,y,script,./test.sh -f tsim/parser/having_child.sim ,,y,script,./test.sh -f tsim/parser/having.sim ,,y,script,./test.sh -f tsim/parser/import_commit1.sim @@ -128,7 +144,6 @@ ,,y,script,./test.sh -f tsim/parser/import.sim ,,y,script,./test.sh -f tsim/parser/insert_multiTbl.sim ,,y,script,./test.sh -f tsim/parser/insert_tb.sim -,,y,script,./test.sh -f tsim/parser/join_manyblocks.sim ,,y,script,./test.sh -f tsim/parser/join_multitables.sim ,,y,script,./test.sh -f tsim/parser/join_multivnode.sim ,,y,script,./test.sh -f tsim/parser/join.sim @@ -138,10 +153,8 @@ ,,y,script,./test.sh -f tsim/parser/lastrow2.sim ,,y,script,./test.sh -f tsim/parser/like.sim ,,y,script,./test.sh -f tsim/parser/limit.sim -,,y,script,./test.sh -f tsim/parser/limit1.sim ,,y,script,./test.sh -f tsim/parser/mixed_blocks.sim ,,y,script,./test.sh -f tsim/parser/nchar.sim -,,y,script,./test.sh -f tsim/parser/nestquery.sim ,,y,script,./test.sh -f tsim/parser/null_char.sim ,,y,script,./test.sh -f tsim/parser/precision_ns.sim ,,y,script,./test.sh -f tsim/parser/projection_limit_offset.sim @@ -154,7 +167,6 @@ ,,y,script,./test.sh -f tsim/parser/selectResNum.sim ,,y,script,./test.sh -f tsim/parser/set_tag_vals.sim ,,y,script,./test.sh -f tsim/parser/single_row_in_tb.sim -,,y,script,./test.sh -f tsim/parser/sliding.sim ,,y,script,./test.sh -f tsim/parser/slimit_alter_tags.sim ,,y,script,./test.sh -f tsim/parser/slimit.sim ,,y,script,./test.sh -f tsim/parser/slimit1.sim @@ -165,9 +177,7 @@ ,,y,script,./test.sh -f tsim/parser/timestamp.sim ,,y,script,./test.sh -f tsim/parser/top_groupby.sim ,,y,script,./test.sh -f tsim/parser/topbot.sim -,,y,script,./test.sh -f tsim/parser/union.sim ,,y,script,./test.sh -f tsim/parser/union_sysinfo.sim -,,y,script,./test.sh -f tsim/parser/where.sim ,,y,script,./test.sh -f tsim/query/tagLikeFilter.sim ,,y,script,./test.sh -f tsim/query/charScalarFunction.sim ,,y,script,./test.sh -f tsim/query/explain.sim @@ -256,7 +266,6 @@ ,,y,script,./test.sh -f tsim/stream/udTableAndTag0.sim ,,y,script,./test.sh -f tsim/stream/udTableAndTag1.sim ,,y,script,./test.sh -f tsim/trans/lossdata1.sim -,,y,script,./test.sh -f tsim/trans/create_db.sim ,,y,script,./test.sh -f tsim/tmq/basic1.sim ,,y,script,./test.sh -f tsim/tmq/basic2.sim ,,y,script,./test.sh -f tsim/tmq/basic3.sim @@ -265,7 +274,6 @@ ,,y,script,./test.sh -f tsim/tmq/basic2Of2Cons.sim ,,y,script,./test.sh -f tsim/tmq/basic3Of2Cons.sim ,,y,script,./test.sh -f tsim/tmq/basic4Of2Cons.sim -,,y,script,./test.sh -f tsim/tmq/basic2Of2ConsOverlap.sim ,,y,script,./test.sh -f tsim/tmq/topic.sim ,,y,script,./test.sh -f tsim/tmq/snapshot.sim ,,y,script,./test.sh -f tsim/tmq/snapshot1.sim @@ -289,7 +297,6 @@ ,,y,script,./test.sh -f tsim/stable/tag_rename.sim ,,y,script,./test.sh -f tsim/stable/values.sim ,,y,script,./test.sh -f tsim/stable/vnode3.sim -,,y,script,./test.sh -f tsim/stable/metrics_idx.sim ,,n,script,./test.sh -f tsim/sma/drop_sma.sim ,,y,script,./test.sh -f tsim/sma/sma_leak.sim ,,y,script,./test.sh -f tsim/sma/tsmaCreateInsertQuery.sim @@ -300,14 +307,10 @@ ,,n,script,./test.sh -f tsim/valgrind/checkError3.sim ,,n,script,./test.sh -f tsim/valgrind/checkError4.sim ,,n,script,./test.sh -f tsim/valgrind/checkError5.sim -,,n,script,./test.sh -f tsim/valgrind/checkError6.sim -,,n,script,./test.sh -f tsim/valgrind/checkError7.sim ,,n,script,./test.sh -f tsim/valgrind/checkError8.sim ,,n,script,./test.sh -f tsim/valgrind/checkUdf.sim ,,y,script,./test.sh -f tsim/vnode/replica3_basic.sim -,,y,script,./test.sh -f tsim/vnode/replica3_repeat.sim ,,y,script,./test.sh -f tsim/vnode/replica3_vgroup.sim -,,y,script,./test.sh -f tsim/vnode/replica3_many.sim ,,y,script,./test.sh -f tsim/vnode/replica3_import.sim ,,y,script,./test.sh -f tsim/vnode/stable_balance_replica1.sim ,,y,script,./test.sh -f tsim/vnode/stable_dnode2_stop.sim @@ -315,8 +318,6 @@ ,,y,script,./test.sh -f tsim/vnode/stable_dnode3.sim ,,y,script,./test.sh -f tsim/vnode/stable_replica3_dnode6.sim ,,y,script,./test.sh -f tsim/vnode/stable_replica3_vnode3.sim -,,y,script,./test.sh -f tsim/sync/3Replica1VgElect.sim -,,y,script,./test.sh -f tsim/sync/3Replica5VgElect.sim ,,y,script,./test.sh -f tsim/sync/oneReplica1VgElect.sim ,,y,script,./test.sh -f tsim/sync/oneReplica5VgElect.sim ,,y,script,./test.sh -f tsim/catalog/alterInCurrent.sim @@ -413,6 +414,98 @@ ,,y,script,./test.sh -f tmp/monitor.sim #system test +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqShow.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropStb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb0.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb2.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb3.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb0.py -N 3 -n 3 + + +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_stable.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/database_pre_suf.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -Q 3 + +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/create_wrong_topic.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dropDbR3ConflictTransaction.py -N 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/basic5.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb2.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb3.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb4.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb4.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/db.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqError.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/schema.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbFilter.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqCheckData.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqCheckData1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsumerGroup.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqAlterSchema.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-1ctb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-1ctb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-1ctb-funcNFilter.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb-funcNFilter.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-1ctb-funcNFilter.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqAutoCreateTbl.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDnodeRestart.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDnodeRestart1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdate-1ctb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdateWithConsume.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdate-multiCtb-snapshot0.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdate-multiCtb-snapshot1.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDelete-1ctb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDelete-multiCtb.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropStbCtb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropNtb-snapshot0.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropNtb-snapshot1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot0.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbTagFilter-1ctb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dataFromTsdbNWal.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dataFromTsdbNWal-multiCtb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_taosx.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbTagFilter-multiCtb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqSubscribeStb-r3.py -N 5 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq3mnodeSwitch.py -N 6 -M 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq3mnodeSwitch.py -N 6 -M 3 -n 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-19201.py +,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py + ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/balance_vgroups_r1.py -N 6 ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShell.py ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShellError.py @@ -452,7 +545,6 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/table_param_ttl.py -R ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/update_data_muti_rows.py ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/db_tb_name_check.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/database_pre_suf.py ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/InsertFuturets.py ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/show.py ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/information_schema.py @@ -636,7 +728,6 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -R ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/update_data.py ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/tb_100w_data_order.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_stable.py ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_childtable.py ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_normaltable.py ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/keep_expired.py @@ -646,11 +737,8 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union1.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat2.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/json_tag.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py + ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/elapsed.py @@ -698,68 +786,6 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py -N 4 -M 1 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py -N 4 -M 1 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py -N 4 -M 1 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/create_wrong_topic.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dropDbR3ConflictTransaction.py -N 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/basic5.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb0.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb2.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb3.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb4.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb0.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb2.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb3.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb4.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/db.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqError.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/schema.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbFilter.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqCheckData.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqCheckData1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsumerGroup.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqShow.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqAlterSchema.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-1ctb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-1ctb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-1ctb-funcNFilter.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb-funcNFilter.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-1ctb-funcNFilter.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqAutoCreateTbl.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDnodeRestart.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDnodeRestart1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdate-1ctb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdateWithConsume.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdate-multiCtb-snapshot0.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdate-multiCtb-snapshot1.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDelete-1ctb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDelete-multiCtb.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropStb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropStbCtb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropNtb-snapshot0.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropNtb-snapshot1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot0.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbTagFilter-1ctb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dataFromTsdbNWal.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dataFromTsdbNWal-multiCtb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_taosx.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbTagFilter-multiCtb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-19201.py -,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqSubscribeStb-r3.py -N 5 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq3mnodeSwitch.py -N 6 -M 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq3mnodeSwitch.py -N 6 -M 3 -n 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -Q 2 @@ -819,11 +845,8 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 2 + ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -Q 2 @@ -874,7 +897,6 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union1.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat2.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -Q 3 @@ -917,11 +939,7 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -Q 3 @@ -1015,11 +1033,7 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -Q 4 @@ -1059,15 +1073,8 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -R ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -R From 06079c90a329b1e267d4ded17f02e1956540b993 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Mon, 13 Mar 2023 14:01:18 +0800 Subject: [PATCH 142/154] fix:add log for taosx --- source/client/src/clientRawBlockWrite.c | 34 ++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/source/client/src/clientRawBlockWrite.c b/source/client/src/clientRawBlockWrite.c index a12f94cf1d..e59a833f2b 100644 --- a/source/client/src/clientRawBlockWrite.c +++ b/source/client/src/clientRawBlockWrite.c @@ -655,6 +655,7 @@ static int32_t taosCreateStb(TAOS* taos, void* meta, int32_t metaLen) { int32_t code = TSDB_CODE_SUCCESS; SRequestObj* pRequest = NULL; + uDebug("taosCreateStb called"); code = buildRequest(*(int64_t*)taos, "", 0, NULL, false, &pRequest, 0); if (code != TSDB_CODE_SUCCESS) { goto end; @@ -698,6 +699,7 @@ static int32_t taosCreateStb(TAOS* taos, void* meta, int32_t metaLen) { pReq.source = TD_REQ_FROM_TAOX; pReq.igExists = true; + uDebug("taosCreateStb name:%s suid:%"PRId64" processSuid:%"PRId64, req.name, req.suid, pReq.suid); STscObj* pTscObj = pRequest->pTscObj; SName tableName; tNameExtractFullName(toName(pTscObj->acctId, pRequest->pDb, req.name, &tableName), pReq.name); @@ -744,6 +746,7 @@ static int32_t taosDropStb(TAOS* taos, void* meta, int32_t metaLen) { int32_t code = TSDB_CODE_SUCCESS; SRequestObj* pRequest = NULL; + uDebug("taosDropStb called"); code = buildRequest(*(int64_t*)taos, "", 0, NULL, false, &pRequest, 0); if (code != TSDB_CODE_SUCCESS) { goto end; @@ -768,6 +771,7 @@ static int32_t taosDropStb(TAOS* taos, void* meta, int32_t metaLen) { pReq.source = TD_REQ_FROM_TAOX; pReq.suid = processSuid(req.suid, pRequest->pDb); + uDebug("taosDropStb name:%s suid:%"PRId64" processSuid:%"PRId64, req.name, req.suid, pReq.suid); STscObj* pTscObj = pRequest->pTscObj; SName tableName = {0}; tNameExtractFullName(toName(pTscObj->acctId, pRequest->pDb, req.name, &tableName), pReq.name); @@ -825,6 +829,7 @@ static int32_t taosCreateTable(TAOS* taos, void* meta, int32_t metaLen) { SQuery* pQuery = NULL; SHashObj* pVgroupHashmap = NULL; + uDebug("taosCreateTable called"); code = buildRequest(*(int64_t*)taos, "", 0, NULL, false, &pRequest, 0); if (code != TSDB_CODE_SUCCESS) { goto end; @@ -884,7 +889,10 @@ static int32_t taosCreateTable(TAOS* taos, void* meta, int32_t metaLen) { if (pCreateReq->type == TSDB_CHILD_TABLE) { STableMeta* pTableMeta = NULL; SName sName = {0}; + tb_uid_t oldSuid = pCreateReq->ctb.suid; pCreateReq->ctb.suid = processSuid(pCreateReq->ctb.suid, pRequest->pDb); + uDebug("taosCreateTable name:%s sname:%s suid:%"PRId64" processSuid:%"PRId64, pCreateReq->name, pCreateReq->ctb.stbName, pCreateReq->ctb.suid, oldSuid); + toName(pTscObj->acctId, pRequest->pDb, pCreateReq->ctb.stbName, &sName); code = catalogGetTableMeta(pCatalog, &conn, &sName, &pTableMeta); if (code != TSDB_CODE_SUCCESS) { @@ -979,6 +987,7 @@ static int32_t taosDropTable(TAOS* taos, void* meta, int32_t metaLen) { SQuery* pQuery = NULL; SHashObj* pVgroupHashmap = NULL; + uDebug("taosDropTable called"); code = buildRequest(*(int64_t*)taos, "", 0, NULL, false, &pRequest, 0); if (code != TSDB_CODE_SUCCESS) { goto end; @@ -1023,6 +1032,7 @@ static int32_t taosDropTable(TAOS* taos, void* meta, int32_t metaLen) { pDropReq = req.pReqs + iReq; pDropReq->igNotExists = true; pDropReq->suid = processSuid(pDropReq->suid, pRequest->pDb); + uDebug("taosDropTable name:%s suid:%"PRId64" processSuid:%"PRId64, pDropReq->name, pDropReq->suid, pDropReq->suid); SVgroupInfo pInfo = {0}; SName pName = {0}; @@ -1114,6 +1124,7 @@ static int32_t taosDeleteData(TAOS* taos, void* meta, int32_t metaLen) { SDecoder coder = {0}; int32_t code = TSDB_CODE_SUCCESS; + uDebug("taosDeleteData called"); // decode and process req void* data = POINTER_SHIFT(meta, sizeof(SMsgHead)); int32_t len = metaLen - sizeof(SMsgHead); @@ -1151,6 +1162,7 @@ static int32_t taosAlterTable(TAOS* taos, void* meta, int32_t metaLen) { SArray* pArray = NULL; SVgDataBlocks* pVgData = NULL; + uDebug("taosAlterTable called"); code = buildRequest(*(int64_t*)taos, "", 0, NULL, false, &pRequest, 0); if (code != TSDB_CODE_SUCCESS) { @@ -1196,6 +1208,7 @@ static int32_t taosAlterTable(TAOS* taos, void* meta, int32_t metaLen) { goto end; } + uDebug("taosAlterTable name:%s", req.tbName); pArray = taosArrayInit(1, sizeof(void*)); if (NULL == pArray) { code = TSDB_CODE_OUT_OF_MEMORY; @@ -1261,6 +1274,7 @@ int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const ch STableMeta* pTableMeta = NULL; SQuery* pQuery = NULL; SHashObj* pVgHash = NULL; + uDebug("taos_write_raw_block_with_fields called"); SRequestObj* pRequest = (SRequestObj*)createRequest(*(int64_t*)taos, TSDB_SQL_INSERT, 0); if (!pRequest) { @@ -1280,6 +1294,7 @@ int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const ch tstrncpy(pName.dbname, pRequest->pDb, sizeof(pName.dbname)); tstrncpy(pName.tname, tbname, sizeof(pName.tname)); + uDebug("taos_write_raw_block_with_fields name:%s", tbname); struct SCatalog* pCatalog = NULL; code = catalogGetHandle(pRequest->pTscObj->pAppInfo->clusterId, &pCatalog); if (code != TSDB_CODE_SUCCESS) { @@ -1342,6 +1357,7 @@ int taos_write_raw_block(TAOS* taos, int rows, char* pData, const char* tbname) SQuery* pQuery = NULL; SHashObj* pVgHash = NULL; + uDebug("taos_write_raw_block called"); SRequestObj* pRequest = (SRequestObj*)createRequest(*(int64_t*)taos, TSDB_SQL_INSERT, 0); if (!pRequest) { uError("WriteRaw:createRequest error request is null"); @@ -1360,6 +1376,7 @@ int taos_write_raw_block(TAOS* taos, int rows, char* pData, const char* tbname) tstrncpy(pName.dbname, pRequest->pDb, sizeof(pName.dbname)); tstrncpy(pName.tname, tbname, sizeof(pName.tname)); + uDebug("taos_write_raw_block name:%s", tbname); struct SCatalog* pCatalog = NULL; code = catalogGetHandle(pRequest->pTscObj->pAppInfo->clusterId, &pCatalog); if (code != TSDB_CODE_SUCCESS) { @@ -1423,6 +1440,7 @@ static int32_t tmqWriteRawDataImpl(TAOS* taos, void* data, int32_t dataLen) { SMqRspObj rspObj = {0}; SDecoder decoder = {0}; STableMeta* pTableMeta = NULL; + uDebug("tmqWriteRawDataImpl called"); terrno = TSDB_CODE_SUCCESS; SRequestObj* pRequest = (SRequestObj*)createRequest(*(int64_t*)taos, TSDB_SQL_INSERT, 0); @@ -1468,7 +1486,7 @@ static int32_t tmqWriteRawDataImpl(TAOS* taos, void* data, int32_t dataLen) { goto end; } pVgHash = taosHashInit(16, taosGetDefaultHashFunction(TSDB_DATA_TYPE_INT), true, HASH_NO_LOCK); - uDebug("raw data block num:%d\n", rspObj.rsp.blockNum); + uDebug("tmqWriteRawDataImpl raw data block num:%d", rspObj.rsp.blockNum); while (++rspObj.resIter < rspObj.rsp.blockNum) { SRetrieveTableRsp* pRetrieve = (SRetrieveTableRsp*)taosArrayGetP(rspObj.rsp.blockData, rspObj.resIter); if (!rspObj.rsp.withSchema) { @@ -1483,7 +1501,7 @@ static int32_t tmqWriteRawDataImpl(TAOS* taos, void* data, int32_t dataLen) { goto end; } - uDebug("raw data tbname:%s\n", tbName); + uDebug("tmqWriteRawDataImpl raw data tbname:%s", tbName); SName pName = {TSDB_TABLE_NAME_T, pRequest->pTscObj->acctId, {0}, {0}}; strcpy(pName.dbname, pRequest->pDb); strcpy(pName.tname, tbName); @@ -1556,6 +1574,7 @@ static int32_t tmqWriteRawMetaDataImpl(TAOS* taos, void* data, int32_t dataLen) SDecoder decoder = {0}; STableMeta* pTableMeta = NULL; SVCreateTbReq* pCreateReqDst = NULL; + uDebug("tmqWriteRawMetaDataImpl called"); terrno = TSDB_CODE_SUCCESS; SRequestObj* pRequest = (SRequestObj*)createRequest(*(int64_t*)taos, TSDB_SQL_INSERT, 0); @@ -1602,7 +1621,7 @@ static int32_t tmqWriteRawMetaDataImpl(TAOS* taos, void* data, int32_t dataLen) } pVgHash = taosHashInit(16, taosGetDefaultHashFunction(TSDB_DATA_TYPE_INT), true, HASH_NO_LOCK); - uDebug("raw data block num:%d\n", rspObj.rsp.blockNum); + uDebug("tmqWriteRawMetaDataImpl raw data block num:%d", rspObj.rsp.blockNum); while (++rspObj.resIter < rspObj.rsp.blockNum) { SRetrieveTableRsp* pRetrieve = (SRetrieveTableRsp*)taosArrayGetP(rspObj.rsp.blockData, rspObj.resIter); if (!rspObj.rsp.withSchema) { @@ -1617,7 +1636,7 @@ static int32_t tmqWriteRawMetaDataImpl(TAOS* taos, void* data, int32_t dataLen) goto end; } - uDebug("raw data tbname:%s\n", tbName); + uDebug("tmqWriteRawMetaDataImpl raw data tbname:%s\n", tbName); SName pName = {TSDB_TABLE_NAME_T, pRequest->pTscObj->acctId, {0}, {0}}; strcpy(pName.dbname, pRequest->pDb); strcpy(pName.tname, tbName); @@ -1760,6 +1779,7 @@ char* tmq_get_json_meta(TAOS_RES* res) { void tmq_free_json_meta(char* jsonMeta) { taosMemoryFreeClear(jsonMeta); } int32_t tmq_get_raw(TAOS_RES* res, tmq_raw_data* raw) { + uDebug("tmq_get_raw called"); if (!raw || !res) { return TSDB_CODE_INVALID_PARA; } @@ -1768,6 +1788,7 @@ int32_t tmq_get_raw(TAOS_RES* res, tmq_raw_data* raw) { raw->raw = pMetaRspObj->metaRsp.metaRsp; raw->raw_len = pMetaRspObj->metaRsp.metaRspLen; raw->raw_type = pMetaRspObj->metaRsp.resMsgType; + uDebug("tmq_get_raw meta"); } else if (TD_RES_TMQ(res)) { SMqRspObj* rspObj = ((SMqRspObj*)res); @@ -1787,6 +1808,7 @@ int32_t tmq_get_raw(TAOS_RES* res, tmq_raw_data* raw) { raw->raw = buf; raw->raw_len = len; raw->raw_type = RES_TYPE__TMQ; + uDebug("tmq_get_raw data"); } else if (TD_RES_TMQ_METADATA(res)) { SMqTaosxRspObj* rspObj = ((SMqTaosxRspObj*)res); @@ -1806,19 +1828,23 @@ int32_t tmq_get_raw(TAOS_RES* res, tmq_raw_data* raw) { raw->raw = buf; raw->raw_len = len; raw->raw_type = RES_TYPE__TMQ_METADATA; + uDebug("tmq_get_raw meta data"); } else { + uError("tmq_get_raw error:%d", *(int8_t*)res); return TSDB_CODE_TMQ_INVALID_MSG; } return TSDB_CODE_SUCCESS; } void tmq_free_raw(tmq_raw_data raw) { + uDebug("tmq_free_raw raw_type:%d", raw.raw_type); if (raw.raw_type == RES_TYPE__TMQ || raw.raw_type == RES_TYPE__TMQ_METADATA) { taosMemoryFree(raw.raw); } } int32_t tmq_write_raw(TAOS* taos, tmq_raw_data raw) { + uDebug("tmq_write_raw"); if (!taos) { return TSDB_CODE_INVALID_PARA; } From 8102beff136db97e29ab780fad0867f55bd1f878 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Mon, 13 Mar 2023 14:10:49 +0800 Subject: [PATCH 143/154] fix:add log for taosx --- source/client/src/clientRawBlockWrite.c | 27 +++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/source/client/src/clientRawBlockWrite.c b/source/client/src/clientRawBlockWrite.c index e59a833f2b..6cf38924bf 100644 --- a/source/client/src/clientRawBlockWrite.c +++ b/source/client/src/clientRawBlockWrite.c @@ -194,6 +194,7 @@ static char* processCreateStb(SMqMetaRsp* metaRsp) { SDecoder coder; char* string = NULL; + uDebug("processCreateStb called"); // decode and process req void* data = POINTER_SHIFT(metaRsp->metaRsp, sizeof(SMsgHead)); int32_t len = metaRsp->metaRspLen - sizeof(SMsgHead); @@ -203,7 +204,7 @@ static char* processCreateStb(SMqMetaRsp* metaRsp) { goto _err; } string = buildCreateTableJson(&req.schemaRow, &req.schemaTag, req.name, req.suid, TSDB_SUPER_TABLE); - + uDebug("processCreateStb %s", string); _err: tDecoderClear(&coder); return string; @@ -213,6 +214,7 @@ static char* processAlterStb(SMqMetaRsp* metaRsp) { SVCreateStbReq req = {0}; SDecoder coder; char* string = NULL; + uDebug("processAlterStb called"); // decode and process req void* data = POINTER_SHIFT(metaRsp->metaRsp, sizeof(SMsgHead)); @@ -223,6 +225,7 @@ static char* processAlterStb(SMqMetaRsp* metaRsp) { goto _err; } string = buildAlterSTableJson(req.alterOriData, req.alterOriDataLen); + uDebug("processAlterStb %s", string); _err: tDecoderClear(&coder); @@ -346,6 +349,7 @@ static char* processCreateTable(SMqMetaRsp* metaRsp) { SVCreateTbReq* pCreateReq; char* string = NULL; // decode + uDebug("processCreateTable called"); void* data = POINTER_SHIFT(metaRsp->metaRsp, sizeof(SMsgHead)); int32_t len = metaRsp->metaRspLen - sizeof(SMsgHead); tDecoderInit(&decoder, data, len); @@ -359,9 +363,9 @@ static char* processCreateTable(SMqMetaRsp* metaRsp) { if (pCreateReq->type == TSDB_CHILD_TABLE) { string = buildCreateCTableJson(req.pReqs, req.nReqs); } else if (pCreateReq->type == TSDB_NORMAL_TABLE) { - string = - buildCreateTableJson(&pCreateReq->ntb.schemaRow, NULL, pCreateReq->name, pCreateReq->uid, TSDB_NORMAL_TABLE); + string = buildCreateTableJson(&pCreateReq->ntb.schemaRow, NULL, pCreateReq->name, pCreateReq->uid, TSDB_NORMAL_TABLE); } + uDebug("processCreateTable :%s", string); } _exit: @@ -377,6 +381,7 @@ _exit: } static char* processAutoCreateTable(STaosxRsp* rsp) { + uDebug("processAutoCreateTable called"); if (rsp->createTableNum <= 0) { uError("WriteRaw:processAutoCreateTable rsp->createTableNum <= 0"); goto _exit; @@ -402,7 +407,7 @@ static char* processAutoCreateTable(STaosxRsp* rsp) { } } string = buildCreateCTableJson(pCreateReq, rsp->createTableNum); - + uDebug("processAutoCreateTable :%s", string); _exit: for (int i = 0; i < rsp->createTableNum; i++) { tDecoderClear(&decoder[i]); @@ -422,6 +427,7 @@ static char* processAlterTable(SMqMetaRsp* metaRsp) { char* string = NULL; cJSON* json = NULL; + uDebug("processAlterTable called"); // decode void* data = POINTER_SHIFT(metaRsp->metaRsp, sizeof(SMsgHead)); int32_t len = metaRsp->metaRspLen - sizeof(SMsgHead); @@ -527,6 +533,7 @@ static char* processAlterTable(SMqMetaRsp* metaRsp) { break; } string = cJSON_PrintUnformatted(json); + uDebug("processAlterTable :%s", string); _exit: cJSON_Delete(json); @@ -539,6 +546,7 @@ static char* processDropSTable(SMqMetaRsp* metaRsp) { SVDropStbReq req = {0}; char* string = NULL; cJSON* json = NULL; + uDebug("processDropSTable called"); // decode void* data = POINTER_SHIFT(metaRsp->metaRsp, sizeof(SMsgHead)); @@ -560,7 +568,7 @@ static char* processDropSTable(SMqMetaRsp* metaRsp) { cJSON_AddItemToObject(json, "tableName", tableName); string = cJSON_PrintUnformatted(json); - + uDebug("processDropSTable :%s", string); _exit: cJSON_Delete(json); tDecoderClear(&decoder); @@ -573,6 +581,7 @@ static char* processDeleteTable(SMqMetaRsp* metaRsp) { cJSON* json = NULL; char* string = NULL; + uDebug("processDeleteTable called"); // decode and process req void* data = POINTER_SHIFT(metaRsp->metaRsp, sizeof(SMsgHead)); int32_t len = metaRsp->metaRspLen - sizeof(SMsgHead); @@ -599,7 +608,7 @@ static char* processDeleteTable(SMqMetaRsp* metaRsp) { cJSON_AddItemToObject(json, "sql", sqlJson); string = cJSON_PrintUnformatted(json); - + uDebug("processDeleteTable :%s", string); _exit: cJSON_Delete(json); tDecoderClear(&coder); @@ -612,6 +621,7 @@ static char* processDropTable(SMqMetaRsp* metaRsp) { char* string = NULL; cJSON* json = NULL; + uDebug("processDropTable called"); // decode void* data = POINTER_SHIFT(metaRsp->metaRsp, sizeof(SMsgHead)); int32_t len = metaRsp->metaRspLen - sizeof(SMsgHead); @@ -641,7 +651,7 @@ static char* processDropTable(SMqMetaRsp* metaRsp) { cJSON_AddItemToObject(json, "tableNameList", tableNameList); string = cJSON_PrintUnformatted(json); - + uDebug("processDropTable :%s", string); _exit: cJSON_Delete(json); tDecoderClear(&decoder); @@ -1745,6 +1755,7 @@ end: } char* tmq_get_json_meta(TAOS_RES* res) { + uDebug("tmq_get_json_meta called"); if (!TD_RES_TMQ_META(res) && !TD_RES_TMQ_METADATA(res)) { return NULL; } @@ -1844,7 +1855,7 @@ void tmq_free_raw(tmq_raw_data raw) { } int32_t tmq_write_raw(TAOS* taos, tmq_raw_data raw) { - uDebug("tmq_write_raw"); + uDebug("tmq_write_raw called"); if (!taos) { return TSDB_CODE_INVALID_PARA; } From 8d02254c4c88dd582b429c022eb338c850875e43 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Mon, 13 Mar 2023 14:22:57 +0800 Subject: [PATCH 144/154] ci:adjust the order of testcases --- Jenkinsfile2 | 2 +- tests/parallel_test/cases.task | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile2 b/Jenkinsfile2 index bb7fa70c57..55bd5466ed 100644 --- a/Jenkinsfile2 +++ b/Jenkinsfile2 @@ -460,7 +460,7 @@ pipeline { cd ${WKC}/tests/parallel_test export DEFAULT_RETRY_TIME=2 date - ''' + timeout_cmd + ''' time ./run.sh -e -m /home/m.json -t cases.task -b ${BRANCH_NAME}_${BUILD_ID} -l ${WKDIR}/log -o 480 ''' + extra_param + ''' + ''' + timeout_cmd + ''' time ./run.sh -e -m /home/m.json -t cases.task -b ${BRANCH_NAME}_${BUILD_ID} -l ${WKDIR}/log -o 600 ''' + extra_param + ''' ''' } } diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 273ed299ea..f1e9a1f084 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -450,6 +450,8 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/database_pre_suf.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/create_wrong_topic.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dropDbR3ConflictTransaction.py -N 3 @@ -847,7 +849,6 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -Q 2 - ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -Q 2 @@ -883,6 +884,11 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -Q 3 @@ -1075,13 +1081,6 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/odbc.py From e8db67fe90a21c80530cf3f912a879fbca5a46eb Mon Sep 17 00:00:00 2001 From: Shuaiqiang Chang Date: Mon, 13 Mar 2023 14:36:22 +0800 Subject: [PATCH 145/154] Update index.md --- docs/zh/05-get-started/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/05-get-started/index.md b/docs/zh/05-get-started/index.md index e144c563b9..ea586ff9ba 100644 --- a/docs/zh/05-get-started/index.md +++ b/docs/zh/05-get-started/index.md @@ -41,7 +41,7 @@ TDengine 知识地图中涵盖了 TDengine 的各种知识点,揭示了各概 TDengine 微信公众号 -加入“物联网大数据技术群”
与大家进行技术交流 +加入 TDengine 微信群
了解学习最新物联网技术 关注 TDengine 视频号
收看技术直播与教学视频 关注 TDengine 公众号
阅读技术文章与行业案例 From 62377619ba5126505c3c0b9937c76ea3389ec4e7 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Mon, 13 Mar 2023 15:05:24 +0800 Subject: [PATCH 146/154] enh: optimizing stt file reading in last query --- include/common/tmsg.h | 1 + include/util/tlrucache.h | 2 ++ source/dnode/vnode/inc/vnode.h | 9 +++---- source/dnode/vnode/src/inc/tsdb.h | 2 +- source/dnode/vnode/src/tsdb/tsdbCache.c | 13 +++++++++-- source/dnode/vnode/src/tsdb/tsdbCacheRead.c | 2 ++ source/dnode/vnode/src/tsdb/tsdbMergeTree.c | 26 +++++++++++++++------ source/dnode/vnode/src/tsdb/tsdbRead.c | 15 ++++++------ source/dnode/vnode/src/vnd/vnodeQuery.c | 1 + source/util/src/tlrucache.c | 20 ++++++++++++++++ 10 files changed, 70 insertions(+), 21 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index d9d3c7e297..644f423cb1 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1136,6 +1136,7 @@ typedef struct { int64_t numOfInsertSuccessReqs; int64_t numOfBatchInsertReqs; int64_t numOfBatchInsertSuccessReqs; + int32_t numOfCacheTables; } SVnodeLoad; typedef struct { diff --git a/include/util/tlrucache.h b/include/util/tlrucache.h index 1900934248..c9cf71c2fd 100644 --- a/include/util/tlrucache.h +++ b/include/util/tlrucache.h @@ -55,6 +55,8 @@ void *taosLRUCacheValue(SLRUCache *cache, LRUHandle *handle); size_t taosLRUCacheGetUsage(SLRUCache *cache); size_t taosLRUCacheGetPinnedUsage(SLRUCache *cache); +int32_t taosLRUCacheGetElems(SLRUCache *cache); + void taosLRUCacheSetCapacity(SLRUCache *cache, size_t capacity); size_t taosLRUCacheGetCapacity(SLRUCache *cache); diff --git a/source/dnode/vnode/inc/vnode.h b/source/dnode/vnode/inc/vnode.h index 1d14829891..906d16ce77 100644 --- a/source/dnode/vnode/inc/vnode.h +++ b/source/dnode/vnode/inc/vnode.h @@ -198,9 +198,10 @@ int32_t tsdbRetrieveCacheRows(void *pReader, SSDataBlock *pResBlock, const int32 void *tsdbCacherowsReaderClose(void *pReader); int32_t tsdbGetTableSchema(SVnode *pVnode, int64_t uid, STSchema **pSchema, int64_t *suid); -void tsdbCacheSetCapacity(SVnode *pVnode, size_t capacity); -size_t tsdbCacheGetCapacity(SVnode *pVnode); -size_t tsdbCacheGetUsage(SVnode *pVnode); +void tsdbCacheSetCapacity(SVnode *pVnode, size_t capacity); +size_t tsdbCacheGetCapacity(SVnode *pVnode); +size_t tsdbCacheGetUsage(SVnode *pVnode); +int32_t tsdbCacheGetElems(SVnode *pVnode); // tq typedef struct SMetaTableInfo { @@ -264,7 +265,7 @@ int32_t tqReaderSetTbUidList(STqReader *pReader, const SArray *tbUidList); int32_t tqReaderAddTbUidList(STqReader *pReader, const SArray *tbUidList); int32_t tqReaderRemoveTbUidList(STqReader *pReader, const SArray *tbUidList); -int32_t tqSeekVer(STqReader *pReader, int64_t ver, const char* id); +int32_t tqSeekVer(STqReader *pReader, int64_t ver, const char *id); int32_t tqNextBlock(STqReader *pReader, SFetchRet *ret); int32_t tqReaderSetSubmitReq2(STqReader *pReader, void *msgStr, int32_t msgLen, int64_t ver); diff --git a/source/dnode/vnode/src/inc/tsdb.h b/source/dnode/vnode/src/inc/tsdb.h index b2e1e8ab34..2dec38240e 100644 --- a/source/dnode/vnode/src/inc/tsdb.h +++ b/source/dnode/vnode/src/inc/tsdb.h @@ -748,7 +748,7 @@ struct SDiskDataBuilder { int32_t tMergeTreeOpen(SMergeTree *pMTree, int8_t backward, SDataFReader *pFReader, uint64_t suid, uint64_t uid, STimeWindow *pTimeWindow, SVersionRange *pVerRange, SSttBlockLoadInfo *pBlockLoadInfo, - bool destroyLoadInfo, const char *idStr); + bool destroyLoadInfo, const char *idStr, bool strictTimeRange); void tMergeTreeAddIter(SMergeTree *pMTree, SLDataIter *pIter); bool tMergeTreeNext(SMergeTree *pMTree); TSDBROW tMergeTreeGetRow(SMergeTree *pMTree); diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index bfac2c2549..e68b3589fc 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -632,8 +632,8 @@ static int32_t getNextRowFromFSLast(void *iter, TSDBROW **ppRow, bool *pIgnoreEa } tMergeTreeOpen(&state->mergeTree, 1, *state->pDataFReader, state->suid, state->uid, - &(STimeWindow){.skey = TSKEY_MIN, .ekey = TSKEY_MAX}, - &(SVersionRange){.minVer = 0, .maxVer = UINT64_MAX}, state->pLoadInfo, false, NULL); + &(STimeWindow){.skey = state->lastTs, .ekey = TSKEY_MAX}, + &(SVersionRange){.minVer = 0, .maxVer = UINT64_MAX}, state->pLoadInfo, false, NULL, true); state->pMergeTree = &state->mergeTree; bool hasVal = tMergeTreeNext(&state->mergeTree); if (!hasVal) { @@ -1727,6 +1727,15 @@ size_t tsdbCacheGetUsage(SVnode *pVnode) { return usage; } +int32_t tsdbCacheGetElems(SVnode *pVnode) { + int32_t elems = 0; + if (pVnode->pTsdb != NULL) { + elems = taosLRUCacheGetElems(pVnode->pTsdb->lruCache); + } + + return elems; +} + static void getBICacheKey(int32_t fid, int64_t commitID, char *key, int *len) { struct { int32_t fid; diff --git a/source/dnode/vnode/src/tsdb/tsdbCacheRead.c b/source/dnode/vnode/src/tsdb/tsdbCacheRead.c index d925950703..1d78622a61 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCacheRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbCacheRead.c @@ -408,6 +408,7 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32 if (hasNotNullRow) { pr->lastTs = minTs; + tsdbInfo("%p have cache read %d tables", pr, i + 1); } } @@ -418,6 +419,7 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32 saveOneRow(pLastCols, pResBlock, pr, slotIds, pRes, pr->idstr); } + tsdbInfo("have cached %d tables", taosLRUCacheGetElems(lruCache)); } else if (HASTYPE(pr->type, CACHESCAN_RETRIEVE_TYPE_ALL)) { for (int32_t i = pr->tableIndex; i < pr->numOfTables; ++i) { STableKeyInfo* pKeyInfo = &pr->pTableList[i]; diff --git a/source/dnode/vnode/src/tsdb/tsdbMergeTree.c b/source/dnode/vnode/src/tsdb/tsdbMergeTree.c index d9d60442ff..af4eb9626e 100644 --- a/source/dnode/vnode/src/tsdb/tsdbMergeTree.c +++ b/source/dnode/vnode/src/tsdb/tsdbMergeTree.c @@ -31,7 +31,8 @@ struct SLDataIter { SSttBlockLoadInfo *pBlockLoadInfo; }; -SSttBlockLoadInfo *tCreateLastBlockLoadInfo(STSchema *pSchema, int16_t *colList, int32_t numOfCols, int32_t numOfSttTrigger) { +SSttBlockLoadInfo *tCreateLastBlockLoadInfo(STSchema *pSchema, int16_t *colList, int32_t numOfCols, + int32_t numOfSttTrigger) { SSttBlockLoadInfo *pLoadInfo = taosMemoryCalloc(numOfSttTrigger, sizeof(SSttBlockLoadInfo)); if (pLoadInfo == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; @@ -162,7 +163,8 @@ static SBlockData *loadLastBlock(SLDataIter *pIter, const char *idStr) { pInfo->blockIndex[pInfo->currentLoadBlockIndex] = pIter->iSttBlk; pIter->iRow = (pIter->backward) ? pInfo->blockData[pInfo->currentLoadBlockIndex].nRow : -1; - tsdbDebug("last block index list:%d, %d, rowIndex:%d %s", pInfo->blockIndex[0], pInfo->blockIndex[1], pIter->iRow, idStr); + tsdbDebug("last block index list:%d, %d, rowIndex:%d %s", pInfo->blockIndex[0], pInfo->blockIndex[1], pIter->iRow, + idStr); return &pInfo->blockData[pInfo->currentLoadBlockIndex]; _exit: @@ -263,7 +265,7 @@ static int32_t binarySearchForStartRowIndex(uint64_t *uidList, int32_t num, uint int32_t tLDataIterOpen(struct SLDataIter **pIter, SDataFReader *pReader, int32_t iStt, int8_t backward, uint64_t suid, uint64_t uid, STimeWindow *pTimeWindow, SVersionRange *pRange, SSttBlockLoadInfo *pBlockLoadInfo, - const char *idStr) { + const char *idStr, bool strictTimeRange) { int32_t code = TSDB_CODE_SUCCESS; *pIter = taosMemoryCalloc(1, sizeof(SLDataIter)); @@ -340,6 +342,16 @@ int32_t tLDataIterOpen(struct SLDataIter **pIter, SDataFReader *pReader, int32_t if ((*pIter)->iSttBlk != -1) { (*pIter)->pSttBlk = taosArrayGet(pBlockLoadInfo->aSttBlk, (*pIter)->iSttBlk); (*pIter)->iRow = ((*pIter)->backward) ? (*pIter)->pSttBlk->nRow : -1; + + if ((!backward) && ((strictTimeRange && (*pIter)->pSttBlk->minKey >= (*pIter)->timeWindow.ekey) || + (!strictTimeRange && (*pIter)->pSttBlk->minKey > (*pIter)->timeWindow.ekey))) { + (*pIter)->pSttBlk = NULL; + } + + if (backward && ((strictTimeRange && (*pIter)->pSttBlk->maxKey <= (*pIter)->timeWindow.skey) || + (!strictTimeRange && (*pIter)->pSttBlk->maxKey < (*pIter)->timeWindow.skey))) { + (*pIter)->pSttBlk = NULL; + } } return code; @@ -421,7 +433,7 @@ static void findNextValidRow(SLDataIter *pIter, const char *idStr) { pBlockData->aUid != NULL) { i = binarySearchForStartRowIndex((uint64_t *)pBlockData->aUid, pBlockData->nRow, pIter->uid, pIter->backward); if (i == -1) { - tsdbDebug("failed to find the data in pBlockData, uid:%"PRIu64" , %s", pIter->uid, idStr); + tsdbDebug("failed to find the data in pBlockData, uid:%" PRIu64 " , %s", pIter->uid, idStr); pIter->iRow = -1; return; } @@ -508,7 +520,7 @@ bool tLDataIterNextRow(SLDataIter *pIter, const char *idStr) { } // set start row index - pIter->iRow = pIter->backward? pBlockData->nRow-1:0; + pIter->iRow = pIter->backward ? pBlockData->nRow - 1 : 0; } } @@ -551,7 +563,7 @@ static FORCE_INLINE int32_t tLDataIterDescCmprFn(const SRBTreeNode *p1, const SR int32_t tMergeTreeOpen(SMergeTree *pMTree, int8_t backward, SDataFReader *pFReader, uint64_t suid, uint64_t uid, STimeWindow *pTimeWindow, SVersionRange *pVerRange, SSttBlockLoadInfo *pBlockLoadInfo, - bool destroyLoadInfo, const char *idStr) { + bool destroyLoadInfo, const char *idStr, bool strictTimeRange) { pMTree->backward = backward; pMTree->pIter = NULL; pMTree->pIterList = taosArrayInit(4, POINTER_BYTES); @@ -573,7 +585,7 @@ int32_t tMergeTreeOpen(SMergeTree *pMTree, int8_t backward, SDataFReader *pFRead for (int32_t i = 0; i < pFReader->pSet->nSttF; ++i) { // open all last file struct SLDataIter *pIter = NULL; code = tLDataIterOpen(&pIter, pFReader, i, pMTree->backward, suid, uid, pTimeWindow, pVerRange, - &pMTree->pLoadInfo[i], pMTree->idStr); + &pMTree->pLoadInfo[i], pMTree->idStr, strictTimeRange); if (code != TSDB_CODE_SUCCESS) { goto _end; } diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c index fd19e552c1..2766745cbe 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead.c @@ -315,11 +315,11 @@ static int32_t ensureBlockScanInfoBuf(SBlockInfoBuf* pBuf, int32_t numOfTables) } if (pBuf->numOfTables > 0) { - STableBlockScanInfo **p = (STableBlockScanInfo**)taosArrayPop(pBuf->pData); + STableBlockScanInfo** p = (STableBlockScanInfo**)taosArrayPop(pBuf->pData); taosMemoryFree(*p); pBuf->numOfTables /= pBuf->numPerBucket; } - + int32_t num = (numOfTables - pBuf->numOfTables) / pBuf->numPerBucket; int32_t remainder = (numOfTables - pBuf->numOfTables) % pBuf->numPerBucket; if (pBuf->pData == NULL) { @@ -919,7 +919,7 @@ static int32_t doLoadFileBlock(STsdbReader* pReader, SArray* pIndexList, SBlockN pBlockNum->numOfBlocks += 1; } - if ((pScanInfo->pBlockList != NULL )&& (taosArrayGetSize(pScanInfo->pBlockList) > 0)) { + if ((pScanInfo->pBlockList != NULL) && (taosArrayGetSize(pScanInfo->pBlockList) > 0)) { numOfQTable += 1; } } @@ -1798,7 +1798,7 @@ static bool nextRowFromLastBlocks(SLastBlockReader* pLastBlockReader, STableBloc while (1) { bool hasVal = tMergeTreeNext(&pLastBlockReader->mergeTree); - if (!hasVal) { // the next value will be the accessed key in stt + if (!hasVal) { // the next value will be the accessed key in stt pScanInfo->lastKeyInStt += step; return false; } @@ -2481,7 +2481,7 @@ static bool initLastBlockReader(SLastBlockReader* pLBlockReader, STableBlockScan pScanInfo->uid, pReader->idStr); int32_t code = tMergeTreeOpen(&pLBlockReader->mergeTree, (pLBlockReader->order == TSDB_ORDER_DESC), pReader->pFileReader, pReader->suid, pScanInfo->uid, &w, &pLBlockReader->verRange, - pLBlockReader->pInfo, false, pReader->idStr); + pLBlockReader->pInfo, false, pReader->idStr, false); if (code != TSDB_CODE_SUCCESS) { return false; } @@ -3512,7 +3512,7 @@ static int32_t checkForNeighborFileBlock(STsdbReader* pReader, STableBlockScanIn CHECK_FILEBLOCK_STATE* state) { SFileBlockDumpInfo* pDumpInfo = &pReader->status.fBlockDumpInfo; SBlockData* pBlockData = &pReader->status.fileBlockData; - bool asc = ASCENDING_TRAVERSE(pReader->order); + bool asc = ASCENDING_TRAVERSE(pReader->order); *state = CHECK_FILEBLOCK_QUIT; int32_t step = ASCENDING_TRAVERSE(pReader->order) ? 1 : -1; @@ -3927,7 +3927,8 @@ int32_t tsdbSetTableList(STsdbReader* pReader, const void* pTableList, int32_t n if (code) { return code; } - pReader->status.uidList.tableUidList = (uint64_t*)taosMemoryRealloc(pReader->status.uidList.tableUidList, sizeof(uint64_t) * num); + pReader->status.uidList.tableUidList = + (uint64_t*)taosMemoryRealloc(pReader->status.uidList.tableUidList, sizeof(uint64_t) * num); } taosHashClear(pReader->status.pTableMap); diff --git a/source/dnode/vnode/src/vnd/vnodeQuery.c b/source/dnode/vnode/src/vnd/vnodeQuery.c index c017266839..d7e9c72a91 100644 --- a/source/dnode/vnode/src/vnd/vnodeQuery.c +++ b/source/dnode/vnode/src/vnd/vnodeQuery.c @@ -382,6 +382,7 @@ int32_t vnodeGetLoad(SVnode *pVnode, SVnodeLoad *pLoad) { pLoad->syncRestore = state.restored; pLoad->syncCanRead = state.canRead; pLoad->cacheUsage = tsdbCacheGetUsage(pVnode); + pLoad->numOfCacheTables = tsdbCacheGetElems(pVnode); pLoad->numOfTables = metaGetTbNum(pVnode->pMeta); pLoad->numOfTimeSeries = metaGetTimeSeriesNum(pVnode->pMeta); pLoad->totalStorage = (int64_t)3 * 1073741824; diff --git a/source/util/src/tlrucache.c b/source/util/src/tlrucache.c index 264883be4e..f4172fbb44 100644 --- a/source/util/src/tlrucache.c +++ b/source/util/src/tlrucache.c @@ -580,6 +580,16 @@ static size_t taosLRUCacheShardGetUsage(SLRUCacheShard *shard) { return usage; } +static int32_t taosLRUCacheShardGetElems(SLRUCacheShard *shard) { + int32_t elems = 0; + + taosThreadMutexLock(&shard->mutex); + elems = shard->table.elems; + taosThreadMutexUnlock(&shard->mutex); + + return elems; +} + static size_t taosLRUCacheShardGetPinnedUsage(SLRUCacheShard *shard) { size_t usage = 0; @@ -755,6 +765,16 @@ size_t taosLRUCacheGetUsage(SLRUCache *cache) { return usage; } +int32_t taosLRUCacheGetElems(SLRUCache *cache) { + int32_t elems = 0; + + for (int i = 0; i < cache->numShards; ++i) { + elems += taosLRUCacheShardGetElems(&cache->shards[i]); + } + + return elems; +} + size_t taosLRUCacheGetPinnedUsage(SLRUCache *cache) { size_t usage = 0; From e4d08376e46e07bea9381880525527532eae4662 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Mon, 13 Mar 2023 15:18:40 +0800 Subject: [PATCH 147/154] ci:adjust the order of testcases --- tests/parallel_test/cases.task | 823 ++++++++++++++++----------------- 1 file changed, 409 insertions(+), 414 deletions(-) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index f1e9a1f084..87144f5b99 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -5,415 +5,6 @@ #unit-test ,,y,unit-test,bash test.sh -#tsim test -,,y,script,./test.sh -f tsim/tmq/basic2Of2ConsOverlap.sim -,,y,script,./test.sh -f tsim/parser/where.sim -,,y,script,./test.sh -f tsim/parser/join_manyblocks.sim -,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_leader.sim -,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_follower.sim -,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v2.sim -,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v3.sim -,,y,script,./test.sh -f tsim/parser/limit1.sim -,,y,script,./test.sh -f tsim/parser/union.sim -,,y,script,./test.sh -f tsim/parser/commit.sim -,,y,script,./test.sh -f tsim/parser/nestquery.sim -,,n,script,./test.sh -f tsim/valgrind/checkError7.sim -,,y,script,./test.sh -f tsim/parser/groupby.sim -,,y,script,./test.sh -f tsim/parser/sliding.sim -,,y,script,./test.sh -f tsim/dnode/balance2.sim -,,y,script,./test.sh -f tsim/vnode/replica3_repeat.sim -,,y,script,./test.sh -f tsim/parser/col_arithmetic_operation.sim -,,y,script,./test.sh -f tsim/trans/create_db.sim -,,y,script,./test.sh -f tsim/dnode/balance3.sim -,,y,script,./test.sh -f tsim/vnode/replica3_many.sim -,,y,script,./test.sh -f tsim/stable/metrics_idx.sim -,,y,script,./test.sh -f tsim/db/alter_replica_13.sim -,,y,script,./test.sh -f tsim/sync/3Replica1VgElect.sim -,,y,script,./test.sh -f tsim/sync/3Replica5VgElect.sim -,,n,script,./test.sh -f tsim/valgrind/checkError6.sim - -,,y,script,./test.sh -f tsim/user/basic.sim -,,y,script,./test.sh -f tsim/user/password.sim -,,y,script,./test.sh -f tsim/user/privilege_db.sim -,,y,script,./test.sh -f tsim/user/privilege_sysinfo.sim -,,y,script,./test.sh -f tsim/user/privilege_topic.sim -,,y,script,./test.sh -f tsim/db/alter_option.sim -,,y,script,./test.sh -f tsim/db/alter_replica_31.sim -,,y,script,./test.sh -f tsim/db/basic1.sim -,,y,script,./test.sh -f tsim/db/basic2.sim -,,y,script,./test.sh -f tsim/db/basic3.sim -,,y,script,./test.sh -f tsim/db/basic4.sim -,,y,script,./test.sh -f tsim/db/basic5.sim -,,y,script,./test.sh -f tsim/db/basic6.sim -,,y,script,./test.sh -f tsim/db/commit.sim -,,y,script,./test.sh -f tsim/db/create_all_options.sim -,,y,script,./test.sh -f tsim/db/delete_reuse1.sim -,,y,script,./test.sh -f tsim/db/delete_reuse2.sim -,,y,script,./test.sh -f tsim/db/delete_reusevnode.sim -,,y,script,./test.sh -f tsim/db/delete_reusevnode2.sim -,,y,script,./test.sh -f tsim/db/delete_writing1.sim -,,y,script,./test.sh -f tsim/db/delete_writing2.sim -,,y,script,./test.sh -f tsim/db/error1.sim -,,y,script,./test.sh -f tsim/db/keep.sim -,,y,script,./test.sh -f tsim/db/len.sim -,,y,script,./test.sh -f tsim/db/repeat.sim -,,y,script,./test.sh -f tsim/db/show_create_db.sim -,,y,script,./test.sh -f tsim/db/show_create_table.sim -,,y,script,./test.sh -f tsim/db/tables.sim -,,y,script,./test.sh -f tsim/db/taosdlog.sim -,,y,script,./test.sh -f tsim/dnode/balance_replica1.sim -,,y,script,./test.sh -f tsim/dnode/balance_replica3.sim -,,y,script,./test.sh -f tsim/dnode/balance1.sim -,,y,script,./test.sh -f tsim/dnode/balancex.sim -,,y,script,./test.sh -f tsim/dnode/create_dnode.sim -,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_mnode.sim -,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_qnode_snode.sim -,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_vnode_replica1.sim -,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_vnode_replica3.sim -,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_multi_vnode_replica1.sim -,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_multi_vnode_replica3.sim -,,y,script,./test.sh -f tsim/dnode/drop_dnode_force.sim -,,y,script,./test.sh -f tsim/dnode/offline_reason.sim -,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica1.sim -,,y,script,./test.sh -f tsim/dnode/vnode_clean.sim -,,y,script,./test.sh -f tsim/dnode/use_dropped_dnode.sim -,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica1.sim -,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica3.sim -,,y,script,./test.sh -f tsim/import/basic.sim -,,y,script,./test.sh -f tsim/import/commit.sim -,,y,script,./test.sh -f tsim/import/large.sim -,,y,script,./test.sh -f tsim/import/replica1.sim -,,y,script,./test.sh -f tsim/insert/backquote.sim -,,y,script,./test.sh -f tsim/insert/basic.sim -,,y,script,./test.sh -f tsim/insert/basic0.sim -,,y,script,./test.sh -f tsim/insert/basic1.sim -,,y,script,./test.sh -f tsim/insert/basic2.sim -,,y,script,./test.sh -f tsim/insert/commit-merge0.sim -,,y,script,./test.sh -f tsim/insert/insert_drop.sim -,,y,script,./test.sh -f tsim/insert/insert_select.sim -,,y,script,./test.sh -f tsim/insert/null.sim -,,y,script,./test.sh -f tsim/insert/query_block1_file.sim -,,y,script,./test.sh -f tsim/insert/query_block1_memory.sim -,,y,script,./test.sh -f tsim/insert/query_block2_file.sim -,,y,script,./test.sh -f tsim/insert/query_block2_memory.sim -,,y,script,./test.sh -f tsim/insert/query_file_memory.sim -,,y,script,./test.sh -f tsim/insert/query_multi_file.sim -,,y,script,./test.sh -f tsim/insert/tcp.sim -,,y,script,./test.sh -f tsim/insert/update0.sim -,,y,script,./test.sh -f tsim/insert/update1_sort_merge.sim -,,y,script,./test.sh -f tsim/insert/update2.sim -,,y,script,./test.sh -f tsim/parser/alter__for_community_version.sim -,,y,script,./test.sh -f tsim/parser/alter_column.sim -,,y,script,./test.sh -f tsim/parser/alter_stable.sim -,,y,script,./test.sh -f tsim/parser/alter.sim -,,y,script,./test.sh -f tsim/parser/alter1.sim -,,y,script,./test.sh -f tsim/parser/auto_create_tb_drop_tb.sim -,,y,script,./test.sh -f tsim/parser/auto_create_tb.sim -,,y,script,./test.sh -f tsim/parser/between_and.sim -,,y,script,./test.sh -f tsim/parser/binary_escapeCharacter.sim -,,y,script,./test.sh -f tsim/parser/columnValue_bigint.sim -,,y,script,./test.sh -f tsim/parser/columnValue_bool.sim -,,y,script,./test.sh -f tsim/parser/columnValue_double.sim -,,y,script,./test.sh -f tsim/parser/columnValue_float.sim -,,y,script,./test.sh -f tsim/parser/columnValue_int.sim -,,y,script,./test.sh -f tsim/parser/columnValue_smallint.sim -,,y,script,./test.sh -f tsim/parser/columnValue_tinyint.sim -,,y,script,./test.sh -f tsim/parser/columnValue_unsign.sim -,,y,script,./test.sh -f tsim/parser/condition.sim -,,y,script,./test.sh -f tsim/parser/constCol.sim -,,y,script,./test.sh -f tsim/parser/create_db.sim -,,y,script,./test.sh -f tsim/parser/create_mt.sim -,,y,script,./test.sh -f tsim/parser/create_tb_with_tag_name.sim -,,y,script,./test.sh -f tsim/parser/create_tb.sim -,,y,script,./test.sh -f tsim/parser/dbtbnameValidate.sim -,,y,script,./test.sh -f tsim/parser/distinct.sim -,,y,script,./test.sh -f tsim/parser/fill_us.sim -,,y,script,./test.sh -f tsim/parser/fill.sim -,,y,script,./test.sh -f tsim/parser/first_last.sim -,,y,script,./test.sh -f tsim/parser/fill_stb.sim -,,y,script,./test.sh -f tsim/parser/interp.sim -,,y,script,./test.sh -f tsim/parser/fourArithmetic-basic.sim -,,y,script,./test.sh -f tsim/parser/function.sim -,,y,script,./test.sh -f tsim/parser/groupby-basic.sim -,,y,script,./test.sh -f tsim/parser/having_child.sim -,,y,script,./test.sh -f tsim/parser/having.sim -,,y,script,./test.sh -f tsim/parser/import_commit1.sim -,,y,script,./test.sh -f tsim/parser/import_commit2.sim -,,y,script,./test.sh -f tsim/parser/import_commit3.sim -,,y,script,./test.sh -f tsim/parser/import_file.sim -,,y,script,./test.sh -f tsim/parser/import.sim -,,y,script,./test.sh -f tsim/parser/insert_multiTbl.sim -,,y,script,./test.sh -f tsim/parser/insert_tb.sim -,,y,script,./test.sh -f tsim/parser/join_multitables.sim -,,y,script,./test.sh -f tsim/parser/join_multivnode.sim -,,y,script,./test.sh -f tsim/parser/join.sim -,,y,script,./test.sh -f tsim/parser/last_cache.sim -,,y,script,./test.sh -f tsim/parser/last_groupby.sim -,,y,script,./test.sh -f tsim/parser/lastrow.sim -,,y,script,./test.sh -f tsim/parser/lastrow2.sim -,,y,script,./test.sh -f tsim/parser/like.sim -,,y,script,./test.sh -f tsim/parser/limit.sim -,,y,script,./test.sh -f tsim/parser/mixed_blocks.sim -,,y,script,./test.sh -f tsim/parser/nchar.sim -,,y,script,./test.sh -f tsim/parser/null_char.sim -,,y,script,./test.sh -f tsim/parser/precision_ns.sim -,,y,script,./test.sh -f tsim/parser/projection_limit_offset.sim -,,y,script,./test.sh -f tsim/parser/regex.sim -,,y,script,./test.sh -f tsim/parser/regressiontest.sim -,,y,script,./test.sh -f tsim/parser/select_across_vnodes.sim -,,y,script,./test.sh -f tsim/parser/select_distinct_tag.sim -,,y,script,./test.sh -f tsim/parser/select_from_cache_disk.sim -,,y,script,./test.sh -f tsim/parser/select_with_tags.sim -,,y,script,./test.sh -f tsim/parser/selectResNum.sim -,,y,script,./test.sh -f tsim/parser/set_tag_vals.sim -,,y,script,./test.sh -f tsim/parser/single_row_in_tb.sim -,,y,script,./test.sh -f tsim/parser/slimit_alter_tags.sim -,,y,script,./test.sh -f tsim/parser/slimit.sim -,,y,script,./test.sh -f tsim/parser/slimit1.sim -,,y,script,./test.sh -f tsim/parser/stableOp.sim -,,y,script,./test.sh -f tsim/parser/tags_dynamically_specifiy.sim -,,y,script,./test.sh -f tsim/parser/tags_filter.sim -,,y,script,./test.sh -f tsim/parser/tbnameIn.sim -,,y,script,./test.sh -f tsim/parser/timestamp.sim -,,y,script,./test.sh -f tsim/parser/top_groupby.sim -,,y,script,./test.sh -f tsim/parser/topbot.sim -,,y,script,./test.sh -f tsim/parser/union_sysinfo.sim -,,y,script,./test.sh -f tsim/parser/slimit_limit.sim -,,y,script,./test.sh -f tsim/query/tagLikeFilter.sim -,,y,script,./test.sh -f tsim/query/charScalarFunction.sim -,,y,script,./test.sh -f tsim/query/explain.sim -,,y,script,./test.sh -f tsim/query/interval-offset.sim -,,y,script,./test.sh -f tsim/query/interval.sim -,,y,script,./test.sh -f tsim/query/scalarFunction.sim -,,y,script,./test.sh -f tsim/query/scalarNull.sim -,,y,script,./test.sh -f tsim/query/session.sim -,,y,script,./test.sh -f tsim/query/udf.sim -,,y,script,./test.sh -f tsim/query/udf_with_const.sim -,,y,script,./test.sh -f tsim/query/sys_tbname.sim -,,y,script,./test.sh -f tsim/query/groupby.sim -,,y,script,./test.sh -f tsim/query/event.sim -,,y,script,./test.sh -f tsim/query/forceFill.sim -,,y,script,./test.sh -f tsim/query/emptyTsRange.sim -,,y,script,./test.sh -f tsim/query/partitionby.sim -,,y,script,./test.sh -f tsim/qnode/basic1.sim -,,y,script,./test.sh -f tsim/snode/basic1.sim -,,y,script,./test.sh -f tsim/mnode/basic1.sim -,,y,script,./test.sh -f tsim/mnode/basic2.sim -,,y,script,./test.sh -f tsim/mnode/basic3.sim -,,y,script,./test.sh -f tsim/mnode/basic4.sim -,,y,script,./test.sh -f tsim/mnode/basic5.sim -,,y,script,./test.sh -f tsim/show/basic.sim -,,y,script,./test.sh -f tsim/table/autocreate.sim -,,y,script,./test.sh -f tsim/table/basic1.sim -,,y,script,./test.sh -f tsim/table/basic2.sim -,,y,script,./test.sh -f tsim/table/basic3.sim -,,y,script,./test.sh -f tsim/table/bigint.sim -,,y,script,./test.sh -f tsim/table/binary.sim -,,y,script,./test.sh -f tsim/table/bool.sim -,,y,script,./test.sh -f tsim/table/column_name.sim -,,y,script,./test.sh -f tsim/table/column_num.sim -,,y,script,./test.sh -f tsim/table/column_value.sim -,,y,script,./test.sh -f tsim/table/column2.sim -,,y,script,./test.sh -f tsim/table/createmulti.sim -,,y,script,./test.sh -f tsim/table/date.sim -,,y,script,./test.sh -f tsim/table/db.table.sim -,,y,script,./test.sh -f tsim/table/delete_reuse1.sim -,,y,script,./test.sh -f tsim/table/delete_reuse2.sim -,,y,script,./test.sh -f tsim/table/delete_writing.sim -,,y,script,./test.sh -f tsim/table/describe.sim -,,y,script,./test.sh -f tsim/table/double.sim -,,y,script,./test.sh -f tsim/table/float.sim -,,y,script,./test.sh -f tsim/table/hash.sim -,,y,script,./test.sh -f tsim/table/int.sim -,,y,script,./test.sh -f tsim/table/limit.sim -,,y,script,./test.sh -f tsim/table/smallint.sim -,,y,script,./test.sh -f tsim/table/table_len.sim -,,y,script,./test.sh -f tsim/table/table.sim -,,y,script,./test.sh -f tsim/table/tinyint.sim -,,y,script,./test.sh -f tsim/table/vgroup.sim -,,n,script,./test.sh -f tsim/stream/basic0.sim -g -,,y,script,./test.sh -f tsim/stream/basic1.sim -,,y,script,./test.sh -f tsim/stream/basic2.sim -,,y,script,./test.sh -f tsim/stream/drop_stream.sim -,,y,script,./test.sh -f tsim/stream/fillHistoryBasic1.sim -,,y,script,./test.sh -f tsim/stream/fillHistoryBasic2.sim -,,y,script,./test.sh -f tsim/stream/fillHistoryBasic3.sim -,,y,script,./test.sh -f tsim/stream/distributeInterval0.sim -,,y,script,./test.sh -f tsim/stream/distributeIntervalRetrive0.sim -,,y,script,./test.sh -f tsim/stream/distributeSession0.sim -,,y,script,./test.sh -f tsim/stream/session0.sim -,,y,script,./test.sh -f tsim/stream/session1.sim -,,y,script,./test.sh -f tsim/stream/state0.sim -,,y,script,./test.sh -f tsim/stream/triggerInterval0.sim -,,y,script,./test.sh -f tsim/stream/triggerSession0.sim -,,y,script,./test.sh -f tsim/stream/partitionby.sim -,,y,script,./test.sh -f tsim/stream/partitionby1.sim -,,y,script,./test.sh -f tsim/stream/schedSnode.sim -,,y,script,./test.sh -f tsim/stream/windowClose.sim -,,y,script,./test.sh -f tsim/stream/ignoreExpiredData.sim -,,y,script,./test.sh -f tsim/stream/sliding.sim -,,y,script,./test.sh -f tsim/stream/partitionbyColumnInterval.sim -,,y,script,./test.sh -f tsim/stream/partitionbyColumnSession.sim -,,y,script,./test.sh -f tsim/stream/partitionbyColumnState.sim -,,y,script,./test.sh -f tsim/stream/deleteInterval.sim -,,y,script,./test.sh -f tsim/stream/deleteSession.sim -,,y,script,./test.sh -f tsim/stream/deleteState.sim -,,y,script,./test.sh -f tsim/stream/fillIntervalDelete0.sim -,,y,script,./test.sh -f tsim/stream/fillIntervalDelete1.sim -,,y,script,./test.sh -f tsim/stream/fillIntervalLinear.sim -,,y,script,./test.sh -f tsim/stream/fillIntervalPartitionBy.sim -,,y,script,./test.sh -f tsim/stream/fillIntervalPrevNext.sim -,,y,script,./test.sh -f tsim/stream/fillIntervalValue.sim -,,y,script,./test.sh -f tsim/stream/udTableAndTag0.sim -,,y,script,./test.sh -f tsim/stream/udTableAndTag1.sim -,,y,script,./test.sh -f tsim/trans/lossdata1.sim -,,y,script,./test.sh -f tsim/tmq/basic1.sim -,,y,script,./test.sh -f tsim/tmq/basic2.sim -,,y,script,./test.sh -f tsim/tmq/basic3.sim -,,y,script,./test.sh -f tsim/tmq/basic4.sim -,,y,script,./test.sh -f tsim/tmq/basic1Of2Cons.sim -,,y,script,./test.sh -f tsim/tmq/basic2Of2Cons.sim -,,y,script,./test.sh -f tsim/tmq/basic3Of2Cons.sim -,,y,script,./test.sh -f tsim/tmq/basic4Of2Cons.sim -,,y,script,./test.sh -f tsim/tmq/topic.sim -,,y,script,./test.sh -f tsim/tmq/snapshot.sim -,,y,script,./test.sh -f tsim/tmq/snapshot1.sim -,,y,script,./test.sh -f tsim/stable/alter_comment.sim -,,y,script,./test.sh -f tsim/stable/alter_count.sim -,,y,script,./test.sh -f tsim/stable/alter_import.sim -,,y,script,./test.sh -f tsim/stable/alter_insert1.sim -,,y,script,./test.sh -f tsim/stable/alter_insert2.sim -,,y,script,./test.sh -f tsim/stable/alter_metrics.sim -,,y,script,./test.sh -f tsim/stable/column_add.sim -,,y,script,./test.sh -f tsim/stable/column_drop.sim -,,y,script,./test.sh -f tsim/stable/column_modify.sim -,,y,script,./test.sh -f tsim/stable/disk.sim -,,y,script,./test.sh -f tsim/stable/dnode3.sim -,,y,script,./test.sh -f tsim/stable/metrics.sim -,,y,script,./test.sh -f tsim/stable/refcount.sim -,,y,script,./test.sh -f tsim/stable/tag_add.sim -,,y,script,./test.sh -f tsim/stable/tag_drop.sim -,,y,script,./test.sh -f tsim/stable/tag_filter.sim -,,y,script,./test.sh -f tsim/stable/tag_modify.sim -,,y,script,./test.sh -f tsim/stable/tag_rename.sim -,,y,script,./test.sh -f tsim/stable/values.sim -,,y,script,./test.sh -f tsim/stable/vnode3.sim -,,n,script,./test.sh -f tsim/sma/drop_sma.sim -,,y,script,./test.sh -f tsim/sma/sma_leak.sim -,,y,script,./test.sh -f tsim/sma/tsmaCreateInsertQuery.sim -,,y,script,./test.sh -f tsim/sma/rsmaCreateInsertQuery.sim -,,y,script,./test.sh -f tsim/sma/rsmaPersistenceRecovery.sim -,,n,script,./test.sh -f tsim/valgrind/checkError1.sim -,,n,script,./test.sh -f tsim/valgrind/checkError2.sim -,,n,script,./test.sh -f tsim/valgrind/checkError3.sim -,,n,script,./test.sh -f tsim/valgrind/checkError4.sim -,,n,script,./test.sh -f tsim/valgrind/checkError5.sim -,,n,script,./test.sh -f tsim/valgrind/checkError8.sim -,,n,script,./test.sh -f tsim/valgrind/checkUdf.sim -,,y,script,./test.sh -f tsim/vnode/replica3_basic.sim -,,y,script,./test.sh -f tsim/vnode/replica3_vgroup.sim -,,y,script,./test.sh -f tsim/vnode/replica3_import.sim -,,y,script,./test.sh -f tsim/vnode/stable_balance_replica1.sim -,,y,script,./test.sh -f tsim/vnode/stable_dnode2_stop.sim -,,y,script,./test.sh -f tsim/vnode/stable_dnode2.sim -,,y,script,./test.sh -f tsim/vnode/stable_dnode3.sim -,,y,script,./test.sh -f tsim/vnode/stable_replica3_dnode6.sim -,,y,script,./test.sh -f tsim/vnode/stable_replica3_vnode3.sim -,,y,script,./test.sh -f tsim/sync/oneReplica1VgElect.sim -,,y,script,./test.sh -f tsim/sync/oneReplica5VgElect.sim -,,y,script,./test.sh -f tsim/catalog/alterInCurrent.sim -,,y,script,./test.sh -f tsim/scalar/in.sim -,,y,script,./test.sh -f tsim/scalar/scalar.sim -,,y,script,./test.sh -f tsim/scalar/filter.sim -,,y,script,./test.sh -f tsim/scalar/caseWhen.sim -,,y,script,./test.sh -f tsim/scalar/tsConvert.sim -,,y,script,./test.sh -f tsim/alter/cached_schema_after_alter.sim -,,y,script,./test.sh -f tsim/alter/dnode.sim -,,y,script,./test.sh -f tsim/alter/table.sim -,,y,script,./test.sh -f tsim/cache/new_metrics.sim -,,y,script,./test.sh -f tsim/cache/restart_table.sim -,,y,script,./test.sh -f tsim/cache/restart_metrics.sim -,,y,script,./test.sh -f tsim/column/commit.sim -,,y,script,./test.sh -f tsim/column/metrics.sim -,,y,script,./test.sh -f tsim/column/table.sim -,,y,script,./test.sh -f tsim/compress/commitlog.sim -,,y,script,./test.sh -f tsim/compress/compress2.sim -,,y,script,./test.sh -f tsim/compress/compress.sim -,,y,script,./test.sh -f tsim/compress/uncompress.sim -,,y,script,./test.sh -f tsim/compute/avg.sim -,,y,script,./test.sh -f tsim/compute/block_dist.sim -,,y,script,./test.sh -f tsim/compute/bottom.sim -,,y,script,./test.sh -f tsim/compute/count.sim -,,y,script,./test.sh -f tsim/compute/diff.sim -,,y,script,./test.sh -f tsim/compute/diff2.sim -,,y,script,./test.sh -f tsim/compute/first.sim -,,y,script,./test.sh -f tsim/compute/interval.sim -,,y,script,./test.sh -f tsim/compute/last_row.sim -,,y,script,./test.sh -f tsim/compute/last.sim -,,y,script,./test.sh -f tsim/compute/leastsquare.sim -,,y,script,./test.sh -f tsim/compute/max.sim -,,y,script,./test.sh -f tsim/compute/min.sim -,,y,script,./test.sh -f tsim/compute/null.sim -,,y,script,./test.sh -f tsim/compute/percentile.sim -,,y,script,./test.sh -f tsim/compute/stddev.sim -,,y,script,./test.sh -f tsim/compute/sum.sim -,,y,script,./test.sh -f tsim/compute/top.sim -,,y,script,./test.sh -f tsim/field/2.sim -,,y,script,./test.sh -f tsim/field/3.sim -,,y,script,./test.sh -f tsim/field/4.sim -,,y,script,./test.sh -f tsim/field/5.sim -,,y,script,./test.sh -f tsim/field/6.sim -,,y,script,./test.sh -f tsim/field/binary.sim -,,y,script,./test.sh -f tsim/field/bigint.sim -,,y,script,./test.sh -f tsim/field/bool.sim -,,y,script,./test.sh -f tsim/field/double.sim -,,y,script,./test.sh -f tsim/field/float.sim -,,y,script,./test.sh -f tsim/field/int.sim -,,y,script,./test.sh -f tsim/field/single.sim -,,y,script,./test.sh -f tsim/field/smallint.sim -,,y,script,./test.sh -f tsim/field/tinyint.sim -,,y,script,./test.sh -f tsim/field/unsigined_bigint.sim -,,y,script,./test.sh -f tsim/vector/metrics_field.sim -,,y,script,./test.sh -f tsim/vector/metrics_mix.sim -,,y,script,./test.sh -f tsim/vector/metrics_query.sim -,,y,script,./test.sh -f tsim/vector/metrics_tag.sim -,,y,script,./test.sh -f tsim/vector/metrics_time.sim -,,y,script,./test.sh -f tsim/vector/multi.sim -,,y,script,./test.sh -f tsim/vector/single.sim -,,y,script,./test.sh -f tsim/vector/table_field.sim -,,y,script,./test.sh -f tsim/vector/table_mix.sim -,,y,script,./test.sh -f tsim/vector/table_query.sim -,,y,script,./test.sh -f tsim/vector/table_time.sim -,,y,script,./test.sh -f tsim/wal/kill.sim -,,y,script,./test.sh -f tsim/tag/3.sim -,,y,script,./test.sh -f tsim/tag/4.sim -,,y,script,./test.sh -f tsim/tag/5.sim -,,y,script,./test.sh -f tsim/tag/6.sim -,,y,script,./test.sh -f tsim/tag/add.sim -,,y,script,./test.sh -f tsim/tag/bigint.sim -,,y,script,./test.sh -f tsim/tag/binary_binary.sim -,,y,script,./test.sh -f tsim/tag/binary.sim -,,y,script,./test.sh -f tsim/tag/bool_binary.sim -,,y,script,./test.sh -f tsim/tag/bool_int.sim -,,y,script,./test.sh -f tsim/tag/bool.sim -,,y,script,./test.sh -f tsim/tag/change.sim -,,y,script,./test.sh -f tsim/tag/column.sim -,,y,script,./test.sh -f tsim/tag/commit.sim -,,y,script,./test.sh -f tsim/tag/create.sim -,,y,script,./test.sh -f tsim/tag/delete.sim -,,y,script,./test.sh -f tsim/tag/double.sim -,,y,script,./test.sh -f tsim/tag/filter.sim -,,y,script,./test.sh -f tsim/tag/float.sim -,,y,script,./test.sh -f tsim/tag/int_binary.sim -,,y,script,./test.sh -f tsim/tag/int_float.sim -,,y,script,./test.sh -f tsim/tag/int.sim -,,y,script,./test.sh -f tsim/tag/set.sim -,,y,script,./test.sh -f tsim/tag/smallint.sim -,,y,script,./test.sh -f tsim/tag/tinyint.sim -,,y,script,./test.sh -f tsim/tag/drop_tag.sim -,,y,script,./test.sh -f tsim/tag/tbNameIn.sim -,,y,script,./test.sh -f tmp/monitor.sim - #system test ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py @@ -884,11 +475,7 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -Q 4 + ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -Q 3 @@ -1087,6 +674,414 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-20582.py +#tsim test +,,y,script,./test.sh -f tsim/tmq/basic2Of2ConsOverlap.sim +,,y,script,./test.sh -f tsim/parser/where.sim +,,y,script,./test.sh -f tsim/parser/join_manyblocks.sim +,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_leader.sim +,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_follower.sim +,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v2.sim +,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v3.sim +,,y,script,./test.sh -f tsim/parser/limit1.sim +,,y,script,./test.sh -f tsim/parser/union.sim +,,y,script,./test.sh -f tsim/parser/commit.sim +,,y,script,./test.sh -f tsim/parser/nestquery.sim +,,n,script,./test.sh -f tsim/valgrind/checkError7.sim +,,y,script,./test.sh -f tsim/parser/groupby.sim +,,y,script,./test.sh -f tsim/parser/sliding.sim +,,y,script,./test.sh -f tsim/dnode/balance2.sim +,,y,script,./test.sh -f tsim/vnode/replica3_repeat.sim +,,y,script,./test.sh -f tsim/parser/col_arithmetic_operation.sim +,,y,script,./test.sh -f tsim/trans/create_db.sim +,,y,script,./test.sh -f tsim/dnode/balance3.sim +,,y,script,./test.sh -f tsim/vnode/replica3_many.sim +,,y,script,./test.sh -f tsim/stable/metrics_idx.sim +,,y,script,./test.sh -f tsim/db/alter_replica_13.sim +,,y,script,./test.sh -f tsim/sync/3Replica1VgElect.sim +,,y,script,./test.sh -f tsim/sync/3Replica5VgElect.sim +,,n,script,./test.sh -f tsim/valgrind/checkError6.sim + +,,y,script,./test.sh -f tsim/user/basic.sim +,,y,script,./test.sh -f tsim/user/password.sim +,,y,script,./test.sh -f tsim/user/privilege_db.sim +,,y,script,./test.sh -f tsim/user/privilege_sysinfo.sim +,,y,script,./test.sh -f tsim/user/privilege_topic.sim +,,y,script,./test.sh -f tsim/db/alter_option.sim +,,y,script,./test.sh -f tsim/db/alter_replica_31.sim +,,y,script,./test.sh -f tsim/db/basic1.sim +,,y,script,./test.sh -f tsim/db/basic2.sim +,,y,script,./test.sh -f tsim/db/basic3.sim +,,y,script,./test.sh -f tsim/db/basic4.sim +,,y,script,./test.sh -f tsim/db/basic5.sim +,,y,script,./test.sh -f tsim/db/basic6.sim +,,y,script,./test.sh -f tsim/db/commit.sim +,,y,script,./test.sh -f tsim/db/create_all_options.sim +,,y,script,./test.sh -f tsim/db/delete_reuse1.sim +,,y,script,./test.sh -f tsim/db/delete_reuse2.sim +,,y,script,./test.sh -f tsim/db/delete_reusevnode.sim +,,y,script,./test.sh -f tsim/db/delete_reusevnode2.sim +,,y,script,./test.sh -f tsim/db/delete_writing1.sim +,,y,script,./test.sh -f tsim/db/delete_writing2.sim +,,y,script,./test.sh -f tsim/db/error1.sim +,,y,script,./test.sh -f tsim/db/keep.sim +,,y,script,./test.sh -f tsim/db/len.sim +,,y,script,./test.sh -f tsim/db/repeat.sim +,,y,script,./test.sh -f tsim/db/show_create_db.sim +,,y,script,./test.sh -f tsim/db/show_create_table.sim +,,y,script,./test.sh -f tsim/db/tables.sim +,,y,script,./test.sh -f tsim/db/taosdlog.sim +,,y,script,./test.sh -f tsim/dnode/balance_replica1.sim +,,y,script,./test.sh -f tsim/dnode/balance_replica3.sim +,,y,script,./test.sh -f tsim/dnode/balance1.sim +,,y,script,./test.sh -f tsim/dnode/balancex.sim +,,y,script,./test.sh -f tsim/dnode/create_dnode.sim +,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_mnode.sim +,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_qnode_snode.sim +,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_vnode_replica1.sim +,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_vnode_replica3.sim +,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_multi_vnode_replica1.sim +,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_multi_vnode_replica3.sim +,,y,script,./test.sh -f tsim/dnode/drop_dnode_force.sim +,,y,script,./test.sh -f tsim/dnode/offline_reason.sim +,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica1.sim +,,y,script,./test.sh -f tsim/dnode/vnode_clean.sim +,,y,script,./test.sh -f tsim/dnode/use_dropped_dnode.sim +,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica1.sim +,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica3.sim +,,y,script,./test.sh -f tsim/import/basic.sim +,,y,script,./test.sh -f tsim/import/commit.sim +,,y,script,./test.sh -f tsim/import/large.sim +,,y,script,./test.sh -f tsim/import/replica1.sim +,,y,script,./test.sh -f tsim/insert/backquote.sim +,,y,script,./test.sh -f tsim/insert/basic.sim +,,y,script,./test.sh -f tsim/insert/basic0.sim +,,y,script,./test.sh -f tsim/insert/basic1.sim +,,y,script,./test.sh -f tsim/insert/basic2.sim +,,y,script,./test.sh -f tsim/insert/commit-merge0.sim +,,y,script,./test.sh -f tsim/insert/insert_drop.sim +,,y,script,./test.sh -f tsim/insert/insert_select.sim +,,y,script,./test.sh -f tsim/insert/null.sim +,,y,script,./test.sh -f tsim/insert/query_block1_file.sim +,,y,script,./test.sh -f tsim/insert/query_block1_memory.sim +,,y,script,./test.sh -f tsim/insert/query_block2_file.sim +,,y,script,./test.sh -f tsim/insert/query_block2_memory.sim +,,y,script,./test.sh -f tsim/insert/query_file_memory.sim +,,y,script,./test.sh -f tsim/insert/query_multi_file.sim +,,y,script,./test.sh -f tsim/insert/tcp.sim +,,y,script,./test.sh -f tsim/insert/update0.sim +,,y,script,./test.sh -f tsim/insert/update1_sort_merge.sim +,,y,script,./test.sh -f tsim/insert/update2.sim +,,y,script,./test.sh -f tsim/parser/alter__for_community_version.sim +,,y,script,./test.sh -f tsim/parser/alter_column.sim +,,y,script,./test.sh -f tsim/parser/alter_stable.sim +,,y,script,./test.sh -f tsim/parser/alter.sim +,,y,script,./test.sh -f tsim/parser/alter1.sim +,,y,script,./test.sh -f tsim/parser/auto_create_tb_drop_tb.sim +,,y,script,./test.sh -f tsim/parser/auto_create_tb.sim +,,y,script,./test.sh -f tsim/parser/between_and.sim +,,y,script,./test.sh -f tsim/parser/binary_escapeCharacter.sim +,,y,script,./test.sh -f tsim/parser/columnValue_bigint.sim +,,y,script,./test.sh -f tsim/parser/columnValue_bool.sim +,,y,script,./test.sh -f tsim/parser/columnValue_double.sim +,,y,script,./test.sh -f tsim/parser/columnValue_float.sim +,,y,script,./test.sh -f tsim/parser/columnValue_int.sim +,,y,script,./test.sh -f tsim/parser/columnValue_smallint.sim +,,y,script,./test.sh -f tsim/parser/columnValue_tinyint.sim +,,y,script,./test.sh -f tsim/parser/columnValue_unsign.sim +,,y,script,./test.sh -f tsim/parser/condition.sim +,,y,script,./test.sh -f tsim/parser/constCol.sim +,,y,script,./test.sh -f tsim/parser/create_db.sim +,,y,script,./test.sh -f tsim/parser/create_mt.sim +,,y,script,./test.sh -f tsim/parser/create_tb_with_tag_name.sim +,,y,script,./test.sh -f tsim/parser/create_tb.sim +,,y,script,./test.sh -f tsim/parser/dbtbnameValidate.sim +,,y,script,./test.sh -f tsim/parser/distinct.sim +,,y,script,./test.sh -f tsim/parser/fill_us.sim +,,y,script,./test.sh -f tsim/parser/fill.sim +,,y,script,./test.sh -f tsim/parser/first_last.sim +,,y,script,./test.sh -f tsim/parser/fill_stb.sim +,,y,script,./test.sh -f tsim/parser/interp.sim +,,y,script,./test.sh -f tsim/parser/fourArithmetic-basic.sim +,,y,script,./test.sh -f tsim/parser/function.sim +,,y,script,./test.sh -f tsim/parser/groupby-basic.sim +,,y,script,./test.sh -f tsim/parser/having_child.sim +,,y,script,./test.sh -f tsim/parser/having.sim +,,y,script,./test.sh -f tsim/parser/import_commit1.sim +,,y,script,./test.sh -f tsim/parser/import_commit2.sim +,,y,script,./test.sh -f tsim/parser/import_commit3.sim +,,y,script,./test.sh -f tsim/parser/import_file.sim +,,y,script,./test.sh -f tsim/parser/import.sim +,,y,script,./test.sh -f tsim/parser/insert_multiTbl.sim +,,y,script,./test.sh -f tsim/parser/insert_tb.sim +,,y,script,./test.sh -f tsim/parser/join_multitables.sim +,,y,script,./test.sh -f tsim/parser/join_multivnode.sim +,,y,script,./test.sh -f tsim/parser/join.sim +,,y,script,./test.sh -f tsim/parser/last_cache.sim +,,y,script,./test.sh -f tsim/parser/last_groupby.sim +,,y,script,./test.sh -f tsim/parser/lastrow.sim +,,y,script,./test.sh -f tsim/parser/lastrow2.sim +,,y,script,./test.sh -f tsim/parser/like.sim +,,y,script,./test.sh -f tsim/parser/limit.sim +,,y,script,./test.sh -f tsim/parser/mixed_blocks.sim +,,y,script,./test.sh -f tsim/parser/nchar.sim +,,y,script,./test.sh -f tsim/parser/null_char.sim +,,y,script,./test.sh -f tsim/parser/precision_ns.sim +,,y,script,./test.sh -f tsim/parser/projection_limit_offset.sim +,,y,script,./test.sh -f tsim/parser/regex.sim +,,y,script,./test.sh -f tsim/parser/regressiontest.sim +,,y,script,./test.sh -f tsim/parser/select_across_vnodes.sim +,,y,script,./test.sh -f tsim/parser/select_distinct_tag.sim +,,y,script,./test.sh -f tsim/parser/select_from_cache_disk.sim +,,y,script,./test.sh -f tsim/parser/select_with_tags.sim +,,y,script,./test.sh -f tsim/parser/selectResNum.sim +,,y,script,./test.sh -f tsim/parser/set_tag_vals.sim +,,y,script,./test.sh -f tsim/parser/single_row_in_tb.sim +,,y,script,./test.sh -f tsim/parser/slimit_alter_tags.sim +,,y,script,./test.sh -f tsim/parser/slimit.sim +,,y,script,./test.sh -f tsim/parser/slimit1.sim +,,y,script,./test.sh -f tsim/parser/stableOp.sim +,,y,script,./test.sh -f tsim/parser/tags_dynamically_specifiy.sim +,,y,script,./test.sh -f tsim/parser/tags_filter.sim +,,y,script,./test.sh -f tsim/parser/tbnameIn.sim +,,y,script,./test.sh -f tsim/parser/timestamp.sim +,,y,script,./test.sh -f tsim/parser/top_groupby.sim +,,y,script,./test.sh -f tsim/parser/topbot.sim +,,y,script,./test.sh -f tsim/parser/union_sysinfo.sim +,,y,script,./test.sh -f tsim/parser/slimit_limit.sim +,,y,script,./test.sh -f tsim/query/tagLikeFilter.sim +,,y,script,./test.sh -f tsim/query/charScalarFunction.sim +,,y,script,./test.sh -f tsim/query/explain.sim +,,y,script,./test.sh -f tsim/query/interval-offset.sim +,,y,script,./test.sh -f tsim/query/interval.sim +,,y,script,./test.sh -f tsim/query/scalarFunction.sim +,,y,script,./test.sh -f tsim/query/scalarNull.sim +,,y,script,./test.sh -f tsim/query/session.sim +,,y,script,./test.sh -f tsim/query/udf.sim +,,y,script,./test.sh -f tsim/query/udf_with_const.sim +,,y,script,./test.sh -f tsim/query/sys_tbname.sim +,,y,script,./test.sh -f tsim/query/groupby.sim +,,y,script,./test.sh -f tsim/query/event.sim +,,y,script,./test.sh -f tsim/query/forceFill.sim +,,y,script,./test.sh -f tsim/query/emptyTsRange.sim +,,y,script,./test.sh -f tsim/query/partitionby.sim +,,y,script,./test.sh -f tsim/qnode/basic1.sim +,,y,script,./test.sh -f tsim/snode/basic1.sim +,,y,script,./test.sh -f tsim/mnode/basic1.sim +,,y,script,./test.sh -f tsim/mnode/basic2.sim +,,y,script,./test.sh -f tsim/mnode/basic3.sim +,,y,script,./test.sh -f tsim/mnode/basic4.sim +,,y,script,./test.sh -f tsim/mnode/basic5.sim +,,y,script,./test.sh -f tsim/show/basic.sim +,,y,script,./test.sh -f tsim/table/autocreate.sim +,,y,script,./test.sh -f tsim/table/basic1.sim +,,y,script,./test.sh -f tsim/table/basic2.sim +,,y,script,./test.sh -f tsim/table/basic3.sim +,,y,script,./test.sh -f tsim/table/bigint.sim +,,y,script,./test.sh -f tsim/table/binary.sim +,,y,script,./test.sh -f tsim/table/bool.sim +,,y,script,./test.sh -f tsim/table/column_name.sim +,,y,script,./test.sh -f tsim/table/column_num.sim +,,y,script,./test.sh -f tsim/table/column_value.sim +,,y,script,./test.sh -f tsim/table/column2.sim +,,y,script,./test.sh -f tsim/table/createmulti.sim +,,y,script,./test.sh -f tsim/table/date.sim +,,y,script,./test.sh -f tsim/table/db.table.sim +,,y,script,./test.sh -f tsim/table/delete_reuse1.sim +,,y,script,./test.sh -f tsim/table/delete_reuse2.sim +,,y,script,./test.sh -f tsim/table/delete_writing.sim +,,y,script,./test.sh -f tsim/table/describe.sim +,,y,script,./test.sh -f tsim/table/double.sim +,,y,script,./test.sh -f tsim/table/float.sim +,,y,script,./test.sh -f tsim/table/hash.sim +,,y,script,./test.sh -f tsim/table/int.sim +,,y,script,./test.sh -f tsim/table/limit.sim +,,y,script,./test.sh -f tsim/table/smallint.sim +,,y,script,./test.sh -f tsim/table/table_len.sim +,,y,script,./test.sh -f tsim/table/table.sim +,,y,script,./test.sh -f tsim/table/tinyint.sim +,,y,script,./test.sh -f tsim/table/vgroup.sim +,,n,script,./test.sh -f tsim/stream/basic0.sim -g +,,y,script,./test.sh -f tsim/stream/basic1.sim +,,y,script,./test.sh -f tsim/stream/basic2.sim +,,y,script,./test.sh -f tsim/stream/drop_stream.sim +,,y,script,./test.sh -f tsim/stream/fillHistoryBasic1.sim +,,y,script,./test.sh -f tsim/stream/fillHistoryBasic2.sim +,,y,script,./test.sh -f tsim/stream/fillHistoryBasic3.sim +,,y,script,./test.sh -f tsim/stream/distributeInterval0.sim +,,y,script,./test.sh -f tsim/stream/distributeIntervalRetrive0.sim +,,y,script,./test.sh -f tsim/stream/distributeSession0.sim +,,y,script,./test.sh -f tsim/stream/session0.sim +,,y,script,./test.sh -f tsim/stream/session1.sim +,,y,script,./test.sh -f tsim/stream/state0.sim +,,y,script,./test.sh -f tsim/stream/triggerInterval0.sim +,,y,script,./test.sh -f tsim/stream/triggerSession0.sim +,,y,script,./test.sh -f tsim/stream/partitionby.sim +,,y,script,./test.sh -f tsim/stream/partitionby1.sim +,,y,script,./test.sh -f tsim/stream/schedSnode.sim +,,y,script,./test.sh -f tsim/stream/windowClose.sim +,,y,script,./test.sh -f tsim/stream/ignoreExpiredData.sim +,,y,script,./test.sh -f tsim/stream/sliding.sim +,,y,script,./test.sh -f tsim/stream/partitionbyColumnInterval.sim +,,y,script,./test.sh -f tsim/stream/partitionbyColumnSession.sim +,,y,script,./test.sh -f tsim/stream/partitionbyColumnState.sim +,,y,script,./test.sh -f tsim/stream/deleteInterval.sim +,,y,script,./test.sh -f tsim/stream/deleteSession.sim +,,y,script,./test.sh -f tsim/stream/deleteState.sim +,,y,script,./test.sh -f tsim/stream/fillIntervalDelete0.sim +,,y,script,./test.sh -f tsim/stream/fillIntervalDelete1.sim +,,y,script,./test.sh -f tsim/stream/fillIntervalLinear.sim +,,y,script,./test.sh -f tsim/stream/fillIntervalPartitionBy.sim +,,y,script,./test.sh -f tsim/stream/fillIntervalPrevNext.sim +,,y,script,./test.sh -f tsim/stream/fillIntervalValue.sim +,,y,script,./test.sh -f tsim/stream/udTableAndTag0.sim +,,y,script,./test.sh -f tsim/stream/udTableAndTag1.sim +,,y,script,./test.sh -f tsim/trans/lossdata1.sim +,,y,script,./test.sh -f tsim/tmq/basic1.sim +,,y,script,./test.sh -f tsim/tmq/basic2.sim +,,y,script,./test.sh -f tsim/tmq/basic3.sim +,,y,script,./test.sh -f tsim/tmq/basic4.sim +,,y,script,./test.sh -f tsim/tmq/basic1Of2Cons.sim +,,y,script,./test.sh -f tsim/tmq/basic2Of2Cons.sim +,,y,script,./test.sh -f tsim/tmq/basic3Of2Cons.sim +,,y,script,./test.sh -f tsim/tmq/basic4Of2Cons.sim +,,y,script,./test.sh -f tsim/tmq/topic.sim +,,y,script,./test.sh -f tsim/tmq/snapshot.sim +,,y,script,./test.sh -f tsim/tmq/snapshot1.sim +,,y,script,./test.sh -f tsim/stable/alter_comment.sim +,,y,script,./test.sh -f tsim/stable/alter_count.sim +,,y,script,./test.sh -f tsim/stable/alter_import.sim +,,y,script,./test.sh -f tsim/stable/alter_insert1.sim +,,y,script,./test.sh -f tsim/stable/alter_insert2.sim +,,y,script,./test.sh -f tsim/stable/alter_metrics.sim +,,y,script,./test.sh -f tsim/stable/column_add.sim +,,y,script,./test.sh -f tsim/stable/column_drop.sim +,,y,script,./test.sh -f tsim/stable/column_modify.sim +,,y,script,./test.sh -f tsim/stable/disk.sim +,,y,script,./test.sh -f tsim/stable/dnode3.sim +,,y,script,./test.sh -f tsim/stable/metrics.sim +,,y,script,./test.sh -f tsim/stable/refcount.sim +,,y,script,./test.sh -f tsim/stable/tag_add.sim +,,y,script,./test.sh -f tsim/stable/tag_drop.sim +,,y,script,./test.sh -f tsim/stable/tag_filter.sim +,,y,script,./test.sh -f tsim/stable/tag_modify.sim +,,y,script,./test.sh -f tsim/stable/tag_rename.sim +,,y,script,./test.sh -f tsim/stable/values.sim +,,y,script,./test.sh -f tsim/stable/vnode3.sim +,,n,script,./test.sh -f tsim/sma/drop_sma.sim +,,y,script,./test.sh -f tsim/sma/sma_leak.sim +,,y,script,./test.sh -f tsim/sma/tsmaCreateInsertQuery.sim +,,y,script,./test.sh -f tsim/sma/rsmaCreateInsertQuery.sim +,,y,script,./test.sh -f tsim/sma/rsmaPersistenceRecovery.sim +,,n,script,./test.sh -f tsim/valgrind/checkError1.sim +,,n,script,./test.sh -f tsim/valgrind/checkError2.sim +,,n,script,./test.sh -f tsim/valgrind/checkError3.sim +,,n,script,./test.sh -f tsim/valgrind/checkError4.sim +,,n,script,./test.sh -f tsim/valgrind/checkError5.sim +,,n,script,./test.sh -f tsim/valgrind/checkError8.sim +,,n,script,./test.sh -f tsim/valgrind/checkUdf.sim +,,y,script,./test.sh -f tsim/vnode/replica3_basic.sim +,,y,script,./test.sh -f tsim/vnode/replica3_vgroup.sim +,,y,script,./test.sh -f tsim/vnode/replica3_import.sim +,,y,script,./test.sh -f tsim/vnode/stable_balance_replica1.sim +,,y,script,./test.sh -f tsim/vnode/stable_dnode2_stop.sim +,,y,script,./test.sh -f tsim/vnode/stable_dnode2.sim +,,y,script,./test.sh -f tsim/vnode/stable_dnode3.sim +,,y,script,./test.sh -f tsim/vnode/stable_replica3_dnode6.sim +,,y,script,./test.sh -f tsim/vnode/stable_replica3_vnode3.sim +,,y,script,./test.sh -f tsim/sync/oneReplica1VgElect.sim +,,y,script,./test.sh -f tsim/sync/oneReplica5VgElect.sim +,,y,script,./test.sh -f tsim/catalog/alterInCurrent.sim +,,y,script,./test.sh -f tsim/scalar/in.sim +,,y,script,./test.sh -f tsim/scalar/scalar.sim +,,y,script,./test.sh -f tsim/scalar/filter.sim +,,y,script,./test.sh -f tsim/scalar/caseWhen.sim +,,y,script,./test.sh -f tsim/scalar/tsConvert.sim +,,y,script,./test.sh -f tsim/alter/cached_schema_after_alter.sim +,,y,script,./test.sh -f tsim/alter/dnode.sim +,,y,script,./test.sh -f tsim/alter/table.sim +,,y,script,./test.sh -f tsim/cache/new_metrics.sim +,,y,script,./test.sh -f tsim/cache/restart_table.sim +,,y,script,./test.sh -f tsim/cache/restart_metrics.sim +,,y,script,./test.sh -f tsim/column/commit.sim +,,y,script,./test.sh -f tsim/column/metrics.sim +,,y,script,./test.sh -f tsim/column/table.sim +,,y,script,./test.sh -f tsim/compress/commitlog.sim +,,y,script,./test.sh -f tsim/compress/compress2.sim +,,y,script,./test.sh -f tsim/compress/compress.sim +,,y,script,./test.sh -f tsim/compress/uncompress.sim +,,y,script,./test.sh -f tsim/compute/avg.sim +,,y,script,./test.sh -f tsim/compute/block_dist.sim +,,y,script,./test.sh -f tsim/compute/bottom.sim +,,y,script,./test.sh -f tsim/compute/count.sim +,,y,script,./test.sh -f tsim/compute/diff.sim +,,y,script,./test.sh -f tsim/compute/diff2.sim +,,y,script,./test.sh -f tsim/compute/first.sim +,,y,script,./test.sh -f tsim/compute/interval.sim +,,y,script,./test.sh -f tsim/compute/last_row.sim +,,y,script,./test.sh -f tsim/compute/last.sim +,,y,script,./test.sh -f tsim/compute/leastsquare.sim +,,y,script,./test.sh -f tsim/compute/max.sim +,,y,script,./test.sh -f tsim/compute/min.sim +,,y,script,./test.sh -f tsim/compute/null.sim +,,y,script,./test.sh -f tsim/compute/percentile.sim +,,y,script,./test.sh -f tsim/compute/stddev.sim +,,y,script,./test.sh -f tsim/compute/sum.sim +,,y,script,./test.sh -f tsim/compute/top.sim +,,y,script,./test.sh -f tsim/field/2.sim +,,y,script,./test.sh -f tsim/field/3.sim +,,y,script,./test.sh -f tsim/field/4.sim +,,y,script,./test.sh -f tsim/field/5.sim +,,y,script,./test.sh -f tsim/field/6.sim +,,y,script,./test.sh -f tsim/field/binary.sim +,,y,script,./test.sh -f tsim/field/bigint.sim +,,y,script,./test.sh -f tsim/field/bool.sim +,,y,script,./test.sh -f tsim/field/double.sim +,,y,script,./test.sh -f tsim/field/float.sim +,,y,script,./test.sh -f tsim/field/int.sim +,,y,script,./test.sh -f tsim/field/single.sim +,,y,script,./test.sh -f tsim/field/smallint.sim +,,y,script,./test.sh -f tsim/field/tinyint.sim +,,y,script,./test.sh -f tsim/field/unsigined_bigint.sim +,,y,script,./test.sh -f tsim/vector/metrics_field.sim +,,y,script,./test.sh -f tsim/vector/metrics_mix.sim +,,y,script,./test.sh -f tsim/vector/metrics_query.sim +,,y,script,./test.sh -f tsim/vector/metrics_tag.sim +,,y,script,./test.sh -f tsim/vector/metrics_time.sim +,,y,script,./test.sh -f tsim/vector/multi.sim +,,y,script,./test.sh -f tsim/vector/single.sim +,,y,script,./test.sh -f tsim/vector/table_field.sim +,,y,script,./test.sh -f tsim/vector/table_mix.sim +,,y,script,./test.sh -f tsim/vector/table_query.sim +,,y,script,./test.sh -f tsim/vector/table_time.sim +,,y,script,./test.sh -f tsim/wal/kill.sim +,,y,script,./test.sh -f tsim/tag/3.sim +,,y,script,./test.sh -f tsim/tag/4.sim +,,y,script,./test.sh -f tsim/tag/5.sim +,,y,script,./test.sh -f tsim/tag/6.sim +,,y,script,./test.sh -f tsim/tag/add.sim +,,y,script,./test.sh -f tsim/tag/bigint.sim +,,y,script,./test.sh -f tsim/tag/binary_binary.sim +,,y,script,./test.sh -f tsim/tag/binary.sim +,,y,script,./test.sh -f tsim/tag/bool_binary.sim +,,y,script,./test.sh -f tsim/tag/bool_int.sim +,,y,script,./test.sh -f tsim/tag/bool.sim +,,y,script,./test.sh -f tsim/tag/change.sim +,,y,script,./test.sh -f tsim/tag/column.sim +,,y,script,./test.sh -f tsim/tag/commit.sim +,,y,script,./test.sh -f tsim/tag/create.sim +,,y,script,./test.sh -f tsim/tag/delete.sim +,,y,script,./test.sh -f tsim/tag/double.sim +,,y,script,./test.sh -f tsim/tag/filter.sim +,,y,script,./test.sh -f tsim/tag/float.sim +,,y,script,./test.sh -f tsim/tag/int_binary.sim +,,y,script,./test.sh -f tsim/tag/int_float.sim +,,y,script,./test.sh -f tsim/tag/int.sim +,,y,script,./test.sh -f tsim/tag/set.sim +,,y,script,./test.sh -f tsim/tag/smallint.sim +,,y,script,./test.sh -f tsim/tag/tinyint.sim +,,y,script,./test.sh -f tsim/tag/drop_tag.sim +,,y,script,./test.sh -f tsim/tag/tbNameIn.sim +,,y,script,./test.sh -f tmp/monitor.sim #develop test ,,n,develop-test,python3 ./test.py -f 2-query/table_count_scan.py ,,n,develop-test,python3 ./test.py -f 2-query/show_create_db.py From 49b3649c55619541574ac886dec84b12491a44d3 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Mon, 13 Mar 2023 16:54:23 +0800 Subject: [PATCH 148/154] fix:add log if sml value is too long --- source/libs/parser/src/parInsertSml.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/libs/parser/src/parInsertSml.c b/source/libs/parser/src/parInsertSml.c index d6c1072669..3c2b6499a4 100644 --- a/source/libs/parser/src/parInsertSml.c +++ b/source/libs/parser/src/parInsertSml.c @@ -345,6 +345,7 @@ int32_t smlBindData(SQuery* query, bool dataFormat, SArray* tags, SArray* colsSc } if (!taosMbsToUcs4(kv->value, kv->length, (TdUcs4*)pUcs4, pColSchema->bytes - VARSTR_HEADER_SIZE, &len)) { if (errno == E2BIG) { + uError("sml bind taosMbsToUcs4 error, kv length:%d, bytes:%d", (int)kv->length, pColSchema->bytes); buildInvalidOperationMsg(&pBuf, "value too long"); ret = TSDB_CODE_PAR_VALUE_TOO_LONG; goto end; From ca39dfcf2d14bfb8027d75530ebacf03e4aa3d82 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Mon, 13 Mar 2023 17:21:32 +0800 Subject: [PATCH 149/154] feat: show vgroup display num of cache tables --- include/common/tglobal.h | 11 ++++++----- include/common/tmsg.h | 2 +- source/common/src/systable.c | 1 + source/common/src/tglobal.c | 5 +++++ source/common/src/tmsg.c | 6 ++++-- source/dnode/mnode/impl/inc/mndDef.h | 1 + source/dnode/mnode/impl/src/mndDnode.c | 4 +++- source/dnode/mnode/impl/src/mndVgroup.c | 3 +++ source/dnode/vnode/src/inc/tsdb.h | 2 ++ source/dnode/vnode/src/tsdb/tsdbCache.c | 5 +++++ source/dnode/vnode/src/tsdb/tsdbCacheRead.c | 9 +++++---- source/dnode/vnode/src/tsdb/tsdbMergeTree.c | 8 ++++++++ source/dnode/vnode/src/vnd/vnodeQuery.c | 2 +- 13 files changed, 45 insertions(+), 14 deletions(-) diff --git a/include/common/tglobal.h b/include/common/tglobal.h index ac75b84762..13e8454ac3 100644 --- a/include/common/tglobal.h +++ b/include/common/tglobal.h @@ -98,7 +98,8 @@ extern char *tsSvrCrashReportUri; // query buffer management extern int32_t tsQueryBufferSize; // maximum allowed usage buffer size in MB for each data node during query processing -extern int64_t tsQueryBufferSizeBytes; // maximum allowed usage buffer size in byte for each data node +extern int64_t tsQueryBufferSizeBytes; // maximum allowed usage buffer size in byte for each data node +extern int32_t tsCacheLazyLoadThreshold; // cost threshold for last/last_row loading cache as much as possible // query client extern int32_t tsQueryPolicy; @@ -145,10 +146,10 @@ extern char tsUdfdResFuncs[]; extern char tsUdfdLdLibPath[]; // schemaless -extern char tsSmlChildTableName[]; -extern char tsSmlTagName[]; -//extern bool tsSmlDataFormat; -//extern int32_t tsSmlBatchSize; +extern char tsSmlChildTableName[]; +extern char tsSmlTagName[]; +// extern bool tsSmlDataFormat; +// extern int32_t tsSmlBatchSize; // wal extern int64_t tsWalFsyncDataSizeLimit; diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 644f423cb1..f7c9c77e78 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1136,7 +1136,7 @@ typedef struct { int64_t numOfInsertSuccessReqs; int64_t numOfBatchInsertReqs; int64_t numOfBatchInsertSuccessReqs; - int32_t numOfCacheTables; + int32_t numOfCachedTables; } SVnodeLoad; typedef struct { diff --git a/source/common/src/systable.c b/source/common/src/systable.c index 4aa47a3819..141504a7c4 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -233,6 +233,7 @@ static const SSysDbTableSchema vgroupsSchema[] = { {.name = "v4_dnode", .bytes = 2, .type = TSDB_DATA_TYPE_SMALLINT, .sysInfo = true}, {.name = "v4_status", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "cacheload", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = true}, + {.name = "cacheTables", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = true}, {.name = "tsma", .bytes = 1, .type = TSDB_DATA_TYPE_TINYINT, .sysInfo = true}, // {.name = "compact_start_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = false}, }; diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 8058f9fddd..0b4c7b88d7 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -154,6 +154,7 @@ char tsTagFilterCache = 0; // positive value (in MB) int32_t tsQueryBufferSize = -1; int64_t tsQueryBufferSizeBytes = -1; +int32_t tsCacheLazyLoadThreshold = 500; int32_t tsDiskCfgNum = 0; SDiskCfg tsDiskCfg[TFS_MAX_DISKS] = {0}; @@ -497,6 +498,8 @@ static int32_t taosAddServerCfg(SConfig *pCfg) { if (cfgAddBool(pCfg, "disableStream", tsDisableStream, 0) != 0) return -1; + if (cfgAddInt32(pCfg, "cacheLazyLoadThreshold", tsCacheLazyLoadThreshold, 0, 100000, 0) != 0) return -1; + GRANT_CFG_ADD; return 0; } @@ -824,6 +827,8 @@ static int32_t taosSetServerCfg(SConfig *pCfg) { tsQueryBufferSizeBytes = tsQueryBufferSize * 1048576UL; } + tsCacheLazyLoadThreshold = cfgGetItem(pCfg, "cacheLazyLoadThreshold")->i32; + tsDisableStream = cfgGetItem(pCfg, "disableStream")->bval; GRANT_CFG_GET; diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 9ad7c72bc0..3c3f3a0260 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -1070,7 +1070,8 @@ int32_t tSerializeSStatusReq(void *buf, int32_t bufLen, SStatusReq *pReq) { if (tEncodeI64(&encoder, pload->totalStorage) < 0) return -1; if (tEncodeI64(&encoder, pload->compStorage) < 0) return -1; if (tEncodeI64(&encoder, pload->pointsWritten) < 0) return -1; - if (tEncodeI64(&encoder, reserved) < 0) return -1; + if (tEncodeI32(&encoder, pload->numOfCachedTables) < 0) return -1; + if (tEncodeI32(&encoder, reserved) < 0) return -1; if (tEncodeI64(&encoder, reserved) < 0) return -1; if (tEncodeI64(&encoder, reserved) < 0) return -1; } @@ -1148,7 +1149,8 @@ int32_t tDeserializeSStatusReq(void *buf, int32_t bufLen, SStatusReq *pReq) { if (tDecodeI64(&decoder, &vload.totalStorage) < 0) return -1; if (tDecodeI64(&decoder, &vload.compStorage) < 0) return -1; if (tDecodeI64(&decoder, &vload.pointsWritten) < 0) return -1; - if (tDecodeI64(&decoder, &reserved) < 0) return -1; + if (tDecodeI32(&decoder, &vload.numOfCachedTables) < 0) return -1; + if (tDecodeI32(&decoder, (int32_t*)&reserved) < 0) return -1; if (tDecodeI64(&decoder, &reserved) < 0) return -1; if (tDecodeI64(&decoder, &reserved) < 0) return -1; if (taosArrayPush(pReq->pVloads, &vload) == NULL) { diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index ebe96fd740..dfc3b3fde8 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -359,6 +359,7 @@ typedef struct { int8_t replica; SVnodeGid vnodeGid[TSDB_MAX_REPLICA]; void* pTsma; + int32_t numOfCachedTables; } SVgObj; typedef struct { diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index 1d9db37a7d..adeae45314 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -412,6 +412,7 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) { if (pVgroup != NULL) { if (pVload->syncState == TAOS_SYNC_STATE_LEADER) { pVgroup->cacheUsage = pVload->cacheUsage; + pVgroup->numOfCachedTables = pVload->numOfCachedTables; pVgroup->numOfTables = pVload->numOfTables; pVgroup->numOfTimeSeries = pVload->numOfTimeSeries; pVgroup->totalStorage = pVload->totalStorage; @@ -440,7 +441,8 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) { if (roleChanged) { SDbObj *pDb = mndAcquireDb(pMnode, pVgroup->dbName); if (pDb != NULL && pDb->stateTs != curMs) { - mInfo("db:%s, stateTs changed by status msg, old stateTs:%" PRId64 " new stateTs:%" PRId64, pDb->name, pDb->stateTs, curMs); + mInfo("db:%s, stateTs changed by status msg, old stateTs:%" PRId64 " new stateTs:%" PRId64, pDb->name, + pDb->stateTs, curMs); pDb->stateTs = curMs; } mndReleaseDb(pMnode, pDb); diff --git a/source/dnode/mnode/impl/src/mndVgroup.c b/source/dnode/mnode/impl/src/mndVgroup.c index 84e8a9ec43..b747755acc 100644 --- a/source/dnode/mnode/impl/src/mndVgroup.c +++ b/source/dnode/mnode/impl/src/mndVgroup.c @@ -803,6 +803,9 @@ static int32_t mndRetrieveVgroups(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *p int32_t cacheUsage = (int32_t)pVgroup->cacheUsage; colDataSetVal(pColInfo, numOfRows, (const char *)&cacheUsage, false); + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + colDataSetVal(pColInfo, numOfRows, (const char *)&pVgroup->numOfCachedTables, false); + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); colDataSetVal(pColInfo, numOfRows, (const char *)&pVgroup->isTsma, false); diff --git a/source/dnode/vnode/src/inc/tsdb.h b/source/dnode/vnode/src/inc/tsdb.h index 2dec38240e..0b38ce6d24 100644 --- a/source/dnode/vnode/src/inc/tsdb.h +++ b/source/dnode/vnode/src/inc/tsdb.h @@ -706,6 +706,7 @@ typedef struct SMergeTree { bool destroyLoadInfo; SSttBlockLoadInfo *pLoadInfo; const char *idStr; + bool ignoreEarlierTs; } SMergeTree; typedef struct { @@ -751,6 +752,7 @@ int32_t tMergeTreeOpen(SMergeTree *pMTree, int8_t backward, SDataFReader *pFRead bool destroyLoadInfo, const char *idStr, bool strictTimeRange); void tMergeTreeAddIter(SMergeTree *pMTree, SLDataIter *pIter); bool tMergeTreeNext(SMergeTree *pMTree); +bool tMergeTreeIgnoreEarlierTs(SMergeTree *pMTree); TSDBROW tMergeTreeGetRow(SMergeTree *pMTree); void tMergeTreeClose(SMergeTree *pMTree); diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index e68b3589fc..ab94a5e1c7 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -637,6 +637,11 @@ static int32_t getNextRowFromFSLast(void *iter, TSDBROW **ppRow, bool *pIgnoreEa state->pMergeTree = &state->mergeTree; bool hasVal = tMergeTreeNext(&state->mergeTree); if (!hasVal) { + if (tMergeTreeIgnoreEarlierTs(&state->mergeTree)) { + *pIgnoreEarlierTs = true; + *ppRow = NULL; + return code; + } state->state = SFSLASTNEXTROW_FILESET; goto _next_fileset; } diff --git a/source/dnode/vnode/src/tsdb/tsdbCacheRead.c b/source/dnode/vnode/src/tsdb/tsdbCacheRead.c index 1d78622a61..e4c23c295a 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCacheRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbCacheRead.c @@ -332,6 +332,7 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32 // retrieve the only one last row of all tables in the uid list. if (HASTYPE(pr->type, CACHESCAN_RETRIEVE_TYPE_SINGLE)) { + int64_t st = taosGetTimestampUs(); for (int32_t i = 0; i < pr->numOfTables; ++i) { STableKeyInfo* pKeyInfo = &pr->pTableList[i]; @@ -407,8 +408,10 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32 } if (hasNotNullRow) { - pr->lastTs = minTs; - tsdbInfo("%p have cache read %d tables", pr, i + 1); + double cost = (taosGetTimestampUs() - st) / 1000.0; + if (cost > tsCacheLazyLoadThreshold) { + pr->lastTs = minTs; + } } } @@ -418,8 +421,6 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32 if (hasRes) { saveOneRow(pLastCols, pResBlock, pr, slotIds, pRes, pr->idstr); } - - tsdbInfo("have cached %d tables", taosLRUCacheGetElems(lruCache)); } else if (HASTYPE(pr->type, CACHESCAN_RETRIEVE_TYPE_ALL)) { for (int32_t i = pr->tableIndex; i < pr->numOfTables; ++i) { STableKeyInfo* pKeyInfo = &pr->pTableList[i]; diff --git a/source/dnode/vnode/src/tsdb/tsdbMergeTree.c b/source/dnode/vnode/src/tsdb/tsdbMergeTree.c index af4eb9626e..943b16116c 100644 --- a/source/dnode/vnode/src/tsdb/tsdbMergeTree.c +++ b/source/dnode/vnode/src/tsdb/tsdbMergeTree.c @@ -29,6 +29,7 @@ struct SLDataIter { STimeWindow timeWindow; SVersionRange verRange; SSttBlockLoadInfo *pBlockLoadInfo; + bool ignoreEarlierTs; }; SSttBlockLoadInfo *tCreateLastBlockLoadInfo(STSchema *pSchema, int16_t *colList, int32_t numOfCols, @@ -351,6 +352,7 @@ int32_t tLDataIterOpen(struct SLDataIter **pIter, SDataFReader *pReader, int32_t if (backward && ((strictTimeRange && (*pIter)->pSttBlk->maxKey <= (*pIter)->timeWindow.skey) || (!strictTimeRange && (*pIter)->pSttBlk->maxKey < (*pIter)->timeWindow.skey))) { (*pIter)->pSttBlk = NULL; + (*pIter)->ignoreEarlierTs = true; } } @@ -581,6 +583,7 @@ int32_t tMergeTreeOpen(SMergeTree *pMTree, int8_t backward, SDataFReader *pFRead pMTree->pLoadInfo = pBlockLoadInfo; pMTree->destroyLoadInfo = destroyLoadInfo; + pMTree->ignoreEarlierTs = false; for (int32_t i = 0; i < pFReader->pSet->nSttF; ++i) { // open all last file struct SLDataIter *pIter = NULL; @@ -595,6 +598,9 @@ int32_t tMergeTreeOpen(SMergeTree *pMTree, int8_t backward, SDataFReader *pFRead taosArrayPush(pMTree->pIterList, &pIter); tMergeTreeAddIter(pMTree, pIter); } else { + if (!pMTree->ignoreEarlierTs) { + pMTree->ignoreEarlierTs = pIter->ignoreEarlierTs; + } tLDataIterClose(pIter); } } @@ -608,6 +614,8 @@ _end: void tMergeTreeAddIter(SMergeTree *pMTree, SLDataIter *pIter) { tRBTreePut(&pMTree->rbt, (SRBTreeNode *)pIter); } +bool tMergeTreeIgnoreEarlierTs(SMergeTree *pMTree) { return pMTree->ignoreEarlierTs; } + bool tMergeTreeNext(SMergeTree *pMTree) { int32_t code = TSDB_CODE_SUCCESS; if (pMTree->pIter) { diff --git a/source/dnode/vnode/src/vnd/vnodeQuery.c b/source/dnode/vnode/src/vnd/vnodeQuery.c index d7e9c72a91..303d2a9ca4 100644 --- a/source/dnode/vnode/src/vnd/vnodeQuery.c +++ b/source/dnode/vnode/src/vnd/vnodeQuery.c @@ -382,7 +382,7 @@ int32_t vnodeGetLoad(SVnode *pVnode, SVnodeLoad *pLoad) { pLoad->syncRestore = state.restored; pLoad->syncCanRead = state.canRead; pLoad->cacheUsage = tsdbCacheGetUsage(pVnode); - pLoad->numOfCacheTables = tsdbCacheGetElems(pVnode); + pLoad->numOfCachedTables = tsdbCacheGetElems(pVnode); pLoad->numOfTables = metaGetTbNum(pVnode->pMeta); pLoad->numOfTimeSeries = metaGetTimeSeriesNum(pVnode->pMeta); pLoad->totalStorage = (int64_t)3 * 1073741824; From b91b7a72113a779bdaa87628fa4a700808f18115 Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Mon, 13 Mar 2023 17:43:34 +0800 Subject: [PATCH 150/154] enh: refactor error msgs, i.e. Sync not leader and Sync is restoring --- source/util/src/terror.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/util/src/terror.c b/source/util/src/terror.c index a6a26988d9..61071796df 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -412,7 +412,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_TABLE_LIMITED, "Table creation limite // sync TAOS_DEFINE_ERROR(TSDB_CODE_SYN_TIMEOUT, "Sync timeout") TAOS_DEFINE_ERROR(TSDB_CODE_SYN_IS_LEADER, "Sync is leader") -TAOS_DEFINE_ERROR(TSDB_CODE_SYN_NOT_LEADER, "Sync not leader") +TAOS_DEFINE_ERROR(TSDB_CODE_SYN_NOT_LEADER, "Sync leader is unreachable") TAOS_DEFINE_ERROR(TSDB_CODE_SYN_ONE_REPLICA, "Sync one replica") TAOS_DEFINE_ERROR(TSDB_CODE_SYN_NOT_IN_NEW_CONFIG, "Sync not in new config") TAOS_DEFINE_ERROR(TSDB_CODE_SYN_NEW_CONFIG_ERROR, "Sync new config error") @@ -420,7 +420,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_SYN_RECONFIG_NOT_READY, "Sync not ready for re TAOS_DEFINE_ERROR(TSDB_CODE_SYN_PROPOSE_NOT_READY, "Sync not ready for propose") TAOS_DEFINE_ERROR(TSDB_CODE_SYN_STANDBY_NOT_READY, "Sync not ready for standby") TAOS_DEFINE_ERROR(TSDB_CODE_SYN_BATCH_ERROR, "Sync batch error") -TAOS_DEFINE_ERROR(TSDB_CODE_SYN_RESTORING, "Sync is restoring") +TAOS_DEFINE_ERROR(TSDB_CODE_SYN_RESTORING, "Sync leader is restoring") TAOS_DEFINE_ERROR(TSDB_CODE_SYN_INVALID_SNAPSHOT_MSG, "Sync invalid snapshot msg") TAOS_DEFINE_ERROR(TSDB_CODE_SYN_BUFFER_FULL, "Sync buffer is full") TAOS_DEFINE_ERROR(TSDB_CODE_SYN_INTERNAL_ERROR, "Sync internal error") From 66f7b90110a19ca9f1cec2af86b02c9de5296b51 Mon Sep 17 00:00:00 2001 From: slzhou Date: Mon, 13 Mar 2023 18:16:44 +0800 Subject: [PATCH 151/154] fix: add version to udfd conn req --- source/libs/function/src/udfd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/libs/function/src/udfd.c b/source/libs/function/src/udfd.c index dc6fc3ad74..c368788243 100644 --- a/source/libs/function/src/udfd.c +++ b/source/libs/function/src/udfd.c @@ -21,6 +21,7 @@ #include "tudf.h" #include "tudfInt.h" +#include "version.h" #include "tdatablock.h" #include "tdataformat.h" @@ -527,6 +528,7 @@ int32_t udfdConnectToMnode() { tstrncpy(connReq.passwd, pass, sizeof(connReq.passwd)); connReq.pid = taosGetPId(); connReq.startTime = taosGetTimestampMs(); + strcpy(connReq.sVer, version); int32_t contLen = tSerializeSConnectReq(NULL, 0, &connReq); void *pReq = rpcMallocCont(contLen); From 1870a9d46ea32486449ccf1371e96dee08ddd09b Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Mon, 13 Mar 2023 19:14:53 +0800 Subject: [PATCH 152/154] feat: show vgroup display num of cache tables --- tests/system-test/2-query/odbc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system-test/2-query/odbc.py b/tests/system-test/2-query/odbc.py index f26f0abda0..9bbff4af21 100644 --- a/tests/system-test/2-query/odbc.py +++ b/tests/system-test/2-query/odbc.py @@ -22,7 +22,7 @@ class TDTestCase: tdSql.execute("insert into db.ctb using db.stb tags(1) (ts, c1) values (now, 1)") tdSql.query("select count(*) from information_schema.ins_columns") - tdSql.checkData(0, 0, 271) + tdSql.checkData(0, 0, 272) tdSql.query("select * from information_schema.ins_columns where table_name = 'ntb'") tdSql.checkRows(14) From fb855f8aace509727a312e700c57ff51bf22c0d9 Mon Sep 17 00:00:00 2001 From: xinsheng Ren <285808407@qq.com> Date: Tue, 14 Mar 2023 13:41:08 +0800 Subject: [PATCH 153/154] Feature/xsren/win install error base main (#20450) * fix: install service path error on windows * fix: installation action sheet name --------- Co-authored-by: facetosea <25808407@qq.com> --- packaging/tools/tdengine.iss | 6 +++--- packaging/tools/windows_before_install.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packaging/tools/tdengine.iss b/packaging/tools/tdengine.iss index 02f412f5d4..8676fa2c51 100644 --- a/packaging/tools/tdengine.iss +++ b/packaging/tools/tdengine.iss @@ -21,7 +21,7 @@ [Setup] VersionInfoVersion={#MyAppVersion} AppId={{A0F7A93C-79C4-485D-B2B8-F0D03DF42FAB} -AppName={#MyAppName} +AppName={#CusName} AppVersion={#MyAppVersion} ;AppVerName={#MyAppName} {#MyAppVersion} AppPublisher={#MyAppPublisher} @@ -64,8 +64,8 @@ Source: {#MyAppSourceDir}\taosdump.exe; DestDir: "{app}"; DestName: "{#CusPrompt [run] -Filename: {sys}\sc.exe; Parameters: "create taosd start= DEMAND binPath= ""C:\\{#CusName}\\taosd.exe --win_service""" ; Flags: runhidden -Filename: {sys}\sc.exe; Parameters: "create taosadapter start= DEMAND binPath= ""C:\\{#CusName}\\taosadapter.exe""" ; Flags: runhidden +Filename: {sys}\sc.exe; Parameters: "create taosd start= DEMAND binPath= ""C:\\TDengine\\taosd.exe --win_service""" ; Flags: runhidden +Filename: {sys}\sc.exe; Parameters: "create taosadapter start= DEMAND binPath= ""C:\\TDengine\\taosadapter.exe""" ; Flags: runhidden [UninstallRun] RunOnceId: "stoptaosd"; Filename: {sys}\sc.exe; Parameters: "stop taosd" ; Flags: runhidden diff --git a/packaging/tools/windows_before_install.txt b/packaging/tools/windows_before_install.txt index ef783bf10b..91cb35d77e 100644 --- a/packaging/tools/windows_before_install.txt +++ b/packaging/tools/windows_before_install.txt @@ -1,4 +1,4 @@ -TDengine is a high-efficient, scalable, high-available distributed time-series database, which makes a lot of optimizations on inserting and querying data, which is far more efficient than normal regular databases. So TDengine can meet the high requirements of IOT and other areas on storing and querying a large amount of data. +TDengine is an open-source, cloud-native time-series database optimized for Internet of Things (IoT), Connected Cars, and Industrial IoT. With its built-in caching, stream processing, and data subscription capabilities, TDengine offers a simplified solution for time-series data processing. TDengine will be installed under C:\TDengine, users can modify configuration file C:\TDengine\cfg\taos.cfg, set the log file path or other parameters. To start/stop TDengine with administrator privileges: sc start/stop taosd From 40d99e457646d385c84e7a2b7f0cb1069e8b95dd Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Tue, 14 Mar 2023 13:47:41 +0800 Subject: [PATCH 154/154] chore: support cus name (#20441) * chore: support cus name * fix: cfg/taos.cfg * chore: update taos-tools --- cmake/taostools_CMakeLists.txt.in | 2 +- packaging/cfg/taos.cfg | 10 ++-- packaging/debRpmAutoInstall.sh | 8 +-- packaging/testpackage.sh | 74 +++++++++++------------ packaging/tools/install.sh | 98 +++++++++++++++---------------- packaging/tools/install_client.sh | 2 +- packaging/tools/make_install.sh | 20 +++---- packaging/tools/makeclient.sh | 2 +- packaging/tools/makepkg.sh | 22 +++---- packaging/tools/post.sh | 2 +- packaging/tools/release_note | 2 +- packaging/tools/repair_link.sh | 8 +-- 12 files changed, 125 insertions(+), 125 deletions(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index 1d06995380..d14efcfee3 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG 41affde + GIT_TAG ad1a32b SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE diff --git a/packaging/cfg/taos.cfg b/packaging/cfg/taos.cfg index 3d3dfc8e73..a98dc5a236 100644 --- a/packaging/cfg/taos.cfg +++ b/packaging/cfg/taos.cfg @@ -1,19 +1,19 @@ ######################################################## # # -# TDengine Configuration # +# Configuration # # Any questions, please email support@taosdata.com # # # ######################################################## ######### 0. Client only configurations ############# -# The interval for TDengine CLI to send heartbeat to mnode +# The interval for CLI to send heartbeat to mnode # shellActivityTimer 3 ############### 1. Cluster End point ############################ -# The end point of the first dnode in the cluster to be connected to when this dnode or a TDengine CLI `taos` is started +# The end point of the first dnode in the cluster to be connected to when this dnode or a CLI `taos` is started # firstEp hostname:6030 # The end point of the second dnode to be connected to if the firstEp is not available @@ -40,10 +40,10 @@ # temporary file's directory, if you are using Windows platform please change to Windows path # tempDir /tmp/ -# Switch for allowing TDengine to collect and report service usage information +# Switch for allowing to collect and report service usage information # telemetryReporting 1 -# Switch for allowing TDengine to collect and report crash information +# Switch for allowing to collect and report crash information # crashReporting 1 # The maximum number of vnodes supported by this dnode diff --git a/packaging/debRpmAutoInstall.sh b/packaging/debRpmAutoInstall.sh index 3579f813e5..2fe18fd7a9 100755 --- a/packaging/debRpmAutoInstall.sh +++ b/packaging/debRpmAutoInstall.sh @@ -1,15 +1,15 @@ #!/usr/bin/expect -set packgeName [lindex $argv 0] +set packageName [lindex $argv 0] set packageSuffix [lindex $argv 1] set timeout 3 if { ${packageSuffix} == "deb" } { - spawn dpkg -i ${packgeName} + spawn dpkg -i ${packageName} } elseif { ${packageSuffix} == "rpm"} { - spawn rpm -ivh ${packgeName} + spawn rpm -ivh ${packageName} } expect "*one:" send "\r" expect "*skip:" send "\r" -expect eof \ No newline at end of file +expect eof diff --git a/packaging/testpackage.sh b/packaging/testpackage.sh index 78d5043b0c..9959d290e7 100755 --- a/packaging/testpackage.sh +++ b/packaging/testpackage.sh @@ -25,7 +25,7 @@ sourcePath="nas" cpuType="x64" lite="true" packageType="tar" -subFile="taos.tar.gz" +subFile="package.tar.gz" while getopts "m:c:f:l:s:o:t:v:h" opt; do case $opt in m) @@ -79,9 +79,9 @@ GREEN_UNDERLINE='\033[4;32m' NC='\033[0m' if [[ ${verMode} = "enterprise" ]];then - prePackag="TDengine-enterprise-${testFile}" + prePackage="TDengine-enterprise-${testFile}" elif [ ${verMode} = "community" ];then - prePackag="TDengine-${testFile}" + prePackage="TDengine-${testFile}" fi if [ ${lite} = "true" ];then packageLite="-Lite" @@ -92,10 +92,10 @@ if [[ "$packageType" = "tar" ]] ;then packageType="tar.gz" fi -tdPath="${prePackag}-${version}" -originTdpPath="${prePackag}-${originversion}" +tdPath="${prePackage}-${version}" +originTdpPath="${prePackage}-${originversion}" -packgeName="${tdPath}-Linux-${cpuType}${packageLite}.${packageType}" +packageName="${tdPath}-Linux-${cpuType}${packageLite}.${packageType}" originPackageName="${originTdpPath}-Linux-${cpuType}${packageLite}.${packageType}" if [ "$testFile" == "server" ] ;then @@ -105,13 +105,13 @@ elif [ ${testFile} = "client" ];then elif [ ${testFile} = "tools" ];then tdPath="taosTools-${version}" originTdpPath="taosTools-${originversion}" - packgeName="${tdPath}-Linux-${cpuType}${packageLite}.${packageType}" + packageName="${tdPath}-Linux-${cpuType}${packageLite}.${packageType}" originPackageName="${originTdpPath}-Linux-${cpuType}${packageLite}.${packageType}" - installCmd="install-taostools.sh" + installCmd="install-tools.sh" fi -echo "tdPath:${tdPath},originTdpPath:${originTdpPath},packgeName:${packgeName},originPackageName:${originPackageName}" +echo "tdPath:${tdPath},originTdpPath:${originTdpPath},packageName:${packageName},originPackageName:${originPackageName}" function cmdInstall { command=$1 if command -v ${command} ;then @@ -206,7 +206,7 @@ else fi -if [[ ${packgeName} =~ "server" ]] ;then +if [[ ${packageName} =~ "server" ]] ;then echoColor BD " pkill -9 taosd " pkill -9 taosd fi @@ -232,25 +232,25 @@ if [ -d ${installPath}/${tdPath} ] ;then fi echoColor G "===== download installPackage =====" -cd ${installPath} && wgetFile ${packgeName} ${version} ${sourcePath} +cd ${installPath} && wgetFile ${packageName} ${version} ${sourcePath} cd ${oriInstallPath} && wgetFile ${originPackageName} ${originversion} ${sourcePath} cd ${installPath} cp -r ${scriptDir}/debRpmAutoInstall.sh . -packageSuffix=$(echo ${packgeName} | awk -F '.' '{print $NF}') +packageSuffix=$(echo ${packageName} | awk -F '.' '{print $NF}') if [ ! -f debRpmAutoInstall.sh ];then echo '#!/usr/bin/expect ' > debRpmAutoInstall.sh - echo 'set packgeName [lindex $argv 0]' >> debRpmAutoInstall.sh + echo 'set packageName [lindex $argv 0]' >> debRpmAutoInstall.sh echo 'set packageSuffix [lindex $argv 1]' >> debRpmAutoInstall.sh echo 'set timeout 3 ' >> debRpmAutoInstall.sh echo 'if { ${packageSuffix} == "deb" } {' >> debRpmAutoInstall.sh - echo ' spawn dpkg -i ${packgeName} ' >> debRpmAutoInstall.sh + echo ' spawn dpkg -i ${packageName} ' >> debRpmAutoInstall.sh echo '} elseif { ${packageSuffix} == "rpm"} {' >> debRpmAutoInstall.sh - echo ' spawn rpm -ivh ${packgeName}' >> debRpmAutoInstall.sh + echo ' spawn rpm -ivh ${packageName}' >> debRpmAutoInstall.sh echo '}' >> debRpmAutoInstall.sh echo 'expect "*one:"' >> debRpmAutoInstall.sh echo 'send "\r"' >> debRpmAutoInstall.sh @@ -261,25 +261,25 @@ fi echoColor G "===== instal Package =====" -if [[ ${packgeName} =~ "deb" ]];then +if [[ ${packageName} =~ "deb" ]];then cd ${installPath} dpkg -r taostools dpkg -r tdengine - if [[ ${packgeName} =~ "TDengine" ]];then - echoColor BD "./debRpmAutoInstall.sh ${packgeName} ${packageSuffix}" && chmod 755 debRpmAutoInstall.sh && ./debRpmAutoInstall.sh ${packgeName} ${packageSuffix} + if [[ ${packageName} =~ "TDengine" ]];then + echoColor BD "./debRpmAutoInstall.sh ${packageName} ${packageSuffix}" && chmod 755 debRpmAutoInstall.sh && ./debRpmAutoInstall.sh ${packageName} ${packageSuffix} else - echoColor BD "dpkg -i ${packgeName}" && dpkg -i ${packgeName} + echoColor BD "dpkg -i ${packageName}" && dpkg -i ${packageName} fi -elif [[ ${packgeName} =~ "rpm" ]];then +elif [[ ${packageName} =~ "rpm" ]];then cd ${installPath} sudo rpm -e tdengine sudo rpm -e taostools - if [[ ${packgeName} =~ "TDengine" ]];then - echoColor BD "./debRpmAutoInstall.sh ${packgeName} ${packageSuffix}" && chmod 755 debRpmAutoInstall.sh && ./debRpmAutoInstall.sh ${packgeName} ${packageSuffix} + if [[ ${packageName} =~ "TDengine" ]];then + echoColor BD "./debRpmAutoInstall.sh ${packageName} ${packageSuffix}" && chmod 755 debRpmAutoInstall.sh && ./debRpmAutoInstall.sh ${packageName} ${packageSuffix} else - echoColor BD "rpm -ivh ${packgeName}" && rpm -ivh ${packgeName} + echoColor BD "rpm -ivh ${packageName}" && rpm -ivh ${packageName} fi -elif [[ ${packgeName} =~ "tar" ]];then +elif [[ ${packageName} =~ "tar" ]];then echoColor G "===== check installPackage File of tar =====" cd ${oriInstallPath} if [ ! -f {originPackageName} ];then @@ -290,7 +290,7 @@ elif [[ ${packgeName} =~ "tar" ]];then echoColor BD "tar -xf ${originPackageName}" && tar -xf ${originPackageName} cd ${installPath} echoColor YD "unzip the new installation package" - echoColor BD "tar -xf ${packgeName}" && tar -xf ${packgeName} + echoColor BD "tar -xf ${packageName}" && tar -xf ${packageName} if [ ${testFile} != "tools" ] ;then cd ${installPath}/${tdPath} && tar xf ${subFile} @@ -326,15 +326,15 @@ fi cd ${installPath} -if [[ ${packgeName} =~ "Lite" ]] || ([[ ${packgeName} =~ "x64" ]] && [[ ${packgeName} =~ "client" ]]) || ([[ ${packgeName} =~ "deb" ]] && [[ ${packgeName} =~ "server" ]]) || ([[ ${packgeName} =~ "rpm" ]] && [[ ${packgeName} =~ "server" ]]) ;then +if [[ ${packageName} =~ "Lite" ]] || ([[ ${packageName} =~ "x64" ]] && [[ ${packageName} =~ "client" ]]) || ([[ ${packageName} =~ "deb" ]] && [[ ${packageName} =~ "server" ]]) || ([[ ${packageName} =~ "rpm" ]] && [[ ${packageName} =~ "server" ]]) ;then echoColor G "===== install taos-tools when package is lite or client =====" cd ${installPath} if [ ! -f "taosTools-2.1.3-Linux-x64.tar.gz " ];then wgetFile taosTools-2.1.3-Linux-x64.tar.gz v2.1.3 web tar xf taosTools-2.1.3-Linux-x64.tar.gz fi - cd taosTools-2.1.3 && bash install-taostools.sh -elif ([[ ${packgeName} =~ "arm64" ]] && [[ ${packgeName} =~ "client" ]]);then + cd taosTools-2.1.3 && bash install-tools.sh +elif ([[ ${packageName} =~ "arm64" ]] && [[ ${packageName} =~ "client" ]]);then echoColor G "===== install taos-tools arm when package is arm64-client =====" cd ${installPath} if [ ! -f "taosTools-2.1.3-Linux-x64.tar.gz " ];then @@ -342,37 +342,37 @@ elif ([[ ${packgeName} =~ "arm64" ]] && [[ ${packgeName} =~ "client" ]]);then tar xf taosTools-2.1.3-Linux-arm64.tar.gz fi - cd taosTools-2.1.3 && bash install-taostools.sh + cd taosTools-2.1.3 && bash install-tools.sh fi echoColor G "===== start TDengine =====" -if [[ ${packgeName} =~ "server" ]] ;then +if [[ ${packageName} =~ "server" ]] ;then echoColor BD " rm -rf /var/lib/taos/* && systemctl restart taosd " rm -rf /var/lib/taos/* systemctl restart taosd fi -rm -rf ${installPath}/${packgeName} +rm -rf ${installPath}/${packageName} rm -rf ${installPath}/${tdPath}/ -# if ([[ ${packgeName} =~ "Lite" ]] && [[ ${packgeName} =~ "tar" ]]) || [[ ${packgeName} =~ "client" ]] ;then +# if ([[ ${packageName} =~ "Lite" ]] && [[ ${packageName} =~ "tar" ]]) || [[ ${packageName} =~ "client" ]] ;then # echoColor G "===== install taos-tools when package is lite or client =====" # cd ${installPath} # wgetFile taosTools-2.1.2-Linux-x64.tar.gz . # tar xf taosTools-2.1.2-Linux-x64.tar.gz -# cd taosTools-2.1.2 && bash install-taostools.sh -# elif [[ ${packgeName} =~ "Lite" ]] && [[ ${packgeName} =~ "deb" ]] ;then +# cd taosTools-2.1.2 && bash install-tools.sh +# elif [[ ${packageName} =~ "Lite" ]] && [[ ${packageName} =~ "deb" ]] ;then # echoColor G "===== install taos-tools when package is lite or client =====" # cd ${installPath} # wgetFile taosTools-2.1.2-Linux-x64.tar.gz . # tar xf taosTools-2.1.2-Linux-x64.tar.gz -# cd taosTools-2.1.2 && bash install-taostools.sh -# elif [[ ${packgeName} =~ "Lite" ]] && [[ ${packgeName} =~ "rpm" ]] ;then +# cd taosTools-2.1.2 && bash install-tools.sh +# elif [[ ${packageName} =~ "Lite" ]] && [[ ${packageName} =~ "rpm" ]] ;then # echoColor G "===== install taos-tools when package is lite or client =====" # cd ${installPath} # wgetFile taosTools-2.1.2-Linux-x64.tar.gz . # tar xf taosTools-2.1.2-Linux-x64.tar.gz -# cd taosTools-2.1.2 && bash install-taostools.sh +# cd taosTools-2.1.2 && bash install-tools.sh # fi diff --git a/packaging/tools/install.sh b/packaging/tools/install.sh index 2495e177e1..a3f8b53d33 100755 --- a/packaging/tools/install.sh +++ b/packaging/tools/install.sh @@ -24,7 +24,7 @@ productName="TDengine" emailName="taosdata.com" uninstallScript="rmtaos" historyFile="taos_history" -tarName="taos.tar.gz" +tarName="package.tar.gz" dataDir="/var/lib/taos" logDir="/var/log/taos" configDir="/etc/taos" @@ -222,24 +222,24 @@ function install_bin() { ${csudo}cp -r ${script_dir}/bin/* ${install_main_dir}/bin && ${csudo}chmod 0555 ${install_main_dir}/bin/* #Make link - [ -x ${install_main_dir}/bin/${clientName} ] && ${csudo}ln -s ${install_main_dir}/bin/${clientName} ${bin_link_dir}/${clientName} || : - [ -x ${install_main_dir}/bin/${serverName} ] && ${csudo}ln -s ${install_main_dir}/bin/${serverName} ${bin_link_dir}/${serverName} || : - [ -x ${install_main_dir}/bin/${udfdName} ] && ${csudo}ln -s ${install_main_dir}/bin/${udfdName} ${bin_link_dir}/${udfdName} || : - [ -x ${install_main_dir}/bin/${adapterName} ] && ${csudo}ln -s ${install_main_dir}/bin/${adapterName} ${bin_link_dir}/${adapterName} || : + [ -x ${install_main_dir}/bin/${clientName} ] && ${csudo}ln -sf ${install_main_dir}/bin/${clientName} ${bin_link_dir}/${clientName} || : + [ -x ${install_main_dir}/bin/${serverName} ] && ${csudo}ln -sf ${install_main_dir}/bin/${serverName} ${bin_link_dir}/${serverName} || : + [ -x ${install_main_dir}/bin/${udfdName} ] && ${csudo}ln -sf ${install_main_dir}/bin/${udfdName} ${bin_link_dir}/${udfdName} || : + [ -x ${install_main_dir}/bin/${adapterName} ] && ${csudo}ln -sf ${install_main_dir}/bin/${adapterName} ${bin_link_dir}/${adapterName} || : [ -x ${install_main_dir}/bin/${benchmarkName} ] && ${csudo}ln -sf ${install_main_dir}/bin/${benchmarkName} ${bin_link_dir}/${demoName} || : [ -x ${install_main_dir}/bin/${benchmarkName} ] && ${csudo}ln -sf ${install_main_dir}/bin/${benchmarkName} ${bin_link_dir}/${benchmarkName} || : - [ -x ${install_main_dir}/bin/${dumpName} ] && ${csudo}ln -s ${install_main_dir}/bin/${dumpName} ${bin_link_dir}/${dumpName} || : - [ -x ${install_main_dir}/bin/${xname} ] && ${csudo}ln -s ${install_main_dir}/bin/${xname} ${bin_link_dir}/${xname} || : - [ -x ${install_main_dir}/bin/${explorerName} ] && ${csudo}ln -s ${install_main_dir}/bin/${explorerName} ${bin_link_dir}/${explorerName} || : - [ -x ${install_main_dir}/bin/TDinsight.sh ] && ${csudo}ln -s ${install_main_dir}/bin/TDinsight.sh ${bin_link_dir}/TDinsight.sh || : - [ -x ${install_main_dir}/bin/remove.sh ] && ${csudo}ln -s ${install_main_dir}/bin/remove.sh ${bin_link_dir}/${uninstallScript} || : - [ -x ${install_main_dir}/bin/set_core.sh ] && ${csudo}ln -s ${install_main_dir}/bin/set_core.sh ${bin_link_dir}/set_core || : + [ -x ${install_main_dir}/bin/${dumpName} ] && ${csudo}ln -sf ${install_main_dir}/bin/${dumpName} ${bin_link_dir}/${dumpName} || : + [ -x ${install_main_dir}/bin/${xname} ] && ${csudo}ln -sf ${install_main_dir}/bin/${xname} ${bin_link_dir}/${xname} || : + [ -x ${install_main_dir}/bin/${explorerName} ] && ${csudo}ln -sf ${install_main_dir}/bin/${explorerName} ${bin_link_dir}/${explorerName} || : + [ -x ${install_main_dir}/bin/TDinsight.sh ] && ${csudo}ln -sf ${install_main_dir}/bin/TDinsight.sh ${bin_link_dir}/TDinsight.sh || : + [ -x ${install_main_dir}/bin/remove.sh ] && ${csudo}ln -sf ${install_main_dir}/bin/remove.sh ${bin_link_dir}/${uninstallScript} || : + [ -x ${install_main_dir}/bin/set_core.sh ] && ${csudo}ln -sf ${install_main_dir}/bin/set_core.sh ${bin_link_dir}/set_core || : if [ "$verMode" == "cluster" ] && [ "$clientName" != "$clientName2" ]; then - [ -x ${install_main_dir}/bin/${clientName} ] && ${csudo}ln -s ${install_main_dir}/bin/${clientName} ${bin_link_dir}/${clientName2} || : - [ -x ${install_main_dir}/bin/${benchmarkName} ] && ${csudo}ln -s ${install_main_dir}/bin/${benchmarkName} ${bin_link_dir}/${benchmarkName2} || : - [ -x ${install_main_dir}/bin/${dumpName} ] && ${csudo}ln -s ${install_main_dir}/bin/${dumpName} ${bin_link_dir}/${dumpName2} || : - [ -x ${install_main_dir}/bin/remove.sh ] && ${csudo}ln -s ${install_main_dir}/bin/remove.sh ${bin_link_dir}/${uninstallScript2} || : + [ -x ${install_main_dir}/bin/${clientName} ] && ${csudo}ln -sf ${install_main_dir}/bin/${clientName} ${bin_link_dir}/${clientName2} || : + [ -x ${install_main_dir}/bin/${benchmarkName} ] && ${csudo}ln -sf ${install_main_dir}/bin/${benchmarkName} ${bin_link_dir}/${benchmarkName2} || : + [ -x ${install_main_dir}/bin/${dumpName} ] && ${csudo}ln -sf ${install_main_dir}/bin/${dumpName} ${bin_link_dir}/${dumpName2} || : + [ -x ${install_main_dir}/bin/remove.sh ] && ${csudo}ln -sf ${install_main_dir}/bin/remove.sh ${bin_link_dir}/${uninstallScript2} || : fi } @@ -250,14 +250,14 @@ function install_lib() { #${csudo}rm -rf ${v15_java_app_dir} || : ${csudo}cp -rf ${script_dir}/driver/* ${install_main_dir}/driver && ${csudo}chmod 777 ${install_main_dir}/driver/* - ${csudo}ln -s ${install_main_dir}/driver/libtaos.* ${lib_link_dir}/libtaos.so.1 - ${csudo}ln -s ${lib_link_dir}/libtaos.so.1 ${lib_link_dir}/libtaos.so + ${csudo}ln -sf ${install_main_dir}/driver/libtaos.* ${lib_link_dir}/libtaos.so.1 + ${csudo}ln -sf ${lib_link_dir}/libtaos.so.1 ${lib_link_dir}/libtaos.so [ -f ${install_main_dir}/driver/libtaosws.so ] && ${csudo}ln -sf ${install_main_dir}/driver/libtaosws.so ${lib_link_dir}/libtaosws.so || : if [[ -d ${lib64_link_dir} && ! -e ${lib64_link_dir}/libtaos.so ]]; then - ${csudo}ln -s ${install_main_dir}/driver/libtaos.* ${lib64_link_dir}/libtaos.so.1 || : - ${csudo}ln -s ${lib64_link_dir}/libtaos.so.1 ${lib64_link_dir}/libtaos.so || : + ${csudo}ln -sf ${install_main_dir}/driver/libtaos.* ${lib64_link_dir}/libtaos.so.1 || : + ${csudo}ln -sf ${lib64_link_dir}/libtaos.so.1 ${lib64_link_dir}/libtaos.so || : [ -f ${install_main_dir}/libtaosws.so ] && ${csudo}ln -sf ${install_main_dir}/libtaosws.so ${lib64_link_dir}/libtaosws.so || : fi @@ -347,10 +347,10 @@ function install_header() { [ -f ${inc_link_dir}/taosws.h ] && ${csudo}rm -f ${inc_link_dir}/taosws.h || : ${csudo}cp -f ${script_dir}/inc/* ${install_main_dir}/include && ${csudo}chmod 644 ${install_main_dir}/include/* - ${csudo}ln -s ${install_main_dir}/include/taos.h ${inc_link_dir}/taos.h - ${csudo}ln -s ${install_main_dir}/include/taosdef.h ${inc_link_dir}/taosdef.h - ${csudo}ln -s ${install_main_dir}/include/taoserror.h ${inc_link_dir}/taoserror.h - ${csudo}ln -s ${install_main_dir}/include/taosudf.h ${inc_link_dir}/taosudf.h + ${csudo}ln -sf ${install_main_dir}/include/taos.h ${inc_link_dir}/taos.h + ${csudo}ln -sf ${install_main_dir}/include/taosdef.h ${inc_link_dir}/taosdef.h + ${csudo}ln -sf ${install_main_dir}/include/taoserror.h ${inc_link_dir}/taoserror.h + ${csudo}ln -sf ${install_main_dir}/include/taosudf.h ${inc_link_dir}/taosudf.h [ -f ${install_main_dir}/include/taosws.h ] && ${csudo}ln -sf ${install_main_dir}/include/taosws.h ${inc_link_dir}/taosws.h || : } @@ -511,7 +511,7 @@ function install_adapter_config() { fi [ -f ${cfg_install_dir}/${adapterName}.toml ] && - ${csudo}ln -s ${cfg_install_dir}/${adapterName}.toml ${install_main_dir}/cfg/${adapterName}.toml + ${csudo}ln -sf ${cfg_install_dir}/${adapterName}.toml ${install_main_dir}/cfg/${adapterName}.toml [ ! -z $1 ] && return 0 || : # only install client @@ -527,7 +527,7 @@ function install_config() { ${csudo}cp -f ${script_dir}/cfg/${configFile} ${cfg_install_dir}/${configFile}.new fi - ${csudo}ln -s ${cfg_install_dir}/${configFile} ${install_main_dir}/cfg + ${csudo}ln -sf ${cfg_install_dir}/${configFile} ${install_main_dir}/cfg [ ! -z $1 ] && return 0 || : # only install client @@ -573,13 +573,13 @@ function install_log() { ${csudo}rm -rf ${log_dir} || : ${csudo}mkdir -p ${log_dir} && ${csudo}chmod 777 ${log_dir} - ${csudo}ln -s ${log_dir} ${install_main_dir}/log + ${csudo}ln -sf ${log_dir} ${install_main_dir}/log } function install_data() { ${csudo}mkdir -p ${data_dir} - ${csudo}ln -s ${data_dir} ${install_main_dir}/data + ${csudo}ln -sf ${data_dir} ${install_main_dir}/data } function install_connector() { @@ -862,21 +862,21 @@ function updateProduct() { openresty_work=false echo - echo -e "${GREEN_DARK}To configure ${productName} ${NC}: edit ${cfg_install_dir}/${configFile}" + echo -e "${GREEN_DARK}To configure ${productName2} ${NC}: edit ${cfg_install_dir}/${configFile}" [ -f ${configDir}/taosadapter.toml ] && [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To configure Adapter ${NC}: edit ${configDir}/taosadapter.toml" + echo -e "${GREEN_DARK}To configure ${clientName2} Adapter ${NC}: edit ${configDir}/taosadapter.toml" if ((${service_mod} == 0)); then - echo -e "${GREEN_DARK}To start ${productName} ${NC}: ${csudo}systemctl start ${serverName}${NC}" + echo -e "${GREEN_DARK}To start ${productName2} ${NC}: ${csudo}systemctl start ${serverName}${NC}" [ -f ${service_config_dir}/taosadapter.service ] && [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To start Adatper ${NC}: ${csudo}systemctl start taosadapter ${NC}" + echo -e "${GREEN_DARK}To start ${clientName2} Adapter ${NC}: ${csudo}systemctl start taosadapter ${NC}" elif ((${service_mod} == 1)); then - echo -e "${GREEN_DARK}To start ${productName} ${NC}: ${csudo}service ${serverName} start${NC}" + echo -e "${GREEN_DARK}To start ${productName2} ${NC}: ${csudo}service ${serverName} start${NC}" [ -f ${service_config_dir}/taosadapter.service ] && [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To start Adapter ${NC}: ${csudo}service taosadapter start${NC}" + echo -e "${GREEN_DARK}To start ${clientName2} Adapter ${NC}: ${csudo}service taosadapter start${NC}" else - echo -e "${GREEN_DARK}To start ${productName} ${NC}: ./${serverName}${NC}" + echo -e "${GREEN_DARK}To start ${productName2} ${NC}: ./${serverName}${NC}" [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To start ${clientName} Adapter ${NC}: taosadapter &${NC}" + echo -e "${GREEN_DARK}To start ${clientName2} Adapter ${NC}: taosadapter &${NC}" fi if [ ${openresty_work} = 'true' ]; then @@ -887,7 +887,7 @@ function updateProduct() { if ((${prompt_force} == 1)); then echo "" - echo -e "${RED}Please run '${serverName} --force-keep-file' at first time for the exist ${productName} $exist_version!${NC}" + echo -e "${RED}Please run '${serverName} --force-keep-file' at first time for the exist ${productName2} $exist_version!${NC}" fi echo echo -e "\033[44;32;1m${productName2} is updated successfully!${NC}" @@ -944,21 +944,21 @@ function installProduct() { # Ask if to start the service echo - echo -e "${GREEN_DARK}To configure ${productName} ${NC}: edit ${cfg_install_dir}/${configFile}" + echo -e "${GREEN_DARK}To configure ${productName2} ${NC}: edit ${cfg_install_dir}/${configFile}" [ -f ${configDir}/taosadapter.toml ] && [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To configure Taos Adapter ${NC}: edit ${configDir}/taosadapter.toml" + echo -e "${GREEN_DARK}To configure ${clientName2} Adapter ${NC}: edit ${configDir}/taosadapter.toml" if ((${service_mod} == 0)); then - echo -e "${GREEN_DARK}To start ${productName} ${NC}: ${csudo}systemctl start ${serverName}${NC}" + echo -e "${GREEN_DARK}To start ${productName2} ${NC}: ${csudo}systemctl start ${serverName}${NC}" [ -f ${service_config_dir}/taosadapter.service ] && [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To start Taos Adatper ${NC}: ${csudo}systemctl start taosadapter ${NC}" + echo -e "${GREEN_DARK}To start ${clientName2} Adapter ${NC}: ${csudo}systemctl start taosadapter ${NC}" elif ((${service_mod} == 1)); then - echo -e "${GREEN_DARK}To start ${productName} ${NC}: ${csudo}service ${serverName} start${NC}" + echo -e "${GREEN_DARK}To start ${productName2} ${NC}: ${csudo}service ${serverName} start${NC}" [ -f ${service_config_dir}/taosadapter.service ] && [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To start Taos Adapter ${NC}: ${csudo}service taosadapter start${NC}" + echo -e "${GREEN_DARK}To start ${clientName2} Adapter ${NC}: ${csudo}service taosadapter start${NC}" else - echo -e "${GREEN_DARK}To start ${productName} ${NC}: ${serverName}${NC}" + echo -e "${GREEN_DARK}To start ${productName2} ${NC}: ${serverName}${NC}" [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To start Taos Adapter ${NC}: taosadapter &${NC}" + echo -e "${GREEN_DARK}To start ${clientName2} Adapter ${NC}: taosadapter &${NC}" fi if [ ! -z "$firstEp" ]; then @@ -970,24 +970,24 @@ function installProduct() { tmpPort="" fi if [[ "$tmpPort" != "" ]]; then - echo -e "${GREEN_DARK}To access ${productName} ${NC}: ${clientName} -h $tmpFqdn -P $tmpPort${GREEN_DARK} to login into cluster, then${NC}" + echo -e "${GREEN_DARK}To access ${productName2} ${NC}: ${clientName2} -h $tmpFqdn -P $tmpPort${GREEN_DARK} to login into cluster, then${NC}" else - echo -e "${GREEN_DARK}To access ${productName} ${NC}: ${clientName} -h $tmpFqdn${GREEN_DARK} to login into cluster, then${NC}" + echo -e "${GREEN_DARK}To access ${productName2} ${NC}: ${clientName2} -h $tmpFqdn${GREEN_DARK} to login into cluster, then${NC}" fi echo -e "${GREEN_DARK}execute ${NC}: create dnode 'newDnodeFQDN:port'; ${GREEN_DARK}to add this new node${NC}" echo elif [ ! -z "$serverFqdn" ]; then - echo -e "${GREEN_DARK}To access ${productName} ${NC}: ${clientName} -h $serverFqdn${GREEN_DARK} to login into ${productName} server${NC}" + echo -e "${GREEN_DARK}To access ${productName2} ${NC}: ${clientName2} -h $serverFqdn${GREEN_DARK} to login into ${productName2} server${NC}" echo fi - echo -e "\033[44;32;1m${productName} is installed successfully!${NC}" + echo -e "\033[44;32;1m${productName2} is installed successfully!${NC}" echo else # Only install client install_bin install_config echo - echo -e "\033[44;32;1m${productName} client is installed successfully!${NC}" + echo -e "\033[44;32;1m${productName2} client is installed successfully!${NC}" fi touch ~/.${historyFile} diff --git a/packaging/tools/install_client.sh b/packaging/tools/install_client.sh index 1543c59297..d941fbc0cb 100755 --- a/packaging/tools/install_client.sh +++ b/packaging/tools/install_client.sh @@ -17,7 +17,7 @@ serverName="taosd" clientName="taos" uninstallScript="rmtaos" configFile="taos.cfg" -tarName="taos.tar.gz" +tarName="package.tar.gz" osType=Linux pagMode=full diff --git a/packaging/tools/make_install.sh b/packaging/tools/make_install.sh index 5725560bd6..f6fc64d875 100755 --- a/packaging/tools/make_install.sh +++ b/packaging/tools/make_install.sh @@ -606,23 +606,23 @@ function update_TDengine() { echo -e "${GREEN_DARK}To configure ${productName} ${NC}: edit ${configDir}/${configFile}" [ -f ${configDir}/taosadapter.toml ] && [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To configure Taos Adapter ${NC}: edit ${configDir}/taosadapter.toml" + echo -e "${GREEN_DARK}To configure Adapter ${NC}: edit ${configDir}/taosadapter.toml" if ((${service_mod} == 0)); then echo -e "${GREEN_DARK}To start ${productName} ${NC}: ${csudo}systemctl start ${serverName}${NC}" [ -f ${service_config_dir}/taosadapter.service ] && [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To start Taos Adatper ${NC}: ${csudo}systemctl start taosadapter ${NC}" + echo -e "${GREEN_DARK}To start Adapter ${NC}: ${csudo}systemctl start taosadapter ${NC}" elif ((${service_mod} == 1)); then echo -e "${GREEN_DARK}To start ${productName} ${NC}: ${csudo}service ${serverName} start${NC}" [ -f ${service_config_dir}/taosadapter.service ] && [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To start Taos Adapter ${NC}: ${csudo}service taosadapter start${NC}" + echo -e "${GREEN_DARK}To start Adapter ${NC}: ${csudo}service taosadapter start${NC}" else if [ "$osType" != "Darwin" ]; then echo -e "${GREEN_DARK}To start ${productName} ${NC}: ${serverName}${NC}" [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To start Taos Adapter ${NC}: taosadapter &${NC}" + echo -e "${GREEN_DARK}To start Adapter ${NC}: taosadapter &${NC}" else echo -e "${GREEN_DARK}To start service ${NC}: launchctl start com.tdengine.taosd${NC}" - echo -e "${GREEN_DARK}To start Taos Adapter ${NC}: launchctl start com.tdengine.taosadapter${NC}" + echo -e "${GREEN_DARK}To start Adapter ${NC}: launchctl start com.tdengine.taosadapter${NC}" fi fi @@ -658,23 +658,23 @@ function install_TDengine() { echo echo -e "${GREEN_DARK}To configure ${productName} ${NC}: edit ${configDir}/${configFile}" [ -f ${configDir}/taosadapter.toml ] && [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To configure Taos Adapter ${NC}: edit ${configDir}/taosadapter.toml" + echo -e "${GREEN_DARK}To configure Adapter ${NC}: edit ${configDir}/taosadapter.toml" if ((${service_mod} == 0)); then echo -e "${GREEN_DARK}To start ${productName} ${NC}: ${csudo}systemctl start ${serverName}${NC}" [ -f ${service_config_dir}/taosadapter.service ] && [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To start Taos Adapter ${NC}: ${csudo}systemctl start taosadapter ${NC}" + echo -e "${GREEN_DARK}To start Adapter ${NC}: ${csudo}systemctl start taosadapter ${NC}" elif ((${service_mod} == 1)); then echo -e "${GREEN_DARK}To start ${productName} ${NC}: ${csudo}service ${serverName} start${NC}" [ -f ${service_config_dir}/taosadapter.service ] && [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To start Taos Adapter ${NC}: ${csudo}service taosadapter start${NC}" + echo -e "${GREEN_DARK}To start Adapter ${NC}: ${csudo}service taosadapter start${NC}" else if [ "$osType" != "Darwin" ]; then echo -e "${GREEN_DARK}To start ${productName} ${NC}: ${serverName}${NC}" [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To start Taos Adapter ${NC}: taosadapter &${NC}" + echo -e "${GREEN_DARK}To start Adapter ${NC}: taosadapter &${NC}" else echo -e "${GREEN_DARK}To start service ${NC}: launchctl start com.tdengine.taosd${NC}" - echo -e "${GREEN_DARK}To start Taos Adapter ${NC}: launchctl start com.tdengine.taosadapter${NC}" + echo -e "${GREEN_DARK}To start Adapter ${NC}: launchctl start com.tdengine.taosadapter${NC}" fi fi diff --git a/packaging/tools/makeclient.sh b/packaging/tools/makeclient.sh index 208bfc183c..f46de0f94b 100755 --- a/packaging/tools/makeclient.sh +++ b/packaging/tools/makeclient.sh @@ -24,7 +24,7 @@ clientName2="${12}" productName="TDengine" clientName="taos" configFile="taos.cfg" -tarName="taos.tar.gz" +tarName="package.tar.gz" if [ "$osType" != "Darwin" ]; then script_dir="$(dirname $(readlink -f $0))" diff --git a/packaging/tools/makepkg.sh b/packaging/tools/makepkg.sh index 7ad3cf7b0a..d71d5df47c 100755 --- a/packaging/tools/makepkg.sh +++ b/packaging/tools/makepkg.sh @@ -28,7 +28,7 @@ productName="TDengine" serverName="taosd" clientName="taos" configFile="taos.cfg" -tarName="taos.tar.gz" +tarName="package.tar.gz" dumpName="taosdump" benchmarkName="taosBenchmark" toolsName="taostools" @@ -171,22 +171,22 @@ if [ -n "${taostools_bin_files}" ]; then && cp ${taostools_bin_files} ${taostools_install_dir}/bin \ && chmod a+x ${taostools_install_dir}/bin/* || : - if [ -f ${top_dir}/tools/taos-tools/packaging/tools/install-taostools.sh ]; then - cp ${top_dir}/tools/taos-tools/packaging/tools/install-taostools.sh \ + if [ -f ${top_dir}/tools/taos-tools/packaging/tools/install-tools.sh ]; then + cp ${top_dir}/tools/taos-tools/packaging/tools/install-tools.sh \ ${taostools_install_dir}/ > /dev/null \ - && chmod a+x ${taostools_install_dir}/install-taostools.sh \ - || echo -e "failed to copy install-taostools.sh" + && chmod a+x ${taostools_install_dir}/install-tools.sh \ + || echo -e "failed to copy install-tools.sh" else - echo -e "install-taostools.sh not found" + echo -e "install-tools.sh not found" fi - if [ -f ${top_dir}/tools/taos-tools/packaging/tools/uninstall-taostools.sh ]; then - cp ${top_dir}/tools/taos-tools/packaging/tools/uninstall-taostools.sh \ + if [ -f ${top_dir}/tools/taos-tools/packaging/tools/uninstall-tools.sh ]; then + cp ${top_dir}/tools/taos-tools/packaging/tools/uninstall-tools.sh \ ${taostools_install_dir}/ > /dev/null \ - && chmod a+x ${taostools_install_dir}/uninstall-taostools.sh \ - || echo -e "failed to copy uninstall-taostools.sh" + && chmod a+x ${taostools_install_dir}/uninstall-tools.sh \ + || echo -e "failed to copy uninstall-tools.sh" else - echo -e "uninstall-taostools.sh not found" + echo -e "uninstall-tools.sh not found" fi if [ -f ${build_dir}/lib/libavro.so.23.0.0 ]; then diff --git a/packaging/tools/post.sh b/packaging/tools/post.sh index 78eb7f7587..9861806677 100755 --- a/packaging/tools/post.sh +++ b/packaging/tools/post.sh @@ -530,7 +530,7 @@ function install_service_on_sysvinit() { function clean_service_on_systemd() { taosd_service_config="${service_config_dir}/taosd.service" - # taosd service already is stoped before install in preinst script + # taosd service already is stopped before install in preinst script #if systemctl is-active --quiet taosd; then # echo "TDengine is running, stopping it..." # ${csudo}systemctl stop taosd &> /dev/null || echo &> /dev/null diff --git a/packaging/tools/release_note b/packaging/tools/release_note index 4578a4523c..81b09ba69c 100644 --- a/packaging/tools/release_note +++ b/packaging/tools/release_note @@ -72,7 +72,7 @@ New Features: taos-1.4.13 (Released on 2018-12-14) Bugs Fixed: - - Clients failed to connect to server due to unexpected and invalid packets recieved by the server. + - Clients failed to connect to server due to unexpected and invalid packets received by the server. Features Added: - Add support to HikariCP in TSDB JDBC driver. diff --git a/packaging/tools/repair_link.sh b/packaging/tools/repair_link.sh index 7fd503f270..d71a16023e 100755 --- a/packaging/tools/repair_link.sh +++ b/packaging/tools/repair_link.sh @@ -8,7 +8,7 @@ read -p "Please enter link directory such as /var/lib/taos/tsdb: " linkDir while true; do if [ ! -d $linkDir ]; then - read -p "Paht not exists, please enter the correct link path:" linkDir + read -p "Path not exists, please enter the correct link path:" linkDir continue fi break @@ -28,12 +28,12 @@ for linkFile in $(find -L $linkDir -xtype l); do if [ -z "${dirHash["$dirName"]}" ]; then read -p "Please enter the directory to replace ${dirName}:" newDir - read -p "Do you want to replcace all[y/N]?" replcaceAll - if [[ ( "${replcaceAll}" == "y") || ( "${replcaceAll}" == "Y") ]]; then + read -p "Do you want to replace all[y/N]?" replaceAll + if [[ ( "${replaceAll}" == "y") || ( "${replaceAll}" == "Y") ]]; then dirHash["$dirName"]="$newDir" fi fi - # Replcace the file + # Replace the file ln -sf "${newDir}/${baseName}" "${linkFile}" done