From 7d27ba20d665a04fe33cd436c6f24bde821298cd Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Thu, 21 Mar 2024 03:58:24 +0000 Subject: [PATCH 01/34] fix queue log --- source/util/src/tworker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/util/src/tworker.c b/source/util/src/tworker.c index 138d4bc1f4..0712010458 100644 --- a/source/util/src/tworker.c +++ b/source/util/src/tworker.c @@ -19,7 +19,7 @@ #include "tgeosctx.h" #include "tlog.h" -#define QUEUE_THRESHOLD 1000 * 1000 +#define QUEUE_THRESHOLD (1000 * 1000) typedef void *(*ThreadFp)(void *param); From f853272d77fb8388ac1e9535a3f30508aa407f25 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Thu, 21 Mar 2024 08:54:13 +0000 Subject: [PATCH 02/34] port main to 3.0 --- source/libs/transport/src/transCli.c | 71 +++++----------------------- 1 file changed, 13 insertions(+), 58 deletions(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index ac45f1eef6..e27e9a4ac0 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -585,11 +585,11 @@ void* destroyConnPool(SCliThrd* pThrd) { static SCliConn* getConnFromPool(SCliThrd* pThrd, char* key, bool* exceed) { void* pool = pThrd->pool; STrans* pTranInst = pThrd->pTransInst; - SConnList* plist = taosHashGet((SHashObj*)pool, key, strlen(key) + 1); + SConnList* plist = taosHashGet((SHashObj*)pool, key, strlen(key)); if (plist == NULL) { SConnList list = {0}; - taosHashPut((SHashObj*)pool, key, strlen(key) + 1, (void*)&list, sizeof(list)); - plist = taosHashGet(pool, key, strlen(key) + 1); + taosHashPut((SHashObj*)pool, key, strlen(key), (void*)&list, sizeof(list)); + plist = taosHashGet(pool, key, strlen(key)); SMsgList* nList = taosMemoryCalloc(1, sizeof(SMsgList)); QUEUE_INIT(&nList->msgQ); @@ -624,11 +624,11 @@ static SCliConn* getConnFromPool(SCliThrd* pThrd, char* key, bool* exceed) { static SCliConn* getConnFromPool2(SCliThrd* pThrd, char* key, SCliMsg** pMsg) { void* pool = pThrd->pool; STrans* pTransInst = pThrd->pTransInst; - SConnList* plist = taosHashGet((SHashObj*)pool, key, strlen(key) + 1); + SConnList* plist = taosHashGet((SHashObj*)pool, key, strlen(key)); if (plist == NULL) { SConnList list = {0}; - taosHashPut((SHashObj*)pool, key, strlen(key) + 1, (void*)&list, sizeof(list)); - plist = taosHashGet(pool, key, strlen(key) + 1); + taosHashPut((SHashObj*)pool, key, strlen(key), (void*)&list, sizeof(list)); + plist = taosHashGet(pool, key, strlen(key)); SMsgList* nList = taosMemoryCalloc(1, sizeof(SMsgList)); QUEUE_INIT(&nList->msgQ); @@ -714,7 +714,7 @@ static void addConnToPool(void* pool, SCliConn* conn) { cliDestroyConnMsgs(conn, false); if (conn->list == NULL) { - conn->list = taosHashGet((SHashObj*)pool, conn->dstAddr, strlen(conn->dstAddr) + 1); + conn->list = taosHashGet((SHashObj*)pool, conn->dstAddr, strlen(conn->dstAddr)); } SConnList* pList = conn->list; @@ -1279,7 +1279,7 @@ static void cliHandleFastFail(SCliConn* pConn, int status) { if (pMsg != NULL && REQUEST_NO_RESP(&pMsg->msg) && (pTransInst->failFastFp != NULL && pTransInst->failFastFp(pMsg->msg.msgType))) { - SFailFastItem* item = taosHashGet(pThrd->failFastCache, pConn->dstAddr, strlen(pConn->dstAddr) + 1); + SFailFastItem* item = taosHashGet(pThrd->failFastCache, pConn->dstAddr, strlen(pConn->dstAddr)); int64_t cTimestamp = taosGetTimestampMs(); if (item != NULL) { int32_t elapse = cTimestamp - item->timestamp; @@ -1291,7 +1291,7 @@ static void cliHandleFastFail(SCliConn* pConn, int status) { } } else { SFailFastItem item = {.count = 1, .timestamp = cTimestamp}; - taosHashPut(pThrd->failFastCache, pConn->dstAddr, strlen(pConn->dstAddr) + 1, &item, sizeof(SFailFastItem)); + taosHashPut(pThrd->failFastCache, pConn->dstAddr, strlen(pConn->dstAddr), &item, sizeof(SFailFastItem)); } } } else { @@ -1471,7 +1471,7 @@ FORCE_INLINE int32_t cliBuildExceptResp(SCliMsg* pMsg, STransMsg* pResp) { } static FORCE_INLINE uint32_t cliGetIpFromFqdnCache(SHashObj* cache, char* fqdn) { uint32_t addr = 0; - uint32_t* v = taosHashGet(cache, fqdn, strlen(fqdn) + 1); + uint32_t* v = taosHashGet(cache, fqdn, strlen(fqdn)); if (v == NULL) { addr = taosGetIpv4FromFqdn(fqdn); if (addr == 0xffffffff) { @@ -1480,7 +1480,7 @@ static FORCE_INLINE uint32_t cliGetIpFromFqdnCache(SHashObj* cache, char* fqdn) return addr; } - taosHashPut(cache, fqdn, strlen(fqdn) + 1, &addr, sizeof(addr)); + taosHashPut(cache, fqdn, strlen(fqdn), &addr, sizeof(addr)); } else { addr = *v; } @@ -1490,13 +1490,13 @@ static FORCE_INLINE void cliUpdateFqdnCache(SHashObj* cache, char* fqdn) { // impl later uint32_t addr = taosGetIpv4FromFqdn(fqdn); if (addr != 0xffffffff) { - uint32_t* v = taosHashGet(cache, fqdn, strlen(fqdn) + 1); + uint32_t* v = taosHashGet(cache, fqdn, strlen(fqdn)); if (addr != *v) { char old[64] = {0}, new[64] = {0}; tinet_ntoa(old, *v); tinet_ntoa(new, addr); tWarn("update ip of fqdn:%s, old: %s, new: %s", fqdn, old, new); - taosHashPut(cache, fqdn, strlen(fqdn) + 1, &addr, sizeof(addr)); + taosHashPut(cache, fqdn, strlen(fqdn), &addr, sizeof(addr)); } } return; @@ -1537,21 +1537,6 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) { return; } - 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)); - } - } - } - char* fqdn = EPSET_GET_INUSE_IP(&pMsg->ctx->epSet); uint16_t port = EPSET_GET_INUSE_PORT(&pMsg->ctx->epSet); char addr[TSDB_FQDN_LEN + 64] = {0}; @@ -1705,7 +1690,6 @@ static void cliBatchDealReq(queue* wq, SCliThrd* pThrd) { char key[TSDB_FQDN_LEN + 64] = {0}; CONN_CONSTRUCT_HASH_KEY(key, ip, port); - // SCliBatch** ppBatch = taosHashGet(pThrd->batchCache, key, sizeof(key)); SCliBatchList** ppBatchList = taosHashGet(pThrd->batchCache, key, sizeof(key)); if (ppBatchList == NULL || *ppBatchList == NULL) { SCliBatchList* pBatchList = taosMemoryCalloc(1, sizeof(SCliBatchList)); @@ -1800,21 +1784,6 @@ static void cliAsyncCb(uv_async_t* handle) { QUEUE_MOVE(&item->qmsg, &wq); taosThreadMutexUnlock(&item->mtx); - 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); - } - tDebug("all conn count: %d", pThrd->newConnCount); - } - int8_t supportBatch = pTransInst->supportBatch; if (supportBatch == 0) { cliNoBatchDealReq(&wq, pThrd); @@ -2411,20 +2380,6 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { tGTrace("%s conn %p extract epset from msg", CONN_GET_INST_LABEL(pConn), pConn); } } - 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 || pCtx->syncMsgRef != 0) { tGTrace("%s conn %p(sync) handle resp", CONN_GET_INST_LABEL(pConn), pConn); if (pCtx->pSem) { From 89b9f87b7d2486c349169d1dd81b707e449b9b0c Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Thu, 21 Mar 2024 09:01:13 +0000 Subject: [PATCH 03/34] port main to 3.0 --- source/libs/transport/src/transCli.c | 30 ++++++++++++++++------------ 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index e27e9a4ac0..b335979cd5 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -585,11 +585,12 @@ void* destroyConnPool(SCliThrd* pThrd) { static SCliConn* getConnFromPool(SCliThrd* pThrd, char* key, bool* exceed) { void* pool = pThrd->pool; STrans* pTranInst = pThrd->pTransInst; - SConnList* plist = taosHashGet((SHashObj*)pool, key, strlen(key)); + size_t klen = strlen(key); + SConnList* plist = taosHashGet((SHashObj*)pool, key, klen); if (plist == NULL) { SConnList list = {0}; - taosHashPut((SHashObj*)pool, key, strlen(key), (void*)&list, sizeof(list)); - plist = taosHashGet(pool, key, strlen(key)); + taosHashPut((SHashObj*)pool, key, klen, (void*)&list, sizeof(list)); + plist = taosHashGet(pool, key, klen); SMsgList* nList = taosMemoryCalloc(1, sizeof(SMsgList)); QUEUE_INIT(&nList->msgQ); @@ -624,11 +625,12 @@ static SCliConn* getConnFromPool(SCliThrd* pThrd, char* key, bool* exceed) { static SCliConn* getConnFromPool2(SCliThrd* pThrd, char* key, SCliMsg** pMsg) { void* pool = pThrd->pool; STrans* pTransInst = pThrd->pTransInst; - SConnList* plist = taosHashGet((SHashObj*)pool, key, strlen(key)); + size_t klen = strlen(key); + SConnList* plist = taosHashGet((SHashObj*)pool, key, klen); if (plist == NULL) { SConnList list = {0}; - taosHashPut((SHashObj*)pool, key, strlen(key), (void*)&list, sizeof(list)); - plist = taosHashGet(pool, key, strlen(key)); + taosHashPut((SHashObj*)pool, key, klen, (void*)&list, sizeof(list)); + plist = taosHashGet(pool, key, klen); SMsgList* nList = taosMemoryCalloc(1, sizeof(SMsgList)); QUEUE_INIT(&nList->msgQ); @@ -1471,7 +1473,8 @@ FORCE_INLINE int32_t cliBuildExceptResp(SCliMsg* pMsg, STransMsg* pResp) { } static FORCE_INLINE uint32_t cliGetIpFromFqdnCache(SHashObj* cache, char* fqdn) { uint32_t addr = 0; - uint32_t* v = taosHashGet(cache, fqdn, strlen(fqdn)); + size_t len = strlen(fqdn); + uint32_t* v = taosHashGet(cache, fqdn, len); if (v == NULL) { addr = taosGetIpv4FromFqdn(fqdn); if (addr == 0xffffffff) { @@ -1480,7 +1483,7 @@ static FORCE_INLINE uint32_t cliGetIpFromFqdnCache(SHashObj* cache, char* fqdn) return addr; } - taosHashPut(cache, fqdn, strlen(fqdn), &addr, sizeof(addr)); + taosHashPut(cache, fqdn, len, &addr, sizeof(addr)); } else { addr = *v; } @@ -1490,13 +1493,14 @@ static FORCE_INLINE void cliUpdateFqdnCache(SHashObj* cache, char* fqdn) { // impl later uint32_t addr = taosGetIpv4FromFqdn(fqdn); if (addr != 0xffffffff) { - uint32_t* v = taosHashGet(cache, fqdn, strlen(fqdn)); + size_t len = strlen(fqdn); + uint32_t* v = taosHashGet(cache, fqdn, len); if (addr != *v) { char old[64] = {0}, new[64] = {0}; tinet_ntoa(old, *v); tinet_ntoa(new, addr); tWarn("update ip of fqdn:%s, old: %s, new: %s", fqdn, old, new); - taosHashPut(cache, fqdn, strlen(fqdn), &addr, sizeof(addr)); + taosHashPut(cache, fqdn, len, &addr, sizeof(addr)); } } return; @@ -1689,8 +1693,8 @@ static void cliBatchDealReq(queue* wq, SCliThrd* pThrd) { uint32_t port = EPSET_GET_INUSE_PORT(&pCtx->epSet); char key[TSDB_FQDN_LEN + 64] = {0}; CONN_CONSTRUCT_HASH_KEY(key, ip, port); - - SCliBatchList** ppBatchList = taosHashGet(pThrd->batchCache, key, sizeof(key)); + size_t klen = strlen(key); + SCliBatchList** ppBatchList = taosHashGet(pThrd->batchCache, key, klen); if (ppBatchList == NULL || *ppBatchList == NULL) { SCliBatchList* pBatchList = taosMemoryCalloc(1, sizeof(SCliBatchList)); QUEUE_INIT(&pBatchList->wq); @@ -1714,7 +1718,7 @@ static void cliBatchDealReq(queue* wq, SCliThrd* pThrd) { QUEUE_PUSH(&pBatchList->wq, &pBatch->listq); - taosHashPut(pThrd->batchCache, key, sizeof(key), &pBatchList, sizeof(void*)); + taosHashPut(pThrd->batchCache, key, klen, &pBatchList, sizeof(void*)); } else { if (QUEUE_IS_EMPTY(&(*ppBatchList)->wq)) { SCliBatch* pBatch = taosMemoryCalloc(1, sizeof(SCliBatch)); From ea424e822ece6f9aa17ed9e074a1dfc91c594adf Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Mon, 25 Mar 2024 11:00:33 +0800 Subject: [PATCH 04/34] fix(tsdb/util): fix missing column value with row iter --- source/dnode/vnode/src/tsdb/tsdbUtil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbUtil.c b/source/dnode/vnode/src/tsdb/tsdbUtil.c index 44621bf4e6..076db8b3ca 100644 --- a/source/dnode/vnode/src/tsdb/tsdbUtil.c +++ b/source/dnode/vnode/src/tsdb/tsdbUtil.c @@ -642,8 +642,8 @@ SColVal *tsdbRowIterNext(STSDBRowIter *pIter) { return &pIter->cv; } - if (pIter->iColData < pIter->pRow->pBlockData->nColData) { - tColDataGetValue(&pIter->pRow->pBlockData->aColData[pIter->iColData], pIter->pRow->iRow, &pIter->cv); + if (pIter->iColData <= pIter->pRow->pBlockData->nColData) { + tColDataGetValue(&pIter->pRow->pBlockData->aColData[pIter->iColData - 1], pIter->pRow->iRow, &pIter->cv); ++pIter->iColData; return &pIter->cv; } else { From ced7c19943cc0dd5932cec4207a3fa752aca9621 Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Mon, 25 Mar 2024 17:01:06 +0800 Subject: [PATCH 05/34] enh: not to start snap replication if too many open files already --- source/libs/sync/src/syncPipeline.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/libs/sync/src/syncPipeline.c b/source/libs/sync/src/syncPipeline.c index d40fff447f..3543ed574c 100644 --- a/source/libs/sync/src/syncPipeline.c +++ b/source/libs/sync/src/syncPipeline.c @@ -866,9 +866,14 @@ int32_t syncLogReplRecover(SSyncLogReplMgr* pMgr, SSyncNode* pNode, SyncAppendEn SyncTerm term = -1; SyncIndex firstVer = pNode->pLogStore->syncLogBeginIndex(pNode->pLogStore); SyncIndex index = TMIN(pMsg->matchIndex, pNode->pLogBuf->matchIndex); + errno = 0; if (pMsg->matchIndex < pNode->pLogBuf->matchIndex) { term = syncLogReplGetPrevLogTerm(pMgr, pNode, index + 1); + if (term < 0 && (errno == ENFILE || errno == EMFILE)) { + sError("vgId:%d, failed to get prev log term since %s. index:%" PRId64, pNode->vgId, terrstr(), index + 1); + return -1; + } if ((index + 1 < firstVer) || (term < 0) || (term != pMsg->lastMatchTerm && (index + 1 == firstVer || index == firstVer))) { ASSERT(term >= 0 || terrno == TSDB_CODE_WAL_LOG_NOT_EXIST); From 6aaac7c0dcb656bf08d3248f15acd5ecf40bcd9c Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Mon, 25 Mar 2024 17:57:13 +0800 Subject: [PATCH 06/34] fix:decode task error if task version is smaller than 2 --- source/libs/stream/src/streamTask.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/libs/stream/src/streamTask.c b/source/libs/stream/src/streamTask.c index 4ca784a32f..13a4f5012d 100644 --- a/source/libs/stream/src/streamTask.c +++ b/source/libs/stream/src/streamTask.c @@ -287,7 +287,9 @@ int32_t tDecodeStreamTask(SDecoder* pDecoder, SStreamTask* pTask) { if (tDecodeCStrTo(pDecoder, pTask->outputInfo.shuffleDispatcher.stbFullName) < 0) return -1; } if (tDecodeI64(pDecoder, &pTask->info.triggerParam) < 0) return -1; - if (tDecodeI8(pDecoder, &pTask->subtableWithoutMd5) < 0) return -1; + if (pTask->ver >= SSTREAM_TASK_SUBTABLE_CHANGED_VER){ + if (tDecodeI8(pDecoder, &pTask->subtableWithoutMd5) < 0) return -1; + } if (tDecodeCStrTo(pDecoder, pTask->reserve) < 0) return -1; tEndDecode(pDecoder); From 44ce5b951df0f4851163cae18cc283077fe70c12 Mon Sep 17 00:00:00 2001 From: Shungang Li Date: Mon, 25 Mar 2024 17:43:45 +0800 Subject: [PATCH 07/34] fix: arb group leak --- source/dnode/mnode/impl/inc/mndArbGroup.h | 1 + source/dnode/mnode/impl/src/mndArbGroup.c | 27 ++++++++++++++++++----- source/dnode/mnode/impl/src/mndDb.c | 19 ++++++++++++++++ 3 files changed, 41 insertions(+), 6 deletions(-) diff --git a/source/dnode/mnode/impl/inc/mndArbGroup.h b/source/dnode/mnode/impl/inc/mndArbGroup.h index ed852cf581..fcd11310e7 100644 --- a/source/dnode/mnode/impl/inc/mndArbGroup.h +++ b/source/dnode/mnode/impl/inc/mndArbGroup.h @@ -35,6 +35,7 @@ int32_t mndSetCreateArbGroupRedoLogs(STrans *pTrans, SArbGroup *pGroup); int32_t mndSetCreateArbGroupUndoLogs(STrans *pTrans, SArbGroup *pGroup); int32_t mndSetCreateArbGroupCommitLogs(STrans *pTrans, SArbGroup *pGroup); +int32_t mndSetDropArbGroupPrepareLogs(STrans *pTrans, SArbGroup *pGroup); int32_t mndSetDropArbGroupCommitLogs(STrans *pTrans, SArbGroup *pGroup); bool mndUpdateArbGroupByHeartBeat(SArbGroup *pGroup, SVArbHbRspMember *pRspMember, int64_t nowMs, int32_t dnodeId, diff --git a/source/dnode/mnode/impl/src/mndArbGroup.c b/source/dnode/mnode/impl/src/mndArbGroup.c index e056e698f3..92ab5274e4 100644 --- a/source/dnode/mnode/impl/src/mndArbGroup.c +++ b/source/dnode/mnode/impl/src/mndArbGroup.c @@ -260,6 +260,14 @@ int32_t mndSetCreateArbGroupCommitLogs(STrans *pTrans, SArbGroup *pGroup) { return 0; } +int32_t mndSetDropArbGroupPrepareLogs(STrans *pTrans, SArbGroup *pGroup) { + SSdbRaw *pRedoRaw = mndArbGroupActionEncode(pGroup); + if (pRedoRaw == NULL) return -1; + if (mndTransAppendPrepareLog(pTrans, pRedoRaw) != 0) return -1; + if (sdbSetRawStatus(pRedoRaw, SDB_STATUS_DROPPING) != 0) return -1; + return 0; +} + static int32_t mndSetDropArbGroupRedoLogs(STrans *pTrans, SArbGroup *pGroup) { SSdbRaw *pRedoRaw = mndArbGroupActionEncode(pGroup); if (pRedoRaw == NULL) return -1; @@ -535,10 +543,10 @@ static int32_t mndProcessArbCheckSyncTimer(SRpcMsg *pReq) { int32_t vgId = arbGroupDup.vgId; int64_t nowMs = taosGetTimestampMs(); - bool member0IsTimeout = mndCheckArbMemberHbTimeout(&arbGroupDup, 0, nowMs); - bool member1IsTimeout = mndCheckArbMemberHbTimeout(&arbGroupDup, 1, nowMs); - SArbAssignedLeader* pAssignedLeader = &arbGroupDup.assignedLeader; - int32_t currentAssignedDnodeId = pAssignedLeader->dnodeId; + bool member0IsTimeout = mndCheckArbMemberHbTimeout(&arbGroupDup, 0, nowMs); + bool member1IsTimeout = mndCheckArbMemberHbTimeout(&arbGroupDup, 1, nowMs); + SArbAssignedLeader *pAssignedLeader = &arbGroupDup.assignedLeader; + int32_t currentAssignedDnodeId = pAssignedLeader->dnodeId; // 1. has assigned && is sync => send req if (currentAssignedDnodeId != 0 && arbGroupDup.isSync == true) { @@ -667,9 +675,16 @@ static int32_t mndProcessArbUpdateGroupReq(SRpcMsg *pReq) { memcpy(newGroup.assignedLeader.token, req.assignedLeader.token, TSDB_ARB_TOKEN_SIZE); newGroup.version = req.version; - SMnode *pMnode = pReq->info.node; + SMnode *pMnode = pReq->info.node; + SArbGroup *pOldGroup = sdbAcquire(pMnode->pSdb, SDB_ARBGROUP, &newGroup.vgId); + if (!pOldGroup) { + mInfo("vgId:%d, arb skip to update arbgroup, since no obj found", newGroup.vgId); + return 0; + } + sdbRelease(pMnode->pSdb, pOldGroup); + if (mndArbGroupUpdateTrans(pMnode, &newGroup) != 0) { - mError("vgId:%d, arb failed to update arbgroup, since %s", req.vgId, terrstr()); + mError("vgId:%d, arb failed to update arbgroup, since %s", newGroup.vgId, terrstr()); ret = -1; } diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c index a1f3a24661..527105a7b8 100644 --- a/source/dnode/mnode/impl/src/mndDb.c +++ b/source/dnode/mnode/impl/src/mndDb.c @@ -1209,6 +1209,25 @@ static int32_t mndSetDropDbPrepareLogs(SMnode *pMnode, STrans *pTrans, SDbObj *p if (mndTransAppendPrepareLog(pTrans, pRedoRaw) != 0) return -1; if (sdbSetRawStatus(pRedoRaw, SDB_STATUS_DROPPING) != 0) return -1; + SSdb *pSdb = pMnode->pSdb; + void *pIter = NULL; + + while (1) { + SArbGroup *pArbGroup = NULL; + pIter = sdbFetch(pSdb, SDB_ARBGROUP, pIter, (void **)&pArbGroup); + if (pIter == NULL) break; + + if (pArbGroup->dbUid == pDb->uid) { + if (mndSetDropArbGroupPrepareLogs(pTrans,pArbGroup) != 0) { + sdbCancelFetch(pSdb, pIter); + sdbRelease(pSdb, pArbGroup); + return -1; + } + } + + sdbRelease(pSdb, pArbGroup); + } + return 0; } From e5abe34c84ae04f9ee652feb3274d354d22ba348 Mon Sep 17 00:00:00 2001 From: kailixu Date: Mon, 25 Mar 2024 21:34:31 +0800 Subject: [PATCH 08/34] fix: replace strdup for release build --- source/libs/executor/src/sysscanoperator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/executor/src/sysscanoperator.c b/source/libs/executor/src/sysscanoperator.c index 589c23ed3a..628aacf3c3 100644 --- a/source/libs/executor/src/sysscanoperator.c +++ b/source/libs/executor/src/sysscanoperator.c @@ -879,7 +879,7 @@ static int32_t sysTableGetGeomText(char* iGeom, int32_t nGeom, char** output, in char* outputWKT = NULL; if (nGeom == 0) { - if (!(*output = strdup(""))) code = TSDB_CODE_OUT_OF_MEMORY; + if (!(*output = taosStrdup(""))) code = TSDB_CODE_OUT_OF_MEMORY; *nOutput = 0; return code; } From a11b2c614e3c83e58d19e4dad09f5b3dfd65d70c Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Mon, 25 Mar 2024 23:41:22 +0800 Subject: [PATCH 09/34] fix(stream): not return error when failing to load stream task meta. --- source/dnode/vnode/src/tq/tq.c | 5 +--- source/libs/stream/src/streamMeta.c | 40 ++++++++++++----------------- 2 files changed, 18 insertions(+), 27 deletions(-) diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index ffebd783ac..ccfc8cc7c9 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -101,10 +101,7 @@ int32_t tqInitialize(STQ* pTq) { return -1; } - if (streamMetaLoadAllTasks(pTq->pStreamMeta) < 0) { - return -1; - } - + /*int32_t code = */streamMetaLoadAllTasks(pTq->pStreamMeta); return 0; } diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index 5f6440c06d..fc06a8975f 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -824,13 +824,6 @@ int64_t streamMetaGetLatestCheckpointId(SStreamMeta* pMeta) { return chkpId; } -static void doClear(void* pKey, void* pVal, TBC* pCur, SArray* pRecycleList) { - tdbFree(pKey); - tdbFree(pVal); - tdbTbcClose(pCur); - taosArrayDestroy(pRecycleList); -} - int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) { TBC* pCur = NULL; void* pKey = NULL; @@ -847,10 +840,11 @@ int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) { int32_t vgId = pMeta->vgId; stInfo("vgId:%d load stream tasks from meta files", vgId); - if (tdbTbcOpen(pMeta->pTaskDb, &pCur, NULL) < 0) { - stError("vgId:%d failed to open stream meta, code:%s", vgId, tstrerror(terrno)); + int32_t code = tdbTbcOpen(pMeta->pTaskDb, &pCur, NULL); + if (code != TSDB_CODE_SUCCESS) { + stError("vgId:%d failed to open stream meta, code:%s, not load any stream tasks", vgId, tstrerror(terrno)); taosArrayDestroy(pRecycleList); - return -1; + return TSDB_CODE_SUCCESS; } tdbTbcMoveToFirst(pCur); @@ -859,20 +853,18 @@ int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) { if (pTask == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; stError("vgId:%d failed to load stream task from meta-files, code:%s", vgId, tstrerror(terrno)); - doClear(pKey, pVal, pCur, pRecycleList); - return -1; + break; } tDecoderInit(&decoder, (uint8_t*)pVal, vLen); if (tDecodeStreamTask(&decoder, pTask) < 0) { tDecoderClear(&decoder); - doClear(pKey, pVal, pCur, pRecycleList); tFreeStreamTask(pTask); stError( "vgId:%d stream read incompatible data, rm %s/vnode/vnode*/tq/stream if taosd cannot start, and rebuild " "stream manually", vgId, tsDataDir); - return -1; + break; } tDecoderClear(&decoder); @@ -892,10 +884,11 @@ int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) { STaskId id = {.streamId = pTask->id.streamId, .taskId = pTask->id.taskId}; void* p = taosHashGet(pMeta->pTasksMap, &id, sizeof(id)); if (p == NULL) { - if (pMeta->expandFunc(pMeta->ahandle, pTask, pTask->chkInfo.checkpointVer + 1) < 0) { - doClear(pKey, pVal, pCur, pRecycleList); + code = pMeta->expandFunc(pMeta->ahandle, pTask, pTask->chkInfo.checkpointVer + 1); + if (code < 0) { + stError("failed to expand s-task:0x%"PRIx64", code:%s, continue", id.taskId, tstrerror(terrno)); tFreeStreamTask(pTask); - return -1; + continue; } taosArrayPush(pMeta->pTaskList, &pTask->id); @@ -907,9 +900,10 @@ int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) { } if (taosHashPut(pMeta->pTasksMap, &id, sizeof(id), &pTask, POINTER_BYTES) < 0) { - doClear(pKey, pVal, pCur, pRecycleList); + stError("s-task:0x%x failed to put into hashTable, code:%s, continue", pTask->id.taskId, tstrerror(terrno)); + taosArrayPop(pMeta->pTaskList); tFreeStreamTask(pTask); - return -1; + continue; } if (pTask->info.fillHistory == 0) { @@ -925,10 +919,9 @@ int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) { tdbFree(pKey); tdbFree(pVal); + if (tdbTbcClose(pCur) < 0) { - stError("vgId:%d failed to close meta-file cursor", vgId); - taosArrayDestroy(pRecycleList); - return -1; + stError("vgId:%d failed to close meta-file cursor, code:%s, continue", vgId, tstrerror(terrno)); } if (taosArrayGetSize(pRecycleList) > 0) { @@ -942,8 +935,9 @@ int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) { ASSERT(pMeta->numOfStreamTasks <= numOfTasks && pMeta->numOfPausedTasks <= numOfTasks); stDebug("vgId:%d load %d tasks into meta from disk completed, streamTask:%d, paused:%d", pMeta->vgId, numOfTasks, pMeta->numOfStreamTasks, pMeta->numOfPausedTasks); + taosArrayDestroy(pRecycleList); - return 0; + return TSDB_CODE_SUCCESS; } int32_t tEncodeStreamHbMsg(SEncoder* pEncoder, const SStreamHbMsg* pReq) { From 8e45bebd66770855794a1f6e83ec9cc512793b46 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Tue, 26 Mar 2024 15:16:09 +0800 Subject: [PATCH 10/34] fix:decode task error if task version is smaller than 2 --- source/libs/stream/src/streamTask.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/stream/src/streamTask.c b/source/libs/stream/src/streamTask.c index 13a4f5012d..c7a1a00a46 100644 --- a/source/libs/stream/src/streamTask.c +++ b/source/libs/stream/src/streamTask.c @@ -216,7 +216,7 @@ int32_t tDecodeStreamTask(SDecoder* pDecoder, SStreamTask* pTask) { if (tStartDecode(pDecoder) < 0) return -1; if (tDecodeI64(pDecoder, &pTask->ver) < 0) return -1; - if (pTask->ver <= SSTREAM_TASK_INCOMPATIBLE_VER) return -1; + if (pTask->ver <= SSTREAM_TASK_INCOMPATIBLE_VER || pTask->ver > SSTREAM_TASK_VER) return -1; if (tDecodeI64(pDecoder, &pTask->id.streamId) < 0) return -1; if (tDecodeI32(pDecoder, &pTask->id.taskId) < 0) return -1; From 530e0133b9bba75f7ed33ccda676e3ba108ce1f3 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 26 Mar 2024 19:39:58 +0800 Subject: [PATCH 11/34] fix(stream): acquire the stream task in exec buffer if not in mnode store. --- source/dnode/mnode/impl/src/mndStream.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index 60b522f6fa..ceb239ee96 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -2153,11 +2153,20 @@ int32_t mndProcessStreamReqCheckpoint(SRpcMsg *pReq) { SStreamObj *pStream = mndGetStreamObj(pMnode, req.streamId); if (pStream == NULL) { - mError("failed to find the stream:0x%" PRIx64 " not handle the checkpoint req", req.streamId); - terrno = TSDB_CODE_MND_STREAM_NOT_EXIST; - taosThreadMutexUnlock(&execInfo.lock); + mWarn("failed to find the stream:0x%" PRIx64 ", not handle the checkpoint req, try to acquire in buf", req.streamId); - return -1; + // not in meta-store yet, try to acquire the task in exec buffer + STaskId id = {.streamId = req.streamId, .taskId = req.taskId}; + void* p = taosHashGet(execInfo.pTaskMap, &id, sizeof(id)); + if (p == NULL) { + mError("failed to find the stream:0x%" PRIx64 " in buf, not handle the checkpoint req", req.streamId); + terrno = TSDB_CODE_MND_STREAM_NOT_EXIST; + taosThreadMutexUnlock(&execInfo.lock); + return -1; + } else { + mDebug("s-task:0x%" PRIx64 "-0x%x in buf not in mnode/meta, create stream trans may not complete yet", + req.streamId, req.taskId); + } } int32_t numOfTasks = mndGetNumOfStreamTasks(pStream); @@ -2175,7 +2184,7 @@ int32_t mndProcessStreamReqCheckpoint(SRpcMsg *pReq) { int32_t total = taosArrayGetSize(*pReqTaskList); if (total == numOfTasks) { // all tasks has send the reqs int64_t checkpointId = mndStreamGenChkpId(pMnode); - mDebug("stream:0x%" PRIx64 " all tasks req, start checkpointId:%" PRId64, pStream->uid, checkpointId); + mInfo("stream:0x%" PRIx64 " all tasks req checkpoint, start checkpointId:%" PRId64, pStream->uid, checkpointId); // TODO:handle error int32_t code = mndProcessStreamCheckpointTrans(pMnode, pStream, checkpointId, 0, false); From 46280bfee95e634e4bf36f1197d77f046faa3526 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 26 Mar 2024 19:40:47 +0800 Subject: [PATCH 12/34] fix(stream): add some comments. --- source/dnode/mnode/impl/src/mndStream.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index ceb239ee96..93b4e70de7 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -2156,6 +2156,7 @@ int32_t mndProcessStreamReqCheckpoint(SRpcMsg *pReq) { mWarn("failed to find the stream:0x%" PRIx64 ", not handle the checkpoint req, try to acquire in buf", req.streamId); // not in meta-store yet, try to acquire the task in exec buffer + // the checkpoint req arrives too soon before the completion of the create stream trans. STaskId id = {.streamId = req.streamId, .taskId = req.taskId}; void* p = taosHashGet(execInfo.pTaskMap, &id, sizeof(id)); if (p == NULL) { From 3c7fe5fd01b464693f5fe2ac429084ba5f2af906 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 26 Mar 2024 23:27:38 +0800 Subject: [PATCH 13/34] fix(stream): check null ptr. --- source/dnode/mnode/impl/src/mndStream.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index 93b4e70de7..bed946bc24 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -2170,34 +2170,39 @@ int32_t mndProcessStreamReqCheckpoint(SRpcMsg *pReq) { } } - int32_t numOfTasks = mndGetNumOfStreamTasks(pStream); + int32_t numOfTasks = (pStream == NULL)? 0: mndGetNumOfStreamTasks(pStream); + SArray **pReqTaskList = (SArray **)taosHashGet(execInfo.pTransferStateStreams, &req.streamId, sizeof(req.streamId)); if (pReqTaskList == NULL) { SArray *pList = taosArrayInit(4, sizeof(int32_t)); - doAddTaskId(pList, req.taskId, pStream->uid, numOfTasks); + doAddTaskId(pList, req.taskId, req.streamId, numOfTasks); taosHashPut(execInfo.pTransferStateStreams, &req.streamId, sizeof(int64_t), &pList, sizeof(void *)); pReqTaskList = (SArray **)taosHashGet(execInfo.pTransferStateStreams, &req.streamId, sizeof(req.streamId)); } else { - doAddTaskId(*pReqTaskList, req.taskId, pStream->uid, numOfTasks); + doAddTaskId(*pReqTaskList, req.taskId, req.streamId, numOfTasks); } int32_t total = taosArrayGetSize(*pReqTaskList); if (total == numOfTasks) { // all tasks has send the reqs int64_t checkpointId = mndStreamGenChkpId(pMnode); - mInfo("stream:0x%" PRIx64 " all tasks req checkpoint, start checkpointId:%" PRId64, pStream->uid, checkpointId); + mInfo("stream:0x%" PRIx64 " all tasks req checkpoint, start checkpointId:%" PRId64, req.streamId, checkpointId); - // TODO:handle error - int32_t code = mndProcessStreamCheckpointTrans(pMnode, pStream, checkpointId, 0, false); + if (pStream != NULL) { + // TODO:handle error + int32_t code = mndProcessStreamCheckpointTrans(pMnode, pStream, checkpointId, 0, false); + mndReleaseStream(pMnode, pStream); + } else { + // todo: wait for the create stream trans completed, and launch the checkpoint trans + } // remove this entry taosHashRemove(execInfo.pTransferStateStreams, &req.streamId, sizeof(int64_t)); int32_t numOfStreams = taosHashGetSize(execInfo.pTransferStateStreams); - mDebug("stream:0x%" PRIx64 " removed, remain streams:%d fill-history not completed", pStream->uid, numOfStreams); + mDebug("stream:0x%" PRIx64 " removed, remain streams:%d fill-history not completed", req.streamId, numOfStreams); } - mndReleaseStream(pMnode, pStream); taosThreadMutexUnlock(&execInfo.lock); { From f3c306d582b1e2d7005ae3d3340b93d04df085d5 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 26 Mar 2024 23:28:20 +0800 Subject: [PATCH 14/34] fix(stream): add some comments. --- source/dnode/mnode/impl/src/mndStream.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index bed946bc24..9a79f6ff5b 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -2194,6 +2194,8 @@ int32_t mndProcessStreamReqCheckpoint(SRpcMsg *pReq) { mndReleaseStream(pMnode, pStream); } else { // todo: wait for the create stream trans completed, and launch the checkpoint trans + // SStreamObj *pStream = mndGetStreamObj(pMnode, req.streamId); + // sleep(500ms) } // remove this entry From e776cde461a11151549c1e9f746f676d843daef0 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 27 Mar 2024 09:02:21 +0800 Subject: [PATCH 15/34] fix(stream):fix unrelease stream obj. --- source/dnode/mnode/impl/src/mndStream.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index 9a79f6ff5b..6067af199e 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -2188,10 +2188,8 @@ int32_t mndProcessStreamReqCheckpoint(SRpcMsg *pReq) { int64_t checkpointId = mndStreamGenChkpId(pMnode); mInfo("stream:0x%" PRIx64 " all tasks req checkpoint, start checkpointId:%" PRId64, req.streamId, checkpointId); - if (pStream != NULL) { - // TODO:handle error + if (pStream != NULL) { // TODO:handle error int32_t code = mndProcessStreamCheckpointTrans(pMnode, pStream, checkpointId, 0, false); - mndReleaseStream(pMnode, pStream); } else { // todo: wait for the create stream trans completed, and launch the checkpoint trans // SStreamObj *pStream = mndGetStreamObj(pMnode, req.streamId); @@ -2205,6 +2203,10 @@ int32_t mndProcessStreamReqCheckpoint(SRpcMsg *pReq) { mDebug("stream:0x%" PRIx64 " removed, remain streams:%d fill-history not completed", req.streamId, numOfStreams); } + if (pStream != NULL) { + mndReleaseStream(pMnode, pStream); + } + taosThreadMutexUnlock(&execInfo.lock); { From c0a394876d1a47780db7f90de915505204bbe95a Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 27 Mar 2024 02:41:05 +0000 Subject: [PATCH 16/34] fix invalid free while taosd quit --- source/libs/transport/src/transCli.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index b335979cd5..2d8f4ed3c2 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -1944,8 +1944,9 @@ static FORCE_INLINE void destroyCmsgWrapper(void* arg, void* param) { if (pMsg == NULL) { return; } - if (param != NULL) { - SCliThrd* pThrd = param; + + SCliThrd* pThrd = param; + if (pMsg->msg.info.notFreeAhandle == 0 && pThrd != NULL) { if (pThrd->destroyAhandleFp) (*pThrd->destroyAhandleFp)(pMsg->msg.info.ahandle); } destroyCmsg(pMsg); @@ -1957,12 +1958,9 @@ static FORCE_INLINE void destroyCmsgAndAhandle(void* param) { SCliMsg* pMsg = arg->param1; SCliThrd* pThrd = arg->param2; - tDebug("destroy Ahandle A"); - if (pThrd != NULL && pThrd->destroyAhandleFp != NULL) { - tDebug("destroy Ahandle B"); + if (pMsg->msg.info.notFreeAhandle == 0 && pThrd != NULL && pThrd->destroyAhandleFp != NULL) { pThrd->destroyAhandleFp(pMsg->ctx->ahandle); } - tDebug("destroy Ahandle C"); transDestroyConnCtx(pMsg->ctx); transFreeMsg(pMsg->msg.pCont); From f4fed29739d97f04603f315025930a685913cceb Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 27 Mar 2024 15:04:37 +0800 Subject: [PATCH 17/34] fix:write schema error if schema ver is 1 more than origin version --- source/dnode/mnode/impl/src/mndStb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndStb.c b/source/dnode/mnode/impl/src/mndStb.c index 7ee1b36916..a507631128 100644 --- a/source/dnode/mnode/impl/src/mndStb.c +++ b/source/dnode/mnode/impl/src/mndStb.c @@ -1104,14 +1104,16 @@ static int32_t mndProcessCreateStbReq(SRpcMsg *pReq) { } else if (createReq.tagVer > 0 || createReq.colVer > 0) { int32_t tagDelta = createReq.tagVer - pStb->tagVer; int32_t colDelta = createReq.colVer - pStb->colVer; - int32_t verDelta = tagDelta + colDelta; mInfo("stb:%s, already exist while create, input tagVer:%d colVer:%d, exist tagVer:%d colVer:%d", createReq.name, createReq.tagVer, createReq.colVer, pStb->tagVer, pStb->colVer); if (tagDelta <= 0 && colDelta <= 0) { mInfo("stb:%s, schema version is not incremented and nothing needs to be done", createReq.name); code = 0; goto _OVER; - } else if ((tagDelta == 1 || colDelta == 1) && (verDelta == 1)) { + } else if ((tagDelta == 1 && colDelta == 0) || + (tagDelta == 0 && colDelta == 1) || + pStb->colVer == 1 || + pStb->tagVer == 1) { isAlter = true; mInfo("stb:%s, schema version is only increased by 1 number, do alter operation", createReq.name); } else { From 4722f8be8787596d8c88939fc2f7166530eff5aa Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 27 Mar 2024 15:17:49 +0800 Subject: [PATCH 18/34] fix:write schema error if schema ver is 1 more than origin version --- source/dnode/mnode/impl/src/mndStb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndStb.c b/source/dnode/mnode/impl/src/mndStb.c index a507631128..79c62df766 100644 --- a/source/dnode/mnode/impl/src/mndStb.c +++ b/source/dnode/mnode/impl/src/mndStb.c @@ -1112,8 +1112,8 @@ static int32_t mndProcessCreateStbReq(SRpcMsg *pReq) { goto _OVER; } else if ((tagDelta == 1 && colDelta == 0) || (tagDelta == 0 && colDelta == 1) || - pStb->colVer == 1 || - pStb->tagVer == 1) { + (pStb->colVer == 1 && createReq.colVer > 1) || + (pStb->tagVer == 1 && createReq.tagVer > 1)) { isAlter = true; mInfo("stb:%s, schema version is only increased by 1 number, do alter operation", createReq.name); } else { From 5157d5b97d44474edbc4612180a57e591e308ff1 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 27 Mar 2024 15:52:48 +0800 Subject: [PATCH 19/34] fix(stream): fix invalid read. --- source/libs/stream/src/streamMeta.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index fc06a8975f..c24763c024 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -648,14 +648,17 @@ SStreamTask* streamMetaAcquireOneTask(SStreamTask* pTask) { } void streamMetaReleaseTask(SStreamMeta* UNUSED_PARAM(pMeta), SStreamTask* pTask) { + int32_t taskId = pTask->id.taskId; int32_t ref = atomic_sub_fetch_32(&pTask->refCnt, 1); + + // not safe to use the pTask->id.idStr, since pTask may be released by other threads when print logs. if (ref > 0) { - stTrace("s-task:%s release task, ref:%d", pTask->id.idStr, ref); + stTrace("s-task:0x%x release task, ref:%d", taskId, ref); } else if (ref == 0) { - stTrace("s-task:%s all refs are gone, free it", pTask->id.idStr); + stTrace("s-task:0x%x all refs are gone, free it", taskId); tFreeStreamTask(pTask); } else if (ref < 0) { - stError("task ref is invalid, ref:%d, %s", ref, pTask->id.idStr); + stError("task ref is invalid, ref:%d, 0x%x", ref, taskId); } } From c611974247abfdbc40ece8230bea04ab7f9b4595 Mon Sep 17 00:00:00 2001 From: Shungang Li Date: Wed, 27 Mar 2024 14:17:53 +0800 Subject: [PATCH 20/34] fix: tmsg encode error --- source/common/src/tmsg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index ff424ee558..8430c67321 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -51,8 +51,8 @@ #define ENCODESQL() \ do { \ + if (tEncodeI32(&encoder, pReq->sqlLen) < 0) return -1; \ if (pReq->sqlLen > 0 && pReq->sql != NULL) { \ - if (tEncodeI32(&encoder, pReq->sqlLen) < 0) return -1; \ if (tEncodeBinary(&encoder, pReq->sql, pReq->sqlLen) < 0) return -1; \ } \ } while (0) @@ -3025,7 +3025,7 @@ int32_t tSerializeSCreateDbReq(void *buf, int32_t bufLen, SCreateDbReq *pReq) { ENCODESQL(); - if (tEncodeI32(&encoder, pReq->withArbitrator) < 0) return -1; + if (tEncodeI8(&encoder, pReq->withArbitrator) < 0) return -1; tEndEncode(&encoder); @@ -3140,7 +3140,7 @@ int32_t tSerializeSAlterDbReq(void *buf, int32_t bufLen, SAlterDbReq *pReq) { if (tEncodeI32(&encoder, pReq->walRetentionSize) < 0) return -1; if (tEncodeI32(&encoder, pReq->keepTimeOffset) < 0) return -1; ENCODESQL(); - if (tEncodeI32(&encoder, pReq->withArbitrator) < 0) return -1; + if (tEncodeI8(&encoder, pReq->withArbitrator) < 0) return -1; tEndEncode(&encoder); int32_t tlen = encoder.pos; From 277a009677b958a68f898818c53c7443e5aae85d Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 27 Mar 2024 16:42:32 +0800 Subject: [PATCH 21/34] fix(test): fix unit test compiler error. --- source/util/test/tbaseCodecTest.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/source/util/test/tbaseCodecTest.cpp b/source/util/test/tbaseCodecTest.cpp index 4c56979885..63bbfcaa68 100644 --- a/source/util/test/tbaseCodecTest.cpp +++ b/source/util/test/tbaseCodecTest.cpp @@ -17,11 +17,6 @@ using namespace std; #pragma GCC diagnostic ignored "-Wunused-variable" #pragma GCC diagnostic ignored "-Wsign-compare" -int main(int argc, char **argv) { - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} - static void checkBase58Codec(uint8_t *pRaw, int32_t rawLen, int32_t index) { int64_t start = taosGetTimestampUs(); char *pEnc = base58_encode((const uint8_t *)pRaw, rawLen); From 8e2a2414c0d19f1470d5b17be331588a45896849 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Thu, 28 Mar 2024 13:48:46 +0800 Subject: [PATCH 22/34] fix:same subtable same partition by leads to same table name in stream --- include/common/tdatablock.h | 2 +- include/libs/stream/tstream.h | 2 +- source/common/src/tdatablock.c | 11 ++++++++--- source/dnode/mnode/impl/src/mndDef.c | 4 +++- source/dnode/mnode/impl/src/mndStream.c | 4 +++- source/dnode/vnode/src/tq/tqSink.c | 18 +++++++++++------- source/libs/stream/src/streamDispatch.c | 9 ++++++--- source/libs/stream/src/streamMeta.c | 4 +++- tests/system-test/8-stream/stream_basic.py | 22 ++++++++++++++++++++++ 9 files changed, 58 insertions(+), 18 deletions(-) diff --git a/include/common/tdatablock.h b/include/common/tdatablock.h index fa6e4c3ae8..cf6d4ba2b0 100644 --- a/include/common/tdatablock.h +++ b/include/common/tdatablock.h @@ -267,7 +267,7 @@ int32_t buildSubmitReqFromDataBlock(SSubmitReq2** pReq, const SSDataBlock* pData bool alreadyAddGroupId(char* ctbName); bool isAutoTableName(char* ctbName); -void buildCtbNameAddGroupId(char* ctbName, uint64_t groupId); +void buildCtbNameAddGroupId(const char* stbName, char* ctbName, uint64_t groupId); char* buildCtbNameByGroupId(const char* stbName, uint64_t groupId); int32_t buildCtbNameByGroupIdImpl(const char* stbName, uint64_t groupId, char* pBuf); diff --git a/include/libs/stream/tstream.h b/include/libs/stream/tstream.h index 5f3761d7b7..e7c6491b9d 100644 --- a/include/libs/stream/tstream.h +++ b/include/libs/stream/tstream.h @@ -61,7 +61,7 @@ typedef struct SStreamTask SStreamTask; typedef struct SStreamQueue SStreamQueue; typedef struct SStreamTaskSM SStreamTaskSM; -#define SSTREAM_TASK_VER 3 +#define SSTREAM_TASK_VER 4 #define SSTREAM_TASK_INCOMPATIBLE_VER 1 #define SSTREAM_TASK_NEED_CONVERT_VER 2 #define SSTREAM_TASK_SUBTABLE_CHANGED_VER 3 diff --git a/source/common/src/tdatablock.c b/source/common/src/tdatablock.c index f4455be206..dc1c27b123 100644 --- a/source/common/src/tdatablock.c +++ b/source/common/src/tdatablock.c @@ -2141,10 +2141,14 @@ _end: return TSDB_CODE_SUCCESS; } -void buildCtbNameAddGroupId(char* ctbName, uint64_t groupId){ +void buildCtbNameAddGroupId(const char* stbName, char* ctbName, uint64_t groupId){ char tmp[TSDB_TABLE_NAME_LEN] = {0}; - snprintf(tmp, TSDB_TABLE_NAME_LEN, "_%"PRIu64, groupId); - ctbName[TSDB_TABLE_NAME_LEN - strlen(tmp) - 1] = 0; // put groupId to the end + if (stbName == NULL){ + snprintf(tmp, TSDB_TABLE_NAME_LEN, "_%"PRIu64, groupId); + }else{ + snprintf(tmp, TSDB_TABLE_NAME_LEN, "_%s_%"PRIu64, stbName, groupId); + } + ctbName[TSDB_TABLE_NAME_LEN - strlen(tmp) - 1] = 0; // put stbname + groupId to the end strcat(ctbName, tmp); } @@ -2154,6 +2158,7 @@ bool isAutoTableName(char* ctbName) { return (strlen(ctbName) == 34 && ctbName[0 bool alreadyAddGroupId(char* ctbName) { size_t len = strlen(ctbName); + if (len == 0) return false; size_t _location = len - 1; while (_location > 0) { if (ctbName[_location] < '0' || ctbName[_location] > '9') { diff --git a/source/dnode/mnode/impl/src/mndDef.c b/source/dnode/mnode/impl/src/mndDef.c index 3f69c7def3..091edc6ab0 100644 --- a/source/dnode/mnode/impl/src/mndDef.c +++ b/source/dnode/mnode/impl/src/mndDef.c @@ -72,7 +72,9 @@ int32_t tEncodeSStreamObj(SEncoder *pEncoder, const SStreamObj *pObj) { if (tEncodeI32(pEncoder, innerSz) < 0) return -1; for (int32_t j = 0; j < innerSz; j++) { SStreamTask *pTask = taosArrayGetP(pArray, j); - pTask->ver = SSTREAM_TASK_VER; + if (pTask->ver < SSTREAM_TASK_SUBTABLE_CHANGED_VER){ + pTask->ver = SSTREAM_TASK_VER; + } if (tEncodeStreamTask(pEncoder, pTask) < 0) return -1; } } diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index 6067af199e..ff05db417e 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -434,7 +434,9 @@ int32_t mndPersistTaskDeployReq(STrans *pTrans, SStreamTask *pTask) { SEncoder encoder; tEncoderInit(&encoder, NULL, 0); - pTask->ver = SSTREAM_TASK_VER; + if (pTask->ver < SSTREAM_TASK_SUBTABLE_CHANGED_VER){ + pTask->ver = SSTREAM_TASK_VER; + } tEncodeStreamTask(&encoder, pTask); int32_t size = encoder.pos; diff --git a/source/dnode/vnode/src/tq/tqSink.c b/source/dnode/vnode/src/tq/tqSink.c index 5374b9aa78..1e0ae7a854 100644 --- a/source/dnode/vnode/src/tq/tqSink.c +++ b/source/dnode/vnode/src/tq/tqSink.c @@ -71,8 +71,8 @@ int32_t tqBuildDeleteReq(STQ* pTq, const char* stbFullName, const SSDataBlock* p if (varTbName != NULL && varTbName != (void*)-1) { name = taosMemoryCalloc(1, TSDB_TABLE_NAME_LEN); memcpy(name, varDataVal(varTbName), varDataLen(varTbName)); - if (newSubTableRule && !isAutoTableName(name) && !alreadyAddGroupId(name) && groupId != 0) { - buildCtbNameAddGroupId(name, groupId); + if (newSubTableRule && !isAutoTableName(name) && !alreadyAddGroupId(name) && groupId != 0 && stbFullName) { + buildCtbNameAddGroupId(stbFullName, name, groupId); } } else if (stbFullName) { name = buildCtbNameByGroupId(stbFullName, groupId); @@ -182,10 +182,10 @@ void setCreateTableMsgTableName(SVCreateTbReq* pCreateTableReq, SSDataBlock* pDa int64_t gid, bool newSubTableRule) { if (pDataBlock->info.parTbName[0]) { if (newSubTableRule && !isAutoTableName(pDataBlock->info.parTbName) && - !alreadyAddGroupId(pDataBlock->info.parTbName) && gid != 0) { + !alreadyAddGroupId(pDataBlock->info.parTbName) && gid != 0 && stbFullName) { pCreateTableReq->name = taosMemoryCalloc(1, TSDB_TABLE_NAME_LEN); strcpy(pCreateTableReq->name, pDataBlock->info.parTbName); - buildCtbNameAddGroupId(pCreateTableReq->name, gid); + buildCtbNameAddGroupId(stbFullName, pCreateTableReq->name, gid); // tqDebug("gen name from:%s", pDataBlock->info.parTbName); } else { pCreateTableReq->name = taosStrdup(pDataBlock->info.parTbName); @@ -671,10 +671,14 @@ int32_t setDstTableDataUid(SVnode* pVnode, SStreamTask* pTask, SSDataBlock* pDat memset(dstTableName, 0, TSDB_TABLE_NAME_LEN); buildCtbNameByGroupIdImpl(stbFullName, groupId, dstTableName); } else { - if (pTask->ver >= SSTREAM_TASK_SUBTABLE_CHANGED_VER && pTask->subtableWithoutMd5 != 1 && - !isAutoTableName(dstTableName) && !alreadyAddGroupId(dstTableName) && groupId != 0) { + if (pTask->subtableWithoutMd5 != 1 && !isAutoTableName(dstTableName) && + !alreadyAddGroupId(dstTableName) && groupId != 0) { tqDebug("s-task:%s append groupId:%" PRId64 " for generated dstTable:%s", id, groupId, dstTableName); - buildCtbNameAddGroupId(dstTableName, groupId); + if(pTask->ver == SSTREAM_TASK_SUBTABLE_CHANGED_VER){ + buildCtbNameAddGroupId(NULL, dstTableName, groupId); + }else if(pTask->ver > SSTREAM_TASK_SUBTABLE_CHANGED_VER && stbFullName) { + buildCtbNameAddGroupId(stbFullName, dstTableName, groupId); + } } } diff --git a/source/libs/stream/src/streamDispatch.c b/source/libs/stream/src/streamDispatch.c index 0af664f1e1..9542009d72 100644 --- a/source/libs/stream/src/streamDispatch.c +++ b/source/libs/stream/src/streamDispatch.c @@ -580,12 +580,15 @@ int32_t streamSearchAndAddBlock(SStreamTask* pTask, SStreamDispatchReq* pReqs, S } else { char ctbName[TSDB_TABLE_FNAME_LEN] = {0}; if (pDataBlock->info.parTbName[0]) { - if(pTask->ver >= SSTREAM_TASK_SUBTABLE_CHANGED_VER && - pTask->subtableWithoutMd5 != 1 && + if(pTask->subtableWithoutMd5 != 1 && !isAutoTableName(pDataBlock->info.parTbName) && !alreadyAddGroupId(pDataBlock->info.parTbName) && groupId != 0){ - buildCtbNameAddGroupId(pDataBlock->info.parTbName, groupId); + if(pTask->ver == SSTREAM_TASK_SUBTABLE_CHANGED_VER){ + buildCtbNameAddGroupId(NULL, pDataBlock->info.parTbName, groupId); + }else if(pTask->ver > SSTREAM_TASK_SUBTABLE_CHANGED_VER) { + buildCtbNameAddGroupId(pTask->outputInfo.shuffleDispatcher.stbFullName, pDataBlock->info.parTbName, groupId); + } } } else { buildCtbNameByGroupIdImpl(pTask->outputInfo.shuffleDispatcher.stbFullName, groupId, pDataBlock->info.parTbName); diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index c24763c024..aae3594905 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -542,7 +542,6 @@ int32_t streamMetaSaveTask(SStreamMeta* pMeta, SStreamTask* pTask) { void* buf = NULL; int32_t len; int32_t code; - pTask->ver = SSTREAM_TASK_VER; tEncodeSize(tEncodeStreamTask, pTask, len, code); if (code < 0) { return -1; @@ -552,6 +551,9 @@ int32_t streamMetaSaveTask(SStreamMeta* pMeta, SStreamTask* pTask) { return -1; } + if (pTask->ver < SSTREAM_TASK_SUBTABLE_CHANGED_VER){ + pTask->ver = SSTREAM_TASK_VER; + } SEncoder encoder = {0}; tEncoderInit(&encoder, buf, len); tEncodeStreamTask(&encoder, pTask); diff --git a/tests/system-test/8-stream/stream_basic.py b/tests/system-test/8-stream/stream_basic.py index 3ebc255114..f08cca1e13 100644 --- a/tests/system-test/8-stream/stream_basic.py +++ b/tests/system-test/8-stream/stream_basic.py @@ -78,8 +78,30 @@ class TDTestCase: tdLog.info(cmd) os.system(cmd) + def case1(self): + + tdSql.execute(f'create database if not exists d1 vgroups 1') + tdSql.execute(f'use d1') + tdSql.execute(f'create table st(ts timestamp, i int) tags(t int)') + tdSql.execute(f'insert into t1 using st tags(1) values(now, 1) (now+1s, 2)') + tdSql.execute(f'insert into t2 using st tags(2) values(now, 1) (now+1s, 2)') + tdSql.execute(f'insert into t3 using st tags(3) values(now, 1) (now+1s, 2)') + + tdSql.execute("create stream stream1 fill_history 1 into sta subtable(concat('new-', tname)) AS SELECT " + "_wstart, count(*), avg(i) FROM st PARTITION BY tbname tname INTERVAL(1m)", show=True) + + tdSql.execute("create stream stream2 fill_history 1 into sta subtable(concat('new-', tname)) AS SELECT " + "_wstart, count(*), avg(i) FROM st PARTITION BY tbname tname INTERVAL(1m)", show=True) + + time.sleep(2) + tdSql.query("select * from sta") + tdSql.checkRows(3) + + tdSql.query("select * from stb") + tdSql.checkRows(3) # run def run(self): + self.case1() # gen data random.seed(int(time.time())) self.taosBenchmark(" -d db -t 2 -v 2 -n 1000000 -y") From 570d78c58d201aa275bf716a0d971b80d08a7b4c Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Thu, 28 Mar 2024 17:54:00 +0800 Subject: [PATCH 23/34] fix:test case error --- tests/system-test/8-stream/stream_basic.py | 2 +- tests/system-test/buildJson.py | 243 +++++++++++++++++++++ 2 files changed, 244 insertions(+), 1 deletion(-) create mode 100644 tests/system-test/buildJson.py diff --git a/tests/system-test/8-stream/stream_basic.py b/tests/system-test/8-stream/stream_basic.py index f08cca1e13..8dfb14da56 100644 --- a/tests/system-test/8-stream/stream_basic.py +++ b/tests/system-test/8-stream/stream_basic.py @@ -90,7 +90,7 @@ class TDTestCase: tdSql.execute("create stream stream1 fill_history 1 into sta subtable(concat('new-', tname)) AS SELECT " "_wstart, count(*), avg(i) FROM st PARTITION BY tbname tname INTERVAL(1m)", show=True) - tdSql.execute("create stream stream2 fill_history 1 into sta subtable(concat('new-', tname)) AS SELECT " + tdSql.execute("create stream stream2 fill_history 1 into stb subtable(concat('new-', tname)) AS SELECT " "_wstart, count(*), avg(i) FROM st PARTITION BY tbname tname INTERVAL(1m)", show=True) time.sleep(2) diff --git a/tests/system-test/buildJson.py b/tests/system-test/buildJson.py new file mode 100644 index 0000000000..6e9e9f83e1 --- /dev/null +++ b/tests/system-test/buildJson.py @@ -0,0 +1,243 @@ +# 写一段python代码,生成一个JSON串,json 串为数组,数组长度为10000,每个元素为包含4000个key-value对的JSON字符串,json 数组里每个元素里的4000个key不相同,元素之间使用相同的key,key值为英文单词,value 为int值,且value 的范围是[0, 256]。把json串紧凑形式写入文件,把json串存入parquet文件中,把json串写入avro文件中,把json串写入到postgre sql表中,表有两列第一列主int类型主键,第二列为json类型,数组的每个元素写入json类型里 +import csv +import json +import os +import random +import string +import time + +from faker import Faker +import pandas as pd +import pyarrow as pa +import pyarrow.parquet as pq +import fastavro +import psycopg2 +from psycopg2.extras import Json + + +def get_dir_size(start_path='.'): + total = 0 + for dirpath, dirs, files in os.walk(start_path): + for f in files: + fp = os.path.join(dirpath, f) + # 获取文件大小并累加到total上 + total += os.path.getsize(fp) + return total + + +def to_avro_record(obj): + return {key: value for key, value in obj.items()} + + +def generate_random_string(length): + return ''.join(random.choices(string.ascii_letters + string.digits, k=length)) + + +def generate_random_values(t): + if t == 0: + return random.randint(-255, 256) + elif t == 1: + return random.randint(-2100000000, 2100000000) + elif t == 2: + return random.uniform(-10000.0, 10000.0) + elif t == 3: + return generate_random_string(10) + elif t == 4: + return random.choice([True, False]) + + +def generate_json_object(key_set, value_set): + values = [generate_random_values(t) for t in value_set] + return dict(zip(key_set, values)) + + +def generate_json_array(keys, values, array_length): + return [generate_json_object(keys, values) for _ in range(array_length)] + + +def write_parquet_file(parquet_file, json_array): + df = pd.DataFrame(json_array) + table = pa.Table.from_pandas(df) + pq.write_table(table, parquet_file + ".parquet") + + +def write_json_file(json_file, json_array): + with open(json_file + ".json", 'w') as f: + json.dump(json_array, f, separators=(',', ':')) + + +def generate_avro_schema(k, t): + if t == 0: + return {"name": k, "type": "int", "logicalType": "int"} + elif t == 1: + return {"name": k, "type": "int", "logicalType": "int"} + elif t == 2: + return {"name": k, "type": "float"} + elif t == 3: + return {"name": k, "type": "string"} + elif t == 4: + return {"name": k, "type": "boolean"} + + +def write_avro_file(avro_file, json_array, keys, values): + k = list(json_array[0].keys()) + + if keys != k: + raise ValueError("keys and values should have the same length") + + avro_schema = { + "type": "record", + "name": "MyRecord", + "fields": [generate_avro_schema(k, v) for k, v in dict(zip(keys, values)).items()] + } + + avro_records = [to_avro_record(obj) for obj in json_array] + with open(avro_file + ".avro", 'wb') as f: + fastavro.writer(f, avro_schema, avro_records) + + +def write_pg_file(json_array): + conn_str = "dbname=mydatabase user=myuser host=localhost" + conn = psycopg2.connect(conn_str) + cur = conn.cursor() + + cur.execute("drop table if exists my_table") + conn.commit() + + # 创建表(如果不存在) + cur.execute(""" + CREATE TABLE IF NOT EXISTS my_table ( + id SERIAL PRIMARY KEY, + json_data JSONB + ); + """) + conn.commit() + + # 执行SQL查询 + cur.execute("SELECT count(*) FROM my_table") + # 获取查询结果 + rows = cur.fetchall() + # 打印查询结果 + for row in rows: + print("rows before:", row[0]) + + # 插入数据 + for idx, json_obj in enumerate(json_array): + # print(json.dumps(json_obj)) + cur.execute("INSERT INTO my_table (json_data) VALUES (%s)", (json.dumps(json_obj),)) + + conn.commit() # 提交事务 + + # 执行SQL查询 + cur.execute("SELECT count(*) FROM my_table") + # 获取查询结果 + rows = cur.fetchall() + # 打印查询结果 + for row in rows: + print("rows after:", row[0]) + + # # 执行SQL查询 + # cur.execute("SELECT pg_relation_size('my_table')") + # # 获取查询结果 + # rows = cur.fetchall() + # # 打印查询结果 + # size = 0 + # for row in rows: + # size = row[0] + # print("table size:", row[0]) + + # 关闭游标和连接 + cur.close() + conn.close() + +def read_parquet_file(parquet_file): + table = pq.read_table(parquet_file + ".parquet") + df = table.to_pandas() + print(df) + + +def read_avro_file(avg_file): + with open(avg_file + ".avro", 'rb') as f: + reader = fastavro.reader(f) + + for record in reader: + print(record) + + +def read_json_file(csv_file): + with open(csv_file + ".json", 'r') as f: + data = json.load(f) + print(data) + + +def main(): + key_length = 7 + key_sizes = 4000 + row_sizes = 10000 + file_name = "output" + + # cases = [(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (0, 4)] + cases = [(2, 2), (3, 3), (0, 4)] + + for data in cases: + begin, end = data + print(f"执行类型:{begin}-{end}") + + N = 2 + for _ in range(N): + + t0 = time.time() + + keys = [generate_random_string(key_length) for _ in range(key_sizes)] + values = [random.randint(begin, end) for _ in range(key_sizes)] + # 生成JSON数组 + json_array = generate_json_array(keys, values, row_sizes) + + t1 = time.time() + + write_json_file(file_name, json_array) + + t2 = time.time() + + write_parquet_file(file_name, json_array) + + t3 = time.time() + + write_avro_file(file_name, json_array, keys, values) + + t4 = time.time() + + size = write_pg_file(json_array) + + t5 = time.time() + + print("生成json 速度:", t2 - t0, "文件大小:", os.path.getsize(file_name + ".json")) + print("parquet 速度:", t3 - t2, "文件大小:", os.path.getsize(file_name + ".parquet")) + print("avro 速度:", t4 - t3, "文件大小:", os.path.getsize(file_name + ".avro")) + print("pg json 速度:", t5 - t4, "文件大小:", get_dir_size("/opt/homebrew/var/postgresql@14/base/16385") - 8 * 1024 * 1024) + + # read_json_file(file_name) + # read_parquet_file(file_name) + # read_avro_file(file_name) + print(f"\n---------------\n") + +if __name__ == "__main__": + main() + +# 压缩文件 +# import os +# +# import lz4.frame +# +# +# files =["output.json", "output.parquet", "output.avro"] +# def compress_file(input_path, output_path): +# with open(input_path, 'rb') as f_in: +# compressed_data = lz4.frame.compress(f_in.read()) +# +# with open(output_path, 'wb') as f_out: +# f_out.write(compressed_data) +# +# for file in files: +# compress_file(file, file + ".lz4") +# print(file, "origin size:", os.path.getsize(file), " after lsz size:", os.path.getsize(file + ".lz4")) From 00cc68a7903e689941bf32b8da2a69a921f7b350 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Fri, 29 Mar 2024 09:07:09 +0800 Subject: [PATCH 24/34] fix:test case error --- tests/system-test/8-stream/stream_basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system-test/8-stream/stream_basic.py b/tests/system-test/8-stream/stream_basic.py index 8dfb14da56..5167423ea3 100644 --- a/tests/system-test/8-stream/stream_basic.py +++ b/tests/system-test/8-stream/stream_basic.py @@ -107,7 +107,7 @@ class TDTestCase: self.taosBenchmark(" -d db -t 2 -v 2 -n 1000000 -y") # create stream tdSql.execute("use db") - tdSql.execute("create stream stream1 fill_history 1 into sta as select count(*) as cnt from meters interval(10a);",show=True) + tdSql.execute("create stream stream3 fill_history 1 into sta as select count(*) as cnt from meters interval(10a);",show=True) sql = "select count(*) from sta" # loop wait max 60s to check count is ok tdLog.info("loop wait result ...") From ba65f5a519622acaad6dcb2ae8b9f5c13edaa223 Mon Sep 17 00:00:00 2001 From: kailixu Date: Sun, 31 Mar 2024 20:50:02 +0800 Subject: [PATCH 25/34] enh: integer with duration literal for timestamp --- source/libs/parser/inc/sql.y | 120 + source/libs/parser/src/sql.c | 4823 +++++++---------- tests/script/tsim/parser/columnValue_bool.sim | 3 + tests/script/tsim/parser/columnValue_int.sim | 2 + .../tsim/parser/columnValue_timestamp.sim | 271 + .../tsim/parser/columnValue_varbinary.sim | 6 + .../tsim/parser/columnValue_varchar.sim | 11 + 7 files changed, 2229 insertions(+), 3007 deletions(-) diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index b96a02e136..88af526d79 100755 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -747,16 +747,52 @@ insert_query(A) ::= INSERT INTO full_table_name(C) query_or_subquery(B). /************************************************ tags_literal *************************************************************/ tags_literal(A) ::= NK_INTEGER(B). { A = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &B, NULL); } +tags_literal(A) ::= NK_INTEGER(B) NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_INTEGER(B) NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_PLUS(B) NK_INTEGER(C). { SToken t = B; t.n = (C.z + C.n) - B.z; A = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); } +tags_literal(A) ::= NK_PLUS(B) NK_INTEGER NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_PLUS(B) NK_INTEGER NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_MINUS(B) NK_INTEGER(C). { SToken t = B; t.n = (C.z + C.n) - B.z; A = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); } +tags_literal(A) ::= NK_MINUS(B) NK_INTEGER NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_MINUS(B) NK_INTEGER NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_FLOAT(B). { A = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &B, NULL); } tags_literal(A) ::= NK_PLUS(B) NK_FLOAT(C). { SToken t = B; @@ -770,29 +806,113 @@ tags_literal(A) ::= NK_MINUS(B) NK_FLOAT(C). } tags_literal(A) ::= NK_BIN(B). { A = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &B, NULL); } +tags_literal(A) ::= NK_BIN(B) NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_BIN(B) NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_PLUS(B) NK_BIN(C). { SToken t = B; t.n = (C.z + C.n) - B.z; A = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); } +tags_literal(A) ::= NK_PLUS(B) NK_BIN NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_PLUS(B) NK_BIN NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_MINUS(B) NK_BIN(C). { SToken t = B; t.n = (C.z + C.n) - B.z; A = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); } +tags_literal(A) ::= NK_MINUS(B) NK_BIN NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_MINUS(B) NK_BIN NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_HEX(B). { A = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &B, NULL); } +tags_literal(A) ::= NK_HEX(B) NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_HEX(B) NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_PLUS(B) NK_HEX(C). { SToken t = B; t.n = (C.z + C.n) - B.z; A = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); } +tags_literal(A) ::= NK_PLUS(B) NK_HEX NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_PLUS(B) NK_HEX NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_MINUS(B) NK_HEX(C). { SToken t = B; t.n = (C.z + C.n) - B.z; A = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); } +tags_literal(A) ::= NK_MINUS(B) NK_HEX NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_MINUS(B) NK_HEX NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_STRING(B). { A = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &B, NULL); } +tags_literal(A) ::= NK_STRING(B) NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_STRING(B) NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_BOOL(B). { A = createRawValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &B, NULL); } tags_literal(A) ::= NULL(B). { A = createRawValueNode(pCxt, TSDB_DATA_TYPE_NULL, &B, NULL); } diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index a0b47af082..b8d1bb7f27 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -1,5 +1,3 @@ -/* This file is automatically generated by Lemon from input grammar -** source file "sql.y". */ /* ** 2000-05-29 ** @@ -24,8 +22,9 @@ ** The following is the concatenation of all %include directives from the ** input grammar file: */ +#include +#include /************ Begin %include sections from the grammar ************************/ -#line 11 "sql.y" #include #include @@ -42,366 +41,12 @@ #include "parAst.h" #define YYSTACKDEPTH 0 -#line 46 "sql.c" /**************** End of %include directives **********************************/ -/* These constants specify the various numeric values for terminal symbols. -***************** Begin token definitions *************************************/ -#ifndef TK_OR -#define TK_OR 1 -#define TK_AND 2 -#define TK_UNION 3 -#define TK_ALL 4 -#define TK_MINUS 5 -#define TK_EXCEPT 6 -#define TK_INTERSECT 7 -#define TK_NK_BITAND 8 -#define TK_NK_BITOR 9 -#define TK_NK_LSHIFT 10 -#define TK_NK_RSHIFT 11 -#define TK_NK_PLUS 12 -#define TK_NK_MINUS 13 -#define TK_NK_STAR 14 -#define TK_NK_SLASH 15 -#define TK_NK_REM 16 -#define TK_NK_CONCAT 17 -#define TK_CREATE 18 -#define TK_ACCOUNT 19 -#define TK_NK_ID 20 -#define TK_PASS 21 -#define TK_NK_STRING 22 -#define TK_ALTER 23 -#define TK_PPS 24 -#define TK_TSERIES 25 -#define TK_STORAGE 26 -#define TK_STREAMS 27 -#define TK_QTIME 28 -#define TK_DBS 29 -#define TK_USERS 30 -#define TK_CONNS 31 -#define TK_STATE 32 -#define TK_NK_COMMA 33 -#define TK_HOST 34 -#define TK_USER 35 -#define TK_ENABLE 36 -#define TK_NK_INTEGER 37 -#define TK_SYSINFO 38 -#define TK_ADD 39 -#define TK_DROP 40 -#define TK_GRANT 41 -#define TK_ON 42 -#define TK_TO 43 -#define TK_REVOKE 44 -#define TK_FROM 45 -#define TK_SUBSCRIBE 46 -#define TK_READ 47 -#define TK_WRITE 48 -#define TK_NK_DOT 49 -#define TK_WITH 50 -#define TK_DNODE 51 -#define TK_PORT 52 -#define TK_DNODES 53 -#define TK_RESTORE 54 -#define TK_NK_IPTOKEN 55 -#define TK_FORCE 56 -#define TK_UNSAFE 57 -#define TK_CLUSTER 58 -#define TK_LOCAL 59 -#define TK_QNODE 60 -#define TK_BNODE 61 -#define TK_SNODE 62 -#define TK_MNODE 63 -#define TK_VNODE 64 -#define TK_DATABASE 65 -#define TK_USE 66 -#define TK_FLUSH 67 -#define TK_TRIM 68 -#define TK_COMPACT 69 -#define TK_IF 70 -#define TK_NOT 71 -#define TK_EXISTS 72 -#define TK_BUFFER 73 -#define TK_CACHEMODEL 74 -#define TK_CACHESIZE 75 -#define TK_COMP 76 -#define TK_DURATION 77 -#define TK_NK_VARIABLE 78 -#define TK_MAXROWS 79 -#define TK_MINROWS 80 -#define TK_KEEP 81 -#define TK_PAGES 82 -#define TK_PAGESIZE 83 -#define TK_TSDB_PAGESIZE 84 -#define TK_PRECISION 85 -#define TK_REPLICA 86 -#define TK_VGROUPS 87 -#define TK_SINGLE_STABLE 88 -#define TK_RETENTIONS 89 -#define TK_SCHEMALESS 90 -#define TK_WAL_LEVEL 91 -#define TK_WAL_FSYNC_PERIOD 92 -#define TK_WAL_RETENTION_PERIOD 93 -#define TK_WAL_RETENTION_SIZE 94 -#define TK_WAL_ROLL_PERIOD 95 -#define TK_WAL_SEGMENT_SIZE 96 -#define TK_STT_TRIGGER 97 -#define TK_TABLE_PREFIX 98 -#define TK_TABLE_SUFFIX 99 -#define TK_KEEP_TIME_OFFSET 100 -#define TK_NK_COLON 101 -#define TK_BWLIMIT 102 -#define TK_START 103 -#define TK_TIMESTAMP 104 -#define TK_END 105 -#define TK_TABLE 106 -#define TK_NK_LP 107 -#define TK_NK_RP 108 -#define TK_STABLE 109 -#define TK_COLUMN 110 -#define TK_MODIFY 111 -#define TK_RENAME 112 -#define TK_TAG 113 -#define TK_SET 114 -#define TK_NK_EQ 115 -#define TK_USING 116 -#define TK_TAGS 117 -#define TK_BOOL 118 -#define TK_TINYINT 119 -#define TK_SMALLINT 120 -#define TK_INT 121 -#define TK_INTEGER 122 -#define TK_BIGINT 123 -#define TK_FLOAT 124 -#define TK_DOUBLE 125 -#define TK_BINARY 126 -#define TK_NCHAR 127 -#define TK_UNSIGNED 128 -#define TK_JSON 129 -#define TK_VARCHAR 130 -#define TK_MEDIUMBLOB 131 -#define TK_BLOB 132 -#define TK_VARBINARY 133 -#define TK_GEOMETRY 134 -#define TK_DECIMAL 135 -#define TK_COMMENT 136 -#define TK_MAX_DELAY 137 -#define TK_WATERMARK 138 -#define TK_ROLLUP 139 -#define TK_TTL 140 -#define TK_SMA 141 -#define TK_DELETE_MARK 142 -#define TK_FIRST 143 -#define TK_LAST 144 -#define TK_SHOW 145 -#define TK_PRIVILEGES 146 -#define TK_DATABASES 147 -#define TK_TABLES 148 -#define TK_STABLES 149 -#define TK_MNODES 150 -#define TK_QNODES 151 -#define TK_ARBGROUPS 152 -#define TK_FUNCTIONS 153 -#define TK_INDEXES 154 -#define TK_ACCOUNTS 155 -#define TK_APPS 156 -#define TK_CONNECTIONS 157 -#define TK_LICENCES 158 -#define TK_GRANTS 159 -#define TK_FULL 160 -#define TK_LOGS 161 -#define TK_MACHINES 162 -#define TK_QUERIES 163 -#define TK_SCORES 164 -#define TK_TOPICS 165 -#define TK_VARIABLES 166 -#define TK_BNODES 167 -#define TK_SNODES 168 -#define TK_TRANSACTIONS 169 -#define TK_DISTRIBUTED 170 -#define TK_CONSUMERS 171 -#define TK_SUBSCRIPTIONS 172 -#define TK_VNODES 173 -#define TK_ALIVE 174 -#define TK_VIEWS 175 -#define TK_VIEW 176 -#define TK_COMPACTS 177 -#define TK_NORMAL 178 -#define TK_CHILD 179 -#define TK_LIKE 180 -#define TK_TBNAME 181 -#define TK_QTAGS 182 -#define TK_AS 183 -#define TK_SYSTEM 184 -#define TK_INDEX 185 -#define TK_FUNCTION 186 -#define TK_INTERVAL 187 -#define TK_COUNT 188 -#define TK_LAST_ROW 189 -#define TK_META 190 -#define TK_ONLY 191 -#define TK_TOPIC 192 -#define TK_CONSUMER 193 -#define TK_GROUP 194 -#define TK_DESC 195 -#define TK_DESCRIBE 196 -#define TK_RESET 197 -#define TK_QUERY 198 -#define TK_CACHE 199 -#define TK_EXPLAIN 200 -#define TK_ANALYZE 201 -#define TK_VERBOSE 202 -#define TK_NK_BOOL 203 -#define TK_RATIO 204 -#define TK_NK_FLOAT 205 -#define TK_OUTPUTTYPE 206 -#define TK_AGGREGATE 207 -#define TK_BUFSIZE 208 -#define TK_LANGUAGE 209 -#define TK_REPLACE 210 -#define TK_STREAM 211 -#define TK_INTO 212 -#define TK_PAUSE 213 -#define TK_RESUME 214 -#define TK_TRIGGER 215 -#define TK_AT_ONCE 216 -#define TK_WINDOW_CLOSE 217 -#define TK_IGNORE 218 -#define TK_EXPIRED 219 -#define TK_FILL_HISTORY 220 -#define TK_UPDATE 221 -#define TK_SUBTABLE 222 -#define TK_UNTREATED 223 -#define TK_KILL 224 -#define TK_CONNECTION 225 -#define TK_TRANSACTION 226 -#define TK_BALANCE 227 -#define TK_VGROUP 228 -#define TK_LEADER 229 -#define TK_MERGE 230 -#define TK_REDISTRIBUTE 231 -#define TK_SPLIT 232 -#define TK_DELETE 233 -#define TK_INSERT 234 -#define TK_NK_BIN 235 -#define TK_NK_HEX 236 -#define TK_NULL 237 -#define TK_NK_QUESTION 238 -#define TK_NK_ALIAS 239 -#define TK_NK_ARROW 240 -#define TK_ROWTS 241 -#define TK_QSTART 242 -#define TK_QEND 243 -#define TK_QDURATION 244 -#define TK_WSTART 245 -#define TK_WEND 246 -#define TK_WDURATION 247 -#define TK_IROWTS 248 -#define TK_ISFILLED 249 -#define TK_CAST 250 -#define TK_NOW 251 -#define TK_TODAY 252 -#define TK_TIMEZONE 253 -#define TK_CLIENT_VERSION 254 -#define TK_SERVER_VERSION 255 -#define TK_SERVER_STATUS 256 -#define TK_CURRENT_USER 257 -#define TK_CASE 258 -#define TK_WHEN 259 -#define TK_THEN 260 -#define TK_ELSE 261 -#define TK_BETWEEN 262 -#define TK_IS 263 -#define TK_NK_LT 264 -#define TK_NK_GT 265 -#define TK_NK_LE 266 -#define TK_NK_GE 267 -#define TK_NK_NE 268 -#define TK_MATCH 269 -#define TK_NMATCH 270 -#define TK_CONTAINS 271 -#define TK_IN 272 -#define TK_JOIN 273 -#define TK_INNER 274 -#define TK_SELECT 275 -#define TK_NK_HINT 276 -#define TK_DISTINCT 277 -#define TK_WHERE 278 -#define TK_PARTITION 279 -#define TK_BY 280 -#define TK_SESSION 281 -#define TK_STATE_WINDOW 282 -#define TK_EVENT_WINDOW 283 -#define TK_COUNT_WINDOW 284 -#define TK_SLIDING 285 -#define TK_FILL 286 -#define TK_VALUE 287 -#define TK_VALUE_F 288 -#define TK_NONE 289 -#define TK_PREV 290 -#define TK_NULL_F 291 -#define TK_LINEAR 292 -#define TK_NEXT 293 -#define TK_HAVING 294 -#define TK_RANGE 295 -#define TK_EVERY 296 -#define TK_ORDER 297 -#define TK_SLIMIT 298 -#define TK_SOFFSET 299 -#define TK_LIMIT 300 -#define TK_OFFSET 301 -#define TK_ASC 302 -#define TK_NULLS 303 -#define TK_ABORT 304 -#define TK_AFTER 305 -#define TK_ATTACH 306 -#define TK_BEFORE 307 -#define TK_BEGIN 308 -#define TK_BITAND 309 -#define TK_BITNOT 310 -#define TK_BITOR 311 -#define TK_BLOCKS 312 -#define TK_CHANGE 313 -#define TK_COMMA 314 -#define TK_CONCAT 315 -#define TK_CONFLICT 316 -#define TK_COPY 317 -#define TK_DEFERRED 318 -#define TK_DELIMITERS 319 -#define TK_DETACH 320 -#define TK_DIVIDE 321 -#define TK_DOT 322 -#define TK_EACH 323 -#define TK_FAIL 324 -#define TK_FILE 325 -#define TK_FOR 326 -#define TK_GLOB 327 -#define TK_ID 328 -#define TK_IMMEDIATE 329 -#define TK_IMPORT 330 -#define TK_INITIALLY 331 -#define TK_INSTEAD 332 -#define TK_ISNULL 333 -#define TK_KEY 334 -#define TK_MODULES 335 -#define TK_NK_BITNOT 336 -#define TK_NK_SEMI 337 -#define TK_NOTNULL 338 -#define TK_OF 339 -#define TK_PLUS 340 -#define TK_PRIVILEGE 341 -#define TK_RAISE 342 -#define TK_RESTRICT 343 -#define TK_ROW 344 -#define TK_SEMI 345 -#define TK_STAR 346 -#define TK_STATEMENT 347 -#define TK_STRICT 348 -#define TK_STRING 349 -#define TK_TIMES 350 -#define TK_VALUES 351 -#define TK_VARIABLE 352 -#define TK_WAL 353 -#endif -/**************** End token definitions ***************************************/ +/* These constants specify the various numeric values for terminal symbols +** in a format understandable to "makeheaders". This section is blank unless +** "lemon" is run with the "-m" command-line option. +***************** Begin makeheaders token definitions *************************/ +/**************** End makeheaders token definitions ***************************/ /* The next sections is a series of control #defines. ** various aspects of the generated parser. @@ -497,18 +142,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 860 -#define YYNRULE 671 -#define YYNRULE_WITH_ACTION 671 +#define YYNSTATE 890 +#define YYNRULE 691 +#define YYNRULE_WITH_ACTION 691 #define YYNTOKEN 354 -#define YY_MAX_SHIFT 859 -#define YY_MIN_SHIFTREDUCE 1282 -#define YY_MAX_SHIFTREDUCE 1952 -#define YY_ERROR_ACTION 1953 -#define YY_ACCEPT_ACTION 1954 -#define YY_NO_ACTION 1955 -#define YY_MIN_REDUCE 1956 -#define YY_MAX_REDUCE 2626 +#define YY_MAX_SHIFT 889 +#define YY_MIN_SHIFTREDUCE 1322 +#define YY_MAX_SHIFTREDUCE 2012 +#define YY_ERROR_ACTION 2013 +#define YY_ACCEPT_ACTION 2014 +#define YY_NO_ACTION 2015 +#define YY_MIN_REDUCE 2016 +#define YY_MAX_REDUCE 2706 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -577,311 +222,311 @@ typedef union { *********** Begin parsing tables **********************************************/ #define YY_ACTTAB_COUNT (3048) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 481, 428, 2122, 2384, 711, 2401, 426, 2597, 2531, 169, - /* 10 */ 37, 310, 47, 45, 1874, 574, 405, 2148, 575, 1999, - /* 20 */ 419, 2285, 1714, 2531, 2197, 710, 204, 760, 474, 2405, - /* 30 */ 2598, 712, 2285, 473, 2528, 1800, 2042, 1712, 1740, 2283, - /* 40 */ 748, 2602, 654, 2425, 2597, 541, 539, 422, 370, 2527, - /* 50 */ 2282, 748, 218, 723, 147, 2199, 726, 652, 425, 650, - /* 60 */ 271, 270, 404, 2601, 666, 1795, 2199, 2598, 2600, 765, - /* 70 */ 2197, 19, 800, 388, 2407, 2409, 416, 571, 1720, 682, - /* 80 */ 705, 2197, 2597, 1739, 2443, 765, 569, 40, 39, 565, - /* 90 */ 561, 46, 44, 43, 42, 41, 2391, 66, 743, 582, - /* 100 */ 2603, 204, 575, 1999, 856, 2598, 712, 15, 2443, 831, - /* 110 */ 830, 829, 828, 437, 50, 827, 826, 152, 821, 820, - /* 120 */ 819, 818, 817, 816, 815, 151, 809, 808, 807, 436, - /* 130 */ 435, 804, 803, 802, 184, 183, 801, 760, 2424, 584, - /* 140 */ 2324, 2462, 1429, 1802, 1803, 115, 2426, 747, 2428, 2429, - /* 150 */ 742, 706, 765, 711, 1740, 1979, 2597, 187, 591, 2516, - /* 160 */ 9, 1613, 1614, 415, 2512, 302, 2524, 722, 1329, 139, - /* 170 */ 721, 704, 2597, 62, 710, 204, 723, 147, 206, 2598, - /* 180 */ 712, 1774, 1784, 1431, 761, 2146, 2546, 1978, 1801, 1804, - /* 190 */ 710, 204, 1327, 1328, 1739, 2598, 712, 1956, 430, 665, - /* 200 */ 62, 2192, 2194, 1715, 209, 1713, 1612, 1615, 2391, 1977, - /* 210 */ 723, 147, 40, 39, 592, 2278, 46, 44, 43, 42, + /* 0 */ 511, 458, 2182, 2464, 741, 2481, 456, 2677, 2611, 169, + /* 10 */ 37, 310, 47, 45, 1934, 604, 425, 2208, 605, 2059, + /* 20 */ 439, 2345, 1774, 2611, 2257, 740, 204, 790, 504, 2485, + /* 30 */ 2678, 742, 2345, 503, 2608, 1860, 2102, 1772, 1800, 2343, + /* 40 */ 778, 2682, 684, 2505, 2677, 571, 569, 442, 390, 2607, + /* 50 */ 2342, 778, 218, 753, 147, 2259, 756, 682, 445, 680, + /* 60 */ 271, 270, 424, 2681, 696, 1855, 2259, 2678, 2680, 795, + /* 70 */ 2257, 19, 830, 408, 2487, 2489, 436, 601, 1780, 712, + /* 80 */ 735, 2257, 2677, 1799, 2523, 795, 599, 40, 39, 595, + /* 90 */ 591, 46, 44, 43, 42, 41, 2471, 66, 773, 612, + /* 100 */ 2683, 204, 605, 2059, 886, 2678, 742, 15, 2523, 861, + /* 110 */ 860, 859, 858, 467, 50, 857, 856, 152, 851, 850, + /* 120 */ 849, 848, 847, 846, 845, 151, 839, 838, 837, 466, + /* 130 */ 465, 834, 833, 832, 184, 183, 831, 790, 2504, 614, + /* 140 */ 2384, 2542, 1469, 1862, 1863, 115, 2506, 777, 2508, 2509, + /* 150 */ 772, 736, 795, 741, 1800, 2039, 2677, 187, 621, 2596, + /* 160 */ 9, 1653, 1654, 435, 2592, 302, 2604, 752, 1369, 139, + /* 170 */ 751, 734, 2677, 62, 740, 204, 753, 147, 206, 2678, + /* 180 */ 742, 1834, 1844, 1471, 791, 2206, 2626, 2038, 1861, 1864, + /* 190 */ 740, 204, 1367, 1368, 1799, 2678, 742, 2016, 460, 695, + /* 200 */ 62, 2252, 2254, 1775, 209, 1773, 1652, 1655, 2471, 2037, + /* 210 */ 753, 147, 40, 39, 622, 2338, 46, 44, 43, 42, /* 220 */ 41, 137, 136, 135, 134, 133, 132, 131, 130, 129, - /* 230 */ 798, 162, 161, 795, 794, 793, 159, 1718, 1719, 1771, - /* 240 */ 2391, 1773, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, - /* 250 */ 739, 763, 762, 1794, 1796, 1797, 1798, 1799, 2, 47, - /* 260 */ 45, 107, 2391, 760, 368, 2333, 1737, 419, 472, 1714, - /* 270 */ 471, 761, 2146, 524, 1949, 380, 544, 1521, 1522, 621, - /* 280 */ 1831, 543, 1800, 620, 1712, 2045, 2139, 725, 202, 2524, - /* 290 */ 2525, 138, 145, 2529, 761, 2146, 33, 504, 617, 545, - /* 300 */ 470, 1899, 40, 39, 369, 506, 46, 44, 43, 42, - /* 310 */ 41, 175, 1795, 1968, 138, 484, 1900, 1486, 19, 1829, - /* 320 */ 276, 622, 203, 2524, 2525, 1720, 145, 2529, 434, 433, - /* 330 */ 811, 1477, 790, 789, 788, 1481, 787, 1483, 1484, 786, - /* 340 */ 783, 306, 1492, 780, 1494, 1495, 777, 774, 771, 1742, - /* 350 */ 50, 856, 391, 1721, 15, 1593, 1594, 1898, 636, 635, - /* 360 */ 634, 2602, 34, 492, 2597, 626, 144, 630, 306, 239, - /* 370 */ 1771, 629, 1836, 577, 579, 2007, 628, 633, 398, 397, - /* 380 */ 576, 1948, 627, 2601, 1830, 623, 2123, 2598, 2599, 1322, - /* 390 */ 1802, 1803, 1863, 2272, 2251, 813, 532, 531, 530, 529, - /* 400 */ 528, 523, 522, 521, 520, 374, 761, 2146, 1329, 510, - /* 410 */ 509, 508, 507, 501, 500, 499, 1957, 494, 493, 389, - /* 420 */ 2193, 2194, 458, 485, 1581, 1582, 55, 1976, 1774, 1784, - /* 430 */ 1600, 1324, 1327, 1328, 160, 1801, 1804, 128, 396, 395, - /* 440 */ 127, 126, 125, 124, 123, 122, 121, 120, 119, 2124, - /* 450 */ 1715, 128, 1713, 197, 127, 126, 125, 124, 123, 122, - /* 460 */ 121, 120, 119, 1739, 1714, 2186, 36, 417, 1824, 1825, - /* 470 */ 1826, 1827, 1828, 1832, 1833, 1834, 1835, 241, 1975, 1712, - /* 480 */ 2391, 577, 153, 2007, 1718, 1719, 1771, 701, 1773, 1776, - /* 490 */ 1777, 1778, 1779, 1780, 1781, 1782, 1783, 739, 763, 762, - /* 500 */ 1794, 1796, 1797, 1798, 1799, 2, 12, 47, 45, 54, - /* 510 */ 394, 393, 304, 619, 173, 419, 12, 1714, 306, 344, - /* 520 */ 1720, 1724, 798, 162, 161, 795, 794, 793, 159, 2121, - /* 530 */ 1800, 2391, 1712, 535, 590, 621, 342, 75, 160, 620, - /* 540 */ 74, 2602, 314, 315, 490, 2261, 856, 313, 40, 39, - /* 550 */ 371, 462, 46, 44, 43, 42, 41, 12, 1742, 10, - /* 560 */ 1795, 1743, 237, 556, 554, 551, 19, 636, 635, 634, - /* 570 */ 658, 2137, 657, 1720, 626, 144, 630, 1907, 464, 460, - /* 580 */ 629, 707, 702, 695, 691, 628, 633, 398, 397, 723, - /* 590 */ 147, 627, 1878, 220, 623, 229, 613, 612, 1739, 856, - /* 600 */ 40, 39, 15, 62, 46, 44, 43, 42, 41, 2425, - /* 610 */ 40, 39, 1743, 1657, 46, 44, 43, 42, 41, 2401, - /* 620 */ 534, 228, 744, 1348, 1775, 1347, 425, 698, 697, 1905, - /* 630 */ 1906, 1908, 1909, 1910, 2234, 663, 1694, 765, 1802, 1803, - /* 640 */ 143, 63, 35, 2405, 1739, 1715, 1942, 1713, 40, 39, - /* 650 */ 2443, 185, 46, 44, 43, 42, 41, 1810, 1349, 1348, - /* 660 */ 160, 1347, 2391, 1739, 743, 798, 162, 161, 795, 794, - /* 670 */ 793, 159, 62, 390, 594, 2265, 1774, 1784, 224, 1718, - /* 680 */ 1719, 800, 1772, 1801, 1804, 43, 42, 41, 2407, 2410, - /* 690 */ 51, 85, 84, 477, 1349, 732, 217, 2488, 1715, 765, - /* 700 */ 1713, 205, 2524, 2525, 2424, 145, 2529, 2462, 2385, 469, - /* 710 */ 467, 177, 2426, 747, 2428, 2429, 742, 2352, 765, 91, - /* 720 */ 367, 304, 90, 456, 496, 2261, 453, 449, 445, 442, - /* 730 */ 470, 62, 1718, 1719, 1771, 1660, 1773, 1776, 1777, 1778, - /* 740 */ 1779, 1780, 1781, 1782, 1783, 739, 763, 762, 1794, 1796, - /* 750 */ 1797, 1798, 1799, 2, 47, 45, 1805, 2425, 2412, 1775, - /* 760 */ 2364, 174, 419, 425, 1714, 713, 2618, 791, 274, 2085, - /* 770 */ 744, 306, 273, 222, 765, 200, 1693, 1800, 1720, 1712, - /* 780 */ 1744, 761, 2146, 761, 2146, 171, 2425, 526, 2261, 89, - /* 790 */ 46, 44, 43, 42, 41, 734, 517, 2488, 2443, 726, - /* 800 */ 516, 478, 2365, 479, 1697, 761, 2146, 1795, 515, 1871, - /* 810 */ 2391, 682, 743, 423, 2597, 2199, 2414, 1772, 172, 1743, - /* 820 */ 1720, 172, 414, 185, 1775, 498, 2149, 2443, 666, 2148, - /* 830 */ 2197, 1744, 2603, 204, 1700, 1703, 227, 2598, 712, 2391, - /* 840 */ 306, 743, 99, 1743, 2218, 377, 856, 2266, 403, 48, - /* 850 */ 656, 814, 2424, 682, 2107, 2462, 2597, 2425, 306, 115, - /* 860 */ 2426, 747, 2428, 2429, 742, 1974, 765, 761, 2146, 149, - /* 870 */ 744, 156, 2487, 2516, 2603, 204, 2135, 415, 2512, 2598, - /* 880 */ 712, 2424, 1772, 2029, 2462, 1802, 1803, 511, 115, 2426, - /* 890 */ 747, 2428, 2429, 742, 96, 765, 761, 2146, 2443, 306, - /* 900 */ 187, 428, 2516, 668, 2324, 637, 415, 2512, 664, 172, - /* 910 */ 2391, 392, 743, 2010, 761, 2146, 512, 2148, 2391, 681, - /* 920 */ 2141, 761, 2146, 1774, 1784, 100, 859, 2531, 2199, 2547, - /* 930 */ 1801, 1804, 40, 39, 513, 424, 46, 44, 43, 42, - /* 940 */ 41, 593, 331, 2197, 1696, 1715, 211, 1713, 329, 14, - /* 950 */ 13, 275, 2424, 2526, 1954, 2462, 1641, 29, 194, 115, - /* 960 */ 2426, 747, 2428, 2429, 742, 849, 765, 847, 843, 839, - /* 970 */ 835, 2491, 328, 2516, 1699, 1702, 2131, 415, 2512, 1718, - /* 980 */ 1719, 1771, 195, 1773, 1776, 1777, 1778, 1779, 1780, 1781, - /* 990 */ 1782, 1783, 739, 763, 762, 1794, 1796, 1797, 1798, 1799, - /* 1000 */ 2, 47, 45, 2601, 519, 518, 199, 761, 2146, 419, - /* 1010 */ 112, 1714, 689, 114, 1351, 1352, 321, 761, 2146, 109, - /* 1020 */ 761, 2146, 2425, 1973, 1800, 431, 1712, 2143, 113, 2199, - /* 1030 */ 1662, 1663, 1919, 172, 440, 744, 429, 277, 1744, 439, - /* 1040 */ 285, 2148, 2425, 1331, 2197, 150, 761, 2146, 757, 1738, - /* 1050 */ 615, 614, 60, 2138, 1795, 744, 1843, 2009, 761, 2146, - /* 1060 */ 679, 1972, 1744, 2443, 40, 39, 729, 1720, 46, 44, - /* 1070 */ 43, 42, 41, 632, 631, 2391, 2391, 743, 318, 825, - /* 1080 */ 823, 2425, 1870, 2443, 96, 682, 1971, 1894, 2597, 761, - /* 1090 */ 2146, 1739, 309, 856, 744, 2391, 48, 743, 2133, 308, - /* 1100 */ 2425, 761, 2146, 761, 2146, 792, 2603, 204, 2190, 758, - /* 1110 */ 2142, 2598, 712, 744, 2391, 2554, 49, 2424, 279, 1970, - /* 1120 */ 2462, 759, 2443, 325, 116, 2426, 747, 2428, 2429, 742, - /* 1130 */ 2129, 765, 1802, 1803, 2391, 1441, 743, 2424, 2516, 2391, - /* 1140 */ 2462, 2443, 2199, 2513, 115, 2426, 747, 2428, 2429, 742, - /* 1150 */ 1440, 765, 2199, 2391, 715, 743, 2617, 730, 2516, 1967, - /* 1160 */ 761, 2146, 415, 2512, 1918, 1966, 1965, 756, 718, 1964, - /* 1170 */ 1774, 1784, 2391, 1984, 851, 2027, 2424, 1801, 1804, 2462, - /* 1180 */ 432, 2199, 1723, 354, 2426, 747, 2428, 2429, 742, 3, - /* 1190 */ 765, 1904, 1715, 1445, 1713, 2424, 2198, 639, 2462, 1963, - /* 1200 */ 1962, 53, 115, 2426, 747, 2428, 2429, 742, 1444, 765, - /* 1210 */ 661, 737, 2391, 1961, 2617, 1960, 2516, 546, 2391, 2391, - /* 1220 */ 415, 2512, 2391, 1959, 2536, 1863, 1718, 1719, 1771, 708, - /* 1230 */ 1773, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, 739, - /* 1240 */ 763, 762, 1794, 1796, 1797, 1798, 1799, 2, 47, 45, - /* 1250 */ 2425, 148, 2391, 2391, 2487, 667, 419, 796, 1714, 797, - /* 1260 */ 2190, 682, 2190, 744, 2597, 2567, 2391, 338, 2391, 2355, - /* 1270 */ 2176, 1800, 140, 1712, 624, 548, 2391, 2244, 77, 286, - /* 1280 */ 1951, 1952, 2603, 204, 87, 2018, 2016, 2598, 712, 2425, - /* 1290 */ 262, 2443, 2086, 260, 2150, 727, 264, 714, 1426, 263, - /* 1300 */ 49, 1795, 744, 2391, 693, 743, 682, 641, 644, 2597, - /* 1310 */ 1772, 625, 266, 198, 1720, 265, 434, 433, 268, 488, - /* 1320 */ 447, 267, 188, 101, 160, 282, 1728, 2603, 204, 64, - /* 1330 */ 2443, 88, 2598, 712, 1722, 1424, 49, 14, 13, 1800, - /* 1340 */ 856, 1721, 2391, 15, 743, 2424, 682, 2425, 2462, 2597, - /* 1350 */ 1726, 49, 115, 2426, 747, 2428, 2429, 742, 738, 765, - /* 1360 */ 744, 1969, 2590, 312, 2617, 76, 2516, 2603, 204, 1795, - /* 1370 */ 415, 2512, 2598, 712, 299, 1903, 2560, 1821, 699, 1802, - /* 1380 */ 1803, 293, 1720, 158, 2424, 160, 142, 2462, 2443, 73, - /* 1390 */ 769, 115, 2426, 747, 2428, 2429, 742, 291, 765, 728, - /* 1400 */ 2391, 2083, 743, 2617, 1837, 2516, 324, 323, 736, 415, - /* 1410 */ 2512, 1785, 2444, 805, 2082, 643, 2270, 1774, 1784, 806, - /* 1420 */ 716, 158, 160, 141, 1801, 1804, 1610, 40, 39, 158, - /* 1430 */ 655, 46, 44, 43, 42, 41, 719, 1403, 316, 1715, - /* 1440 */ 753, 1713, 2424, 1401, 2000, 2462, 272, 2550, 696, 115, - /* 1450 */ 2426, 747, 2428, 2429, 742, 410, 765, 703, 320, 1384, - /* 1460 */ 1471, 2617, 646, 2516, 337, 1499, 406, 415, 2512, 640, - /* 1470 */ 638, 750, 438, 1718, 1719, 1771, 269, 1773, 1776, 1777, - /* 1480 */ 1778, 1779, 1780, 1781, 1782, 1783, 739, 763, 762, 1794, - /* 1490 */ 1796, 1797, 1798, 1799, 2, 2425, 1503, 1510, 1508, 2006, - /* 1500 */ 1385, 2271, 1725, 2187, 163, 675, 724, 1729, 744, 1724, - /* 1510 */ 2535, 2551, 2561, 301, 298, 305, 2108, 71, 5, 441, - /* 1520 */ 70, 446, 386, 454, 1747, 455, 466, 1890, 465, 213, - /* 1530 */ 212, 468, 215, 332, 1634, 1737, 2443, 482, 1738, 489, - /* 1540 */ 226, 1732, 1734, 491, 495, 497, 537, 502, 2391, 525, - /* 1550 */ 743, 514, 2263, 2425, 549, 763, 762, 1794, 1796, 1797, - /* 1560 */ 1798, 1799, 527, 533, 536, 538, 744, 550, 547, 231, - /* 1570 */ 232, 552, 553, 234, 555, 557, 1745, 572, 4, 573, - /* 1580 */ 580, 242, 581, 1740, 585, 583, 1746, 93, 245, 1748, - /* 1590 */ 2424, 586, 2425, 2462, 2443, 587, 1749, 115, 2426, 747, - /* 1600 */ 2428, 2429, 742, 248, 765, 744, 2391, 250, 743, 2617, - /* 1610 */ 2279, 2516, 373, 372, 589, 415, 2512, 595, 616, 94, - /* 1620 */ 95, 618, 1704, 2425, 255, 2136, 259, 117, 2132, 261, - /* 1630 */ 165, 166, 2134, 2443, 647, 1800, 744, 1692, 648, 660, - /* 1640 */ 662, 364, 2130, 167, 98, 2391, 154, 743, 2424, 168, - /* 1650 */ 1741, 2462, 278, 333, 670, 115, 2426, 747, 2428, 2429, - /* 1660 */ 742, 669, 765, 2342, 2443, 1795, 2325, 2489, 281, 2516, - /* 1670 */ 2339, 674, 2338, 415, 2512, 283, 2391, 677, 743, 700, - /* 1680 */ 671, 686, 676, 2566, 751, 288, 8, 2424, 2538, 2565, - /* 1690 */ 2462, 290, 709, 292, 115, 2426, 747, 2428, 2429, 742, - /* 1700 */ 687, 765, 685, 684, 411, 296, 733, 179, 2516, 720, - /* 1710 */ 297, 2425, 415, 2512, 294, 2620, 295, 1863, 2424, 717, - /* 1720 */ 1742, 2462, 2532, 146, 744, 116, 2426, 747, 2428, 2429, - /* 1730 */ 742, 1868, 765, 257, 2596, 1866, 191, 307, 155, 2516, - /* 1740 */ 1, 207, 61, 2515, 2512, 334, 2497, 300, 749, 180, - /* 1750 */ 2293, 2292, 2443, 2291, 335, 421, 754, 157, 611, 607, - /* 1760 */ 603, 599, 336, 256, 2391, 2147, 743, 106, 755, 2383, - /* 1770 */ 2382, 108, 767, 2191, 339, 1306, 850, 853, 327, 164, - /* 1780 */ 52, 363, 855, 343, 384, 341, 2363, 385, 2362, 351, - /* 1790 */ 362, 2361, 82, 2356, 443, 352, 444, 1685, 1686, 210, - /* 1800 */ 448, 2354, 450, 1705, 97, 1695, 2424, 254, 2425, 2462, - /* 1810 */ 451, 452, 1684, 116, 2426, 747, 2428, 2429, 742, 2353, - /* 1820 */ 765, 744, 387, 2351, 457, 2350, 459, 2516, 2349, 461, - /* 1830 */ 2348, 735, 2512, 463, 1673, 1698, 1701, 1706, 2329, 214, - /* 1840 */ 2328, 83, 216, 1636, 1637, 2425, 2306, 2305, 2304, 2443, - /* 1850 */ 475, 763, 762, 1794, 1796, 1797, 1798, 1799, 741, 476, - /* 1860 */ 2303, 2391, 2302, 743, 2253, 480, 2425, 1580, 2250, 483, - /* 1870 */ 2249, 2243, 486, 487, 244, 2240, 219, 2239, 86, 744, - /* 1880 */ 2238, 2237, 2242, 253, 246, 2241, 2443, 2236, 221, 2235, - /* 1890 */ 251, 588, 2233, 2232, 2231, 223, 503, 2230, 2391, 505, - /* 1900 */ 743, 2228, 2227, 745, 2226, 2225, 2462, 2443, 2248, 243, - /* 1910 */ 116, 2426, 747, 2428, 2429, 742, 2224, 765, 2223, 2391, - /* 1920 */ 2222, 743, 225, 2211, 2516, 2246, 2229, 2221, 379, 2512, - /* 1930 */ 2220, 2219, 2217, 2216, 2215, 2214, 2213, 2212, 2210, 2209, - /* 1940 */ 2424, 92, 2208, 2462, 2207, 2247, 2245, 360, 2426, 747, - /* 1950 */ 2428, 2429, 742, 740, 765, 731, 2481, 2206, 2205, 2204, - /* 1960 */ 230, 2424, 1586, 2425, 2462, 2203, 2202, 540, 176, 2426, - /* 1970 */ 747, 2428, 2429, 742, 2201, 765, 744, 542, 2200, 375, - /* 1980 */ 2425, 1330, 1442, 1446, 2048, 1438, 233, 2047, 2046, 235, - /* 1990 */ 2044, 376, 2041, 744, 559, 2425, 560, 2040, 564, 558, - /* 2000 */ 562, 563, 2033, 567, 2443, 566, 568, 2020, 744, 570, - /* 2010 */ 683, 2557, 236, 1995, 238, 79, 2391, 1994, 743, 186, - /* 2020 */ 2411, 2443, 240, 2327, 196, 578, 2323, 80, 2313, 2301, - /* 2030 */ 2300, 247, 252, 2391, 2277, 743, 2443, 249, 2125, 2043, - /* 2040 */ 2039, 596, 1377, 598, 597, 2037, 600, 601, 2391, 2035, - /* 2050 */ 743, 604, 602, 606, 605, 408, 2032, 608, 2424, 609, - /* 2060 */ 610, 2462, 2015, 2013, 2425, 176, 2426, 747, 2428, 2429, - /* 2070 */ 742, 2014, 765, 2012, 1991, 2424, 2127, 744, 2462, 2425, - /* 2080 */ 1515, 1514, 361, 2426, 747, 2428, 2429, 742, 2126, 765, - /* 2090 */ 2424, 1428, 741, 2462, 1427, 72, 2030, 177, 2426, 747, - /* 2100 */ 2428, 2429, 742, 1425, 765, 2443, 1423, 258, 2558, 1422, - /* 2110 */ 2028, 1414, 1421, 822, 1420, 1419, 824, 2391, 1416, 743, - /* 2120 */ 2443, 1415, 1413, 399, 400, 2019, 401, 2017, 402, 645, - /* 2130 */ 1990, 1989, 2391, 1988, 743, 642, 649, 1987, 1986, 409, - /* 2140 */ 651, 653, 118, 1671, 1667, 1669, 1666, 2326, 28, 67, - /* 2150 */ 2322, 1643, 2619, 2312, 280, 2299, 1645, 2298, 672, 2424, - /* 2160 */ 56, 1647, 2462, 2425, 2602, 57, 361, 2426, 747, 2428, - /* 2170 */ 2429, 742, 20, 765, 2424, 17, 744, 2462, 2425, 688, - /* 2180 */ 407, 360, 2426, 747, 2428, 2429, 742, 1921, 765, 673, - /* 2190 */ 2482, 744, 21, 2425, 30, 678, 6, 170, 284, 1622, - /* 2200 */ 287, 7, 1895, 692, 2443, 1621, 744, 690, 22, 2425, - /* 2210 */ 190, 680, 201, 32, 694, 2412, 2391, 65, 743, 2443, - /* 2220 */ 289, 1902, 744, 178, 189, 31, 24, 1936, 1889, 1941, - /* 2230 */ 81, 2391, 1942, 743, 2443, 23, 1935, 412, 418, 1940, - /* 2240 */ 1939, 413, 59, 303, 181, 2297, 2391, 2276, 743, 1860, - /* 2250 */ 2443, 25, 1859, 420, 103, 102, 13, 1812, 2424, 11, - /* 2260 */ 1730, 2462, 2391, 1811, 743, 361, 2426, 747, 2428, 2429, - /* 2270 */ 742, 58, 765, 2424, 1822, 18, 2462, 1787, 38, 2425, - /* 2280 */ 361, 2426, 747, 2428, 2429, 742, 1786, 765, 659, 182, - /* 2290 */ 16, 2462, 744, 26, 1764, 356, 2426, 747, 2428, 2429, - /* 2300 */ 742, 192, 765, 27, 2424, 1756, 2425, 2462, 746, 311, - /* 2310 */ 2275, 346, 2426, 747, 2428, 2429, 742, 104, 765, 744, - /* 2320 */ 2443, 1897, 193, 317, 69, 322, 105, 752, 2467, 2466, - /* 2330 */ 319, 1789, 2391, 764, 743, 68, 109, 1500, 2425, 768, - /* 2340 */ 427, 766, 770, 772, 1497, 1496, 773, 2443, 775, 776, - /* 2350 */ 778, 744, 1493, 779, 781, 784, 1487, 782, 785, 2391, - /* 2360 */ 1491, 743, 1490, 1485, 110, 326, 111, 1509, 78, 1489, - /* 2370 */ 1505, 1488, 1375, 1410, 2424, 799, 2425, 2462, 1407, 2443, - /* 2380 */ 1406, 345, 2426, 747, 2428, 2429, 742, 1405, 765, 744, - /* 2390 */ 1404, 2391, 1402, 743, 1400, 1399, 1398, 1436, 810, 1435, - /* 2400 */ 812, 2424, 208, 1396, 2462, 1395, 1393, 1394, 347, 2426, - /* 2410 */ 747, 2428, 2429, 742, 1381, 765, 1392, 2443, 1391, 1390, - /* 2420 */ 1432, 2038, 2425, 1430, 1387, 1386, 1383, 1382, 1380, 2391, - /* 2430 */ 832, 743, 2036, 2424, 833, 744, 2462, 834, 836, 838, - /* 2440 */ 353, 2426, 747, 2428, 2429, 742, 2034, 765, 2425, 837, - /* 2450 */ 840, 841, 842, 2031, 844, 845, 846, 2011, 1985, 848, - /* 2460 */ 1319, 744, 1307, 2443, 852, 330, 854, 1955, 1955, 1716, - /* 2470 */ 340, 2424, 857, 1955, 2462, 2391, 858, 743, 357, 2426, - /* 2480 */ 747, 2428, 2429, 742, 1955, 765, 1955, 1955, 1955, 2443, - /* 2490 */ 1955, 1955, 2425, 1955, 1955, 1955, 1955, 1955, 1955, 1955, - /* 2500 */ 1955, 2391, 1955, 743, 1955, 744, 1955, 1955, 1955, 1955, - /* 2510 */ 1955, 1955, 1955, 1955, 1955, 1955, 1955, 2424, 1955, 1955, - /* 2520 */ 2462, 2425, 1955, 1955, 348, 2426, 747, 2428, 2429, 742, - /* 2530 */ 1955, 765, 1955, 2443, 744, 1955, 2425, 1955, 1955, 1955, - /* 2540 */ 1955, 1955, 1955, 2424, 1955, 2391, 2462, 743, 1955, 744, - /* 2550 */ 358, 2426, 747, 2428, 2429, 742, 1955, 765, 1955, 1955, - /* 2560 */ 1955, 1955, 2443, 1955, 1955, 1955, 1955, 2425, 1955, 1955, - /* 2570 */ 1955, 1955, 1955, 1955, 2391, 1955, 743, 2443, 1955, 1955, - /* 2580 */ 744, 1955, 1955, 1955, 1955, 1955, 1955, 2424, 1955, 2391, - /* 2590 */ 2462, 743, 1955, 1955, 349, 2426, 747, 2428, 2429, 742, - /* 2600 */ 1955, 765, 1955, 1955, 1955, 1955, 1955, 1955, 2443, 1955, - /* 2610 */ 1955, 1955, 1955, 1955, 1955, 1955, 2424, 1955, 1955, 2462, - /* 2620 */ 2391, 1955, 743, 359, 2426, 747, 2428, 2429, 742, 1955, - /* 2630 */ 765, 2424, 1955, 1955, 2462, 1955, 1955, 2425, 350, 2426, - /* 2640 */ 747, 2428, 2429, 742, 1955, 765, 1955, 1955, 1955, 1955, - /* 2650 */ 744, 1955, 1955, 2425, 1955, 1955, 1955, 1955, 1955, 1955, - /* 2660 */ 1955, 1955, 2424, 1955, 1955, 2462, 744, 1955, 1955, 365, - /* 2670 */ 2426, 747, 2428, 2429, 742, 1955, 765, 1955, 2443, 1955, - /* 2680 */ 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, - /* 2690 */ 2391, 1955, 743, 1955, 2443, 1955, 1955, 1955, 1955, 1955, - /* 2700 */ 1955, 1955, 1955, 1955, 1955, 1955, 2391, 1955, 743, 1955, - /* 2710 */ 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, - /* 2720 */ 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, - /* 2730 */ 1955, 1955, 2424, 1955, 2425, 2462, 1955, 1955, 1955, 366, - /* 2740 */ 2426, 747, 2428, 2429, 742, 1955, 765, 744, 2424, 1955, - /* 2750 */ 1955, 2462, 1955, 1955, 1955, 2437, 2426, 747, 2428, 2429, - /* 2760 */ 742, 1955, 765, 1955, 1955, 1955, 2425, 1955, 1955, 1955, - /* 2770 */ 1955, 1955, 1955, 1955, 1955, 2443, 1955, 1955, 1955, 744, - /* 2780 */ 1955, 1955, 1955, 1955, 1955, 1955, 1955, 2391, 1955, 743, - /* 2790 */ 1955, 1955, 1955, 2425, 1955, 1955, 1955, 1955, 1955, 1955, - /* 2800 */ 1955, 1955, 1955, 1955, 1955, 1955, 744, 2443, 1955, 1955, - /* 2810 */ 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 2391, - /* 2820 */ 1955, 743, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 2424, - /* 2830 */ 1955, 1955, 2462, 1955, 2443, 1955, 2436, 2426, 747, 2428, - /* 2840 */ 2429, 742, 1955, 765, 1955, 1955, 2391, 1955, 743, 1955, - /* 2850 */ 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, - /* 2860 */ 1955, 2424, 1955, 2425, 2462, 1955, 1955, 1955, 2435, 2426, - /* 2870 */ 747, 2428, 2429, 742, 1955, 765, 744, 1955, 1955, 2425, - /* 2880 */ 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 2424, 1955, - /* 2890 */ 1955, 2462, 744, 1955, 2425, 381, 2426, 747, 2428, 2429, - /* 2900 */ 742, 1955, 765, 1955, 2443, 1955, 1955, 744, 1955, 2425, - /* 2910 */ 1955, 1955, 1955, 1955, 1955, 1955, 2391, 1955, 743, 1955, - /* 2920 */ 2443, 1955, 744, 1955, 1955, 1955, 1955, 1955, 1955, 1955, - /* 2930 */ 1955, 1955, 2391, 1955, 743, 2443, 1955, 1955, 2425, 1955, - /* 2940 */ 1955, 1955, 1955, 1955, 1955, 1955, 1955, 2391, 1955, 743, - /* 2950 */ 2443, 744, 1955, 1955, 1955, 1955, 1955, 1955, 2424, 1955, - /* 2960 */ 1955, 2462, 2391, 1955, 743, 382, 2426, 747, 2428, 2429, - /* 2970 */ 742, 1955, 765, 1955, 2424, 1955, 1955, 2462, 1955, 2443, - /* 2980 */ 1955, 378, 2426, 747, 2428, 2429, 742, 1955, 765, 2424, - /* 2990 */ 1955, 2391, 2462, 743, 1955, 1955, 383, 2426, 747, 2428, - /* 3000 */ 2429, 742, 1955, 765, 745, 1955, 1955, 2462, 1955, 1955, - /* 3010 */ 1955, 356, 2426, 747, 2428, 2429, 742, 1955, 765, 1955, - /* 3020 */ 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, - /* 3030 */ 1955, 1955, 1955, 2424, 1955, 1955, 2462, 1955, 1955, 1955, - /* 3040 */ 355, 2426, 747, 2428, 2429, 742, 1955, 765, + /* 230 */ 828, 162, 161, 825, 824, 823, 159, 1778, 1779, 1831, + /* 240 */ 2471, 1833, 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, + /* 250 */ 769, 793, 792, 1854, 1856, 1857, 1858, 1859, 2, 47, + /* 260 */ 45, 107, 2471, 790, 388, 2393, 1797, 439, 502, 1774, + /* 270 */ 501, 791, 2206, 554, 2009, 400, 574, 1561, 1562, 651, + /* 280 */ 1891, 573, 1860, 650, 1772, 2105, 2199, 755, 202, 2604, + /* 290 */ 2605, 138, 145, 2609, 791, 2206, 33, 534, 647, 575, + /* 300 */ 500, 1959, 40, 39, 389, 536, 46, 44, 43, 42, + /* 310 */ 41, 175, 1855, 2028, 138, 514, 1960, 1526, 19, 1889, + /* 320 */ 276, 652, 203, 2604, 2605, 1780, 145, 2609, 464, 463, + /* 330 */ 841, 1517, 820, 819, 818, 1521, 817, 1523, 1524, 816, + /* 340 */ 813, 306, 1532, 810, 1534, 1535, 807, 804, 801, 1802, + /* 350 */ 50, 886, 411, 1781, 15, 1633, 1634, 1958, 666, 665, + /* 360 */ 664, 2682, 34, 522, 2677, 656, 144, 660, 306, 239, + /* 370 */ 1831, 659, 1896, 607, 609, 2067, 658, 663, 418, 417, + /* 380 */ 606, 2008, 657, 2681, 1890, 653, 2183, 2678, 2679, 1362, + /* 390 */ 1862, 1863, 1923, 2332, 2311, 843, 562, 561, 560, 559, + /* 400 */ 558, 553, 552, 551, 550, 394, 791, 2206, 1369, 540, + /* 410 */ 539, 538, 537, 531, 530, 529, 2017, 524, 523, 409, + /* 420 */ 2253, 2254, 488, 515, 1621, 1622, 55, 2036, 1834, 1844, + /* 430 */ 1640, 1364, 1367, 1368, 160, 1861, 1864, 128, 416, 415, + /* 440 */ 127, 126, 125, 124, 123, 122, 121, 120, 119, 2184, + /* 450 */ 1775, 128, 1773, 197, 127, 126, 125, 124, 123, 122, + /* 460 */ 121, 120, 119, 1799, 1774, 2246, 36, 437, 1884, 1885, + /* 470 */ 1886, 1887, 1888, 1892, 1893, 1894, 1895, 241, 2035, 1772, + /* 480 */ 2471, 607, 153, 2067, 1778, 1779, 1831, 731, 1833, 1836, + /* 490 */ 1837, 1838, 1839, 1840, 1841, 1842, 1843, 769, 793, 792, + /* 500 */ 1854, 1856, 1857, 1858, 1859, 2, 12, 47, 45, 54, + /* 510 */ 414, 413, 304, 649, 173, 439, 12, 1774, 306, 364, + /* 520 */ 1780, 1784, 828, 162, 161, 825, 824, 823, 159, 2181, + /* 530 */ 1860, 2471, 1772, 565, 620, 651, 362, 75, 160, 650, + /* 540 */ 74, 2682, 314, 315, 520, 2321, 886, 313, 40, 39, + /* 550 */ 391, 492, 46, 44, 43, 42, 41, 12, 1802, 10, + /* 560 */ 1855, 1803, 237, 586, 584, 581, 19, 666, 665, 664, + /* 570 */ 688, 2197, 687, 1780, 656, 144, 660, 1967, 494, 490, + /* 580 */ 659, 737, 732, 725, 721, 658, 663, 418, 417, 753, + /* 590 */ 147, 657, 1938, 220, 653, 229, 643, 642, 1799, 886, + /* 600 */ 40, 39, 15, 62, 46, 44, 43, 42, 41, 2505, + /* 610 */ 40, 39, 1803, 1697, 46, 44, 43, 42, 41, 2481, + /* 620 */ 564, 228, 774, 1388, 1835, 1387, 445, 728, 727, 1965, + /* 630 */ 1966, 1968, 1969, 1970, 2294, 693, 451, 795, 1862, 1863, + /* 640 */ 143, 63, 35, 2485, 1799, 1775, 2002, 1773, 40, 39, + /* 650 */ 2523, 185, 46, 44, 43, 42, 41, 1870, 1389, 1388, + /* 660 */ 160, 1387, 2471, 1799, 773, 828, 162, 161, 825, 824, + /* 670 */ 823, 159, 62, 410, 624, 2325, 1834, 1844, 224, 1778, + /* 680 */ 1779, 830, 1832, 1861, 1864, 43, 42, 41, 2487, 2490, + /* 690 */ 51, 85, 84, 507, 1389, 762, 217, 2568, 1775, 795, + /* 700 */ 1773, 205, 2604, 2605, 2504, 145, 2609, 2542, 2465, 499, + /* 710 */ 497, 177, 2506, 777, 2508, 2509, 772, 2412, 795, 91, + /* 720 */ 387, 304, 90, 486, 526, 2321, 483, 479, 475, 472, + /* 730 */ 500, 62, 1778, 1779, 1831, 1700, 1833, 1836, 1837, 1838, + /* 740 */ 1839, 1840, 1841, 1842, 1843, 769, 793, 792, 1854, 1856, + /* 750 */ 1857, 1858, 1859, 2, 47, 45, 1865, 2505, 2492, 1835, + /* 760 */ 2424, 174, 439, 445, 1774, 743, 2698, 821, 274, 2145, + /* 770 */ 774, 306, 273, 222, 795, 200, 454, 1860, 1780, 1772, + /* 780 */ 1804, 791, 2206, 791, 2206, 171, 2505, 556, 2321, 89, + /* 790 */ 46, 44, 43, 42, 41, 764, 547, 2568, 2523, 756, + /* 800 */ 546, 508, 2425, 509, 1743, 791, 2206, 1855, 545, 1931, + /* 810 */ 2471, 712, 773, 443, 2677, 2259, 2494, 1832, 172, 1803, + /* 820 */ 1780, 172, 434, 185, 1835, 528, 2209, 2523, 696, 2208, + /* 830 */ 2257, 1804, 2683, 204, 450, 449, 227, 2678, 742, 2471, + /* 840 */ 306, 773, 99, 1803, 2278, 397, 886, 2326, 423, 48, + /* 850 */ 686, 844, 2504, 712, 2167, 2542, 2677, 2505, 306, 115, + /* 860 */ 2506, 777, 2508, 2509, 772, 2034, 795, 791, 2206, 149, + /* 870 */ 774, 156, 2567, 2596, 2683, 204, 2195, 435, 2592, 2678, + /* 880 */ 742, 2504, 1832, 2089, 2542, 1862, 1863, 541, 115, 2506, + /* 890 */ 777, 2508, 2509, 772, 96, 795, 791, 2206, 2523, 306, + /* 900 */ 187, 458, 2596, 698, 2384, 667, 435, 2592, 694, 172, + /* 910 */ 2471, 412, 773, 2070, 791, 2206, 542, 2208, 2471, 711, + /* 920 */ 2201, 791, 2206, 1834, 1844, 100, 889, 2611, 2259, 2627, + /* 930 */ 1861, 1864, 40, 39, 543, 444, 46, 44, 43, 42, + /* 940 */ 41, 623, 351, 2257, 1742, 1775, 211, 1773, 349, 14, + /* 950 */ 13, 275, 2504, 2606, 2014, 2542, 1681, 29, 194, 115, + /* 960 */ 2506, 777, 2508, 2509, 772, 879, 795, 877, 873, 869, + /* 970 */ 865, 2571, 348, 2596, 453, 452, 2191, 435, 2592, 1778, + /* 980 */ 1779, 1831, 195, 1833, 1836, 1837, 1838, 1839, 1840, 1841, + /* 990 */ 1842, 1843, 769, 793, 792, 1854, 1856, 1857, 1858, 1859, + /* 1000 */ 2, 47, 45, 2681, 549, 548, 199, 791, 2206, 439, + /* 1010 */ 112, 1774, 719, 114, 1391, 1392, 321, 791, 2206, 109, + /* 1020 */ 791, 2206, 2505, 2033, 1860, 461, 1772, 2203, 113, 2259, + /* 1030 */ 1702, 1703, 1979, 172, 470, 774, 459, 277, 1804, 469, + /* 1040 */ 285, 2208, 2505, 1371, 2257, 150, 791, 2206, 787, 1798, + /* 1050 */ 645, 644, 60, 2198, 1855, 774, 1903, 2069, 791, 2206, + /* 1060 */ 709, 2032, 1804, 2523, 40, 39, 759, 1780, 46, 44, + /* 1070 */ 43, 42, 41, 662, 661, 2471, 2471, 773, 318, 855, + /* 1080 */ 853, 2505, 1930, 2523, 96, 712, 2031, 1954, 2677, 791, + /* 1090 */ 2206, 1799, 309, 886, 774, 2471, 48, 773, 2193, 308, + /* 1100 */ 2505, 791, 2206, 791, 2206, 822, 2683, 204, 2250, 788, + /* 1110 */ 2202, 2678, 742, 774, 2471, 2634, 49, 2504, 279, 2030, + /* 1120 */ 2542, 789, 2523, 345, 116, 2506, 777, 2508, 2509, 772, + /* 1130 */ 2189, 795, 1862, 1863, 2471, 1481, 773, 2504, 2596, 2471, + /* 1140 */ 2542, 2523, 2259, 2593, 115, 2506, 777, 2508, 2509, 772, + /* 1150 */ 1480, 795, 2259, 2471, 745, 773, 2697, 760, 2596, 2027, + /* 1160 */ 791, 2206, 435, 2592, 1978, 2026, 2025, 786, 748, 2024, + /* 1170 */ 1834, 1844, 2471, 2044, 881, 2087, 2504, 1861, 1864, 2542, + /* 1180 */ 462, 2259, 1783, 374, 2506, 777, 2508, 2509, 772, 3, + /* 1190 */ 795, 1964, 1775, 1485, 1773, 2504, 2258, 669, 2542, 2023, + /* 1200 */ 2022, 53, 115, 2506, 777, 2508, 2509, 772, 1484, 795, + /* 1210 */ 691, 767, 2471, 2021, 2697, 2020, 2596, 576, 2471, 2471, + /* 1220 */ 435, 2592, 2471, 2019, 2616, 1923, 1778, 1779, 1831, 738, + /* 1230 */ 1833, 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 769, + /* 1240 */ 793, 792, 1854, 1856, 1857, 1858, 1859, 2, 47, 45, + /* 1250 */ 2505, 148, 2471, 2471, 2567, 697, 439, 826, 1774, 827, + /* 1260 */ 2250, 712, 2250, 774, 2677, 2647, 2471, 358, 2471, 2415, + /* 1270 */ 2236, 1860, 140, 1772, 654, 578, 2471, 2304, 77, 286, + /* 1280 */ 2011, 2012, 2683, 204, 87, 2078, 2076, 2678, 742, 2505, + /* 1290 */ 262, 2523, 2146, 260, 2210, 757, 264, 744, 1466, 263, + /* 1300 */ 49, 1855, 774, 2471, 723, 773, 712, 671, 674, 2677, + /* 1310 */ 1832, 655, 266, 198, 1780, 265, 464, 463, 268, 518, + /* 1320 */ 477, 267, 188, 101, 160, 282, 1788, 2683, 204, 64, + /* 1330 */ 2523, 88, 2678, 742, 768, 1464, 49, 14, 13, 1860, + /* 1340 */ 886, 1781, 2471, 15, 773, 2504, 712, 2505, 2542, 2677, + /* 1350 */ 1786, 49, 115, 2506, 777, 2508, 2509, 772, 1782, 795, + /* 1360 */ 774, 2029, 2670, 312, 2697, 76, 2596, 2683, 204, 1855, + /* 1370 */ 435, 2592, 2678, 742, 299, 1963, 2640, 1881, 1424, 1862, + /* 1380 */ 1863, 729, 1780, 158, 2504, 160, 293, 2542, 2523, 142, + /* 1390 */ 2524, 115, 2506, 777, 2508, 2509, 772, 291, 795, 758, + /* 1400 */ 2471, 2143, 773, 2697, 1897, 2596, 324, 323, 766, 435, + /* 1410 */ 2592, 1845, 326, 325, 2142, 673, 2330, 1834, 1844, 1425, + /* 1420 */ 746, 328, 327, 2060, 1861, 1864, 1650, 40, 39, 2630, + /* 1430 */ 685, 46, 44, 43, 42, 41, 749, 73, 316, 1775, + /* 1440 */ 783, 1773, 2504, 330, 329, 2542, 272, 332, 331, 115, + /* 1450 */ 2506, 777, 2508, 2509, 772, 799, 795, 726, 320, 158, + /* 1460 */ 1511, 2697, 676, 2596, 334, 333, 430, 435, 2592, 670, + /* 1470 */ 668, 336, 335, 1778, 1779, 1831, 269, 1833, 1836, 1837, + /* 1480 */ 1838, 1839, 1840, 1841, 1842, 1843, 769, 793, 792, 1854, + /* 1490 */ 1856, 1857, 1858, 1859, 2, 2505, 338, 337, 340, 339, + /* 1500 */ 835, 342, 341, 344, 343, 160, 141, 1789, 774, 1784, + /* 1510 */ 2615, 158, 357, 836, 733, 426, 780, 71, 2331, 468, + /* 1520 */ 70, 2066, 705, 2247, 1443, 2631, 1785, 1950, 2641, 754, + /* 1530 */ 1539, 301, 298, 305, 1543, 2168, 2523, 1441, 5, 471, + /* 1540 */ 406, 1792, 1794, 476, 484, 485, 1807, 496, 2471, 495, + /* 1550 */ 773, 212, 213, 2505, 498, 793, 792, 1854, 1856, 1857, + /* 1560 */ 1858, 1859, 215, 1674, 352, 1797, 774, 512, 1798, 519, + /* 1570 */ 226, 521, 527, 525, 532, 567, 544, 580, 557, 555, + /* 1580 */ 1550, 1548, 2323, 563, 566, 568, 163, 579, 577, 232, + /* 1590 */ 2504, 231, 2505, 2542, 2523, 582, 583, 115, 2506, 777, + /* 1600 */ 2508, 2509, 772, 234, 795, 774, 2471, 585, 773, 2697, + /* 1610 */ 587, 2596, 393, 392, 1805, 435, 2592, 602, 4, 603, + /* 1620 */ 610, 242, 446, 2505, 613, 611, 93, 1800, 245, 615, + /* 1630 */ 1806, 1808, 248, 2523, 616, 1860, 774, 455, 1809, 619, + /* 1640 */ 617, 2339, 250, 94, 625, 2471, 646, 773, 2504, 95, + /* 1650 */ 255, 2542, 2402, 677, 648, 115, 2506, 777, 2508, 2509, + /* 1660 */ 772, 117, 795, 384, 2523, 1855, 678, 2569, 2196, 2596, + /* 1670 */ 690, 259, 2192, 435, 2592, 692, 2471, 261, 773, 165, + /* 1680 */ 166, 2194, 98, 353, 278, 2190, 167, 2504, 168, 1801, + /* 1690 */ 2542, 2385, 154, 281, 115, 2506, 777, 2508, 2509, 772, + /* 1700 */ 701, 795, 283, 700, 2399, 2398, 763, 699, 2596, 704, + /* 1710 */ 716, 2505, 435, 2592, 707, 706, 730, 2646, 2504, 781, + /* 1720 */ 2645, 2542, 8, 739, 774, 116, 2506, 777, 2508, 2509, + /* 1730 */ 772, 2618, 795, 257, 717, 288, 715, 290, 292, 2596, + /* 1740 */ 714, 179, 294, 2595, 2592, 297, 295, 431, 1923, 180, + /* 1750 */ 750, 747, 2523, 146, 1802, 296, 1928, 2612, 641, 637, + /* 1760 */ 633, 629, 191, 256, 2471, 2700, 773, 61, 307, 155, + /* 1770 */ 354, 1926, 355, 779, 2353, 2352, 2351, 441, 784, 785, + /* 1780 */ 356, 157, 106, 2207, 2463, 2462, 2676, 300, 2577, 2458, + /* 1790 */ 2457, 2449, 2448, 1, 207, 2440, 108, 2439, 2455, 2454, + /* 1800 */ 2446, 797, 359, 1765, 97, 1741, 2504, 254, 2505, 2542, + /* 1810 */ 1346, 2445, 2434, 116, 2506, 777, 2508, 2509, 772, 347, + /* 1820 */ 795, 774, 2433, 883, 2452, 2451, 2443, 2596, 2442, 880, + /* 1830 */ 2431, 765, 2592, 2430, 2428, 448, 447, 1766, 164, 2427, + /* 1840 */ 361, 885, 2251, 383, 2423, 2505, 52, 371, 382, 2523, + /* 1850 */ 404, 793, 792, 1854, 1856, 1857, 1858, 1859, 771, 372, + /* 1860 */ 363, 2471, 2422, 773, 2421, 405, 2505, 82, 2416, 473, + /* 1870 */ 474, 1725, 1726, 478, 244, 210, 2414, 480, 481, 774, + /* 1880 */ 482, 2413, 1724, 253, 246, 407, 2523, 2411, 487, 2410, + /* 1890 */ 251, 618, 489, 2409, 491, 2408, 493, 1713, 2471, 2389, + /* 1900 */ 773, 214, 2388, 775, 216, 1677, 2542, 2523, 83, 243, + /* 1910 */ 116, 2506, 777, 2508, 2509, 772, 1676, 795, 2366, 2471, + /* 1920 */ 2365, 773, 505, 506, 2596, 2364, 2363, 2362, 399, 2592, + /* 1930 */ 2313, 510, 1620, 2310, 513, 2309, 2303, 516, 2300, 517, + /* 1940 */ 2504, 219, 2299, 2542, 2298, 2297, 86, 380, 2506, 777, + /* 1950 */ 2508, 2509, 772, 770, 795, 761, 2561, 2302, 221, 2301, + /* 1960 */ 2296, 2504, 2295, 2505, 2542, 2293, 2292, 2291, 176, 2506, + /* 1970 */ 777, 2508, 2509, 772, 223, 795, 774, 533, 2290, 535, + /* 1980 */ 2505, 225, 2271, 2270, 92, 2269, 2268, 2267, 2307, 2305, + /* 1990 */ 2266, 2265, 1626, 774, 2288, 2505, 2287, 2286, 2285, 2308, + /* 2000 */ 2284, 2283, 2282, 2306, 2523, 2289, 2281, 2280, 774, 2279, + /* 2010 */ 713, 2637, 2277, 2276, 2275, 2274, 2471, 2273, 773, 230, + /* 2020 */ 2263, 2523, 2272, 2264, 570, 2262, 572, 2261, 2260, 395, + /* 2030 */ 1482, 2108, 1486, 2471, 396, 773, 2523, 233, 2107, 235, + /* 2040 */ 2106, 1478, 236, 2104, 2101, 2100, 589, 2093, 2471, 2080, + /* 2050 */ 773, 2055, 2054, 588, 186, 428, 2387, 2383, 2504, 2373, + /* 2060 */ 590, 2542, 593, 592, 2505, 176, 2506, 777, 2508, 2509, + /* 2070 */ 772, 594, 795, 596, 598, 2504, 600, 774, 2542, 2505, + /* 2080 */ 238, 597, 381, 2506, 777, 2508, 2509, 772, 79, 795, + /* 2090 */ 2504, 2491, 771, 2542, 1370, 2361, 240, 177, 2506, 777, + /* 2100 */ 2508, 2509, 772, 196, 795, 2523, 80, 249, 2638, 247, + /* 2110 */ 608, 2360, 252, 2337, 2185, 2103, 2099, 2471, 626, 773, + /* 2120 */ 2523, 627, 1417, 2097, 628, 630, 631, 632, 2095, 634, + /* 2130 */ 635, 636, 2471, 2092, 773, 638, 640, 639, 2075, 429, + /* 2140 */ 2073, 2074, 2072, 2051, 2187, 1555, 1554, 258, 72, 2186, + /* 2150 */ 672, 1454, 2699, 2090, 1468, 1467, 1465, 1463, 1462, 2504, + /* 2160 */ 2088, 2079, 2542, 2505, 1461, 852, 381, 2506, 777, 2508, + /* 2170 */ 2509, 772, 854, 795, 2504, 28, 774, 2542, 2505, 118, + /* 2180 */ 1711, 380, 2506, 777, 2508, 2509, 772, 1460, 795, 1453, + /* 2190 */ 2562, 774, 1459, 2505, 1456, 1455, 419, 420, 2077, 421, + /* 2200 */ 422, 2050, 675, 2049, 2523, 2048, 774, 679, 2047, 2505, + /* 2210 */ 681, 2046, 683, 2386, 67, 280, 2471, 1707, 773, 2523, + /* 2220 */ 1709, 1706, 774, 2382, 56, 1683, 1685, 2372, 702, 2359, + /* 2230 */ 170, 2471, 2358, 773, 2523, 20, 2682, 30, 438, 1981, + /* 2240 */ 724, 57, 1955, 703, 17, 1662, 2471, 1687, 773, 718, + /* 2250 */ 2523, 427, 284, 440, 1661, 287, 722, 6, 2504, 708, + /* 2260 */ 23, 2542, 2471, 710, 773, 381, 2506, 777, 2508, 2509, + /* 2270 */ 772, 7, 795, 2504, 720, 21, 2542, 289, 22, 2505, + /* 2280 */ 381, 2506, 777, 2508, 2509, 772, 190, 795, 689, 1962, + /* 2290 */ 1949, 2542, 774, 178, 189, 376, 2506, 777, 2508, 2509, + /* 2300 */ 772, 31, 795, 201, 2504, 2492, 2505, 2542, 32, 65, + /* 2310 */ 24, 366, 2506, 777, 2508, 2509, 772, 2001, 795, 774, + /* 2320 */ 2523, 1996, 81, 1995, 2002, 432, 2000, 1999, 18, 433, + /* 2330 */ 1920, 303, 2471, 1919, 773, 59, 181, 2357, 2505, 2336, + /* 2340 */ 103, 102, 25, 1872, 11, 1871, 13, 2523, 1790, 58, + /* 2350 */ 38, 774, 1847, 182, 1846, 16, 26, 192, 1816, 2471, + /* 2360 */ 1824, 773, 1882, 311, 27, 193, 776, 1957, 317, 69, + /* 2370 */ 2335, 104, 782, 105, 2504, 2547, 2505, 2542, 319, 2523, + /* 2380 */ 109, 365, 2506, 777, 2508, 2509, 772, 1849, 795, 774, + /* 2390 */ 322, 2471, 2546, 773, 798, 796, 457, 802, 794, 805, + /* 2400 */ 68, 2504, 1540, 1537, 2542, 1536, 800, 803, 367, 2506, + /* 2410 */ 777, 2508, 2509, 772, 806, 795, 808, 2523, 1533, 809, + /* 2420 */ 811, 1527, 2505, 812, 814, 1525, 815, 110, 346, 2471, + /* 2430 */ 111, 773, 78, 2504, 1549, 774, 2542, 1545, 1415, 1531, + /* 2440 */ 373, 2506, 777, 2508, 2509, 772, 1530, 795, 2505, 1529, + /* 2450 */ 1528, 829, 1476, 1450, 1447, 1446, 1445, 1444, 1442, 1440, + /* 2460 */ 1439, 774, 1438, 2523, 840, 842, 1475, 208, 1436, 1435, + /* 2470 */ 1434, 2504, 1433, 1421, 2542, 2471, 1432, 773, 377, 2506, + /* 2480 */ 777, 2508, 2509, 772, 1431, 795, 1430, 2098, 1472, 2523, + /* 2490 */ 1470, 1427, 2505, 1426, 1423, 1422, 1420, 862, 2096, 863, + /* 2500 */ 866, 2471, 2094, 773, 864, 774, 867, 868, 870, 872, + /* 2510 */ 2091, 874, 871, 2071, 876, 875, 878, 2504, 1359, 2045, + /* 2520 */ 2542, 2505, 1347, 882, 368, 2506, 777, 2508, 2509, 772, + /* 2530 */ 350, 795, 884, 2523, 774, 887, 2505, 1776, 360, 2015, + /* 2540 */ 888, 2015, 2015, 2504, 2015, 2471, 2542, 773, 2015, 774, + /* 2550 */ 378, 2506, 777, 2508, 2509, 772, 2015, 795, 2015, 2015, + /* 2560 */ 2015, 2015, 2523, 2015, 2015, 2015, 2015, 2505, 2015, 2015, + /* 2570 */ 2015, 2015, 2015, 2015, 2471, 2015, 773, 2523, 2015, 2015, + /* 2580 */ 774, 2015, 2015, 2015, 2015, 2015, 2015, 2504, 2015, 2471, + /* 2590 */ 2542, 773, 2015, 2015, 369, 2506, 777, 2508, 2509, 772, + /* 2600 */ 2015, 795, 2015, 2015, 2015, 2015, 2015, 2015, 2523, 2015, + /* 2610 */ 2015, 2015, 2015, 2015, 2015, 2015, 2504, 2015, 2015, 2542, + /* 2620 */ 2471, 2015, 773, 379, 2506, 777, 2508, 2509, 772, 2015, + /* 2630 */ 795, 2504, 2015, 2015, 2542, 2015, 2015, 2505, 370, 2506, + /* 2640 */ 777, 2508, 2509, 772, 2015, 795, 2015, 2015, 2015, 2015, + /* 2650 */ 774, 2015, 2015, 2505, 2015, 2015, 2015, 2015, 2015, 2015, + /* 2660 */ 2015, 2015, 2504, 2015, 2015, 2542, 774, 2015, 2015, 385, + /* 2670 */ 2506, 777, 2508, 2509, 772, 2015, 795, 2015, 2523, 2015, + /* 2680 */ 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, + /* 2690 */ 2471, 2015, 773, 2015, 2523, 2015, 2015, 2015, 2015, 2015, + /* 2700 */ 2015, 2015, 2015, 2015, 2015, 2015, 2471, 2015, 773, 2015, + /* 2710 */ 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, + /* 2720 */ 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, + /* 2730 */ 2015, 2015, 2504, 2015, 2505, 2542, 2015, 2015, 2015, 386, + /* 2740 */ 2506, 777, 2508, 2509, 772, 2015, 795, 774, 2504, 2015, + /* 2750 */ 2015, 2542, 2015, 2015, 2015, 2517, 2506, 777, 2508, 2509, + /* 2760 */ 772, 2015, 795, 2015, 2015, 2015, 2505, 2015, 2015, 2015, + /* 2770 */ 2015, 2015, 2015, 2015, 2015, 2523, 2015, 2015, 2015, 774, + /* 2780 */ 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2471, 2015, 773, + /* 2790 */ 2015, 2015, 2015, 2505, 2015, 2015, 2015, 2015, 2015, 2015, + /* 2800 */ 2015, 2015, 2015, 2015, 2015, 2015, 774, 2523, 2015, 2015, + /* 2810 */ 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2471, + /* 2820 */ 2015, 773, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2504, + /* 2830 */ 2015, 2015, 2542, 2015, 2523, 2015, 2516, 2506, 777, 2508, + /* 2840 */ 2509, 772, 2015, 795, 2015, 2015, 2471, 2015, 773, 2015, + /* 2850 */ 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, + /* 2860 */ 2015, 2504, 2015, 2505, 2542, 2015, 2015, 2015, 2515, 2506, + /* 2870 */ 777, 2508, 2509, 772, 2015, 795, 774, 2015, 2015, 2505, + /* 2880 */ 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2504, 2015, + /* 2890 */ 2015, 2542, 774, 2015, 2505, 401, 2506, 777, 2508, 2509, + /* 2900 */ 772, 2015, 795, 2015, 2523, 2015, 2015, 774, 2015, 2505, + /* 2910 */ 2015, 2015, 2015, 2015, 2015, 2015, 2471, 2015, 773, 2015, + /* 2920 */ 2523, 2015, 774, 2015, 2015, 2015, 2015, 2015, 2015, 2015, + /* 2930 */ 2015, 2015, 2471, 2015, 773, 2523, 2015, 2015, 2505, 2015, + /* 2940 */ 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2471, 2015, 773, + /* 2950 */ 2523, 774, 2015, 2015, 2015, 2015, 2015, 2015, 2504, 2015, + /* 2960 */ 2015, 2542, 2471, 2015, 773, 402, 2506, 777, 2508, 2509, + /* 2970 */ 772, 2015, 795, 2015, 2504, 2015, 2015, 2542, 2015, 2523, + /* 2980 */ 2015, 398, 2506, 777, 2508, 2509, 772, 2015, 795, 2504, + /* 2990 */ 2015, 2471, 2542, 773, 2015, 2015, 403, 2506, 777, 2508, + /* 3000 */ 2509, 772, 2015, 795, 775, 2015, 2015, 2542, 2015, 2015, + /* 3010 */ 2015, 376, 2506, 777, 2508, 2509, 772, 2015, 795, 2015, + /* 3020 */ 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, + /* 3030 */ 2015, 2015, 2015, 2504, 2015, 2015, 2542, 2015, 2015, 2015, + /* 3040 */ 375, 2506, 777, 2508, 2509, 772, 2015, 795, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 369, 390, 0, 400, 485, 386, 403, 488, 458, 398, @@ -1017,128 +662,128 @@ static const YYCODETYPE yy_lookahead[] = { /* 1300 */ 33, 65, 370, 410, 372, 412, 485, 22, 22, 488, /* 1310 */ 239, 13, 110, 440, 78, 113, 12, 13, 110, 42, /* 1320 */ 51, 113, 33, 109, 33, 399, 22, 506, 507, 33, - /* 1330 */ 398, 170, 511, 512, 37, 37, 33, 1, 2, 35, + /* 1330 */ 398, 170, 511, 512, 399, 37, 33, 1, 2, 35, /* 1340 */ 104, 37, 410, 107, 412, 452, 485, 357, 455, 488, - /* 1350 */ 205, 33, 459, 460, 461, 462, 463, 464, 399, 466, + /* 1350 */ 205, 33, 459, 460, 461, 462, 463, 464, 37, 466, /* 1360 */ 370, 358, 372, 33, 471, 33, 473, 506, 507, 65, - /* 1370 */ 477, 478, 511, 512, 515, 108, 423, 237, 504, 143, - /* 1380 */ 144, 497, 78, 33, 452, 33, 373, 455, 398, 33, - /* 1390 */ 33, 459, 460, 461, 462, 463, 464, 108, 466, 108, + /* 1370 */ 477, 478, 511, 512, 515, 108, 423, 237, 37, 143, + /* 1380 */ 144, 504, 78, 33, 452, 33, 497, 455, 398, 373, + /* 1390 */ 398, 459, 460, 461, 462, 463, 464, 108, 466, 108, /* 1400 */ 410, 386, 412, 471, 108, 473, 12, 13, 104, 477, - /* 1410 */ 478, 108, 398, 13, 386, 4, 423, 181, 182, 13, - /* 1420 */ 299, 33, 33, 33, 188, 189, 108, 8, 9, 33, - /* 1430 */ 19, 12, 13, 14, 15, 16, 301, 37, 108, 203, - /* 1440 */ 108, 205, 452, 37, 368, 455, 35, 423, 503, 459, - /* 1450 */ 460, 461, 462, 463, 464, 503, 466, 503, 108, 37, - /* 1460 */ 108, 471, 51, 473, 108, 108, 433, 477, 478, 58, - /* 1470 */ 59, 503, 373, 237, 238, 239, 65, 241, 242, 243, + /* 1410 */ 478, 108, 12, 13, 386, 4, 423, 181, 182, 78, + /* 1420 */ 299, 12, 13, 368, 188, 189, 108, 8, 9, 423, + /* 1430 */ 19, 12, 13, 14, 15, 16, 301, 33, 108, 203, + /* 1440 */ 108, 205, 452, 12, 13, 455, 35, 12, 13, 459, + /* 1450 */ 460, 461, 462, 463, 464, 33, 466, 503, 108, 33, + /* 1460 */ 108, 471, 51, 473, 12, 13, 503, 477, 478, 58, + /* 1470 */ 59, 12, 13, 237, 238, 239, 65, 241, 242, 243, /* 1480 */ 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, - /* 1490 */ 254, 255, 256, 257, 258, 357, 108, 108, 108, 370, - /* 1500 */ 78, 423, 205, 409, 108, 441, 487, 203, 370, 205, - /* 1510 */ 372, 423, 423, 508, 479, 490, 388, 106, 278, 435, - /* 1520 */ 109, 51, 454, 42, 20, 453, 446, 108, 218, 378, - /* 1530 */ 451, 446, 378, 437, 201, 20, 398, 369, 20, 370, - /* 1540 */ 45, 237, 238, 419, 370, 419, 180, 416, 410, 370, - /* 1550 */ 412, 369, 369, 357, 105, 251, 252, 253, 254, 255, - /* 1560 */ 256, 257, 419, 416, 416, 416, 370, 382, 103, 381, - /* 1570 */ 369, 102, 380, 369, 369, 369, 20, 362, 50, 366, - /* 1580 */ 362, 378, 366, 20, 412, 446, 20, 378, 378, 20, - /* 1590 */ 452, 371, 357, 455, 398, 436, 20, 459, 460, 461, - /* 1600 */ 462, 463, 464, 378, 466, 370, 410, 378, 412, 471, - /* 1610 */ 426, 473, 12, 13, 371, 477, 478, 369, 362, 378, - /* 1620 */ 378, 398, 22, 357, 378, 398, 398, 369, 398, 398, - /* 1630 */ 398, 398, 398, 398, 360, 35, 370, 37, 360, 222, - /* 1640 */ 450, 362, 398, 398, 107, 410, 448, 412, 452, 398, - /* 1650 */ 20, 455, 376, 446, 209, 459, 460, 461, 462, 463, - /* 1660 */ 464, 208, 466, 410, 398, 65, 445, 471, 442, 473, - /* 1670 */ 410, 412, 410, 477, 478, 376, 410, 369, 412, 286, - /* 1680 */ 443, 410, 435, 496, 285, 428, 294, 452, 499, 496, - /* 1690 */ 455, 428, 194, 498, 459, 460, 461, 462, 463, 464, - /* 1700 */ 296, 466, 295, 279, 303, 493, 471, 496, 473, 300, - /* 1710 */ 435, 357, 477, 478, 495, 516, 494, 274, 452, 298, - /* 1720 */ 20, 455, 458, 370, 370, 459, 460, 461, 462, 463, - /* 1730 */ 464, 117, 466, 35, 510, 276, 371, 376, 376, 473, - /* 1740 */ 491, 489, 107, 477, 478, 428, 476, 509, 410, 51, - /* 1750 */ 410, 410, 398, 410, 428, 410, 186, 376, 60, 61, - /* 1760 */ 62, 63, 394, 65, 410, 370, 412, 376, 424, 410, - /* 1770 */ 410, 107, 402, 410, 369, 22, 38, 359, 376, 363, - /* 1780 */ 438, 447, 362, 355, 429, 377, 0, 429, 0, 392, - /* 1790 */ 392, 0, 45, 0, 37, 392, 228, 37, 37, 37, - /* 1800 */ 228, 0, 37, 203, 106, 205, 452, 109, 357, 455, - /* 1810 */ 37, 228, 37, 459, 460, 461, 462, 463, 464, 0, - /* 1820 */ 466, 370, 228, 0, 37, 0, 37, 473, 0, 22, - /* 1830 */ 0, 477, 478, 37, 223, 235, 236, 237, 0, 211, - /* 1840 */ 0, 212, 211, 203, 205, 357, 0, 0, 0, 398, - /* 1850 */ 199, 251, 252, 253, 254, 255, 256, 257, 370, 198, - /* 1860 */ 0, 410, 0, 412, 148, 49, 357, 49, 0, 37, - /* 1870 */ 0, 0, 37, 51, 176, 0, 49, 0, 45, 370, - /* 1880 */ 0, 0, 0, 185, 186, 0, 398, 0, 49, 0, - /* 1890 */ 192, 193, 0, 0, 0, 166, 37, 0, 410, 166, - /* 1900 */ 412, 0, 0, 452, 0, 0, 455, 398, 0, 211, - /* 1910 */ 459, 460, 461, 462, 463, 464, 0, 466, 0, 410, - /* 1920 */ 0, 412, 49, 0, 473, 0, 0, 0, 477, 478, - /* 1930 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - /* 1940 */ 452, 45, 0, 455, 0, 0, 0, 459, 460, 461, - /* 1950 */ 462, 463, 464, 465, 466, 467, 468, 0, 0, 0, - /* 1960 */ 148, 452, 22, 357, 455, 0, 0, 147, 459, 460, - /* 1970 */ 461, 462, 463, 464, 0, 466, 370, 146, 0, 50, - /* 1980 */ 357, 14, 22, 22, 0, 37, 65, 0, 0, 65, - /* 1990 */ 0, 50, 0, 370, 51, 357, 42, 0, 42, 37, - /* 2000 */ 37, 51, 0, 51, 398, 37, 42, 0, 370, 37, - /* 2010 */ 501, 502, 65, 0, 45, 42, 410, 0, 412, 33, - /* 2020 */ 49, 398, 43, 0, 49, 49, 0, 42, 0, 0, - /* 2030 */ 0, 42, 49, 410, 0, 412, 398, 194, 0, 0, - /* 2040 */ 0, 37, 72, 42, 51, 0, 37, 51, 410, 0, - /* 2050 */ 412, 37, 42, 42, 51, 432, 0, 37, 452, 51, - /* 2060 */ 42, 455, 0, 0, 357, 459, 460, 461, 462, 463, - /* 2070 */ 464, 0, 466, 0, 0, 452, 0, 370, 455, 357, - /* 2080 */ 37, 22, 459, 460, 461, 462, 463, 464, 0, 466, - /* 2090 */ 452, 37, 370, 455, 37, 115, 0, 459, 460, 461, - /* 2100 */ 462, 463, 464, 37, 466, 398, 37, 113, 502, 37, - /* 2110 */ 0, 22, 37, 33, 37, 37, 33, 410, 37, 412, - /* 2120 */ 398, 37, 37, 22, 22, 0, 22, 0, 22, 37, - /* 2130 */ 0, 0, 410, 0, 412, 53, 37, 0, 0, 432, - /* 2140 */ 37, 22, 20, 108, 37, 37, 37, 0, 107, 107, - /* 2150 */ 0, 37, 514, 0, 49, 0, 22, 0, 22, 452, - /* 2160 */ 183, 210, 455, 357, 3, 183, 459, 460, 461, 462, - /* 2170 */ 463, 464, 33, 466, 452, 280, 370, 455, 357, 37, - /* 2180 */ 37, 459, 460, 461, 462, 463, 464, 108, 466, 183, - /* 2190 */ 468, 370, 33, 357, 107, 190, 50, 206, 186, 183, - /* 2200 */ 107, 50, 108, 105, 398, 183, 370, 107, 33, 357, - /* 2210 */ 33, 190, 49, 33, 103, 49, 410, 3, 412, 398, - /* 2220 */ 108, 108, 370, 107, 107, 107, 33, 37, 108, 108, - /* 2230 */ 107, 410, 108, 412, 398, 280, 37, 37, 432, 37, - /* 2240 */ 37, 37, 33, 49, 49, 0, 410, 0, 412, 108, - /* 2250 */ 398, 33, 108, 432, 42, 107, 2, 105, 452, 260, - /* 2260 */ 22, 455, 410, 105, 412, 459, 460, 461, 462, 463, - /* 2270 */ 464, 273, 466, 452, 237, 280, 455, 108, 107, 357, - /* 2280 */ 459, 460, 461, 462, 463, 464, 108, 466, 452, 49, - /* 2290 */ 107, 455, 370, 107, 22, 459, 460, 461, 462, 463, - /* 2300 */ 464, 49, 466, 107, 452, 108, 357, 455, 240, 108, - /* 2310 */ 0, 459, 460, 461, 462, 463, 464, 42, 466, 370, - /* 2320 */ 398, 108, 107, 107, 107, 49, 107, 187, 107, 107, - /* 2330 */ 185, 108, 410, 107, 412, 107, 116, 108, 357, 37, - /* 2340 */ 37, 117, 107, 37, 108, 108, 107, 398, 37, 107, - /* 2350 */ 37, 370, 108, 107, 37, 37, 108, 107, 107, 410, - /* 2360 */ 128, 412, 128, 108, 107, 33, 107, 37, 107, 128, - /* 2370 */ 22, 128, 72, 37, 452, 71, 357, 455, 37, 398, - /* 2380 */ 37, 459, 460, 461, 462, 463, 464, 37, 466, 370, - /* 2390 */ 37, 410, 37, 412, 37, 37, 37, 78, 101, 78, - /* 2400 */ 101, 452, 33, 37, 455, 37, 22, 37, 459, 460, - /* 2410 */ 461, 462, 463, 464, 22, 466, 37, 398, 37, 37, - /* 2420 */ 78, 0, 357, 37, 37, 37, 37, 37, 37, 410, - /* 2430 */ 37, 412, 0, 452, 51, 370, 455, 42, 37, 42, - /* 2440 */ 459, 460, 461, 462, 463, 464, 0, 466, 357, 51, - /* 2450 */ 37, 51, 42, 0, 37, 51, 42, 0, 0, 37, - /* 2460 */ 37, 370, 22, 398, 33, 22, 21, 517, 517, 22, - /* 2470 */ 22, 452, 21, 517, 455, 410, 20, 412, 459, 460, - /* 2480 */ 461, 462, 463, 464, 517, 466, 517, 517, 517, 398, - /* 2490 */ 517, 517, 357, 517, 517, 517, 517, 517, 517, 517, - /* 2500 */ 517, 410, 517, 412, 517, 370, 517, 517, 517, 517, - /* 2510 */ 517, 517, 517, 517, 517, 517, 517, 452, 517, 517, - /* 2520 */ 455, 357, 517, 517, 459, 460, 461, 462, 463, 464, - /* 2530 */ 517, 466, 517, 398, 370, 517, 357, 517, 517, 517, - /* 2540 */ 517, 517, 517, 452, 517, 410, 455, 412, 517, 370, + /* 1490 */ 254, 255, 256, 257, 258, 357, 12, 13, 12, 13, + /* 1500 */ 13, 12, 13, 12, 13, 33, 33, 203, 370, 205, + /* 1510 */ 372, 33, 108, 13, 503, 433, 503, 106, 423, 373, + /* 1520 */ 109, 370, 441, 409, 37, 423, 205, 108, 423, 487, + /* 1530 */ 108, 508, 479, 490, 108, 388, 398, 37, 278, 435, + /* 1540 */ 454, 237, 238, 51, 42, 453, 20, 446, 410, 218, + /* 1550 */ 412, 451, 378, 357, 446, 251, 252, 253, 254, 255, + /* 1560 */ 256, 257, 378, 201, 437, 20, 370, 369, 20, 370, + /* 1570 */ 45, 419, 419, 370, 416, 180, 369, 382, 419, 370, + /* 1580 */ 108, 108, 369, 416, 416, 416, 108, 105, 103, 369, + /* 1590 */ 452, 381, 357, 455, 398, 102, 380, 459, 460, 461, + /* 1600 */ 462, 463, 464, 369, 466, 370, 410, 369, 412, 471, + /* 1610 */ 369, 473, 12, 13, 20, 477, 478, 362, 50, 366, + /* 1620 */ 362, 378, 22, 357, 446, 366, 378, 20, 378, 412, + /* 1630 */ 20, 20, 378, 398, 371, 35, 370, 37, 20, 371, + /* 1640 */ 436, 426, 378, 378, 369, 410, 362, 412, 452, 378, + /* 1650 */ 378, 455, 410, 360, 398, 459, 460, 461, 462, 463, + /* 1660 */ 464, 369, 466, 362, 398, 65, 360, 471, 398, 473, + /* 1670 */ 222, 398, 398, 477, 478, 450, 410, 398, 412, 398, + /* 1680 */ 398, 398, 107, 446, 376, 398, 398, 452, 398, 20, + /* 1690 */ 455, 445, 448, 442, 459, 460, 461, 462, 463, 464, + /* 1700 */ 443, 466, 376, 209, 410, 410, 471, 208, 473, 412, + /* 1710 */ 410, 357, 477, 478, 369, 435, 286, 496, 452, 285, + /* 1720 */ 496, 455, 294, 194, 370, 459, 460, 461, 462, 463, + /* 1730 */ 464, 499, 466, 35, 296, 428, 295, 428, 498, 473, + /* 1740 */ 279, 496, 495, 477, 478, 435, 494, 303, 274, 51, + /* 1750 */ 300, 298, 398, 370, 20, 493, 117, 458, 60, 61, + /* 1760 */ 62, 63, 371, 65, 410, 516, 412, 107, 376, 376, + /* 1770 */ 428, 276, 428, 410, 410, 410, 410, 410, 186, 424, + /* 1780 */ 394, 376, 376, 370, 410, 410, 510, 509, 476, 410, + /* 1790 */ 410, 410, 410, 491, 489, 410, 107, 410, 410, 410, + /* 1800 */ 410, 402, 369, 203, 106, 205, 452, 109, 357, 455, + /* 1810 */ 22, 410, 410, 459, 460, 461, 462, 463, 464, 376, + /* 1820 */ 466, 370, 410, 359, 410, 410, 410, 473, 410, 38, + /* 1830 */ 410, 477, 478, 410, 410, 235, 236, 237, 363, 410, + /* 1840 */ 377, 362, 410, 447, 0, 357, 438, 392, 392, 398, + /* 1850 */ 429, 251, 252, 253, 254, 255, 256, 257, 370, 392, + /* 1860 */ 355, 410, 0, 412, 0, 429, 357, 45, 0, 37, + /* 1870 */ 228, 37, 37, 228, 176, 37, 0, 37, 37, 370, + /* 1880 */ 228, 0, 37, 185, 186, 228, 398, 0, 37, 0, + /* 1890 */ 192, 193, 37, 0, 22, 0, 37, 223, 410, 0, + /* 1900 */ 412, 211, 0, 452, 211, 205, 455, 398, 212, 211, + /* 1910 */ 459, 460, 461, 462, 463, 464, 203, 466, 0, 410, + /* 1920 */ 0, 412, 199, 198, 473, 0, 0, 0, 477, 478, + /* 1930 */ 148, 49, 49, 0, 37, 0, 0, 37, 0, 51, + /* 1940 */ 452, 49, 0, 455, 0, 0, 45, 459, 460, 461, + /* 1950 */ 462, 463, 464, 465, 466, 467, 468, 0, 49, 0, + /* 1960 */ 0, 452, 0, 357, 455, 0, 0, 0, 459, 460, + /* 1970 */ 461, 462, 463, 464, 166, 466, 370, 37, 0, 166, + /* 1980 */ 357, 49, 0, 0, 45, 0, 0, 0, 0, 0, + /* 1990 */ 0, 0, 22, 370, 0, 357, 0, 0, 0, 0, + /* 2000 */ 0, 0, 0, 0, 398, 0, 0, 0, 370, 0, + /* 2010 */ 501, 502, 0, 0, 0, 0, 410, 0, 412, 148, + /* 2020 */ 0, 398, 0, 0, 147, 0, 146, 0, 0, 50, + /* 2030 */ 22, 0, 22, 410, 50, 412, 398, 65, 0, 65, + /* 2040 */ 0, 37, 65, 0, 0, 0, 51, 0, 410, 0, + /* 2050 */ 412, 0, 0, 37, 33, 432, 0, 0, 452, 0, + /* 2060 */ 42, 455, 51, 37, 357, 459, 460, 461, 462, 463, + /* 2070 */ 464, 42, 466, 37, 42, 452, 37, 370, 455, 357, + /* 2080 */ 45, 51, 459, 460, 461, 462, 463, 464, 42, 466, + /* 2090 */ 452, 49, 370, 455, 14, 0, 43, 459, 460, 461, + /* 2100 */ 462, 463, 464, 49, 466, 398, 42, 194, 502, 42, + /* 2110 */ 49, 0, 49, 0, 0, 0, 0, 410, 37, 412, + /* 2120 */ 398, 51, 72, 0, 42, 37, 51, 42, 0, 37, + /* 2130 */ 51, 42, 410, 0, 412, 37, 42, 51, 0, 432, + /* 2140 */ 0, 0, 0, 0, 0, 37, 22, 113, 115, 0, + /* 2150 */ 53, 22, 514, 0, 37, 37, 37, 37, 37, 452, + /* 2160 */ 0, 0, 455, 357, 37, 33, 459, 460, 461, 462, + /* 2170 */ 463, 464, 33, 466, 452, 107, 370, 455, 357, 20, + /* 2180 */ 108, 459, 460, 461, 462, 463, 464, 37, 466, 37, + /* 2190 */ 468, 370, 37, 357, 37, 37, 22, 22, 0, 22, + /* 2200 */ 22, 0, 37, 0, 398, 0, 370, 37, 0, 357, + /* 2210 */ 37, 0, 22, 0, 107, 49, 410, 37, 412, 398, + /* 2220 */ 37, 37, 370, 0, 183, 37, 22, 0, 22, 0, + /* 2230 */ 206, 410, 0, 412, 398, 33, 3, 107, 432, 108, + /* 2240 */ 103, 183, 108, 183, 280, 183, 410, 210, 412, 37, + /* 2250 */ 398, 37, 186, 432, 183, 107, 105, 50, 452, 190, + /* 2260 */ 280, 455, 410, 190, 412, 459, 460, 461, 462, 463, + /* 2270 */ 464, 50, 466, 452, 107, 33, 455, 108, 33, 357, + /* 2280 */ 459, 460, 461, 462, 463, 464, 33, 466, 452, 108, + /* 2290 */ 108, 455, 370, 107, 107, 459, 460, 461, 462, 463, + /* 2300 */ 464, 107, 466, 49, 452, 49, 357, 455, 33, 3, + /* 2310 */ 33, 459, 460, 461, 462, 463, 464, 108, 466, 370, + /* 2320 */ 398, 37, 107, 37, 108, 37, 37, 37, 280, 37, + /* 2330 */ 108, 49, 410, 108, 412, 33, 49, 0, 357, 0, + /* 2340 */ 42, 107, 33, 105, 260, 105, 2, 398, 22, 273, + /* 2350 */ 107, 370, 108, 49, 108, 107, 107, 49, 108, 410, + /* 2360 */ 22, 412, 237, 108, 107, 107, 240, 108, 107, 107, + /* 2370 */ 0, 42, 187, 107, 452, 107, 357, 455, 185, 398, + /* 2380 */ 116, 459, 460, 461, 462, 463, 464, 108, 466, 370, + /* 2390 */ 49, 410, 107, 412, 37, 117, 37, 37, 107, 37, + /* 2400 */ 107, 452, 108, 108, 455, 108, 107, 107, 459, 460, + /* 2410 */ 461, 462, 463, 464, 107, 466, 37, 398, 108, 107, + /* 2420 */ 37, 108, 357, 107, 37, 108, 107, 107, 33, 410, + /* 2430 */ 107, 412, 107, 452, 37, 370, 455, 22, 72, 128, + /* 2440 */ 459, 460, 461, 462, 463, 464, 128, 466, 357, 128, + /* 2450 */ 128, 71, 78, 37, 37, 37, 37, 37, 37, 37, + /* 2460 */ 37, 370, 37, 398, 101, 101, 78, 33, 37, 37, + /* 2470 */ 37, 452, 22, 22, 455, 410, 37, 412, 459, 460, + /* 2480 */ 461, 462, 463, 464, 37, 466, 37, 0, 78, 398, + /* 2490 */ 37, 37, 357, 37, 37, 37, 37, 37, 0, 51, + /* 2500 */ 37, 410, 0, 412, 42, 370, 51, 42, 37, 42, + /* 2510 */ 0, 37, 51, 0, 42, 51, 37, 452, 37, 0, + /* 2520 */ 455, 357, 22, 33, 459, 460, 461, 462, 463, 464, + /* 2530 */ 22, 466, 21, 398, 370, 21, 357, 22, 22, 517, + /* 2540 */ 20, 517, 517, 452, 517, 410, 455, 412, 517, 370, /* 2550 */ 459, 460, 461, 462, 463, 464, 517, 466, 517, 517, /* 2560 */ 517, 517, 398, 517, 517, 517, 517, 357, 517, 517, /* 2570 */ 517, 517, 517, 517, 410, 517, 412, 398, 517, 517, @@ -1226,9 +871,9 @@ static const YYCODETYPE yy_lookahead[] = { /* 3390 */ 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, /* 3400 */ 354, 354, }; -#define YY_SHIFT_COUNT (859) +#define YY_SHIFT_COUNT (889) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2458) +#define YY_SHIFT_MAX (2520) static const unsigned short int yy_shift_ofst[] = { /* 0 */ 496, 0, 247, 0, 495, 495, 495, 495, 495, 495, /* 10 */ 495, 495, 495, 495, 495, 495, 742, 989, 989, 1236, @@ -1250,74 +895,77 @@ static const unsigned short int yy_shift_ofst[] = { /* 170 */ 213, 213, 213, 907, 285, 416, 592, 79, 340, 300, /* 180 */ 603, 578, 643, 316, 316, 799, 145, 823, 279, 279, /* 190 */ 279, 869, 443, 279, 639, 541, 1029, 143, 749, 541, - /* 200 */ 541, 1071, 951, 118, 1000, 951, 1156, 805, 317, 1240, - /* 210 */ 1470, 1481, 1504, 1310, 604, 1504, 604, 1333, 1515, 1518, - /* 220 */ 1495, 1518, 1495, 1366, 1515, 1518, 1515, 1495, 1366, 1366, - /* 230 */ 1366, 1449, 1465, 1515, 1469, 1515, 1515, 1515, 1556, 1528, - /* 240 */ 1556, 1528, 1504, 604, 604, 1563, 604, 1566, 1569, 604, - /* 250 */ 1566, 604, 1576, 604, 604, 1515, 604, 1556, 63, 63, - /* 260 */ 63, 63, 63, 63, 63, 63, 63, 63, 63, 1515, - /* 270 */ 914, 914, 1556, 700, 700, 700, 1417, 1537, 1504, 611, - /* 280 */ 1630, 1445, 1453, 1563, 611, 1240, 1515, 700, 1393, 1399, - /* 290 */ 1393, 1399, 1392, 1498, 1393, 1404, 1407, 1424, 1240, 1401, - /* 300 */ 1409, 1421, 1443, 1518, 1700, 1614, 1459, 1566, 611, 611, - /* 310 */ 1635, 1399, 700, 700, 700, 700, 1399, 700, 1570, 611, - /* 320 */ 650, 611, 1518, 700, 700, 1664, 700, 1515, 611, 1753, - /* 330 */ 1738, 1556, 3048, 3048, 3048, 3048, 3048, 3048, 3048, 3048, - /* 340 */ 3048, 36, 1698, 197, 1411, 924, 1056, 1419, 294, 640, - /* 350 */ 602, 386, 529, 540, 540, 540, 540, 540, 540, 540, - /* 360 */ 540, 540, 94, 630, 21, 778, 778, 353, 613, 634, - /* 370 */ 446, 26, 599, 739, 844, 1113, 1171, 814, 671, 948, - /* 380 */ 100, 671, 671, 671, 405, 405, 1269, 717, 401, 1277, - /* 390 */ 1239, 1161, 449, 1180, 1186, 1202, 1208, 1261, 1298, 883, - /* 400 */ 1175, 1285, 1286, 351, 505, 627, 1214, 979, 1083, 1267, - /* 410 */ 1289, 1137, 1121, 1135, 1291, 1336, 1296, 1140, 1303, 709, - /* 420 */ 1318, 1330, 1332, 1350, 1352, 1394, 1356, 1357, 1388, 1389, - /* 430 */ 1390, 1396, 903, 1145, 1297, 1400, 1406, 1422, 913, 1786, - /* 440 */ 1788, 1791, 1747, 1793, 1757, 1568, 1760, 1761, 1762, 1572, - /* 450 */ 1801, 1765, 1773, 1583, 1775, 1819, 1594, 1823, 1787, 1825, - /* 460 */ 1789, 1828, 1807, 1830, 1796, 1611, 1838, 1628, 1840, 1631, - /* 470 */ 1629, 1639, 1640, 1846, 1847, 1848, 1651, 1661, 1860, 1862, - /* 480 */ 1716, 1816, 1818, 1868, 1832, 1870, 1871, 1835, 1822, 1875, - /* 490 */ 1827, 1877, 1833, 1880, 1881, 1882, 1839, 1885, 1887, 1889, - /* 500 */ 1892, 1893, 1894, 1729, 1859, 1897, 1733, 1901, 1902, 1904, - /* 510 */ 1905, 1908, 1916, 1918, 1920, 1925, 1926, 1927, 1930, 1931, - /* 520 */ 1932, 1933, 1934, 1935, 1936, 1937, 1873, 1923, 1896, 1938, - /* 530 */ 1939, 1942, 1944, 1945, 1946, 1957, 1958, 1940, 1959, 1812, - /* 540 */ 1965, 1820, 1966, 1831, 1974, 1978, 1960, 1929, 1961, 1941, - /* 550 */ 1984, 1921, 1948, 1987, 1924, 1988, 1947, 1990, 1992, 1962, - /* 560 */ 1943, 1954, 1997, 1963, 1950, 1956, 2002, 1968, 1952, 1964, - /* 570 */ 2007, 1972, 2013, 1969, 1973, 1986, 1971, 1975, 1967, 1976, - /* 580 */ 2017, 1979, 1985, 2023, 2026, 2028, 2029, 1989, 1843, 2030, - /* 590 */ 1971, 1983, 2034, 2038, 1970, 2039, 2040, 2004, 1993, 2001, - /* 600 */ 2045, 2009, 1996, 2010, 2049, 2014, 2003, 2011, 2056, 2020, - /* 610 */ 2008, 2018, 2062, 2063, 2071, 2073, 2074, 2076, 1980, 1994, - /* 620 */ 2043, 2059, 2088, 2054, 2057, 2066, 2069, 2072, 2075, 2077, - /* 630 */ 2078, 2080, 2083, 2081, 2084, 2089, 2085, 2096, 2101, 2110, - /* 640 */ 2102, 2125, 2104, 2082, 2127, 2106, 2092, 2130, 2131, 2133, - /* 650 */ 2099, 2137, 2103, 2138, 2119, 2122, 2107, 2108, 2109, 2035, - /* 660 */ 2041, 2147, 1977, 2042, 1951, 1971, 2105, 2150, 1982, 2114, - /* 670 */ 2134, 2153, 1991, 2136, 2006, 2012, 2155, 2157, 2016, 2005, - /* 680 */ 2022, 2021, 2161, 2139, 1895, 2087, 2079, 2093, 2094, 2142, - /* 690 */ 2143, 2100, 2146, 2098, 2151, 2111, 2112, 2159, 2175, 2113, - /* 700 */ 2116, 2117, 2118, 2120, 2177, 2163, 2166, 2123, 2180, 1955, - /* 710 */ 2121, 2124, 2214, 2193, 1995, 2190, 2199, 2200, 2202, 2203, - /* 720 */ 2204, 2141, 2144, 2194, 1998, 2209, 2195, 2245, 2247, 2148, - /* 730 */ 2212, 2218, 2152, 1999, 2158, 2254, 2238, 2037, 2169, 2171, - /* 740 */ 2178, 2240, 2183, 2186, 2252, 2197, 2272, 2068, 2196, 2201, - /* 750 */ 2213, 2215, 2216, 2140, 2217, 2310, 2275, 2145, 2219, 2220, - /* 760 */ 1971, 2276, 2221, 2222, 2223, 2226, 2228, 2224, 2229, 2302, - /* 770 */ 2303, 2235, 2236, 2306, 2239, 2237, 2311, 2242, 2244, 2313, - /* 780 */ 2246, 2248, 2317, 2250, 2255, 2318, 2251, 2232, 2234, 2241, - /* 790 */ 2243, 2257, 2332, 2259, 2330, 2261, 2332, 2332, 2348, 2300, - /* 800 */ 2304, 2336, 2341, 2343, 2350, 2353, 2355, 2357, 2358, 2359, - /* 810 */ 2319, 2297, 2321, 2299, 2369, 2366, 2368, 2370, 2384, 2379, - /* 820 */ 2381, 2382, 2342, 2080, 2386, 2083, 2387, 2388, 2389, 2390, - /* 830 */ 2392, 2391, 2421, 2393, 2383, 2395, 2432, 2401, 2398, 2397, - /* 840 */ 2446, 2413, 2400, 2410, 2453, 2417, 2404, 2414, 2457, 2422, - /* 850 */ 2423, 2458, 2440, 2431, 2443, 2445, 2447, 2448, 2451, 2456, + /* 200 */ 541, 1071, 951, 118, 1000, 951, 1156, 805, 317, 1260, + /* 210 */ 1492, 1502, 1526, 1331, 604, 1526, 604, 1362, 1545, 1548, + /* 220 */ 1525, 1548, 1525, 1395, 1545, 1548, 1545, 1525, 1395, 1395, + /* 230 */ 1395, 1482, 1485, 1545, 1493, 1545, 1545, 1545, 1594, 1568, + /* 240 */ 1594, 1568, 1526, 604, 604, 1607, 604, 1610, 1611, 604, + /* 250 */ 1610, 604, 1618, 604, 604, 1545, 604, 1594, 63, 63, + /* 260 */ 63, 63, 63, 63, 63, 63, 63, 63, 63, 1545, + /* 270 */ 914, 914, 1594, 700, 700, 700, 1448, 1575, 1526, 611, + /* 280 */ 1669, 1494, 1499, 1607, 611, 1260, 1545, 700, 1430, 1434, + /* 290 */ 1430, 1434, 1428, 1529, 1430, 1438, 1441, 1461, 1260, 1444, + /* 300 */ 1450, 1453, 1474, 1548, 1734, 1639, 1495, 1610, 611, 611, + /* 310 */ 1660, 1434, 700, 700, 700, 700, 1434, 700, 1592, 611, + /* 320 */ 650, 611, 1548, 700, 700, 700, 700, 700, 700, 700, + /* 330 */ 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, + /* 340 */ 700, 700, 700, 700, 700, 1689, 700, 1545, 611, 1788, + /* 350 */ 1791, 1594, 3048, 3048, 3048, 3048, 3048, 3048, 3048, 3048, + /* 360 */ 3048, 36, 1698, 197, 1411, 924, 1056, 1419, 294, 640, + /* 370 */ 602, 386, 529, 540, 540, 540, 540, 540, 540, 540, + /* 380 */ 540, 540, 94, 630, 21, 778, 778, 353, 613, 634, + /* 390 */ 446, 26, 599, 739, 844, 1113, 1171, 814, 671, 948, + /* 400 */ 100, 671, 671, 671, 405, 405, 1269, 717, 401, 1277, + /* 410 */ 1239, 1161, 449, 1180, 1186, 1202, 1208, 1261, 1298, 883, + /* 420 */ 1175, 1285, 1286, 351, 505, 627, 1214, 979, 1083, 1267, + /* 430 */ 1289, 1137, 1121, 1135, 1291, 1336, 1296, 1140, 1303, 709, + /* 440 */ 1318, 1330, 1332, 1350, 1352, 1394, 1400, 1409, 1431, 1435, + /* 450 */ 1452, 1459, 1484, 1486, 1489, 1491, 1404, 1422, 1426, 1472, + /* 460 */ 1473, 1478, 903, 1145, 1321, 1487, 1500, 1341, 913, 1844, + /* 470 */ 1862, 1864, 1822, 1868, 1832, 1642, 1834, 1835, 1838, 1645, + /* 480 */ 1876, 1840, 1841, 1652, 1845, 1881, 1657, 1887, 1851, 1889, + /* 490 */ 1855, 1893, 1872, 1895, 1859, 1674, 1899, 1690, 1902, 1693, + /* 500 */ 1696, 1700, 1713, 1918, 1920, 1925, 1723, 1725, 1926, 1927, + /* 510 */ 1782, 1882, 1883, 1933, 1897, 1935, 1936, 1900, 1888, 1938, + /* 520 */ 1892, 1942, 1901, 1944, 1945, 1957, 1909, 1959, 1960, 1962, + /* 530 */ 1965, 1966, 1967, 1808, 1940, 1978, 1813, 1994, 1996, 1997, + /* 540 */ 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2009, + /* 550 */ 2012, 2013, 2014, 2015, 2017, 2022, 1932, 1982, 1939, 1983, + /* 560 */ 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1970, 2023, 1871, + /* 570 */ 2020, 1877, 2025, 1880, 2027, 2028, 2008, 1979, 2010, 1984, + /* 580 */ 2031, 1972, 2004, 2038, 1974, 2040, 1977, 2043, 2044, 2016, + /* 590 */ 1995, 2018, 2045, 2026, 2011, 2029, 2047, 2036, 2030, 2032, + /* 600 */ 2049, 2039, 2051, 2035, 2046, 2021, 2042, 2054, 2080, 2061, + /* 610 */ 2052, 2053, 2064, 2056, 2057, 2059, 2095, 2067, 1913, 2111, + /* 620 */ 2042, 2063, 2113, 2114, 2050, 2115, 2116, 2081, 2070, 2082, + /* 630 */ 2123, 2088, 2075, 2085, 2128, 2092, 2079, 2089, 2133, 2098, + /* 640 */ 2086, 2094, 2138, 2140, 2141, 2142, 2143, 2144, 2033, 2034, + /* 650 */ 2108, 2124, 2149, 2117, 2118, 2119, 2120, 2121, 2127, 2150, + /* 660 */ 2155, 2132, 2139, 2157, 2158, 2129, 2152, 2153, 2174, 2160, + /* 670 */ 2175, 2161, 2177, 2097, 2198, 2178, 2165, 2201, 2203, 2205, + /* 680 */ 2170, 2208, 2173, 2211, 2190, 2159, 2180, 2183, 2184, 2072, + /* 690 */ 2068, 2213, 2041, 2107, 2037, 2042, 2166, 2223, 2058, 2188, + /* 700 */ 2204, 2227, 2024, 2206, 2060, 2066, 2229, 2232, 2062, 2069, + /* 710 */ 2071, 2073, 2233, 2202, 1964, 2130, 2131, 2148, 2134, 2212, + /* 720 */ 2214, 2167, 2207, 2151, 2221, 2137, 2169, 2242, 2245, 2181, + /* 730 */ 2186, 2187, 2194, 2182, 2253, 2254, 2256, 2215, 2275, 1980, + /* 740 */ 2209, 2216, 2306, 2277, 2048, 2284, 2286, 2288, 2289, 2290, + /* 750 */ 2292, 2222, 2225, 2282, 2076, 2302, 2287, 2337, 2339, 2234, + /* 760 */ 2298, 2309, 2238, 2084, 2240, 2344, 2326, 2125, 2244, 2243, + /* 770 */ 2246, 2304, 2248, 2249, 2308, 2250, 2338, 2126, 2257, 2255, + /* 780 */ 2259, 2258, 2261, 2185, 2262, 2370, 2329, 2193, 2266, 2264, + /* 790 */ 2042, 2341, 2268, 2285, 2279, 2291, 2293, 2278, 2294, 2357, + /* 800 */ 2359, 2299, 2295, 2360, 2300, 2297, 2362, 2307, 2310, 2379, + /* 810 */ 2312, 2313, 2383, 2316, 2317, 2387, 2319, 2311, 2318, 2321, + /* 820 */ 2322, 2320, 2395, 2323, 2397, 2325, 2395, 2395, 2415, 2366, + /* 830 */ 2380, 2416, 2417, 2418, 2419, 2420, 2421, 2422, 2423, 2425, + /* 840 */ 2374, 2363, 2388, 2364, 2434, 2431, 2432, 2433, 2450, 2439, + /* 850 */ 2447, 2449, 2410, 2132, 2453, 2139, 2454, 2456, 2457, 2458, + /* 860 */ 2451, 2459, 2487, 2460, 2448, 2462, 2498, 2463, 2455, 2465, + /* 870 */ 2502, 2471, 2461, 2467, 2510, 2474, 2464, 2472, 2513, 2479, + /* 880 */ 2481, 2519, 2500, 2490, 2508, 2511, 2515, 2516, 2514, 2520, }; -#define YY_REDUCE_COUNT (340) +#define YY_REDUCE_COUNT (360) #define YY_REDUCE_MIN (-481) #define YY_REDUCE_MAX (2581) static const short yy_reduce_ofst[] = { @@ -1338,112 +986,117 @@ static const short yy_reduce_ofst[] = { /* 140 */ 425, 9, 222, 676, 690, -450, -435, 469, 225, 325, /* 150 */ -115, 466, 696, 706, -129, 744, 782, 754, 420, 698, /* 160 */ 783, 850, 852, 876, 813, 477, 577, 699, 731, 895, - /* 170 */ 926, 959, 895, 873, 905, 1003, 953, 859, 874, 884, - /* 180 */ 1013, 1014, 1014, 1015, 1028, 993, 1076, 1024, 945, 952, - /* 190 */ 954, 1033, 1014, 968, 1099, 1078, 1129, 1094, 1064, 1088, - /* 200 */ 1089, 1014, 1019, 1019, 1005, 1019, 1035, 1025, 1128, 1084, - /* 210 */ 1068, 1072, 1080, 1079, 1151, 1085, 1154, 1096, 1168, 1169, - /* 220 */ 1124, 1174, 1126, 1131, 1182, 1179, 1183, 1143, 1147, 1148, - /* 230 */ 1149, 1185, 1188, 1201, 1192, 1204, 1205, 1206, 1215, 1213, - /* 240 */ 1218, 1216, 1139, 1203, 1209, 1172, 1210, 1220, 1159, 1225, - /* 250 */ 1243, 1229, 1184, 1241, 1242, 1248, 1246, 1256, 1223, 1227, - /* 260 */ 1228, 1230, 1231, 1232, 1233, 1234, 1244, 1245, 1251, 1258, - /* 270 */ 1274, 1278, 1279, 1253, 1260, 1262, 1190, 1198, 1207, 1276, - /* 280 */ 1221, 1237, 1226, 1259, 1299, 1247, 1308, 1271, 1187, 1257, - /* 290 */ 1193, 1263, 1189, 1195, 1211, 1219, 1222, 1212, 1275, 1199, - /* 300 */ 1224, 1238, 1019, 1353, 1264, 1249, 1252, 1365, 1361, 1362, - /* 310 */ 1270, 1317, 1338, 1340, 1341, 1343, 1326, 1345, 1344, 1381, - /* 320 */ 1368, 1391, 1395, 1359, 1360, 1370, 1363, 1405, 1402, 1418, - /* 330 */ 1416, 1420, 1342, 1334, 1355, 1358, 1397, 1398, 1403, 1408, - /* 340 */ 1428, + /* 170 */ 926, 935, 895, 873, 905, 1003, 953, 859, 877, 889, + /* 180 */ 1016, 992, 992, 1015, 1028, 993, 1055, 1006, 954, 963, + /* 190 */ 1011, 1082, 992, 1013, 1146, 1095, 1151, 1114, 1081, 1102, + /* 200 */ 1105, 992, 1042, 1042, 1023, 1042, 1053, 1043, 1147, 1104, + /* 210 */ 1086, 1092, 1101, 1100, 1174, 1108, 1184, 1127, 1198, 1199, + /* 220 */ 1152, 1203, 1153, 1158, 1207, 1209, 1213, 1159, 1167, 1168, + /* 230 */ 1169, 1195, 1210, 1220, 1216, 1234, 1238, 1241, 1255, 1253, + /* 240 */ 1258, 1259, 1178, 1243, 1248, 1217, 1250, 1263, 1204, 1254, + /* 250 */ 1268, 1264, 1215, 1265, 1271, 1275, 1272, 1284, 1256, 1270, + /* 260 */ 1273, 1274, 1279, 1281, 1282, 1283, 1287, 1288, 1290, 1292, + /* 270 */ 1293, 1306, 1301, 1242, 1294, 1295, 1225, 1244, 1237, 1308, + /* 280 */ 1246, 1257, 1251, 1297, 1326, 1280, 1345, 1300, 1221, 1307, + /* 290 */ 1224, 1309, 1232, 1240, 1245, 1247, 1252, 1262, 1310, 1249, + /* 300 */ 1276, 1278, 1042, 1383, 1299, 1302, 1305, 1391, 1392, 1393, + /* 310 */ 1312, 1342, 1363, 1364, 1365, 1366, 1344, 1367, 1355, 1405, + /* 320 */ 1386, 1406, 1413, 1374, 1375, 1379, 1380, 1381, 1382, 1385, + /* 330 */ 1387, 1388, 1389, 1390, 1401, 1402, 1412, 1414, 1415, 1416, + /* 340 */ 1418, 1420, 1423, 1424, 1429, 1399, 1432, 1433, 1443, 1464, + /* 350 */ 1475, 1479, 1408, 1396, 1421, 1436, 1455, 1456, 1467, 1463, + /* 360 */ 1505, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 10 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 20 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 30 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 40 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 50 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 60 */ 2294, 1953, 1953, 2257, 1953, 1953, 1953, 1953, 1953, 1953, - /* 70 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 2264, 1953, 1953, - /* 80 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 90 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 2052, 1953, 1953, - /* 100 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 110 */ 1953, 1953, 1953, 1953, 2050, 2518, 1953, 1953, 1953, 1953, - /* 120 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 130 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 2530, - /* 140 */ 1953, 1953, 2024, 2024, 1953, 2530, 2530, 2530, 2490, 2490, - /* 150 */ 2050, 1953, 1953, 2052, 2332, 1953, 1953, 1953, 1953, 1953, - /* 160 */ 1953, 1953, 1953, 2175, 1983, 1953, 1953, 1953, 1953, 2199, - /* 170 */ 1953, 1953, 1953, 2320, 1953, 1953, 2559, 2621, 1953, 2562, - /* 180 */ 1953, 1953, 1953, 1953, 1953, 2269, 1953, 2549, 1953, 1953, - /* 190 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 2128, 2314, 1953, - /* 200 */ 1953, 1953, 2522, 2536, 2605, 2523, 2520, 2543, 1953, 2553, - /* 210 */ 1953, 2357, 1953, 2346, 2052, 1953, 2052, 2307, 2252, 1953, - /* 220 */ 2262, 1953, 2262, 2259, 1953, 1953, 1953, 2262, 2259, 2259, - /* 230 */ 2259, 2117, 2113, 1953, 2111, 1953, 1953, 1953, 1953, 2008, - /* 240 */ 1953, 2008, 1953, 2052, 2052, 1953, 2052, 1953, 1953, 2052, - /* 250 */ 1953, 2052, 1953, 2052, 2052, 1953, 2052, 1953, 1953, 1953, - /* 260 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 270 */ 1953, 1953, 1953, 1953, 1953, 1953, 2344, 2330, 1953, 2050, - /* 280 */ 1953, 2318, 2316, 1953, 2050, 2553, 1953, 1953, 2575, 2570, - /* 290 */ 2575, 2570, 2589, 2585, 2575, 2594, 2591, 2555, 2553, 2624, - /* 300 */ 2611, 2607, 2536, 1953, 1953, 2541, 2539, 1953, 2050, 2050, - /* 310 */ 1953, 2570, 1953, 1953, 1953, 1953, 2570, 1953, 1953, 2050, - /* 320 */ 1953, 2050, 1953, 1953, 1953, 2144, 1953, 1953, 2050, 1953, - /* 330 */ 1992, 1953, 2309, 2335, 2290, 2290, 2178, 2178, 2178, 2053, - /* 340 */ 1958, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 350 */ 1953, 1953, 1953, 2588, 2587, 2442, 1953, 2494, 2493, 2492, - /* 360 */ 2483, 2441, 2140, 1953, 1953, 2440, 2439, 1953, 1953, 1953, - /* 370 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 2433, 1953, - /* 380 */ 1953, 2434, 2432, 2431, 2281, 2280, 1953, 1953, 1953, 1953, - /* 390 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 400 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 410 */ 1953, 1953, 2608, 2612, 1953, 2519, 1953, 1953, 1953, 2413, - /* 420 */ 1953, 1953, 1953, 1953, 1953, 2381, 1953, 1953, 1953, 1953, - /* 430 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 440 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 450 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 460 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 470 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 480 */ 2258, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 490 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 500 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 510 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 520 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 530 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 540 */ 1953, 1953, 1953, 2273, 1953, 1953, 1953, 1953, 1953, 1953, - /* 550 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 560 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 570 */ 1953, 1953, 1953, 1953, 1953, 1997, 2420, 1953, 1953, 1953, - /* 580 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 590 */ 2423, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 600 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 610 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 620 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 630 */ 1953, 2092, 2091, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 640 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 650 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 2424, - /* 660 */ 1953, 1953, 1953, 1953, 1953, 2415, 1953, 1953, 1953, 1953, - /* 670 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 680 */ 1953, 1953, 2604, 2556, 1953, 1953, 1953, 1953, 1953, 1953, - /* 690 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 700 */ 1953, 1953, 1953, 1953, 1953, 1953, 2413, 1953, 2586, 1953, - /* 710 */ 1953, 2602, 1953, 2606, 1953, 1953, 1953, 1953, 1953, 1953, - /* 720 */ 1953, 2529, 2525, 1953, 1953, 2521, 1953, 1953, 1953, 1953, - /* 730 */ 1953, 2480, 1953, 1953, 1953, 2514, 1953, 1953, 1953, 1953, - /* 740 */ 1953, 1953, 1953, 1953, 1953, 2424, 1953, 2427, 1953, 1953, - /* 750 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 760 */ 2412, 1953, 2465, 2464, 1953, 1953, 1953, 1953, 1953, 1953, - /* 770 */ 1953, 2172, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 780 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 2156, 2154, 2153, - /* 790 */ 2152, 1953, 2185, 1953, 1953, 1953, 2181, 2180, 1953, 1953, - /* 800 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 810 */ 1953, 1953, 1953, 1953, 2071, 1953, 1953, 1953, 1953, 1953, - /* 820 */ 1953, 1953, 1953, 2063, 1953, 2062, 1953, 1953, 1953, 1953, - /* 830 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 840 */ 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, - /* 850 */ 1953, 1953, 1953, 1982, 1953, 1953, 1953, 1953, 1953, 1953, + /* 0 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 10 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 20 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 30 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 40 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 50 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 60 */ 2354, 2013, 2013, 2317, 2013, 2013, 2013, 2013, 2013, 2013, + /* 70 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2324, 2013, 2013, + /* 80 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 90 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2112, 2013, 2013, + /* 100 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 110 */ 2013, 2013, 2013, 2013, 2110, 2598, 2013, 2013, 2013, 2013, + /* 120 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 130 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2610, + /* 140 */ 2013, 2013, 2084, 2084, 2013, 2610, 2610, 2610, 2570, 2570, + /* 150 */ 2110, 2013, 2013, 2112, 2392, 2013, 2013, 2013, 2013, 2013, + /* 160 */ 2013, 2013, 2013, 2235, 2043, 2013, 2013, 2013, 2013, 2259, + /* 170 */ 2013, 2013, 2013, 2380, 2013, 2013, 2639, 2701, 2013, 2642, + /* 180 */ 2013, 2013, 2013, 2013, 2013, 2329, 2013, 2629, 2013, 2013, + /* 190 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2188, 2374, 2013, + /* 200 */ 2013, 2013, 2602, 2616, 2685, 2603, 2600, 2623, 2013, 2633, + /* 210 */ 2013, 2417, 2013, 2406, 2112, 2013, 2112, 2367, 2312, 2013, + /* 220 */ 2322, 2013, 2322, 2319, 2013, 2013, 2013, 2322, 2319, 2319, + /* 230 */ 2319, 2177, 2173, 2013, 2171, 2013, 2013, 2013, 2013, 2068, + /* 240 */ 2013, 2068, 2013, 2112, 2112, 2013, 2112, 2013, 2013, 2112, + /* 250 */ 2013, 2112, 2013, 2112, 2112, 2013, 2112, 2013, 2013, 2013, + /* 260 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 270 */ 2013, 2013, 2013, 2013, 2013, 2013, 2404, 2390, 2013, 2110, + /* 280 */ 2013, 2378, 2376, 2013, 2110, 2633, 2013, 2013, 2655, 2650, + /* 290 */ 2655, 2650, 2669, 2665, 2655, 2674, 2671, 2635, 2633, 2704, + /* 300 */ 2691, 2687, 2616, 2013, 2013, 2621, 2619, 2013, 2110, 2110, + /* 310 */ 2013, 2650, 2013, 2013, 2013, 2013, 2650, 2013, 2013, 2110, + /* 320 */ 2013, 2110, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 330 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 340 */ 2013, 2013, 2013, 2013, 2013, 2204, 2013, 2013, 2110, 2013, + /* 350 */ 2052, 2013, 2369, 2395, 2350, 2350, 2238, 2238, 2238, 2113, + /* 360 */ 2018, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 370 */ 2013, 2013, 2013, 2668, 2667, 2522, 2013, 2574, 2573, 2572, + /* 380 */ 2563, 2521, 2200, 2013, 2013, 2520, 2519, 2013, 2013, 2013, + /* 390 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2513, 2013, + /* 400 */ 2013, 2514, 2512, 2511, 2341, 2340, 2013, 2013, 2013, 2013, + /* 410 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 420 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 430 */ 2013, 2013, 2688, 2692, 2013, 2599, 2013, 2013, 2013, 2493, + /* 440 */ 2013, 2013, 2013, 2013, 2013, 2461, 2456, 2447, 2438, 2453, + /* 450 */ 2444, 2432, 2450, 2441, 2429, 2426, 2013, 2013, 2013, 2013, + /* 460 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 470 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 480 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 490 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 500 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 510 */ 2318, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 520 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 530 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 540 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 550 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 560 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 570 */ 2013, 2013, 2013, 2333, 2013, 2013, 2013, 2013, 2013, 2013, + /* 580 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 590 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 600 */ 2013, 2013, 2013, 2013, 2013, 2057, 2500, 2013, 2013, 2013, + /* 610 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 620 */ 2503, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 630 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 640 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 650 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 660 */ 2013, 2152, 2151, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 670 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 680 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2504, + /* 690 */ 2013, 2013, 2013, 2013, 2013, 2495, 2013, 2013, 2013, 2013, + /* 700 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 710 */ 2013, 2013, 2684, 2636, 2013, 2013, 2013, 2013, 2013, 2013, + /* 720 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 730 */ 2013, 2013, 2013, 2013, 2013, 2013, 2493, 2013, 2666, 2013, + /* 740 */ 2013, 2682, 2013, 2686, 2013, 2013, 2013, 2013, 2013, 2013, + /* 750 */ 2013, 2609, 2605, 2013, 2013, 2601, 2013, 2013, 2013, 2013, + /* 760 */ 2013, 2560, 2013, 2013, 2013, 2594, 2013, 2013, 2013, 2013, + /* 770 */ 2013, 2013, 2013, 2013, 2013, 2504, 2013, 2507, 2013, 2013, + /* 780 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 790 */ 2492, 2013, 2545, 2544, 2013, 2013, 2013, 2013, 2013, 2013, + /* 800 */ 2013, 2232, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 810 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2216, 2214, 2213, + /* 820 */ 2212, 2013, 2245, 2013, 2013, 2013, 2241, 2240, 2013, 2013, + /* 830 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 840 */ 2013, 2013, 2013, 2013, 2131, 2013, 2013, 2013, 2013, 2013, + /* 850 */ 2013, 2013, 2013, 2123, 2013, 2122, 2013, 2013, 2013, 2013, + /* 860 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 870 */ 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + /* 880 */ 2013, 2013, 2013, 2042, 2013, 2013, 2013, 2013, 2013, 2013, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1868,7 +1521,6 @@ struct yyParser { }; typedef struct yyParser yyParser; -#include #ifndef NDEBUG #include static FILE *yyTraceFILE = 0; @@ -2840,266 +2492,286 @@ static const char *const yyRuleName[] = { /* 408 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", /* 409 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", /* 410 */ "tags_literal ::= NK_INTEGER", - /* 411 */ "tags_literal ::= NK_PLUS NK_INTEGER", - /* 412 */ "tags_literal ::= NK_MINUS NK_INTEGER", - /* 413 */ "tags_literal ::= NK_FLOAT", - /* 414 */ "tags_literal ::= NK_PLUS NK_FLOAT", - /* 415 */ "tags_literal ::= NK_MINUS NK_FLOAT", - /* 416 */ "tags_literal ::= NK_BIN", - /* 417 */ "tags_literal ::= NK_PLUS NK_BIN", - /* 418 */ "tags_literal ::= NK_MINUS NK_BIN", - /* 419 */ "tags_literal ::= NK_HEX", - /* 420 */ "tags_literal ::= NK_PLUS NK_HEX", - /* 421 */ "tags_literal ::= NK_MINUS NK_HEX", - /* 422 */ "tags_literal ::= NK_STRING", - /* 423 */ "tags_literal ::= NK_BOOL", - /* 424 */ "tags_literal ::= NULL", - /* 425 */ "tags_literal ::= literal_func", - /* 426 */ "tags_literal ::= literal_func NK_PLUS duration_literal", - /* 427 */ "tags_literal ::= literal_func NK_MINUS duration_literal", - /* 428 */ "tags_literal_list ::= tags_literal", - /* 429 */ "tags_literal_list ::= tags_literal_list NK_COMMA tags_literal", - /* 430 */ "literal ::= NK_INTEGER", - /* 431 */ "literal ::= NK_FLOAT", - /* 432 */ "literal ::= NK_STRING", - /* 433 */ "literal ::= NK_BOOL", - /* 434 */ "literal ::= TIMESTAMP NK_STRING", - /* 435 */ "literal ::= duration_literal", - /* 436 */ "literal ::= NULL", - /* 437 */ "literal ::= NK_QUESTION", - /* 438 */ "duration_literal ::= NK_VARIABLE", - /* 439 */ "signed ::= NK_INTEGER", - /* 440 */ "signed ::= NK_PLUS NK_INTEGER", - /* 441 */ "signed ::= NK_MINUS NK_INTEGER", - /* 442 */ "signed ::= NK_FLOAT", - /* 443 */ "signed ::= NK_PLUS NK_FLOAT", - /* 444 */ "signed ::= NK_MINUS NK_FLOAT", - /* 445 */ "signed_literal ::= signed", - /* 446 */ "signed_literal ::= NK_STRING", - /* 447 */ "signed_literal ::= NK_BOOL", - /* 448 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 449 */ "signed_literal ::= duration_literal", - /* 450 */ "signed_literal ::= NULL", - /* 451 */ "signed_literal ::= literal_func", - /* 452 */ "signed_literal ::= NK_QUESTION", - /* 453 */ "literal_list ::= signed_literal", - /* 454 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 455 */ "db_name ::= NK_ID", - /* 456 */ "table_name ::= NK_ID", - /* 457 */ "column_name ::= NK_ID", - /* 458 */ "function_name ::= NK_ID", - /* 459 */ "view_name ::= NK_ID", - /* 460 */ "table_alias ::= NK_ID", - /* 461 */ "column_alias ::= NK_ID", - /* 462 */ "column_alias ::= NK_ALIAS", - /* 463 */ "user_name ::= NK_ID", - /* 464 */ "topic_name ::= NK_ID", - /* 465 */ "stream_name ::= NK_ID", - /* 466 */ "cgroup_name ::= NK_ID", - /* 467 */ "index_name ::= NK_ID", - /* 468 */ "expr_or_subquery ::= expression", - /* 469 */ "expression ::= literal", - /* 470 */ "expression ::= pseudo_column", - /* 471 */ "expression ::= column_reference", - /* 472 */ "expression ::= function_expression", - /* 473 */ "expression ::= case_when_expression", - /* 474 */ "expression ::= NK_LP expression NK_RP", - /* 475 */ "expression ::= NK_PLUS expr_or_subquery", - /* 476 */ "expression ::= NK_MINUS expr_or_subquery", - /* 477 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 478 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 479 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 480 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 481 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 482 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 483 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 484 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 485 */ "expression_list ::= expr_or_subquery", - /* 486 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 487 */ "column_reference ::= column_name", - /* 488 */ "column_reference ::= table_name NK_DOT column_name", - /* 489 */ "column_reference ::= NK_ALIAS", - /* 490 */ "column_reference ::= table_name NK_DOT NK_ALIAS", - /* 491 */ "pseudo_column ::= ROWTS", - /* 492 */ "pseudo_column ::= TBNAME", - /* 493 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 494 */ "pseudo_column ::= QSTART", - /* 495 */ "pseudo_column ::= QEND", - /* 496 */ "pseudo_column ::= QDURATION", - /* 497 */ "pseudo_column ::= WSTART", - /* 498 */ "pseudo_column ::= WEND", - /* 499 */ "pseudo_column ::= WDURATION", - /* 500 */ "pseudo_column ::= IROWTS", - /* 501 */ "pseudo_column ::= ISFILLED", - /* 502 */ "pseudo_column ::= QTAGS", - /* 503 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 504 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 505 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 506 */ "function_expression ::= literal_func", - /* 507 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 508 */ "literal_func ::= NOW", - /* 509 */ "literal_func ::= TODAY", - /* 510 */ "noarg_func ::= NOW", - /* 511 */ "noarg_func ::= TODAY", - /* 512 */ "noarg_func ::= TIMEZONE", - /* 513 */ "noarg_func ::= DATABASE", - /* 514 */ "noarg_func ::= CLIENT_VERSION", - /* 515 */ "noarg_func ::= SERVER_VERSION", - /* 516 */ "noarg_func ::= SERVER_STATUS", - /* 517 */ "noarg_func ::= CURRENT_USER", - /* 518 */ "noarg_func ::= USER", - /* 519 */ "star_func ::= COUNT", - /* 520 */ "star_func ::= FIRST", - /* 521 */ "star_func ::= LAST", - /* 522 */ "star_func ::= LAST_ROW", - /* 523 */ "star_func_para_list ::= NK_STAR", - /* 524 */ "star_func_para_list ::= other_para_list", - /* 525 */ "other_para_list ::= star_func_para", - /* 526 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 527 */ "star_func_para ::= expr_or_subquery", - /* 528 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 529 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 530 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 531 */ "when_then_list ::= when_then_expr", - /* 532 */ "when_then_list ::= when_then_list when_then_expr", - /* 533 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 534 */ "case_when_else_opt ::=", - /* 535 */ "case_when_else_opt ::= ELSE common_expression", - /* 536 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 537 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 538 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 539 */ "predicate ::= expr_or_subquery IS NULL", - /* 540 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 541 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 542 */ "compare_op ::= NK_LT", - /* 543 */ "compare_op ::= NK_GT", - /* 544 */ "compare_op ::= NK_LE", - /* 545 */ "compare_op ::= NK_GE", - /* 546 */ "compare_op ::= NK_NE", - /* 547 */ "compare_op ::= NK_EQ", - /* 548 */ "compare_op ::= LIKE", - /* 549 */ "compare_op ::= NOT LIKE", - /* 550 */ "compare_op ::= MATCH", - /* 551 */ "compare_op ::= NMATCH", - /* 552 */ "compare_op ::= CONTAINS", - /* 553 */ "in_op ::= IN", - /* 554 */ "in_op ::= NOT IN", - /* 555 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 556 */ "boolean_value_expression ::= boolean_primary", - /* 557 */ "boolean_value_expression ::= NOT boolean_primary", - /* 558 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 559 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 560 */ "boolean_primary ::= predicate", - /* 561 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 562 */ "common_expression ::= expr_or_subquery", - /* 563 */ "common_expression ::= boolean_value_expression", - /* 564 */ "from_clause_opt ::=", - /* 565 */ "from_clause_opt ::= FROM table_reference_list", - /* 566 */ "table_reference_list ::= table_reference", - /* 567 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 568 */ "table_reference ::= table_primary", - /* 569 */ "table_reference ::= joined_table", - /* 570 */ "table_primary ::= table_name alias_opt", - /* 571 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 572 */ "table_primary ::= subquery alias_opt", - /* 573 */ "table_primary ::= parenthesized_joined_table", - /* 574 */ "alias_opt ::=", - /* 575 */ "alias_opt ::= table_alias", - /* 576 */ "alias_opt ::= AS table_alias", - /* 577 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 578 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 579 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 580 */ "join_type ::=", - /* 581 */ "join_type ::= INNER", - /* 582 */ "query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt", - /* 583 */ "hint_list ::=", - /* 584 */ "hint_list ::= NK_HINT", - /* 585 */ "tag_mode_opt ::=", - /* 586 */ "tag_mode_opt ::= TAGS", - /* 587 */ "set_quantifier_opt ::=", - /* 588 */ "set_quantifier_opt ::= DISTINCT", - /* 589 */ "set_quantifier_opt ::= ALL", - /* 590 */ "select_list ::= select_item", - /* 591 */ "select_list ::= select_list NK_COMMA select_item", - /* 592 */ "select_item ::= NK_STAR", - /* 593 */ "select_item ::= common_expression", - /* 594 */ "select_item ::= common_expression column_alias", - /* 595 */ "select_item ::= common_expression AS column_alias", - /* 596 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 597 */ "where_clause_opt ::=", - /* 598 */ "where_clause_opt ::= WHERE search_condition", - /* 599 */ "partition_by_clause_opt ::=", - /* 600 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 601 */ "partition_list ::= partition_item", - /* 602 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 603 */ "partition_item ::= expr_or_subquery", - /* 604 */ "partition_item ::= expr_or_subquery column_alias", - /* 605 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 606 */ "twindow_clause_opt ::=", - /* 607 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", - /* 608 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 609 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 610 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 611 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 612 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", - /* 613 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 614 */ "sliding_opt ::=", - /* 615 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", - /* 616 */ "interval_sliding_duration_literal ::= NK_VARIABLE", - /* 617 */ "interval_sliding_duration_literal ::= NK_STRING", - /* 618 */ "interval_sliding_duration_literal ::= NK_INTEGER", - /* 619 */ "fill_opt ::=", - /* 620 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 621 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", - /* 622 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", - /* 623 */ "fill_mode ::= NONE", - /* 624 */ "fill_mode ::= PREV", - /* 625 */ "fill_mode ::= NULL", - /* 626 */ "fill_mode ::= NULL_F", - /* 627 */ "fill_mode ::= LINEAR", - /* 628 */ "fill_mode ::= NEXT", - /* 629 */ "group_by_clause_opt ::=", - /* 630 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 631 */ "group_by_list ::= expr_or_subquery", - /* 632 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 633 */ "having_clause_opt ::=", - /* 634 */ "having_clause_opt ::= HAVING search_condition", - /* 635 */ "range_opt ::=", - /* 636 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 637 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", - /* 638 */ "every_opt ::=", - /* 639 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 640 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 641 */ "query_simple ::= query_specification", - /* 642 */ "query_simple ::= union_query_expression", - /* 643 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 644 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 645 */ "query_simple_or_subquery ::= query_simple", - /* 646 */ "query_simple_or_subquery ::= subquery", - /* 647 */ "query_or_subquery ::= query_expression", - /* 648 */ "query_or_subquery ::= subquery", - /* 649 */ "order_by_clause_opt ::=", - /* 650 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 651 */ "slimit_clause_opt ::=", - /* 652 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 653 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 654 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 655 */ "limit_clause_opt ::=", - /* 656 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 657 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 658 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 659 */ "subquery ::= NK_LP query_expression NK_RP", - /* 660 */ "subquery ::= NK_LP subquery NK_RP", - /* 661 */ "search_condition ::= common_expression", - /* 662 */ "sort_specification_list ::= sort_specification", - /* 663 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 664 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 665 */ "ordering_specification_opt ::=", - /* 666 */ "ordering_specification_opt ::= ASC", - /* 667 */ "ordering_specification_opt ::= DESC", - /* 668 */ "null_ordering_opt ::=", - /* 669 */ "null_ordering_opt ::= NULLS FIRST", - /* 670 */ "null_ordering_opt ::= NULLS LAST", + /* 411 */ "tags_literal ::= NK_INTEGER NK_PLUS duration_literal", + /* 412 */ "tags_literal ::= NK_INTEGER NK_MINUS duration_literal", + /* 413 */ "tags_literal ::= NK_PLUS NK_INTEGER", + /* 414 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal", + /* 415 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal", + /* 416 */ "tags_literal ::= NK_MINUS NK_INTEGER", + /* 417 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal", + /* 418 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal", + /* 419 */ "tags_literal ::= NK_FLOAT", + /* 420 */ "tags_literal ::= NK_PLUS NK_FLOAT", + /* 421 */ "tags_literal ::= NK_MINUS NK_FLOAT", + /* 422 */ "tags_literal ::= NK_BIN", + /* 423 */ "tags_literal ::= NK_BIN NK_PLUS duration_literal", + /* 424 */ "tags_literal ::= NK_BIN NK_MINUS duration_literal", + /* 425 */ "tags_literal ::= NK_PLUS NK_BIN", + /* 426 */ "tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal", + /* 427 */ "tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal", + /* 428 */ "tags_literal ::= NK_MINUS NK_BIN", + /* 429 */ "tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal", + /* 430 */ "tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal", + /* 431 */ "tags_literal ::= NK_HEX", + /* 432 */ "tags_literal ::= NK_HEX NK_PLUS duration_literal", + /* 433 */ "tags_literal ::= NK_HEX NK_MINUS duration_literal", + /* 434 */ "tags_literal ::= NK_PLUS NK_HEX", + /* 435 */ "tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal", + /* 436 */ "tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal", + /* 437 */ "tags_literal ::= NK_MINUS NK_HEX", + /* 438 */ "tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal", + /* 439 */ "tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal", + /* 440 */ "tags_literal ::= NK_STRING", + /* 441 */ "tags_literal ::= NK_STRING NK_PLUS duration_literal", + /* 442 */ "tags_literal ::= NK_STRING NK_MINUS duration_literal", + /* 443 */ "tags_literal ::= NK_BOOL", + /* 444 */ "tags_literal ::= NULL", + /* 445 */ "tags_literal ::= literal_func", + /* 446 */ "tags_literal ::= literal_func NK_PLUS duration_literal", + /* 447 */ "tags_literal ::= literal_func NK_MINUS duration_literal", + /* 448 */ "tags_literal_list ::= tags_literal", + /* 449 */ "tags_literal_list ::= tags_literal_list NK_COMMA tags_literal", + /* 450 */ "literal ::= NK_INTEGER", + /* 451 */ "literal ::= NK_FLOAT", + /* 452 */ "literal ::= NK_STRING", + /* 453 */ "literal ::= NK_BOOL", + /* 454 */ "literal ::= TIMESTAMP NK_STRING", + /* 455 */ "literal ::= duration_literal", + /* 456 */ "literal ::= NULL", + /* 457 */ "literal ::= NK_QUESTION", + /* 458 */ "duration_literal ::= NK_VARIABLE", + /* 459 */ "signed ::= NK_INTEGER", + /* 460 */ "signed ::= NK_PLUS NK_INTEGER", + /* 461 */ "signed ::= NK_MINUS NK_INTEGER", + /* 462 */ "signed ::= NK_FLOAT", + /* 463 */ "signed ::= NK_PLUS NK_FLOAT", + /* 464 */ "signed ::= NK_MINUS NK_FLOAT", + /* 465 */ "signed_literal ::= signed", + /* 466 */ "signed_literal ::= NK_STRING", + /* 467 */ "signed_literal ::= NK_BOOL", + /* 468 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 469 */ "signed_literal ::= duration_literal", + /* 470 */ "signed_literal ::= NULL", + /* 471 */ "signed_literal ::= literal_func", + /* 472 */ "signed_literal ::= NK_QUESTION", + /* 473 */ "literal_list ::= signed_literal", + /* 474 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 475 */ "db_name ::= NK_ID", + /* 476 */ "table_name ::= NK_ID", + /* 477 */ "column_name ::= NK_ID", + /* 478 */ "function_name ::= NK_ID", + /* 479 */ "view_name ::= NK_ID", + /* 480 */ "table_alias ::= NK_ID", + /* 481 */ "column_alias ::= NK_ID", + /* 482 */ "column_alias ::= NK_ALIAS", + /* 483 */ "user_name ::= NK_ID", + /* 484 */ "topic_name ::= NK_ID", + /* 485 */ "stream_name ::= NK_ID", + /* 486 */ "cgroup_name ::= NK_ID", + /* 487 */ "index_name ::= NK_ID", + /* 488 */ "expr_or_subquery ::= expression", + /* 489 */ "expression ::= literal", + /* 490 */ "expression ::= pseudo_column", + /* 491 */ "expression ::= column_reference", + /* 492 */ "expression ::= function_expression", + /* 493 */ "expression ::= case_when_expression", + /* 494 */ "expression ::= NK_LP expression NK_RP", + /* 495 */ "expression ::= NK_PLUS expr_or_subquery", + /* 496 */ "expression ::= NK_MINUS expr_or_subquery", + /* 497 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 498 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 499 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 500 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 501 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 502 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 503 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 504 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 505 */ "expression_list ::= expr_or_subquery", + /* 506 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 507 */ "column_reference ::= column_name", + /* 508 */ "column_reference ::= table_name NK_DOT column_name", + /* 509 */ "column_reference ::= NK_ALIAS", + /* 510 */ "column_reference ::= table_name NK_DOT NK_ALIAS", + /* 511 */ "pseudo_column ::= ROWTS", + /* 512 */ "pseudo_column ::= TBNAME", + /* 513 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 514 */ "pseudo_column ::= QSTART", + /* 515 */ "pseudo_column ::= QEND", + /* 516 */ "pseudo_column ::= QDURATION", + /* 517 */ "pseudo_column ::= WSTART", + /* 518 */ "pseudo_column ::= WEND", + /* 519 */ "pseudo_column ::= WDURATION", + /* 520 */ "pseudo_column ::= IROWTS", + /* 521 */ "pseudo_column ::= ISFILLED", + /* 522 */ "pseudo_column ::= QTAGS", + /* 523 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 524 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 525 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 526 */ "function_expression ::= literal_func", + /* 527 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 528 */ "literal_func ::= NOW", + /* 529 */ "literal_func ::= TODAY", + /* 530 */ "noarg_func ::= NOW", + /* 531 */ "noarg_func ::= TODAY", + /* 532 */ "noarg_func ::= TIMEZONE", + /* 533 */ "noarg_func ::= DATABASE", + /* 534 */ "noarg_func ::= CLIENT_VERSION", + /* 535 */ "noarg_func ::= SERVER_VERSION", + /* 536 */ "noarg_func ::= SERVER_STATUS", + /* 537 */ "noarg_func ::= CURRENT_USER", + /* 538 */ "noarg_func ::= USER", + /* 539 */ "star_func ::= COUNT", + /* 540 */ "star_func ::= FIRST", + /* 541 */ "star_func ::= LAST", + /* 542 */ "star_func ::= LAST_ROW", + /* 543 */ "star_func_para_list ::= NK_STAR", + /* 544 */ "star_func_para_list ::= other_para_list", + /* 545 */ "other_para_list ::= star_func_para", + /* 546 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 547 */ "star_func_para ::= expr_or_subquery", + /* 548 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 549 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 550 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 551 */ "when_then_list ::= when_then_expr", + /* 552 */ "when_then_list ::= when_then_list when_then_expr", + /* 553 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 554 */ "case_when_else_opt ::=", + /* 555 */ "case_when_else_opt ::= ELSE common_expression", + /* 556 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 557 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 558 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 559 */ "predicate ::= expr_or_subquery IS NULL", + /* 560 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 561 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 562 */ "compare_op ::= NK_LT", + /* 563 */ "compare_op ::= NK_GT", + /* 564 */ "compare_op ::= NK_LE", + /* 565 */ "compare_op ::= NK_GE", + /* 566 */ "compare_op ::= NK_NE", + /* 567 */ "compare_op ::= NK_EQ", + /* 568 */ "compare_op ::= LIKE", + /* 569 */ "compare_op ::= NOT LIKE", + /* 570 */ "compare_op ::= MATCH", + /* 571 */ "compare_op ::= NMATCH", + /* 572 */ "compare_op ::= CONTAINS", + /* 573 */ "in_op ::= IN", + /* 574 */ "in_op ::= NOT IN", + /* 575 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 576 */ "boolean_value_expression ::= boolean_primary", + /* 577 */ "boolean_value_expression ::= NOT boolean_primary", + /* 578 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 579 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 580 */ "boolean_primary ::= predicate", + /* 581 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 582 */ "common_expression ::= expr_or_subquery", + /* 583 */ "common_expression ::= boolean_value_expression", + /* 584 */ "from_clause_opt ::=", + /* 585 */ "from_clause_opt ::= FROM table_reference_list", + /* 586 */ "table_reference_list ::= table_reference", + /* 587 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 588 */ "table_reference ::= table_primary", + /* 589 */ "table_reference ::= joined_table", + /* 590 */ "table_primary ::= table_name alias_opt", + /* 591 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 592 */ "table_primary ::= subquery alias_opt", + /* 593 */ "table_primary ::= parenthesized_joined_table", + /* 594 */ "alias_opt ::=", + /* 595 */ "alias_opt ::= table_alias", + /* 596 */ "alias_opt ::= AS table_alias", + /* 597 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 598 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 599 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 600 */ "join_type ::=", + /* 601 */ "join_type ::= INNER", + /* 602 */ "query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt", + /* 603 */ "hint_list ::=", + /* 604 */ "hint_list ::= NK_HINT", + /* 605 */ "tag_mode_opt ::=", + /* 606 */ "tag_mode_opt ::= TAGS", + /* 607 */ "set_quantifier_opt ::=", + /* 608 */ "set_quantifier_opt ::= DISTINCT", + /* 609 */ "set_quantifier_opt ::= ALL", + /* 610 */ "select_list ::= select_item", + /* 611 */ "select_list ::= select_list NK_COMMA select_item", + /* 612 */ "select_item ::= NK_STAR", + /* 613 */ "select_item ::= common_expression", + /* 614 */ "select_item ::= common_expression column_alias", + /* 615 */ "select_item ::= common_expression AS column_alias", + /* 616 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 617 */ "where_clause_opt ::=", + /* 618 */ "where_clause_opt ::= WHERE search_condition", + /* 619 */ "partition_by_clause_opt ::=", + /* 620 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 621 */ "partition_list ::= partition_item", + /* 622 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 623 */ "partition_item ::= expr_or_subquery", + /* 624 */ "partition_item ::= expr_or_subquery column_alias", + /* 625 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 626 */ "twindow_clause_opt ::=", + /* 627 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", + /* 628 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 629 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 630 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 631 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 632 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", + /* 633 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 634 */ "sliding_opt ::=", + /* 635 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", + /* 636 */ "interval_sliding_duration_literal ::= NK_VARIABLE", + /* 637 */ "interval_sliding_duration_literal ::= NK_STRING", + /* 638 */ "interval_sliding_duration_literal ::= NK_INTEGER", + /* 639 */ "fill_opt ::=", + /* 640 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 641 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", + /* 642 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", + /* 643 */ "fill_mode ::= NONE", + /* 644 */ "fill_mode ::= PREV", + /* 645 */ "fill_mode ::= NULL", + /* 646 */ "fill_mode ::= NULL_F", + /* 647 */ "fill_mode ::= LINEAR", + /* 648 */ "fill_mode ::= NEXT", + /* 649 */ "group_by_clause_opt ::=", + /* 650 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 651 */ "group_by_list ::= expr_or_subquery", + /* 652 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 653 */ "having_clause_opt ::=", + /* 654 */ "having_clause_opt ::= HAVING search_condition", + /* 655 */ "range_opt ::=", + /* 656 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 657 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", + /* 658 */ "every_opt ::=", + /* 659 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 660 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 661 */ "query_simple ::= query_specification", + /* 662 */ "query_simple ::= union_query_expression", + /* 663 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 664 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 665 */ "query_simple_or_subquery ::= query_simple", + /* 666 */ "query_simple_or_subquery ::= subquery", + /* 667 */ "query_or_subquery ::= query_expression", + /* 668 */ "query_or_subquery ::= subquery", + /* 669 */ "order_by_clause_opt ::=", + /* 670 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 671 */ "slimit_clause_opt ::=", + /* 672 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 673 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 674 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 675 */ "limit_clause_opt ::=", + /* 676 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 677 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 678 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 679 */ "subquery ::= NK_LP query_expression NK_RP", + /* 680 */ "subquery ::= NK_LP subquery NK_RP", + /* 681 */ "search_condition ::= common_expression", + /* 682 */ "sort_specification_list ::= sort_specification", + /* 683 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 684 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 685 */ "ordering_specification_opt ::=", + /* 686 */ "ordering_specification_opt ::= ASC", + /* 687 */ "ordering_specification_opt ::= DESC", + /* 688 */ "null_ordering_opt ::=", + /* 689 */ "null_ordering_opt ::= NULLS FIRST", + /* 690 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -3304,9 +2976,7 @@ static void yy_destructor( case 512: /* query_simple_or_subquery */ case 514: /* sort_specification */ { -#line 7 "sql.y" nodesDestroyNode((yypminor->yy718)); -#line 3309 "sql.c" } break; case 355: /* account_options */ @@ -3316,9 +2986,7 @@ static void yy_destructor( case 433: /* with_meta */ case 442: /* bufsize_opt */ { -#line 54 "sql.y" -#line 3321 "sql.c" } break; case 359: /* ip_range_list */ @@ -3356,9 +3024,7 @@ static void yy_destructor( case 508: /* order_by_clause_opt */ case 513: /* sort_specification_list */ { -#line 85 "sql.y" nodesDestroyList((yypminor->yy552)); -#line 3361 "sql.c" } break; case 362: /* user_name */ @@ -3381,32 +3047,24 @@ static void yy_destructor( case 466: /* noarg_func */ case 484: /* alias_opt */ { -#line 890 "sql.y" -#line 3386 "sql.c" } break; case 363: /* sysinfo_opt */ { -#line 112 "sql.y" -#line 3393 "sql.c" } break; case 364: /* privileges */ case 367: /* priv_type_list */ case 368: /* priv_type */ { -#line 121 "sql.y" -#line 3402 "sql.c" } break; case 365: /* priv_level */ { -#line 138 "sql.y" -#line 3409 "sql.c" } break; case 374: /* force_opt */ @@ -3420,75 +3078,55 @@ static void yy_destructor( case 490: /* set_quantifier_opt */ case 491: /* tag_mode_opt */ { -#line 167 "sql.y" -#line 3425 "sql.c" } break; case 387: /* alter_db_option */ case 409: /* alter_table_option */ { -#line 269 "sql.y" -#line 3433 "sql.c" } break; case 399: /* type_name */ { -#line 392 "sql.y" -#line 3440 "sql.c" } break; case 414: /* db_kind_opt */ case 421: /* table_kind */ { -#line 561 "sql.y" -#line 3448 "sql.c" } break; case 415: /* table_kind_db_name_cond_opt */ { -#line 526 "sql.y" -#line 3455 "sql.c" } break; case 474: /* compare_op */ case 475: /* in_op */ { -#line 1081 "sql.y" -#line 3463 "sql.c" } break; case 487: /* join_type */ { -#line 1157 "sql.y" -#line 3470 "sql.c" } break; case 504: /* fill_mode */ { -#line 1252 "sql.y" -#line 3477 "sql.c" } break; case 515: /* ordering_specification_opt */ { -#line 1337 "sql.y" -#line 3484 "sql.c" } break; case 516: /* null_ordering_opt */ { -#line 1343 "sql.y" -#line 3491 "sql.c" } break; /********* End destructor definitions *****************************************/ @@ -3655,7 +3293,7 @@ static YYACTIONTYPE yy_find_shift_action( #endif /* YYWILDCARD */ return yy_default[stateno]; }else{ - assert( i>=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) ); + assert( i>=0 && iyytos; +#ifndef NDEBUG + if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ + yysize = yyRuleInfoNRhs[yyruleno]; + if( yysize ){ + fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n", + yyTracePrompt, + yyruleno, yyRuleName[yyruleno], + yyrulenoyytos - yypParser->yystack)>yypParser->yyhwm ){ + yypParser->yyhwm++; + assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack)); + } +#endif +#if YYSTACKDEPTH>0 + if( yypParser->yytos>=yypParser->yystackEnd ){ + yyStackOverflow(yypParser); + /* The call to yyStackOverflow() above pops the stack until it is + ** empty, causing the main parser loop to exit. So the return value + ** is never used and does not matter. */ + return 0; + } +#else + if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ + if( yyGrowStack(yypParser) ){ + yyStackOverflow(yypParser); + /* The call to yyStackOverflow() above pops the stack until it is + ** empty, causing the main parser loop to exit. So the return value + ** is never used and does not matter. */ + return 0; + } + yymsp = yypParser->yytos; + } +#endif + } switch( yyruleno ){ /* Beginning here are the reduction cases. A typical example @@ -5166,21 +4892,15 @@ static YYACTIONTYPE yy_reduce( /********** Begin reduce actions **********************************************/ YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ -#line 50 "sql.y" { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } -#line 5171 "sql.c" yy_destructor(yypParser,355,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ -#line 51 "sql.y" { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } -#line 5177 "sql.c" yy_destructor(yypParser,356,&yymsp[0].minor); break; case 2: /* account_options ::= */ -#line 55 "sql.y" { } -#line 5183 "sql.c" break; case 3: /* account_options ::= account_options PPS literal */ case 4: /* account_options ::= account_options TSERIES literal */ yytestcase(yyruleno==4); @@ -5192,24 +4912,18 @@ static YYACTIONTYPE yy_reduce( case 10: /* account_options ::= account_options CONNS literal */ yytestcase(yyruleno==10); case 11: /* account_options ::= account_options STATE literal */ yytestcase(yyruleno==11); { yy_destructor(yypParser,355,&yymsp[-2].minor); -#line 56 "sql.y" { } -#line 5197 "sql.c" yy_destructor(yypParser,357,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ { yy_destructor(yypParser,358,&yymsp[0].minor); -#line 68 "sql.y" { } -#line 5205 "sql.c" } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ { yy_destructor(yypParser,356,&yymsp[-1].minor); -#line 69 "sql.y" { } -#line 5212 "sql.c" yy_destructor(yypParser,358,&yymsp[0].minor); } break; @@ -5223,27 +4937,19 @@ static YYACTIONTYPE yy_reduce( case 21: /* alter_account_option ::= USERS literal */ yytestcase(yyruleno==21); case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); -#line 73 "sql.y" { } -#line 5228 "sql.c" yy_destructor(yypParser,357,&yymsp[0].minor); break; case 24: /* ip_range_list ::= NK_STRING */ -#line 86 "sql.y" { yylhsminor.yy552 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } -#line 5234 "sql.c" yymsp[0].minor.yy552 = yylhsminor.yy552; break; case 25: /* ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ -#line 87 "sql.y" { yylhsminor.yy552 = addNodeToList(pCxt, yymsp[-2].minor.yy552, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } -#line 5240 "sql.c" yymsp[-2].minor.yy552 = yylhsminor.yy552; break; case 26: /* white_list ::= HOST ip_range_list */ -#line 91 "sql.y" { yymsp[-1].minor.yy552 = yymsp[0].minor.yy552; } -#line 5246 "sql.c" break; case 27: /* white_list_opt ::= */ case 188: /* specific_cols_opt ::= */ yytestcase(yyruleno==188); @@ -5251,140 +4957,92 @@ static YYACTIONTYPE yy_reduce( case 308: /* tag_list_opt ::= */ yytestcase(yyruleno==308); case 374: /* col_list_opt ::= */ yytestcase(yyruleno==374); case 376: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==376); - case 599: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==599); - case 629: /* group_by_clause_opt ::= */ yytestcase(yyruleno==629); - case 649: /* order_by_clause_opt ::= */ yytestcase(yyruleno==649); -#line 95 "sql.y" + case 619: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==619); + case 649: /* group_by_clause_opt ::= */ yytestcase(yyruleno==649); + case 669: /* order_by_clause_opt ::= */ yytestcase(yyruleno==669); { yymsp[1].minor.yy552 = NULL; } -#line 5259 "sql.c" break; case 28: /* white_list_opt ::= white_list */ case 220: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==220); case 377: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==377); - case 524: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==524); -#line 96 "sql.y" + case 544: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==544); { yylhsminor.yy552 = yymsp[0].minor.yy552; } -#line 5267 "sql.c" yymsp[0].minor.yy552 = yylhsminor.yy552; break; case 29: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ -#line 100 "sql.y" { pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-4].minor.yy965, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy883); pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy552); } -#line 5276 "sql.c" break; case 30: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -#line 104 "sql.y" { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy965, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } -#line 5281 "sql.c" break; case 31: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ -#line 105 "sql.y" { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy965, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } -#line 5286 "sql.c" break; case 32: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ -#line 106 "sql.y" { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy965, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } -#line 5291 "sql.c" break; case 33: /* cmd ::= ALTER USER user_name ADD white_list */ -#line 107 "sql.y" { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy965, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy552); } -#line 5296 "sql.c" break; case 34: /* cmd ::= ALTER USER user_name DROP white_list */ -#line 108 "sql.y" { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy965, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy552); } -#line 5301 "sql.c" break; case 35: /* cmd ::= DROP USER user_name */ -#line 109 "sql.y" { pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy965); } -#line 5306 "sql.c" break; case 36: /* sysinfo_opt ::= */ -#line 113 "sql.y" { yymsp[1].minor.yy883 = 1; } -#line 5311 "sql.c" break; case 37: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ -#line 114 "sql.y" { yymsp[-1].minor.yy883 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } -#line 5316 "sql.c" break; case 38: /* cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ -#line 117 "sql.y" { pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy525, &yymsp[-3].minor.yy665, &yymsp[0].minor.yy965, yymsp[-2].minor.yy718); } -#line 5321 "sql.c" break; case 39: /* cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ -#line 118 "sql.y" { pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy525, &yymsp[-3].minor.yy665, &yymsp[0].minor.yy965, yymsp[-2].minor.yy718); } -#line 5326 "sql.c" break; case 40: /* privileges ::= ALL */ -#line 122 "sql.y" { yymsp[0].minor.yy525 = PRIVILEGE_TYPE_ALL; } -#line 5331 "sql.c" break; case 41: /* privileges ::= priv_type_list */ case 43: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==43); -#line 123 "sql.y" { yylhsminor.yy525 = yymsp[0].minor.yy525; } -#line 5337 "sql.c" yymsp[0].minor.yy525 = yylhsminor.yy525; break; case 42: /* privileges ::= SUBSCRIBE */ -#line 124 "sql.y" { yymsp[0].minor.yy525 = PRIVILEGE_TYPE_SUBSCRIBE; } -#line 5343 "sql.c" break; case 44: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -#line 129 "sql.y" { yylhsminor.yy525 = yymsp[-2].minor.yy525 | yymsp[0].minor.yy525; } -#line 5348 "sql.c" yymsp[-2].minor.yy525 = yylhsminor.yy525; break; case 45: /* priv_type ::= READ */ -#line 133 "sql.y" { yymsp[0].minor.yy525 = PRIVILEGE_TYPE_READ; } -#line 5354 "sql.c" break; case 46: /* priv_type ::= WRITE */ -#line 134 "sql.y" { yymsp[0].minor.yy525 = PRIVILEGE_TYPE_WRITE; } -#line 5359 "sql.c" break; case 47: /* priv_type ::= ALTER */ -#line 135 "sql.y" { yymsp[0].minor.yy525 = PRIVILEGE_TYPE_ALTER; } -#line 5364 "sql.c" break; case 48: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -#line 139 "sql.y" { yylhsminor.yy665.first = yymsp[-2].minor.yy0; yylhsminor.yy665.second = yymsp[0].minor.yy0; } -#line 5369 "sql.c" yymsp[-2].minor.yy665 = yylhsminor.yy665; break; case 49: /* priv_level ::= db_name NK_DOT NK_STAR */ -#line 140 "sql.y" { yylhsminor.yy665.first = yymsp[-2].minor.yy965; yylhsminor.yy665.second = yymsp[0].minor.yy0; } -#line 5375 "sql.c" yymsp[-2].minor.yy665 = yylhsminor.yy665; break; case 50: /* priv_level ::= db_name NK_DOT table_name */ -#line 141 "sql.y" { yylhsminor.yy665.first = yymsp[-2].minor.yy965; yylhsminor.yy665.second = yymsp[0].minor.yy965; } -#line 5381 "sql.c" yymsp[-2].minor.yy665 = yylhsminor.yy665; break; case 51: /* priv_level ::= topic_name */ -#line 142 "sql.y" { yylhsminor.yy665.first = yymsp[0].minor.yy965; yylhsminor.yy665.second = nil_token; } -#line 5387 "sql.c" yymsp[0].minor.yy665 = yylhsminor.yy665; break; case 52: /* with_opt ::= */ @@ -5392,83 +5050,57 @@ static YYACTIONTYPE yy_reduce( case 161: /* end_opt ::= */ yytestcase(yyruleno==161); case 303: /* like_pattern_opt ::= */ yytestcase(yyruleno==303); case 388: /* subtable_opt ::= */ yytestcase(yyruleno==388); - case 534: /* case_when_else_opt ::= */ yytestcase(yyruleno==534); - case 564: /* from_clause_opt ::= */ yytestcase(yyruleno==564); - case 597: /* where_clause_opt ::= */ yytestcase(yyruleno==597); - case 606: /* twindow_clause_opt ::= */ yytestcase(yyruleno==606); - case 614: /* sliding_opt ::= */ yytestcase(yyruleno==614); - case 619: /* fill_opt ::= */ yytestcase(yyruleno==619); - case 633: /* having_clause_opt ::= */ yytestcase(yyruleno==633); - case 635: /* range_opt ::= */ yytestcase(yyruleno==635); - case 638: /* every_opt ::= */ yytestcase(yyruleno==638); - case 651: /* slimit_clause_opt ::= */ yytestcase(yyruleno==651); - case 655: /* limit_clause_opt ::= */ yytestcase(yyruleno==655); -#line 144 "sql.y" + case 554: /* case_when_else_opt ::= */ yytestcase(yyruleno==554); + case 584: /* from_clause_opt ::= */ yytestcase(yyruleno==584); + case 617: /* where_clause_opt ::= */ yytestcase(yyruleno==617); + case 626: /* twindow_clause_opt ::= */ yytestcase(yyruleno==626); + case 634: /* sliding_opt ::= */ yytestcase(yyruleno==634); + case 639: /* fill_opt ::= */ yytestcase(yyruleno==639); + case 653: /* having_clause_opt ::= */ yytestcase(yyruleno==653); + case 655: /* range_opt ::= */ yytestcase(yyruleno==655); + case 658: /* every_opt ::= */ yytestcase(yyruleno==658); + case 671: /* slimit_clause_opt ::= */ yytestcase(yyruleno==671); + case 675: /* limit_clause_opt ::= */ yytestcase(yyruleno==675); { yymsp[1].minor.yy718 = NULL; } -#line 5408 "sql.c" break; case 53: /* with_opt ::= WITH search_condition */ - case 565: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==565); - case 598: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==598); - case 634: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==634); -#line 145 "sql.y" + case 585: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==585); + case 618: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==618); + case 654: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==654); { yymsp[-1].minor.yy718 = yymsp[0].minor.yy718; } -#line 5416 "sql.c" break; case 54: /* cmd ::= CREATE DNODE dnode_endpoint */ -#line 148 "sql.y" { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy965, NULL); } -#line 5421 "sql.c" break; case 55: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -#line 149 "sql.y" { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy965, &yymsp[0].minor.yy0); } -#line 5426 "sql.c" break; case 56: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ -#line 150 "sql.y" { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy559, false); } -#line 5431 "sql.c" break; case 57: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -#line 151 "sql.y" { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy965, yymsp[0].minor.yy559, false); } -#line 5436 "sql.c" break; case 58: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ -#line 152 "sql.y" { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy559); } -#line 5441 "sql.c" break; case 59: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ -#line 153 "sql.y" { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy965, false, yymsp[0].minor.yy559); } -#line 5446 "sql.c" break; case 60: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ -#line 154 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } -#line 5451 "sql.c" break; case 61: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ -#line 155 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 5456 "sql.c" break; case 62: /* cmd ::= ALTER ALL DNODES NK_STRING */ -#line 156 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); } -#line 5461 "sql.c" break; case 63: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ -#line 157 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 5466 "sql.c" break; case 64: /* cmd ::= RESTORE DNODE NK_INTEGER */ -#line 158 "sql.y" { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_DNODE_STMT, &yymsp[0].minor.yy0); } -#line 5471 "sql.c" break; case 65: /* dnode_endpoint ::= NK_STRING */ case 66: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==66); @@ -5477,35 +5109,33 @@ static YYACTIONTYPE yy_reduce( case 331: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==331); case 332: /* sma_func_name ::= LAST */ yytestcase(yyruleno==332); case 333: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==333); - case 455: /* db_name ::= NK_ID */ yytestcase(yyruleno==455); - case 456: /* table_name ::= NK_ID */ yytestcase(yyruleno==456); - case 457: /* column_name ::= NK_ID */ yytestcase(yyruleno==457); - case 458: /* function_name ::= NK_ID */ yytestcase(yyruleno==458); - case 459: /* view_name ::= NK_ID */ yytestcase(yyruleno==459); - case 460: /* table_alias ::= NK_ID */ yytestcase(yyruleno==460); - case 461: /* column_alias ::= NK_ID */ yytestcase(yyruleno==461); - case 462: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==462); - case 463: /* user_name ::= NK_ID */ yytestcase(yyruleno==463); - case 464: /* topic_name ::= NK_ID */ yytestcase(yyruleno==464); - case 465: /* stream_name ::= NK_ID */ yytestcase(yyruleno==465); - case 466: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==466); - case 467: /* index_name ::= NK_ID */ yytestcase(yyruleno==467); - case 510: /* noarg_func ::= NOW */ yytestcase(yyruleno==510); - case 511: /* noarg_func ::= TODAY */ yytestcase(yyruleno==511); - case 512: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==512); - case 513: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==513); - case 514: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==514); - case 515: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==515); - case 516: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==516); - case 517: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==517); - case 518: /* noarg_func ::= USER */ yytestcase(yyruleno==518); - case 519: /* star_func ::= COUNT */ yytestcase(yyruleno==519); - case 520: /* star_func ::= FIRST */ yytestcase(yyruleno==520); - case 521: /* star_func ::= LAST */ yytestcase(yyruleno==521); - case 522: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==522); -#line 162 "sql.y" + case 475: /* db_name ::= NK_ID */ yytestcase(yyruleno==475); + case 476: /* table_name ::= NK_ID */ yytestcase(yyruleno==476); + case 477: /* column_name ::= NK_ID */ yytestcase(yyruleno==477); + case 478: /* function_name ::= NK_ID */ yytestcase(yyruleno==478); + case 479: /* view_name ::= NK_ID */ yytestcase(yyruleno==479); + case 480: /* table_alias ::= NK_ID */ yytestcase(yyruleno==480); + case 481: /* column_alias ::= NK_ID */ yytestcase(yyruleno==481); + case 482: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==482); + case 483: /* user_name ::= NK_ID */ yytestcase(yyruleno==483); + case 484: /* topic_name ::= NK_ID */ yytestcase(yyruleno==484); + case 485: /* stream_name ::= NK_ID */ yytestcase(yyruleno==485); + case 486: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==486); + case 487: /* index_name ::= NK_ID */ yytestcase(yyruleno==487); + case 530: /* noarg_func ::= NOW */ yytestcase(yyruleno==530); + case 531: /* noarg_func ::= TODAY */ yytestcase(yyruleno==531); + case 532: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==532); + case 533: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==533); + case 534: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==534); + case 535: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==535); + case 536: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==536); + case 537: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==537); + case 538: /* noarg_func ::= USER */ yytestcase(yyruleno==538); + case 539: /* star_func ::= COUNT */ yytestcase(yyruleno==539); + case 540: /* star_func ::= FIRST */ yytestcase(yyruleno==540); + case 541: /* star_func ::= LAST */ yytestcase(yyruleno==541); + case 542: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==542); { yylhsminor.yy965 = yymsp[0].minor.yy0; } -#line 5508 "sql.c" yymsp[0].minor.yy965 = yylhsminor.yy965; break; case 68: /* force_opt ::= */ @@ -5515,452 +5145,298 @@ static YYACTIONTYPE yy_reduce( case 358: /* agg_func_opt ::= */ yytestcase(yyruleno==358); case 364: /* or_replace_opt ::= */ yytestcase(yyruleno==364); case 390: /* ignore_opt ::= */ yytestcase(yyruleno==390); - case 585: /* tag_mode_opt ::= */ yytestcase(yyruleno==585); - case 587: /* set_quantifier_opt ::= */ yytestcase(yyruleno==587); -#line 168 "sql.y" + case 605: /* tag_mode_opt ::= */ yytestcase(yyruleno==605); + case 607: /* set_quantifier_opt ::= */ yytestcase(yyruleno==607); { yymsp[1].minor.yy559 = false; } -#line 5522 "sql.c" break; case 69: /* force_opt ::= FORCE */ case 70: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==70); case 352: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==352); case 359: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==359); - case 586: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==586); - case 588: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==588); -#line 169 "sql.y" + case 606: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==606); + case 608: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==608); { yymsp[0].minor.yy559 = true; } -#line 5532 "sql.c" break; case 71: /* cmd ::= ALTER CLUSTER NK_STRING */ -#line 176 "sql.y" { pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[0].minor.yy0, NULL); } -#line 5537 "sql.c" break; case 72: /* cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ -#line 177 "sql.y" { pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 5542 "sql.c" break; case 73: /* cmd ::= ALTER LOCAL NK_STRING */ -#line 180 "sql.y" { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } -#line 5547 "sql.c" break; case 74: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */ -#line 181 "sql.y" { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 5552 "sql.c" break; case 75: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ -#line 184 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); } -#line 5557 "sql.c" break; case 76: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */ -#line 185 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); } -#line 5562 "sql.c" break; case 77: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ -#line 186 "sql.y" { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_QNODE_STMT, &yymsp[0].minor.yy0); } -#line 5567 "sql.c" break; case 78: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ -#line 189 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); } -#line 5572 "sql.c" break; case 79: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */ -#line 190 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); } -#line 5577 "sql.c" break; case 80: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ -#line 193 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); } -#line 5582 "sql.c" break; case 81: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */ -#line 194 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); } -#line 5587 "sql.c" break; case 82: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ -#line 197 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); } -#line 5592 "sql.c" break; case 83: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */ -#line 198 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } -#line 5597 "sql.c" break; case 84: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ -#line 199 "sql.y" { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_MNODE_STMT, &yymsp[0].minor.yy0); } -#line 5602 "sql.c" break; case 85: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ -#line 202 "sql.y" { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_VNODE_STMT, &yymsp[0].minor.yy0); } -#line 5607 "sql.c" break; case 86: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -#line 205 "sql.y" { pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy559, &yymsp[-1].minor.yy965, yymsp[0].minor.yy718); } -#line 5612 "sql.c" break; case 87: /* cmd ::= DROP DATABASE exists_opt db_name */ -#line 206 "sql.y" { pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy559, &yymsp[0].minor.yy965); } -#line 5617 "sql.c" break; case 88: /* cmd ::= USE db_name */ -#line 207 "sql.y" { pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy965); } -#line 5622 "sql.c" break; case 89: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -#line 208 "sql.y" { pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy965, yymsp[0].minor.yy718); } -#line 5627 "sql.c" break; case 90: /* cmd ::= FLUSH DATABASE db_name */ -#line 209 "sql.y" { pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy965); } -#line 5632 "sql.c" break; case 91: /* cmd ::= TRIM DATABASE db_name speed_opt */ -#line 210 "sql.y" { pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy965, yymsp[0].minor.yy134); } -#line 5637 "sql.c" break; case 92: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ -#line 211 "sql.y" { pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy965, yymsp[-1].minor.yy718, yymsp[0].minor.yy718); } -#line 5642 "sql.c" break; case 93: /* not_exists_opt ::= IF NOT EXISTS */ -#line 215 "sql.y" { yymsp[-2].minor.yy559 = true; } -#line 5647 "sql.c" break; case 95: /* exists_opt ::= IF EXISTS */ case 365: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==365); case 391: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==391); -#line 220 "sql.y" { yymsp[-1].minor.yy559 = true; } -#line 5654 "sql.c" break; case 97: /* db_options ::= */ -#line 223 "sql.y" { yymsp[1].minor.yy718 = createDefaultDatabaseOptions(pCxt); } -#line 5659 "sql.c" break; case 98: /* db_options ::= db_options BUFFER NK_INTEGER */ -#line 224 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } -#line 5664 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 99: /* db_options ::= db_options CACHEMODEL NK_STRING */ -#line 225 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } -#line 5670 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 100: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -#line 226 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } -#line 5676 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 101: /* db_options ::= db_options COMP NK_INTEGER */ -#line 227 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_COMP, &yymsp[0].minor.yy0); } -#line 5682 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 102: /* db_options ::= db_options DURATION NK_INTEGER */ case 103: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==103); -#line 228 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } -#line 5689 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 104: /* db_options ::= db_options MAXROWS NK_INTEGER */ -#line 230 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } -#line 5695 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 105: /* db_options ::= db_options MINROWS NK_INTEGER */ -#line 231 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } -#line 5701 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 106: /* db_options ::= db_options KEEP integer_list */ case 107: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==107); -#line 232 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_KEEP, yymsp[0].minor.yy552); } -#line 5708 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 108: /* db_options ::= db_options PAGES NK_INTEGER */ -#line 234 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } -#line 5714 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 109: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -#line 235 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } -#line 5720 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 110: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -#line 236 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } -#line 5726 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 111: /* db_options ::= db_options PRECISION NK_STRING */ -#line 237 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } -#line 5732 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 112: /* db_options ::= db_options REPLICA NK_INTEGER */ -#line 238 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } -#line 5738 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 113: /* db_options ::= db_options VGROUPS NK_INTEGER */ -#line 240 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } -#line 5744 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 114: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -#line 241 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } -#line 5750 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 115: /* db_options ::= db_options RETENTIONS retention_list */ -#line 242 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_RETENTIONS, yymsp[0].minor.yy552); } -#line 5756 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 116: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -#line 243 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } -#line 5762 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 117: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -#line 244 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_WAL, &yymsp[0].minor.yy0); } -#line 5768 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 118: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -#line 245 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } -#line 5774 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 119: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -#line 246 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } -#line 5780 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 120: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ -#line 247 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-3].minor.yy718, DB_OPTION_WAL_RETENTION_PERIOD, &t); } -#line 5790 "sql.c" yymsp[-3].minor.yy718 = yylhsminor.yy718; break; case 121: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -#line 252 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } -#line 5796 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 122: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ -#line 253 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-3].minor.yy718, DB_OPTION_WAL_RETENTION_SIZE, &t); } -#line 5806 "sql.c" yymsp[-3].minor.yy718 = yylhsminor.yy718; break; case 123: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -#line 258 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } -#line 5812 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 124: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -#line 259 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } -#line 5818 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 125: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -#line 260 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } -#line 5824 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 126: /* db_options ::= db_options TABLE_PREFIX signed */ -#line 261 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy718); } -#line 5830 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 127: /* db_options ::= db_options TABLE_SUFFIX signed */ -#line 262 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy718); } -#line 5836 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 128: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ -#line 263 "sql.y" { yylhsminor.yy718 = setDatabaseOption(pCxt, yymsp[-2].minor.yy718, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } -#line 5842 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 129: /* alter_db_options ::= alter_db_option */ -#line 265 "sql.y" { yylhsminor.yy718 = createAlterDatabaseOptions(pCxt); yylhsminor.yy718 = setAlterDatabaseOption(pCxt, yylhsminor.yy718, &yymsp[0].minor.yy959); } -#line 5848 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; case 130: /* alter_db_options ::= alter_db_options alter_db_option */ -#line 266 "sql.y" { yylhsminor.yy718 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy718, &yymsp[0].minor.yy959); } -#line 5854 "sql.c" yymsp[-1].minor.yy718 = yylhsminor.yy718; break; case 131: /* alter_db_option ::= BUFFER NK_INTEGER */ -#line 270 "sql.y" { yymsp[-1].minor.yy959.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy959.val = yymsp[0].minor.yy0; } -#line 5860 "sql.c" break; case 132: /* alter_db_option ::= CACHEMODEL NK_STRING */ -#line 271 "sql.y" { yymsp[-1].minor.yy959.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy959.val = yymsp[0].minor.yy0; } -#line 5865 "sql.c" break; case 133: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -#line 272 "sql.y" { yymsp[-1].minor.yy959.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy959.val = yymsp[0].minor.yy0; } -#line 5870 "sql.c" break; case 134: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -#line 273 "sql.y" { yymsp[-1].minor.yy959.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy959.val = yymsp[0].minor.yy0; } -#line 5875 "sql.c" break; case 135: /* alter_db_option ::= KEEP integer_list */ case 136: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==136); -#line 274 "sql.y" { yymsp[-1].minor.yy959.type = DB_OPTION_KEEP; yymsp[-1].minor.yy959.pList = yymsp[0].minor.yy552; } -#line 5881 "sql.c" break; case 137: /* alter_db_option ::= PAGES NK_INTEGER */ -#line 276 "sql.y" { yymsp[-1].minor.yy959.type = DB_OPTION_PAGES; yymsp[-1].minor.yy959.val = yymsp[0].minor.yy0; } -#line 5886 "sql.c" break; case 138: /* alter_db_option ::= REPLICA NK_INTEGER */ -#line 277 "sql.y" { yymsp[-1].minor.yy959.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy959.val = yymsp[0].minor.yy0; } -#line 5891 "sql.c" break; case 139: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -#line 279 "sql.y" { yymsp[-1].minor.yy959.type = DB_OPTION_WAL; yymsp[-1].minor.yy959.val = yymsp[0].minor.yy0; } -#line 5896 "sql.c" break; case 140: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -#line 280 "sql.y" { yymsp[-1].minor.yy959.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy959.val = yymsp[0].minor.yy0; } -#line 5901 "sql.c" break; case 141: /* alter_db_option ::= MINROWS NK_INTEGER */ -#line 281 "sql.y" { yymsp[-1].minor.yy959.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy959.val = yymsp[0].minor.yy0; } -#line 5906 "sql.c" break; case 142: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ -#line 282 "sql.y" { yymsp[-1].minor.yy959.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy959.val = yymsp[0].minor.yy0; } -#line 5911 "sql.c" break; case 143: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ -#line 283 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yymsp[-2].minor.yy959.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy959.val = t; } -#line 5920 "sql.c" break; case 144: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ -#line 288 "sql.y" { yymsp[-1].minor.yy959.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy959.val = yymsp[0].minor.yy0; } -#line 5925 "sql.c" break; case 145: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ -#line 289 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yymsp[-2].minor.yy959.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy959.val = t; } -#line 5934 "sql.c" break; case 146: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ -#line 294 "sql.y" { yymsp[-1].minor.yy959.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy959.val = yymsp[0].minor.yy0; } -#line 5939 "sql.c" break; case 147: /* integer_list ::= NK_INTEGER */ -#line 298 "sql.y" { yylhsminor.yy552 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 5944 "sql.c" yymsp[0].minor.yy552 = yylhsminor.yy552; break; case 148: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ case 404: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==404); -#line 299 "sql.y" { yylhsminor.yy552 = addNodeToList(pCxt, yymsp[-2].minor.yy552, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 5951 "sql.c" yymsp[-2].minor.yy552 = yylhsminor.yy552; break; case 149: /* variable_list ::= NK_VARIABLE */ -#line 303 "sql.y" { yylhsminor.yy552 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 5957 "sql.c" yymsp[0].minor.yy552 = yylhsminor.yy552; break; case 150: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -#line 304 "sql.y" { yylhsminor.yy552 = addNodeToList(pCxt, yymsp[-2].minor.yy552, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 5963 "sql.c" yymsp[-2].minor.yy552 = yylhsminor.yy552; break; case 151: /* retention_list ::= retention */ @@ -5971,16 +5447,14 @@ static YYACTIONTYPE yy_reduce( case 241: /* col_name_list ::= col_name */ yytestcase(yyruleno==241); case 309: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==309); case 326: /* func_list ::= func */ yytestcase(yyruleno==326); - case 428: /* tags_literal_list ::= tags_literal */ yytestcase(yyruleno==428); - case 453: /* literal_list ::= signed_literal */ yytestcase(yyruleno==453); - case 525: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==525); - case 531: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==531); - case 590: /* select_list ::= select_item */ yytestcase(yyruleno==590); - case 601: /* partition_list ::= partition_item */ yytestcase(yyruleno==601); - case 662: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==662); -#line 308 "sql.y" + case 448: /* tags_literal_list ::= tags_literal */ yytestcase(yyruleno==448); + case 473: /* literal_list ::= signed_literal */ yytestcase(yyruleno==473); + case 545: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==545); + case 551: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==551); + case 610: /* select_list ::= select_item */ yytestcase(yyruleno==610); + case 621: /* partition_list ::= partition_item */ yytestcase(yyruleno==621); + case 682: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==682); { yylhsminor.yy552 = createNodeList(pCxt, yymsp[0].minor.yy718); } -#line 5983 "sql.c" yymsp[0].minor.yy552 = yylhsminor.yy552; break; case 152: /* retention_list ::= retention_list NK_COMMA retention */ @@ -5990,1745 +5464,1208 @@ static YYACTIONTYPE yy_reduce( case 242: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==242); case 310: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==310); case 327: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==327); - case 429: /* tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ yytestcase(yyruleno==429); - case 454: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==454); - case 526: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==526); - case 591: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==591); - case 602: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==602); - case 663: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==663); -#line 309 "sql.y" + case 449: /* tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ yytestcase(yyruleno==449); + case 474: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==474); + case 546: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==546); + case 611: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==611); + case 622: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==622); + case 683: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==683); { yylhsminor.yy552 = addNodeToList(pCxt, yymsp[-2].minor.yy552, yymsp[0].minor.yy718); } -#line 6001 "sql.c" yymsp[-2].minor.yy552 = yylhsminor.yy552; break; case 153: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ case 154: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==154); -#line 311 "sql.y" { yylhsminor.yy718 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 6008 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 155: /* speed_opt ::= */ case 360: /* bufsize_opt ::= */ yytestcase(yyruleno==360); -#line 316 "sql.y" { yymsp[1].minor.yy134 = 0; } -#line 6015 "sql.c" break; case 156: /* speed_opt ::= BWLIMIT NK_INTEGER */ case 361: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==361); -#line 317 "sql.y" { yymsp[-1].minor.yy134 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } -#line 6021 "sql.c" break; case 158: /* start_opt ::= START WITH NK_INTEGER */ case 162: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==162); -#line 320 "sql.y" { yymsp[-2].minor.yy718 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } -#line 6027 "sql.c" break; case 159: /* start_opt ::= START WITH NK_STRING */ case 163: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==163); -#line 321 "sql.y" { yymsp[-2].minor.yy718 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } -#line 6033 "sql.c" break; case 160: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ case 164: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==164); -#line 322 "sql.y" { yymsp[-3].minor.yy718 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } -#line 6039 "sql.c" break; case 165: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 167: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==167); -#line 331 "sql.y" { pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy559, yymsp[-5].minor.yy718, yymsp[-3].minor.yy552, yymsp[-1].minor.yy552, yymsp[0].minor.yy718); } -#line 6045 "sql.c" break; case 166: /* cmd ::= CREATE TABLE multi_create_clause */ -#line 332 "sql.y" { pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy552); } -#line 6050 "sql.c" break; case 168: /* cmd ::= DROP TABLE multi_drop_clause */ -#line 335 "sql.y" { pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy552); } -#line 6055 "sql.c" break; case 169: /* cmd ::= DROP STABLE exists_opt full_table_name */ -#line 336 "sql.y" { pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy559, yymsp[0].minor.yy718); } -#line 6060 "sql.c" break; case 170: /* cmd ::= ALTER TABLE alter_table_clause */ case 406: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==406); case 407: /* cmd ::= insert_query */ yytestcase(yyruleno==407); -#line 338 "sql.y" { pCxt->pRootNode = yymsp[0].minor.yy718; } -#line 6067 "sql.c" break; case 171: /* cmd ::= ALTER STABLE alter_table_clause */ -#line 339 "sql.y" { pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy718); } -#line 6072 "sql.c" break; case 172: /* alter_table_clause ::= full_table_name alter_table_options */ -#line 341 "sql.y" { yylhsminor.yy718 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy718, yymsp[0].minor.yy718); } -#line 6077 "sql.c" yymsp[-1].minor.yy718 = yylhsminor.yy718; break; case 173: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -#line 343 "sql.y" { yylhsminor.yy718 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy718, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy965, yymsp[0].minor.yy224); } -#line 6083 "sql.c" yymsp[-4].minor.yy718 = yylhsminor.yy718; break; case 174: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -#line 344 "sql.y" { yylhsminor.yy718 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy718, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy965); } -#line 6089 "sql.c" yymsp[-3].minor.yy718 = yylhsminor.yy718; break; case 175: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -#line 346 "sql.y" { yylhsminor.yy718 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy718, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy965, yymsp[0].minor.yy224); } -#line 6095 "sql.c" yymsp[-4].minor.yy718 = yylhsminor.yy718; break; case 176: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -#line 348 "sql.y" { yylhsminor.yy718 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy718, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy965, &yymsp[0].minor.yy965); } -#line 6101 "sql.c" yymsp[-4].minor.yy718 = yylhsminor.yy718; break; case 177: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -#line 350 "sql.y" { yylhsminor.yy718 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy718, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy965, yymsp[0].minor.yy224); } -#line 6107 "sql.c" yymsp[-4].minor.yy718 = yylhsminor.yy718; break; case 178: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -#line 351 "sql.y" { yylhsminor.yy718 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy718, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy965); } -#line 6113 "sql.c" yymsp[-3].minor.yy718 = yylhsminor.yy718; break; case 179: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -#line 353 "sql.y" { yylhsminor.yy718 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy718, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy965, yymsp[0].minor.yy224); } -#line 6119 "sql.c" yymsp[-4].minor.yy718 = yylhsminor.yy718; break; case 180: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -#line 355 "sql.y" { yylhsminor.yy718 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy718, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy965, &yymsp[0].minor.yy965); } -#line 6125 "sql.c" yymsp[-4].minor.yy718 = yylhsminor.yy718; break; case 181: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ -#line 357 "sql.y" { yylhsminor.yy718 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy718, &yymsp[-2].minor.yy965, yymsp[0].minor.yy718); } -#line 6131 "sql.c" yymsp[-5].minor.yy718 = yylhsminor.yy718; break; case 183: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 532: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==532); -#line 362 "sql.y" + case 552: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==552); { yylhsminor.yy552 = addNodeToList(pCxt, yymsp[-1].minor.yy552, yymsp[0].minor.yy718); } -#line 6138 "sql.c" yymsp[-1].minor.yy552 = yylhsminor.yy552; break; case 184: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ -#line 366 "sql.y" { yylhsminor.yy718 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy559, yymsp[-8].minor.yy718, yymsp[-6].minor.yy718, yymsp[-5].minor.yy552, yymsp[-2].minor.yy552, yymsp[0].minor.yy718); } -#line 6144 "sql.c" yymsp[-9].minor.yy718 = yylhsminor.yy718; break; case 187: /* drop_table_clause ::= exists_opt full_table_name */ -#line 373 "sql.y" { yylhsminor.yy718 = createDropTableClause(pCxt, yymsp[-1].minor.yy559, yymsp[0].minor.yy718); } -#line 6150 "sql.c" yymsp[-1].minor.yy718 = yylhsminor.yy718; break; case 189: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ case 375: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==375); -#line 378 "sql.y" { yymsp[-2].minor.yy552 = yymsp[-1].minor.yy552; } -#line 6157 "sql.c" break; case 190: /* full_table_name ::= table_name */ -#line 380 "sql.y" { yylhsminor.yy718 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy965, NULL); } -#line 6162 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; case 191: /* full_table_name ::= db_name NK_DOT table_name */ -#line 381 "sql.y" { yylhsminor.yy718 = createRealTableNode(pCxt, &yymsp[-2].minor.yy965, &yymsp[0].minor.yy965, NULL); } -#line 6168 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 194: /* column_def ::= column_name type_name */ -#line 388 "sql.y" { yylhsminor.yy718 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy965, yymsp[0].minor.yy224, NULL); } -#line 6174 "sql.c" yymsp[-1].minor.yy718 = yylhsminor.yy718; break; case 195: /* type_name ::= BOOL */ -#line 393 "sql.y" { yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_BOOL); } -#line 6180 "sql.c" break; case 196: /* type_name ::= TINYINT */ -#line 394 "sql.y" { yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_TINYINT); } -#line 6185 "sql.c" break; case 197: /* type_name ::= SMALLINT */ -#line 395 "sql.y" { yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_SMALLINT); } -#line 6190 "sql.c" break; case 198: /* type_name ::= INT */ case 199: /* type_name ::= INTEGER */ yytestcase(yyruleno==199); -#line 396 "sql.y" { yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_INT); } -#line 6196 "sql.c" break; case 200: /* type_name ::= BIGINT */ -#line 398 "sql.y" { yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_BIGINT); } -#line 6201 "sql.c" break; case 201: /* type_name ::= FLOAT */ -#line 399 "sql.y" { yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_FLOAT); } -#line 6206 "sql.c" break; case 202: /* type_name ::= DOUBLE */ -#line 400 "sql.y" { yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_DOUBLE); } -#line 6211 "sql.c" break; case 203: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -#line 401 "sql.y" { yymsp[-3].minor.yy224 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } -#line 6216 "sql.c" break; case 204: /* type_name ::= TIMESTAMP */ -#line 402 "sql.y" { yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } -#line 6221 "sql.c" break; case 205: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -#line 403 "sql.y" { yymsp[-3].minor.yy224 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } -#line 6226 "sql.c" break; case 206: /* type_name ::= TINYINT UNSIGNED */ -#line 404 "sql.y" { yymsp[-1].minor.yy224 = createDataType(TSDB_DATA_TYPE_UTINYINT); } -#line 6231 "sql.c" break; case 207: /* type_name ::= SMALLINT UNSIGNED */ -#line 405 "sql.y" { yymsp[-1].minor.yy224 = createDataType(TSDB_DATA_TYPE_USMALLINT); } -#line 6236 "sql.c" break; case 208: /* type_name ::= INT UNSIGNED */ -#line 406 "sql.y" { yymsp[-1].minor.yy224 = createDataType(TSDB_DATA_TYPE_UINT); } -#line 6241 "sql.c" break; case 209: /* type_name ::= BIGINT UNSIGNED */ -#line 407 "sql.y" { yymsp[-1].minor.yy224 = createDataType(TSDB_DATA_TYPE_UBIGINT); } -#line 6246 "sql.c" break; case 210: /* type_name ::= JSON */ -#line 408 "sql.y" { yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_JSON); } -#line 6251 "sql.c" break; case 211: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -#line 409 "sql.y" { yymsp[-3].minor.yy224 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } -#line 6256 "sql.c" break; case 212: /* type_name ::= MEDIUMBLOB */ -#line 410 "sql.y" { yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } -#line 6261 "sql.c" break; case 213: /* type_name ::= BLOB */ -#line 411 "sql.y" { yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_BLOB); } -#line 6266 "sql.c" break; case 214: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -#line 412 "sql.y" { yymsp[-3].minor.yy224 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } -#line 6271 "sql.c" break; case 215: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ -#line 413 "sql.y" { yymsp[-3].minor.yy224 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } -#line 6276 "sql.c" break; case 216: /* type_name ::= DECIMAL */ -#line 414 "sql.y" { yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_DECIMAL); } -#line 6281 "sql.c" break; case 217: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -#line 415 "sql.y" { yymsp[-3].minor.yy224 = createDataType(TSDB_DATA_TYPE_DECIMAL); } -#line 6286 "sql.c" break; case 218: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -#line 416 "sql.y" { yymsp[-5].minor.yy224 = createDataType(TSDB_DATA_TYPE_DECIMAL); } -#line 6291 "sql.c" break; case 221: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ case 378: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==378); -#line 425 "sql.y" { yymsp[-3].minor.yy552 = yymsp[-1].minor.yy552; } -#line 6297 "sql.c" break; case 222: /* table_options ::= */ -#line 427 "sql.y" { yymsp[1].minor.yy718 = createDefaultTableOptions(pCxt); } -#line 6302 "sql.c" break; case 223: /* table_options ::= table_options COMMENT NK_STRING */ -#line 428 "sql.y" { yylhsminor.yy718 = setTableOption(pCxt, yymsp[-2].minor.yy718, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } -#line 6307 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 224: /* table_options ::= table_options MAX_DELAY duration_list */ -#line 429 "sql.y" { yylhsminor.yy718 = setTableOption(pCxt, yymsp[-2].minor.yy718, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy552); } -#line 6313 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 225: /* table_options ::= table_options WATERMARK duration_list */ -#line 430 "sql.y" { yylhsminor.yy718 = setTableOption(pCxt, yymsp[-2].minor.yy718, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy552); } -#line 6319 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 226: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -#line 431 "sql.y" { yylhsminor.yy718 = setTableOption(pCxt, yymsp[-4].minor.yy718, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy552); } -#line 6325 "sql.c" yymsp[-4].minor.yy718 = yylhsminor.yy718; break; case 227: /* table_options ::= table_options TTL NK_INTEGER */ -#line 432 "sql.y" { yylhsminor.yy718 = setTableOption(pCxt, yymsp[-2].minor.yy718, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } -#line 6331 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 228: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -#line 433 "sql.y" { yylhsminor.yy718 = setTableOption(pCxt, yymsp[-4].minor.yy718, TABLE_OPTION_SMA, yymsp[-1].minor.yy552); } -#line 6337 "sql.c" yymsp[-4].minor.yy718 = yylhsminor.yy718; break; case 229: /* table_options ::= table_options DELETE_MARK duration_list */ -#line 434 "sql.y" { yylhsminor.yy718 = setTableOption(pCxt, yymsp[-2].minor.yy718, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy552); } -#line 6343 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 230: /* alter_table_options ::= alter_table_option */ -#line 436 "sql.y" { yylhsminor.yy718 = createAlterTableOptions(pCxt); yylhsminor.yy718 = setTableOption(pCxt, yylhsminor.yy718, yymsp[0].minor.yy959.type, &yymsp[0].minor.yy959.val); } -#line 6349 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; case 231: /* alter_table_options ::= alter_table_options alter_table_option */ -#line 437 "sql.y" { yylhsminor.yy718 = setTableOption(pCxt, yymsp[-1].minor.yy718, yymsp[0].minor.yy959.type, &yymsp[0].minor.yy959.val); } -#line 6355 "sql.c" yymsp[-1].minor.yy718 = yylhsminor.yy718; break; case 232: /* alter_table_option ::= COMMENT NK_STRING */ -#line 441 "sql.y" { yymsp[-1].minor.yy959.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy959.val = yymsp[0].minor.yy0; } -#line 6361 "sql.c" break; case 233: /* alter_table_option ::= TTL NK_INTEGER */ -#line 442 "sql.y" { yymsp[-1].minor.yy959.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy959.val = yymsp[0].minor.yy0; } -#line 6366 "sql.c" break; case 234: /* duration_list ::= duration_literal */ - case 485: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==485); -#line 446 "sql.y" + case 505: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==505); { yylhsminor.yy552 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy718)); } -#line 6372 "sql.c" yymsp[0].minor.yy552 = yylhsminor.yy552; break; case 235: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 486: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==486); -#line 447 "sql.y" + case 506: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==506); { yylhsminor.yy552 = addNodeToList(pCxt, yymsp[-2].minor.yy552, releaseRawExprNode(pCxt, yymsp[0].minor.yy718)); } -#line 6379 "sql.c" yymsp[-2].minor.yy552 = yylhsminor.yy552; break; case 238: /* rollup_func_name ::= function_name */ -#line 454 "sql.y" { yylhsminor.yy718 = createFunctionNode(pCxt, &yymsp[0].minor.yy965, NULL); } -#line 6385 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; case 239: /* rollup_func_name ::= FIRST */ case 240: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==240); case 312: /* tag_item ::= QTAGS */ yytestcase(yyruleno==312); -#line 455 "sql.y" { yylhsminor.yy718 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } -#line 6393 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; case 243: /* col_name ::= column_name */ case 313: /* tag_item ::= column_name */ yytestcase(yyruleno==313); -#line 463 "sql.y" { yylhsminor.yy718 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy965); } -#line 6400 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; case 244: /* cmd ::= SHOW DNODES */ -#line 466 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } -#line 6406 "sql.c" break; case 245: /* cmd ::= SHOW USERS */ -#line 467 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } -#line 6411 "sql.c" break; case 246: /* cmd ::= SHOW USER PRIVILEGES */ -#line 468 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); } -#line 6416 "sql.c" break; case 247: /* cmd ::= SHOW db_kind_opt DATABASES */ -#line 469 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy101); } -#line 6424 "sql.c" break; case 248: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ -#line 473 "sql.y" { pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy91, yymsp[0].minor.yy718, OP_TYPE_LIKE); } -#line 6431 "sql.c" break; case 249: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -#line 476 "sql.y" { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy718, yymsp[0].minor.yy718, OP_TYPE_LIKE); } -#line 6436 "sql.c" break; case 250: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -#line 477 "sql.y" { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy718, NULL, OP_TYPE_LIKE); } -#line 6441 "sql.c" break; case 251: /* cmd ::= SHOW MNODES */ -#line 478 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } -#line 6446 "sql.c" break; case 252: /* cmd ::= SHOW QNODES */ -#line 480 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } -#line 6451 "sql.c" break; case 253: /* cmd ::= SHOW ARBGROUPS */ -#line 481 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ARBGROUPS_STMT); } -#line 6456 "sql.c" break; case 254: /* cmd ::= SHOW FUNCTIONS */ -#line 482 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } -#line 6461 "sql.c" break; case 255: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -#line 483 "sql.y" { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy718, yymsp[-1].minor.yy718, OP_TYPE_EQUAL); } -#line 6466 "sql.c" break; case 256: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ -#line 484 "sql.y" { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy965), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy965), OP_TYPE_EQUAL); } -#line 6471 "sql.c" break; case 257: /* cmd ::= SHOW STREAMS */ -#line 485 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } -#line 6476 "sql.c" break; case 258: /* cmd ::= SHOW ACCOUNTS */ -#line 486 "sql.y" { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } -#line 6481 "sql.c" break; case 259: /* cmd ::= SHOW APPS */ -#line 487 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } -#line 6486 "sql.c" break; case 260: /* cmd ::= SHOW CONNECTIONS */ -#line 488 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } -#line 6491 "sql.c" break; case 261: /* cmd ::= SHOW LICENCES */ case 262: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==262); -#line 489 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } -#line 6497 "sql.c" break; case 263: /* cmd ::= SHOW GRANTS FULL */ -#line 491 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); } -#line 6502 "sql.c" break; case 264: /* cmd ::= SHOW GRANTS LOGS */ -#line 492 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOGS_STMT); } -#line 6507 "sql.c" break; case 265: /* cmd ::= SHOW CLUSTER MACHINES */ -#line 493 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT); } -#line 6512 "sql.c" break; case 266: /* cmd ::= SHOW CREATE DATABASE db_name */ -#line 494 "sql.y" { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy965); } -#line 6517 "sql.c" break; case 267: /* cmd ::= SHOW CREATE TABLE full_table_name */ -#line 495 "sql.y" { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy718); } -#line 6522 "sql.c" break; case 268: /* cmd ::= SHOW CREATE STABLE full_table_name */ -#line 496 "sql.y" { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy718); } -#line 6527 "sql.c" break; case 269: /* cmd ::= SHOW QUERIES */ -#line 497 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } -#line 6532 "sql.c" break; case 270: /* cmd ::= SHOW SCORES */ -#line 498 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } -#line 6537 "sql.c" break; case 271: /* cmd ::= SHOW TOPICS */ -#line 499 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } -#line 6542 "sql.c" break; case 272: /* cmd ::= SHOW VARIABLES */ case 273: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==273); -#line 500 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } -#line 6548 "sql.c" break; case 274: /* cmd ::= SHOW LOCAL VARIABLES */ -#line 502 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } -#line 6553 "sql.c" break; case 275: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ -#line 503 "sql.y" { pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy718); } -#line 6558 "sql.c" break; case 276: /* cmd ::= SHOW BNODES */ -#line 504 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } -#line 6563 "sql.c" break; case 277: /* cmd ::= SHOW SNODES */ -#line 505 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } -#line 6568 "sql.c" break; case 278: /* cmd ::= SHOW CLUSTER */ -#line 506 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } -#line 6573 "sql.c" break; case 279: /* cmd ::= SHOW TRANSACTIONS */ -#line 507 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } -#line 6578 "sql.c" break; case 280: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -#line 508 "sql.y" { pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy718); } -#line 6583 "sql.c" break; case 281: /* cmd ::= SHOW CONSUMERS */ -#line 509 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } -#line 6588 "sql.c" break; case 282: /* cmd ::= SHOW SUBSCRIPTIONS */ -#line 510 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } -#line 6593 "sql.c" break; case 283: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -#line 511 "sql.y" { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy718, yymsp[-1].minor.yy718, OP_TYPE_EQUAL); } -#line 6598 "sql.c" break; case 284: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ -#line 512 "sql.y" { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy965), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy965), OP_TYPE_EQUAL); } -#line 6603 "sql.c" break; case 285: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ -#line 513 "sql.y" { pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy718, yymsp[0].minor.yy718, yymsp[-3].minor.yy552); } -#line 6608 "sql.c" break; case 286: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ -#line 514 "sql.y" { pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy965), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy965), yymsp[-4].minor.yy552); } -#line 6613 "sql.c" break; case 287: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ -#line 515 "sql.y" { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } -#line 6618 "sql.c" break; case 288: /* cmd ::= SHOW VNODES */ -#line 516 "sql.y" { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, NULL); } -#line 6623 "sql.c" break; case 289: /* cmd ::= SHOW db_name_cond_opt ALIVE */ -#line 518 "sql.y" { pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy718, QUERY_NODE_SHOW_DB_ALIVE_STMT); } -#line 6628 "sql.c" break; case 290: /* cmd ::= SHOW CLUSTER ALIVE */ -#line 519 "sql.y" { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } -#line 6633 "sql.c" break; case 291: /* cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ -#line 520 "sql.y" { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-2].minor.yy718, yymsp[0].minor.yy718, OP_TYPE_LIKE); } -#line 6638 "sql.c" break; case 292: /* cmd ::= SHOW CREATE VIEW full_table_name */ -#line 521 "sql.y" { pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy718); } -#line 6643 "sql.c" break; case 293: /* cmd ::= SHOW COMPACTS */ -#line 522 "sql.y" { pCxt->pRootNode = createShowCompactsStmt(pCxt, QUERY_NODE_SHOW_COMPACTS_STMT); } -#line 6648 "sql.c" break; case 294: /* cmd ::= SHOW COMPACT NK_INTEGER */ -#line 523 "sql.y" { pCxt->pRootNode = createShowCompactDetailsStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 6653 "sql.c" break; case 295: /* table_kind_db_name_cond_opt ::= */ -#line 527 "sql.y" { yymsp[1].minor.yy91.kind = SHOW_KIND_ALL; yymsp[1].minor.yy91.dbName = nil_token; } -#line 6658 "sql.c" break; case 296: /* table_kind_db_name_cond_opt ::= table_kind */ -#line 528 "sql.y" { yylhsminor.yy91.kind = yymsp[0].minor.yy101; yylhsminor.yy91.dbName = nil_token; } -#line 6663 "sql.c" yymsp[0].minor.yy91 = yylhsminor.yy91; break; case 297: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ -#line 529 "sql.y" { yylhsminor.yy91.kind = SHOW_KIND_ALL; yylhsminor.yy91.dbName = yymsp[-1].minor.yy965; } -#line 6669 "sql.c" yymsp[-1].minor.yy91 = yylhsminor.yy91; break; case 298: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ -#line 530 "sql.y" { yylhsminor.yy91.kind = yymsp[-2].minor.yy101; yylhsminor.yy91.dbName = yymsp[-1].minor.yy965; } -#line 6675 "sql.c" yymsp[-2].minor.yy91 = yylhsminor.yy91; break; case 299: /* table_kind ::= NORMAL */ -#line 534 "sql.y" { yymsp[0].minor.yy101 = SHOW_KIND_TABLES_NORMAL; } -#line 6681 "sql.c" break; case 300: /* table_kind ::= CHILD */ -#line 535 "sql.y" { yymsp[0].minor.yy101 = SHOW_KIND_TABLES_CHILD; } -#line 6686 "sql.c" break; case 301: /* db_name_cond_opt ::= */ case 306: /* from_db_opt ::= */ yytestcase(yyruleno==306); -#line 537 "sql.y" { yymsp[1].minor.yy718 = createDefaultDatabaseCondValue(pCxt); } -#line 6692 "sql.c" break; case 302: /* db_name_cond_opt ::= db_name NK_DOT */ -#line 538 "sql.y" { yylhsminor.yy718 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy965); } -#line 6697 "sql.c" yymsp[-1].minor.yy718 = yylhsminor.yy718; break; case 304: /* like_pattern_opt ::= LIKE NK_STRING */ -#line 541 "sql.y" { yymsp[-1].minor.yy718 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } -#line 6703 "sql.c" break; case 305: /* table_name_cond ::= table_name */ -#line 543 "sql.y" { yylhsminor.yy718 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy965); } -#line 6708 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; case 307: /* from_db_opt ::= FROM db_name */ -#line 546 "sql.y" { yymsp[-1].minor.yy718 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy965); } -#line 6714 "sql.c" break; case 311: /* tag_item ::= TBNAME */ -#line 554 "sql.y" { yylhsminor.yy718 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } -#line 6719 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; case 314: /* tag_item ::= column_name column_alias */ -#line 557 "sql.y" { yylhsminor.yy718 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy965), &yymsp[0].minor.yy965); } -#line 6725 "sql.c" yymsp[-1].minor.yy718 = yylhsminor.yy718; break; case 315: /* tag_item ::= column_name AS column_alias */ -#line 558 "sql.y" { yylhsminor.yy718 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy965), &yymsp[0].minor.yy965); } -#line 6731 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 316: /* db_kind_opt ::= */ -#line 562 "sql.y" { yymsp[1].minor.yy101 = SHOW_KIND_ALL; } -#line 6737 "sql.c" break; case 317: /* db_kind_opt ::= USER */ -#line 563 "sql.y" { yymsp[0].minor.yy101 = SHOW_KIND_DATABASES_USER; } -#line 6742 "sql.c" break; case 318: /* db_kind_opt ::= SYSTEM */ -#line 564 "sql.y" { yymsp[0].minor.yy101 = SHOW_KIND_DATABASES_SYSTEM; } -#line 6747 "sql.c" break; case 319: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ -#line 568 "sql.y" { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy559, yymsp[-3].minor.yy718, yymsp[-1].minor.yy718, NULL, yymsp[0].minor.yy718); } -#line 6752 "sql.c" break; case 320: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ -#line 570 "sql.y" { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy559, yymsp[-5].minor.yy718, yymsp[-3].minor.yy718, yymsp[-1].minor.yy552, NULL); } -#line 6757 "sql.c" break; case 321: /* cmd ::= DROP INDEX exists_opt full_index_name */ -#line 571 "sql.y" { pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy559, yymsp[0].minor.yy718); } -#line 6762 "sql.c" break; case 322: /* full_index_name ::= index_name */ -#line 573 "sql.y" { yylhsminor.yy718 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy965); } -#line 6767 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; case 323: /* full_index_name ::= db_name NK_DOT index_name */ -#line 574 "sql.y" { yylhsminor.yy718 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy965, &yymsp[0].minor.yy965); } -#line 6773 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 324: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -#line 577 "sql.y" { yymsp[-9].minor.yy718 = createIndexOption(pCxt, yymsp[-7].minor.yy552, releaseRawExprNode(pCxt, yymsp[-3].minor.yy718), NULL, yymsp[-1].minor.yy718, yymsp[0].minor.yy718); } -#line 6779 "sql.c" break; case 325: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ -#line 580 "sql.y" { yymsp[-11].minor.yy718 = createIndexOption(pCxt, yymsp[-9].minor.yy552, releaseRawExprNode(pCxt, yymsp[-5].minor.yy718), releaseRawExprNode(pCxt, yymsp[-3].minor.yy718), yymsp[-1].minor.yy718, yymsp[0].minor.yy718); } -#line 6784 "sql.c" break; case 328: /* func ::= sma_func_name NK_LP expression_list NK_RP */ -#line 587 "sql.y" { yylhsminor.yy718 = createFunctionNode(pCxt, &yymsp[-3].minor.yy965, yymsp[-1].minor.yy552); } -#line 6789 "sql.c" yymsp[-3].minor.yy718 = yylhsminor.yy718; break; case 329: /* sma_func_name ::= function_name */ - case 575: /* alias_opt ::= table_alias */ yytestcase(yyruleno==575); -#line 591 "sql.y" + case 595: /* alias_opt ::= table_alias */ yytestcase(yyruleno==595); { yylhsminor.yy965 = yymsp[0].minor.yy965; } -#line 6796 "sql.c" yymsp[0].minor.yy965 = yylhsminor.yy965; break; case 334: /* sma_stream_opt ::= */ case 379: /* stream_options ::= */ yytestcase(yyruleno==379); -#line 597 "sql.y" { yymsp[1].minor.yy718 = createStreamOptions(pCxt); } -#line 6803 "sql.c" break; case 335: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ -#line 598 "sql.y" { ((SStreamOptions*)yymsp[-2].minor.yy718)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy718); yylhsminor.yy718 = yymsp[-2].minor.yy718; } -#line 6808 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 336: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -#line 599 "sql.y" { ((SStreamOptions*)yymsp[-2].minor.yy718)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy718); yylhsminor.yy718 = yymsp[-2].minor.yy718; } -#line 6814 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 337: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -#line 600 "sql.y" { ((SStreamOptions*)yymsp[-2].minor.yy718)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy718); yylhsminor.yy718 = yymsp[-2].minor.yy718; } -#line 6820 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 338: /* with_meta ::= AS */ -#line 605 "sql.y" { yymsp[0].minor.yy134 = 0; } -#line 6826 "sql.c" break; case 339: /* with_meta ::= WITH META AS */ -#line 606 "sql.y" { yymsp[-2].minor.yy134 = 1; } -#line 6831 "sql.c" break; case 340: /* with_meta ::= ONLY META AS */ -#line 607 "sql.y" { yymsp[-2].minor.yy134 = 2; } -#line 6836 "sql.c" break; case 341: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -#line 609 "sql.y" { pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy559, &yymsp[-2].minor.yy965, yymsp[0].minor.yy718); } -#line 6841 "sql.c" break; case 342: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ -#line 611 "sql.y" { pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy559, &yymsp[-3].minor.yy965, &yymsp[0].minor.yy965, yymsp[-2].minor.yy134); } -#line 6846 "sql.c" break; case 343: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ -#line 613 "sql.y" { pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy559, &yymsp[-4].minor.yy965, yymsp[-1].minor.yy718, yymsp[-3].minor.yy134, yymsp[0].minor.yy718); } -#line 6851 "sql.c" break; case 344: /* cmd ::= DROP TOPIC exists_opt topic_name */ -#line 615 "sql.y" { pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy559, &yymsp[0].minor.yy965); } -#line 6856 "sql.c" break; case 345: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -#line 616 "sql.y" { pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy559, &yymsp[-2].minor.yy965, &yymsp[0].minor.yy965); } -#line 6861 "sql.c" break; case 346: /* cmd ::= DESC full_table_name */ case 347: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==347); -#line 619 "sql.y" { pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy718); } -#line 6867 "sql.c" break; case 348: /* cmd ::= RESET QUERY CACHE */ -#line 623 "sql.y" { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } -#line 6872 "sql.c" break; case 349: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ case 350: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==350); -#line 626 "sql.y" { pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy559, yymsp[-1].minor.yy718, yymsp[0].minor.yy718); } -#line 6878 "sql.c" break; case 353: /* explain_options ::= */ -#line 634 "sql.y" { yymsp[1].minor.yy718 = createDefaultExplainOptions(pCxt); } -#line 6883 "sql.c" break; case 354: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -#line 635 "sql.y" { yylhsminor.yy718 = setExplainVerbose(pCxt, yymsp[-2].minor.yy718, &yymsp[0].minor.yy0); } -#line 6888 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 355: /* explain_options ::= explain_options RATIO NK_FLOAT */ -#line 636 "sql.y" { yylhsminor.yy718 = setExplainRatio(pCxt, yymsp[-2].minor.yy718, &yymsp[0].minor.yy0); } -#line 6894 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 356: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ -#line 641 "sql.y" { pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy559, yymsp[-9].minor.yy559, &yymsp[-6].minor.yy965, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy224, yymsp[-1].minor.yy134, &yymsp[0].minor.yy965, yymsp[-10].minor.yy559); } -#line 6900 "sql.c" break; case 357: /* cmd ::= DROP FUNCTION exists_opt function_name */ -#line 642 "sql.y" { pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy559, &yymsp[0].minor.yy965); } -#line 6905 "sql.c" break; case 362: /* language_opt ::= */ case 401: /* on_vgroup_id ::= */ yytestcase(yyruleno==401); -#line 656 "sql.y" { yymsp[1].minor.yy965 = nil_token; } -#line 6911 "sql.c" break; case 363: /* language_opt ::= LANGUAGE NK_STRING */ case 402: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==402); -#line 657 "sql.y" { yymsp[-1].minor.yy965 = yymsp[0].minor.yy0; } -#line 6917 "sql.c" break; case 366: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ -#line 666 "sql.y" { pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy559, yymsp[-2].minor.yy718, &yymsp[-1].minor.yy0, yymsp[0].minor.yy718); } -#line 6922 "sql.c" break; case 367: /* cmd ::= DROP VIEW exists_opt full_view_name */ -#line 667 "sql.y" { pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy559, yymsp[0].minor.yy718); } -#line 6927 "sql.c" break; case 368: /* full_view_name ::= view_name */ -#line 669 "sql.y" { yylhsminor.yy718 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy965); } -#line 6932 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; case 369: /* full_view_name ::= db_name NK_DOT view_name */ -#line 670 "sql.y" { yylhsminor.yy718 = createViewNode(pCxt, &yymsp[-2].minor.yy965, &yymsp[0].minor.yy965); } -#line 6938 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 370: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ -#line 675 "sql.y" { pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy559, &yymsp[-8].minor.yy965, yymsp[-5].minor.yy718, yymsp[-7].minor.yy718, yymsp[-3].minor.yy552, yymsp[-2].minor.yy718, yymsp[0].minor.yy718, yymsp[-4].minor.yy552); } -#line 6944 "sql.c" break; case 371: /* cmd ::= DROP STREAM exists_opt stream_name */ -#line 676 "sql.y" { pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy559, &yymsp[0].minor.yy965); } -#line 6949 "sql.c" break; case 372: /* cmd ::= PAUSE STREAM exists_opt stream_name */ -#line 677 "sql.y" { pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy559, &yymsp[0].minor.yy965); } -#line 6954 "sql.c" break; case 373: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ -#line 678 "sql.y" { pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy559, yymsp[-1].minor.yy559, &yymsp[0].minor.yy965); } -#line 6959 "sql.c" break; case 380: /* stream_options ::= stream_options TRIGGER AT_ONCE */ case 381: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==381); -#line 692 "sql.y" { yylhsminor.yy718 = setStreamOptions(pCxt, yymsp[-2].minor.yy718, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } -#line 6965 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 382: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -#line 694 "sql.y" { yylhsminor.yy718 = setStreamOptions(pCxt, yymsp[-3].minor.yy718, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy718)); } -#line 6971 "sql.c" yymsp[-3].minor.yy718 = yylhsminor.yy718; break; case 383: /* stream_options ::= stream_options WATERMARK duration_literal */ -#line 695 "sql.y" { yylhsminor.yy718 = setStreamOptions(pCxt, yymsp[-2].minor.yy718, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy718)); } -#line 6977 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 384: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -#line 696 "sql.y" { yylhsminor.yy718 = setStreamOptions(pCxt, yymsp[-3].minor.yy718, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } -#line 6983 "sql.c" yymsp[-3].minor.yy718 = yylhsminor.yy718; break; case 385: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -#line 697 "sql.y" { yylhsminor.yy718 = setStreamOptions(pCxt, yymsp[-2].minor.yy718, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } -#line 6989 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 386: /* stream_options ::= stream_options DELETE_MARK duration_literal */ -#line 698 "sql.y" { yylhsminor.yy718 = setStreamOptions(pCxt, yymsp[-2].minor.yy718, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy718)); } -#line 6995 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; case 387: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ -#line 699 "sql.y" { yylhsminor.yy718 = setStreamOptions(pCxt, yymsp[-3].minor.yy718, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } -#line 7001 "sql.c" yymsp[-3].minor.yy718 = yylhsminor.yy718; break; case 389: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 615: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==615); - case 639: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==639); -#line 702 "sql.y" + case 635: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==635); + case 659: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==659); { yymsp[-3].minor.yy718 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy718); } -#line 7009 "sql.c" break; case 392: /* cmd ::= KILL CONNECTION NK_INTEGER */ -#line 710 "sql.y" { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } -#line 7014 "sql.c" break; case 393: /* cmd ::= KILL QUERY NK_STRING */ -#line 711 "sql.y" { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } -#line 7019 "sql.c" break; case 394: /* cmd ::= KILL TRANSACTION NK_INTEGER */ -#line 712 "sql.y" { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } -#line 7024 "sql.c" break; case 395: /* cmd ::= KILL COMPACT NK_INTEGER */ -#line 713 "sql.y" { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_COMPACT_STMT, &yymsp[0].minor.yy0); } -#line 7029 "sql.c" break; case 396: /* cmd ::= BALANCE VGROUP */ -#line 716 "sql.y" { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } -#line 7034 "sql.c" break; case 397: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ -#line 717 "sql.y" { pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy965); } -#line 7039 "sql.c" break; case 398: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ -#line 718 "sql.y" { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 7044 "sql.c" break; case 399: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -#line 719 "sql.y" { pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy552); } -#line 7049 "sql.c" break; case 400: /* cmd ::= SPLIT VGROUP NK_INTEGER */ -#line 720 "sql.y" { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } -#line 7054 "sql.c" break; case 403: /* dnode_list ::= DNODE NK_INTEGER */ -#line 729 "sql.y" { yymsp[-1].minor.yy552 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 7059 "sql.c" break; case 405: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -#line 736 "sql.y" { pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy718, yymsp[0].minor.yy718); } -#line 7064 "sql.c" break; case 408: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -#line 745 "sql.y" { yymsp[-6].minor.yy718 = createInsertStmt(pCxt, yymsp[-4].minor.yy718, yymsp[-2].minor.yy552, yymsp[0].minor.yy718); } -#line 7069 "sql.c" break; case 409: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ -#line 746 "sql.y" { yymsp[-3].minor.yy718 = createInsertStmt(pCxt, yymsp[-1].minor.yy718, NULL, yymsp[0].minor.yy718); } -#line 7074 "sql.c" break; case 410: /* tags_literal ::= NK_INTEGER */ - case 416: /* tags_literal ::= NK_BIN */ yytestcase(yyruleno==416); - case 419: /* tags_literal ::= NK_HEX */ yytestcase(yyruleno==419); -#line 749 "sql.y" + case 422: /* tags_literal ::= NK_BIN */ yytestcase(yyruleno==422); + case 431: /* tags_literal ::= NK_HEX */ yytestcase(yyruleno==431); { yylhsminor.yy718 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0, NULL); } -#line 7081 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 411: /* tags_literal ::= NK_PLUS NK_INTEGER */ - case 412: /* tags_literal ::= NK_MINUS NK_INTEGER */ yytestcase(yyruleno==412); - case 417: /* tags_literal ::= NK_PLUS NK_BIN */ yytestcase(yyruleno==417); - case 418: /* tags_literal ::= NK_MINUS NK_BIN */ yytestcase(yyruleno==418); - case 420: /* tags_literal ::= NK_PLUS NK_HEX */ yytestcase(yyruleno==420); - case 421: /* tags_literal ::= NK_MINUS NK_HEX */ yytestcase(yyruleno==421); -#line 750 "sql.y" + case 411: /* tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + case 412: /* tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==412); + case 423: /* tags_literal ::= NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==423); + case 424: /* tags_literal ::= NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==424); + case 432: /* tags_literal ::= NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==432); + case 433: /* tags_literal ::= NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==433); + case 441: /* tags_literal ::= NK_STRING NK_PLUS duration_literal */ yytestcase(yyruleno==441); + case 442: /* tags_literal ::= NK_STRING NK_MINUS duration_literal */ yytestcase(yyruleno==442); +{ + SToken l = yymsp[-2].minor.yy0; + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy718); + l.n = (r.z + r.n) - l.z; + yylhsminor.yy718 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy718); + } + yymsp[-2].minor.yy718 = yylhsminor.yy718; + break; + case 413: /* tags_literal ::= NK_PLUS NK_INTEGER */ + case 416: /* tags_literal ::= NK_MINUS NK_INTEGER */ yytestcase(yyruleno==416); + case 425: /* tags_literal ::= NK_PLUS NK_BIN */ yytestcase(yyruleno==425); + case 428: /* tags_literal ::= NK_MINUS NK_BIN */ yytestcase(yyruleno==428); + case 434: /* tags_literal ::= NK_PLUS NK_HEX */ yytestcase(yyruleno==434); + case 437: /* tags_literal ::= NK_MINUS NK_HEX */ yytestcase(yyruleno==437); { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yylhsminor.yy718 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); } -#line 7096 "sql.c" yymsp[-1].minor.yy718 = yylhsminor.yy718; break; - case 413: /* tags_literal ::= NK_FLOAT */ -#line 760 "sql.y" + case 414: /* tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + case 415: /* tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==415); + case 417: /* tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ yytestcase(yyruleno==417); + case 418: /* tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==418); + case 426: /* tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==426); + case 427: /* tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==427); + case 429: /* tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==429); + case 430: /* tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==430); + case 435: /* tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==435); + case 436: /* tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==436); + case 438: /* tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==438); + case 439: /* tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==439); +{ + SToken l = yymsp[-3].minor.yy0; + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy718); + l.n = (r.z + r.n) - l.z; + yylhsminor.yy718 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy718); + } + yymsp[-3].minor.yy718 = yylhsminor.yy718; + break; + case 419: /* tags_literal ::= NK_FLOAT */ { yylhsminor.yy718 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0, NULL); } -#line 7102 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 414: /* tags_literal ::= NK_PLUS NK_FLOAT */ - case 415: /* tags_literal ::= NK_MINUS NK_FLOAT */ yytestcase(yyruleno==415); -#line 761 "sql.y" + case 420: /* tags_literal ::= NK_PLUS NK_FLOAT */ + case 421: /* tags_literal ::= NK_MINUS NK_FLOAT */ yytestcase(yyruleno==421); { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yylhsminor.yy718 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t, NULL); } -#line 7113 "sql.c" yymsp[-1].minor.yy718 = yylhsminor.yy718; break; - case 422: /* tags_literal ::= NK_STRING */ -#line 795 "sql.y" + case 440: /* tags_literal ::= NK_STRING */ { yylhsminor.yy718 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0, NULL); } -#line 7119 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 423: /* tags_literal ::= NK_BOOL */ -#line 796 "sql.y" + case 443: /* tags_literal ::= NK_BOOL */ { yylhsminor.yy718 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0, NULL); } -#line 7125 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 424: /* tags_literal ::= NULL */ -#line 797 "sql.y" + case 444: /* tags_literal ::= NULL */ { yylhsminor.yy718 = createRawValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0, NULL); } -#line 7131 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 425: /* tags_literal ::= literal_func */ -#line 799 "sql.y" + case 445: /* tags_literal ::= literal_func */ { yylhsminor.yy718 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, NULL, yymsp[0].minor.yy718); } -#line 7137 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 426: /* tags_literal ::= literal_func NK_PLUS duration_literal */ - case 427: /* tags_literal ::= literal_func NK_MINUS duration_literal */ yytestcase(yyruleno==427); -#line 800 "sql.y" + case 446: /* tags_literal ::= literal_func NK_PLUS duration_literal */ + case 447: /* tags_literal ::= literal_func NK_MINUS duration_literal */ yytestcase(yyruleno==447); { SToken l = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy718); SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy718); l.n = (r.z + r.n) - l.z; yylhsminor.yy718 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, yymsp[-2].minor.yy718, yymsp[0].minor.yy718); } -#line 7149 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 430: /* literal ::= NK_INTEGER */ -#line 819 "sql.y" + case 450: /* literal ::= NK_INTEGER */ { yylhsminor.yy718 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } -#line 7155 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 431: /* literal ::= NK_FLOAT */ -#line 820 "sql.y" + case 451: /* literal ::= NK_FLOAT */ { yylhsminor.yy718 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } -#line 7161 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 432: /* literal ::= NK_STRING */ -#line 821 "sql.y" + case 452: /* literal ::= NK_STRING */ { yylhsminor.yy718 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } -#line 7167 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 433: /* literal ::= NK_BOOL */ -#line 822 "sql.y" + case 453: /* literal ::= NK_BOOL */ { yylhsminor.yy718 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } -#line 7173 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 434: /* literal ::= TIMESTAMP NK_STRING */ -#line 823 "sql.y" + case 454: /* literal ::= TIMESTAMP NK_STRING */ { yylhsminor.yy718 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } -#line 7179 "sql.c" yymsp[-1].minor.yy718 = yylhsminor.yy718; break; - case 435: /* literal ::= duration_literal */ - case 445: /* signed_literal ::= signed */ yytestcase(yyruleno==445); - case 468: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==468); - case 469: /* expression ::= literal */ yytestcase(yyruleno==469); - case 471: /* expression ::= column_reference */ yytestcase(yyruleno==471); - case 472: /* expression ::= function_expression */ yytestcase(yyruleno==472); - case 473: /* expression ::= case_when_expression */ yytestcase(yyruleno==473); - case 506: /* function_expression ::= literal_func */ yytestcase(yyruleno==506); - case 556: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==556); - case 560: /* boolean_primary ::= predicate */ yytestcase(yyruleno==560); - case 562: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==562); - case 563: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==563); - case 566: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==566); - case 568: /* table_reference ::= table_primary */ yytestcase(yyruleno==568); - case 569: /* table_reference ::= joined_table */ yytestcase(yyruleno==569); - case 573: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==573); - case 641: /* query_simple ::= query_specification */ yytestcase(yyruleno==641); - case 642: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==642); - case 645: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==645); - case 647: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==647); -#line 824 "sql.y" + case 455: /* literal ::= duration_literal */ + case 465: /* signed_literal ::= signed */ yytestcase(yyruleno==465); + case 488: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==488); + case 489: /* expression ::= literal */ yytestcase(yyruleno==489); + case 491: /* expression ::= column_reference */ yytestcase(yyruleno==491); + case 492: /* expression ::= function_expression */ yytestcase(yyruleno==492); + case 493: /* expression ::= case_when_expression */ yytestcase(yyruleno==493); + case 526: /* function_expression ::= literal_func */ yytestcase(yyruleno==526); + case 576: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==576); + case 580: /* boolean_primary ::= predicate */ yytestcase(yyruleno==580); + case 582: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==582); + case 583: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==583); + case 586: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==586); + case 588: /* table_reference ::= table_primary */ yytestcase(yyruleno==588); + case 589: /* table_reference ::= joined_table */ yytestcase(yyruleno==589); + case 593: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==593); + case 661: /* query_simple ::= query_specification */ yytestcase(yyruleno==661); + case 662: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==662); + case 665: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==665); + case 667: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==667); { yylhsminor.yy718 = yymsp[0].minor.yy718; } -#line 7204 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 436: /* literal ::= NULL */ -#line 825 "sql.y" + case 456: /* literal ::= NULL */ { yylhsminor.yy718 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } -#line 7210 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 437: /* literal ::= NK_QUESTION */ -#line 826 "sql.y" + case 457: /* literal ::= NK_QUESTION */ { yylhsminor.yy718 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 7216 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 438: /* duration_literal ::= NK_VARIABLE */ - case 616: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==616); - case 617: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==617); - case 618: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==618); -#line 828 "sql.y" + case 458: /* duration_literal ::= NK_VARIABLE */ + case 636: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==636); + case 637: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==637); + case 638: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==638); { yylhsminor.yy718 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 7225 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 439: /* signed ::= NK_INTEGER */ -#line 830 "sql.y" + case 459: /* signed ::= NK_INTEGER */ { yylhsminor.yy718 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } -#line 7231 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 440: /* signed ::= NK_PLUS NK_INTEGER */ -#line 831 "sql.y" + case 460: /* signed ::= NK_PLUS NK_INTEGER */ { yymsp[-1].minor.yy718 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } -#line 7237 "sql.c" break; - case 441: /* signed ::= NK_MINUS NK_INTEGER */ -#line 832 "sql.y" + case 461: /* 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.yy718 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } -#line 7246 "sql.c" yymsp[-1].minor.yy718 = yylhsminor.yy718; break; - case 442: /* signed ::= NK_FLOAT */ -#line 837 "sql.y" + case 462: /* signed ::= NK_FLOAT */ { yylhsminor.yy718 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } -#line 7252 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 443: /* signed ::= NK_PLUS NK_FLOAT */ -#line 838 "sql.y" + case 463: /* signed ::= NK_PLUS NK_FLOAT */ { yymsp[-1].minor.yy718 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } -#line 7258 "sql.c" break; - case 444: /* signed ::= NK_MINUS NK_FLOAT */ -#line 839 "sql.y" + case 464: /* 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.yy718 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } -#line 7267 "sql.c" yymsp[-1].minor.yy718 = yylhsminor.yy718; break; - case 446: /* signed_literal ::= NK_STRING */ -#line 846 "sql.y" + case 466: /* signed_literal ::= NK_STRING */ { yylhsminor.yy718 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } -#line 7273 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 447: /* signed_literal ::= NK_BOOL */ -#line 847 "sql.y" + case 467: /* signed_literal ::= NK_BOOL */ { yylhsminor.yy718 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } -#line 7279 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 448: /* signed_literal ::= TIMESTAMP NK_STRING */ -#line 848 "sql.y" + case 468: /* signed_literal ::= TIMESTAMP NK_STRING */ { yymsp[-1].minor.yy718 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } -#line 7285 "sql.c" break; - case 449: /* signed_literal ::= duration_literal */ - case 451: /* signed_literal ::= literal_func */ yytestcase(yyruleno==451); - case 527: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==527); - case 593: /* select_item ::= common_expression */ yytestcase(yyruleno==593); - case 603: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==603); - case 646: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==646); - case 648: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==648); - case 661: /* search_condition ::= common_expression */ yytestcase(yyruleno==661); -#line 849 "sql.y" + case 469: /* signed_literal ::= duration_literal */ + case 471: /* signed_literal ::= literal_func */ yytestcase(yyruleno==471); + case 547: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==547); + case 613: /* select_item ::= common_expression */ yytestcase(yyruleno==613); + case 623: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==623); + case 666: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==666); + case 668: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==668); + case 681: /* search_condition ::= common_expression */ yytestcase(yyruleno==681); { yylhsminor.yy718 = releaseRawExprNode(pCxt, yymsp[0].minor.yy718); } -#line 7297 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 450: /* signed_literal ::= NULL */ -#line 850 "sql.y" + case 470: /* signed_literal ::= NULL */ { yylhsminor.yy718 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } -#line 7303 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 452: /* signed_literal ::= NK_QUESTION */ -#line 852 "sql.y" + case 472: /* signed_literal ::= NK_QUESTION */ { yylhsminor.yy718 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } -#line 7309 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 470: /* expression ::= pseudo_column */ -#line 914 "sql.y" + case 490: /* expression ::= pseudo_column */ { yylhsminor.yy718 = yymsp[0].minor.yy718; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy718, true); } -#line 7315 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 474: /* expression ::= NK_LP expression NK_RP */ - case 561: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==561); - case 660: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==660); -#line 918 "sql.y" + case 494: /* expression ::= NK_LP expression NK_RP */ + case 581: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==581); + case 680: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==680); { yylhsminor.yy718 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy718)); } -#line 7323 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 475: /* expression ::= NK_PLUS expr_or_subquery */ -#line 919 "sql.y" + case 495: /* expression ::= NK_PLUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy718); yylhsminor.yy718 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy718)); } -#line 7332 "sql.c" yymsp[-1].minor.yy718 = yylhsminor.yy718; break; - case 476: /* expression ::= NK_MINUS expr_or_subquery */ -#line 923 "sql.y" + case 496: /* expression ::= NK_MINUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy718); yylhsminor.yy718 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy718), NULL)); } -#line 7341 "sql.c" yymsp[-1].minor.yy718 = yylhsminor.yy718; break; - case 477: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ -#line 927 "sql.y" + case 497: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy718); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy718); yylhsminor.yy718 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy718), releaseRawExprNode(pCxt, yymsp[0].minor.yy718))); } -#line 7351 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 478: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ -#line 932 "sql.y" + case 498: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy718); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy718); yylhsminor.yy718 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy718), releaseRawExprNode(pCxt, yymsp[0].minor.yy718))); } -#line 7361 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 479: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ -#line 937 "sql.y" + case 499: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy718); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy718); yylhsminor.yy718 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy718), releaseRawExprNode(pCxt, yymsp[0].minor.yy718))); } -#line 7371 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 480: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ -#line 942 "sql.y" + case 500: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy718); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy718); yylhsminor.yy718 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy718), releaseRawExprNode(pCxt, yymsp[0].minor.yy718))); } -#line 7381 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 481: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ -#line 947 "sql.y" + case 501: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy718); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy718); yylhsminor.yy718 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy718), releaseRawExprNode(pCxt, yymsp[0].minor.yy718))); } -#line 7391 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 482: /* expression ::= column_reference NK_ARROW NK_STRING */ -#line 952 "sql.y" + case 502: /* expression ::= column_reference NK_ARROW NK_STRING */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy718); yylhsminor.yy718 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy718), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } -#line 7400 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 483: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ -#line 956 "sql.y" + case 503: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy718); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy718); yylhsminor.yy718 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy718), releaseRawExprNode(pCxt, yymsp[0].minor.yy718))); } -#line 7410 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 484: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ -#line 961 "sql.y" + case 504: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy718); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy718); yylhsminor.yy718 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy718), releaseRawExprNode(pCxt, yymsp[0].minor.yy718))); } -#line 7420 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 487: /* column_reference ::= column_name */ -#line 972 "sql.y" + case 507: /* column_reference ::= column_name */ { yylhsminor.yy718 = createRawExprNode(pCxt, &yymsp[0].minor.yy965, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy965)); } -#line 7426 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 488: /* column_reference ::= table_name NK_DOT column_name */ -#line 973 "sql.y" + case 508: /* column_reference ::= table_name NK_DOT column_name */ { yylhsminor.yy718 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy965, &yymsp[0].minor.yy965, createColumnNode(pCxt, &yymsp[-2].minor.yy965, &yymsp[0].minor.yy965)); } -#line 7432 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 489: /* column_reference ::= NK_ALIAS */ -#line 974 "sql.y" + case 509: /* column_reference ::= NK_ALIAS */ { yylhsminor.yy718 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } -#line 7438 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 490: /* column_reference ::= table_name NK_DOT NK_ALIAS */ -#line 975 "sql.y" + case 510: /* column_reference ::= table_name NK_DOT NK_ALIAS */ { yylhsminor.yy718 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy965, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy965, &yymsp[0].minor.yy0)); } -#line 7444 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 491: /* pseudo_column ::= ROWTS */ - case 492: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==492); - case 494: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==494); - case 495: /* pseudo_column ::= QEND */ yytestcase(yyruleno==495); - case 496: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==496); - case 497: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==497); - case 498: /* pseudo_column ::= WEND */ yytestcase(yyruleno==498); - case 499: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==499); - case 500: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==500); - case 501: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==501); - case 502: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==502); - case 508: /* literal_func ::= NOW */ yytestcase(yyruleno==508); - case 509: /* literal_func ::= TODAY */ yytestcase(yyruleno==509); -#line 977 "sql.y" + case 511: /* pseudo_column ::= ROWTS */ + case 512: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==512); + case 514: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==514); + case 515: /* pseudo_column ::= QEND */ yytestcase(yyruleno==515); + case 516: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==516); + case 517: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==517); + case 518: /* pseudo_column ::= WEND */ yytestcase(yyruleno==518); + case 519: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==519); + case 520: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==520); + case 521: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==521); + case 522: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==522); + case 528: /* literal_func ::= NOW */ yytestcase(yyruleno==528); + case 529: /* literal_func ::= TODAY */ yytestcase(yyruleno==529); { yylhsminor.yy718 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } -#line 7462 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 493: /* pseudo_column ::= table_name NK_DOT TBNAME */ -#line 979 "sql.y" + case 513: /* pseudo_column ::= table_name NK_DOT TBNAME */ { yylhsminor.yy718 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy965, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy965)))); } -#line 7468 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 503: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 504: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==504); -#line 990 "sql.y" + case 523: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 524: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==524); { yylhsminor.yy718 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy965, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy965, yymsp[-1].minor.yy552)); } -#line 7475 "sql.c" yymsp[-3].minor.yy718 = yylhsminor.yy718; break; - case 505: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ -#line 993 "sql.y" + case 525: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ { yylhsminor.yy718 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy718), yymsp[-1].minor.yy224)); } -#line 7481 "sql.c" yymsp[-5].minor.yy718 = yylhsminor.yy718; break; - case 507: /* literal_func ::= noarg_func NK_LP NK_RP */ -#line 996 "sql.y" + case 527: /* literal_func ::= noarg_func NK_LP NK_RP */ { yylhsminor.yy718 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy965, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy965, NULL)); } -#line 7487 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 523: /* star_func_para_list ::= NK_STAR */ -#line 1021 "sql.y" + case 543: /* star_func_para_list ::= NK_STAR */ { yylhsminor.yy552 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } -#line 7493 "sql.c" yymsp[0].minor.yy552 = yylhsminor.yy552; break; - case 528: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 596: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==596); -#line 1030 "sql.y" + case 548: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 616: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==616); { yylhsminor.yy718 = createColumnNode(pCxt, &yymsp[-2].minor.yy965, &yymsp[0].minor.yy0); } -#line 7500 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 529: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ -#line 1033 "sql.y" + case 549: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ { yylhsminor.yy718 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy552, yymsp[-1].minor.yy718)); } -#line 7506 "sql.c" yymsp[-3].minor.yy718 = yylhsminor.yy718; break; - case 530: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ -#line 1035 "sql.y" + case 550: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ { yylhsminor.yy718 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy718), yymsp[-2].minor.yy552, yymsp[-1].minor.yy718)); } -#line 7512 "sql.c" yymsp[-4].minor.yy718 = yylhsminor.yy718; break; - case 533: /* when_then_expr ::= WHEN common_expression THEN common_expression */ -#line 1042 "sql.y" + case 553: /* when_then_expr ::= WHEN common_expression THEN common_expression */ { yymsp[-3].minor.yy718 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy718), releaseRawExprNode(pCxt, yymsp[0].minor.yy718)); } -#line 7518 "sql.c" break; - case 535: /* case_when_else_opt ::= ELSE common_expression */ -#line 1045 "sql.y" + case 555: /* case_when_else_opt ::= ELSE common_expression */ { yymsp[-1].minor.yy718 = releaseRawExprNode(pCxt, yymsp[0].minor.yy718); } -#line 7523 "sql.c" break; - case 536: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 541: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==541); -#line 1048 "sql.y" + case 556: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 561: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==561); { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy718); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy718); yylhsminor.yy718 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy810, releaseRawExprNode(pCxt, yymsp[-2].minor.yy718), releaseRawExprNode(pCxt, yymsp[0].minor.yy718))); } -#line 7533 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 537: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ -#line 1055 "sql.y" + case 557: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy718); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy718); yylhsminor.yy718 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy718), releaseRawExprNode(pCxt, yymsp[-2].minor.yy718), releaseRawExprNode(pCxt, yymsp[0].minor.yy718))); } -#line 7543 "sql.c" yymsp[-4].minor.yy718 = yylhsminor.yy718; break; - case 538: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ -#line 1061 "sql.y" + case 558: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy718); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy718); yylhsminor.yy718 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy718), releaseRawExprNode(pCxt, yymsp[-2].minor.yy718), releaseRawExprNode(pCxt, yymsp[0].minor.yy718))); } -#line 7553 "sql.c" yymsp[-5].minor.yy718 = yylhsminor.yy718; break; - case 539: /* predicate ::= expr_or_subquery IS NULL */ -#line 1066 "sql.y" + case 559: /* predicate ::= expr_or_subquery IS NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy718); yylhsminor.yy718 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy718), NULL)); } -#line 7562 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 540: /* predicate ::= expr_or_subquery IS NOT NULL */ -#line 1070 "sql.y" + case 560: /* predicate ::= expr_or_subquery IS NOT NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy718); yylhsminor.yy718 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy718), NULL)); } -#line 7571 "sql.c" yymsp[-3].minor.yy718 = yylhsminor.yy718; break; - case 542: /* compare_op ::= NK_LT */ -#line 1082 "sql.y" + case 562: /* compare_op ::= NK_LT */ { yymsp[0].minor.yy810 = OP_TYPE_LOWER_THAN; } -#line 7577 "sql.c" break; - case 543: /* compare_op ::= NK_GT */ -#line 1083 "sql.y" + case 563: /* compare_op ::= NK_GT */ { yymsp[0].minor.yy810 = OP_TYPE_GREATER_THAN; } -#line 7582 "sql.c" break; - case 544: /* compare_op ::= NK_LE */ -#line 1084 "sql.y" + case 564: /* compare_op ::= NK_LE */ { yymsp[0].minor.yy810 = OP_TYPE_LOWER_EQUAL; } -#line 7587 "sql.c" break; - case 545: /* compare_op ::= NK_GE */ -#line 1085 "sql.y" + case 565: /* compare_op ::= NK_GE */ { yymsp[0].minor.yy810 = OP_TYPE_GREATER_EQUAL; } -#line 7592 "sql.c" break; - case 546: /* compare_op ::= NK_NE */ -#line 1086 "sql.y" + case 566: /* compare_op ::= NK_NE */ { yymsp[0].minor.yy810 = OP_TYPE_NOT_EQUAL; } -#line 7597 "sql.c" break; - case 547: /* compare_op ::= NK_EQ */ -#line 1087 "sql.y" + case 567: /* compare_op ::= NK_EQ */ { yymsp[0].minor.yy810 = OP_TYPE_EQUAL; } -#line 7602 "sql.c" break; - case 548: /* compare_op ::= LIKE */ -#line 1088 "sql.y" + case 568: /* compare_op ::= LIKE */ { yymsp[0].minor.yy810 = OP_TYPE_LIKE; } -#line 7607 "sql.c" break; - case 549: /* compare_op ::= NOT LIKE */ -#line 1089 "sql.y" + case 569: /* compare_op ::= NOT LIKE */ { yymsp[-1].minor.yy810 = OP_TYPE_NOT_LIKE; } -#line 7612 "sql.c" break; - case 550: /* compare_op ::= MATCH */ -#line 1090 "sql.y" + case 570: /* compare_op ::= MATCH */ { yymsp[0].minor.yy810 = OP_TYPE_MATCH; } -#line 7617 "sql.c" break; - case 551: /* compare_op ::= NMATCH */ -#line 1091 "sql.y" + case 571: /* compare_op ::= NMATCH */ { yymsp[0].minor.yy810 = OP_TYPE_NMATCH; } -#line 7622 "sql.c" break; - case 552: /* compare_op ::= CONTAINS */ -#line 1092 "sql.y" + case 572: /* compare_op ::= CONTAINS */ { yymsp[0].minor.yy810 = OP_TYPE_JSON_CONTAINS; } -#line 7627 "sql.c" break; - case 553: /* in_op ::= IN */ -#line 1096 "sql.y" + case 573: /* in_op ::= IN */ { yymsp[0].minor.yy810 = OP_TYPE_IN; } -#line 7632 "sql.c" break; - case 554: /* in_op ::= NOT IN */ -#line 1097 "sql.y" + case 574: /* in_op ::= NOT IN */ { yymsp[-1].minor.yy810 = OP_TYPE_NOT_IN; } -#line 7637 "sql.c" break; - case 555: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -#line 1099 "sql.y" + case 575: /* in_predicate_value ::= NK_LP literal_list NK_RP */ { yylhsminor.yy718 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy552)); } -#line 7642 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 557: /* boolean_value_expression ::= NOT boolean_primary */ -#line 1103 "sql.y" + case 577: /* boolean_value_expression ::= NOT boolean_primary */ { SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy718); yylhsminor.yy718 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy718), NULL)); } -#line 7651 "sql.c" yymsp[-1].minor.yy718 = yylhsminor.yy718; break; - case 558: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ -#line 1108 "sql.y" + case 578: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy718); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy718); yylhsminor.yy718 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy718), releaseRawExprNode(pCxt, yymsp[0].minor.yy718))); } -#line 7661 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 559: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ -#line 1114 "sql.y" + case 579: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy718); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy718); yylhsminor.yy718 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy718), releaseRawExprNode(pCxt, yymsp[0].minor.yy718))); } -#line 7671 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 567: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -#line 1132 "sql.y" + case 587: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ { yylhsminor.yy718 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy718, yymsp[0].minor.yy718, NULL); } -#line 7677 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 570: /* table_primary ::= table_name alias_opt */ -#line 1138 "sql.y" + case 590: /* table_primary ::= table_name alias_opt */ { yylhsminor.yy718 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy965, &yymsp[0].minor.yy965); } -#line 7683 "sql.c" yymsp[-1].minor.yy718 = yylhsminor.yy718; break; - case 571: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -#line 1139 "sql.y" + case 591: /* table_primary ::= db_name NK_DOT table_name alias_opt */ { yylhsminor.yy718 = createRealTableNode(pCxt, &yymsp[-3].minor.yy965, &yymsp[-1].minor.yy965, &yymsp[0].minor.yy965); } -#line 7689 "sql.c" yymsp[-3].minor.yy718 = yylhsminor.yy718; break; - case 572: /* table_primary ::= subquery alias_opt */ -#line 1140 "sql.y" + case 592: /* table_primary ::= subquery alias_opt */ { yylhsminor.yy718 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy718), &yymsp[0].minor.yy965); } -#line 7695 "sql.c" yymsp[-1].minor.yy718 = yylhsminor.yy718; break; - case 574: /* alias_opt ::= */ -#line 1145 "sql.y" + case 594: /* alias_opt ::= */ { yymsp[1].minor.yy965 = nil_token; } -#line 7701 "sql.c" break; - case 576: /* alias_opt ::= AS table_alias */ -#line 1147 "sql.y" + case 596: /* alias_opt ::= AS table_alias */ { yymsp[-1].minor.yy965 = yymsp[0].minor.yy965; } -#line 7706 "sql.c" break; - case 577: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 578: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==578); -#line 1149 "sql.y" + case 597: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 598: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==598); { yymsp[-2].minor.yy718 = yymsp[-1].minor.yy718; } -#line 7712 "sql.c" break; - case 579: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -#line 1154 "sql.y" + case 599: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ { yylhsminor.yy718 = createJoinTableNode(pCxt, yymsp[-4].minor.yy992, yymsp[-5].minor.yy718, yymsp[-2].minor.yy718, yymsp[0].minor.yy718); } -#line 7717 "sql.c" yymsp[-5].minor.yy718 = yylhsminor.yy718; break; - case 580: /* join_type ::= */ -#line 1158 "sql.y" + case 600: /* join_type ::= */ { yymsp[1].minor.yy992 = JOIN_TYPE_INNER; } -#line 7723 "sql.c" break; - case 581: /* join_type ::= INNER */ -#line 1159 "sql.y" + case 601: /* join_type ::= INNER */ { yymsp[0].minor.yy992 = JOIN_TYPE_INNER; } -#line 7728 "sql.c" break; - case 582: /* query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ -#line 1165 "sql.y" + case 602: /* query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { yymsp[-13].minor.yy718 = createSelectStmt(pCxt, yymsp[-11].minor.yy559, yymsp[-9].minor.yy552, yymsp[-8].minor.yy718, yymsp[-12].minor.yy552); yymsp[-13].minor.yy718 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy718, yymsp[-10].minor.yy559); @@ -7741,234 +6678,151 @@ static YYACTIONTYPE yy_reduce( yymsp[-13].minor.yy718 = addEveryClause(pCxt, yymsp[-13].minor.yy718, yymsp[-4].minor.yy718); yymsp[-13].minor.yy718 = addFillClause(pCxt, yymsp[-13].minor.yy718, yymsp[-3].minor.yy718); } -#line 7744 "sql.c" break; - case 583: /* hint_list ::= */ -#line 1180 "sql.y" + case 603: /* hint_list ::= */ { yymsp[1].minor.yy552 = createHintNodeList(pCxt, NULL); } -#line 7749 "sql.c" break; - case 584: /* hint_list ::= NK_HINT */ -#line 1181 "sql.y" + case 604: /* hint_list ::= NK_HINT */ { yylhsminor.yy552 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } -#line 7754 "sql.c" yymsp[0].minor.yy552 = yylhsminor.yy552; break; - case 589: /* set_quantifier_opt ::= ALL */ -#line 1192 "sql.y" + case 609: /* set_quantifier_opt ::= ALL */ { yymsp[0].minor.yy559 = false; } -#line 7760 "sql.c" break; - case 592: /* select_item ::= NK_STAR */ -#line 1199 "sql.y" + case 612: /* select_item ::= NK_STAR */ { yylhsminor.yy718 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } -#line 7765 "sql.c" yymsp[0].minor.yy718 = yylhsminor.yy718; break; - case 594: /* select_item ::= common_expression column_alias */ - case 604: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==604); -#line 1201 "sql.y" + case 614: /* select_item ::= common_expression column_alias */ + case 624: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==624); { yylhsminor.yy718 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy718), &yymsp[0].minor.yy965); } -#line 7772 "sql.c" yymsp[-1].minor.yy718 = yylhsminor.yy718; break; - case 595: /* select_item ::= common_expression AS column_alias */ - case 605: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==605); -#line 1202 "sql.y" + case 615: /* select_item ::= common_expression AS column_alias */ + case 625: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==625); { yylhsminor.yy718 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy718), &yymsp[0].minor.yy965); } -#line 7779 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 600: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 630: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==630); - case 650: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==650); -#line 1211 "sql.y" + case 620: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 650: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==650); + case 670: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==670); { yymsp[-2].minor.yy552 = yymsp[0].minor.yy552; } -#line 7787 "sql.c" break; - case 607: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ -#line 1224 "sql.y" + case 627: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ { yymsp[-5].minor.yy718 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy718), releaseRawExprNode(pCxt, yymsp[-1].minor.yy718)); } -#line 7792 "sql.c" break; - case 608: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -#line 1225 "sql.y" + case 628: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ { yymsp[-3].minor.yy718 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy718)); } -#line 7797 "sql.c" break; - case 609: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ -#line 1227 "sql.y" + case 629: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-5].minor.yy718 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy718), NULL, yymsp[-1].minor.yy718, yymsp[0].minor.yy718); } -#line 7802 "sql.c" break; - case 610: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ -#line 1231 "sql.y" + case 630: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-7].minor.yy718 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy718), releaseRawExprNode(pCxt, yymsp[-3].minor.yy718), yymsp[-1].minor.yy718, yymsp[0].minor.yy718); } -#line 7807 "sql.c" break; - case 611: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ -#line 1233 "sql.y" + case 631: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ { yymsp[-6].minor.yy718 = createEventWindowNode(pCxt, yymsp[-3].minor.yy718, yymsp[0].minor.yy718); } -#line 7812 "sql.c" break; - case 612: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ -#line 1235 "sql.y" + case 632: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy718 = createCountWindowNode(pCxt, &yymsp[-1].minor.yy0, &yymsp[-1].minor.yy0); } -#line 7817 "sql.c" break; - case 613: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -#line 1237 "sql.y" + case 633: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ { yymsp[-5].minor.yy718 = createCountWindowNode(pCxt, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0); } -#line 7822 "sql.c" break; - case 620: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -#line 1247 "sql.y" + case 640: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ { yymsp[-3].minor.yy718 = createFillNode(pCxt, yymsp[-1].minor.yy206, NULL); } -#line 7827 "sql.c" break; - case 621: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ -#line 1248 "sql.y" + case 641: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ { yymsp[-5].minor.yy718 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy552)); } -#line 7832 "sql.c" break; - case 622: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ -#line 1249 "sql.y" + case 642: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ { yymsp[-5].minor.yy718 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy552)); } -#line 7837 "sql.c" break; - case 623: /* fill_mode ::= NONE */ -#line 1253 "sql.y" + case 643: /* fill_mode ::= NONE */ { yymsp[0].minor.yy206 = FILL_MODE_NONE; } -#line 7842 "sql.c" break; - case 624: /* fill_mode ::= PREV */ -#line 1254 "sql.y" + case 644: /* fill_mode ::= PREV */ { yymsp[0].minor.yy206 = FILL_MODE_PREV; } -#line 7847 "sql.c" break; - case 625: /* fill_mode ::= NULL */ -#line 1255 "sql.y" + case 645: /* fill_mode ::= NULL */ { yymsp[0].minor.yy206 = FILL_MODE_NULL; } -#line 7852 "sql.c" break; - case 626: /* fill_mode ::= NULL_F */ -#line 1256 "sql.y" + case 646: /* fill_mode ::= NULL_F */ { yymsp[0].minor.yy206 = FILL_MODE_NULL_F; } -#line 7857 "sql.c" break; - case 627: /* fill_mode ::= LINEAR */ -#line 1257 "sql.y" + case 647: /* fill_mode ::= LINEAR */ { yymsp[0].minor.yy206 = FILL_MODE_LINEAR; } -#line 7862 "sql.c" break; - case 628: /* fill_mode ::= NEXT */ -#line 1258 "sql.y" + case 648: /* fill_mode ::= NEXT */ { yymsp[0].minor.yy206 = FILL_MODE_NEXT; } -#line 7867 "sql.c" break; - case 631: /* group_by_list ::= expr_or_subquery */ -#line 1267 "sql.y" + case 651: /* group_by_list ::= expr_or_subquery */ { yylhsminor.yy552 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy718))); } -#line 7872 "sql.c" yymsp[0].minor.yy552 = yylhsminor.yy552; break; - case 632: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ -#line 1268 "sql.y" + case 652: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ { yylhsminor.yy552 = addNodeToList(pCxt, yymsp[-2].minor.yy552, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy718))); } -#line 7878 "sql.c" yymsp[-2].minor.yy552 = yylhsminor.yy552; break; - case 636: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ -#line 1275 "sql.y" + case 656: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ { yymsp[-5].minor.yy718 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy718), releaseRawExprNode(pCxt, yymsp[-1].minor.yy718)); } -#line 7884 "sql.c" break; - case 637: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ -#line 1277 "sql.y" + case 657: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ { yymsp[-3].minor.yy718 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy718)); } -#line 7889 "sql.c" break; - case 640: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ -#line 1284 "sql.y" + case 660: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { yylhsminor.yy718 = addOrderByClause(pCxt, yymsp[-3].minor.yy718, yymsp[-2].minor.yy552); yylhsminor.yy718 = addSlimitClause(pCxt, yylhsminor.yy718, yymsp[-1].minor.yy718); yylhsminor.yy718 = addLimitClause(pCxt, yylhsminor.yy718, yymsp[0].minor.yy718); } -#line 7898 "sql.c" yymsp[-3].minor.yy718 = yylhsminor.yy718; break; - case 643: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ -#line 1294 "sql.y" + case 663: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ { yylhsminor.yy718 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy718, yymsp[0].minor.yy718); } -#line 7904 "sql.c" yymsp[-3].minor.yy718 = yylhsminor.yy718; break; - case 644: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ -#line 1296 "sql.y" + case 664: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ { yylhsminor.yy718 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy718, yymsp[0].minor.yy718); } -#line 7910 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 652: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 656: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==656); -#line 1310 "sql.y" + case 672: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 676: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==676); { yymsp[-1].minor.yy718 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } -#line 7917 "sql.c" break; - case 653: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 657: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==657); -#line 1311 "sql.y" + case 673: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 677: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==677); { yymsp[-3].minor.yy718 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } -#line 7923 "sql.c" break; - case 654: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 658: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==658); -#line 1312 "sql.y" + case 674: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 678: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==678); { yymsp[-3].minor.yy718 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } -#line 7929 "sql.c" break; - case 659: /* subquery ::= NK_LP query_expression NK_RP */ -#line 1320 "sql.y" + case 679: /* subquery ::= NK_LP query_expression NK_RP */ { yylhsminor.yy718 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy718); } -#line 7934 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 664: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ -#line 1334 "sql.y" + case 684: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ { yylhsminor.yy718 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy718), yymsp[-1].minor.yy576, yymsp[0].minor.yy345); } -#line 7940 "sql.c" yymsp[-2].minor.yy718 = yylhsminor.yy718; break; - case 665: /* ordering_specification_opt ::= */ -#line 1338 "sql.y" + case 685: /* ordering_specification_opt ::= */ { yymsp[1].minor.yy576 = ORDER_ASC; } -#line 7946 "sql.c" break; - case 666: /* ordering_specification_opt ::= ASC */ -#line 1339 "sql.y" + case 686: /* ordering_specification_opt ::= ASC */ { yymsp[0].minor.yy576 = ORDER_ASC; } -#line 7951 "sql.c" break; - case 667: /* ordering_specification_opt ::= DESC */ -#line 1340 "sql.y" + case 687: /* ordering_specification_opt ::= DESC */ { yymsp[0].minor.yy576 = ORDER_DESC; } -#line 7956 "sql.c" break; - case 668: /* null_ordering_opt ::= */ -#line 1344 "sql.y" + case 688: /* null_ordering_opt ::= */ { yymsp[1].minor.yy345 = NULL_ORDER_DEFAULT; } -#line 7961 "sql.c" break; - case 669: /* null_ordering_opt ::= NULLS FIRST */ -#line 1345 "sql.y" + case 689: /* null_ordering_opt ::= NULLS FIRST */ { yymsp[-1].minor.yy345 = NULL_ORDER_FIRST; } -#line 7966 "sql.c" break; - case 670: /* null_ordering_opt ::= NULLS LAST */ -#line 1346 "sql.y" + case 690: /* null_ordering_opt ::= NULLS LAST */ { yymsp[-1].minor.yy345 = NULL_ORDER_LAST; } -#line 7971 "sql.c" break; default: break; @@ -8030,7 +6884,6 @@ static void yy_syntax_error( ParseCTX_FETCH #define TOKEN yyminor /************ Begin %syntax_error code ****************************************/ -#line 29 "sql.y" if (TSDB_CODE_SUCCESS == pCxt->errCode) { if(TOKEN.z) { @@ -8041,7 +6894,6 @@ static void yy_syntax_error( } else if (TSDB_CODE_PAR_DB_NOT_SPECIFIED == pCxt->errCode && TK_NK_FLOAT == TOKEN.type) { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z); } -#line 8044 "sql.c" /************ End %syntax_error code ******************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument variable */ ParseCTX_STORE @@ -8127,56 +6979,12 @@ void Parse( } #endif - while(1){ /* Exit by "break" */ - assert( yypParser->yytos>=yypParser->yystack ); + do{ assert( yyact==yypParser->yytos->stateno ); yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact); if( yyact >= YY_MIN_REDUCE ){ - unsigned int yyruleno = yyact - YY_MIN_REDUCE; /* Reduce by this rule */ -#ifndef NDEBUG - assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ); - if( yyTraceFILE ){ - int yysize = yyRuleInfoNRhs[yyruleno]; - if( yysize ){ - fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n", - yyTracePrompt, - yyruleno, yyRuleName[yyruleno], - yyrulenoyytos[yysize].stateno); - }else{ - fprintf(yyTraceFILE, "%sReduce %d [%s]%s.\n", - yyTracePrompt, yyruleno, yyRuleName[yyruleno], - yyrulenoyytos - yypParser->yystack)>yypParser->yyhwm ){ - yypParser->yyhwm++; - assert( yypParser->yyhwm == - (int)(yypParser->yytos - yypParser->yystack)); - } -#endif -#if YYSTACKDEPTH>0 - if( yypParser->yytos>=yypParser->yystackEnd ){ - yyStackOverflow(yypParser); - break; - } -#else - if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ - if( yyGrowStack(yypParser) ){ - yyStackOverflow(yypParser); - break; - } - } -#endif - } - yyact = yy_reduce(yypParser,yyruleno,yymajor,yyminor ParseCTX_PARAM); + yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor, + yyminor ParseCTX_PARAM); }else if( yyact <= YY_MAX_SHIFTREDUCE ){ yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor); #ifndef YYNOERRORRECOVERY @@ -8232,13 +7040,14 @@ void Parse( yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion); yymajor = YYNOCODE; }else{ - while( yypParser->yytos > yypParser->yystack ){ - yyact = yy_find_reduce_action(yypParser->yytos->stateno, - YYERRORSYMBOL); - if( yyact<=YY_MAX_SHIFTREDUCE ) break; + while( yypParser->yytos >= yypParser->yystack + && (yyact = yy_find_reduce_action( + yypParser->yytos->stateno, + YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE + ){ yy_pop_parser_stack(yypParser); } - if( yypParser->yytos <= yypParser->yystack || yymajor==0 ){ + if( yypParser->yytos < yypParser->yystack || yymajor==0 ){ yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); yy_parse_failed(yypParser); #ifndef YYNOERRORRECOVERY @@ -8288,7 +7097,7 @@ void Parse( break; #endif } - } + }while( yypParser->yytos>yypParser->yystack ); #ifndef NDEBUG if( yyTraceFILE ){ yyStackEntry *i; diff --git a/tests/script/tsim/parser/columnValue_bool.sim b/tests/script/tsim/parser/columnValue_bool.sim index db89db4256..97d074a6f9 100644 --- a/tests/script/tsim/parser/columnValue_bool.sim +++ b/tests/script/tsim/parser/columnValue_bool.sim @@ -936,6 +936,9 @@ sql_error alter table st_bool_i1 set tag tagname="123abc" sql alter table st_bool_i2 set tag tagname="123" sql_error alter table st_bool_i3 set tag tagname=abc sql_error alter table st_bool_i4 set tag tagname="abc" +sql_error alter table st_bool_i4 set tag tagname=now +sql_error alter table st_bool_i4 set tag tagname=now()+1d +sql_error alter table st_bool_i4 set tag tagname=1+1d sql_error alter table st_bool_i5 set tag tagname=" " sql_error alter table st_bool_i6 set tag tagname='' diff --git a/tests/script/tsim/parser/columnValue_int.sim b/tests/script/tsim/parser/columnValue_int.sim index f03a576ae3..f022c33363 100644 --- a/tests/script/tsim/parser/columnValue_int.sim +++ b/tests/script/tsim/parser/columnValue_int.sim @@ -913,6 +913,8 @@ sql_error alter table st_int_e19 set tag tagname=123abc sql_error alter table st_int_e20 set tag tagname="123abc" sql_error alter table st_int_e22 set tag tagname=abc sql_error alter table st_int_e23 set tag tagname="abc" +sql_error alter table st_int_e25 set tag tagname=1+1d +sql_error alter table st_int_e25 set tag tagname="1"+1d sql_error alter table st_int_e24 set tag tagname=" " sql_error alter table st_int_e25 set tag tagname='' sql alter table st_int_e26_1 set tag tagname='123' diff --git a/tests/script/tsim/parser/columnValue_timestamp.sim b/tests/script/tsim/parser/columnValue_timestamp.sim index 1f457dbd7c..962dff4a89 100644 --- a/tests/script/tsim/parser/columnValue_timestamp.sim +++ b/tests/script/tsim/parser/columnValue_timestamp.sim @@ -132,6 +132,61 @@ sql show tags from st_timestamp_22 if $data05 != -1 then return -1 endi +sql create table st_timestamp_23 using mt_timestamp tags (1+ 1d ) +sql show tags from st_timestamp_23 +if $data05 != 86400001 then + return -1 +endi +sql create table st_timestamp_24 using mt_timestamp tags (-0 + 1d) +sql show tags from st_timestamp_24 +if $data05 != 86400000 then + return -1 +endi +sql create table st_timestamp_25 using mt_timestamp tags ("-0" -1s) +sql show tags from st_timestamp_25 +if $data05 != -1000 then + return -1 +endi +sql create table st_timestamp_26 using mt_timestamp tags (0b01 -1a) +sql show tags from st_timestamp_26 +if $data05 != 0 then + return -1 +endi +sql create table st_timestamp_27 using mt_timestamp tags (0b01 -1s) +sql show tags from st_timestamp_27 +if $data05 != -999 then + return -1 +endi +sql create table st_timestamp_28 using mt_timestamp tags ("0x01" +1u) +sql show tags from st_timestamp_28 +if $data05 != 1 then + return -1 +endi +sql create table st_timestamp_29 using mt_timestamp tags (0x01 +1b) +sql show tags from st_timestamp_29 +if $data05 != 1 then + return -1 +endi +sql create table st_timestamp_30 using mt_timestamp tags (now +1b) +sql show tags from st_timestamp_30 +if $data05 < 1711883186000 then + return -1 +endi +sql create table st_timestamp_31 using mt_timestamp tags ("now()" +1b) +sql show tags from st_timestamp_31 +if $data05 < 1711883186000 then + return -1 +endi +sql create table st_timestamp_32 using mt_timestamp tags (today() +1d) +sql show tags from st_timestamp_32 +if $data05 < 1711883186000 then + return -1 +endi +sql create table st_timestamp_33 using mt_timestamp tags ("today()" +1d) +sql show tags from st_timestamp_33 +if $data05 < 1711883186000 then + return -1 +endi ## case 01: insert values for test column values sql insert into st_timestamp_0 values(now,NULL) @@ -249,6 +304,61 @@ sql select ts, cast(c as bigint) from st_timestamp_22 if $data01 != -1 then return -1 endi +sql insert into st_timestamp_23 values(now,1+ 1d ) +sql select ts, cast(c as bigint) from st_timestamp_23 +if $data01 != 86400001 then + return -1 +endi +sql insert into st_timestamp_24 values(now,-0 + 1d) +sql select ts, cast(c as bigint) from st_timestamp_24 +if $data01 != 86400000 then + return -1 +endi +sql insert into st_timestamp_25 values(now,"-0" -1s) +sql select ts, cast(c as bigint) from st_timestamp_25 +if $data01 != -1000 then + return -1 +endi +sql insert into st_timestamp_26 values(now,0b01 -1a) +sql select ts, cast(c as bigint) from st_timestamp_26 +if $data01 != 0 then + return -1 +endi +sql insert into st_timestamp_27 values(now,0b01 -1s) +sql select ts, cast(c as bigint) from st_timestamp_27 +if $data01 != -999 then + return -1 +endi +sql insert into st_timestamp_28 values(now,"0x01" +1u) +sql select ts, cast(c as bigint) from st_timestamp_28 +if $data01 != 1 then + return -1 +endi +sql insert into st_timestamp_29 values(now,0x01 +1b) +sql select ts, cast(c as bigint) from st_timestamp_29 +if $data01 != 1 then + return -1 +endi +sql insert into st_timestamp_30 values(now,now +1b) +sql select ts, cast(c as bigint) from st_timestamp_30 +if $data01 < 1711883186000 then + return -1 +endi +sql insert into st_timestamp_31 values(now,"now()" +1b) +sql select ts, cast(c as bigint) from st_timestamp_31 +if $data01 < 1711883186000 then + return -1 +endi +sql insert into st_timestamp_32 values(now,today() +1d) +sql select ts, cast(c as bigint) from st_timestamp_32 +if $data01 < 1711883186000 then + return -1 +endi +sql insert into st_timestamp_33 values(now,"today()" +1d) +sql select ts, cast(c as bigint) from st_timestamp_33 +if $data01 < 1711883186000 then + return -1 +endi ## case 02: dynamic create table for test tag values sql insert into st_timestamp_100 using mt_timestamp tags(NULL) values(now, NULL) @@ -450,6 +560,107 @@ sql select ts, cast(c as bigint) from st_timestamp_1022 if $data01 != -1 then return -1 endi +sql insert into st_timestamp_1023 using mt_timestamp tags(1+1d) values(now,1+ 1d ) +sql show tags from st_timestamp_1023 +if $data05 != 86400001 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1023 +if $data01 != 86400001 then + return -1 +endi +sql insert into st_timestamp_1024 using mt_timestamp tags(-0+1d) values(now,-0 + 1d) +sql show tags from st_timestamp_1024 +if $data05 != 86400000 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1024 +if $data01 != 86400000 then + return -1 +endi +sql insert into st_timestamp_1025 using mt_timestamp tags("-0" -1s) values(now,"-0" -1s) +sql show tags from st_timestamp_1025 +if $data05 != -1000 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1025 +if $data01 != -1000 then + return -1 +endi +sql insert into st_timestamp_1026 using mt_timestamp tags(0b01-1a) values(now,0b01 -1a) +sql show tags from st_timestamp_1026 +if $data05 != 0 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1026 +if $data01 != 0 then + return -1 +endi +sql insert into st_timestamp_1027 using mt_timestamp tags(0b01-1s) values(now,0b01 -1s) +sql show tags from st_timestamp_1027 +if $data05 != -999 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1027 +if $data01 != -999 then + return -1 +endi +sql insert into st_timestamp_1028 using mt_timestamp tags("0x01" + 1u) values(now,"0x01" +1u) +sql show tags from st_timestamp_1028 +if $data05 != 1 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1028 +if $data01 != 1 then + return -1 +endi +sql insert into st_timestamp_1029 using mt_timestamp tags(0x01 +1b) values(now,0x01 +1b) +sql show tags from st_timestamp_1029 +if $data05 != 1 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1029 +if $data01 != 1 then + return -1 +endi +sql insert into st_timestamp_1030 using mt_timestamp tags(now+1b) values(now,now +1b) +sql show tags from st_timestamp_1030 +if $data05 < 1711883186000 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1030 +if $data01 < 1711883186000 then + return -1 +endi +sql insert into st_timestamp_1031 using mt_timestamp tags("now" +1b) values(now,"now()" +1b) +sql show tags from st_timestamp_1031 +if $data05 < 1711883186000 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1031 +if $data01 < 1711883186000 then + return -1 +endi +sql insert into st_timestamp_1032 using mt_timestamp tags(today() + 1d) values(now,today() +1d) +sql show tags from st_timestamp_1032 +if $data05 < 1711883186000 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1032 +if $data01 < 1711883186000 then + return -1 +endi +sql insert into st_timestamp_1033 using mt_timestamp tags("today" +1d) values(now,"today()" +1d) +sql show tags from st_timestamp_1033 +if $data05 < 1711883186000 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1033 +if $data01 < 1711883186000 then + return -1 +endi + + ### case 03: alter tag values sql alter table st_timestamp_0 set tag tagname=NULL @@ -567,12 +778,70 @@ sql show tags from st_timestamp_22 if $data05 != -1 then return -1 endi +sql alter table st_timestamp_23 set tag tagname=1+ 1d +sql show tags from st_timestamp_23 +if $data05 != 86400001 then + return -1 +endi +sql alter table st_timestamp_24 set tag tagname=-0 + 1d +sql show tags from st_timestamp_24 +if $data05 != 86400000 then + return -1 +endi +sql alter table st_timestamp_25 set tag tagname="-0" -1s +sql show tags from st_timestamp_25 +if $data05 != -1000 then + return -1 +endi +sql alter table st_timestamp_26 set tag tagname=0b01 -1a +sql show tags from st_timestamp_26 +if $data05 != 0 then + return -1 +endi +sql alter table st_timestamp_27 set tag tagname=0b01 -1s +sql show tags from st_timestamp_27 +if $data05 != -999 then + return -1 +endi +sql alter table st_timestamp_28 set tag tagname="0x01" +1u +sql show tags from st_timestamp_28 +if $data05 != 1 then + return -1 +endi +sql alter table st_timestamp_29 set tag tagname=0x01 +1b +sql show tags from st_timestamp_29 +if $data05 != 1 then + return -1 +endi +sql alter table st_timestamp_30 set tag tagname=now +1b +sql show tags from st_timestamp_30 +if $data05 < 1711883186000 then + return -1 +endi +sql alter table st_timestamp_31 set tag tagname="now()" +1b +sql show tags from st_timestamp_31 +if $data05 < 1711883186000 then + return -1 +endi +sql alter table st_timestamp_32 set tag tagname=today( ) +1d +sql show tags from st_timestamp_32 +if $data05 < 1711883186000 then + return -1 +endi +sql alter table st_timestamp_33 set tag tagname="today()" +1d +sql show tags from st_timestamp_33 +if $data05 < 1711883186000 then + return -1 +endi ## case 04: illegal input sql_error create table st_timestamp_e0 using mt_timestamp tags (123abc) sql_error create table st_timestamp_e0 using mt_timestamp tags ("123abc") sql_error create table st_timestamp_e0 using mt_timestamp tags (abc) sql_error create table st_timestamp_e0 using mt_timestamp tags ("abc") +sql_error create table st_timestamp_e0 using mt_timestamp tags (now()+1d+1s) +sql_error create table st_timestamp_e0 using mt_timestamp tags (1+1y) +sql_error create table st_timestamp_e0 using mt_timestamp tags (0x01+1b+1a) sql_error create table st_timestamp_e0 using mt_timestamp tags (" ") sql_error create table st_timestamp_e0 using mt_timestamp tags ('') sql_error create table st_timestamp_104 using mt_timestamp tags ("-123.1") @@ -590,5 +859,7 @@ sql_error create table st_timestamp_115 using mt_timestamp tags (922337203685477 sql create table st_timestamp_116 using mt_timestamp tags (-9223372036854775808) sql_error create table st_timestamp_117 using mt_timestamp tags (-9223372036854775809) sql_error insert into st_timestamp_118 using mt_timestamp tags(9223372036854775807) values(9223372036854775807, 9223372036854775807) +sql_error insert into st_timestamp_119 using mt_timestamp tags(1+1s-1s) values(now, now) +sql_error insert into st_timestamp_120 using mt_timestamp tags(1-1s) values(now, now-1s+1d) system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/parser/columnValue_varbinary.sim b/tests/script/tsim/parser/columnValue_varbinary.sim index 1db1054646..eb437f7597 100644 --- a/tests/script/tsim/parser/columnValue_varbinary.sim +++ b/tests/script/tsim/parser/columnValue_varbinary.sim @@ -299,6 +299,8 @@ sql_error create table st_varbinary_1012 using mt_varbinary tags(tRue) sql_error create table st_varbinary_1013 using mt_varbinary tags(FalsE) sql_error create table st_varbinary_1014 using mt_varbinary tags(noW) sql_error create table st_varbinary_1015 using mt_varbinary tags(toDay) +sql_error create table st_varbinary_1016 using mt_varbinary tags(now()+1s) +sql_error create table st_varbinary_1017 using mt_varbinary tags(1+1s) sql_error insert into st_varbinary_106 using mt_varbinary tags(+0123) values(now, NULL); sql_error insert into st_varbinary_107 using mt_varbinary tags(-01.23) values(now, NULL); sql_error insert into st_varbinary_108 using mt_varbinary tags(+0x01) values(now, NULL); @@ -309,6 +311,8 @@ sql_error insert into st_varbinary_1012 using mt_varbinary tags(tRue) values(no sql_error insert into st_varbinary_1013 using mt_varbinary tags(FalsE) values(now, NULL); sql_error insert into st_varbinary_1014 using mt_varbinary tags(noW) values(now, NULL); sql_error insert into st_varbinary_1015 using mt_varbinary tags(toDay) values(now, NULL); +sql_error insert into st_varbinary_1016 using mt_varbinary tags(now()+1s) values(now, NULL); +sql_error insert into st_varbinary_1017 using mt_varbinary tags(1+1s) values(now, NULL); sql_error insert into st_varbinary_106 using mt_varbinary tags(NULL) values(now(), +0123) sql_error insert into st_varbinary_107 using mt_varbinary tags(NULL) values(now(), -01.23) sql_error insert into st_varbinary_108 using mt_varbinary tags(NULL) values(now(), +0x01) @@ -319,5 +323,7 @@ sql_error insert into st_varbinary_1012 using mt_varbinary tags(NULL) values(no sql_error insert into st_varbinary_1013 using mt_varbinary tags(NULL) values(now(), FalsE) sql_error insert into st_varbinary_1014 using mt_varbinary tags(NULL) values(now(), noW) sql_error insert into st_varbinary_1015 using mt_varbinary tags(NULL) values(now(), toDay) +sql_error insert into st_varbinary_1016 using mt_varbinary tags(NULL) values(now(), now()+1s) +sql_error insert into st_varbinary_1017 using mt_varbinary tags(NULL) values(now(), 1+1s) system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/parser/columnValue_varchar.sim b/tests/script/tsim/parser/columnValue_varchar.sim index 5edfe5ed24..b705f3069a 100644 --- a/tests/script/tsim/parser/columnValue_varchar.sim +++ b/tests/script/tsim/parser/columnValue_varchar.sim @@ -410,6 +410,17 @@ endi # case 04: illegal input +sql_error create table st_varchar_100 using mt_varchar tags(now+1d) +sql_error create table st_varchar_101 using mt_varchar tags(toDay+1d) +sql_error create table st_varchar_102 using mt_varchar tags(1+1b) +sql_error create table st_varchar_103 using mt_varchar tags(0x01+1d) +sql_error create table st_varchar_104 using mt_varchar tags(0b01+1s) +sql_error insert into st_varchar_1100 using mt_varchar tags('now') values(now(),now+1d) +sql_error insert into st_varchar_1101 using mt_varchar tags('now') values(now(),toDay+1d) +sql_error insert into st_varchar_1102 using mt_varchar tags('now') values(now(),1+1b) +sql_error insert into st_varchar_1103 using mt_varchar tags('now') values(now(),0x01+1d) +sql_error insert into st_varchar_1104 using mt_varchar tags('now') values(now(),0b01+1s) +sql_error alter table st_varchar_15 set tag tagname=now()+1d system sh/exec.sh -n dnode1 -s stop -x SIGINT From 0fc8872fc11b893d637c868f37f1f97ae5bd6a7c Mon Sep 17 00:00:00 2001 From: kailixu Date: Sun, 31 Mar 2024 21:34:29 +0800 Subject: [PATCH 26/34] test: more test case for timestamp --- .../tsim/parser/columnValue_timestamp.sim | 155 +++++++++++++----- 1 file changed, 115 insertions(+), 40 deletions(-) diff --git a/tests/script/tsim/parser/columnValue_timestamp.sim b/tests/script/tsim/parser/columnValue_timestamp.sim index 962dff4a89..4334230a05 100644 --- a/tests/script/tsim/parser/columnValue_timestamp.sim +++ b/tests/script/tsim/parser/columnValue_timestamp.sim @@ -167,26 +167,42 @@ sql show tags from st_timestamp_29 if $data05 != 1 then return -1 endi -sql create table st_timestamp_30 using mt_timestamp tags (now +1b) +sql create table st_timestamp_30 using mt_timestamp tags (-0b00 -0a) sql show tags from st_timestamp_30 -if $data05 < 1711883186000 then +if $data05 != 0 then return -1 endi -sql create table st_timestamp_31 using mt_timestamp tags ("now()" +1b) +sql create table st_timestamp_31 using mt_timestamp tags ("-0x00" +1u) sql show tags from st_timestamp_31 -if $data05 < 1711883186000 then +if $data05 != 0 then return -1 endi -sql create table st_timestamp_32 using mt_timestamp tags (today() +1d) +sql create table st_timestamp_32 using mt_timestamp tags (-0x00 +1b) sql show tags from st_timestamp_32 -if $data05 < 1711883186000 then +if $data05 != 0 then return -1 endi -sql create table st_timestamp_33 using mt_timestamp tags ("today()" +1d) +sql create table st_timestamp_33 using mt_timestamp tags (now +1b) sql show tags from st_timestamp_33 if $data05 < 1711883186000 then return -1 endi +sql create table st_timestamp_34 using mt_timestamp tags ("now()" +1b) +sql show tags from st_timestamp_34 +if $data05 < 1711883186000 then + return -1 +endi +sql create table st_timestamp_35 using mt_timestamp tags (today() +1d) +sql show tags from st_timestamp_35 +if $data05 < 1711883186000 then + return -1 +endi +sql create table st_timestamp_36 using mt_timestamp tags ("today()" +1d) +sql show tags from st_timestamp_36 +if $data05 < 1711883186000 then + return -1 +endi + ## case 01: insert values for test column values sql insert into st_timestamp_0 values(now,NULL) @@ -324,12 +340,12 @@ sql select ts, cast(c as bigint) from st_timestamp_26 if $data01 != 0 then return -1 endi -sql insert into st_timestamp_27 values(now,0b01 -1s) +sql insert into st_timestamp_27 values(now,+0b01 -1s) sql select ts, cast(c as bigint) from st_timestamp_27 if $data01 != -999 then return -1 endi -sql insert into st_timestamp_28 values(now,"0x01" +1u) +sql insert into st_timestamp_28 values(now,"+0x01" +1u) sql select ts, cast(c as bigint) from st_timestamp_28 if $data01 != 1 then return -1 @@ -339,26 +355,41 @@ sql select ts, cast(c as bigint) from st_timestamp_29 if $data01 != 1 then return -1 endi -sql insert into st_timestamp_30 values(now,now +1b) -sql select ts, cast(c as bigint) from st_timestamp_30 -if $data01 < 1711883186000 then +sql insert into st_timestamp_30 values(now,-0b00 -0a) +sql show tags from st_timestamp_30 +if $data05 != 0 then return -1 endi -sql insert into st_timestamp_31 values(now,"now()" +1b) -sql select ts, cast(c as bigint) from st_timestamp_31 -if $data01 < 1711883186000 then +sql insert into st_timestamp_31 values(now,"-0x00" +1u) +sql show tags from st_timestamp_31 +if $data05 != 0 then return -1 endi -sql insert into st_timestamp_32 values(now,today() +1d) -sql select ts, cast(c as bigint) from st_timestamp_32 -if $data01 < 1711883186000 then +sql insert into st_timestamp_32 values (now,-0x00 +1b) +sql show tags from st_timestamp_32 +if $data05 != 0 then return -1 endi -sql insert into st_timestamp_33 values(now,"today()" +1d) +sql insert into st_timestamp_33 values(now,now +1b) sql select ts, cast(c as bigint) from st_timestamp_33 if $data01 < 1711883186000 then return -1 endi +sql insert into st_timestamp_34 values(now,"now()" +1b) +sql select ts, cast(c as bigint) from st_timestamp_34 +if $data01 < 1711883186000 then + return -1 +endi +sql insert into st_timestamp_35 values(now,today() +1d) +sql select ts, cast(c as bigint) from st_timestamp_35 +if $data01 < 1711883186000 then + return -1 +endi +sql insert into st_timestamp_36 values(now,"today()" +1d) +sql select ts, cast(c as bigint) from st_timestamp_36 +if $data01 < 1711883186000 then + return -1 +endi ## case 02: dynamic create table for test tag values sql insert into st_timestamp_100 using mt_timestamp tags(NULL) values(now, NULL) @@ -560,7 +591,7 @@ sql select ts, cast(c as bigint) from st_timestamp_1022 if $data01 != -1 then return -1 endi -sql insert into st_timestamp_1023 using mt_timestamp tags(1+1d) values(now,1+ 1d ) +sql insert into st_timestamp_1023 using mt_timestamp tags(+1+1d) values(now,+1+ 1d ) sql show tags from st_timestamp_1023 if $data05 != 86400001 then return -1 @@ -587,7 +618,7 @@ sql select ts, cast(c as bigint) from st_timestamp_1025 if $data01 != -1000 then return -1 endi -sql insert into st_timestamp_1026 using mt_timestamp tags(0b01-1a) values(now,0b01 -1a) +sql insert into st_timestamp_1026 using mt_timestamp tags(+0b01-1a) values(now,+0b01 -1a) sql show tags from st_timestamp_1026 if $data05 != 0 then return -1 @@ -614,7 +645,7 @@ sql select ts, cast(c as bigint) from st_timestamp_1028 if $data01 != 1 then return -1 endi -sql insert into st_timestamp_1029 using mt_timestamp tags(0x01 +1b) values(now,0x01 +1b) +sql insert into st_timestamp_1029 using mt_timestamp tags(+0x01 +1b) values(now,+0x01 +1b) sql show tags from st_timestamp_1029 if $data05 != 1 then return -1 @@ -623,34 +654,34 @@ sql select ts, cast(c as bigint) from st_timestamp_1029 if $data01 != 1 then return -1 endi -sql insert into st_timestamp_1030 using mt_timestamp tags(now+1b) values(now,now +1b) +sql insert into st_timestamp_1030 using mt_timestamp tags (-0b00 -0a) values(now,-0b00 -0a) sql show tags from st_timestamp_1030 -if $data05 < 1711883186000 then +if $data05 != 0 then return -1 endi sql select ts, cast(c as bigint) from st_timestamp_1030 -if $data01 < 1711883186000 then +if $data01 != 0 then return -1 endi -sql insert into st_timestamp_1031 using mt_timestamp tags("now" +1b) values(now,"now()" +1b) +sql insert into st_timestamp_1031 using mt_timestamp tags ("-0x00" +1u) values(now,"-0x00" +1u) sql show tags from st_timestamp_1031 -if $data05 < 1711883186000 then +if $data05 != 0 then return -1 endi sql select ts, cast(c as bigint) from st_timestamp_1031 -if $data01 < 1711883186000 then +if $data01 != 0 then return -1 endi -sql insert into st_timestamp_1032 using mt_timestamp tags(today() + 1d) values(now,today() +1d) +sql insert into st_timestamp_1032 using mt_timestamp tags (-0x00 +1b) values(now,-0x00 +1b) sql show tags from st_timestamp_1032 -if $data05 < 1711883186000 then +if $data05 != 0 then return -1 endi sql select ts, cast(c as bigint) from st_timestamp_1032 -if $data01 < 1711883186000 then +if $data01 != 0 then return -1 endi -sql insert into st_timestamp_1033 using mt_timestamp tags("today" +1d) values(now,"today()" +1d) +sql insert into st_timestamp_1033 using mt_timestamp tags(now+1b) values(now,now +1b) sql show tags from st_timestamp_1033 if $data05 < 1711883186000 then return -1 @@ -659,6 +690,35 @@ sql select ts, cast(c as bigint) from st_timestamp_1033 if $data01 < 1711883186000 then return -1 endi +sql insert into st_timestamp_1034 using mt_timestamp tags("now" +1b) values(now,"now()" +1b) +sql show tags from st_timestamp_1034 +if $data05 < 1711883186000 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1034 +if $data01 < 1711883186000 then + return -1 +endi +sql insert into st_timestamp_1035 using mt_timestamp tags(today() + 1d) values(now,today() +1d) +sql show tags from st_timestamp_1035 +if $data05 < 1711883186000 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1035 +if $data01 < 1711883186000 then + return -1 +endi +sql insert into st_timestamp_1036 using mt_timestamp tags("today" +1d) values(now,"today()" +1d) +sql show tags from st_timestamp_1036 +if $data05 < 1711883186000 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1036 +if $data01 < 1711883186000 then + return -1 +endi + + @@ -793,7 +853,7 @@ sql show tags from st_timestamp_25 if $data05 != -1000 then return -1 endi -sql alter table st_timestamp_26 set tag tagname=0b01 -1a +sql alter table st_timestamp_26 set tag tagname=+0b01 -1a sql show tags from st_timestamp_26 if $data05 != 0 then return -1 @@ -813,23 +873,38 @@ sql show tags from st_timestamp_29 if $data05 != 1 then return -1 endi -sql alter table st_timestamp_30 set tag tagname=now +1b +sql alter table st_timestamp_30 set tag tagname==-0b00 -0a sql show tags from st_timestamp_30 -if $data05 < 1711883186000 then +if $data05 != 0 then return -1 endi -sql alter table st_timestamp_31 set tag tagname="now()" +1b +sql alter table st_timestamp_31 set tag tagname="-0x00" +1u sql show tags from st_timestamp_31 -if $data05 < 1711883186000 then +if $data05 != 0 then return -1 endi -sql alter table st_timestamp_32 set tag tagname=today( ) +1d +sql alter table st_timestamp_32 set tag tagname=-0x00 +1b sql show tags from st_timestamp_32 +if $data05 != 0 then + return -1 +endi +sql alter table st_timestamp_33 set tag tagname=now +1b +sql show tags from st_timestamp_33 if $data05 < 1711883186000 then return -1 endi -sql alter table st_timestamp_33 set tag tagname="today()" +1d -sql show tags from st_timestamp_33 +sql alter table st_timestamp_34 set tag tagname="now()" +1b +sql show tags from st_timestamp_34 +if $data05 < 1711883186000 then + return -1 +endi +sql alter table st_timestamp_35 set tag tagname=today( ) +1d +sql show tags from st_timestamp_35 +if $data05 < 1711883186000 then + return -1 +endi +sql alter table st_timestamp_36 set tag tagname="today()" +1d +sql show tags from st_timestamp_36 if $data05 < 1711883186000 then return -1 endi From 503c93585d00eb9935ef1b0c60d14084537d08e6 Mon Sep 17 00:00:00 2001 From: Adam Ji Date: Mon, 1 Apr 2024 14:44:27 +0800 Subject: [PATCH 27/34] enh: update taosws feature to rustls --- tools/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index a1c5405253..518e97a219 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -57,7 +57,7 @@ IF (TD_WEBSOCKET) COMMAND git clean -f -d BUILD_COMMAND COMMAND cargo update - COMMAND cargo build --release -p taos-ws-sys --features native-tls-vendored + COMMAND cargo build --release -p taos-ws-sys --features rustls INSTALL_COMMAND COMMAND cp target/release/${websocket_lib_file} ${CMAKE_BINARY_DIR}/build/lib COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/build/include From 9bedb4922aec3af2fd5f28959a85dd1de882038a Mon Sep 17 00:00:00 2001 From: danielclow <106956386+danielclow@users.noreply.github.com> Date: Mon, 1 Apr 2024 15:46:25 +0800 Subject: [PATCH 28/34] docs: adjust titles for seo compliance for 3.0 branch --- docs/en/12-taos-sql/05-insert.md | 2 +- docs/en/12-taos-sql/13-tmq.md | 2 +- docs/en/12-taos-sql/14-stream.md | 2 +- docs/en/12-taos-sql/26-udf.md | 2 +- docs/en/14-reference/07-tdinsight/index.md | 2 +- docs/en/25-application/01-telegraf.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/en/12-taos-sql/05-insert.md b/docs/en/12-taos-sql/05-insert.md index 462e7fc0ae..32227a2214 100644 --- a/docs/en/12-taos-sql/05-insert.md +++ b/docs/en/12-taos-sql/05-insert.md @@ -1,7 +1,7 @@ --- title: Insert sidebar_label: Insert -description: This document describes how to insert data into TDengine. +description: This document describes the SQL commands and syntax for inserting data into TDengine. --- ## Syntax diff --git a/docs/en/12-taos-sql/13-tmq.md b/docs/en/12-taos-sql/13-tmq.md index d14b6da2d3..16dc9efd62 100644 --- a/docs/en/12-taos-sql/13-tmq.md +++ b/docs/en/12-taos-sql/13-tmq.md @@ -1,5 +1,5 @@ --- -title: Data Subscription +title: Data Subscription SQL Reference sidebar_label: Data Subscription description: This document describes the SQL statements related to the data subscription component of TDengine. --- diff --git a/docs/en/12-taos-sql/14-stream.md b/docs/en/12-taos-sql/14-stream.md index e1bf18c854..c41839390f 100644 --- a/docs/en/12-taos-sql/14-stream.md +++ b/docs/en/12-taos-sql/14-stream.md @@ -1,5 +1,5 @@ --- -title: Stream Processing +title: Stream Processing SQL Reference sidebar_label: Stream Processing description: This document describes the SQL statements related to the stream processing component of TDengine. --- diff --git a/docs/en/12-taos-sql/26-udf.md b/docs/en/12-taos-sql/26-udf.md index f86b535927..dec9ca217d 100644 --- a/docs/en/12-taos-sql/26-udf.md +++ b/docs/en/12-taos-sql/26-udf.md @@ -1,5 +1,5 @@ --- -title: User-Defined Functions (UDF) +title: User-Defined Functions (UDF) SQL Reference sidebar_label: User-Defined Functions description: This document describes the SQL statements related to user-defined functions (UDF) in TDengine. --- diff --git a/docs/en/14-reference/07-tdinsight/index.md b/docs/en/14-reference/07-tdinsight/index.md index cada05d738..1bc983262e 100644 --- a/docs/en/14-reference/07-tdinsight/index.md +++ b/docs/en/14-reference/07-tdinsight/index.md @@ -1,5 +1,5 @@ --- -title: TDinsight - Grafana-based Zero-Dependency Monitoring Solution for TDengine +title: TDinsight sidebar_label: TDinsight description: This document describes TDinsight, a monitoring solution for TDengine. --- diff --git a/docs/en/25-application/01-telegraf.md b/docs/en/25-application/01-telegraf.md index a6db826fa3..f8784e9ab9 100644 --- a/docs/en/25-application/01-telegraf.md +++ b/docs/en/25-application/01-telegraf.md @@ -1,5 +1,5 @@ --- -title: Quickly Build IT DevOps Visualization System with TDengine + Telegraf + Grafana +title: IT Visualization with TDengine + Telegraf + Grafana sidebar_label: TDengine + Telegraf + Grafana description: This document describes how to create an IT visualization system by integrating TDengine with Telegraf and Grafana. --- From 529eadb921de275e2622129f2fc817b5fb2b6228 Mon Sep 17 00:00:00 2001 From: Adam Ji Date: Mon, 1 Apr 2024 16:15:26 +0800 Subject: [PATCH 29/34] enh: update taosws feature to rustls --- tools/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 518e97a219..188abb4b58 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -18,7 +18,7 @@ IF (TD_WEBSOCKET) COMMAND git clean -f -d BUILD_COMMAND COMMAND cargo update - COMMAND RUSTFLAGS=-Ctarget-feature=-crt-static cargo build --release -p taos-ws-sys --features native-tls + COMMAND RUSTFLAGS=-Ctarget-feature=-crt-static cargo build --release -p taos-ws-sys --features rustls INSTALL_COMMAND COMMAND cp target/release/${websocket_lib_file} ${CMAKE_BINARY_DIR}/build/lib COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/build/include @@ -37,7 +37,7 @@ IF (TD_WEBSOCKET) COMMAND git clean -f -d BUILD_COMMAND COMMAND cargo update - COMMAND cargo build --release -p taos-ws-sys --features native-tls-vendored + COMMAND cargo build --release -p taos-ws-sys --features rustls INSTALL_COMMAND COMMAND cp target/release/taosws.dll ${CMAKE_BINARY_DIR}/build/lib COMMAND cp target/release/taosws.dll.lib ${CMAKE_BINARY_DIR}/build/lib/taosws.lib From 9ca84091dfd6b8bbfa6fbf59f4b053f98a3570ab Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Mon, 1 Apr 2024 16:31:10 +0800 Subject: [PATCH 30/34] fix(stream): reset the ready upstream counter after task-reset. --- source/libs/stream/src/streamCheckpoint.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/libs/stream/src/streamCheckpoint.c b/source/libs/stream/src/streamCheckpoint.c index f58c72eded..7f52c5d2f0 100644 --- a/source/libs/stream/src/streamCheckpoint.c +++ b/source/libs/stream/src/streamCheckpoint.c @@ -278,6 +278,7 @@ void streamTaskClearCheckInfo(SStreamTask* pTask, bool clearChkpReadyMsg) { pTask->chkInfo.numOfNotReady = 0; pTask->chkInfo.transId = 0; pTask->chkInfo.dispatchCheckpointTrigger = false; + pTask->chkInfo.downstreamAlignNum = 0; streamTaskOpenAllUpstreamInput(pTask); // open inputQ for all upstream tasks if (clearChkpReadyMsg) { From 1c56c5ab83a78ccec3042ecc5f80e0fd304fe2b1 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Mon, 1 Apr 2024 19:16:54 +0800 Subject: [PATCH 31/34] fix:delete the file that testing JSON compression rate --- tests/system-test/buildJson.py | 243 --------------------------------- 1 file changed, 243 deletions(-) delete mode 100644 tests/system-test/buildJson.py diff --git a/tests/system-test/buildJson.py b/tests/system-test/buildJson.py deleted file mode 100644 index 6e9e9f83e1..0000000000 --- a/tests/system-test/buildJson.py +++ /dev/null @@ -1,243 +0,0 @@ -# 写一段python代码,生成一个JSON串,json 串为数组,数组长度为10000,每个元素为包含4000个key-value对的JSON字符串,json 数组里每个元素里的4000个key不相同,元素之间使用相同的key,key值为英文单词,value 为int值,且value 的范围是[0, 256]。把json串紧凑形式写入文件,把json串存入parquet文件中,把json串写入avro文件中,把json串写入到postgre sql表中,表有两列第一列主int类型主键,第二列为json类型,数组的每个元素写入json类型里 -import csv -import json -import os -import random -import string -import time - -from faker import Faker -import pandas as pd -import pyarrow as pa -import pyarrow.parquet as pq -import fastavro -import psycopg2 -from psycopg2.extras import Json - - -def get_dir_size(start_path='.'): - total = 0 - for dirpath, dirs, files in os.walk(start_path): - for f in files: - fp = os.path.join(dirpath, f) - # 获取文件大小并累加到total上 - total += os.path.getsize(fp) - return total - - -def to_avro_record(obj): - return {key: value for key, value in obj.items()} - - -def generate_random_string(length): - return ''.join(random.choices(string.ascii_letters + string.digits, k=length)) - - -def generate_random_values(t): - if t == 0: - return random.randint(-255, 256) - elif t == 1: - return random.randint(-2100000000, 2100000000) - elif t == 2: - return random.uniform(-10000.0, 10000.0) - elif t == 3: - return generate_random_string(10) - elif t == 4: - return random.choice([True, False]) - - -def generate_json_object(key_set, value_set): - values = [generate_random_values(t) for t in value_set] - return dict(zip(key_set, values)) - - -def generate_json_array(keys, values, array_length): - return [generate_json_object(keys, values) for _ in range(array_length)] - - -def write_parquet_file(parquet_file, json_array): - df = pd.DataFrame(json_array) - table = pa.Table.from_pandas(df) - pq.write_table(table, parquet_file + ".parquet") - - -def write_json_file(json_file, json_array): - with open(json_file + ".json", 'w') as f: - json.dump(json_array, f, separators=(',', ':')) - - -def generate_avro_schema(k, t): - if t == 0: - return {"name": k, "type": "int", "logicalType": "int"} - elif t == 1: - return {"name": k, "type": "int", "logicalType": "int"} - elif t == 2: - return {"name": k, "type": "float"} - elif t == 3: - return {"name": k, "type": "string"} - elif t == 4: - return {"name": k, "type": "boolean"} - - -def write_avro_file(avro_file, json_array, keys, values): - k = list(json_array[0].keys()) - - if keys != k: - raise ValueError("keys and values should have the same length") - - avro_schema = { - "type": "record", - "name": "MyRecord", - "fields": [generate_avro_schema(k, v) for k, v in dict(zip(keys, values)).items()] - } - - avro_records = [to_avro_record(obj) for obj in json_array] - with open(avro_file + ".avro", 'wb') as f: - fastavro.writer(f, avro_schema, avro_records) - - -def write_pg_file(json_array): - conn_str = "dbname=mydatabase user=myuser host=localhost" - conn = psycopg2.connect(conn_str) - cur = conn.cursor() - - cur.execute("drop table if exists my_table") - conn.commit() - - # 创建表(如果不存在) - cur.execute(""" - CREATE TABLE IF NOT EXISTS my_table ( - id SERIAL PRIMARY KEY, - json_data JSONB - ); - """) - conn.commit() - - # 执行SQL查询 - cur.execute("SELECT count(*) FROM my_table") - # 获取查询结果 - rows = cur.fetchall() - # 打印查询结果 - for row in rows: - print("rows before:", row[0]) - - # 插入数据 - for idx, json_obj in enumerate(json_array): - # print(json.dumps(json_obj)) - cur.execute("INSERT INTO my_table (json_data) VALUES (%s)", (json.dumps(json_obj),)) - - conn.commit() # 提交事务 - - # 执行SQL查询 - cur.execute("SELECT count(*) FROM my_table") - # 获取查询结果 - rows = cur.fetchall() - # 打印查询结果 - for row in rows: - print("rows after:", row[0]) - - # # 执行SQL查询 - # cur.execute("SELECT pg_relation_size('my_table')") - # # 获取查询结果 - # rows = cur.fetchall() - # # 打印查询结果 - # size = 0 - # for row in rows: - # size = row[0] - # print("table size:", row[0]) - - # 关闭游标和连接 - cur.close() - conn.close() - -def read_parquet_file(parquet_file): - table = pq.read_table(parquet_file + ".parquet") - df = table.to_pandas() - print(df) - - -def read_avro_file(avg_file): - with open(avg_file + ".avro", 'rb') as f: - reader = fastavro.reader(f) - - for record in reader: - print(record) - - -def read_json_file(csv_file): - with open(csv_file + ".json", 'r') as f: - data = json.load(f) - print(data) - - -def main(): - key_length = 7 - key_sizes = 4000 - row_sizes = 10000 - file_name = "output" - - # cases = [(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (0, 4)] - cases = [(2, 2), (3, 3), (0, 4)] - - for data in cases: - begin, end = data - print(f"执行类型:{begin}-{end}") - - N = 2 - for _ in range(N): - - t0 = time.time() - - keys = [generate_random_string(key_length) for _ in range(key_sizes)] - values = [random.randint(begin, end) for _ in range(key_sizes)] - # 生成JSON数组 - json_array = generate_json_array(keys, values, row_sizes) - - t1 = time.time() - - write_json_file(file_name, json_array) - - t2 = time.time() - - write_parquet_file(file_name, json_array) - - t3 = time.time() - - write_avro_file(file_name, json_array, keys, values) - - t4 = time.time() - - size = write_pg_file(json_array) - - t5 = time.time() - - print("生成json 速度:", t2 - t0, "文件大小:", os.path.getsize(file_name + ".json")) - print("parquet 速度:", t3 - t2, "文件大小:", os.path.getsize(file_name + ".parquet")) - print("avro 速度:", t4 - t3, "文件大小:", os.path.getsize(file_name + ".avro")) - print("pg json 速度:", t5 - t4, "文件大小:", get_dir_size("/opt/homebrew/var/postgresql@14/base/16385") - 8 * 1024 * 1024) - - # read_json_file(file_name) - # read_parquet_file(file_name) - # read_avro_file(file_name) - print(f"\n---------------\n") - -if __name__ == "__main__": - main() - -# 压缩文件 -# import os -# -# import lz4.frame -# -# -# files =["output.json", "output.parquet", "output.avro"] -# def compress_file(input_path, output_path): -# with open(input_path, 'rb') as f_in: -# compressed_data = lz4.frame.compress(f_in.read()) -# -# with open(output_path, 'wb') as f_out: -# f_out.write(compressed_data) -# -# for file in files: -# compress_file(file, file + ".lz4") -# print(file, "origin size:", os.path.getsize(file), " after lsz size:", os.path.getsize(file + ".lz4")) From 174b0a104e5cab39e3eaa953dc579c9f39cdef54 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Mon, 1 Apr 2024 19:59:30 +0800 Subject: [PATCH 32/34] fix:case error --- source/dnode/mnode/impl/src/mndConsumer.c | 8 ++++---- tests/system-test/8-stream/stream_basic.py | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 52671f6b66..ed9333f480 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -292,16 +292,16 @@ static void storeOffsetRows(SMnode *pMnode, SMqHbReq *req, SMqConsumerObj *pCons static int32_t buildMqHbRsp(SRpcMsg *pMsg, SMqHbRsp *rsp){ int32_t tlen = tSerializeSMqHbRsp(NULL, 0, rsp); if (tlen <= 0){ - return TSDB_CODE_OUT_OF_MEMORY; + return TSDB_CODE_TMQ_INVALID_MSG; } void *buf = rpcMallocCont(tlen); if (buf == NULL) { return TSDB_CODE_OUT_OF_MEMORY; } - if(tSerializeSMqHbRsp(buf, tlen, rsp) != 0){ + if(tSerializeSMqHbRsp(buf, tlen, rsp) <= 0){ rpcFreeCont(buf); - return TSDB_CODE_OUT_OF_MEMORY; + return TSDB_CODE_TMQ_INVALID_MSG; } pMsg->info.rsp = buf; pMsg->info.rspLen = tlen; @@ -316,7 +316,7 @@ static int32_t mndProcessMqHbReq(SRpcMsg *pMsg) { SMqConsumerObj *pConsumer = NULL; if (tDeserializeSMqHbReq(pMsg->pCont, pMsg->contLen, &req) < 0) { - code = TSDB_CODE_OUT_OF_MEMORY; + code = TSDB_CODE_TMQ_INVALID_MSG; goto end; } diff --git a/tests/system-test/8-stream/stream_basic.py b/tests/system-test/8-stream/stream_basic.py index 5167423ea3..ff16bee787 100644 --- a/tests/system-test/8-stream/stream_basic.py +++ b/tests/system-test/8-stream/stream_basic.py @@ -96,9 +96,28 @@ class TDTestCase: time.sleep(2) tdSql.query("select * from sta") tdSql.checkRows(3) + tdSql.query("select tbname from sta order by tbname") + if not tdSql.getData(0, 0).startswith('new-t1_1.d1.sta_'): + tdLog.exit("error1") + + if not tdSql.getData(1, 0).startswith('new-t2_1.d1.sta_'): + tdLog.exit("error2") + + if not tdSql.getData(2, 0).startswith('new-t3_1.d1.sta_'): + tdLog.exit("error3") tdSql.query("select * from stb") tdSql.checkRows(3) + tdSql.query("select tbname from stb order by tbname") + if not tdSql.getData(0, 0).startswith('new-t1_1.d1.stb_'): + tdLog.exit("error4") + + if not tdSql.getData(1, 0).startswith('new-t2_1.d1.stb_'): + tdLog.exit("error5") + + if not tdSql.getData(2, 0).startswith('new-t3_1.d1.stb_'): + tdLog.exit("error6") + # run def run(self): self.case1() From c28ee644776b94f54baafc0d0d82b4a188df1461 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Mon, 1 Apr 2024 21:11:35 +0800 Subject: [PATCH 33/34] fix: meta snapshot drop table error --- source/dnode/vnode/src/meta/metaSnapshot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/meta/metaSnapshot.c b/source/dnode/vnode/src/meta/metaSnapshot.c index e86ed3b657..5850e794fa 100644 --- a/source/dnode/vnode/src/meta/metaSnapshot.c +++ b/source/dnode/vnode/src/meta/metaSnapshot.c @@ -79,6 +79,7 @@ int32_t metaSnapRead(SMetaSnapReader* pReader, uint8_t** ppData) { int32_t nKey = 0; int32_t nData = 0; STbDbKey key; + SMetaInfo info; *ppData = NULL; for (;;) { @@ -91,7 +92,8 @@ int32_t metaSnapRead(SMetaSnapReader* pReader, uint8_t** ppData) { goto _exit; } - if (key.version < pReader->sver) { + if (key.version < pReader->sver // + || metaGetInfo(pReader->pMeta, key.uid, &info, NULL) == TSDB_CODE_NOT_FOUND) { tdbTbcMoveToNext(pReader->pTbc); continue; } From 9125a28061d90e51e7a4fc180909a853af3bcbca Mon Sep 17 00:00:00 2001 From: Adam Ji Date: Tue, 2 Apr 2024 09:13:55 +0800 Subject: [PATCH 34/34] docs: merge example code to 3.0 --- .../rust/nativeexample/examples/query.rs | 66 +++++++ .../rust/nativeexample/examples/schemaless.rs | 80 +++++++++ .../rust/nativeexample/examples/stmt.rs | 37 ++++ .../rust/nativeexample/examples/tmq.rs | 166 ++++++++++++++++++ 4 files changed, 349 insertions(+) create mode 100644 docs/examples/rust/nativeexample/examples/query.rs create mode 100644 docs/examples/rust/nativeexample/examples/schemaless.rs create mode 100644 docs/examples/rust/nativeexample/examples/stmt.rs create mode 100644 docs/examples/rust/nativeexample/examples/tmq.rs diff --git a/docs/examples/rust/nativeexample/examples/query.rs b/docs/examples/rust/nativeexample/examples/query.rs new file mode 100644 index 0000000000..dfe55e8749 --- /dev/null +++ b/docs/examples/rust/nativeexample/examples/query.rs @@ -0,0 +1,66 @@ +use taos::*; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let dsn = "taos://localhost:6030"; + let builder = TaosBuilder::from_dsn(dsn)?; + + let taos = builder.build()?; + + // ANCHOR: create_db_and_table + let db = "power"; + // create database + taos.exec_many([ + format!("DROP DATABASE IF EXISTS `{db}`"), + format!("CREATE DATABASE `{db}`"), + format!("USE `{db}`"), + ]) + .await?; + + // create table + taos.exec_many([ + // create super table + "CREATE TABLE `meters` (`ts` TIMESTAMP, `current` FLOAT, `voltage` INT, `phase` FLOAT) \ + TAGS (`groupid` INT, `location` BINARY(24))", + ]).await?; + // ANCHOR_END: create_db_and_table + + // ANCHOR: insert_data + let inserted = taos.exec("INSERT INTO " + + "power.d1001 USING power.meters TAGS(2,'California.SanFrancisco') " + + "VALUES " + + "(NOW + 1a, 10.30000, 219, 0.31000) " + + "(NOW + 2a, 12.60000, 218, 0.33000) " + + "(NOW + 3a, 12.30000, 221, 0.31000) " + + "power.d1002 USING power.meters TAGS(3, 'California.SanFrancisco') " + + "VALUES " + + "(NOW + 1a, 10.30000, 218, 0.25000) ").await?; + + println!("inserted: {} rows", inserted); + // ANCHOR_END: insert_data + + // ANCHOR: query_data + let mut result = taos.query("SELECT * FROM power.meters").await?; + + for field in result.fields() { + println!("got field: {}", field.name()); + } + + let mut rows = result.rows(); + let mut nrows = 0; + while let Some(row) = rows.try_next().await? { + for (col, (name, value)) in row.enumerate() { + println!( + "[{}] got value in col {} (named `{:>8}`): {}", + nrows, col, name, value + ); + } + nrows += 1; + } + // ANCHOR_END: query_data + + // ANCHOR: query_with_req_id + let result = taos.query_with_req_id("SELECT * FROM power.meters", 0).await?; + // ANCHOR_END: query_with_req_id + +} diff --git a/docs/examples/rust/nativeexample/examples/schemaless.rs b/docs/examples/rust/nativeexample/examples/schemaless.rs new file mode 100644 index 0000000000..44ce0fe694 --- /dev/null +++ b/docs/examples/rust/nativeexample/examples/schemaless.rs @@ -0,0 +1,80 @@ +use taos_query::common::SchemalessPrecision; +use taos_query::common::SchemalessProtocol; +use taos_query::common::SmlDataBuilder; + +use crate::AsyncQueryable; +use crate::AsyncTBuilder; +use crate::TaosBuilder; + +async fn put() -> anyhow::Result<()> { + std::env::set_var("RUST_LOG", "taos=debug"); + pretty_env_logger::init(); + let dsn = + std::env::var("TDENGINE_ClOUD_DSN").unwrap_or("http://localhost:6041".to_string()); + log::debug!("dsn: {:?}", &dsn); + + let client = TaosBuilder::from_dsn(dsn)?.build().await?; + + let db = "power"; + + client.exec(format!("drop database if exists {db}")).await?; + + client + .exec(format!("create database if not exists {db}")) + .await?; + + // should specify database before insert + client.exec(format!("use {db}")).await?; + + // SchemalessProtocol::Line + let data = [ + "meters,groupid=2,location=California.SanFrancisco current=10.3000002f64,voltage=219i32,phase=0.31f64 1626006833639000000", + ] + .map(String::from) + .to_vec(); + + let sml_data = SmlDataBuilder::default() + .protocol(SchemalessProtocol::Line) + .precision(SchemalessPrecision::Millisecond) + .data(data.clone()) + .ttl(1000) + .req_id(100u64) + .build()?; + assert_eq!(client.put(&sml_data).await?, ()); + + // SchemalessProtocol::Telnet + let data = [ + "meters.current 1648432611249 10.3 location=California.SanFrancisco group=2", + ] + .map(String::from) + .to_vec(); + + let sml_data = SmlDataBuilder::default() + .protocol(SchemalessProtocol::Telnet) + .precision(SchemalessPrecision::Millisecond) + .data(data.clone()) + .ttl(1000) + .req_id(200u64) + .build()?; + assert_eq!(client.put(&sml_data).await?, ()); + + // SchemalessProtocol::Json + let data = [ + r#"[{"metric": "meters.current", "timestamp": 1681345954000, "value": 10.3, "tags": {"location": "California.SanFrancisco", "groupid": 2}}, {"metric": "meters.voltage", "timestamp": 1648432611249, "value": 219, "tags": {"location": "California.LosAngeles", "groupid": 1}}, {"metric": "meters.current", "timestamp": 1648432611250, "value": 12.6, "tags": {"location": "California.SanFrancisco", "groupid": 2}}, {"metric": "meters.voltage", "timestamp": 1648432611250, "value": 221, "tags": {"location": "California.LosAngeles", "groupid": 1}}]"# + ] + .map(String::from) + .to_vec(); + + let sml_data = SmlDataBuilder::default() + .protocol(SchemalessProtocol::Json) + .precision(SchemalessPrecision::Millisecond) + .data(data.clone()) + .ttl(1000) + .req_id(300u64) + .build()?; + assert_eq!(client.put(&sml_data).await?, ()); + + client.exec(format!("drop database if exists {db}")).await?; + + Ok(()) +} diff --git a/docs/examples/rust/nativeexample/examples/stmt.rs b/docs/examples/rust/nativeexample/examples/stmt.rs new file mode 100644 index 0000000000..0194eccdf1 --- /dev/null +++ b/docs/examples/rust/nativeexample/examples/stmt.rs @@ -0,0 +1,37 @@ +use taos::*; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let taos = TaosBuilder::from_dsn("taos://")?.build().await?; + + taos.exec("DROP DATABASE IF EXISTS power").await?; + taos.create_database("power").await?; + taos.use_database("power").await?; + taos.exec("CREATE STABLE IF NOT EXISTS meters (ts TIMESTAMP, current FLOAT, voltage INT, phase FLOAT) TAGS (location BINARY(64), groupId INT)").await?; + + let mut stmt = Stmt::init(&taos).await?; + stmt.prepare("INSERT INTO ? USING meters TAGS(?, ?) VALUES(?, ?, ?, ?)").await?; + + const NUM_TABLES: usize = 10; + const NUM_ROWS: usize = 10; + for i in 0..NUM_TABLES { + let table_name = format!("d{}", i); + let tags = vec![Value::VarChar("California.SanFransico".into()), Value::Int(2)]; + stmt.set_tbname_tags(&table_name, &tags).await?; + for j in 0..NUM_ROWS { + let values = vec![ + ColumnView::from_millis_timestamp(vec![1648432611249 + j as i64]), + ColumnView::from_floats(vec![10.3 + j as f32]), + ColumnView::from_ints(vec![219 + j as i32]), + ColumnView::from_floats(vec![0.31 + j as f32]), + ]; + stmt.bind(&values).await?; + } + stmt.add_batch().await?; + } + + // execute. + let rows = stmt.execute().await?; + assert_eq!(rows, NUM_TABLES * NUM_ROWS); + Ok(()) +} diff --git a/docs/examples/rust/nativeexample/examples/tmq.rs b/docs/examples/rust/nativeexample/examples/tmq.rs new file mode 100644 index 0000000000..764c0c1fc8 --- /dev/null +++ b/docs/examples/rust/nativeexample/examples/tmq.rs @@ -0,0 +1,166 @@ +use std::time::Duration; +use std::str::FromStr; + +use taos::*; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + pretty_env_logger::formatted_timed_builder() + .filter_level(log::LevelFilter::Info) + .init(); + use taos_query::prelude::*; + let dsn = "taos://localhost:6030".to_string(); + log::info!("dsn: {}", dsn); + let mut dsn = Dsn::from_str(&dsn)?; + + let taos = TaosBuilder::from_dsn(&dsn)?.build().await?; + + // prepare database and table + taos.exec_many([ + "drop topic if exists topic_meters", + "drop database if exists power", + "create database if not exists power WAL_RETENTION_PERIOD 86400", + "use power", + + "CREATE STABLE IF NOT EXISTS power.meters (ts TIMESTAMP, current FLOAT, voltage INT, phase FLOAT) TAGS (groupId INT, location BINARY(24))", + + "create table if not exists power.d001 using power.meters tags(1,'location')", + + ]) + .await?; + + taos.exec_many([ + "drop database if exists db2", + "create database if not exists db2 wal_retention_period 3600", + "use db2", + ]) + .await?; + + // ANCHOR: create_topic + taos.exec_many([ + "CREATE TOPIC IF NOT EXISTS topic_meters AS SELECT ts, current, voltage, phase, groupid, location FROM power.meters", + ]) + .await?; + // ANCHOR_END: create_topic + + // ANCHOR: create_consumer + dsn.params.insert("group.id".to_string(), "abc".to_string()); + dsn.params.insert("auto.offset.reset".to_string(), "earliest".to_string()); + + let builder = TmqBuilder::from_dsn(&dsn)?; + let mut consumer = builder.build().await?; + // ANCHOR_END: create_consumer + + // ANCHOR: subscribe + consumer.subscribe(["topic_meters"]).await?; + // ANCHOR_END: subscribe + + // ANCHOR: consume + { + let mut stream = consumer.stream_with_timeout(Timeout::from_secs(1)); + + while let Some((offset, message)) = stream.try_next().await? { + + let topic: &str = offset.topic(); + let database = offset.database(); + let vgroup_id = offset.vgroup_id(); + log::debug!( + "topic: {}, database: {}, vgroup_id: {}", + topic, + database, + vgroup_id + ); + + match message { + MessageSet::Meta(meta) => { + log::info!("Meta"); + let raw = meta.as_raw_meta().await?; + taos.write_raw_meta(&raw).await?; + + let json = meta.as_json_meta().await?; + let sql = json.to_string(); + if let Err(err) = taos.exec(sql).await { + println!("maybe error: {}", err); + } + } + MessageSet::Data(data) => { + log::info!("Data"); + while let Some(data) = data.fetch_raw_block().await? { + log::debug!("data: {:?}", data); + } + } + MessageSet::MetaData(meta, data) => { + log::info!("MetaData"); + let raw = meta.as_raw_meta().await?; + taos.write_raw_meta(&raw).await?; + + let json = meta.as_json_meta().await?; + let sql = json.to_string(); + if let Err(err) = taos.exec(sql).await { + println!("maybe error: {}", err); + } + + while let Some(data) = data.fetch_raw_block().await? { + log::debug!("data: {:?}", data); + } + } + } + consumer.commit(offset).await?; + } + } + // ANCHOR_END: consume + + // ANCHOR: assignments + let assignments = consumer.assignments().await.unwrap(); + log::info!("assignments: {:?}", assignments); + // ANCHOR_END: assignments + + // seek offset + for topic_vec_assignment in assignments { + let topic = &topic_vec_assignment.0; + let vec_assignment = topic_vec_assignment.1; + for assignment in vec_assignment { + let vgroup_id = assignment.vgroup_id(); + let current = assignment.current_offset(); + let begin = assignment.begin(); + let end = assignment.end(); + log::debug!( + "topic: {}, vgroup_id: {}, current offset: {} begin {}, end: {}", + topic, + vgroup_id, + current, + begin, + end + ); + // ANCHOR: seek_offset + let res = consumer.offset_seek(topic, vgroup_id, end).await; + if res.is_err() { + log::error!("seek offset error: {:?}", res); + let a = consumer.assignments().await.unwrap(); + log::error!("assignments: {:?}", a); + } + // ANCHOR_END: seek_offset + } + + let topic_assignment = consumer.topic_assignment(topic).await; + log::debug!("topic assignment: {:?}", topic_assignment); + } + + // after seek offset + let assignments = consumer.assignments().await.unwrap(); + log::info!("after seek offset assignments: {:?}", assignments); + + // ANCHOR: unsubscribe + consumer.unsubscribe().await; + // ANCHOR_END: unsubscribe + + tokio::time::sleep(Duration::from_secs(1)).await; + + taos.exec_many([ + "drop database db2", + "drop topic topic_meters", + "drop database power", + ]) + .await?; + Ok(()) +}