From 042291c35b736f9356fa7463e3f5f6f5d7353466 Mon Sep 17 00:00:00 2001 From: kailixu Date: Fri, 1 Dec 2023 18:15:47 +0800 Subject: [PATCH 01/93] feat: support machine id --- include/common/tgrant.h | 1 + include/util/tdef.h | 1 + source/dnode/mnode/impl/inc/mndCluster.h | 3 + source/dnode/mnode/impl/inc/mndDef.h | 5 + source/dnode/mnode/impl/src/mndCluster.c | 154 +++++++++++++++++++++-- source/dnode/mnode/impl/src/mndGrant.c | 1 + 6 files changed, 158 insertions(+), 7 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index f06fca80141..bc0e5a9cca8 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -52,6 +52,7 @@ typedef enum { int32_t grantCheck(EGrantType grant); int32_t grantAlterActiveCode(int32_t did, const char* old, const char* newer, char* out, int8_t type); +char* grantGetMachineId(); #ifndef GRANTS_CFG #ifdef TD_ENTERPRISE diff --git a/include/util/tdef.h b/include/util/tdef.h index 69d0c1126da..6c7b6d1dbca 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -264,6 +264,7 @@ typedef enum ELogicConditionType { #define TSDB_JOB_STATUS_LEN 32 #define TSDB_CLUSTER_ID_LEN 40 +#define TSDB_MACHINE_ID_LEN 24 #define TSDB_FQDN_LEN 128 #define TSDB_EP_LEN (TSDB_FQDN_LEN + 6) #define TSDB_IPv4ADDR_LEN 16 diff --git a/source/dnode/mnode/impl/inc/mndCluster.h b/source/dnode/mnode/impl/inc/mndCluster.h index e33ffdb372d..73cfe45ff5d 100644 --- a/source/dnode/mnode/impl/inc/mndCluster.h +++ b/source/dnode/mnode/impl/inc/mndCluster.h @@ -28,6 +28,9 @@ int32_t mndGetClusterName(SMnode *pMnode, char *clusterName, int32_t len); int64_t mndGetClusterId(SMnode *pMnode); int64_t mndGetClusterCreateTime(SMnode *pMnode); int64_t mndGetClusterUpTime(SMnode *pMnode); +int32_t mndProcessClusterMachineIds(SMnode *pMnode, SMachineId *pIds, int32_t nIds); +int32_t mndDupClusterObj(SClusterObj *pOld, SClusterObj *pNew); +void mndFreeClusterObj(SClusterObj *pCluster); #ifdef __cplusplus } diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 08c0aec46a0..4f6fa650632 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -186,12 +186,17 @@ typedef struct { TdThreadMutex mutex; } STrans; +typedef struct { + char id[TSDB_MACHINE_ID_LEN + 1]; +} SMachineId; + typedef struct { int64_t id; char name[TSDB_CLUSTER_ID_LEN]; int64_t createdTime; int64_t updateTime; int32_t upTime; + SArray* pMachineIds; } SClusterObj; typedef struct { diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c index 4c799e1e1ea..794f8724c25 100644 --- a/source/dnode/mnode/impl/src/mndCluster.c +++ b/source/dnode/mnode/impl/src/mndCluster.c @@ -18,7 +18,7 @@ #include "mndShow.h" #include "mndTrans.h" -#define CLUSTER_VER_NUMBE 1 +#define CLUSTER_VER_NUMBE 2 #define CLUSTER_RESERVE_SIZE 60 int64_t tsExpireTime = 0; @@ -137,7 +137,9 @@ int64_t mndGetClusterUpTime(SMnode *pMnode) { static SSdbRaw *mndClusterActionEncode(SClusterObj *pCluster) { terrno = TSDB_CODE_OUT_OF_MEMORY; - SSdbRaw *pRaw = sdbAllocRaw(SDB_CLUSTER, CLUSTER_VER_NUMBE, sizeof(SClusterObj) + CLUSTER_RESERVE_SIZE); + int32_t nMachineIds = taosArrayGetSize(pCluster->pMachineIds); + int32_t machineSize = sizeof(int16_t) + nMachineIds * sizeof(SMachineId); + SSdbRaw *pRaw = sdbAllocRaw(SDB_CLUSTER, CLUSTER_VER_NUMBE, sizeof(SClusterObj) + machineSize + CLUSTER_RESERVE_SIZE); if (pRaw == NULL) goto _OVER; int32_t dataPos = 0; @@ -146,7 +148,12 @@ static SSdbRaw *mndClusterActionEncode(SClusterObj *pCluster) { SDB_SET_INT64(pRaw, dataPos, pCluster->updateTime, _OVER) SDB_SET_BINARY(pRaw, dataPos, pCluster->name, TSDB_CLUSTER_ID_LEN, _OVER) SDB_SET_INT32(pRaw, dataPos, pCluster->upTime, _OVER) + SDB_SET_INT16(pRaw, dataPos, nMachineIds, _OVER) + for (int32_t i = 0; i < nMachineIds; ++i) { + SDB_SET_BINARY(pRaw, dataPos, ((SMachineId*)TARRAY_GET_ELEM(pCluster->pMachineIds, i))->id, TSDB_MACHINE_ID_LEN, _OVER) + } SDB_SET_RESERVE(pRaw, dataPos, CLUSTER_RESERVE_SIZE, _OVER) + SDB_SET_DATALEN(pRaw, dataPos, _OVER); terrno = 0; @@ -164,12 +171,12 @@ _OVER: static SSdbRow *mndClusterActionDecode(SSdbRaw *pRaw) { terrno = TSDB_CODE_OUT_OF_MEMORY; SClusterObj *pCluster = NULL; - SSdbRow *pRow = NULL; + SSdbRow *pRow = NULL; int8_t sver = 0; if (sdbGetRawSoftVer(pRaw, &sver) != 0) goto _OVER; - if (sver != CLUSTER_VER_NUMBE) { + if (sver < 0 || sver > CLUSTER_VER_NUMBE) { terrno = TSDB_CODE_SDB_INVALID_DATA_VER; goto _OVER; } @@ -186,6 +193,19 @@ static SSdbRow *mndClusterActionDecode(SSdbRaw *pRaw) { SDB_GET_INT64(pRaw, dataPos, &pCluster->updateTime, _OVER) SDB_GET_BINARY(pRaw, dataPos, pCluster->name, TSDB_CLUSTER_ID_LEN, _OVER) SDB_GET_INT32(pRaw, dataPos, &pCluster->upTime, _OVER) + + if (sver > 1) { + int16_t nMachineIds = 0; + SDB_GET_INT16(pRaw, dataPos, &nMachineIds, _OVER) + if (nMachineIds > 0) { + pCluster->pMachineIds = taosArrayInit(nMachineIds, sizeof(SMachineId)); + if (!pCluster->pMachineIds) goto _OVER; + for (int16_t i = 0; i < nMachineIds; ++i) { + SDB_GET_BINARY(pRaw, dataPos, ((SMachineId *)TARRAY_GET_ELEM(pCluster->pMachineIds, i))->id, + TSDB_MACHINE_ID_LEN, _OVER) + } + } + } SDB_GET_RESERVE(pRaw, dataPos, CLUSTER_RESERVE_SIZE, _OVER) terrno = 0; @@ -194,6 +214,7 @@ _OVER: if (terrno != 0) { mError("cluster:%" PRId64 ", failed to decode from raw:%p since %s", pCluster == NULL ? 0 : pCluster->id, pRaw, terrstr()); + mndFreeClusterObj(pCluster); taosMemoryFreeClear(pRow); return NULL; } @@ -236,10 +257,23 @@ static int32_t mndCreateDefaultCluster(SMnode *pMnode) { clusterObj.id = mndGenerateUid(clusterObj.name, TSDB_CLUSTER_ID_LEN); clusterObj.id = (clusterObj.id >= 0 ? clusterObj.id : -clusterObj.id); pMnode->clusterId = clusterObj.id; + clusterObj.pMachineIds = taosArrayInit(1, sizeof(SMachineId)); + if(!clusterObj.pMachineIds) { + return -1; + } + char *machineId = grantGetMachineId(); + if (machineId) { + taosArrayPush(clusterObj.pMachineIds, machineId); + taosMemoryFree(machineId); + } + mInfo("cluster:%" PRId64 ", name is %s", clusterObj.id, clusterObj.name); SSdbRaw *pRaw = mndClusterActionEncode(&clusterObj); - if (pRaw == NULL) return -1; + if (pRaw == NULL) { + mndFreeClusterObj(&clusterObj); + return -1; + } (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY); mInfo("cluster:%" PRId64 ", will be created when deploying, raw:%p", clusterObj.id, pRaw); @@ -247,6 +281,7 @@ static int32_t mndCreateDefaultCluster(SMnode *pMnode) { STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, NULL, "create-cluster"); if (pTrans == NULL) { sdbFreeRaw(pRaw); + mndFreeClusterObj(&clusterObj); mError("cluster:%" PRId64 ", failed to create since %s", clusterObj.id, terrstr()); return -1; } @@ -255,6 +290,7 @@ static int32_t mndCreateDefaultCluster(SMnode *pMnode) { if (mndTransAppendCommitlog(pTrans, pRaw) != 0) { mError("trans:%d, failed to commit redo log since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); + mndFreeClusterObj(&clusterObj); return -1; } (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY); @@ -262,10 +298,12 @@ static int32_t mndCreateDefaultCluster(SMnode *pMnode) { if (mndTransPrepare(pMnode, pTrans) != 0) { mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); + mndFreeClusterObj(&clusterObj); return -1; } mndTransDrop(pTrans); + mndFreeClusterObj(&clusterObj); return 0; } @@ -328,24 +366,33 @@ static int32_t mndProcessUptimeTimer(SRpcMsg *pReq) { void *pIter = NULL; SClusterObj *pCluster = mndAcquireCluster(pMnode, &pIter); if (pCluster != NULL) { - memcpy(&clusterObj, pCluster, sizeof(SClusterObj)); + if(mndDupClusterObj(pCluster, &clusterObj) != 0){ + mndReleaseCluster(pMnode, pCluster, pIter); + mndFreeClusterObj(&clusterObj); + return -1; + } clusterObj.upTime += tsUptimeInterval; mndReleaseCluster(pMnode, pCluster, pIter); } if (clusterObj.id <= 0) { mError("can't get cluster info while update uptime"); + mndFreeClusterObj(&clusterObj); return 0; } mInfo("update cluster uptime to %d", clusterObj.upTime); STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "update-uptime"); - if (pTrans == NULL) return -1; + if (pTrans == NULL) { + mndFreeClusterObj(&clusterObj); + return -1; + } SSdbRaw *pCommitRaw = mndClusterActionEncode(&clusterObj); if (pCommitRaw == NULL || mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) { mError("trans:%d, failed to append commit log since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); + mndFreeClusterObj(&clusterObj); return -1; } (void)sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY); @@ -353,9 +400,102 @@ static int32_t mndProcessUptimeTimer(SRpcMsg *pReq) { if (mndTransPrepare(pMnode, pTrans) != 0) { mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); + mndFreeClusterObj(&clusterObj); return -1; } mndTransDrop(pTrans); + mndFreeClusterObj(&clusterObj); + return 0; +} + +int32_t mndDupClusterObj(SClusterObj *pOld, SClusterObj *pNew) { + memcpy(pNew, pOld, sizeof(SClusterObj)); + pNew->updateTime = taosGetTimestampMs(); + pNew->pMachineIds = taosArrayInit(taosArrayGetSize(pOld->pMachineIds), sizeof(SMachineId)); + if (!pNew->pMachineIds) return -1; + taosArrayAddAll(pNew->pMachineIds, pOld->pMachineIds); + return 0; +} + +void mndFreeClusterObj(SClusterObj *pCluster) { + if (pCluster) { + pCluster->pMachineIds = taosArrayDestroy(pCluster->pMachineIds); + } +} + +int32_t mndProcessClusterMachineIds(SMnode *pMnode, SMachineId *pIds, int32_t nIds) { + SClusterObj clusterObj = {0}; + void *pIter = NULL; + SClusterObj *pCluster = mndAcquireCluster(pMnode, &pIter); + if (pCluster != NULL) { + int32_t nDups = 0; + int32_t size = taosArrayGetSize(pCluster->pMachineIds); + for (int32_t n = 0; n < nIds; ++n) { + bool exist = false; + for (int32_t i = 0; i < size; ++i) { + SMachineId *pId = TARRAY_GET_ELEM(pCluster->pMachineIds, i); + if (0 == strncmp(pId->id, (pIds + nIds)->id, TSDB_MACHINE_ID_LEN + 1)) { + exist = true; + ++nDups; + break; + } + } + if (!exist) { + if (!clusterObj.pMachineIds) { + if(mndDupClusterObj(pCluster, &clusterObj) != 0){ + mndReleaseCluster(pMnode, pCluster, pIter); + mndFreeClusterObj(&clusterObj); + return -1; + } + } + if (!taosArrayPush(clusterObj.pMachineIds, pIds + n)) { + mndReleaseCluster(pMnode, pCluster, pIter); + mndFreeClusterObj(&clusterObj); + terrno = TSDB_CODE_OUT_OF_MEMORY; + return -1; + } + } + } + + if (nDups == nIds) { + mndReleaseCluster(pMnode, pCluster, pIter); + mndFreeClusterObj(&clusterObj); + return 0; + } + + mndReleaseCluster(pMnode, pCluster, pIter); + } + + if (clusterObj.id <= 0) { + mError("can't get cluster info while process machine-id"); + mndFreeClusterObj(&clusterObj); + return -1; + } + + STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, NULL, "machine-id"); + if (pTrans == NULL) { + mndFreeClusterObj(&clusterObj); + return -1; + } + + SSdbRaw *pCommitRaw = mndClusterActionEncode(&clusterObj); + if (pCommitRaw == NULL || mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) { + mError("trans:%d, failed to append commit log since %s", pTrans->id, terrstr()); + mndTransDrop(pTrans); + mndFreeClusterObj(&clusterObj); + return -1; + } + (void)sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY); + + if (mndTransPrepare(pMnode, pTrans) != 0) { + mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); + mndTransDrop(pTrans); + mndFreeClusterObj(&clusterObj); + return -1; + } + + mndTransDrop(pTrans); + mndFreeClusterObj(&clusterObj); return 0; } diff --git a/source/dnode/mnode/impl/src/mndGrant.c b/source/dnode/mnode/impl/src/mndGrant.c index c4e18942638..cc4b583b83b 100644 --- a/source/dnode/mnode/impl/src/mndGrant.c +++ b/source/dnode/mnode/impl/src/mndGrant.c @@ -129,6 +129,7 @@ void grantParseParameter() { mError("can't parsed parameter k"); } void grantReset(SMnode *pMnode, EGrantType grant, uint64_t value) {} void grantAdd(EGrantType grant, uint64_t value) {} void grantRestore(EGrantType grant, uint64_t value) {} +char *grantGetMachineId(){return NULL}; int32_t dmProcessGrantReq(void *pInfo, SRpcMsg *pMsg) { return TSDB_CODE_SUCCESS; } int32_t dmProcessGrantNotify(void *pInfo, SRpcMsg *pMsg) { return TSDB_CODE_SUCCESS; } int32_t grantAlterActiveCode(int32_t did, const char *old, const char *new, char *out, int8_t type) { From e623c9c3c804ffb2fc8955e229330b05d4204efe Mon Sep 17 00:00:00 2001 From: kailixu Date: Mon, 4 Dec 2023 11:44:02 +0800 Subject: [PATCH 02/93] feat: support machine id --- include/common/tgrant.h | 7 ++++++ include/util/taoserror.h | 1 + source/common/src/systable.c | 1 + source/dnode/mnode/impl/src/mndCluster.c | 32 ++++++++++++++++++++++-- source/dnode/mnode/impl/src/mndDnode.c | 5 ++-- source/dnode/mnode/sdb/src/sdbHash.c | 2 +- source/util/src/terror.c | 1 + 7 files changed, 44 insertions(+), 5 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index bc0e5a9cca8..eb27c086c44 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -31,6 +31,8 @@ extern "C" { #endif #define GRANT_HEART_BEAT_MIN 2 +#define GRANT_ACTIVE_CODE "activeCode" +#define GRANT_C_ACTIVE_CODE "cActiveCode" typedef enum { TSDB_GRANT_ALL, @@ -50,6 +52,11 @@ typedef enum { TSDB_GRANT_TABLE, } EGrantType; +typedef struct { + int64_t grantedTime; + int64_t connGrantedTime; +} SGrantedInfo; + int32_t grantCheck(EGrantType grant); int32_t grantAlterActiveCode(int32_t did, const char* old, const char* newer, char* out, int8_t type); char* grantGetMachineId(); diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 6ab06d06a3e..0256a496df5 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -558,6 +558,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_GRANT_GEN_IVLD_KEY TAOS_DEF_ERROR_CODE(0, 0x0812) #define TSDB_CODE_GRANT_GEN_APP_LIMIT TAOS_DEF_ERROR_CODE(0, 0x0813) #define TSDB_CODE_GRANT_GEN_ENC_IVLD_KLEN TAOS_DEF_ERROR_CODE(0, 0x0814) +#define TSDB_CODE_GRANT_PAR_IVLD_DIST TAOS_DEF_ERROR_CODE(0, 0x0815) // sync // #define TSDB_CODE_SYN_INVALID_CONFIG TAOS_DEF_ERROR_CODE(0, 0x0900) // 2.x diff --git a/source/common/src/systable.c b/source/common/src/systable.c index 1623d9f062a..0b733f7ce87 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -76,6 +76,7 @@ static const SSysDbTableSchema clusterSchema[] = { {.name = "create_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, {.name = "version", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "expire_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, + {.name = "machine_ids", .bytes = 100 * (TSDB_MACHINE_ID_LEN + 3) + 2 + VARSTR_HEADER_SIZE, .type= TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, }; static const SSysDbTableSchema userDBSchema[] = { diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c index 794f8724c25..5ebfdf858c0 100644 --- a/source/dnode/mnode/impl/src/mndCluster.c +++ b/source/dnode/mnode/impl/src/mndCluster.c @@ -137,7 +137,7 @@ int64_t mndGetClusterUpTime(SMnode *pMnode) { static SSdbRaw *mndClusterActionEncode(SClusterObj *pCluster) { terrno = TSDB_CODE_OUT_OF_MEMORY; - int32_t nMachineIds = taosArrayGetSize(pCluster->pMachineIds); + int16_t nMachineIds = taosArrayGetSize(pCluster->pMachineIds); int32_t machineSize = sizeof(int16_t) + nMachineIds * sizeof(SMachineId); SSdbRaw *pRaw = sdbAllocRaw(SDB_CLUSTER, CLUSTER_VER_NUMBE, sizeof(SClusterObj) + machineSize + CLUSTER_RESERVE_SIZE); if (pRaw == NULL) goto _OVER; @@ -149,7 +149,7 @@ static SSdbRaw *mndClusterActionEncode(SClusterObj *pCluster) { SDB_SET_BINARY(pRaw, dataPos, pCluster->name, TSDB_CLUSTER_ID_LEN, _OVER) SDB_SET_INT32(pRaw, dataPos, pCluster->upTime, _OVER) SDB_SET_INT16(pRaw, dataPos, nMachineIds, _OVER) - for (int32_t i = 0; i < nMachineIds; ++i) { + for (int16_t i = 0; i < nMachineIds; ++i) { SDB_SET_BINARY(pRaw, dataPos, ((SMachineId*)TARRAY_GET_ELEM(pCluster->pMachineIds, i))->id, TSDB_MACHINE_ID_LEN, _OVER) } SDB_SET_RESERVE(pRaw, dataPos, CLUSTER_RESERVE_SIZE, _OVER) @@ -203,6 +203,7 @@ static SSdbRow *mndClusterActionDecode(SSdbRaw *pRaw) { for (int16_t i = 0; i < nMachineIds; ++i) { SDB_GET_BINARY(pRaw, dataPos, ((SMachineId *)TARRAY_GET_ELEM(pCluster->pMachineIds, i))->id, TSDB_MACHINE_ID_LEN, _OVER) + ++TARRAY_SIZE(pCluster->pMachineIds); } } } @@ -232,6 +233,7 @@ static int32_t mndClusterActionInsert(SSdb *pSdb, SClusterObj *pCluster) { static int32_t mndClusterActionDelete(SSdb *pSdb, SClusterObj *pCluster) { mTrace("cluster:%" PRId64 ", perform delete action, row:%p", pCluster->id, pCluster); + mndFreeClusterObj(pCluster); return 0; } @@ -347,6 +349,32 @@ static int32_t mndRetrieveClusters(SRpcMsg *pMsg, SShowObj *pShow, SSDataBlock * colDataSetVal(pColInfo, numOfRows, (const char *)&tsExpireTime, false); } + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + int32_t nMachidIds = taosArrayGetSize(pCluster->pMachineIds); + char *pBuf = + taosMemoryCalloc(1, (nMachidIds > 0 ? nMachidIds * (TSDB_MACHINE_ID_LEN + 3) : 1) + 2 + VARSTR_HEADER_SIZE); + VarDataLenT nPos = 0; + if (pBuf) { + nPos += VARSTR_HEADER_SIZE; + snprintf(pBuf + nPos, 2, "["); + ++nPos; + for (int32_t i = 0; i < nMachidIds; ++i) { + snprintf(pBuf + nPos, TSDB_MACHINE_ID_LEN + 2, "\"%s", + ((SMachineId *)TARRAY_GET_ELEM(pCluster->pMachineIds, i))->id); + nPos += TSDB_MACHINE_ID_LEN + 1; + snprintf(pBuf + nPos, 3, "\","); + nPos += 2; + } + if (nMachidIds > 0) --nPos; + snprintf(pBuf + nPos, 2, "]"); + ++nPos; + *(VarDataLenT *)(pBuf) = nPos - VARSTR_HEADER_SIZE; + colDataSetVal(pColInfo, numOfRows, pBuf, false); + taosMemoryFree(pBuf); + } else { + colDataSetNULL(pColInfo, numOfRows); + } + sdbRelease(pSdb, pCluster); numOfRows++; } diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index e224aceec2e..d4f1cfcc193 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -1283,7 +1283,8 @@ static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq) { strcpy(dcfgReq.config, "supportvnodes"); snprintf(dcfgReq.value, TSDB_DNODE_VALUE_LEN, "%d", flag); - } else if (strncasecmp(cfgReq.config, "activeCode", 10) == 0 || strncasecmp(cfgReq.config, "cActiveCode", 11) == 0) { + } else if (strncasecmp(cfgReq.config, GRANT_ACTIVE_CODE, 10) == 0 || + strncasecmp(cfgReq.config, GRANT_C_ACTIVE_CODE, 11) == 0) { int8_t opt = strncasecmp(cfgReq.config, "a", 1) == 0 ? DND_ACTIVE_CODE : DND_CONN_ACTIVE_CODE; int8_t index = opt == DND_ACTIVE_CODE ? 10 : 11; if (' ' != cfgReq.config[index] && 0 != cfgReq.config[index]) { @@ -1301,7 +1302,7 @@ static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq) { goto _err_out; } - strcpy(dcfgReq.config, opt == DND_ACTIVE_CODE ? "activeCode" : "cActiveCode"); + strcpy(dcfgReq.config, opt == DND_ACTIVE_CODE ? GRANT_ACTIVE_CODE : GRANT_C_ACTIVE_CODE); snprintf(dcfgReq.value, TSDB_DNODE_VALUE_LEN, "%s", cfgReq.value); if (mndConfigDnode(pMnode, pReq, &cfgReq, opt) != 0) { diff --git a/source/dnode/mnode/sdb/src/sdbHash.c b/source/dnode/mnode/sdb/src/sdbHash.c index df5c399da82..5f275f912d9 100644 --- a/source/dnode/mnode/sdb/src/sdbHash.c +++ b/source/dnode/mnode/sdb/src/sdbHash.c @@ -180,7 +180,7 @@ static int32_t sdbInsertRow(SSdb *pSdb, SHashObj *hash, SSdbRaw *pRaw, SSdbRow * pSdb->maxId[pRow->type] = TMAX(pSdb->maxId[pRow->type], *((int32_t *)pRow->pObj)); } if (pSdb->keyTypes[pRow->type] == SDB_KEY_INT64) { - pSdb->maxId[pRow->type] = TMAX(pSdb->maxId[pRow->type], *((int32_t *)pRow->pObj)); + pSdb->maxId[pRow->type] = TMAX(pSdb->maxId[pRow->type], *((int64_t *)pRow->pObj)); } pSdb->tableVer[pRow->type]++; diff --git a/source/util/src/terror.c b/source/util/src/terror.c index cc6647e4638..8847b7d894f 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -445,6 +445,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_DEC_IVLD_KLEN, "Invalid klen to decod TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_IVLD_KEY, "Invalid key to gen active code") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_APP_LIMIT, "Limited app num to gen active code") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_ENC_IVLD_KLEN, "Invalid klen to encode active code") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_IVLD_DIST, "Invalid dist to parse active code") // sync TAOS_DEFINE_ERROR(TSDB_CODE_SYN_TIMEOUT, "Sync timeout") From 67fd9993b0729b16fe60899d2205e8d4df5ea841 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 6 Dec 2023 15:30:26 +0800 Subject: [PATCH 03/93] feat: support uniq grant --- include/common/tgrant.h | 10 +- include/util/tdef.h | 1 + source/dnode/mnode/impl/inc/mndCluster.h | 2 + source/dnode/mnode/impl/inc/mndDef.h | 1 + source/dnode/mnode/impl/src/mndCluster.c | 28 +++++ source/dnode/mnode/impl/src/mndDnode.c | 132 ----------------------- source/dnode/mnode/impl/src/mndGrant.c | 3 - source/dnode/mnode/impl/src/mndStream.c | 4 + source/dnode/mnode/impl/src/mndTopic.c | 4 + 9 files changed, 48 insertions(+), 137 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index eb27c086c44..41e997e78d7 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -46,10 +46,17 @@ typedef enum { TSDB_GRANT_SPEED, TSDB_GRANT_QUERY_TIME, TSDB_GRANT_CONNS, - TSDB_GRANT_STREAMS, + TSDB_GRANT_STREAM, TSDB_GRANT_CPU_CORES, TSDB_GRANT_STABLE, TSDB_GRANT_TABLE, + TSDB_GRANT_TOPIC, + TSDB_GRANT_STREAM_EXPIRE, + TSDB_GRANT_TOPIC_EXPIRE, + TSDB_GRANT_AUDIT_EXPIRE, + TSDB_GRANT_MULTI_TIER_EXPIRE, + TSDB_GRANT_BACKUP_RESTORE_EXPIRE, + TSDB_GRANT_REPLICATION_EXPIRE, } EGrantType; typedef struct { @@ -58,7 +65,6 @@ typedef struct { } SGrantedInfo; int32_t grantCheck(EGrantType grant); -int32_t grantAlterActiveCode(int32_t did, const char* old, const char* newer, char* out, int8_t type); char* grantGetMachineId(); #ifndef GRANTS_CFG diff --git a/include/util/tdef.h b/include/util/tdef.h index 6c7b6d1dbca..aafb0adf886 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -287,6 +287,7 @@ typedef enum ELogicConditionType { #define TSDB_ACTIVE_KEY_LEN 109 #define TSDB_CONN_ACTIVE_KEY_LEN 255 +#define TSDB_UNIQ_ACTIVE_KEY_LEN 255 #define TSDB_DEFAULT_PKT_SIZE 65480 // same as RPC_MAX_UDP_SIZE diff --git a/source/dnode/mnode/impl/inc/mndCluster.h b/source/dnode/mnode/impl/inc/mndCluster.h index 73cfe45ff5d..b1b7cb35995 100644 --- a/source/dnode/mnode/impl/inc/mndCluster.h +++ b/source/dnode/mnode/impl/inc/mndCluster.h @@ -28,6 +28,8 @@ int32_t mndGetClusterName(SMnode *pMnode, char *clusterName, int32_t len); int64_t mndGetClusterId(SMnode *pMnode); int64_t mndGetClusterCreateTime(SMnode *pMnode); int64_t mndGetClusterUpTime(SMnode *pMnode); +int32_t mndGetClusterActive(SMnode *pMnode, char* active); +int32_t mndGetClusterMachineIds(SMnode *pMnode, SArray *pIds); int32_t mndProcessClusterMachineIds(SMnode *pMnode, SMachineId *pIds, int32_t nIds); int32_t mndDupClusterObj(SClusterObj *pOld, SClusterObj *pNew); void mndFreeClusterObj(SClusterObj *pCluster); diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 4f6fa650632..730d5902a3b 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -196,6 +196,7 @@ typedef struct { int64_t createdTime; int64_t updateTime; int32_t upTime; + char active[TSDB_UNIQ_ACTIVE_KEY_LEN + 1]; SArray* pMachineIds; } SClusterObj; diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c index 5ebfdf858c0..7c7a177a951 100644 --- a/source/dnode/mnode/impl/src/mndCluster.c +++ b/source/dnode/mnode/impl/src/mndCluster.c @@ -100,6 +100,34 @@ int64_t mndGetClusterId(SMnode *pMnode) { return clusterId; } +int32_t mndGetClusterActive(SMnode *pMnode, char *active) { + void *pIter = NULL; + SClusterObj *pCluster = mndAcquireCluster(pMnode, &pIter); + if (pCluster) { + if (active) strncpy(active, pCluster->active, TSDB_UNIQ_ACTIVE_KEY_LEN + 1); + mndReleaseCluster(pMnode, pCluster, pIter); + return 0; + } + + return -1; +} + +int32_t mndGetClusterMachineIds(SMnode *pMnode, SArray *pIds) { + int32_t code = -1; + void *pIter = NULL; + SClusterObj *pCluster = mndAcquireCluster(pMnode, &pIter); + if (pCluster) { + if (!pIds) pIds = taosArrayInit(taosArrayGetSize(pCluster->pMachineIds), sizeof(SMachineId)); + if (pIds) { + taosArrayAddAll(pIds, pCluster->pMachineIds); + code = 0; + } + mndReleaseCluster(pMnode, pCluster, pIter); + } + + return code; +} + int64_t mndGetClusterCreateTime(SMnode *pMnode) { int64_t createTime = 0; void *pIter = NULL; diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index d4f1cfcc193..81cdb8de1d1 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -761,109 +761,6 @@ _OVER: return code; } -static int32_t mndConfigDnode(SMnode *pMnode, SRpcMsg *pReq, SMCfgDnodeReq *pCfgReq, int8_t action) { - SSdbRaw *pRaw = NULL; - STrans *pTrans = NULL; - SDnodeObj *pDnode = NULL; - SArray *failRecord = NULL; - bool cfgAll = pCfgReq->dnodeId == -1; - int32_t cfgAllErr = 0; - int32_t iter = 0; - - SSdb *pSdb = pMnode->pSdb; - void *pIter = NULL; - while (1) { - if (cfgAll) { - pIter = sdbFetch(pSdb, SDB_DNODE, pIter, (void **)&pDnode); - if (pIter == NULL) break; - ++iter; - } else if (!(pDnode = mndAcquireDnode(pMnode, pCfgReq->dnodeId))) { - goto _OVER; - } - - SDnodeObj tmpDnode = *pDnode; - if (action == DND_ACTIVE_CODE) { - if (grantAlterActiveCode(pDnode->id, pDnode->active, pCfgReq->value, tmpDnode.active, 0) != 0) { - if (TSDB_CODE_DUP_KEY != terrno) { - mError("dnode:%d, config dnode:%d, app:%p config:%s value:%s failed since %s", pDnode->id, pCfgReq->dnodeId, - pReq->info.ahandle, pCfgReq->config, pCfgReq->value, terrstr()); - if (cfgAll) { // alter all dnodes: - if (!failRecord) failRecord = taosArrayInit(1, sizeof(int32_t)); - if (failRecord) taosArrayPush(failRecord, &pDnode->id); - if (0 == cfgAllErr) cfgAllErr = terrno; // output 1st terrno. - } - } else { - terrno = 0; // no action for dup active code - } - if (cfgAll) continue; - goto _OVER; - } - } else if (action == DND_CONN_ACTIVE_CODE) { - if (grantAlterActiveCode(pDnode->id, pDnode->connActive, pCfgReq->value, tmpDnode.connActive, 1) != 0) { - if (TSDB_CODE_DUP_KEY != terrno) { - mError("dnode:%d, config dnode:%d, app:%p config:%s value:%s failed since %s", pDnode->id, pCfgReq->dnodeId, - pReq->info.ahandle, pCfgReq->config, pCfgReq->value, terrstr()); - if (cfgAll) { - if (!failRecord) failRecord = taosArrayInit(1, sizeof(int32_t)); - if (failRecord) taosArrayPush(failRecord, &pDnode->id); - if (0 == cfgAllErr) cfgAllErr = terrno; - } - } else { - terrno = 0; - } - if (cfgAll) continue; - goto _OVER; - } - } else { - terrno = TSDB_CODE_INVALID_CFG; - goto _OVER; - } - - if (!pTrans) { - pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, pReq, "config-dnode"); - if (!pTrans) goto _OVER; - if (mndTrancCheckConflict(pMnode, pTrans) != 0) goto _OVER; - } - - pRaw = mndDnodeActionEncode(&tmpDnode); - if (pRaw == NULL || mndTransAppendCommitlog(pTrans, pRaw) != 0) goto _OVER; - (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY); - pRaw = NULL; - - mInfo("dnode:%d, config dnode:%d, app:%p config:%s value:%s", pDnode->id, pCfgReq->dnodeId, pReq->info.ahandle, - pCfgReq->config, pCfgReq->value); - - if (cfgAll) { - sdbRelease(pSdb, pDnode); - pDnode = NULL; - } else { - break; - } - } - - if (pTrans && mndTransPrepare(pMnode, pTrans) != 0) goto _OVER; - tsGrantHBInterval = TMIN(TMAX(5, iter / 2), 30); - terrno = 0; - -_OVER: - if (cfgAll) { - sdbRelease(pSdb, pDnode); - if (cfgAllErr != 0) terrno = cfgAllErr; - int32_t nFail = taosArrayGetSize(failRecord); - if (nFail > 0) { - mError("config dnode, cfg:%d, app:%p config:%s value:%s. total:%d, fail:%d", pCfgReq->dnodeId, pReq->info.ahandle, - pCfgReq->config, pCfgReq->value, iter, nFail); - } - } else { - mndReleaseDnode(pMnode, pDnode); - } - sdbCancelFetch(pSdb, pIter); - mndTransDrop(pTrans); - sdbFreeRaw(pRaw); - taosArrayDestroy(failRecord); - return terrno; -} - static int32_t mndProcessDnodeListReq(SRpcMsg *pReq) { SMnode *pMnode = pReq->info.node; SSdb *pSdb = pMnode->pSdb; @@ -1283,35 +1180,6 @@ static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq) { strcpy(dcfgReq.config, "supportvnodes"); snprintf(dcfgReq.value, TSDB_DNODE_VALUE_LEN, "%d", flag); - } else if (strncasecmp(cfgReq.config, GRANT_ACTIVE_CODE, 10) == 0 || - strncasecmp(cfgReq.config, GRANT_C_ACTIVE_CODE, 11) == 0) { - int8_t opt = strncasecmp(cfgReq.config, "a", 1) == 0 ? DND_ACTIVE_CODE : DND_CONN_ACTIVE_CODE; - int8_t index = opt == DND_ACTIVE_CODE ? 10 : 11; - if (' ' != cfgReq.config[index] && 0 != cfgReq.config[index]) { - mError("dnode:%d, failed to config activeCode since invalid conf:%s", cfgReq.dnodeId, cfgReq.config); - terrno = TSDB_CODE_INVALID_CFG; - goto _err_out; - } - int32_t vlen = strlen(cfgReq.value); - if (vlen > 0 && ((opt == DND_ACTIVE_CODE && vlen != (TSDB_ACTIVE_KEY_LEN - 1)) || - (opt == DND_CONN_ACTIVE_CODE && - (vlen > (TSDB_CONN_ACTIVE_KEY_LEN - 1) || vlen < (TSDB_ACTIVE_KEY_LEN - 1))))) { - mError("dnode:%d, failed to config activeCode since invalid vlen:%d. conf:%s, val:%s", cfgReq.dnodeId, vlen, - cfgReq.config, cfgReq.value); - terrno = TSDB_CODE_INVALID_CFG; - goto _err_out; - } - - strcpy(dcfgReq.config, opt == DND_ACTIVE_CODE ? GRANT_ACTIVE_CODE : GRANT_C_ACTIVE_CODE); - snprintf(dcfgReq.value, TSDB_DNODE_VALUE_LEN, "%s", cfgReq.value); - - if (mndConfigDnode(pMnode, pReq, &cfgReq, opt) != 0) { - mError("dnode:%d, failed to config activeCode since %s", cfgReq.dnodeId, terrstr()); - terrno = TSDB_CODE_INVALID_CFG; - goto _err_out; - } - tFreeSMCfgDnodeReq(&cfgReq); - return 0; } else if (strncasecmp(cfgReq.config, "s3blocksize", 11) == 0) { int32_t optLen = strlen("s3blocksize"); int32_t flag = -1; diff --git a/source/dnode/mnode/impl/src/mndGrant.c b/source/dnode/mnode/impl/src/mndGrant.c index cc4b583b83b..7a875b37947 100644 --- a/source/dnode/mnode/impl/src/mndGrant.c +++ b/source/dnode/mnode/impl/src/mndGrant.c @@ -132,9 +132,6 @@ void grantRestore(EGrantType grant, uint64_t value) {} char *grantGetMachineId(){return NULL}; int32_t dmProcessGrantReq(void *pInfo, SRpcMsg *pMsg) { return TSDB_CODE_SUCCESS; } int32_t dmProcessGrantNotify(void *pInfo, SRpcMsg *pMsg) { return TSDB_CODE_SUCCESS; } -int32_t grantAlterActiveCode(int32_t did, const char *old, const char *new, char *out, int8_t type) { - return TSDB_CODE_SUCCESS; -} #endif diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index 21969cc404c..329d26ce7d8 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -806,6 +806,10 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) { int32_t sqlLen = 0; terrno = TSDB_CODE_SUCCESS; + if ((terrno = grantCheck(TSDB_GRANT_STREAM)) < 0) { + goto _OVER; + } + SCMCreateStreamReq createStreamReq = {0}; if (tDeserializeSCMCreateStreamReq(pReq->pCont, pReq->contLen, &createStreamReq) != 0) { terrno = TSDB_CODE_INVALID_MSG; diff --git a/source/dnode/mnode/impl/src/mndTopic.c b/source/dnode/mnode/impl/src/mndTopic.c index 0d23db09e55..973b522a4d2 100644 --- a/source/dnode/mnode/impl/src/mndTopic.c +++ b/source/dnode/mnode/impl/src/mndTopic.c @@ -564,6 +564,10 @@ static int32_t mndProcessCreateTopicReq(SRpcMsg *pReq) { return code; } + if ((terrno = grantCheck(TSDB_GRANT_TOPIC)) < 0) { + goto _OVER; + } + if (tDeserializeSCMCreateTopicReq(pReq->pCont, pReq->contLen, &createTopicReq) != 0) { terrno = TSDB_CODE_INVALID_MSG; goto _OVER; From b015077120038adbd3bafa40fbeb3d42f7f2c6eb Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 6 Dec 2023 19:13:54 +0800 Subject: [PATCH 04/93] feat: support uniq grant --- include/common/tgrant.h | 1 - source/common/src/systable.c | 3 +-- source/dnode/mnode/impl/inc/mndCluster.h | 1 + source/dnode/mnode/impl/inc/mndDef.h | 4 +++- source/dnode/mnode/impl/src/mndCluster.c | 12 ++++++++++++ source/dnode/mnode/impl/src/mndDnode.c | 12 +++++++++++- 6 files changed, 28 insertions(+), 5 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index 41e997e78d7..4abb24aa95c 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -61,7 +61,6 @@ typedef enum { typedef struct { int64_t grantedTime; - int64_t connGrantedTime; } SGrantedInfo; int32_t grantCheck(EGrantType grant); diff --git a/source/common/src/systable.c b/source/common/src/systable.c index 0b733f7ce87..7889f2295c0 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -37,8 +37,7 @@ static const SSysDbTableSchema dnodesSchema[] = { {.name = "reboot_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, {.name = "note", .bytes = 256 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, #ifdef TD_ENTERPRISE - {.name = "active_code", .bytes = TSDB_ACTIVE_KEY_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, - {.name = "c_active_code", .bytes = TSDB_CONN_ACTIVE_KEY_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, + {.name = "machine_id", .bytes = TSDB_MACHINE_ID_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, #endif }; diff --git a/source/dnode/mnode/impl/inc/mndCluster.h b/source/dnode/mnode/impl/inc/mndCluster.h index b1b7cb35995..19f18d9a9d0 100644 --- a/source/dnode/mnode/impl/inc/mndCluster.h +++ b/source/dnode/mnode/impl/inc/mndCluster.h @@ -28,6 +28,7 @@ int32_t mndGetClusterName(SMnode *pMnode, char *clusterName, int32_t len); int64_t mndGetClusterId(SMnode *pMnode); int64_t mndGetClusterCreateTime(SMnode *pMnode); int64_t mndGetClusterUpTime(SMnode *pMnode); +int32_t mndGetClusterGrantedInfo(SMnode *pMnode, SGrantedInfo *pInfo); int32_t mndGetClusterActive(SMnode *pMnode, char* active); int32_t mndGetClusterMachineIds(SMnode *pMnode, SArray *pIds); int32_t mndProcessClusterMachineIds(SMnode *pMnode, SMachineId *pIds, int32_t nIds); diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 730d5902a3b..17ca969e4a9 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -196,8 +196,9 @@ typedef struct { int64_t createdTime; int64_t updateTime; int32_t upTime; - char active[TSDB_UNIQ_ACTIVE_KEY_LEN + 1]; + int64_t grantedTime; SArray* pMachineIds; + char active[TSDB_UNIQ_ACTIVE_KEY_LEN + 1]; } SClusterObj; typedef struct { @@ -220,6 +221,7 @@ typedef struct { char ep[TSDB_EP_LEN]; char active[TSDB_ACTIVE_KEY_LEN]; char connActive[TSDB_CONN_ACTIVE_KEY_LEN]; + char machineId[TSDB_MACHINE_ID_LEN + 1]; } SDnodeObj; typedef struct { diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c index 7c7a177a951..f93eb9a95be 100644 --- a/source/dnode/mnode/impl/src/mndCluster.c +++ b/source/dnode/mnode/impl/src/mndCluster.c @@ -100,6 +100,18 @@ int64_t mndGetClusterId(SMnode *pMnode) { return clusterId; } +int32_t mndGetClusterGrantedInfo(SMnode *pMnode, SGrantedInfo *pInfo) { + void *pIter = NULL; + SClusterObj *pCluster = mndAcquireCluster(pMnode, &pIter); + if (pCluster != NULL) { + pInfo->grantedTime = pCluster->grantedTime; + mndReleaseCluster(pMnode, pCluster, pIter); + return 0; + } + + return -1; +} + int32_t mndGetClusterActive(SMnode *pMnode, char *active) { void *pIter = NULL; SClusterObj *pCluster = mndAcquireCluster(pMnode, &pIter); diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index 81cdb8de1d1..f1ed05183bf 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -30,7 +30,7 @@ #include "tunit.h" #define TSDB_DNODE_VER_NUMBER 2 -#define TSDB_DNODE_RESERVE_SIZE 64 +#define TSDB_DNODE_RESERVE_SIZE 40 static const char *offlineReason[] = { "", @@ -136,6 +136,10 @@ static int32_t mndCreateDefaultDnode(SMnode *pMnode) { tstrncpy(dnodeObj.fqdn, tsLocalFqdn, TSDB_FQDN_LEN); dnodeObj.fqdn[TSDB_FQDN_LEN - 1] = 0; snprintf(dnodeObj.ep, TSDB_EP_LEN - 1, "%s:%u", tsLocalFqdn, tsServerPort); + char *machineId = grantGetMachineId(); + if (machineId) { + memcpy(dnodeObj.machineId, machineId, TSDB_MACHINE_ID_LEN); + } pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, NULL, "create-dnode"); if (pTrans == NULL) goto _OVER; @@ -168,6 +172,7 @@ static SSdbRaw *mndDnodeActionEncode(SDnodeObj *pDnode) { SDB_SET_INT64(pRaw, dataPos, pDnode->updateTime, _OVER) SDB_SET_INT16(pRaw, dataPos, pDnode->port, _OVER) SDB_SET_BINARY(pRaw, dataPos, pDnode->fqdn, TSDB_FQDN_LEN, _OVER) + SDB_SET_BINARY(pRaw, dataPos, pDnode->machineId, TSDB_MACHINE_ID_LEN, _OVER) SDB_SET_RESERVE(pRaw, dataPos, TSDB_DNODE_RESERVE_SIZE, _OVER) SDB_SET_INT16(pRaw, dataPos, TSDB_ACTIVE_KEY_LEN, _OVER) SDB_SET_BINARY(pRaw, dataPos, pDnode->active, TSDB_ACTIVE_KEY_LEN, _OVER) @@ -212,6 +217,7 @@ static SSdbRow *mndDnodeActionDecode(SSdbRaw *pRaw) { SDB_GET_INT64(pRaw, dataPos, &pDnode->updateTime, _OVER) SDB_GET_INT16(pRaw, dataPos, &pDnode->port, _OVER) SDB_GET_BINARY(pRaw, dataPos, pDnode->fqdn, TSDB_FQDN_LEN, _OVER) + SDB_GET_BINARY(pRaw, dataPos, pDnode->machineId, TSDB_MACHINE_ID_LEN, _OVER) SDB_GET_RESERVE(pRaw, dataPos, TSDB_DNODE_RESERVE_SIZE, _OVER) if (sver > 1) { int16_t keyLen = 0; @@ -740,6 +746,10 @@ static int32_t mndCreateDnode(SMnode *pMnode, SRpcMsg *pReq, SCreateDnodeReq *pC dnodeObj.port = pCreate->port; tstrncpy(dnodeObj.fqdn, pCreate->fqdn, TSDB_FQDN_LEN); snprintf(dnodeObj.ep, TSDB_EP_LEN - 1, "%s:%u", pCreate->fqdn, pCreate->port); + char *machineId = grantGetMachineId(); + if (machineId) { + memcpy(dnodeObj.machineId, machineId, TSDB_MACHINE_ID_LEN); + } pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_GLOBAL, pReq, "create-dnode"); if (pTrans == NULL) goto _OVER; From 4adce7ed52f1fb49d2cec1f2d9e1ae9600809400 Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 7 Dec 2023 14:11:41 +0800 Subject: [PATCH 05/93] feat: support uniq grant --- include/common/tmsgdef.h | 5 +- include/util/tdef.h | 2 +- source/common/src/systable.c | 5 +- source/dnode/mgmt/mgmt_dnode/inc/dmInt.h | 1 + source/dnode/mgmt/mgmt_dnode/src/dmHandle.c | 28 +++ source/dnode/mgmt/mgmt_dnode/src/dmWorker.c | 3 + source/dnode/mnode/impl/inc/mndCluster.h | 4 - source/dnode/mnode/impl/inc/mndDef.h | 3 +- source/dnode/mnode/impl/src/mndCluster.c | 200 ++------------------ source/dnode/mnode/impl/src/mndDnode.c | 63 ++++-- 10 files changed, 109 insertions(+), 205 deletions(-) diff --git a/include/common/tmsgdef.h b/include/common/tmsgdef.h index 61b471912f3..cad9bb0a518 100644 --- a/include/common/tmsgdef.h +++ b/include/common/tmsgdef.h @@ -166,7 +166,7 @@ TD_DEF_MSG_TYPE(TDMT_MND_BATCH_META, "batch-meta", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_TABLE_CFG, "table-cfg", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_TMQ_CREATE_TOPIC, "create-topic", SMCreateTopicReq, SMCreateTopicRsp) - TD_DEF_MSG_TYPE(TDMT_MND_UNUSED1, "unused", NULL, NULL) + TD_DEF_MSG_TYPE(TDMT_MND_GET_MACHINE, "get-machine", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_TMQ_DROP_TOPIC, "drop-topic", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_TMQ_SUBSCRIBE, "subscribe", SCMSubscribeReq, SCMSubscribeRsp) TD_DEF_MSG_TYPE(TDMT_MND_TMQ_ASK_EP, "ask-ep", SMqAskEpReq, SMqAskEpRsp) @@ -335,8 +335,9 @@ TD_DEF_MSG_TYPE(TDMT_VND_ALTER_CONFIG, "alter-config", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_SYNC_LOCAL_CMD, "sync-local-cmd", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_SYNC_PREP_SNAPSHOT, "sync-prep-snapshot", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_SYNC_PREP_SNAPSHOT_REPLY, "sync-prep-snapshot-reply", NULL, NULL) - TD_DEF_MSG_TYPE(TDMT_SYNC_MAX_MSG, "sync-max", NULL, NULL) + TD_DEF_MSG_TYPE(TDMT_SYNC_UNUSED_CODE, "sync-unused", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_SYNC_FORCE_FOLLOWER, "sync-force-become-follower", NULL, NULL) + TD_DEF_MSG_TYPE(TDMT_SYNC_MAX_MSG, "sync-max", NULL, NULL) TD_CLOSE_MSG_TYPE(TDMT_END_SYNC_MSG) diff --git a/include/util/tdef.h b/include/util/tdef.h index 4b879db385d..7d5bc2bd7c4 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -287,7 +287,7 @@ typedef enum ELogicConditionType { #define TSDB_ACTIVE_KEY_LEN 109 #define TSDB_CONN_ACTIVE_KEY_LEN 255 -#define TSDB_UNIQ_ACTIVE_KEY_LEN 255 +#define TSDB_UNIQ_ACTIVE_KEY_LEN 256 #define TSDB_DEFAULT_PKT_SIZE 65480 // same as RPC_MAX_UDP_SIZE diff --git a/source/common/src/systable.c b/source/common/src/systable.c index 7889f2295c0..2828a1e3052 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -75,7 +75,10 @@ static const SSysDbTableSchema clusterSchema[] = { {.name = "create_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, {.name = "version", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "expire_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, - {.name = "machine_ids", .bytes = 100 * (TSDB_MACHINE_ID_LEN + 3) + 2 + VARSTR_HEADER_SIZE, .type= TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, +#ifdef TD_ENTERPRISE + {.name = "granted_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, + {.name = "active_code", .bytes = TSDB_UNIQ_ACTIVE_KEY_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, +#endif }; static const SSysDbTableSchema userDBSchema[] = { diff --git a/source/dnode/mgmt/mgmt_dnode/inc/dmInt.h b/source/dnode/mgmt/mgmt_dnode/inc/dmInt.h index 9e43c2af479..30067f0e011 100644 --- a/source/dnode/mgmt/mgmt_dnode/inc/dmInt.h +++ b/source/dnode/mgmt/mgmt_dnode/inc/dmInt.h @@ -54,6 +54,7 @@ int32_t dmProcessServerRunStatus(SDnodeMgmt *pMgmt, SRpcMsg *pMsg); int32_t dmProcessRetrieve(SDnodeMgmt *pMgmt, SRpcMsg *pMsg); int32_t dmProcessGrantReq(void *pInfo, SRpcMsg *pMsg); int32_t dmProcessGrantNotify(void *pInfo, SRpcMsg *pMsg); +int32_t dmProcessGetMachine(SDnodeMgmt *pMgmt, SRpcMsg *pMsg); // dmWorker.c int32_t dmPutNodeMsgToMgmtQueue(SDnodeMgmt *pMgmt, SRpcMsg *pMsg); diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c index ac943906192..1b3de806100 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c @@ -409,6 +409,32 @@ int32_t dmProcessRetrieve(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) { return TSDB_CODE_SUCCESS; } +int32_t dmProcessGetMachine(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) { + int32_t size = TSDB_MACHINE_ID_LEN; + terrno = 0; + void *pRsp = rpcMallocCont(size); + if (pRsp == NULL) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + dError("failed to retrieve data since %s", terrstr()); + return -1; + } + char *machineId = grantGetMachineId(); + if (machineId && (strlen(machineId) == TSDB_MACHINE_ID_LEN)) { + memcpy(pRsp, machineId, TSDB_MACHINE_ID_LEN); + } else { + terrno = TSDB_CODE_INVALID_DATA_FMT; + rpcFreeCont(pRsp); + pRsp = NULL; + size = 0; + } + + pMsg->code = terrno; + pMsg->info.rsp = pRsp; + pMsg->info.rspLen = size; + + return TSDB_CODE_SUCCESS; +} + SArray *dmGetMsgHandles() { int32_t code = -1; SArray *pArray = taosArrayInit(16, sizeof(SMgmtHandle)); @@ -425,11 +451,13 @@ SArray *dmGetMsgHandles() { if (dmSetMgmtHandle(pArray, TDMT_DND_SERVER_STATUS, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_DND_SYSTABLE_RETRIEVE, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_DND_ALTER_MNODE_TYPE, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER; + // Requests handled by MNODE if (dmSetMgmtHandle(pArray, TDMT_MND_GRANT, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_GRANT_NOTIFY, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_AUTH_RSP, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER; + if (dmSetMgmtHandle(pArray, TDMT_MND_GET_MACHINE, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER; code = 0; diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c b/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c index d6bdaf51bc4..b3971330b97 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c @@ -303,6 +303,9 @@ static void dmProcessMgmtQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) { case TDMT_MND_GRANT_NOTIFY: code = dmProcessGrantNotify(NULL, pMsg); break; + case TDMT_MND_GET_MACHINE: + code = dmProcessGetMachine(pMgmt, pMsg); + break; default: terrno = TSDB_CODE_MSG_NOT_PROCESSED; dGError("msg:%p, not processed in mgmt queue", pMsg); diff --git a/source/dnode/mnode/impl/inc/mndCluster.h b/source/dnode/mnode/impl/inc/mndCluster.h index 19f18d9a9d0..66c00bae11a 100644 --- a/source/dnode/mnode/impl/inc/mndCluster.h +++ b/source/dnode/mnode/impl/inc/mndCluster.h @@ -30,10 +30,6 @@ int64_t mndGetClusterCreateTime(SMnode *pMnode); int64_t mndGetClusterUpTime(SMnode *pMnode); int32_t mndGetClusterGrantedInfo(SMnode *pMnode, SGrantedInfo *pInfo); int32_t mndGetClusterActive(SMnode *pMnode, char* active); -int32_t mndGetClusterMachineIds(SMnode *pMnode, SArray *pIds); -int32_t mndProcessClusterMachineIds(SMnode *pMnode, SMachineId *pIds, int32_t nIds); -int32_t mndDupClusterObj(SClusterObj *pOld, SClusterObj *pNew); -void mndFreeClusterObj(SClusterObj *pCluster); #ifdef __cplusplus } diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 17ca969e4a9..2bee27c1649 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -197,8 +197,7 @@ typedef struct { int64_t updateTime; int32_t upTime; int64_t grantedTime; - SArray* pMachineIds; - char active[TSDB_UNIQ_ACTIVE_KEY_LEN + 1]; + char active[TSDB_UNIQ_ACTIVE_KEY_LEN]; } SClusterObj; typedef struct { diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c index f93eb9a95be..c408defc0d6 100644 --- a/source/dnode/mnode/impl/src/mndCluster.c +++ b/source/dnode/mnode/impl/src/mndCluster.c @@ -116,7 +116,7 @@ int32_t mndGetClusterActive(SMnode *pMnode, char *active) { void *pIter = NULL; SClusterObj *pCluster = mndAcquireCluster(pMnode, &pIter); if (pCluster) { - if (active) strncpy(active, pCluster->active, TSDB_UNIQ_ACTIVE_KEY_LEN + 1); + if (active) strncpy(active, pCluster->active, TSDB_UNIQ_ACTIVE_KEY_LEN); mndReleaseCluster(pMnode, pCluster, pIter); return 0; } @@ -124,22 +124,6 @@ int32_t mndGetClusterActive(SMnode *pMnode, char *active) { return -1; } -int32_t mndGetClusterMachineIds(SMnode *pMnode, SArray *pIds) { - int32_t code = -1; - void *pIter = NULL; - SClusterObj *pCluster = mndAcquireCluster(pMnode, &pIter); - if (pCluster) { - if (!pIds) pIds = taosArrayInit(taosArrayGetSize(pCluster->pMachineIds), sizeof(SMachineId)); - if (pIds) { - taosArrayAddAll(pIds, pCluster->pMachineIds); - code = 0; - } - mndReleaseCluster(pMnode, pCluster, pIter); - } - - return code; -} - int64_t mndGetClusterCreateTime(SMnode *pMnode) { int64_t createTime = 0; void *pIter = NULL; @@ -177,9 +161,7 @@ int64_t mndGetClusterUpTime(SMnode *pMnode) { static SSdbRaw *mndClusterActionEncode(SClusterObj *pCluster) { terrno = TSDB_CODE_OUT_OF_MEMORY; - int16_t nMachineIds = taosArrayGetSize(pCluster->pMachineIds); - int32_t machineSize = sizeof(int16_t) + nMachineIds * sizeof(SMachineId); - SSdbRaw *pRaw = sdbAllocRaw(SDB_CLUSTER, CLUSTER_VER_NUMBE, sizeof(SClusterObj) + machineSize + CLUSTER_RESERVE_SIZE); + SSdbRaw *pRaw = sdbAllocRaw(SDB_CLUSTER, CLUSTER_VER_NUMBE, sizeof(SClusterObj) + CLUSTER_RESERVE_SIZE); if (pRaw == NULL) goto _OVER; int32_t dataPos = 0; @@ -188,10 +170,8 @@ static SSdbRaw *mndClusterActionEncode(SClusterObj *pCluster) { SDB_SET_INT64(pRaw, dataPos, pCluster->updateTime, _OVER) SDB_SET_BINARY(pRaw, dataPos, pCluster->name, TSDB_CLUSTER_ID_LEN, _OVER) SDB_SET_INT32(pRaw, dataPos, pCluster->upTime, _OVER) - SDB_SET_INT16(pRaw, dataPos, nMachineIds, _OVER) - for (int16_t i = 0; i < nMachineIds; ++i) { - SDB_SET_BINARY(pRaw, dataPos, ((SMachineId*)TARRAY_GET_ELEM(pCluster->pMachineIds, i))->id, TSDB_MACHINE_ID_LEN, _OVER) - } + SDB_SET_INT64(pRaw, dataPos, pCluster->grantedTime, _OVER) + SDB_SET_BINARY(pRaw, dataPos, pCluster->active, TSDB_UNIQ_ACTIVE_KEY_LEN, _OVER) SDB_SET_RESERVE(pRaw, dataPos, CLUSTER_RESERVE_SIZE, _OVER) SDB_SET_DATALEN(pRaw, dataPos, _OVER); @@ -235,17 +215,8 @@ static SSdbRow *mndClusterActionDecode(SSdbRaw *pRaw) { SDB_GET_INT32(pRaw, dataPos, &pCluster->upTime, _OVER) if (sver > 1) { - int16_t nMachineIds = 0; - SDB_GET_INT16(pRaw, dataPos, &nMachineIds, _OVER) - if (nMachineIds > 0) { - pCluster->pMachineIds = taosArrayInit(nMachineIds, sizeof(SMachineId)); - if (!pCluster->pMachineIds) goto _OVER; - for (int16_t i = 0; i < nMachineIds; ++i) { - SDB_GET_BINARY(pRaw, dataPos, ((SMachineId *)TARRAY_GET_ELEM(pCluster->pMachineIds, i))->id, - TSDB_MACHINE_ID_LEN, _OVER) - ++TARRAY_SIZE(pCluster->pMachineIds); - } - } + SDB_GET_INT64(pRaw, dataPos, &pCluster->grantedTime, _OVER) + SDB_GET_BINARY(pRaw, dataPos, pCluster->active, TSDB_UNIQ_ACTIVE_KEY_LEN, _OVER) } SDB_GET_RESERVE(pRaw, dataPos, CLUSTER_RESERVE_SIZE, _OVER) @@ -255,7 +226,6 @@ _OVER: if (terrno != 0) { mError("cluster:%" PRId64 ", failed to decode from raw:%p since %s", pCluster == NULL ? 0 : pCluster->id, pRaw, terrstr()); - mndFreeClusterObj(pCluster); taosMemoryFreeClear(pRow); return NULL; } @@ -273,7 +243,6 @@ static int32_t mndClusterActionInsert(SSdb *pSdb, SClusterObj *pCluster) { static int32_t mndClusterActionDelete(SSdb *pSdb, SClusterObj *pCluster) { mTrace("cluster:%" PRId64 ", perform delete action, row:%p", pCluster->id, pCluster); - mndFreeClusterObj(pCluster); return 0; } @@ -299,23 +268,10 @@ static int32_t mndCreateDefaultCluster(SMnode *pMnode) { clusterObj.id = mndGenerateUid(clusterObj.name, TSDB_CLUSTER_ID_LEN); clusterObj.id = (clusterObj.id >= 0 ? clusterObj.id : -clusterObj.id); pMnode->clusterId = clusterObj.id; - clusterObj.pMachineIds = taosArrayInit(1, sizeof(SMachineId)); - if(!clusterObj.pMachineIds) { - return -1; - } - char *machineId = grantGetMachineId(); - if (machineId) { - taosArrayPush(clusterObj.pMachineIds, machineId); - taosMemoryFree(machineId); - } - mInfo("cluster:%" PRId64 ", name is %s", clusterObj.id, clusterObj.name); SSdbRaw *pRaw = mndClusterActionEncode(&clusterObj); - if (pRaw == NULL) { - mndFreeClusterObj(&clusterObj); - return -1; - } + if (pRaw == NULL) return -1; (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY); mInfo("cluster:%" PRId64 ", will be created when deploying, raw:%p", clusterObj.id, pRaw); @@ -323,7 +279,6 @@ static int32_t mndCreateDefaultCluster(SMnode *pMnode) { STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, NULL, "create-cluster"); if (pTrans == NULL) { sdbFreeRaw(pRaw); - mndFreeClusterObj(&clusterObj); mError("cluster:%" PRId64 ", failed to create since %s", clusterObj.id, terrstr()); return -1; } @@ -332,7 +287,6 @@ static int32_t mndCreateDefaultCluster(SMnode *pMnode) { if (mndTransAppendCommitlog(pTrans, pRaw) != 0) { mError("trans:%d, failed to commit redo log since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); - mndFreeClusterObj(&clusterObj); return -1; } (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY); @@ -340,12 +294,10 @@ static int32_t mndCreateDefaultCluster(SMnode *pMnode) { if (mndTransPrepare(pMnode, pTrans) != 0) { mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); - mndFreeClusterObj(&clusterObj); return -1; } mndTransDrop(pTrans); - mndFreeClusterObj(&clusterObj); return 0; } @@ -389,31 +341,15 @@ static int32_t mndRetrieveClusters(SRpcMsg *pMsg, SShowObj *pShow, SSDataBlock * colDataSetVal(pColInfo, numOfRows, (const char *)&tsExpireTime, false); } +#ifdef TD_ENTERPRISE pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); - int32_t nMachidIds = taosArrayGetSize(pCluster->pMachineIds); - char *pBuf = - taosMemoryCalloc(1, (nMachidIds > 0 ? nMachidIds * (TSDB_MACHINE_ID_LEN + 3) : 1) + 2 + VARSTR_HEADER_SIZE); - VarDataLenT nPos = 0; - if (pBuf) { - nPos += VARSTR_HEADER_SIZE; - snprintf(pBuf + nPos, 2, "["); - ++nPos; - for (int32_t i = 0; i < nMachidIds; ++i) { - snprintf(pBuf + nPos, TSDB_MACHINE_ID_LEN + 2, "\"%s", - ((SMachineId *)TARRAY_GET_ELEM(pCluster->pMachineIds, i))->id); - nPos += TSDB_MACHINE_ID_LEN + 1; - snprintf(pBuf + nPos, 3, "\","); - nPos += 2; - } - if (nMachidIds > 0) --nPos; - snprintf(pBuf + nPos, 2, "]"); - ++nPos; - *(VarDataLenT *)(pBuf) = nPos - VARSTR_HEADER_SIZE; - colDataSetVal(pColInfo, numOfRows, pBuf, false); - taosMemoryFree(pBuf); - } else { - colDataSetNULL(pColInfo, numOfRows); - } + colDataSetVal(pColInfo, numOfRows, (const char *)&pCluster->grantedTime, false); + + char active[TSDB_UNIQ_ACTIVE_KEY_LEN + VARSTR_HEADER_SIZE] = {0}; + STR_WITH_MAXSIZE_TO_VARSTR(active, pCluster->active, pShow->pMeta->pSchemas[cols].bytes); + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + colDataSetVal(pColInfo, numOfRows, (const char *)&active, false); +#endif sdbRelease(pSdb, pCluster); numOfRows++; @@ -434,33 +370,24 @@ static int32_t mndProcessUptimeTimer(SRpcMsg *pReq) { void *pIter = NULL; SClusterObj *pCluster = mndAcquireCluster(pMnode, &pIter); if (pCluster != NULL) { - if(mndDupClusterObj(pCluster, &clusterObj) != 0){ - mndReleaseCluster(pMnode, pCluster, pIter); - mndFreeClusterObj(&clusterObj); - return -1; - } + memcpy(&clusterObj, pCluster, sizeof(SClusterObj)); clusterObj.upTime += tsUptimeInterval; mndReleaseCluster(pMnode, pCluster, pIter); } if (clusterObj.id <= 0) { mError("can't get cluster info while update uptime"); - mndFreeClusterObj(&clusterObj); return 0; } mInfo("update cluster uptime to %d", clusterObj.upTime); STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "update-uptime"); - if (pTrans == NULL) { - mndFreeClusterObj(&clusterObj); - return -1; - } + if (pTrans == NULL) return -1; SSdbRaw *pCommitRaw = mndClusterActionEncode(&clusterObj); if (pCommitRaw == NULL || mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) { mError("trans:%d, failed to append commit log since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); - mndFreeClusterObj(&clusterObj); return -1; } (void)sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY); @@ -468,102 +395,9 @@ static int32_t mndProcessUptimeTimer(SRpcMsg *pReq) { if (mndTransPrepare(pMnode, pTrans) != 0) { mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); - mndFreeClusterObj(&clusterObj); return -1; } mndTransDrop(pTrans); - mndFreeClusterObj(&clusterObj); - return 0; -} - -int32_t mndDupClusterObj(SClusterObj *pOld, SClusterObj *pNew) { - memcpy(pNew, pOld, sizeof(SClusterObj)); - pNew->updateTime = taosGetTimestampMs(); - pNew->pMachineIds = taosArrayInit(taosArrayGetSize(pOld->pMachineIds), sizeof(SMachineId)); - if (!pNew->pMachineIds) return -1; - taosArrayAddAll(pNew->pMachineIds, pOld->pMachineIds); - return 0; -} - -void mndFreeClusterObj(SClusterObj *pCluster) { - if (pCluster) { - pCluster->pMachineIds = taosArrayDestroy(pCluster->pMachineIds); - } -} - -int32_t mndProcessClusterMachineIds(SMnode *pMnode, SMachineId *pIds, int32_t nIds) { - SClusterObj clusterObj = {0}; - void *pIter = NULL; - SClusterObj *pCluster = mndAcquireCluster(pMnode, &pIter); - if (pCluster != NULL) { - int32_t nDups = 0; - int32_t size = taosArrayGetSize(pCluster->pMachineIds); - for (int32_t n = 0; n < nIds; ++n) { - bool exist = false; - for (int32_t i = 0; i < size; ++i) { - SMachineId *pId = TARRAY_GET_ELEM(pCluster->pMachineIds, i); - if (0 == strncmp(pId->id, (pIds + nIds)->id, TSDB_MACHINE_ID_LEN + 1)) { - exist = true; - ++nDups; - break; - } - } - if (!exist) { - if (!clusterObj.pMachineIds) { - if(mndDupClusterObj(pCluster, &clusterObj) != 0){ - mndReleaseCluster(pMnode, pCluster, pIter); - mndFreeClusterObj(&clusterObj); - return -1; - } - } - if (!taosArrayPush(clusterObj.pMachineIds, pIds + n)) { - mndReleaseCluster(pMnode, pCluster, pIter); - mndFreeClusterObj(&clusterObj); - terrno = TSDB_CODE_OUT_OF_MEMORY; - return -1; - } - } - } - - if (nDups == nIds) { - mndReleaseCluster(pMnode, pCluster, pIter); - mndFreeClusterObj(&clusterObj); - return 0; - } - - mndReleaseCluster(pMnode, pCluster, pIter); - } - - if (clusterObj.id <= 0) { - mError("can't get cluster info while process machine-id"); - mndFreeClusterObj(&clusterObj); - return -1; - } - - STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, NULL, "machine-id"); - if (pTrans == NULL) { - mndFreeClusterObj(&clusterObj); - return -1; - } - - SSdbRaw *pCommitRaw = mndClusterActionEncode(&clusterObj); - if (pCommitRaw == NULL || mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) { - mError("trans:%d, failed to append commit log since %s", pTrans->id, terrstr()); - mndTransDrop(pTrans); - mndFreeClusterObj(&clusterObj); - return -1; - } - (void)sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY); - - if (mndTransPrepare(pMnode, pTrans) != 0) { - mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); - mndTransDrop(pTrans); - mndFreeClusterObj(&clusterObj); - return -1; - } - - mndTransDrop(pTrans); - mndFreeClusterObj(&clusterObj); return 0; } diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index f1ed05183bf..e51dbde69bf 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -58,6 +58,11 @@ enum { DND_DROP, }; +typedef struct { + char machineId[TSDB_MACHINE_ID_LEN + 1]; + tsem_t sem; +} SMachineInfo; + static int32_t mndCreateDefaultDnode(SMnode *pMnode); static SSdbRaw *mndDnodeActionEncode(SDnodeObj *pDnode); static SSdbRow *mndDnodeActionDecode(SSdbRaw *pRaw); @@ -71,6 +76,7 @@ static int32_t mndProcessCreateDnodeReq(SRpcMsg *pReq); static int32_t mndProcessDropDnodeReq(SRpcMsg *pReq); static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq); static int32_t mndProcessConfigDnodeRsp(SRpcMsg *pRsp); +static int32_t mndProcessGetMachineRsp(SRpcMsg *pRsp); static int32_t mndProcessStatusReq(SRpcMsg *pReq); static int32_t mndProcessNotifyReq(SRpcMsg *pReq); static int32_t mndProcessRestoreDnodeReq(SRpcMsg *pReq); @@ -104,6 +110,7 @@ int32_t mndInitDnode(SMnode *pMnode) { mndSetMsgHandle(pMnode, TDMT_MND_DROP_DNODE, mndProcessDropDnodeReq); mndSetMsgHandle(pMnode, TDMT_MND_CONFIG_DNODE, mndProcessConfigDnodeReq); mndSetMsgHandle(pMnode, TDMT_DND_CONFIG_DNODE_RSP, mndProcessConfigDnodeRsp); + mndSetMsgHandle(pMnode, TDMT_MND_GET_MACHINE_RSP, mndProcessGetMachineRsp); mndSetMsgHandle(pMnode, TDMT_MND_STATUS, mndProcessStatusReq); mndSetMsgHandle(pMnode, TDMT_MND_NOTIFY, mndProcessNotifyReq); mndSetMsgHandle(pMnode, TDMT_MND_DNODE_LIST, mndProcessDnodeListReq); @@ -734,10 +741,24 @@ _OVER: return code; } +static int32_t mndSendGetMachineToDnode(SMnode *pMnode, SDnodeObj *pObj, SMachineInfo *pInfo) { + SRpcMsg rpcMsg = {.pCont = NULL, .contLen = 0, .msgType = TDMT_MND_GET_MACHINE, .info.ahandle = pInfo}; + + mDebug("send get machine msg to dnode:%d %s", pObj->id, pObj->ep); + + SEpSet epSet = {.numOfEps = 1}; + strncpy(epSet.eps[0].fqdn, pObj->fqdn, TSDB_FQDN_LEN); + epSet.eps[0].port = pObj->port; + tmsgSendReq(&epSet, &rpcMsg); + + return TSDB_CODE_SUCCESS; +} + static int32_t mndCreateDnode(SMnode *pMnode, SRpcMsg *pReq, SCreateDnodeReq *pCreate) { - int32_t code = -1; - SSdbRaw *pRaw = NULL; - STrans *pTrans = NULL; + int32_t code = -1; + SSdbRaw *pRaw = NULL; + STrans *pTrans = NULL; + SMachineInfo *pInfo = NULL; SDnodeObj dnodeObj = {0}; dnodeObj.id = sdbGetMaxId(pMnode->pSdb, SDB_DNODE); @@ -746,11 +767,14 @@ static int32_t mndCreateDnode(SMnode *pMnode, SRpcMsg *pReq, SCreateDnodeReq *pC dnodeObj.port = pCreate->port; tstrncpy(dnodeObj.fqdn, pCreate->fqdn, TSDB_FQDN_LEN); snprintf(dnodeObj.ep, TSDB_EP_LEN - 1, "%s:%u", pCreate->fqdn, pCreate->port); - char *machineId = grantGetMachineId(); - if (machineId) { - memcpy(dnodeObj.machineId, machineId, TSDB_MACHINE_ID_LEN); + if (!(pInfo = taosMemoryCalloc(1, sizeof(*pInfo)))) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _OVER; } - + tsem_init(&pInfo->sem, 0, 0); + mndSendGetMachineToDnode(pMnode, &dnodeObj, pInfo); + tsem_wait(&pInfo->sem); + memcpy(dnodeObj.machineId, pInfo->machineId, TSDB_MACHINE_ID_LEN); pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_GLOBAL, pReq, "create-dnode"); if (pTrans == NULL) goto _OVER; mInfo("trans:%d, used to create dnode:%s", pTrans->id, dnodeObj.ep); @@ -768,6 +792,10 @@ static int32_t mndCreateDnode(SMnode *pMnode, SRpcMsg *pReq, SCreateDnodeReq *pC _OVER: mndTransDrop(pTrans); sdbFreeRaw(pRaw); + if(pInfo) { + tsem_destroy(&pInfo->sem); + taosMemoryFree(pInfo); + } return code; } @@ -1239,6 +1267,21 @@ static int32_t mndProcessConfigDnodeRsp(SRpcMsg *pRsp) { return 0; } +static int32_t mndProcessGetMachineRsp(SRpcMsg *pRsp) { + if (pRsp->code != 0 || pRsp->contLen != TSDB_MACHINE_ID_LEN || pRsp->pCont == NULL) { + mError("failed to get machine since %s", tstrerror(pRsp->code ? pRsp->code : TSDB_CODE_INVALID_MSG)); + return -1; + } + + SMachineInfo *pInfo = pRsp->info.ahandle; + if (pInfo) { + memcpy(pInfo->machineId, pRsp->pCont, TSDB_MACHINE_ID_LEN); + tsem_post(&pInfo->sem); + } + + return 0; +} + static int32_t mndRetrieveConfigs(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { SMnode *pMnode = pReq->info.node; int32_t totalRows = 0; @@ -1349,11 +1392,7 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB taosMemoryFreeClear(b); #ifdef TD_ENTERPRISE - STR_TO_VARSTR(buf, pDnode->active); - pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); - colDataSetVal(pColInfo, numOfRows, buf, false); - - STR_TO_VARSTR(buf, pDnode->connActive); + STR_TO_VARSTR(buf, pDnode->machineId); pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); colDataSetVal(pColInfo, numOfRows, buf, false); #endif From f850ccbfd4c26d7626ae8eec9eb84c1360887a2e Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 7 Dec 2023 16:00:13 +0800 Subject: [PATCH 06/93] feat: support uniq grant --- source/dnode/mgmt/mgmt_mnode/src/mmHandle.c | 1 + source/dnode/mgmt/node_mgmt/src/dmTransport.c | 3 +- source/dnode/mnode/impl/src/mndDnode.c | 35 +++++++++++-------- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c index 737a0338ef9..45bd3d787bc 100644 --- a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c +++ b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c @@ -109,6 +109,7 @@ SArray *mmGetMsgHandles() { if (dmSetMgmtHandle(pArray, TDMT_DND_CREATE_VNODE_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_DND_DROP_VNODE_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_DND_CONFIG_DNODE_RSP, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; + if (dmSetMgmtHandle(pArray, TDMT_MND_GET_MACHINE_RSP, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_DND_ALTER_MNODE_TYPE_RSP, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_DND_ALTER_VNODE_TYPE_RSP, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_DND_CHECK_VNODE_LEARNER_CATCHUP_RSP, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; diff --git a/source/dnode/mgmt/node_mgmt/src/dmTransport.c b/source/dnode/mgmt/node_mgmt/src/dmTransport.c index ad5ca2cecfa..804834afba5 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmTransport.c +++ b/source/dnode/mgmt/node_mgmt/src/dmTransport.c @@ -290,8 +290,7 @@ static inline int32_t dmSendReq(const SEpSet *pEpSet, SRpcMsg *pMsg) { dError("failed to send rpc msg:%s since %s, handle:%p", TMSG_INFO(pMsg->msgType), terrstr(), pMsg->info.handle); return -1; } else { - rpcSendRequest(pDnode->trans.clientRpc, pEpSet, pMsg, NULL); - return 0; + return rpcSendRequest(pDnode->trans.clientRpc, pEpSet, pMsg, NULL); } } diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index e51dbde69bf..856d2a1e1e7 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -146,6 +146,7 @@ static int32_t mndCreateDefaultDnode(SMnode *pMnode) { char *machineId = grantGetMachineId(); if (machineId) { memcpy(dnodeObj.machineId, machineId, TSDB_MACHINE_ID_LEN); + taosMemoryFreeClear(machineId); } pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, NULL, "create-dnode"); @@ -743,15 +744,10 @@ _OVER: static int32_t mndSendGetMachineToDnode(SMnode *pMnode, SDnodeObj *pObj, SMachineInfo *pInfo) { SRpcMsg rpcMsg = {.pCont = NULL, .contLen = 0, .msgType = TDMT_MND_GET_MACHINE, .info.ahandle = pInfo}; - - mDebug("send get machine msg to dnode:%d %s", pObj->id, pObj->ep); - - SEpSet epSet = {.numOfEps = 1}; + SEpSet epSet = {.numOfEps = 1}; strncpy(epSet.eps[0].fqdn, pObj->fqdn, TSDB_FQDN_LEN); epSet.eps[0].port = pObj->port; - tmsgSendReq(&epSet, &rpcMsg); - - return TSDB_CODE_SUCCESS; + return tmsgSendReq(&epSet, &rpcMsg); } static int32_t mndCreateDnode(SMnode *pMnode, SRpcMsg *pReq, SCreateDnodeReq *pCreate) { @@ -768,13 +764,22 @@ static int32_t mndCreateDnode(SMnode *pMnode, SRpcMsg *pReq, SCreateDnodeReq *pC tstrncpy(dnodeObj.fqdn, pCreate->fqdn, TSDB_FQDN_LEN); snprintf(dnodeObj.ep, TSDB_EP_LEN - 1, "%s:%u", pCreate->fqdn, pCreate->port); if (!(pInfo = taosMemoryCalloc(1, sizeof(*pInfo)))) { - code = TSDB_CODE_OUT_OF_MEMORY; + terrno = TSDB_CODE_OUT_OF_MEMORY; goto _OVER; } tsem_init(&pInfo->sem, 0, 0); - mndSendGetMachineToDnode(pMnode, &dnodeObj, pInfo); - tsem_wait(&pInfo->sem); - memcpy(dnodeObj.machineId, pInfo->machineId, TSDB_MACHINE_ID_LEN); + if ((terrno = mndSendGetMachineToDnode(pMnode, &dnodeObj, pInfo)) != 0) { + goto _OVER; + } + if (tsem_timewait(&pInfo->sem, 1000) < 0) { + terrno = TSDB_CODE_DNODE_OFFLINE; + goto _OVER; + } + if (strlen(pInfo->machineId) == TSDB_MACHINE_ID_LEN) { + memcpy(dnodeObj.machineId, pInfo->machineId, TSDB_MACHINE_ID_LEN); + } else { + mWarn("Invalid machineId:%s to create dnode:%s", pInfo->machineId, dnodeObj.fqdn); + } pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_GLOBAL, pReq, "create-dnode"); if (pTrans == NULL) goto _OVER; mInfo("trans:%d, used to create dnode:%s", pTrans->id, dnodeObj.ep); @@ -792,7 +797,7 @@ static int32_t mndCreateDnode(SMnode *pMnode, SRpcMsg *pReq, SCreateDnodeReq *pC _OVER: mndTransDrop(pTrans); sdbFreeRaw(pRaw); - if(pInfo) { + if (pInfo) { tsem_destroy(&pInfo->sem); taosMemoryFree(pInfo); } @@ -948,8 +953,10 @@ static int32_t mndProcessCreateDnodeReq(SRpcMsg *pReq) { } code = mndCreateDnode(pMnode, pReq, &createReq); - if (code == 0) code = TSDB_CODE_ACTION_IN_PROGRESS; - tsGrantHBInterval = 5; + if (code == 0) { + code = TSDB_CODE_ACTION_IN_PROGRESS; + tsGrantHBInterval = 5; + } char obj[200] = {0}; sprintf(obj, "%s:%d", createReq.fqdn, createReq.port); From 2309e577c6358cc9b2834a490661198ff4868b06 Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 7 Dec 2023 19:50:16 +0800 Subject: [PATCH 07/93] feat: support uniq grant --- include/common/tgrant.h | 73 ++++++++++++-------------- source/dnode/mnode/impl/src/mndGrant.c | 36 ------------- 2 files changed, 35 insertions(+), 74 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index 4abb24aa95c..ac1b8cdf9c5 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -68,46 +68,43 @@ char* grantGetMachineId(); #ifndef GRANTS_CFG #ifdef TD_ENTERPRISE -#define GRANTS_SCHEMA \ - static const SSysDbTableSchema grantsSchema[] = { \ - {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "storage", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "databases", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "users", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "accounts", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "connections", .bytes = 11 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "streams", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "cpu_cores", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "speed", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "querytime", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "opc_da", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "opc_ua", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "pi", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "kafka", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "influxdb", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "mqtt", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ +#define GRANTS_SCHEMA \ + static const SSysDbTableSchema grantsSchema[] = { \ + {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "streams", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "topics", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "cpu_cores", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "multi_tier_storage_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "streams_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "topics_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "audit_log_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "backup_restore_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "data_replication_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "opc_da", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "opc_ua", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "pi", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "kafka", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "influxdb", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "mqtt", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "opentsdb", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "tdengine2.6", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "tdengine3.0", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ } #else -#define GRANTS_SCHEMA \ - static const SSysDbTableSchema grantsSchema[] = { \ - {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "storage", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "databases", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "users", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "accounts", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "connections", .bytes = 11 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "streams", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "cpu_cores", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "speed", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "querytime", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ +#define GRANTS_SCHEMA \ + static const SSysDbTableSchema grantsSchema[] = { \ + {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "streams", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "topics", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "cpu_cores", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ } #endif #define GRANT_CFG_ADD diff --git a/source/dnode/mnode/impl/src/mndGrant.c b/source/dnode/mnode/impl/src/mndGrant.c index 7a875b37947..1c30a2a1393 100644 --- a/source/dnode/mnode/impl/src/mndGrant.c +++ b/source/dnode/mnode/impl/src/mndGrant.c @@ -73,42 +73,6 @@ static int32_t mndRetrieveGrant(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); colDataSetVal(pColInfo, numOfRows, tmp, false); - cols++; - pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - src = "unlimited"; - STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); - colDataSetVal(pColInfo, numOfRows, tmp, false); - - cols++; - pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - src = "unlimited"; - STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); - colDataSetVal(pColInfo, numOfRows, tmp, false); - - cols++; - pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - src = "unlimited"; - STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); - colDataSetVal(pColInfo, numOfRows, tmp, false); - - cols++; - pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - src = "unlimited"; - STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); - colDataSetVal(pColInfo, numOfRows, tmp, false); - - cols++; - pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - src = "unlimited"; - STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); - colDataSetVal(pColInfo, numOfRows, tmp, false); - - cols++; - pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - src = "unlimited"; - STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); - colDataSetVal(pColInfo, numOfRows, tmp, false); - numOfRows++; } From fe01fb635d67cd7d91bf89b4982d48c5622bda5a Mon Sep 17 00:00:00 2001 From: kailixu Date: Fri, 8 Dec 2023 18:07:17 +0800 Subject: [PATCH 08/93] feat: support uniq grant --- include/common/tgrant.h | 4 +--- source/dnode/mgmt/mgmt_dnode/src/dmHandle.c | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index ac1b8cdf9c5..52f81e5b80f 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -22,9 +22,7 @@ extern "C" { #include "os.h" #include "taoserror.h" -#ifdef GRANTS_CFG -#include "tgrantCfg.h" -#endif +#include "tdef.h" #ifndef GRANTS_COL_MAX_LEN #define GRANTS_COL_MAX_LEN 196 diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c index 1b3de806100..8c4e8b275ee 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c @@ -419,8 +419,9 @@ int32_t dmProcessGetMachine(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) { return -1; } char *machineId = grantGetMachineId(); - if (machineId && (strlen(machineId) == TSDB_MACHINE_ID_LEN)) { + if (machineId) { memcpy(pRsp, machineId, TSDB_MACHINE_ID_LEN); + taosMemoryFreeClear(machineId); } else { terrno = TSDB_CODE_INVALID_DATA_FMT; rpcFreeCont(pRsp); From 458c85c0ab3be11c18bdf9e8f41b573b49d76da1 Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 12 Dec 2023 15:21:52 +0800 Subject: [PATCH 09/93] chore: tdes code optimization --- source/util/src/tdes.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/util/src/tdes.c b/source/util/src/tdes.c index 0e0193a1236..a4da08630ef 100644 --- a/source/util/src/tdes.c +++ b/source/util/src/tdes.c @@ -48,6 +48,10 @@ char* taosDesImp(uint8_t* key, char* src, uint32_t len, int32_t process_mode) { key_set key_sets[17]; memset(key_sets, 0, sizeof(key_sets)); char* dest = taosMemoryCalloc(len + 1, 1); + if (!dest) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + return NULL; + } generate_sub_keys(key, key_sets); for (uint32_t block_count = 0; block_count < number_of_blocks; block_count++) { @@ -61,7 +65,10 @@ char* taosDesImp(uint8_t* key, char* src, uint32_t len, int32_t process_mode) { } char* taosDesEncode(int64_t key, char* src, int32_t len) { - if (len % 8 != 0) return NULL; + if (len % 8 != 0) { + terrno = TSDB_CODE_INVALID_PARA; + return NULL; + } uint8_t* keyStr = (uint8_t*)(&key); return taosDesImp(keyStr, src, len, ENCRYPTION_MODE); } From e2fcf790891ca1b568ab588acc2e87db99202131 Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 14 Dec 2023 10:28:56 +0800 Subject: [PATCH 10/93] chore: remove obsolote code --- source/dnode/mgmt/node_mgmt/inc/dmMgmt.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/source/dnode/mgmt/node_mgmt/inc/dmMgmt.h b/source/dnode/mgmt/node_mgmt/inc/dmMgmt.h index a2326138b62..0313998d2fa 100644 --- a/source/dnode/mgmt/node_mgmt/inc/dmMgmt.h +++ b/source/dnode/mgmt/node_mgmt/inc/dmMgmt.h @@ -70,7 +70,6 @@ typedef struct SUdfdData { int32_t dnodeId; } SUdfdData; -#ifndef TD_MODULE_OPTIMIZE typedef struct SDnode { int8_t once; bool stop; @@ -84,21 +83,6 @@ typedef struct SDnode { SMgmtWrapper wrappers[NODE_END]; SDnodeTrans trans; } SDnode; -#else -typedef struct SDnode { - int8_t once; - bool stop; - EDndRunStatus status; - SStartupInfo startup; - SDnodeTrans trans; - SUdfdData udfdData; - TdThreadMutex mutex; - TdFilePtr lockfile; - SDnodeData data; - STfs *pTfs; - SMgmtWrapper wrappers[NODE_END]; -} SDnode; -#endif // dmEnv.c SDnode *dmInstance(); From 8a23afbb32c9907f35631b8fd7e9ec00c8112208 Mon Sep 17 00:00:00 2001 From: kailixu Date: Fri, 15 Dec 2023 10:16:02 +0800 Subject: [PATCH 11/93] fix: msgdef and uniq active len --- include/common/tmsgdef.h | 2 +- include/util/tdef.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/common/tmsgdef.h b/include/common/tmsgdef.h index c411677989c..63a63991c4e 100644 --- a/include/common/tmsgdef.h +++ b/include/common/tmsgdef.h @@ -338,7 +338,7 @@ TD_DEF_MSG_TYPE(TDMT_VND_ALTER_CONFIG, "alter-config", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_SYNC_UNUSED_CODE, "sync-unused", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_SYNC_FORCE_FOLLOWER, "sync-force-become-follower", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_SYNC_MAX_MSG, "sync-max", NULL, NULL) - TD_CLOSE_MSG_TYPE(TDMT_END_SYNC_MSG) + TD_CLOSE_MSG_SEG(TDMT_END_SYNC_MSG) TD_NEW_MSG_SEG(TDMT_VND_STREAM_MSG) //7 << 8 diff --git a/include/util/tdef.h b/include/util/tdef.h index 4ef0da1e592..060cfd4d86f 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -287,7 +287,7 @@ typedef enum ELogicConditionType { #define TSDB_ACTIVE_KEY_LEN 109 #define TSDB_CONN_ACTIVE_KEY_LEN 255 -#define TSDB_UNIQ_ACTIVE_KEY_LEN 256 +#define TSDB_UNIQ_ACTIVE_KEY_LEN 249 #define TSDB_DEFAULT_PKT_SIZE 65480 // same as RPC_MAX_UDP_SIZE #define TSDB_SNAP_DATA_PAYLOAD_SIZE (1 * 1024 * 1024) From b54f816c2adce7a9b2f862d2939e50f8973ca9f6 Mon Sep 17 00:00:00 2001 From: kailixu Date: Mon, 18 Dec 2023 14:18:52 +0800 Subject: [PATCH 12/93] feat: support uniq grant --- include/common/tmsg.h | 3 ++- include/libs/nodes/cmdnodes.h | 6 ++++++ source/libs/nodes/src/nodesUtilFuncs.c | 4 ++++ source/libs/parser/inc/parAst.h | 1 + source/libs/parser/inc/sql.y | 4 ++++ source/libs/parser/src/parAstCreater.c | 11 +++++++++++ 6 files changed, 28 insertions(+), 1 deletion(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index aff1bd55e44..3f69c9c1db4 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -295,7 +295,8 @@ typedef enum ENodeType { QUERY_NODE_SYNCDB_STMT, QUERY_NODE_GRANT_STMT, QUERY_NODE_REVOKE_STMT, - // placeholder for [152, 180] + QUERY_NODE_ALTER_CLUSTER_STMT, + // placeholder for [153, 180] QUERY_NODE_SHOW_CREATE_VIEW_STMT = 181, QUERY_NODE_SHOW_CREATE_DATABASE_STMT, QUERY_NODE_SHOW_CREATE_TABLE_STMT, diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index ac4f5bea0e9..81d150507e4 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -407,6 +407,12 @@ typedef struct SDropCGroupStmt { bool ignoreNotExists; } SDropCGroupStmt; +typedef struct SAlterClusterStmt { + ENodeType type; + char config[TSDB_DNODE_CONFIG_LEN]; + char value[TSDB_DNODE_VALUE_LEN]; +} SAlterClusterStmt; + typedef struct SAlterLocalStmt { ENodeType type; char config[TSDB_DNODE_CONFIG_LEN]; diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index e730ccf21b2..057062befaa 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -409,6 +409,8 @@ SNode* nodesMakeNode(ENodeType type) { return makeNode(type, sizeof(SGrantStmt)); case QUERY_NODE_REVOKE_STMT: return makeNode(type, sizeof(SRevokeStmt)); + case QUERY_NODE_ALTER_CLUSTER_STMT: + return makeNode(type, sizeof(SAlterClusterStmt)); case QUERY_NODE_SHOW_DNODES_STMT: case QUERY_NODE_SHOW_MNODES_STMT: case QUERY_NODE_SHOW_MODULES_STMT: @@ -1039,6 +1041,8 @@ void nodesDestroyNode(SNode* pNode) { case QUERY_NODE_REVOKE_STMT: nodesDestroyNode(((SRevokeStmt*)pNode)->pTagCond); break; + case QUERY_NODE_ALTER_CLUSTER_STMT: // no pointer field + break; case QUERY_NODE_SHOW_DNODES_STMT: case QUERY_NODE_SHOW_MNODES_STMT: case QUERY_NODE_SHOW_MODULES_STMT: diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index c863c1e0ee5..fd617a9d2d2 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -225,6 +225,7 @@ SNode* createCreateTopicStmtUseTable(SAstCreateContext* pCxt, bool ignoreExists, int8_t withMeta, SNode* pWhere); SNode* createDropTopicStmt(SAstCreateContext* pCxt, bool ignoreNotExists, SToken* pTopicName); SNode* createDropCGroupStmt(SAstCreateContext* pCxt, bool ignoreNotExists, SToken* pCGroupId, SToken* pTopicName); +SNode* createAlterClusterStmt(SAstCreateContext* pCxt, const SToken* pConfig, const SToken* pValue); SNode* createAlterLocalStmt(SAstCreateContext* pCxt, const SToken* pConfig, const SToken* pValue); SNode* createDefaultExplainOptions(SAstCreateContext* pCxt); SNode* setExplainVerbose(SAstCreateContext* pCxt, SNode* pOptions, const SToken* pVal); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 9bcf65dbbe4..295b2065a8c 100755 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -172,6 +172,10 @@ force_opt(A) ::= FORCE. %destructor unsafe_opt { } unsafe_opt(A) ::= UNSAFE. { A = true; } +/************************************************ alter cluster *********************************************************/ +cmd ::= ALTER CLUSTER NK_STRING(A). { pCxt->pRootNode = createAlterClusterStmt(pCxt, &A, NULL); } +cmd ::= ALTER CLUSTER NK_STRING(A) NK_STRING(B). { pCxt->pRootNode = createAlterClsuterStmt(pCxt, &A, &B); } + /************************************************ alter local *********************************************************/ cmd ::= ALTER LOCAL NK_STRING(A). { pCxt->pRootNode = createAlterLocalStmt(pCxt, &A, NULL); } cmd ::= ALTER LOCAL NK_STRING(A) NK_STRING(B). { pCxt->pRootNode = createAlterLocalStmt(pCxt, &A, &B); } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 3ae82c36158..f0bd7b23037 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -2149,6 +2149,17 @@ SNode* createDropCGroupStmt(SAstCreateContext* pCxt, bool ignoreNotExists, SToke return (SNode*)pStmt; } +SNode* createAlterClusterStmt(SAstCreateContext* pCxt, const SToken* pConfig, const SToken* pValue) { + CHECK_PARSER_STATUS(pCxt); + SAlterClusterStmt* pStmt = (SAlterClusterStmt*)nodesMakeNode(QUERY_NODE_ALTER_CLUSTER_STMT); + CHECK_OUT_OF_MEM(pStmt); + trimString(pConfig->z, pConfig->n, pStmt->config, sizeof(pStmt->config)); + if (NULL != pValue) { + trimString(pValue->z, pValue->n, pStmt->value, sizeof(pStmt->value)); + } + return (SNode*)pStmt; +} + SNode* createAlterLocalStmt(SAstCreateContext* pCxt, const SToken* pConfig, const SToken* pValue) { CHECK_PARSER_STATUS(pCxt); SAlterLocalStmt* pStmt = (SAlterLocalStmt*)nodesMakeNode(QUERY_NODE_ALTER_LOCAL_STMT); From 70006bb711ddb7306e91434b59dab8f1305259dd Mon Sep 17 00:00:00 2001 From: kailixu Date: Mon, 18 Dec 2023 16:34:31 +0800 Subject: [PATCH 13/93] feat: support alter cluster --- include/common/tmsg.h | 11 + include/common/tmsgdef.h | 1 + source/common/src/tmsg.c | 31 + source/dnode/mgmt/mgmt_mnode/src/mmHandle.c | 1 + source/dnode/mgmt/node_mgmt/inc/dmMgmt.h | 11 +- source/dnode/mgmt/node_mgmt/src/dmMgmt.c | 8 - source/dnode/mgmt/node_mgmt/src/dmTransport.c | 28 - source/dnode/mnode/impl/inc/mndDef.h | 1 + source/dnode/mnode/impl/src/mndCluster.c | 57 + source/libs/nodes/src/nodesCodeFuncs.c | 31 + source/libs/parser/inc/sql.y | 2 +- source/libs/parser/src/parTranslater.c | 18 + source/libs/parser/src/sql.c | 7833 +++++++---------- 13 files changed, 3453 insertions(+), 4580 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 5b5cf993fa9..f815d689c58 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -2023,6 +2023,17 @@ int32_t tSerializeSExplainRsp(void* buf, int32_t bufLen, SExplainRsp* pRsp); int32_t tDeserializeSExplainRsp(void* buf, int32_t bufLen, SExplainRsp* pRsp); void tFreeSExplainRsp(SExplainRsp* pRsp); +typedef struct { + char config[TSDB_DNODE_CONFIG_LEN]; + char value[TSDB_DNODE_VALUE_LEN]; + int32_t sqlLen; + char* sql; +} SMCfgClusterReq; + +int32_t tSerializeSMCfgClusterReq(void* buf, int32_t bufLen, SMCfgClusterReq* pReq); +int32_t tDeserializeSMCfgClusterReq(void* buf, int32_t bufLen, SMCfgClusterReq* pReq); +void tFreeSMCfgClusterReq(SMCfgClusterReq* pReq); + typedef struct { char fqdn[TSDB_FQDN_LEN]; // end point, hostname:port int32_t port; diff --git a/include/common/tmsgdef.h b/include/common/tmsgdef.h index 358d47ee062..138a00093d4 100644 --- a/include/common/tmsgdef.h +++ b/include/common/tmsgdef.h @@ -219,6 +219,7 @@ TD_DEF_MSG_TYPE(TDMT_MND_VIEW_META, "view-meta", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_KILL_COMPACT, "kill-compact", SKillCompactReq, NULL) TD_DEF_MSG_TYPE(TDMT_MND_COMPACT_TIMER, "compact-tmr", NULL, NULL) + TD_DEF_MSG_TYPE(TDMT_MND_CONFIG_CLUSTER, "config-cluster", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_MAX_MSG, "mnd-max", NULL, NULL) TD_CLOSE_MSG_SEG(TDMT_END_MND_MSG) diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 918632b7e73..3e43da01b20 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -2264,6 +2264,37 @@ int32_t tDeserializeSGetUserWhiteListRsp(void *buf, int32_t bufLen, SGetUserWhit void tFreeSGetUserWhiteListRsp(SGetUserWhiteListRsp *pRsp) { taosMemoryFree(pRsp->pWhiteLists); } +int32_t tSerializeSMCfgClusterReq(void *buf, int32_t bufLen, SMCfgClusterReq *pReq) { + SEncoder encoder = {0}; + tEncoderInit(&encoder, buf, bufLen); + + if (tStartEncode(&encoder) < 0) return -1; + if (tEncodeCStr(&encoder, pReq->config) < 0) return -1; + if (tEncodeCStr(&encoder, pReq->value) < 0) return -1; + ENCODESQL(); + tEndEncode(&encoder); + + int32_t tlen = encoder.pos; + tEncoderClear(&encoder); + return tlen; +} + +int32_t tDeserializeSMCfgClusterReq(void *buf, int32_t bufLen, SMCfgClusterReq *pReq) { + SDecoder decoder = {0}; + tDecoderInit(&decoder, buf, bufLen); + + if (tStartDecode(&decoder) < 0) return -1; + if (tDecodeCStrTo(&decoder, pReq->config) < 0) return -1; + if (tDecodeCStrTo(&decoder, pReq->value) < 0) return -1; + DECODESQL(); + tEndDecode(&decoder); + + tDecoderClear(&decoder); + return 0; +} + +void tFreeSMCfgClusterReq(SMCfgClusterReq *pReq) { FREESQL(); } + int32_t tSerializeSCreateDropMQSNodeReq(void *buf, int32_t bufLen, SMCreateQnodeReq *pReq) { SEncoder encoder = {0}; tEncoderInit(&encoder, buf, bufLen); diff --git a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c index 666b11dcbc0..1c1b8a6bfc4 100644 --- a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c +++ b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c @@ -194,6 +194,7 @@ SArray *mmGetMsgHandles() { if (dmSetMgmtHandle(pArray, TDMT_MND_DROP_VIEW, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_VIEW_META, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_KILL_COMPACT, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; + if (dmSetMgmtHandle(pArray, TDMT_MND_CONFIG_CLUSTER, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_VND_QUERY_COMPACT_PROGRESS_RSP, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_SCH_QUERY, mmPutMsgToQueryQueue, 1) == NULL) goto _OVER; diff --git a/source/dnode/mgmt/node_mgmt/inc/dmMgmt.h b/source/dnode/mgmt/node_mgmt/inc/dmMgmt.h index 9ce298eb558..243d0bfeedb 100644 --- a/source/dnode/mgmt/node_mgmt/inc/dmMgmt.h +++ b/source/dnode/mgmt/node_mgmt/inc/dmMgmt.h @@ -97,12 +97,7 @@ int32_t dmMarkWrapper(SMgmtWrapper *pWrapper); void dmReleaseWrapper(SMgmtWrapper *pWrapper); int32_t dmInitVars(SDnode *pDnode); void dmClearVars(SDnode *pDnode); -#ifdef TD_MODULE_OPTIMIZE -int32_t dmInitModule(SDnode *pDnode, SMgmtWrapper *wrappers); -bool dmRequireNode(SDnode *pDnode, SMgmtWrapper *pWrapper); -#else -int32_t dmInitModule(SDnode *pDnode); -#endif +int32_t dmInitModule(SDnode *pDnode); SMgmtInputOpt dmBuildMgmtInputOpt(SMgmtWrapper *pWrapper); void dmSetStatus(SDnode *pDnode, EDndRunStatus stype); void dmProcessServerStartupStatus(SDnode *pDnode, SRpcMsg *pMsg); @@ -123,11 +118,7 @@ int32_t dmInitStatusClient(SDnode *pDnode); void dmCleanupClient(SDnode *pDnode); void dmCleanupStatusClient(SDnode *pDnode); SMsgCb dmGetMsgcb(SDnode *pDnode); -#ifdef TD_MODULE_OPTIMIZE -int32_t dmInitMsgHandle(SDnode *pDnode, SMgmtWrapper *wrappers); -#else int32_t dmInitMsgHandle(SDnode *pDnode); -#endif int32_t dmProcessNodeMsg(SMgmtWrapper *pWrapper, SRpcMsg *pMsg); // dmMonitor.c diff --git a/source/dnode/mgmt/node_mgmt/src/dmMgmt.c b/source/dnode/mgmt/node_mgmt/src/dmMgmt.c index 84465640c0e..4c5deef91a9 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmMgmt.c +++ b/source/dnode/mgmt/node_mgmt/src/dmMgmt.c @@ -24,7 +24,6 @@ #include "tglobal.h" #endif -#ifndef TD_MODULE_OPTIMIZE static bool dmRequireNode(SDnode *pDnode, SMgmtWrapper *pWrapper) { SMgmtInputOpt input = dmBuildMgmtInputOpt(pWrapper); @@ -38,7 +37,6 @@ static bool dmRequireNode(SDnode *pDnode, SMgmtWrapper *pWrapper) { return required; } -#endif int32_t dmInitDnode(SDnode *pDnode) { dDebug("start to create dnode"); @@ -81,15 +79,9 @@ int32_t dmInitDnode(SDnode *pDnode) { if (pDnode->lockfile == NULL) { goto _OVER; } -#ifdef TD_MODULE_OPTIMIZE - if (dmInitModule(pDnode, pDnode->wrappers) != 0) { - goto _OVER; - } -#else if (dmInitModule(pDnode) != 0) { goto _OVER; } -#endif indexInit(tsNumOfCommitThreads); streamMetaInit(); diff --git a/source/dnode/mgmt/node_mgmt/src/dmTransport.c b/source/dnode/mgmt/node_mgmt/src/dmTransport.c index a5d80db2404..5a61d686749 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmTransport.c +++ b/source/dnode/mgmt/node_mgmt/src/dmTransport.c @@ -251,33 +251,6 @@ _OVER: dmReleaseWrapper(pWrapper); } -#ifdef TD_MODULE_OPTIMIZE -int32_t dmInitMsgHandle(SDnode *pDnode, SMgmtWrapper *wrappers) { - SDnodeTrans *pTrans = &pDnode->trans; - - for (EDndNodeType ntype = DNODE; ntype < NODE_END; ++ntype) { - SMgmtWrapper *pWrapper = wrappers + ntype; - SArray *pArray = (*pWrapper->func.getHandlesFp)(); - if (pArray == NULL) return -1; - - for (int32_t i = 0; i < taosArrayGetSize(pArray); ++i) { - SMgmtHandle *pMgmt = taosArrayGet(pArray, i); - SDnodeHandle *pHandle = &pTrans->msgHandles[TMSG_INDEX(pMgmt->msgType)]; - if (pMgmt->needCheckVgId) { - pHandle->needCheckVgId = pMgmt->needCheckVgId; - } - if (!pMgmt->needCheckVgId) { - pHandle->defaultNtype = ntype; - } - pWrapper->msgFps[TMSG_INDEX(pMgmt->msgType)] = pMgmt->msgFp; - } - - taosArrayDestroy(pArray); - } - - return 0; -} -#else int32_t dmInitMsgHandle(SDnode *pDnode) { SDnodeTrans *pTrans = &pDnode->trans; @@ -303,7 +276,6 @@ int32_t dmInitMsgHandle(SDnode *pDnode) { return 0; } -#endif static inline int32_t dmSendReq(const SEpSet *pEpSet, SRpcMsg *pMsg) { SDnode *pDnode = dmInstance(); diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 65879b215aa..4701f54d9a5 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -76,6 +76,7 @@ typedef enum { MND_OPER_DROP_TOPIC, MND_OPER_CREATE_VIEW, MND_OPER_DROP_VIEW, + MND_OPER_CONFIG_CLUSTER, } EOperType; typedef enum { diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c index c408defc0d6..d44e3cbbbc5 100644 --- a/source/dnode/mnode/impl/src/mndCluster.c +++ b/source/dnode/mnode/impl/src/mndCluster.c @@ -14,7 +14,9 @@ */ #define _DEFAULT_SOURCE +#include "audit.h" #include "mndCluster.h" +#include "mndPrivilege.h" #include "mndShow.h" #include "mndTrans.h" @@ -31,6 +33,8 @@ static int32_t mndCreateDefaultCluster(SMnode *pMnode); static int32_t mndRetrieveClusters(SRpcMsg *pMsg, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows); static void mndCancelGetNextCluster(SMnode *pMnode, void *pIter); static int32_t mndProcessUptimeTimer(SRpcMsg *pReq); +static int32_t mndProcessConfigClusterReq(SRpcMsg *pReq); +static int32_t mndProcessConfigClusterRsp(SRpcMsg *pReq); int32_t mndInitCluster(SMnode *pMnode) { SSdbTable table = { @@ -45,6 +49,8 @@ int32_t mndInitCluster(SMnode *pMnode) { }; mndSetMsgHandle(pMnode, TDMT_MND_UPTIME_TIMER, mndProcessUptimeTimer); + mndSetMsgHandle(pMnode, TDMT_MND_CONFIG_CLUSTER, mndProcessConfigClusterReq); + mndSetMsgHandle(pMnode, TDMT_MND_CONFIG_CLUSTER_RSP, mndProcessConfigClusterRsp); mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_CLUSTER, mndRetrieveClusters); mndAddShowFreeIterHandle(pMnode, TSDB_MGMT_TABLE_CLUSTER, mndCancelGetNextCluster); @@ -401,3 +407,54 @@ static int32_t mndProcessUptimeTimer(SRpcMsg *pReq) { mndTransDrop(pTrans); return 0; } + +static int32_t mndProcessConfigClusterReq(SRpcMsg *pReq) { + SMnode *pMnode = pReq->info.node; + SMCfgClusterReq cfgReq = {0}; + if (tDeserializeSMCfgClusterReq(pReq->pCont, pReq->contLen, &cfgReq) != 0) { + terrno = TSDB_CODE_INVALID_MSG; + return -1; + } + + int32_t code = 0; + mInfo("cluster: start to config, option:%s, value:%s", cfgReq.config, cfgReq.value); + if (mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_CONFIG_CLUSTER) != 0) { + code = terrno != 0 ? terrno : TSDB_CODE_MND_NO_RIGHTS; + goto _exit; + } + + if (strncmp(cfgReq.config, GRANT_ACTIVE_CODE, 11) == 0) { +#ifdef TD_ENTERPRISE + if (strlen(cfgReq.config) >= TSDB_DNODE_CONFIG_LEN) { + code = TSDB_CODE_INVALID_CFG; + goto _exit; + } + if (strlen(cfgReq.value) >= TSDB_DNODE_VALUE_LEN) { + code = TSDB_CODE_INVALID_CFG_VALUE; + goto _exit; + } + // code = xxx; +#else + code = TSDB_CODE_OPS_NOT_SUPPORT; + goto _exit; +#endif + } + + { // audit + auditRecord(pReq, pMnode->clusterId, "alterCluster", "", "", cfgReq.sql, cfgReq.sqlLen); + } +_exit: + tFreeSMCfgClusterReq(&cfgReq); + if (code != 0) { + terrno = code; + mError("cluster: failed to config:%s, %s since %s", cfgReq.config, cfgReq.value, terrstr()); + } else { + mError("cluster: success to config:%s, %s", cfgReq.config, cfgReq.value); + } + return -1; +} + +static int32_t mndProcessConfigClusterRsp(SRpcMsg *pRsp) { + mInfo("config rsp from cluster"); + return 0; +} \ No newline at end of file diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index c445af61cc5..3d81aa5fe51 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -193,6 +193,8 @@ const char* nodesNodeName(ENodeType type) { return "GrantStmt"; case QUERY_NODE_REVOKE_STMT: return "RevokeStmt"; + case QUERY_NODE_ALTER_CLUSTER_STMT: + return "AlterClusterStmt"; case QUERY_NODE_SHOW_DNODES_STMT: return "ShowDnodesStmt"; case QUERY_NODE_SHOW_MNODES_STMT: @@ -6122,6 +6124,31 @@ static int32_t jsonToDropConsumerGroupStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkAlterClusterStmtConfig = "Config"; +static const char* jkAlterClusterStmtValue = "Value"; + +static int32_t alterClusterStmtToJson(const void* pObj, SJson* pJson) { + const SAlterClusterStmt* pNode = (const SAlterClusterStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkAlterClusterStmtConfig, pNode->config); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkAlterClusterStmtValue, pNode->value); + } + + return code; +} + +static int32_t jsonToAlterClusterStmt(const SJson* pJson, void* pObj) { + SAlterClusterStmt* pNode = (SAlterClusterStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkAlterClusterStmtConfig, pNode->config); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkAlterClusterStmtValue, pNode->value); + } + + return code; +} + static const char* jkAlterLocalStmtConfig = "Config"; static const char* jkAlterLocalStmtValue = "Value"; @@ -6974,6 +7001,8 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return grantStmtToJson(pObj, pJson); case QUERY_NODE_REVOKE_STMT: return revokeStmtToJson(pObj, pJson); + case QUERY_NODE_ALTER_CLUSTER_STMT: + return alterClusterStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_DNODES_STMT: return showDnodesStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_MNODES_STMT: @@ -7297,6 +7326,8 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToGrantStmt(pJson, pObj); case QUERY_NODE_REVOKE_STMT: return jsonToRevokeStmt(pJson, pObj); + case QUERY_NODE_ALTER_CLUSTER_STMT: + return jsonToAlterClusterStmt(pJson, pObj); case QUERY_NODE_SHOW_DNODES_STMT: return jsonToShowDnodesStmt(pJson, pObj); case QUERY_NODE_SHOW_MNODES_STMT: diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 9eb5a1a8b0d..74d87619729 100755 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -174,7 +174,7 @@ unsafe_opt(A) ::= UNSAFE. /************************************************ alter cluster *********************************************************/ cmd ::= ALTER CLUSTER NK_STRING(A). { pCxt->pRootNode = createAlterClusterStmt(pCxt, &A, NULL); } -cmd ::= ALTER CLUSTER NK_STRING(A) NK_STRING(B). { pCxt->pRootNode = createAlterClsuterStmt(pCxt, &A, &B); } +cmd ::= ALTER CLUSTER NK_STRING(A) NK_STRING(B). { pCxt->pRootNode = createAlterClusterStmt(pCxt, &A, &B); } /************************************************ alter local *********************************************************/ cmd ::= ALTER LOCAL NK_STRING(A). { pCxt->pRootNode = createAlterLocalStmt(pCxt, &A, NULL); } diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 3bb24566c25..1851df8c579 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -5309,6 +5309,11 @@ static int32_t fillCmdSql(STranslateContext* pCxt, int16_t msgType, void* pReq) FILL_CMD_SQL(sql, sqlLen, pCmdReq, SMDropStreamReq, pReq); break; } + + case TDMT_MND_CONFIG_CLUSTER: { + FILL_CMD_SQL(sql, sqlLen, pCmdReq, SMCfgClusterReq, pReq); + break; + } default: { break; } @@ -6533,6 +6538,16 @@ static int32_t translateRestoreDnode(STranslateContext* pCxt, SRestoreComponentN return code; } +static int32_t translateAlterCluster(STranslateContext* pCxt, SAlterClusterStmt* pStmt) { + SMCfgClusterReq cfgReq = {0}; + strcpy(cfgReq.config, pStmt->config); + strcpy(cfgReq.value, pStmt->value); + + int32_t code = buildCmdMsg(pCxt, TDMT_MND_CONFIG_CLUSTER, (FSerializeFunc)tSerializeSMCfgClusterReq, &cfgReq); + tFreeSMCfgClusterReq(&cfgReq); + return code; +} + static int32_t getSmaIndexDstVgId(STranslateContext* pCxt, const char* pDbName, const char* pTableName, int32_t* pVgId) { SVgroupInfo vg = {0}; @@ -8526,6 +8541,9 @@ static int32_t translateQuery(STranslateContext* pCxt, SNode* pNode) { case QUERY_NODE_COMPACT_DATABASE_STMT: code = translateCompact(pCxt, (SCompactDatabaseStmt*)pNode); break; + case QUERY_NODE_ALTER_CLUSTER_STMT: + code = translateAlterCluster(pCxt, (SAlterClusterStmt*)pNode); + break; case QUERY_NODE_KILL_CONNECTION_STMT: code = translateKillConnection(pCxt, (SKillStmt*)pNode); break; diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 66258ba3a97..8e39ff08d3a 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -24,8 +24,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,359 +43,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_LOCAL 58 -#define TK_QNODE 59 -#define TK_BNODE 60 -#define TK_SNODE 61 -#define TK_MNODE 62 -#define TK_VNODE 63 -#define TK_DATABASE 64 -#define TK_USE 65 -#define TK_FLUSH 66 -#define TK_TRIM 67 -#define TK_COMPACT 68 -#define TK_IF 69 -#define TK_NOT 70 -#define TK_EXISTS 71 -#define TK_BUFFER 72 -#define TK_CACHEMODEL 73 -#define TK_CACHESIZE 74 -#define TK_COMP 75 -#define TK_DURATION 76 -#define TK_NK_VARIABLE 77 -#define TK_MAXROWS 78 -#define TK_MINROWS 79 -#define TK_KEEP 80 -#define TK_PAGES 81 -#define TK_PAGESIZE 82 -#define TK_TSDB_PAGESIZE 83 -#define TK_PRECISION 84 -#define TK_REPLICA 85 -#define TK_VGROUPS 86 -#define TK_SINGLE_STABLE 87 -#define TK_RETENTIONS 88 -#define TK_SCHEMALESS 89 -#define TK_WAL_LEVEL 90 -#define TK_WAL_FSYNC_PERIOD 91 -#define TK_WAL_RETENTION_PERIOD 92 -#define TK_WAL_RETENTION_SIZE 93 -#define TK_WAL_ROLL_PERIOD 94 -#define TK_WAL_SEGMENT_SIZE 95 -#define TK_STT_TRIGGER 96 -#define TK_TABLE_PREFIX 97 -#define TK_TABLE_SUFFIX 98 -#define TK_KEEP_TIME_OFFSET 99 -#define TK_NK_COLON 100 -#define TK_BWLIMIT 101 -#define TK_START 102 -#define TK_TIMESTAMP 103 -#define TK_END 104 -#define TK_TABLE 105 -#define TK_NK_LP 106 -#define TK_NK_RP 107 -#define TK_STABLE 108 -#define TK_COLUMN 109 -#define TK_MODIFY 110 -#define TK_RENAME 111 -#define TK_TAG 112 -#define TK_SET 113 -#define TK_NK_EQ 114 -#define TK_USING 115 -#define TK_TAGS 116 -#define TK_BOOL 117 -#define TK_TINYINT 118 -#define TK_SMALLINT 119 -#define TK_INT 120 -#define TK_INTEGER 121 -#define TK_BIGINT 122 -#define TK_FLOAT 123 -#define TK_DOUBLE 124 -#define TK_BINARY 125 -#define TK_NCHAR 126 -#define TK_UNSIGNED 127 -#define TK_JSON 128 -#define TK_VARCHAR 129 -#define TK_MEDIUMBLOB 130 -#define TK_BLOB 131 -#define TK_VARBINARY 132 -#define TK_GEOMETRY 133 -#define TK_DECIMAL 134 -#define TK_COMMENT 135 -#define TK_MAX_DELAY 136 -#define TK_WATERMARK 137 -#define TK_ROLLUP 138 -#define TK_TTL 139 -#define TK_SMA 140 -#define TK_DELETE_MARK 141 -#define TK_FIRST 142 -#define TK_LAST 143 -#define TK_SHOW 144 -#define TK_PRIVILEGES 145 -#define TK_DATABASES 146 -#define TK_TABLES 147 -#define TK_STABLES 148 -#define TK_MNODES 149 -#define TK_QNODES 150 -#define TK_FUNCTIONS 151 -#define TK_INDEXES 152 -#define TK_ACCOUNTS 153 -#define TK_APPS 154 -#define TK_CONNECTIONS 155 -#define TK_LICENCES 156 -#define TK_GRANTS 157 -#define TK_QUERIES 158 -#define TK_SCORES 159 -#define TK_TOPICS 160 -#define TK_VARIABLES 161 -#define TK_CLUSTER 162 -#define TK_BNODES 163 -#define TK_SNODES 164 -#define TK_TRANSACTIONS 165 -#define TK_DISTRIBUTED 166 -#define TK_CONSUMERS 167 -#define TK_SUBSCRIPTIONS 168 -#define TK_VNODES 169 -#define TK_ALIVE 170 -#define TK_VIEWS 171 -#define TK_VIEW 172 -#define TK_COMPACTS 173 -#define TK_NORMAL 174 -#define TK_CHILD 175 -#define TK_LIKE 176 -#define TK_TBNAME 177 -#define TK_QTAGS 178 -#define TK_AS 179 -#define TK_SYSTEM 180 -#define TK_INDEX 181 -#define TK_FUNCTION 182 -#define TK_INTERVAL 183 -#define TK_COUNT 184 -#define TK_LAST_ROW 185 -#define TK_META 186 -#define TK_ONLY 187 -#define TK_TOPIC 188 -#define TK_CONSUMER 189 -#define TK_GROUP 190 -#define TK_DESC 191 -#define TK_DESCRIBE 192 -#define TK_RESET 193 -#define TK_QUERY 194 -#define TK_CACHE 195 -#define TK_EXPLAIN 196 -#define TK_ANALYZE 197 -#define TK_VERBOSE 198 -#define TK_NK_BOOL 199 -#define TK_RATIO 200 -#define TK_NK_FLOAT 201 -#define TK_OUTPUTTYPE 202 -#define TK_AGGREGATE 203 -#define TK_BUFSIZE 204 -#define TK_LANGUAGE 205 -#define TK_REPLACE 206 -#define TK_STREAM 207 -#define TK_INTO 208 -#define TK_PAUSE 209 -#define TK_RESUME 210 -#define TK_TRIGGER 211 -#define TK_AT_ONCE 212 -#define TK_WINDOW_CLOSE 213 -#define TK_IGNORE 214 -#define TK_EXPIRED 215 -#define TK_FILL_HISTORY 216 -#define TK_UPDATE 217 -#define TK_SUBTABLE 218 -#define TK_UNTREATED 219 -#define TK_KILL 220 -#define TK_CONNECTION 221 -#define TK_TRANSACTION 222 -#define TK_BALANCE 223 -#define TK_VGROUP 224 -#define TK_LEADER 225 -#define TK_MERGE 226 -#define TK_REDISTRIBUTE 227 -#define TK_SPLIT 228 -#define TK_DELETE 229 -#define TK_INSERT 230 -#define TK_NULL 231 -#define TK_NK_QUESTION 232 -#define TK_NK_ALIAS 233 -#define TK_NK_ARROW 234 -#define TK_ROWTS 235 -#define TK_QSTART 236 -#define TK_QEND 237 -#define TK_QDURATION 238 -#define TK_WSTART 239 -#define TK_WEND 240 -#define TK_WDURATION 241 -#define TK_IROWTS 242 -#define TK_ISFILLED 243 -#define TK_CAST 244 -#define TK_NOW 245 -#define TK_TODAY 246 -#define TK_TIMEZONE 247 -#define TK_CLIENT_VERSION 248 -#define TK_SERVER_VERSION 249 -#define TK_SERVER_STATUS 250 -#define TK_CURRENT_USER 251 -#define TK_CASE 252 -#define TK_WHEN 253 -#define TK_THEN 254 -#define TK_ELSE 255 -#define TK_BETWEEN 256 -#define TK_IS 257 -#define TK_NK_LT 258 -#define TK_NK_GT 259 -#define TK_NK_LE 260 -#define TK_NK_GE 261 -#define TK_NK_NE 262 -#define TK_MATCH 263 -#define TK_NMATCH 264 -#define TK_CONTAINS 265 -#define TK_IN 266 -#define TK_JOIN 267 -#define TK_INNER 268 -#define TK_SELECT 269 -#define TK_NK_HINT 270 -#define TK_DISTINCT 271 -#define TK_WHERE 272 -#define TK_PARTITION 273 -#define TK_BY 274 -#define TK_SESSION 275 -#define TK_STATE_WINDOW 276 -#define TK_EVENT_WINDOW 277 -#define TK_SLIDING 278 -#define TK_FILL 279 -#define TK_VALUE 280 -#define TK_VALUE_F 281 -#define TK_NONE 282 -#define TK_PREV 283 -#define TK_NULL_F 284 -#define TK_LINEAR 285 -#define TK_NEXT 286 -#define TK_HAVING 287 -#define TK_RANGE 288 -#define TK_EVERY 289 -#define TK_ORDER 290 -#define TK_SLIMIT 291 -#define TK_SOFFSET 292 -#define TK_LIMIT 293 -#define TK_OFFSET 294 -#define TK_ASC 295 -#define TK_NULLS 296 -#define TK_ABORT 297 -#define TK_AFTER 298 -#define TK_ATTACH 299 -#define TK_BEFORE 300 -#define TK_BEGIN 301 -#define TK_BITAND 302 -#define TK_BITNOT 303 -#define TK_BITOR 304 -#define TK_BLOCKS 305 -#define TK_CHANGE 306 -#define TK_COMMA 307 -#define TK_CONCAT 308 -#define TK_CONFLICT 309 -#define TK_COPY 310 -#define TK_DEFERRED 311 -#define TK_DELIMITERS 312 -#define TK_DETACH 313 -#define TK_DIVIDE 314 -#define TK_DOT 315 -#define TK_EACH 316 -#define TK_FAIL 317 -#define TK_FILE 318 -#define TK_FOR 319 -#define TK_GLOB 320 -#define TK_ID 321 -#define TK_IMMEDIATE 322 -#define TK_IMPORT 323 -#define TK_INITIALLY 324 -#define TK_INSTEAD 325 -#define TK_ISNULL 326 -#define TK_KEY 327 -#define TK_MODULES 328 -#define TK_NK_BITNOT 329 -#define TK_NK_SEMI 330 -#define TK_NOTNULL 331 -#define TK_OF 332 -#define TK_PLUS 333 -#define TK_PRIVILEGE 334 -#define TK_RAISE 335 -#define TK_RESTRICT 336 -#define TK_ROW 337 -#define TK_SEMI 338 -#define TK_STAR 339 -#define TK_STATEMENT 340 -#define TK_STRICT 341 -#define TK_STRING 342 -#define TK_TIMES 343 -#define TK_VALUES 344 -#define TK_VARIABLE 345 -#define TK_WAL 346 -#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. @@ -490,18 +144,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 840 -#define YYNRULE 642 -#define YYNRULE_WITH_ACTION 642 +#define YYNSTATE 843 +#define YYNRULE 644 +#define YYNRULE_WITH_ACTION 644 #define YYNTOKEN 347 -#define YY_MAX_SHIFT 839 -#define YY_MIN_SHIFTREDUCE 1242 -#define YY_MAX_SHIFTREDUCE 1883 -#define YY_ERROR_ACTION 1884 -#define YY_ACCEPT_ACTION 1885 -#define YY_NO_ACTION 1886 -#define YY_MIN_REDUCE 1887 -#define YY_MAX_REDUCE 2528 +#define YY_MAX_SHIFT 842 +#define YY_MIN_SHIFTREDUCE 1245 +#define YY_MAX_SHIFTREDUCE 1888 +#define YY_ERROR_ACTION 1889 +#define YY_ACCEPT_ACTION 1890 +#define YY_NO_ACTION 1891 +#define YY_MIN_REDUCE 1892 +#define YY_MAX_REDUCE 2535 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -568,628 +222,630 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (3071) +#define YY_ACTTAB_COUNT (3098) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 409, 561, 197, 418, 562, 1930, 569, 2064, 171, 562, - /* 10 */ 1930, 168, 48, 46, 1807, 2210, 2077, 34, 397, 2077, - /* 20 */ 415, 471, 1648, 41, 40, 1673, 2126, 47, 45, 44, - /* 30 */ 43, 42, 36, 2208, 712, 1733, 1971, 1646, 41, 40, - /* 40 */ 38, 320, 47, 45, 44, 43, 42, 2330, 41, 40, - /* 50 */ 480, 2186, 47, 45, 44, 43, 42, 704, 146, 1674, - /* 60 */ 707, 184, 2122, 2123, 1728, 1888, 528, 526, 420, 365, - /* 70 */ 19, 2121, 2123, 217, 41, 40, 173, 1654, 47, 45, - /* 80 */ 44, 43, 42, 383, 2014, 2190, 127, 95, 2348, 126, - /* 90 */ 125, 124, 123, 122, 121, 120, 119, 118, 1673, 219, - /* 100 */ 2296, 237, 741, 836, 385, 564, 15, 1938, 811, 810, - /* 110 */ 809, 808, 427, 2070, 807, 806, 151, 801, 800, 799, - /* 120 */ 798, 797, 796, 795, 150, 789, 788, 787, 426, 425, - /* 130 */ 784, 783, 782, 183, 182, 781, 692, 486, 2186, 2499, - /* 140 */ 1648, 2329, 1735, 1736, 2367, 686, 184, 114, 2331, 745, - /* 150 */ 2333, 2334, 740, 148, 735, 1646, 2391, 691, 203, 186, - /* 160 */ 581, 2420, 2500, 693, 1282, 411, 2416, 300, 2428, 703, - /* 170 */ 2191, 138, 702, 2348, 2499, 704, 146, 1708, 1718, 2435, - /* 180 */ 205, 1479, 1480, 1289, 1734, 1737, 221, 724, 2450, 2128, - /* 190 */ 1674, 724, 691, 203, 2210, 1654, 381, 2500, 693, 1649, - /* 200 */ 174, 1647, 1899, 2504, 2126, 2432, 1284, 1287, 1288, 408, - /* 210 */ 41, 40, 2207, 712, 47, 45, 44, 43, 42, 127, - /* 220 */ 1676, 836, 126, 125, 124, 123, 122, 121, 120, 119, - /* 230 */ 118, 1652, 1653, 1705, 685, 1707, 1710, 1711, 1712, 1713, - /* 240 */ 1714, 1715, 1716, 1717, 737, 733, 1726, 1727, 1729, 1730, - /* 250 */ 1731, 1732, 2, 48, 46, 1547, 1548, 1880, 364, 682, - /* 260 */ 1671, 415, 1308, 1648, 1307, 514, 2186, 512, 1830, 2330, - /* 270 */ 531, 724, 375, 51, 692, 530, 1733, 2499, 1646, 142, - /* 280 */ 2306, 650, 742, 1831, 706, 201, 2428, 2429, 272, 144, - /* 290 */ 2433, 494, 271, 532, 2066, 691, 203, 1309, 496, 2504, - /* 300 */ 2500, 693, 2499, 112, 2310, 1728, 1887, 1873, 474, 566, - /* 310 */ 2348, 19, 1567, 1568, 226, 563, 1762, 1649, 1654, 1647, - /* 320 */ 147, 2503, 2296, 1829, 741, 2500, 2502, 2330, 2067, 196, - /* 330 */ 136, 135, 134, 133, 132, 131, 130, 129, 128, 608, - /* 340 */ 742, 2115, 1940, 607, 836, 384, 687, 15, 2312, 1652, - /* 350 */ 1653, 688, 683, 676, 1566, 1569, 482, 51, 735, 98, - /* 360 */ 578, 1879, 370, 2329, 2051, 395, 2367, 641, 2348, 175, - /* 370 */ 2331, 745, 2333, 2334, 740, 577, 735, 666, 1763, 302, - /* 380 */ 2296, 106, 741, 1735, 1736, 1910, 2197, 2176, 1958, 519, - /* 390 */ 518, 517, 516, 511, 510, 509, 508, 507, 502, 501, - /* 400 */ 500, 499, 367, 491, 490, 489, 2068, 484, 483, 382, - /* 410 */ 624, 668, 2461, 475, 1535, 1536, 579, 2203, 1708, 1718, - /* 420 */ 1554, 2329, 1673, 648, 2367, 1734, 1737, 114, 2331, 745, - /* 430 */ 2333, 2334, 740, 780, 735, 1676, 304, 639, 2296, 2519, - /* 440 */ 1649, 2420, 1647, 41, 40, 411, 2416, 47, 45, 44, - /* 450 */ 43, 42, 637, 1654, 635, 269, 268, 2289, 37, 413, - /* 460 */ 1757, 1758, 1759, 1760, 1761, 1765, 1766, 1767, 1768, 780, - /* 470 */ 311, 312, 1652, 1653, 1705, 310, 1707, 1710, 1711, 1712, - /* 480 */ 1713, 1714, 1715, 1716, 1717, 737, 733, 1726, 1727, 1729, - /* 490 */ 1730, 1731, 1732, 2, 12, 48, 46, 255, 239, 2330, - /* 500 */ 1673, 1399, 564, 415, 1938, 1648, 61, 667, 63, 1909, - /* 510 */ 2499, 63, 742, 178, 664, 12, 1398, 68, 1733, 558, - /* 520 */ 1646, 598, 594, 590, 586, 223, 254, 556, 2505, 203, - /* 530 */ 552, 548, 1908, 2500, 693, 2330, 159, 623, 622, 621, - /* 540 */ 2348, 651, 1849, 522, 613, 143, 617, 1728, 707, 651, - /* 550 */ 616, 2052, 2296, 19, 741, 615, 620, 391, 390, 1705, - /* 560 */ 1654, 614, 2296, 3, 610, 2504, 90, 96, 2499, 89, - /* 570 */ 252, 1311, 1312, 41, 40, 54, 2348, 47, 45, 44, - /* 580 */ 43, 42, 533, 424, 423, 2296, 836, 2503, 2296, 15, - /* 590 */ 741, 2500, 2501, 2329, 302, 1308, 2367, 1307, 30, 114, - /* 600 */ 2331, 745, 2333, 2334, 740, 227, 735, 2306, 1655, 149, - /* 610 */ 55, 156, 2391, 2420, 1811, 571, 2249, 411, 2416, 63, - /* 620 */ 1673, 2315, 771, 653, 2249, 1735, 1736, 521, 520, 2329, - /* 630 */ 1309, 2310, 2367, 88, 242, 114, 2331, 745, 2333, 2334, - /* 640 */ 740, 2128, 735, 251, 244, 600, 599, 186, 396, 2420, - /* 650 */ 249, 575, 325, 411, 2416, 2435, 2126, 1709, 41, 40, - /* 660 */ 1708, 1718, 47, 45, 44, 43, 42, 1734, 1737, 241, - /* 670 */ 699, 304, 1850, 1743, 304, 2312, 2451, 1974, 2159, 1673, - /* 680 */ 1444, 2431, 1649, 2060, 1647, 735, 778, 161, 160, 775, - /* 690 */ 774, 773, 158, 52, 1435, 770, 769, 768, 1439, 767, - /* 700 */ 1441, 1442, 766, 763, 171, 1450, 760, 1452, 1453, 757, - /* 710 */ 754, 751, 2078, 1706, 1652, 1653, 1705, 99, 1707, 1710, - /* 720 */ 1711, 1712, 1713, 1714, 1715, 1716, 1717, 737, 733, 1726, - /* 730 */ 1727, 1729, 1730, 1731, 1732, 2, 48, 46, 1738, 2062, - /* 740 */ 2330, 44, 43, 42, 415, 2128, 1648, 1907, 1595, 623, - /* 750 */ 622, 621, 405, 742, 1838, 2458, 613, 143, 617, 1733, - /* 760 */ 2126, 1646, 616, 725, 2075, 725, 2075, 615, 620, 391, - /* 770 */ 390, 2330, 1658, 614, 725, 2075, 610, 1709, 1885, 2050, - /* 780 */ 9, 2348, 304, 137, 742, 137, 2471, 2058, 1728, 12, - /* 790 */ 604, 10, 609, 2296, 208, 741, 602, 601, 448, 2435, - /* 800 */ 2296, 1654, 1906, 679, 678, 1836, 1837, 1839, 1840, 1841, - /* 810 */ 464, 2079, 2348, 41, 40, 463, 2128, 47, 45, 44, - /* 820 */ 43, 42, 1291, 410, 2296, 2430, 741, 836, 1672, 170, - /* 830 */ 49, 2126, 280, 1706, 2329, 1905, 1709, 2367, 2330, 498, - /* 840 */ 114, 2331, 745, 2333, 2334, 740, 2128, 735, 497, 725, - /* 850 */ 2075, 739, 2519, 419, 2420, 2296, 304, 430, 411, 2416, - /* 860 */ 667, 2126, 429, 2499, 2503, 2329, 1735, 1736, 2367, 56, - /* 870 */ 736, 114, 2331, 745, 2333, 2334, 740, 2290, 735, 2348, - /* 880 */ 95, 2505, 203, 2519, 1904, 2420, 2500, 693, 2296, 411, - /* 890 */ 2416, 2296, 1706, 741, 778, 161, 160, 775, 774, 773, - /* 900 */ 158, 1708, 1718, 704, 146, 418, 2071, 667, 1734, 1737, - /* 910 */ 2499, 2128, 1823, 171, 778, 161, 160, 775, 774, 773, - /* 920 */ 158, 2077, 2317, 1649, 452, 1647, 711, 667, 2505, 203, - /* 930 */ 2499, 700, 2329, 2500, 693, 2367, 1949, 2296, 356, 2331, - /* 940 */ 745, 2333, 2334, 740, 738, 735, 726, 2385, 2505, 203, - /* 950 */ 1764, 454, 450, 2500, 693, 1652, 1653, 1705, 626, 1707, - /* 960 */ 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 737, 733, - /* 970 */ 1726, 1727, 1729, 1730, 1731, 1732, 2, 48, 46, 2319, - /* 980 */ 2330, 725, 2075, 1403, 646, 415, 1387, 1648, 1903, 649, - /* 990 */ 725, 2075, 727, 742, 2392, 674, 725, 2075, 1402, 273, - /* 1000 */ 1733, 468, 1646, 421, 725, 2075, 1796, 839, 619, 618, - /* 1010 */ 469, 171, 2330, 202, 2428, 2429, 488, 144, 2433, 2077, - /* 1020 */ 2169, 2348, 2306, 327, 275, 742, 1389, 2492, 1657, 1728, - /* 1030 */ 35, 725, 2075, 2296, 667, 741, 2314, 2499, 1804, 193, - /* 1040 */ 1769, 2296, 1654, 725, 2075, 284, 2310, 827, 823, 819, - /* 1050 */ 815, 503, 324, 2348, 791, 2505, 203, 2258, 725, 2075, - /* 1060 */ 2500, 693, 478, 504, 535, 2296, 2015, 741, 836, 704, - /* 1070 */ 146, 49, 1902, 628, 2329, 1616, 1617, 2367, 505, 1677, - /* 1080 */ 114, 2331, 745, 2333, 2334, 740, 652, 735, 640, 100, - /* 1090 */ 2312, 412, 2519, 113, 2420, 1677, 318, 1673, 411, 2416, - /* 1100 */ 735, 725, 2075, 2277, 270, 1900, 2329, 1735, 1736, 2367, - /* 1110 */ 1289, 274, 114, 2331, 745, 2333, 2334, 740, 793, 735, - /* 1120 */ 631, 580, 1677, 696, 2519, 2296, 2420, 625, 721, 794, - /* 1130 */ 411, 2416, 2036, 267, 1287, 1288, 667, 805, 803, 2499, - /* 1140 */ 41, 40, 1708, 1718, 47, 45, 44, 43, 42, 1734, - /* 1150 */ 1737, 695, 1677, 389, 388, 725, 2075, 2505, 203, 729, - /* 1160 */ 159, 2392, 2500, 693, 1649, 772, 1647, 2128, 2119, 307, - /* 1170 */ 1901, 725, 2075, 2128, 72, 2072, 306, 71, 111, 204, - /* 1180 */ 2428, 2429, 720, 144, 2433, 14, 13, 108, 2127, 708, - /* 1190 */ 63, 283, 1660, 1898, 1897, 277, 1652, 1653, 1705, 1896, - /* 1200 */ 1707, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 737, - /* 1210 */ 733, 1726, 1727, 1729, 1730, 1731, 1732, 2, 48, 46, - /* 1220 */ 725, 2075, 2330, 2296, 387, 386, 415, 606, 1648, 47, - /* 1230 */ 45, 44, 43, 42, 1611, 742, 1895, 2439, 194, 667, - /* 1240 */ 710, 1733, 2499, 1646, 725, 2075, 2296, 2296, 1894, 608, - /* 1250 */ 1893, 1892, 2296, 607, 725, 2075, 725, 2075, 725, 2075, - /* 1260 */ 2505, 203, 2280, 2348, 315, 2500, 693, 725, 2075, 776, - /* 1270 */ 1728, 76, 2119, 732, 722, 2296, 723, 741, 321, 1891, - /* 1280 */ 1890, 198, 462, 1654, 461, 777, 2464, 422, 2119, 2296, - /* 1290 */ 334, 1776, 1678, 2105, 1915, 831, 260, 2440, 1796, 258, - /* 1300 */ 643, 2296, 642, 2296, 2296, 1803, 139, 50, 1678, 836, - /* 1310 */ 1706, 199, 15, 437, 460, 1656, 2329, 2330, 86, 2367, - /* 1320 */ 611, 87, 114, 2331, 745, 2333, 2334, 740, 210, 735, - /* 1330 */ 742, 2053, 2296, 2296, 2519, 1678, 2420, 424, 423, 262, - /* 1340 */ 411, 2416, 261, 264, 1384, 612, 263, 1662, 1735, 1736, - /* 1350 */ 680, 266, 1947, 304, 265, 785, 159, 1342, 2348, 50, - /* 1360 */ 1733, 786, 1655, 297, 152, 1678, 50, 1882, 1883, 1382, - /* 1370 */ 2296, 141, 741, 2349, 629, 291, 14, 13, 2012, 1361, - /* 1380 */ 1941, 1719, 697, 1708, 1718, 1359, 2011, 187, 159, 1728, - /* 1390 */ 1734, 1737, 50, 309, 75, 2195, 157, 1343, 159, 66, - /* 1400 */ 50, 749, 1654, 157, 159, 1649, 140, 1647, 1931, 2454, - /* 1410 */ 157, 2329, 677, 401, 2367, 684, 714, 114, 2331, 745, - /* 1420 */ 2333, 2334, 740, 398, 735, 2196, 428, 1937, 731, 2395, - /* 1430 */ 1614, 2420, 829, 1835, 1754, 411, 2416, 1652, 1653, 1705, - /* 1440 */ 1834, 1707, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, - /* 1450 */ 737, 733, 1726, 1727, 1729, 1730, 1731, 1732, 2, 2116, - /* 1460 */ 172, 289, 709, 705, 660, 341, 1564, 313, 717, 2455, - /* 1470 */ 317, 2465, 1429, 1770, 333, 1457, 299, 1461, 1468, 1659, - /* 1480 */ 1466, 296, 338, 74, 162, 303, 73, 2037, 5, 431, - /* 1490 */ 436, 379, 444, 445, 1681, 455, 366, 211, 1588, 456, - /* 1500 */ 2330, 212, 214, 458, 1671, 328, 472, 235, 543, 541, - /* 1510 */ 538, 1672, 479, 742, 225, 485, 481, 487, 492, 524, - /* 1520 */ 506, 523, 513, 2188, 1663, 515, 1658, 525, 536, 537, - /* 1530 */ 534, 229, 230, 539, 232, 540, 542, 544, 1679, 4, - /* 1540 */ 559, 2348, 560, 567, 240, 568, 570, 92, 63, 1674, - /* 1550 */ 572, 243, 1680, 2296, 573, 741, 1666, 1668, 1682, 576, - /* 1560 */ 246, 574, 248, 1683, 93, 2204, 582, 94, 253, 603, - /* 1570 */ 733, 1726, 1727, 1729, 1730, 1731, 1732, 632, 360, 633, - /* 1580 */ 116, 2267, 2264, 605, 2263, 2065, 64, 645, 97, 257, - /* 1590 */ 2061, 259, 164, 165, 2329, 647, 2063, 2367, 2059, 166, - /* 1600 */ 114, 2331, 745, 2333, 2334, 740, 167, 735, 153, 329, - /* 1610 */ 276, 1675, 2393, 655, 2420, 654, 659, 656, 411, 2416, - /* 1620 */ 281, 662, 671, 681, 2470, 715, 2330, 2469, 8, 2442, - /* 1630 */ 690, 290, 293, 84, 83, 467, 402, 292, 216, 742, - /* 1640 */ 661, 286, 288, 179, 279, 672, 2250, 669, 294, 295, - /* 1650 */ 670, 459, 457, 1796, 145, 2522, 1676, 701, 1801, 1, - /* 1660 */ 2330, 2498, 363, 698, 1799, 446, 298, 2348, 443, 439, - /* 1670 */ 435, 432, 460, 742, 305, 190, 2436, 154, 330, 2296, - /* 1680 */ 713, 741, 2218, 2217, 331, 2216, 407, 718, 719, 332, - /* 1690 */ 155, 105, 206, 2076, 62, 2401, 107, 2120, 747, 335, - /* 1700 */ 1266, 2348, 833, 323, 830, 163, 835, 359, 371, 372, - /* 1710 */ 2288, 304, 344, 2296, 53, 741, 337, 2287, 2286, 81, - /* 1720 */ 2329, 358, 2281, 2367, 348, 433, 114, 2331, 745, 2333, - /* 1730 */ 2334, 740, 434, 735, 2330, 339, 1639, 1640, 728, 209, - /* 1740 */ 2420, 438, 2279, 440, 411, 2416, 441, 742, 442, 1638, - /* 1750 */ 2278, 2276, 380, 447, 2329, 2275, 449, 2367, 2274, 451, - /* 1760 */ 115, 2331, 745, 2333, 2334, 740, 2273, 735, 2330, 453, - /* 1770 */ 1627, 2254, 213, 2253, 2420, 2348, 215, 1591, 2419, 2416, - /* 1780 */ 82, 742, 1590, 2231, 2230, 2229, 466, 2296, 465, 741, - /* 1790 */ 2228, 2227, 2178, 470, 1534, 2175, 473, 2174, 2168, 476, - /* 1800 */ 477, 2330, 2165, 218, 2164, 85, 2163, 2162, 2167, 2348, - /* 1810 */ 220, 2166, 2161, 2160, 742, 2158, 2157, 2156, 222, 493, - /* 1820 */ 2155, 2296, 495, 741, 2171, 2154, 2153, 2152, 2329, 224, - /* 1830 */ 2139, 2367, 2151, 2150, 115, 2331, 745, 2333, 2334, 740, - /* 1840 */ 2173, 735, 2348, 2149, 2148, 2147, 2146, 2145, 2420, 527, - /* 1850 */ 91, 2138, 730, 2416, 2296, 2144, 741, 2143, 2142, 2141, - /* 1860 */ 2140, 2137, 743, 2136, 2172, 2367, 2170, 2135, 115, 2331, - /* 1870 */ 745, 2333, 2334, 740, 2134, 735, 1540, 2330, 2133, 2132, - /* 1880 */ 228, 2131, 2420, 529, 2130, 2129, 374, 2416, 368, 369, - /* 1890 */ 742, 1400, 1404, 1977, 1976, 2329, 1975, 1973, 2367, 231, - /* 1900 */ 233, 176, 2331, 745, 2333, 2334, 740, 2330, 735, 1970, - /* 1910 */ 1396, 1969, 234, 545, 549, 1962, 546, 547, 2348, 550, - /* 1920 */ 742, 1951, 551, 553, 1926, 555, 557, 1290, 185, 1925, - /* 1930 */ 2296, 2252, 741, 554, 78, 236, 2248, 2316, 2238, 2226, - /* 1940 */ 195, 2225, 238, 79, 245, 2202, 247, 565, 2348, 250, - /* 1950 */ 2054, 1972, 1968, 583, 584, 694, 2520, 1966, 588, 585, - /* 1960 */ 2296, 589, 741, 587, 1964, 591, 1961, 593, 1946, 592, - /* 1970 */ 595, 2329, 597, 596, 2367, 1335, 1944, 115, 2331, 745, - /* 1980 */ 2333, 2334, 740, 1945, 735, 2330, 1943, 1922, 2056, 1472, - /* 1990 */ 1473, 2420, 2055, 1386, 802, 1385, 2417, 1383, 742, 1381, - /* 2000 */ 1380, 2329, 2330, 804, 2367, 1959, 1379, 175, 2331, 745, - /* 2010 */ 2333, 2334, 740, 1372, 735, 742, 1378, 256, 1377, 2330, - /* 2020 */ 392, 1374, 65, 1950, 393, 627, 2348, 1373, 1948, 394, - /* 2030 */ 1371, 399, 742, 630, 1921, 1920, 1919, 634, 2296, 1918, - /* 2040 */ 741, 636, 1917, 2348, 638, 117, 1621, 1623, 400, 1620, - /* 2050 */ 2462, 1625, 29, 2251, 69, 2296, 1601, 741, 2247, 1599, - /* 2060 */ 2348, 1597, 278, 2237, 169, 657, 2224, 2223, 2504, 6, - /* 2070 */ 17, 20, 2296, 21, 741, 23, 7, 31, 673, 2329, - /* 2080 */ 1852, 285, 2367, 22, 2330, 357, 2331, 745, 2333, 2334, - /* 2090 */ 740, 57, 735, 58, 189, 177, 2329, 742, 200, 2367, - /* 2100 */ 2317, 287, 357, 2331, 745, 2333, 2334, 740, 675, 735, - /* 2110 */ 1833, 658, 33, 2329, 2330, 1822, 2367, 282, 1872, 350, - /* 2120 */ 2331, 745, 2333, 2334, 740, 2348, 735, 742, 1576, 663, - /* 2130 */ 67, 24, 1867, 1575, 1873, 188, 32, 2296, 80, 741, - /* 2140 */ 1866, 665, 403, 1871, 1870, 18, 404, 60, 1793, 301, - /* 2150 */ 180, 1792, 2222, 2201, 101, 2348, 2200, 102, 25, 103, - /* 2160 */ 406, 308, 1828, 191, 26, 689, 314, 2296, 716, 741, - /* 2170 */ 70, 108, 319, 1745, 104, 1744, 316, 59, 2329, 2330, - /* 2180 */ 13, 2367, 1664, 2370, 176, 2331, 745, 2333, 2334, 740, - /* 2190 */ 1755, 735, 739, 1723, 11, 734, 181, 1721, 39, 2330, - /* 2200 */ 1720, 1690, 16, 192, 1698, 27, 748, 746, 2329, 1458, - /* 2210 */ 28, 2367, 742, 417, 357, 2331, 745, 2333, 2334, 740, - /* 2220 */ 2348, 735, 2330, 1455, 750, 752, 753, 755, 1454, 1451, - /* 2230 */ 756, 744, 2296, 758, 741, 742, 759, 2330, 761, 2521, - /* 2240 */ 2348, 1445, 762, 764, 1443, 414, 1449, 765, 109, 322, - /* 2250 */ 742, 110, 2296, 1448, 741, 1447, 2330, 1467, 1463, 1446, - /* 2260 */ 1333, 77, 779, 2348, 1368, 1365, 1364, 1363, 416, 742, - /* 2270 */ 1394, 1362, 1360, 2329, 1358, 2296, 2367, 741, 2348, 356, - /* 2280 */ 2331, 745, 2333, 2334, 740, 1357, 735, 1356, 2386, 1393, - /* 2290 */ 2296, 790, 741, 2329, 792, 207, 2367, 2348, 1354, 357, - /* 2300 */ 2331, 745, 2333, 2334, 740, 1353, 735, 1352, 1351, 2296, - /* 2310 */ 1350, 741, 1349, 1967, 1348, 1390, 2329, 1388, 1345, 2367, - /* 2320 */ 1344, 1341, 357, 2331, 745, 2333, 2334, 740, 1339, 735, - /* 2330 */ 2330, 644, 1340, 1338, 2367, 812, 813, 352, 2331, 745, - /* 2340 */ 2333, 2334, 740, 742, 735, 814, 1965, 816, 817, 2330, - /* 2350 */ 2329, 818, 1963, 2367, 820, 821, 342, 2331, 745, 2333, - /* 2360 */ 2334, 740, 742, 735, 822, 2330, 1960, 824, 826, 825, - /* 2370 */ 1942, 2348, 828, 1279, 1916, 1267, 832, 326, 742, 834, - /* 2380 */ 1886, 1650, 336, 2296, 837, 741, 1886, 838, 1886, 1886, - /* 2390 */ 2348, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2400 */ 1886, 1886, 2296, 1886, 741, 1886, 2348, 1886, 1886, 1886, - /* 2410 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 2296, 1886, - /* 2420 */ 741, 1886, 1886, 2330, 2329, 1886, 1886, 2367, 1886, 1886, - /* 2430 */ 340, 2331, 745, 2333, 2334, 740, 742, 735, 1886, 1886, - /* 2440 */ 1886, 1886, 1886, 2329, 1886, 1886, 2367, 2330, 1886, 343, - /* 2450 */ 2331, 745, 2333, 2334, 740, 1886, 735, 1886, 1886, 2329, - /* 2460 */ 742, 1886, 2367, 1886, 2348, 349, 2331, 745, 2333, 2334, - /* 2470 */ 740, 1886, 735, 1886, 1886, 1886, 2296, 1886, 741, 1886, - /* 2480 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 2348, 1886, - /* 2490 */ 2330, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2500 */ 2296, 1886, 741, 742, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2510 */ 1886, 1886, 1886, 1886, 1886, 1886, 2330, 2329, 1886, 1886, - /* 2520 */ 2367, 1886, 1886, 353, 2331, 745, 2333, 2334, 740, 742, - /* 2530 */ 735, 2348, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2540 */ 1886, 2329, 1886, 2296, 2367, 741, 1886, 345, 2331, 745, - /* 2550 */ 2333, 2334, 740, 1886, 735, 1886, 1886, 2348, 1886, 2330, - /* 2560 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 2296, - /* 2570 */ 1886, 741, 742, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2580 */ 1886, 1886, 1886, 2330, 2329, 1886, 1886, 2367, 1886, 1886, - /* 2590 */ 354, 2331, 745, 2333, 2334, 740, 742, 735, 1886, 1886, - /* 2600 */ 2348, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2610 */ 2329, 1886, 2296, 2367, 741, 1886, 346, 2331, 745, 2333, - /* 2620 */ 2334, 740, 1886, 735, 2348, 1886, 2330, 1886, 1886, 1886, - /* 2630 */ 1886, 1886, 1886, 1886, 1886, 1886, 2296, 1886, 741, 742, - /* 2640 */ 1886, 2330, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2650 */ 1886, 1886, 1886, 2329, 742, 1886, 2367, 2330, 1886, 355, - /* 2660 */ 2331, 745, 2333, 2334, 740, 1886, 735, 2348, 1886, 1886, - /* 2670 */ 742, 1886, 1886, 1886, 1886, 1886, 1886, 2329, 1886, 2296, - /* 2680 */ 2367, 741, 2348, 347, 2331, 745, 2333, 2334, 740, 1886, - /* 2690 */ 735, 1886, 1886, 1886, 2296, 1886, 741, 1886, 2348, 1886, - /* 2700 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2710 */ 2296, 1886, 741, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2720 */ 2329, 1886, 1886, 2367, 1886, 1886, 361, 2331, 745, 2333, - /* 2730 */ 2334, 740, 1886, 735, 2330, 2329, 1886, 1886, 2367, 1886, - /* 2740 */ 1886, 362, 2331, 745, 2333, 2334, 740, 742, 735, 1886, - /* 2750 */ 1886, 2329, 1886, 2330, 2367, 1886, 1886, 2342, 2331, 745, - /* 2760 */ 2333, 2334, 740, 1886, 735, 1886, 742, 1886, 1886, 2330, - /* 2770 */ 1886, 1886, 1886, 1886, 1886, 2348, 1886, 1886, 1886, 1886, - /* 2780 */ 1886, 1886, 742, 1886, 1886, 1886, 1886, 2296, 1886, 741, - /* 2790 */ 1886, 1886, 1886, 1886, 2348, 1886, 1886, 1886, 1886, 1886, - /* 2800 */ 1886, 1886, 1886, 1886, 1886, 1886, 2296, 1886, 741, 1886, - /* 2810 */ 2348, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2820 */ 1886, 1886, 2296, 1886, 741, 1886, 1886, 2330, 2329, 1886, - /* 2830 */ 1886, 2367, 1886, 1886, 2341, 2331, 745, 2333, 2334, 740, - /* 2840 */ 742, 735, 1886, 1886, 1886, 1886, 1886, 2329, 1886, 1886, - /* 2850 */ 2367, 2330, 1886, 2340, 2331, 745, 2333, 2334, 740, 1886, - /* 2860 */ 735, 1886, 1886, 2329, 742, 1886, 2367, 1886, 2348, 376, - /* 2870 */ 2331, 745, 2333, 2334, 740, 1886, 735, 1886, 1886, 1886, - /* 2880 */ 2296, 1886, 741, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2890 */ 1886, 1886, 2348, 1886, 2330, 1886, 1886, 1886, 1886, 1886, - /* 2900 */ 1886, 1886, 1886, 1886, 2296, 1886, 741, 742, 1886, 1886, - /* 2910 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2920 */ 2330, 2329, 1886, 1886, 2367, 1886, 1886, 377, 2331, 745, - /* 2930 */ 2333, 2334, 740, 742, 735, 2348, 1886, 1886, 1886, 1886, - /* 2940 */ 1886, 1886, 1886, 1886, 1886, 2329, 1886, 2296, 2367, 741, - /* 2950 */ 1886, 373, 2331, 745, 2333, 2334, 740, 1886, 735, 1886, - /* 2960 */ 1886, 2348, 1886, 2330, 1886, 1886, 1886, 1886, 1886, 1886, - /* 2970 */ 1886, 1886, 1886, 2296, 1886, 741, 742, 1886, 1886, 1886, - /* 2980 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 2329, 1886, - /* 2990 */ 1886, 2367, 1886, 1886, 378, 2331, 745, 2333, 2334, 740, - /* 3000 */ 1886, 735, 1886, 1886, 2348, 1886, 1886, 1886, 1886, 1886, - /* 3010 */ 1886, 1886, 1886, 1886, 743, 1886, 2296, 2367, 741, 1886, - /* 3020 */ 352, 2331, 745, 2333, 2334, 740, 1886, 735, 1886, 1886, - /* 3030 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 3040 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, - /* 3050 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 2329, 1886, 1886, - /* 3060 */ 2367, 1886, 1886, 351, 2331, 745, 2333, 2334, 740, 1886, - /* 3070 */ 735, + /* 0 */ 481, 2193, 174, 465, 1904, 2296, 562, 2071, 464, 563, + /* 10 */ 1935, 419, 48, 46, 1812, 1892, 730, 237, 2399, 168, + /* 20 */ 416, 565, 1653, 1943, 41, 40, 398, 2084, 47, 45, + /* 30 */ 44, 43, 42, 1679, 2133, 1738, 1978, 1651, 68, 136, + /* 40 */ 135, 134, 133, 132, 131, 130, 129, 128, 2337, 219, + /* 50 */ 1678, 669, 2135, 670, 472, 670, 2506, 689, 2506, 381, + /* 60 */ 559, 710, 184, 727, 239, 1733, 1893, 2133, 565, 557, + /* 70 */ 1943, 19, 553, 549, 2512, 203, 2512, 203, 1659, 2507, + /* 80 */ 696, 2507, 696, 2284, 383, 2355, 2197, 127, 95, 2355, + /* 90 */ 126, 125, 124, 123, 122, 121, 120, 119, 118, 529, + /* 100 */ 527, 2303, 365, 744, 839, 385, 217, 15, 1678, 814, + /* 110 */ 813, 812, 811, 428, 2077, 810, 809, 151, 804, 803, + /* 120 */ 802, 801, 800, 799, 798, 150, 792, 791, 790, 427, + /* 130 */ 426, 787, 786, 785, 183, 182, 784, 695, 38, 320, + /* 140 */ 2506, 63, 2336, 1740, 1741, 2374, 688, 727, 114, 2338, + /* 150 */ 748, 2340, 2341, 743, 653, 738, 1572, 1573, 694, 203, + /* 160 */ 186, 578, 2427, 2507, 696, 127, 412, 2423, 126, 125, + /* 170 */ 124, 123, 122, 121, 120, 119, 118, 1713, 1723, 570, + /* 180 */ 61, 205, 563, 1935, 1739, 1742, 1285, 1816, 667, 2457, + /* 190 */ 707, 146, 421, 1678, 1449, 2128, 2130, 1571, 1574, 1654, + /* 200 */ 63, 1652, 1292, 707, 146, 1292, 1681, 1885, 1440, 773, + /* 210 */ 772, 771, 1444, 770, 1446, 1447, 769, 766, 2297, 1455, + /* 220 */ 763, 1457, 1458, 760, 757, 754, 1290, 1291, 1287, 1290, + /* 230 */ 1291, 1657, 1658, 1710, 51, 1712, 1715, 1716, 1717, 1718, + /* 240 */ 1719, 1720, 1721, 1722, 740, 736, 1731, 1732, 1734, 1735, + /* 250 */ 1736, 1737, 2, 48, 46, 52, 112, 1311, 364, 1310, + /* 260 */ 1676, 416, 732, 1653, 2399, 1552, 1553, 513, 670, 2337, + /* 270 */ 532, 2506, 727, 147, 142, 531, 1738, 582, 1651, 41, + /* 280 */ 40, 2074, 742, 47, 45, 44, 43, 42, 685, 2512, + /* 290 */ 203, 495, 1312, 533, 2507, 696, 728, 2082, 367, 497, + /* 300 */ 300, 2435, 706, 304, 138, 705, 1733, 2506, 210, 475, + /* 310 */ 2355, 1884, 19, 202, 2435, 2436, 137, 144, 2440, 1659, + /* 320 */ 2217, 410, 2303, 605, 744, 694, 203, 567, 1679, 171, + /* 330 */ 2507, 696, 173, 564, 624, 623, 622, 2084, 2215, 715, + /* 340 */ 2021, 614, 143, 618, 196, 839, 384, 617, 15, 2217, + /* 350 */ 1714, 1678, 616, 621, 391, 390, 2122, 483, 615, 51, + /* 360 */ 2442, 611, 304, 2336, 409, 302, 2374, 2214, 715, 356, + /* 370 */ 2338, 748, 2340, 2341, 743, 741, 738, 729, 2392, 1854, + /* 380 */ 691, 686, 679, 1915, 1740, 1741, 2439, 2204, 2183, 579, + /* 390 */ 520, 519, 518, 517, 512, 511, 510, 509, 508, 503, + /* 400 */ 502, 501, 500, 492, 491, 490, 1711, 485, 484, 382, + /* 410 */ 1965, 172, 690, 476, 1540, 1541, 340, 304, 1713, 1723, + /* 420 */ 1559, 707, 146, 41, 40, 1739, 1742, 47, 45, 44, + /* 430 */ 43, 42, 625, 338, 74, 1682, 2303, 73, 63, 783, + /* 440 */ 1654, 2511, 1652, 1835, 2506, 580, 2210, 366, 2166, 41, + /* 450 */ 40, 1484, 1485, 47, 45, 44, 43, 42, 1836, 235, + /* 460 */ 544, 542, 539, 2510, 707, 146, 12, 2507, 2509, 63, + /* 470 */ 487, 2193, 1657, 1658, 1710, 1843, 1712, 1715, 1716, 1717, + /* 480 */ 1718, 1719, 1720, 1721, 1722, 740, 736, 1731, 1732, 1734, + /* 490 */ 1735, 1736, 1737, 2, 12, 48, 46, 311, 312, 1834, + /* 500 */ 63, 2265, 310, 416, 2337, 1653, 47, 45, 44, 43, + /* 510 */ 42, 2442, 375, 1914, 728, 2082, 76, 745, 1738, 221, + /* 520 */ 1651, 304, 425, 424, 682, 681, 1841, 1842, 1844, 1845, + /* 530 */ 1846, 204, 2435, 2436, 137, 144, 2440, 2438, 64, 223, + /* 540 */ 2337, 610, 515, 2193, 1913, 2355, 1748, 1660, 1733, 2059, + /* 550 */ 400, 651, 1678, 745, 19, 274, 1767, 2303, 654, 744, + /* 560 */ 463, 1659, 462, 41, 40, 87, 2303, 47, 45, 44, + /* 570 */ 43, 42, 774, 709, 201, 2435, 2436, 1912, 144, 2440, + /* 580 */ 90, 2355, 654, 89, 84, 83, 468, 839, 30, 216, + /* 590 */ 15, 226, 461, 2303, 199, 744, 1678, 2303, 2336, 1404, + /* 600 */ 304, 2374, 460, 458, 357, 2338, 748, 2340, 2341, 743, + /* 610 */ 499, 738, 1911, 363, 1403, 2313, 447, 1768, 498, 444, + /* 620 */ 440, 436, 433, 461, 2058, 1710, 1740, 1741, 1392, 2073, + /* 630 */ 2303, 304, 572, 2256, 2336, 2057, 12, 2374, 10, 2317, + /* 640 */ 114, 2338, 748, 2340, 2341, 743, 88, 738, 1683, 2511, + /* 650 */ 149, 1682, 156, 2398, 2427, 1910, 656, 2256, 412, 2423, + /* 660 */ 1713, 1723, 304, 1855, 1909, 2303, 1681, 1739, 1742, 1394, + /* 670 */ 41, 40, 728, 2082, 47, 45, 44, 43, 42, 1890, + /* 680 */ 1659, 534, 1654, 2319, 1652, 781, 161, 160, 778, 777, + /* 690 */ 776, 158, 208, 738, 783, 523, 9, 37, 414, 1762, + /* 700 */ 1763, 1764, 1765, 1766, 1770, 1771, 1772, 1773, 2303, 1714, + /* 710 */ 1311, 1663, 1310, 1908, 1657, 1658, 1710, 2303, 1712, 1715, + /* 720 */ 1716, 1717, 1718, 1719, 1720, 1721, 1722, 740, 736, 1731, + /* 730 */ 1732, 1734, 1735, 1736, 1737, 2, 48, 46, 1743, 2337, + /* 740 */ 2135, 1653, 728, 2082, 416, 1312, 1653, 397, 728, 2082, + /* 750 */ 2067, 273, 710, 1714, 1878, 2133, 1651, 227, 431, 1738, + /* 760 */ 449, 1651, 56, 430, 695, 1711, 2303, 2506, 469, 2337, + /* 770 */ 1828, 781, 161, 160, 778, 777, 776, 158, 522, 521, + /* 780 */ 2355, 2313, 745, 1408, 1945, 694, 203, 728, 2082, 1733, + /* 790 */ 2507, 696, 2303, 2442, 744, 2322, 106, 1659, 1407, 1682, + /* 800 */ 728, 2082, 1659, 14, 13, 2317, 95, 470, 670, 1711, + /* 810 */ 2355, 2506, 781, 161, 160, 778, 777, 776, 158, 2437, + /* 820 */ 489, 2075, 2303, 839, 744, 302, 1621, 1622, 839, 2512, + /* 830 */ 203, 49, 2078, 2336, 2507, 696, 2374, 2337, 1907, 114, + /* 840 */ 2338, 748, 2340, 2341, 743, 2135, 738, 2135, 325, 2319, + /* 850 */ 745, 186, 406, 2427, 411, 728, 2082, 412, 2423, 738, + /* 860 */ 2133, 1682, 2133, 2336, 1683, 536, 2374, 1740, 1741, 114, + /* 870 */ 2338, 748, 2340, 2341, 743, 504, 738, 649, 2355, 642, + /* 880 */ 2458, 2526, 2176, 2427, 2069, 453, 797, 412, 2423, 2043, + /* 890 */ 2303, 2303, 744, 34, 640, 184, 638, 269, 268, 41, + /* 900 */ 40, 1713, 1723, 47, 45, 44, 43, 42, 1739, 1742, + /* 910 */ 1781, 609, 455, 451, 2135, 608, 728, 2082, 1654, 2198, + /* 920 */ 1652, 420, 1801, 1654, 479, 1652, 794, 670, 272, 2133, + /* 930 */ 2506, 2336, 271, 1769, 2374, 1981, 505, 175, 2338, 748, + /* 940 */ 2340, 2341, 743, 111, 738, 44, 43, 42, 2512, 203, + /* 950 */ 1657, 1658, 108, 2507, 696, 1657, 1658, 1710, 194, 1712, + /* 960 */ 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, 740, 736, + /* 970 */ 1731, 1732, 1734, 1735, 1736, 1737, 2, 48, 46, 671, + /* 980 */ 2468, 620, 619, 36, 655, 416, 711, 1653, 1906, 41, + /* 990 */ 40, 796, 2337, 47, 45, 44, 43, 42, 98, 1903, + /* 1000 */ 1738, 370, 1651, 419, 396, 745, 644, 2465, 624, 623, + /* 1010 */ 622, 171, 1683, 35, 2065, 614, 143, 618, 2337, 2084, + /* 1020 */ 198, 617, 2511, 1774, 2510, 2506, 616, 621, 391, 390, + /* 1030 */ 1733, 745, 615, 2355, 670, 611, 670, 2506, 422, 2506, + /* 1040 */ 1809, 2303, 2086, 1659, 2510, 2303, 171, 744, 2507, 2508, + /* 1050 */ 728, 2082, 2303, 280, 2084, 2512, 203, 2512, 203, 2355, + /* 1060 */ 2507, 696, 2507, 696, 1902, 775, 389, 388, 2126, 839, + /* 1070 */ 506, 2303, 49, 744, 1683, 2337, 41, 40, 728, 2082, + /* 1080 */ 47, 45, 44, 43, 42, 739, 2336, 1901, 745, 2374, + /* 1090 */ 2478, 1900, 114, 2338, 748, 2340, 2341, 743, 581, 738, + /* 1100 */ 1899, 1294, 2129, 2130, 2526, 612, 2427, 1677, 1740, 1741, + /* 1110 */ 412, 2423, 2336, 1314, 1315, 2374, 2355, 2303, 115, 2338, + /* 1120 */ 748, 2340, 2341, 743, 1678, 738, 601, 600, 2303, 1389, + /* 1130 */ 744, 1898, 2427, 2337, 728, 2082, 2426, 2423, 387, 386, + /* 1140 */ 2303, 607, 1713, 1723, 2303, 159, 745, 2135, 677, 1739, + /* 1150 */ 1742, 41, 40, 2303, 2079, 47, 45, 44, 43, 42, + /* 1160 */ 603, 602, 714, 609, 1654, 171, 1652, 608, 1897, 2336, + /* 1170 */ 728, 2082, 2374, 2085, 2355, 114, 2338, 748, 2340, 2341, + /* 1180 */ 743, 2287, 738, 3, 2303, 197, 2303, 2526, 744, 2427, + /* 1190 */ 275, 808, 806, 412, 2423, 54, 1657, 1658, 1710, 2022, + /* 1200 */ 1712, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, 740, + /* 1210 */ 736, 1731, 1732, 1734, 1735, 1736, 1737, 2, 48, 46, + /* 1220 */ 55, 2303, 148, 1896, 1895, 2398, 416, 2336, 1653, 2135, + /* 1230 */ 2374, 2135, 438, 114, 2338, 748, 2340, 2341, 743, 99, + /* 1240 */ 738, 1738, 631, 1651, 723, 2526, 2134, 2427, 728, 2082, + /* 1250 */ 779, 412, 2423, 2126, 297, 728, 2082, 643, 699, 2337, + /* 1260 */ 728, 2082, 728, 2082, 702, 728, 2082, 2313, 283, 1662, + /* 1270 */ 1600, 1733, 745, 270, 2499, 713, 2303, 2303, 2447, 1801, + /* 1280 */ 315, 2321, 725, 1905, 1659, 726, 728, 2082, 2060, 634, + /* 1290 */ 780, 2317, 334, 2126, 159, 2112, 628, 626, 728, 2082, + /* 1300 */ 2355, 1920, 834, 267, 139, 260, 321, 1808, 258, 141, + /* 1310 */ 839, 698, 2303, 15, 744, 613, 86, 2337, 423, 1963, + /* 1320 */ 1954, 152, 170, 425, 424, 262, 264, 159, 261, 263, + /* 1330 */ 745, 266, 2446, 1667, 265, 2319, 413, 1711, 646, 1387, + /* 1340 */ 645, 627, 629, 1952, 72, 738, 1738, 71, 1660, 1740, + /* 1350 */ 1741, 284, 2324, 2336, 735, 50, 2374, 50, 2355, 114, + /* 1360 */ 2338, 748, 2340, 2341, 743, 632, 738, 1887, 1888, 1616, + /* 1370 */ 2303, 2526, 744, 2427, 14, 13, 1733, 412, 2423, 2471, + /* 1380 */ 683, 2356, 1661, 1713, 1723, 187, 50, 159, 50, 1659, + /* 1390 */ 1739, 1742, 50, 309, 75, 100, 157, 159, 66, 788, + /* 1400 */ 752, 157, 1619, 159, 789, 1654, 291, 1652, 140, 157, + /* 1410 */ 2326, 2336, 1946, 2019, 2374, 734, 2018, 114, 2338, 748, + /* 1420 */ 2340, 2341, 743, 1366, 738, 1347, 2202, 1936, 1364, 2526, + /* 1430 */ 1840, 2427, 1839, 1665, 2461, 412, 2423, 1657, 1658, 1710, + /* 1440 */ 680, 1712, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, + /* 1450 */ 740, 736, 1731, 1732, 1734, 1735, 1736, 1737, 2, 429, + /* 1460 */ 289, 333, 712, 1724, 832, 402, 1348, 1569, 313, 720, + /* 1470 */ 687, 317, 1434, 1775, 255, 1462, 1466, 399, 1473, 2337, + /* 1480 */ 717, 2203, 1942, 1471, 162, 2123, 663, 2462, 2472, 296, + /* 1490 */ 178, 708, 745, 299, 2044, 303, 432, 437, 5, 599, + /* 1500 */ 595, 591, 587, 445, 254, 379, 446, 1686, 457, 456, + /* 1510 */ 1668, 212, 1663, 459, 1759, 214, 211, 700, 1593, 328, + /* 1520 */ 2355, 1676, 473, 1677, 480, 703, 225, 482, 486, 488, + /* 1530 */ 493, 507, 2303, 525, 744, 514, 2195, 2337, 516, 524, + /* 1540 */ 526, 537, 1671, 1673, 535, 96, 1664, 229, 252, 540, + /* 1550 */ 745, 538, 230, 541, 232, 543, 736, 1731, 1732, 1734, + /* 1560 */ 1735, 1736, 1737, 545, 2337, 1684, 560, 4, 561, 569, + /* 1570 */ 571, 240, 568, 2336, 92, 1679, 2374, 745, 2355, 114, + /* 1580 */ 2338, 748, 2340, 2341, 743, 1685, 738, 573, 1687, 243, + /* 1590 */ 2303, 2402, 744, 2427, 574, 575, 1688, 412, 2423, 246, + /* 1600 */ 577, 583, 2211, 604, 248, 2355, 93, 2274, 94, 116, + /* 1610 */ 606, 242, 253, 2072, 257, 635, 636, 2303, 2068, 744, + /* 1620 */ 251, 244, 2337, 360, 648, 259, 650, 249, 576, 97, + /* 1630 */ 1680, 2336, 2271, 164, 2374, 745, 165, 114, 2338, 748, + /* 1640 */ 2340, 2341, 743, 2070, 738, 2066, 241, 166, 167, 2400, + /* 1650 */ 329, 2427, 2270, 153, 276, 412, 2423, 2257, 2336, 658, + /* 1660 */ 657, 2374, 281, 2355, 114, 2338, 748, 2340, 2341, 743, + /* 1670 */ 662, 738, 665, 664, 279, 2303, 731, 744, 2427, 659, + /* 1680 */ 674, 684, 412, 2423, 2477, 718, 2476, 286, 288, 693, + /* 1690 */ 8, 672, 2449, 675, 290, 179, 673, 2337, 2529, 2505, + /* 1700 */ 295, 403, 704, 1801, 701, 145, 1681, 298, 2443, 1806, + /* 1710 */ 745, 330, 1804, 190, 721, 305, 2336, 154, 716, 2374, + /* 1720 */ 2225, 2224, 115, 2338, 748, 2340, 2341, 743, 293, 738, + /* 1730 */ 2223, 408, 1, 206, 2337, 331, 2427, 292, 2355, 294, + /* 1740 */ 733, 2423, 722, 155, 2083, 332, 105, 745, 62, 2408, + /* 1750 */ 2303, 107, 744, 2127, 335, 1269, 323, 750, 833, 53, + /* 1760 */ 371, 372, 836, 344, 358, 2337, 337, 163, 348, 838, + /* 1770 */ 359, 339, 2295, 2294, 2293, 2355, 81, 2288, 745, 434, + /* 1780 */ 435, 1644, 1645, 209, 439, 2286, 441, 2303, 442, 744, + /* 1790 */ 443, 746, 1643, 2285, 2374, 380, 2283, 115, 2338, 748, + /* 1800 */ 2340, 2341, 743, 448, 738, 2282, 2355, 450, 2337, 2281, + /* 1810 */ 452, 2427, 2280, 454, 1632, 374, 2423, 2261, 2303, 213, + /* 1820 */ 744, 745, 2260, 215, 1596, 82, 1595, 2238, 2336, 2237, + /* 1830 */ 2337, 2374, 2236, 466, 176, 2338, 748, 2340, 2341, 743, + /* 1840 */ 467, 738, 2235, 745, 2234, 2185, 471, 1539, 2182, 2355, + /* 1850 */ 474, 2181, 2175, 478, 2172, 477, 218, 2171, 2170, 2336, + /* 1860 */ 85, 2303, 2374, 744, 2169, 115, 2338, 748, 2340, 2341, + /* 1870 */ 743, 2355, 738, 2174, 220, 2173, 401, 2168, 2167, 2427, + /* 1880 */ 2165, 2164, 2163, 2303, 2424, 744, 222, 494, 697, 2527, + /* 1890 */ 2162, 496, 2178, 2161, 2160, 2159, 2158, 2157, 2180, 2156, + /* 1900 */ 2155, 2337, 2336, 2154, 2153, 2374, 2152, 2151, 175, 2338, + /* 1910 */ 748, 2340, 2341, 743, 745, 738, 2150, 2149, 2148, 2147, + /* 1920 */ 224, 2146, 2145, 2144, 2336, 2143, 2179, 2374, 2337, 91, + /* 1930 */ 357, 2338, 748, 2340, 2341, 743, 2177, 738, 2142, 2141, + /* 1940 */ 2140, 745, 2355, 228, 2139, 2138, 1545, 528, 2137, 530, + /* 1950 */ 2136, 2469, 1405, 1409, 2303, 368, 744, 1984, 369, 1983, + /* 1960 */ 1982, 1980, 1977, 547, 1401, 1976, 231, 1969, 1956, 2355, + /* 1970 */ 546, 548, 550, 1931, 233, 234, 1930, 236, 554, 552, + /* 1980 */ 558, 2303, 185, 744, 1293, 551, 2259, 2255, 556, 78, + /* 1990 */ 2245, 2233, 2232, 555, 238, 2336, 79, 245, 2374, 2209, + /* 2000 */ 2337, 350, 2338, 748, 2340, 2341, 743, 2323, 738, 247, + /* 2010 */ 2061, 1979, 195, 745, 1975, 566, 584, 586, 250, 1973, + /* 2020 */ 588, 1971, 2336, 585, 1340, 2374, 2337, 1968, 176, 2338, + /* 2030 */ 748, 2340, 2341, 743, 592, 738, 589, 590, 594, 742, + /* 2040 */ 593, 2355, 596, 1951, 597, 598, 407, 692, 1949, 1950, + /* 2050 */ 1948, 1927, 2063, 2303, 1478, 744, 1477, 2062, 1966, 1391, + /* 2060 */ 1964, 1390, 1388, 1386, 805, 1385, 1384, 2355, 65, 256, + /* 2070 */ 1383, 807, 1382, 1379, 1378, 1377, 1376, 392, 393, 2303, + /* 2080 */ 1606, 744, 1955, 2528, 394, 630, 1953, 395, 1926, 1925, + /* 2090 */ 1924, 633, 1923, 1922, 2336, 641, 637, 2374, 2337, 117, + /* 2100 */ 357, 2338, 748, 2340, 2341, 743, 639, 738, 1626, 1628, + /* 2110 */ 1630, 745, 1625, 29, 2258, 69, 278, 2254, 1602, 1604, + /* 2120 */ 2336, 2511, 652, 2374, 2244, 660, 356, 2338, 748, 2340, + /* 2130 */ 2341, 743, 2231, 738, 2230, 2393, 17, 20, 1857, 2355, + /* 2140 */ 842, 6, 21, 57, 415, 7, 22, 31, 285, 676, + /* 2150 */ 58, 2303, 177, 744, 287, 1838, 327, 661, 189, 282, + /* 2160 */ 1581, 200, 33, 1580, 678, 2324, 2337, 67, 666, 24, + /* 2170 */ 188, 32, 193, 80, 668, 1872, 169, 1871, 1827, 745, + /* 2180 */ 404, 830, 826, 822, 818, 23, 324, 18, 1876, 1875, + /* 2190 */ 405, 1877, 2336, 1878, 301, 2374, 60, 180, 357, 2338, + /* 2200 */ 748, 2340, 2341, 743, 1798, 738, 1797, 2355, 2229, 2208, + /* 2210 */ 102, 2207, 417, 101, 25, 319, 308, 103, 1833, 2303, + /* 2220 */ 26, 744, 191, 13, 1669, 719, 314, 113, 1750, 70, + /* 2230 */ 318, 181, 1749, 104, 192, 2337, 108, 2377, 1760, 1728, + /* 2240 */ 737, 1703, 751, 1726, 39, 749, 16, 59, 745, 316, + /* 2250 */ 1725, 27, 2337, 28, 11, 1695, 322, 1463, 1460, 418, + /* 2260 */ 2336, 753, 724, 2374, 755, 745, 357, 2338, 748, 2340, + /* 2270 */ 2341, 743, 756, 738, 758, 1459, 2355, 759, 2337, 1456, + /* 2280 */ 761, 762, 764, 767, 1450, 765, 1454, 1448, 2303, 1453, + /* 2290 */ 744, 745, 1472, 2355, 1468, 768, 109, 1452, 110, 77, + /* 2300 */ 1451, 1338, 307, 782, 1373, 2303, 1370, 744, 747, 306, + /* 2310 */ 1369, 1368, 1367, 1365, 1363, 1362, 1361, 1399, 793, 2355, + /* 2320 */ 1398, 795, 1359, 207, 1358, 1357, 1356, 1395, 277, 647, + /* 2330 */ 1355, 2303, 2374, 744, 1354, 352, 2338, 748, 2340, 2341, + /* 2340 */ 743, 1344, 738, 1353, 1393, 1350, 2336, 1349, 1346, 2374, + /* 2350 */ 1345, 2337, 342, 2338, 748, 2340, 2341, 743, 1343, 738, + /* 2360 */ 1974, 815, 817, 816, 745, 1972, 819, 820, 821, 1970, + /* 2370 */ 823, 1967, 2336, 2337, 824, 2374, 825, 827, 341, 2338, + /* 2380 */ 748, 2340, 2341, 743, 829, 738, 745, 828, 1947, 831, + /* 2390 */ 1282, 1921, 2355, 841, 1270, 835, 1891, 326, 837, 1891, + /* 2400 */ 1655, 336, 840, 1891, 2303, 1891, 744, 1891, 1891, 1891, + /* 2410 */ 1891, 1891, 1891, 1891, 2355, 1891, 1891, 1891, 1891, 1891, + /* 2420 */ 1891, 1891, 1891, 1891, 1891, 1891, 2303, 1891, 744, 1891, + /* 2430 */ 2337, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, + /* 2440 */ 1891, 1891, 1891, 745, 1891, 2336, 1891, 1891, 2374, 2337, + /* 2450 */ 1891, 343, 2338, 748, 2340, 2341, 743, 1891, 738, 1891, + /* 2460 */ 1891, 1891, 745, 1891, 1891, 1891, 1891, 2336, 1891, 1891, + /* 2470 */ 2374, 2355, 1891, 349, 2338, 748, 2340, 2341, 743, 1891, + /* 2480 */ 738, 1891, 1891, 2303, 1891, 744, 1891, 1891, 1891, 1891, + /* 2490 */ 2355, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, + /* 2500 */ 1891, 1891, 2303, 1891, 744, 1891, 1891, 2337, 1891, 1891, + /* 2510 */ 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, + /* 2520 */ 745, 1891, 1891, 2337, 2336, 1891, 1891, 2374, 1891, 1891, + /* 2530 */ 353, 2338, 748, 2340, 2341, 743, 745, 738, 1891, 1891, + /* 2540 */ 1891, 1891, 1891, 2336, 1891, 1891, 2374, 1891, 2355, 345, + /* 2550 */ 2338, 748, 2340, 2341, 743, 1891, 738, 1891, 1891, 1891, + /* 2560 */ 2303, 1891, 744, 1891, 2355, 1891, 1891, 1891, 1891, 1891, + /* 2570 */ 1891, 1891, 1891, 1891, 1891, 1891, 2303, 1891, 744, 1891, + /* 2580 */ 1891, 2337, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, + /* 2590 */ 1891, 1891, 1891, 1891, 745, 1891, 1891, 1891, 1891, 1891, + /* 2600 */ 1891, 2336, 1891, 2337, 2374, 1891, 1891, 354, 2338, 748, + /* 2610 */ 2340, 2341, 743, 1891, 738, 1891, 745, 2336, 2337, 1891, + /* 2620 */ 2374, 1891, 2355, 346, 2338, 748, 2340, 2341, 743, 1891, + /* 2630 */ 738, 745, 1891, 1891, 2303, 1891, 744, 1891, 1891, 2337, + /* 2640 */ 1891, 1891, 1891, 1891, 2355, 1891, 1891, 1891, 1891, 1891, + /* 2650 */ 1891, 1891, 745, 1891, 1891, 1891, 2303, 1891, 744, 2355, + /* 2660 */ 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, + /* 2670 */ 1891, 2303, 1891, 744, 1891, 2336, 1891, 1891, 2374, 1891, + /* 2680 */ 2355, 355, 2338, 748, 2340, 2341, 743, 1891, 738, 1891, + /* 2690 */ 1891, 1891, 2303, 1891, 744, 1891, 1891, 2336, 1891, 1891, + /* 2700 */ 2374, 1891, 1891, 347, 2338, 748, 2340, 2341, 743, 1891, + /* 2710 */ 738, 1891, 2336, 1891, 1891, 2374, 1891, 1891, 361, 2338, + /* 2720 */ 748, 2340, 2341, 743, 2337, 738, 1891, 1891, 1891, 1891, + /* 2730 */ 1891, 1891, 1891, 2336, 1891, 1891, 2374, 745, 1891, 362, + /* 2740 */ 2338, 748, 2340, 2341, 743, 1891, 738, 1891, 1891, 1891, + /* 2750 */ 1891, 1891, 1891, 1891, 1891, 2337, 1891, 1891, 1891, 1891, + /* 2760 */ 1891, 1891, 1891, 1891, 1891, 2355, 1891, 1891, 745, 1891, + /* 2770 */ 1891, 1891, 1891, 1891, 1891, 1891, 1891, 2303, 1891, 744, + /* 2780 */ 1891, 2337, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, + /* 2790 */ 1891, 1891, 1891, 1891, 745, 1891, 2355, 1891, 1891, 1891, + /* 2800 */ 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 2303, 1891, + /* 2810 */ 744, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 2336, 1891, + /* 2820 */ 1891, 2374, 2355, 1891, 2349, 2338, 748, 2340, 2341, 743, + /* 2830 */ 1891, 738, 1891, 1891, 2303, 1891, 744, 1891, 1891, 1891, + /* 2840 */ 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 2336, + /* 2850 */ 1891, 1891, 2374, 2337, 1891, 2348, 2338, 748, 2340, 2341, + /* 2860 */ 743, 1891, 738, 1891, 1891, 1891, 745, 1891, 1891, 1891, + /* 2870 */ 1891, 1891, 1891, 1891, 2337, 2336, 1891, 1891, 2374, 1891, + /* 2880 */ 1891, 2347, 2338, 748, 2340, 2341, 743, 745, 738, 1891, + /* 2890 */ 1891, 1891, 1891, 1891, 2355, 1891, 1891, 1891, 1891, 1891, + /* 2900 */ 1891, 1891, 1891, 1891, 1891, 1891, 2303, 1891, 744, 1891, + /* 2910 */ 1891, 2337, 1891, 1891, 1891, 2355, 1891, 1891, 1891, 1891, + /* 2920 */ 1891, 1891, 1891, 1891, 745, 1891, 1891, 2303, 1891, 744, + /* 2930 */ 1891, 1891, 2337, 1891, 1891, 1891, 1891, 1891, 1891, 1891, + /* 2940 */ 1891, 1891, 1891, 1891, 1891, 745, 1891, 2336, 1891, 1891, + /* 2950 */ 2374, 1891, 2355, 376, 2338, 748, 2340, 2341, 743, 1891, + /* 2960 */ 738, 1891, 1891, 1891, 2303, 1891, 744, 1891, 2336, 2337, + /* 2970 */ 1891, 2374, 1891, 2355, 377, 2338, 748, 2340, 2341, 743, + /* 2980 */ 1891, 738, 745, 1891, 1891, 2303, 1891, 744, 1891, 1891, + /* 2990 */ 2337, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, + /* 3000 */ 1891, 1891, 1891, 745, 1891, 2336, 1891, 1891, 2374, 1891, + /* 3010 */ 2355, 373, 2338, 748, 2340, 2341, 743, 1891, 738, 1891, + /* 3020 */ 1891, 1891, 2303, 1891, 744, 1891, 2336, 1891, 1891, 2374, + /* 3030 */ 1891, 2355, 378, 2338, 748, 2340, 2341, 743, 1891, 738, + /* 3040 */ 1891, 1891, 1891, 2303, 1891, 744, 1891, 1891, 1891, 1891, + /* 3050 */ 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, + /* 3060 */ 1891, 1891, 1891, 746, 1891, 1891, 2374, 1891, 1891, 352, + /* 3070 */ 2338, 748, 2340, 2341, 743, 1891, 738, 1891, 1891, 1891, + /* 3080 */ 1891, 1891, 1891, 1891, 2336, 1891, 1891, 2374, 1891, 1891, + /* 3090 */ 351, 2338, 748, 2340, 2341, 743, 1891, 738, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 383, 357, 432, 383, 360, 361, 357, 392, 391, 360, - /* 10 */ 361, 391, 12, 13, 14, 405, 399, 2, 398, 399, - /* 20 */ 20, 362, 22, 8, 9, 20, 406, 12, 13, 14, - /* 30 */ 15, 16, 2, 423, 424, 35, 0, 37, 8, 9, - /* 40 */ 465, 466, 12, 13, 14, 15, 16, 350, 8, 9, - /* 50 */ 362, 363, 12, 13, 14, 15, 16, 362, 363, 20, - /* 60 */ 363, 391, 404, 405, 64, 0, 407, 408, 401, 410, - /* 70 */ 70, 404, 405, 414, 8, 9, 372, 77, 12, 13, - /* 80 */ 14, 15, 16, 413, 380, 415, 21, 371, 391, 24, - /* 90 */ 25, 26, 27, 28, 29, 30, 31, 32, 20, 411, - /* 100 */ 403, 358, 405, 103, 388, 362, 106, 364, 72, 73, - /* 110 */ 74, 75, 76, 397, 78, 79, 80, 81, 82, 83, + /* 0 */ 362, 363, 349, 426, 351, 426, 357, 392, 431, 360, + /* 10 */ 361, 383, 12, 13, 14, 0, 461, 358, 463, 391, + /* 20 */ 20, 362, 22, 364, 8, 9, 398, 399, 12, 13, + /* 30 */ 14, 15, 16, 20, 406, 35, 0, 37, 4, 24, + /* 40 */ 25, 26, 27, 28, 29, 30, 31, 32, 350, 411, + /* 50 */ 20, 50, 391, 476, 362, 476, 479, 363, 479, 398, + /* 60 */ 51, 363, 391, 20, 358, 65, 0, 406, 362, 60, + /* 70 */ 364, 71, 63, 64, 497, 498, 497, 498, 78, 502, + /* 80 */ 503, 502, 503, 0, 413, 391, 415, 21, 371, 391, + /* 90 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 407, + /* 100 */ 408, 403, 410, 405, 104, 388, 414, 107, 20, 73, + /* 110 */ 74, 75, 76, 77, 397, 79, 80, 81, 82, 83, /* 120 */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - /* 130 */ 94, 95, 96, 97, 98, 99, 476, 362, 363, 479, - /* 140 */ 22, 444, 142, 143, 447, 363, 391, 450, 451, 452, - /* 150 */ 453, 454, 455, 460, 457, 37, 463, 497, 498, 462, - /* 160 */ 69, 464, 502, 503, 4, 468, 469, 472, 473, 474, - /* 170 */ 415, 476, 477, 391, 479, 362, 363, 177, 178, 449, - /* 180 */ 483, 142, 143, 23, 184, 185, 411, 20, 491, 391, - /* 190 */ 20, 20, 497, 498, 405, 77, 398, 502, 503, 199, - /* 200 */ 349, 201, 351, 3, 406, 475, 46, 47, 48, 420, - /* 210 */ 8, 9, 423, 424, 12, 13, 14, 15, 16, 21, - /* 220 */ 20, 103, 24, 25, 26, 27, 28, 29, 30, 31, - /* 230 */ 32, 231, 232, 233, 452, 235, 236, 237, 238, 239, + /* 130 */ 94, 95, 96, 97, 98, 99, 100, 476, 465, 466, + /* 140 */ 479, 107, 444, 143, 144, 447, 452, 20, 450, 451, + /* 150 */ 452, 453, 454, 455, 20, 457, 143, 144, 497, 498, + /* 160 */ 462, 20, 464, 502, 503, 21, 468, 469, 24, 25, + /* 170 */ 26, 27, 28, 29, 30, 31, 32, 177, 178, 357, + /* 180 */ 179, 483, 360, 361, 184, 185, 4, 14, 187, 491, + /* 190 */ 362, 363, 401, 20, 104, 404, 405, 184, 185, 199, + /* 200 */ 107, 201, 23, 362, 363, 23, 20, 191, 118, 119, + /* 210 */ 120, 121, 122, 123, 124, 125, 126, 127, 426, 129, + /* 220 */ 130, 131, 132, 133, 134, 135, 47, 48, 46, 47, + /* 230 */ 48, 231, 232, 233, 107, 235, 236, 237, 238, 239, /* 240 */ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, - /* 250 */ 250, 251, 252, 12, 13, 177, 178, 191, 18, 183, - /* 260 */ 20, 20, 20, 22, 22, 362, 363, 27, 22, 350, - /* 270 */ 30, 20, 70, 106, 476, 35, 35, 479, 37, 37, - /* 280 */ 379, 20, 363, 37, 471, 472, 473, 474, 137, 476, - /* 290 */ 477, 51, 141, 53, 393, 497, 498, 55, 58, 476, - /* 300 */ 502, 503, 479, 369, 403, 64, 0, 107, 68, 14, - /* 310 */ 391, 70, 142, 143, 411, 20, 114, 199, 77, 201, - /* 320 */ 386, 498, 403, 77, 405, 502, 503, 350, 394, 390, - /* 330 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 135, - /* 340 */ 363, 402, 365, 139, 103, 105, 20, 106, 447, 231, - /* 350 */ 232, 275, 276, 277, 184, 185, 116, 106, 457, 208, - /* 360 */ 362, 295, 211, 444, 0, 214, 447, 216, 391, 450, - /* 370 */ 451, 452, 453, 454, 455, 20, 457, 50, 176, 179, - /* 380 */ 403, 369, 405, 142, 143, 350, 146, 147, 0, 149, + /* 250 */ 250, 251, 252, 12, 13, 107, 369, 20, 18, 22, + /* 260 */ 20, 20, 461, 22, 463, 177, 178, 27, 476, 350, + /* 270 */ 30, 479, 20, 386, 37, 35, 35, 70, 37, 8, + /* 280 */ 9, 394, 363, 12, 13, 14, 15, 16, 183, 497, + /* 290 */ 498, 51, 55, 53, 502, 503, 362, 363, 58, 59, + /* 300 */ 472, 473, 474, 269, 476, 477, 65, 479, 225, 69, + /* 310 */ 391, 295, 71, 472, 473, 474, 382, 476, 477, 78, + /* 320 */ 405, 383, 403, 389, 405, 497, 498, 14, 20, 391, + /* 330 */ 502, 503, 372, 20, 73, 74, 75, 399, 423, 424, + /* 340 */ 380, 80, 81, 82, 390, 104, 106, 86, 107, 405, + /* 350 */ 177, 20, 91, 92, 93, 94, 402, 117, 97, 107, + /* 360 */ 449, 100, 269, 444, 420, 179, 447, 423, 424, 450, + /* 370 */ 451, 452, 453, 454, 455, 456, 457, 458, 459, 108, + /* 380 */ 275, 276, 277, 350, 143, 144, 475, 147, 148, 362, /* 390 */ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - /* 400 */ 160, 161, 162, 163, 164, 165, 394, 167, 168, 169, - /* 410 */ 22, 492, 493, 173, 174, 175, 418, 419, 177, 178, - /* 420 */ 180, 444, 20, 116, 447, 184, 185, 450, 451, 452, - /* 430 */ 453, 454, 455, 69, 457, 20, 269, 21, 403, 462, - /* 440 */ 199, 464, 201, 8, 9, 468, 469, 12, 13, 14, - /* 450 */ 15, 16, 36, 77, 38, 39, 40, 426, 256, 257, - /* 460 */ 258, 259, 260, 261, 262, 263, 264, 265, 266, 69, - /* 470 */ 136, 137, 231, 232, 233, 141, 235, 236, 237, 238, + /* 400 */ 160, 161, 162, 163, 164, 165, 233, 167, 168, 169, + /* 410 */ 0, 18, 20, 173, 174, 175, 23, 269, 177, 178, + /* 420 */ 180, 362, 363, 8, 9, 184, 185, 12, 13, 14, + /* 430 */ 15, 16, 22, 40, 41, 20, 403, 44, 107, 70, + /* 440 */ 199, 476, 201, 22, 479, 418, 419, 54, 0, 8, + /* 450 */ 9, 143, 144, 12, 13, 14, 15, 16, 37, 66, + /* 460 */ 67, 68, 69, 498, 362, 363, 253, 502, 503, 107, + /* 470 */ 362, 363, 231, 232, 233, 231, 235, 236, 237, 238, /* 480 */ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, - /* 490 */ 249, 250, 251, 252, 253, 12, 13, 35, 358, 350, - /* 500 */ 20, 22, 362, 20, 364, 22, 179, 476, 106, 350, - /* 510 */ 479, 106, 363, 51, 187, 253, 37, 4, 35, 51, - /* 520 */ 37, 59, 60, 61, 62, 64, 64, 59, 497, 498, - /* 530 */ 62, 63, 350, 502, 503, 350, 33, 72, 73, 74, - /* 540 */ 391, 362, 107, 86, 79, 80, 81, 64, 363, 362, - /* 550 */ 85, 0, 403, 70, 405, 90, 91, 92, 93, 233, - /* 560 */ 77, 96, 403, 33, 99, 476, 105, 105, 479, 108, - /* 570 */ 108, 56, 57, 8, 9, 45, 391, 12, 13, 14, - /* 580 */ 15, 16, 103, 12, 13, 403, 103, 498, 403, 106, - /* 590 */ 405, 502, 503, 444, 179, 20, 447, 22, 33, 450, - /* 600 */ 451, 452, 453, 454, 455, 148, 457, 379, 37, 460, - /* 610 */ 107, 462, 463, 464, 14, 436, 437, 468, 469, 106, - /* 620 */ 20, 393, 116, 436, 437, 142, 143, 170, 171, 444, - /* 630 */ 55, 403, 447, 172, 172, 450, 451, 452, 453, 454, - /* 640 */ 455, 391, 457, 181, 182, 367, 368, 462, 398, 464, - /* 650 */ 188, 189, 34, 468, 469, 449, 406, 177, 8, 9, - /* 660 */ 177, 178, 12, 13, 14, 15, 16, 184, 185, 207, - /* 670 */ 33, 269, 107, 14, 269, 447, 491, 0, 0, 20, - /* 680 */ 103, 475, 199, 392, 201, 457, 135, 136, 137, 138, - /* 690 */ 139, 140, 141, 106, 117, 118, 119, 120, 121, 122, - /* 700 */ 123, 124, 125, 126, 391, 128, 129, 130, 131, 132, - /* 710 */ 133, 134, 399, 233, 231, 232, 233, 172, 235, 236, + /* 490 */ 249, 250, 251, 252, 253, 12, 13, 137, 138, 78, + /* 500 */ 107, 387, 142, 20, 350, 22, 12, 13, 14, 15, + /* 510 */ 16, 449, 71, 350, 362, 363, 117, 363, 35, 411, + /* 520 */ 37, 269, 12, 13, 280, 281, 282, 283, 284, 285, + /* 530 */ 286, 472, 473, 474, 382, 476, 477, 475, 145, 65, + /* 540 */ 350, 389, 362, 363, 350, 391, 14, 37, 65, 0, + /* 550 */ 396, 117, 20, 363, 71, 441, 115, 403, 362, 405, + /* 560 */ 198, 78, 200, 8, 9, 166, 403, 12, 13, 14, + /* 570 */ 15, 16, 117, 471, 472, 473, 474, 350, 476, 477, + /* 580 */ 106, 391, 362, 109, 191, 192, 193, 104, 33, 196, + /* 590 */ 107, 411, 230, 403, 179, 405, 20, 403, 444, 22, + /* 600 */ 269, 447, 209, 210, 450, 451, 452, 453, 454, 455, + /* 610 */ 162, 457, 350, 220, 37, 379, 223, 176, 170, 226, + /* 620 */ 227, 228, 229, 230, 0, 233, 143, 144, 37, 393, + /* 630 */ 403, 269, 436, 437, 444, 0, 253, 447, 255, 403, + /* 640 */ 450, 451, 452, 453, 454, 455, 172, 457, 233, 3, + /* 650 */ 460, 20, 462, 463, 464, 350, 436, 437, 468, 469, + /* 660 */ 177, 178, 269, 108, 350, 403, 20, 184, 185, 78, + /* 670 */ 8, 9, 362, 363, 12, 13, 14, 15, 16, 347, + /* 680 */ 78, 104, 199, 447, 201, 136, 137, 138, 139, 140, + /* 690 */ 141, 142, 382, 457, 70, 87, 42, 256, 257, 258, + /* 700 */ 259, 260, 261, 262, 263, 264, 265, 266, 403, 177, + /* 710 */ 20, 201, 22, 350, 231, 232, 233, 403, 235, 236, /* 720 */ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, - /* 730 */ 247, 248, 249, 250, 251, 252, 12, 13, 14, 392, - /* 740 */ 350, 14, 15, 16, 20, 391, 22, 350, 203, 72, - /* 750 */ 73, 74, 398, 363, 231, 365, 79, 80, 81, 35, - /* 760 */ 406, 37, 85, 362, 363, 362, 363, 90, 91, 92, - /* 770 */ 93, 350, 201, 96, 362, 363, 99, 177, 347, 0, - /* 780 */ 42, 391, 269, 382, 363, 382, 365, 392, 64, 253, - /* 790 */ 389, 255, 389, 403, 382, 405, 367, 368, 68, 449, - /* 800 */ 403, 77, 350, 280, 281, 282, 283, 284, 285, 286, - /* 810 */ 426, 392, 391, 8, 9, 431, 391, 12, 13, 14, - /* 820 */ 15, 16, 14, 398, 403, 475, 405, 103, 20, 179, - /* 830 */ 106, 406, 392, 233, 444, 350, 177, 447, 350, 161, - /* 840 */ 450, 451, 452, 453, 454, 455, 391, 457, 170, 362, - /* 850 */ 363, 363, 462, 398, 464, 403, 269, 426, 468, 469, - /* 860 */ 476, 406, 431, 479, 3, 444, 142, 143, 447, 382, - /* 870 */ 392, 450, 451, 452, 453, 454, 455, 426, 457, 391, - /* 880 */ 371, 497, 498, 462, 350, 464, 502, 503, 403, 468, - /* 890 */ 469, 403, 233, 405, 135, 136, 137, 138, 139, 140, - /* 900 */ 141, 177, 178, 362, 363, 383, 397, 476, 184, 185, - /* 910 */ 479, 391, 107, 391, 135, 136, 137, 138, 139, 140, - /* 920 */ 141, 399, 49, 199, 194, 201, 406, 476, 497, 498, - /* 930 */ 479, 294, 444, 502, 503, 447, 0, 403, 450, 451, - /* 940 */ 452, 453, 454, 455, 456, 457, 458, 459, 497, 498, - /* 950 */ 176, 221, 222, 502, 503, 231, 232, 233, 22, 235, + /* 730 */ 247, 248, 249, 250, 251, 252, 12, 13, 14, 350, + /* 740 */ 391, 22, 362, 363, 20, 55, 22, 398, 362, 363, + /* 750 */ 392, 137, 363, 177, 108, 406, 37, 149, 426, 35, + /* 760 */ 69, 37, 382, 431, 476, 233, 403, 479, 382, 350, + /* 770 */ 108, 136, 137, 138, 139, 140, 141, 142, 170, 171, + /* 780 */ 391, 379, 363, 22, 365, 497, 498, 362, 363, 65, + /* 790 */ 502, 503, 403, 449, 405, 393, 369, 78, 37, 20, + /* 800 */ 362, 363, 78, 1, 2, 403, 371, 382, 476, 233, + /* 810 */ 391, 479, 136, 137, 138, 139, 140, 141, 142, 475, + /* 820 */ 382, 394, 403, 104, 405, 179, 212, 213, 104, 497, + /* 830 */ 498, 107, 397, 444, 502, 503, 447, 350, 350, 450, + /* 840 */ 451, 452, 453, 454, 455, 391, 457, 391, 34, 447, + /* 850 */ 363, 462, 398, 464, 398, 362, 363, 468, 469, 457, + /* 860 */ 406, 20, 406, 444, 233, 104, 447, 143, 144, 450, + /* 870 */ 451, 452, 453, 454, 455, 382, 457, 426, 391, 21, + /* 880 */ 491, 462, 0, 464, 392, 194, 378, 468, 469, 381, + /* 890 */ 403, 403, 405, 2, 36, 391, 38, 39, 40, 8, + /* 900 */ 9, 177, 178, 12, 13, 14, 15, 16, 184, 185, + /* 910 */ 108, 136, 221, 222, 391, 140, 362, 363, 199, 415, + /* 920 */ 201, 398, 268, 199, 42, 201, 13, 476, 138, 406, + /* 930 */ 479, 444, 142, 176, 447, 0, 382, 450, 451, 452, + /* 940 */ 453, 454, 455, 107, 457, 14, 15, 16, 497, 498, + /* 950 */ 231, 232, 116, 502, 503, 231, 232, 233, 179, 235, /* 960 */ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, - /* 970 */ 246, 247, 248, 249, 250, 251, 252, 12, 13, 106, - /* 980 */ 350, 362, 363, 22, 426, 20, 37, 22, 350, 1, - /* 990 */ 362, 363, 461, 363, 463, 365, 362, 363, 37, 136, - /* 1000 */ 35, 382, 37, 383, 362, 363, 268, 19, 376, 377, - /* 1010 */ 382, 391, 350, 472, 473, 474, 382, 476, 477, 399, - /* 1020 */ 0, 391, 379, 35, 382, 363, 77, 365, 37, 64, - /* 1030 */ 256, 362, 363, 403, 476, 405, 393, 479, 4, 51, - /* 1040 */ 266, 403, 77, 362, 363, 64, 403, 59, 60, 61, - /* 1050 */ 62, 382, 64, 391, 13, 497, 498, 387, 362, 363, - /* 1060 */ 502, 503, 42, 382, 103, 403, 380, 405, 103, 362, - /* 1070 */ 363, 106, 350, 4, 444, 212, 213, 447, 382, 20, - /* 1080 */ 450, 451, 452, 453, 454, 455, 426, 457, 19, 108, - /* 1090 */ 447, 448, 462, 105, 464, 20, 108, 20, 468, 469, - /* 1100 */ 457, 362, 363, 0, 35, 351, 444, 142, 143, 447, - /* 1110 */ 23, 441, 450, 451, 452, 453, 454, 455, 77, 457, - /* 1120 */ 51, 382, 20, 33, 462, 403, 464, 58, 140, 378, - /* 1130 */ 468, 469, 381, 64, 47, 48, 476, 376, 377, 479, - /* 1140 */ 8, 9, 177, 178, 12, 13, 14, 15, 16, 184, - /* 1150 */ 185, 290, 20, 39, 40, 362, 363, 497, 498, 461, - /* 1160 */ 33, 463, 502, 503, 199, 400, 201, 391, 403, 181, - /* 1170 */ 350, 362, 363, 391, 105, 382, 188, 108, 106, 472, - /* 1180 */ 473, 474, 406, 476, 477, 1, 2, 115, 406, 426, - /* 1190 */ 106, 382, 201, 350, 350, 207, 231, 232, 233, 350, + /* 970 */ 246, 247, 248, 249, 250, 251, 252, 12, 13, 492, + /* 980 */ 493, 376, 377, 2, 426, 20, 426, 22, 350, 8, + /* 990 */ 9, 78, 350, 12, 13, 14, 15, 16, 208, 350, + /* 1000 */ 35, 211, 37, 383, 214, 363, 216, 365, 73, 74, + /* 1010 */ 75, 391, 233, 256, 392, 80, 81, 82, 350, 399, + /* 1020 */ 179, 86, 476, 266, 3, 479, 91, 92, 93, 94, + /* 1030 */ 65, 363, 97, 391, 476, 100, 476, 479, 383, 479, + /* 1040 */ 4, 403, 392, 78, 498, 403, 391, 405, 502, 503, + /* 1050 */ 362, 363, 403, 392, 399, 497, 498, 497, 498, 391, + /* 1060 */ 502, 503, 502, 503, 350, 400, 39, 40, 403, 104, + /* 1070 */ 382, 403, 107, 405, 233, 350, 8, 9, 362, 363, + /* 1080 */ 12, 13, 14, 15, 16, 392, 444, 350, 363, 447, + /* 1090 */ 365, 350, 450, 451, 452, 453, 454, 455, 382, 457, + /* 1100 */ 350, 14, 404, 405, 462, 13, 464, 20, 143, 144, + /* 1110 */ 468, 469, 444, 56, 57, 447, 391, 403, 450, 451, + /* 1120 */ 452, 453, 454, 455, 20, 457, 367, 368, 403, 37, + /* 1130 */ 405, 350, 464, 350, 362, 363, 468, 469, 111, 112, + /* 1140 */ 403, 114, 177, 178, 403, 33, 363, 391, 365, 184, + /* 1150 */ 185, 8, 9, 403, 382, 12, 13, 14, 15, 16, + /* 1160 */ 367, 368, 406, 136, 199, 391, 201, 140, 350, 444, + /* 1170 */ 362, 363, 447, 399, 391, 450, 451, 452, 453, 454, + /* 1180 */ 455, 0, 457, 33, 403, 432, 403, 462, 405, 464, + /* 1190 */ 382, 376, 377, 468, 469, 45, 231, 232, 233, 380, /* 1200 */ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, /* 1210 */ 245, 246, 247, 248, 249, 250, 251, 252, 12, 13, - /* 1220 */ 362, 363, 350, 403, 110, 111, 20, 113, 22, 12, - /* 1230 */ 13, 14, 15, 16, 107, 363, 350, 365, 179, 476, - /* 1240 */ 382, 35, 479, 37, 362, 363, 403, 403, 350, 135, - /* 1250 */ 350, 350, 403, 139, 362, 363, 362, 363, 362, 363, - /* 1260 */ 497, 498, 0, 391, 382, 502, 503, 362, 363, 400, - /* 1270 */ 64, 116, 403, 70, 382, 403, 382, 405, 382, 350, - /* 1280 */ 350, 179, 198, 77, 200, 400, 416, 382, 403, 403, - /* 1290 */ 384, 107, 233, 387, 353, 354, 109, 267, 268, 112, - /* 1300 */ 215, 403, 217, 403, 403, 271, 33, 33, 233, 103, - /* 1310 */ 233, 179, 106, 51, 230, 37, 444, 350, 45, 447, - /* 1320 */ 13, 166, 450, 451, 452, 453, 454, 455, 225, 457, - /* 1330 */ 363, 0, 403, 403, 462, 233, 464, 12, 13, 109, - /* 1340 */ 468, 469, 112, 109, 37, 13, 112, 22, 142, 143, - /* 1350 */ 495, 109, 0, 269, 112, 13, 33, 37, 391, 33, - /* 1360 */ 35, 13, 37, 506, 33, 233, 33, 142, 143, 37, - /* 1370 */ 403, 366, 405, 391, 22, 488, 1, 2, 379, 37, - /* 1380 */ 0, 107, 292, 177, 178, 37, 379, 33, 33, 64, - /* 1390 */ 184, 185, 33, 33, 33, 416, 33, 77, 33, 33, - /* 1400 */ 33, 33, 77, 33, 33, 199, 33, 201, 361, 416, - /* 1410 */ 33, 444, 494, 494, 447, 494, 494, 450, 451, 452, - /* 1420 */ 453, 454, 455, 425, 457, 416, 366, 363, 103, 462, - /* 1430 */ 107, 464, 52, 107, 231, 468, 469, 231, 232, 233, - /* 1440 */ 107, 235, 236, 237, 238, 239, 240, 241, 242, 243, - /* 1450 */ 244, 245, 246, 247, 248, 249, 250, 251, 252, 402, - /* 1460 */ 18, 107, 107, 478, 433, 23, 107, 107, 107, 416, - /* 1470 */ 107, 416, 107, 107, 107, 107, 499, 107, 107, 201, - /* 1480 */ 107, 470, 40, 41, 107, 481, 44, 381, 272, 427, - /* 1490 */ 51, 446, 42, 445, 20, 214, 54, 443, 197, 438, - /* 1500 */ 350, 371, 371, 438, 20, 429, 362, 65, 66, 67, - /* 1510 */ 68, 20, 363, 363, 45, 363, 412, 412, 409, 176, - /* 1520 */ 362, 409, 363, 362, 199, 412, 201, 409, 104, 375, - /* 1530 */ 102, 374, 362, 101, 362, 373, 362, 362, 20, 50, - /* 1540 */ 355, 391, 359, 355, 371, 359, 438, 371, 106, 20, - /* 1550 */ 405, 371, 20, 403, 364, 405, 231, 232, 20, 364, - /* 1560 */ 371, 428, 371, 20, 371, 419, 362, 371, 371, 355, - /* 1570 */ 245, 246, 247, 248, 249, 250, 251, 353, 355, 353, - /* 1580 */ 362, 403, 403, 391, 403, 391, 144, 218, 106, 391, - /* 1590 */ 391, 391, 391, 391, 444, 442, 391, 447, 391, 391, - /* 1600 */ 450, 451, 452, 453, 454, 455, 391, 457, 440, 438, - /* 1610 */ 369, 20, 462, 205, 464, 204, 405, 435, 468, 469, - /* 1620 */ 369, 362, 403, 279, 487, 278, 350, 487, 287, 490, - /* 1630 */ 190, 489, 485, 191, 192, 193, 296, 486, 196, 363, - /* 1640 */ 427, 421, 421, 487, 434, 289, 437, 273, 484, 427, - /* 1650 */ 288, 209, 210, 268, 363, 507, 20, 293, 116, 482, - /* 1660 */ 350, 501, 220, 291, 270, 223, 500, 391, 226, 227, - /* 1670 */ 228, 229, 230, 363, 369, 364, 449, 369, 421, 403, - /* 1680 */ 403, 405, 403, 403, 421, 403, 403, 182, 417, 387, - /* 1690 */ 369, 369, 480, 363, 106, 467, 106, 403, 395, 362, - /* 1700 */ 22, 391, 352, 369, 38, 356, 355, 439, 422, 422, - /* 1710 */ 0, 269, 385, 403, 430, 405, 370, 0, 0, 45, - /* 1720 */ 444, 385, 0, 447, 385, 37, 450, 451, 452, 453, - /* 1730 */ 454, 455, 224, 457, 350, 348, 37, 37, 462, 37, - /* 1740 */ 464, 224, 0, 37, 468, 469, 37, 363, 224, 37, - /* 1750 */ 0, 0, 224, 37, 444, 0, 37, 447, 0, 22, - /* 1760 */ 450, 451, 452, 453, 454, 455, 0, 457, 350, 37, - /* 1770 */ 219, 0, 207, 0, 464, 391, 207, 201, 468, 469, - /* 1780 */ 208, 363, 199, 0, 0, 0, 194, 403, 195, 405, - /* 1790 */ 0, 0, 147, 49, 49, 0, 37, 0, 0, 37, - /* 1800 */ 51, 350, 0, 49, 0, 45, 0, 0, 0, 391, - /* 1810 */ 49, 0, 0, 0, 363, 0, 0, 0, 161, 37, - /* 1820 */ 0, 403, 161, 405, 0, 0, 0, 0, 444, 49, - /* 1830 */ 0, 447, 0, 0, 450, 451, 452, 453, 454, 455, - /* 1840 */ 0, 457, 391, 0, 0, 0, 0, 0, 464, 146, - /* 1850 */ 45, 0, 468, 469, 403, 0, 405, 0, 0, 0, - /* 1860 */ 0, 0, 444, 0, 0, 447, 0, 0, 450, 451, - /* 1870 */ 452, 453, 454, 455, 0, 457, 22, 350, 0, 0, - /* 1880 */ 147, 0, 464, 145, 0, 0, 468, 469, 50, 50, - /* 1890 */ 363, 22, 22, 0, 0, 444, 0, 0, 447, 64, - /* 1900 */ 64, 450, 451, 452, 453, 454, 455, 350, 457, 0, - /* 1910 */ 37, 0, 64, 37, 37, 0, 51, 42, 391, 51, - /* 1920 */ 363, 0, 42, 37, 0, 42, 37, 14, 33, 0, - /* 1930 */ 403, 0, 405, 51, 42, 45, 0, 49, 0, 0, - /* 1940 */ 49, 0, 43, 42, 42, 0, 190, 49, 391, 49, - /* 1950 */ 0, 0, 0, 37, 51, 504, 505, 0, 51, 42, - /* 1960 */ 403, 42, 405, 37, 0, 37, 0, 42, 0, 51, - /* 1970 */ 37, 444, 42, 51, 447, 71, 0, 450, 451, 452, - /* 1980 */ 453, 454, 455, 0, 457, 350, 0, 0, 0, 22, - /* 1990 */ 37, 464, 0, 37, 33, 37, 469, 37, 363, 37, - /* 2000 */ 37, 444, 350, 33, 447, 0, 37, 450, 451, 452, - /* 2010 */ 453, 454, 455, 22, 457, 363, 37, 112, 37, 350, - /* 2020 */ 22, 37, 114, 0, 22, 53, 391, 37, 0, 22, - /* 2030 */ 37, 396, 363, 37, 0, 0, 0, 37, 403, 0, - /* 2040 */ 405, 37, 0, 391, 22, 20, 37, 37, 396, 37, - /* 2050 */ 493, 107, 106, 0, 106, 403, 206, 405, 0, 22, - /* 2060 */ 391, 37, 49, 0, 202, 22, 0, 0, 3, 50, - /* 2070 */ 274, 33, 403, 33, 405, 274, 50, 106, 104, 444, - /* 2080 */ 107, 106, 447, 33, 350, 450, 451, 452, 453, 454, - /* 2090 */ 455, 179, 457, 179, 33, 106, 444, 363, 49, 447, - /* 2100 */ 49, 107, 450, 451, 452, 453, 454, 455, 102, 457, - /* 2110 */ 107, 179, 33, 444, 350, 107, 447, 182, 107, 450, - /* 2120 */ 451, 452, 453, 454, 455, 391, 457, 363, 179, 186, - /* 2130 */ 3, 33, 37, 179, 107, 106, 106, 403, 106, 405, - /* 2140 */ 37, 186, 37, 37, 37, 274, 37, 33, 107, 49, - /* 2150 */ 49, 107, 0, 0, 106, 391, 0, 42, 106, 42, - /* 2160 */ 396, 107, 107, 106, 33, 496, 106, 403, 183, 405, - /* 2170 */ 106, 115, 49, 104, 106, 104, 181, 267, 444, 350, - /* 2180 */ 2, 447, 22, 106, 450, 451, 452, 453, 454, 455, - /* 2190 */ 231, 457, 363, 107, 254, 106, 49, 107, 106, 350, - /* 2200 */ 107, 107, 106, 49, 22, 106, 37, 116, 444, 107, - /* 2210 */ 106, 447, 363, 37, 450, 451, 452, 453, 454, 455, - /* 2220 */ 391, 457, 350, 107, 106, 37, 106, 37, 107, 107, - /* 2230 */ 106, 234, 403, 37, 405, 363, 106, 350, 37, 505, - /* 2240 */ 391, 107, 106, 37, 107, 396, 127, 106, 106, 33, - /* 2250 */ 363, 106, 403, 127, 405, 127, 350, 37, 22, 127, - /* 2260 */ 71, 106, 70, 391, 37, 37, 37, 37, 396, 363, - /* 2270 */ 77, 37, 37, 444, 37, 403, 447, 405, 391, 450, - /* 2280 */ 451, 452, 453, 454, 455, 37, 457, 37, 459, 77, - /* 2290 */ 403, 100, 405, 444, 100, 33, 447, 391, 37, 450, - /* 2300 */ 451, 452, 453, 454, 455, 37, 457, 37, 22, 403, - /* 2310 */ 37, 405, 37, 0, 37, 77, 444, 37, 37, 447, - /* 2320 */ 37, 37, 450, 451, 452, 453, 454, 455, 22, 457, - /* 2330 */ 350, 444, 37, 37, 447, 37, 51, 450, 451, 452, - /* 2340 */ 453, 454, 455, 363, 457, 42, 0, 37, 51, 350, - /* 2350 */ 444, 42, 0, 447, 37, 51, 450, 451, 452, 453, - /* 2360 */ 454, 455, 363, 457, 42, 350, 0, 37, 42, 51, - /* 2370 */ 0, 391, 37, 37, 0, 22, 33, 22, 363, 21, - /* 2380 */ 508, 22, 22, 403, 21, 405, 508, 20, 508, 508, - /* 2390 */ 391, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2400 */ 508, 508, 403, 508, 405, 508, 391, 508, 508, 508, - /* 2410 */ 508, 508, 508, 508, 508, 508, 508, 508, 403, 508, - /* 2420 */ 405, 508, 508, 350, 444, 508, 508, 447, 508, 508, - /* 2430 */ 450, 451, 452, 453, 454, 455, 363, 457, 508, 508, - /* 2440 */ 508, 508, 508, 444, 508, 508, 447, 350, 508, 450, - /* 2450 */ 451, 452, 453, 454, 455, 508, 457, 508, 508, 444, - /* 2460 */ 363, 508, 447, 508, 391, 450, 451, 452, 453, 454, - /* 2470 */ 455, 508, 457, 508, 508, 508, 403, 508, 405, 508, - /* 2480 */ 508, 508, 508, 508, 508, 508, 508, 508, 391, 508, - /* 2490 */ 350, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2500 */ 403, 508, 405, 363, 508, 508, 508, 508, 508, 508, - /* 2510 */ 508, 508, 508, 508, 508, 508, 350, 444, 508, 508, - /* 2520 */ 447, 508, 508, 450, 451, 452, 453, 454, 455, 363, - /* 2530 */ 457, 391, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2540 */ 508, 444, 508, 403, 447, 405, 508, 450, 451, 452, - /* 2550 */ 453, 454, 455, 508, 457, 508, 508, 391, 508, 350, - /* 2560 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 403, - /* 2570 */ 508, 405, 363, 508, 508, 508, 508, 508, 508, 508, - /* 2580 */ 508, 508, 508, 350, 444, 508, 508, 447, 508, 508, - /* 2590 */ 450, 451, 452, 453, 454, 455, 363, 457, 508, 508, - /* 2600 */ 391, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2610 */ 444, 508, 403, 447, 405, 508, 450, 451, 452, 453, - /* 2620 */ 454, 455, 508, 457, 391, 508, 350, 508, 508, 508, - /* 2630 */ 508, 508, 508, 508, 508, 508, 403, 508, 405, 363, - /* 2640 */ 508, 350, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2650 */ 508, 508, 508, 444, 363, 508, 447, 350, 508, 450, - /* 2660 */ 451, 452, 453, 454, 455, 508, 457, 391, 508, 508, - /* 2670 */ 363, 508, 508, 508, 508, 508, 508, 444, 508, 403, - /* 2680 */ 447, 405, 391, 450, 451, 452, 453, 454, 455, 508, - /* 2690 */ 457, 508, 508, 508, 403, 508, 405, 508, 391, 508, - /* 2700 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2710 */ 403, 508, 405, 508, 508, 508, 508, 508, 508, 508, - /* 2720 */ 444, 508, 508, 447, 508, 508, 450, 451, 452, 453, - /* 2730 */ 454, 455, 508, 457, 350, 444, 508, 508, 447, 508, - /* 2740 */ 508, 450, 451, 452, 453, 454, 455, 363, 457, 508, - /* 2750 */ 508, 444, 508, 350, 447, 508, 508, 450, 451, 452, - /* 2760 */ 453, 454, 455, 508, 457, 508, 363, 508, 508, 350, - /* 2770 */ 508, 508, 508, 508, 508, 391, 508, 508, 508, 508, - /* 2780 */ 508, 508, 363, 508, 508, 508, 508, 403, 508, 405, - /* 2790 */ 508, 508, 508, 508, 391, 508, 508, 508, 508, 508, - /* 2800 */ 508, 508, 508, 508, 508, 508, 403, 508, 405, 508, - /* 2810 */ 391, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2820 */ 508, 508, 403, 508, 405, 508, 508, 350, 444, 508, - /* 2830 */ 508, 447, 508, 508, 450, 451, 452, 453, 454, 455, - /* 2840 */ 363, 457, 508, 508, 508, 508, 508, 444, 508, 508, - /* 2850 */ 447, 350, 508, 450, 451, 452, 453, 454, 455, 508, - /* 2860 */ 457, 508, 508, 444, 363, 508, 447, 508, 391, 450, - /* 2870 */ 451, 452, 453, 454, 455, 508, 457, 508, 508, 508, - /* 2880 */ 403, 508, 405, 508, 508, 508, 508, 508, 508, 508, - /* 2890 */ 508, 508, 391, 508, 350, 508, 508, 508, 508, 508, - /* 2900 */ 508, 508, 508, 508, 403, 508, 405, 363, 508, 508, - /* 2910 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2920 */ 350, 444, 508, 508, 447, 508, 508, 450, 451, 452, - /* 2930 */ 453, 454, 455, 363, 457, 391, 508, 508, 508, 508, - /* 2940 */ 508, 508, 508, 508, 508, 444, 508, 403, 447, 405, - /* 2950 */ 508, 450, 451, 452, 453, 454, 455, 508, 457, 508, - /* 2960 */ 508, 391, 508, 350, 508, 508, 508, 508, 508, 508, - /* 2970 */ 508, 508, 508, 403, 508, 405, 363, 508, 508, 508, - /* 2980 */ 508, 508, 508, 508, 508, 508, 508, 508, 444, 508, - /* 2990 */ 508, 447, 508, 508, 450, 451, 452, 453, 454, 455, - /* 3000 */ 508, 457, 508, 508, 391, 508, 508, 508, 508, 508, - /* 3010 */ 508, 508, 508, 508, 444, 508, 403, 447, 405, 508, - /* 3020 */ 450, 451, 452, 453, 454, 455, 508, 457, 508, 508, - /* 3030 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 3040 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 3050 */ 508, 508, 508, 508, 508, 508, 508, 444, 508, 508, - /* 3060 */ 447, 508, 508, 450, 451, 452, 453, 454, 455, 508, - /* 3070 */ 457, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3080 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3090 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, + /* 1220 */ 108, 403, 460, 350, 350, 463, 20, 444, 22, 391, + /* 1230 */ 447, 391, 51, 450, 451, 452, 453, 454, 455, 172, + /* 1240 */ 457, 35, 4, 37, 406, 462, 406, 464, 362, 363, + /* 1250 */ 400, 468, 469, 403, 506, 362, 363, 19, 33, 350, + /* 1260 */ 362, 363, 362, 363, 33, 362, 363, 379, 382, 37, + /* 1270 */ 203, 65, 363, 35, 365, 382, 403, 403, 267, 268, + /* 1280 */ 382, 393, 382, 351, 78, 382, 362, 363, 0, 51, + /* 1290 */ 400, 403, 384, 403, 33, 387, 58, 59, 362, 363, + /* 1300 */ 391, 353, 354, 65, 33, 110, 382, 271, 113, 366, + /* 1310 */ 104, 290, 403, 107, 405, 13, 45, 350, 382, 0, + /* 1320 */ 0, 33, 179, 12, 13, 110, 110, 33, 113, 113, + /* 1330 */ 363, 110, 365, 22, 113, 447, 448, 233, 215, 37, + /* 1340 */ 217, 22, 22, 0, 106, 457, 35, 109, 37, 143, + /* 1350 */ 144, 65, 49, 444, 71, 33, 447, 33, 391, 450, + /* 1360 */ 451, 452, 453, 454, 455, 22, 457, 143, 144, 108, + /* 1370 */ 403, 462, 405, 464, 1, 2, 65, 468, 469, 416, + /* 1380 */ 495, 391, 37, 177, 178, 33, 33, 33, 33, 78, + /* 1390 */ 184, 185, 33, 33, 33, 109, 33, 33, 33, 13, + /* 1400 */ 33, 33, 108, 33, 13, 199, 488, 201, 33, 33, + /* 1410 */ 107, 444, 0, 379, 447, 104, 379, 450, 451, 452, + /* 1420 */ 453, 454, 455, 37, 457, 37, 416, 361, 37, 462, + /* 1430 */ 108, 464, 108, 201, 416, 468, 469, 231, 232, 233, + /* 1440 */ 494, 235, 236, 237, 238, 239, 240, 241, 242, 243, + /* 1450 */ 244, 245, 246, 247, 248, 249, 250, 251, 252, 366, + /* 1460 */ 108, 108, 108, 108, 52, 494, 78, 108, 108, 108, + /* 1470 */ 494, 108, 108, 108, 35, 108, 108, 425, 108, 350, + /* 1480 */ 494, 416, 363, 108, 108, 402, 433, 416, 416, 470, + /* 1490 */ 51, 478, 363, 499, 381, 481, 427, 51, 272, 60, + /* 1500 */ 61, 62, 63, 42, 65, 446, 445, 20, 438, 214, + /* 1510 */ 199, 371, 201, 438, 231, 371, 443, 292, 197, 429, + /* 1520 */ 391, 20, 362, 20, 363, 294, 45, 412, 363, 412, + /* 1530 */ 409, 362, 403, 176, 405, 363, 362, 350, 412, 409, + /* 1540 */ 409, 105, 231, 232, 103, 106, 201, 374, 109, 102, + /* 1550 */ 363, 375, 362, 373, 362, 362, 245, 246, 247, 248, + /* 1560 */ 249, 250, 251, 362, 350, 20, 355, 50, 359, 359, + /* 1570 */ 438, 371, 355, 444, 371, 20, 447, 363, 391, 450, + /* 1580 */ 451, 452, 453, 454, 455, 20, 457, 405, 20, 371, + /* 1590 */ 403, 462, 405, 464, 364, 428, 20, 468, 469, 371, + /* 1600 */ 364, 362, 419, 355, 371, 391, 371, 403, 371, 362, + /* 1610 */ 391, 172, 371, 391, 391, 353, 353, 403, 391, 405, + /* 1620 */ 181, 182, 350, 355, 218, 391, 442, 188, 189, 107, + /* 1630 */ 20, 444, 403, 391, 447, 363, 391, 450, 451, 452, + /* 1640 */ 453, 454, 455, 391, 457, 391, 207, 391, 391, 462, + /* 1650 */ 438, 464, 403, 440, 369, 468, 469, 437, 444, 205, + /* 1660 */ 204, 447, 369, 391, 450, 451, 452, 453, 454, 455, + /* 1670 */ 405, 457, 362, 427, 434, 403, 462, 405, 464, 435, + /* 1680 */ 403, 279, 468, 469, 487, 278, 487, 421, 421, 190, + /* 1690 */ 287, 273, 490, 289, 489, 487, 288, 350, 507, 501, + /* 1700 */ 427, 296, 293, 268, 291, 363, 20, 500, 449, 117, + /* 1710 */ 363, 421, 270, 364, 182, 369, 444, 369, 403, 447, + /* 1720 */ 403, 403, 450, 451, 452, 453, 454, 455, 485, 457, + /* 1730 */ 403, 403, 482, 480, 350, 421, 464, 486, 391, 484, + /* 1740 */ 468, 469, 417, 369, 363, 387, 369, 363, 107, 467, + /* 1750 */ 403, 107, 405, 403, 362, 22, 369, 395, 38, 430, + /* 1760 */ 422, 422, 352, 385, 385, 350, 370, 356, 385, 355, + /* 1770 */ 439, 348, 0, 0, 0, 391, 45, 0, 363, 37, + /* 1780 */ 224, 37, 37, 37, 224, 0, 37, 403, 37, 405, + /* 1790 */ 224, 444, 37, 0, 447, 224, 0, 450, 451, 452, + /* 1800 */ 453, 454, 455, 37, 457, 0, 391, 37, 350, 0, + /* 1810 */ 22, 464, 0, 37, 219, 468, 469, 0, 403, 207, + /* 1820 */ 405, 363, 0, 207, 201, 208, 199, 0, 444, 0, + /* 1830 */ 350, 447, 0, 195, 450, 451, 452, 453, 454, 455, + /* 1840 */ 194, 457, 0, 363, 0, 148, 49, 49, 0, 391, + /* 1850 */ 37, 0, 0, 51, 0, 37, 49, 0, 0, 444, + /* 1860 */ 45, 403, 447, 405, 0, 450, 451, 452, 453, 454, + /* 1870 */ 455, 391, 457, 0, 49, 0, 396, 0, 0, 464, + /* 1880 */ 0, 0, 0, 403, 469, 405, 162, 37, 504, 505, + /* 1890 */ 0, 162, 0, 0, 0, 0, 0, 0, 0, 0, + /* 1900 */ 0, 350, 444, 0, 0, 447, 0, 0, 450, 451, + /* 1910 */ 452, 453, 454, 455, 363, 457, 0, 0, 0, 0, + /* 1920 */ 49, 0, 0, 0, 444, 0, 0, 447, 350, 45, + /* 1930 */ 450, 451, 452, 453, 454, 455, 0, 457, 0, 0, + /* 1940 */ 0, 363, 391, 148, 0, 0, 22, 147, 0, 146, + /* 1950 */ 0, 493, 22, 22, 403, 50, 405, 0, 50, 0, + /* 1960 */ 0, 0, 0, 51, 37, 0, 65, 0, 0, 391, + /* 1970 */ 37, 42, 37, 0, 65, 65, 0, 45, 37, 42, + /* 1980 */ 37, 403, 33, 405, 14, 51, 0, 0, 42, 42, + /* 1990 */ 0, 0, 0, 51, 43, 444, 42, 42, 447, 0, + /* 2000 */ 350, 450, 451, 452, 453, 454, 455, 49, 457, 190, + /* 2010 */ 0, 0, 49, 363, 0, 49, 37, 42, 49, 0, + /* 2020 */ 37, 0, 444, 51, 72, 447, 350, 0, 450, 451, + /* 2030 */ 452, 453, 454, 455, 37, 457, 51, 42, 42, 363, + /* 2040 */ 51, 391, 37, 0, 51, 42, 396, 496, 0, 0, + /* 2050 */ 0, 0, 0, 403, 37, 405, 22, 0, 0, 37, + /* 2060 */ 0, 37, 37, 37, 33, 37, 37, 391, 115, 113, + /* 2070 */ 37, 33, 37, 37, 37, 22, 37, 22, 22, 403, + /* 2080 */ 206, 405, 0, 505, 22, 53, 0, 22, 0, 0, + /* 2090 */ 0, 37, 0, 0, 444, 22, 37, 447, 350, 20, + /* 2100 */ 450, 451, 452, 453, 454, 455, 37, 457, 37, 37, + /* 2110 */ 108, 363, 37, 107, 0, 107, 49, 0, 37, 22, + /* 2120 */ 444, 3, 1, 447, 0, 22, 450, 451, 452, 453, + /* 2130 */ 454, 455, 0, 457, 0, 459, 274, 33, 108, 391, + /* 2140 */ 19, 50, 33, 179, 396, 50, 33, 107, 107, 105, + /* 2150 */ 179, 403, 107, 405, 108, 108, 35, 179, 33, 182, + /* 2160 */ 179, 49, 33, 179, 103, 49, 350, 3, 186, 33, + /* 2170 */ 107, 107, 51, 107, 186, 37, 202, 37, 108, 363, + /* 2180 */ 37, 60, 61, 62, 63, 274, 65, 274, 37, 37, + /* 2190 */ 37, 108, 444, 108, 49, 447, 33, 49, 450, 451, + /* 2200 */ 452, 453, 454, 455, 108, 457, 108, 391, 0, 0, + /* 2210 */ 42, 0, 396, 107, 107, 49, 108, 42, 108, 403, + /* 2220 */ 33, 405, 107, 2, 22, 183, 107, 106, 105, 107, + /* 2230 */ 109, 49, 105, 107, 49, 350, 116, 107, 231, 108, + /* 2240 */ 107, 22, 37, 108, 107, 117, 107, 267, 363, 181, + /* 2250 */ 108, 107, 350, 107, 254, 108, 33, 108, 108, 37, + /* 2260 */ 444, 107, 141, 447, 37, 363, 450, 451, 452, 453, + /* 2270 */ 454, 455, 107, 457, 37, 108, 391, 107, 350, 108, + /* 2280 */ 37, 107, 37, 37, 108, 107, 128, 108, 403, 128, + /* 2290 */ 405, 363, 37, 391, 22, 107, 107, 128, 107, 107, + /* 2300 */ 128, 72, 181, 71, 37, 403, 37, 405, 234, 188, + /* 2310 */ 37, 37, 37, 37, 37, 37, 37, 78, 101, 391, + /* 2320 */ 78, 101, 37, 33, 37, 37, 22, 78, 207, 444, + /* 2330 */ 37, 403, 447, 405, 37, 450, 451, 452, 453, 454, + /* 2340 */ 455, 22, 457, 37, 37, 37, 444, 37, 37, 447, + /* 2350 */ 37, 350, 450, 451, 452, 453, 454, 455, 37, 457, + /* 2360 */ 0, 37, 42, 51, 363, 0, 37, 51, 42, 0, + /* 2370 */ 37, 0, 444, 350, 51, 447, 42, 37, 450, 451, + /* 2380 */ 452, 453, 454, 455, 42, 457, 363, 51, 0, 37, + /* 2390 */ 37, 0, 391, 20, 22, 33, 508, 22, 21, 508, + /* 2400 */ 22, 22, 21, 508, 403, 508, 405, 508, 508, 508, + /* 2410 */ 508, 508, 508, 508, 391, 508, 508, 508, 508, 508, + /* 2420 */ 508, 508, 508, 508, 508, 508, 403, 508, 405, 508, + /* 2430 */ 350, 508, 508, 508, 508, 508, 508, 508, 508, 508, + /* 2440 */ 508, 508, 508, 363, 508, 444, 508, 508, 447, 350, + /* 2450 */ 508, 450, 451, 452, 453, 454, 455, 508, 457, 508, + /* 2460 */ 508, 508, 363, 508, 508, 508, 508, 444, 508, 508, + /* 2470 */ 447, 391, 508, 450, 451, 452, 453, 454, 455, 508, + /* 2480 */ 457, 508, 508, 403, 508, 405, 508, 508, 508, 508, + /* 2490 */ 391, 508, 508, 508, 508, 508, 508, 508, 508, 508, + /* 2500 */ 508, 508, 403, 508, 405, 508, 508, 350, 508, 508, + /* 2510 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + /* 2520 */ 363, 508, 508, 350, 444, 508, 508, 447, 508, 508, + /* 2530 */ 450, 451, 452, 453, 454, 455, 363, 457, 508, 508, + /* 2540 */ 508, 508, 508, 444, 508, 508, 447, 508, 391, 450, + /* 2550 */ 451, 452, 453, 454, 455, 508, 457, 508, 508, 508, + /* 2560 */ 403, 508, 405, 508, 391, 508, 508, 508, 508, 508, + /* 2570 */ 508, 508, 508, 508, 508, 508, 403, 508, 405, 508, + /* 2580 */ 508, 350, 508, 508, 508, 508, 508, 508, 508, 508, + /* 2590 */ 508, 508, 508, 508, 363, 508, 508, 508, 508, 508, + /* 2600 */ 508, 444, 508, 350, 447, 508, 508, 450, 451, 452, + /* 2610 */ 453, 454, 455, 508, 457, 508, 363, 444, 350, 508, + /* 2620 */ 447, 508, 391, 450, 451, 452, 453, 454, 455, 508, + /* 2630 */ 457, 363, 508, 508, 403, 508, 405, 508, 508, 350, + /* 2640 */ 508, 508, 508, 508, 391, 508, 508, 508, 508, 508, + /* 2650 */ 508, 508, 363, 508, 508, 508, 403, 508, 405, 391, + /* 2660 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + /* 2670 */ 508, 403, 508, 405, 508, 444, 508, 508, 447, 508, + /* 2680 */ 391, 450, 451, 452, 453, 454, 455, 508, 457, 508, + /* 2690 */ 508, 508, 403, 508, 405, 508, 508, 444, 508, 508, + /* 2700 */ 447, 508, 508, 450, 451, 452, 453, 454, 455, 508, + /* 2710 */ 457, 508, 444, 508, 508, 447, 508, 508, 450, 451, + /* 2720 */ 452, 453, 454, 455, 350, 457, 508, 508, 508, 508, + /* 2730 */ 508, 508, 508, 444, 508, 508, 447, 363, 508, 450, + /* 2740 */ 451, 452, 453, 454, 455, 508, 457, 508, 508, 508, + /* 2750 */ 508, 508, 508, 508, 508, 350, 508, 508, 508, 508, + /* 2760 */ 508, 508, 508, 508, 508, 391, 508, 508, 363, 508, + /* 2770 */ 508, 508, 508, 508, 508, 508, 508, 403, 508, 405, + /* 2780 */ 508, 350, 508, 508, 508, 508, 508, 508, 508, 508, + /* 2790 */ 508, 508, 508, 508, 363, 508, 391, 508, 508, 508, + /* 2800 */ 508, 508, 508, 508, 508, 508, 508, 508, 403, 508, + /* 2810 */ 405, 508, 508, 508, 508, 508, 508, 508, 444, 508, + /* 2820 */ 508, 447, 391, 508, 450, 451, 452, 453, 454, 455, + /* 2830 */ 508, 457, 508, 508, 403, 508, 405, 508, 508, 508, + /* 2840 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 444, + /* 2850 */ 508, 508, 447, 350, 508, 450, 451, 452, 453, 454, + /* 2860 */ 455, 508, 457, 508, 508, 508, 363, 508, 508, 508, + /* 2870 */ 508, 508, 508, 508, 350, 444, 508, 508, 447, 508, + /* 2880 */ 508, 450, 451, 452, 453, 454, 455, 363, 457, 508, + /* 2890 */ 508, 508, 508, 508, 391, 508, 508, 508, 508, 508, + /* 2900 */ 508, 508, 508, 508, 508, 508, 403, 508, 405, 508, + /* 2910 */ 508, 350, 508, 508, 508, 391, 508, 508, 508, 508, + /* 2920 */ 508, 508, 508, 508, 363, 508, 508, 403, 508, 405, + /* 2930 */ 508, 508, 350, 508, 508, 508, 508, 508, 508, 508, + /* 2940 */ 508, 508, 508, 508, 508, 363, 508, 444, 508, 508, + /* 2950 */ 447, 508, 391, 450, 451, 452, 453, 454, 455, 508, + /* 2960 */ 457, 508, 508, 508, 403, 508, 405, 508, 444, 350, + /* 2970 */ 508, 447, 508, 391, 450, 451, 452, 453, 454, 455, + /* 2980 */ 508, 457, 363, 508, 508, 403, 508, 405, 508, 508, + /* 2990 */ 350, 508, 508, 508, 508, 508, 508, 508, 508, 508, + /* 3000 */ 508, 508, 508, 363, 508, 444, 508, 508, 447, 508, + /* 3010 */ 391, 450, 451, 452, 453, 454, 455, 508, 457, 508, + /* 3020 */ 508, 508, 403, 508, 405, 508, 444, 508, 508, 447, + /* 3030 */ 508, 391, 450, 451, 452, 453, 454, 455, 508, 457, + /* 3040 */ 508, 508, 508, 403, 508, 405, 508, 508, 508, 508, + /* 3050 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + /* 3060 */ 508, 508, 508, 444, 508, 508, 447, 508, 508, 450, + /* 3070 */ 451, 452, 453, 454, 455, 508, 457, 508, 508, 508, + /* 3080 */ 508, 508, 508, 508, 444, 508, 508, 447, 508, 508, + /* 3090 */ 450, 451, 452, 453, 454, 455, 508, 457, 347, 347, /* 3100 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, /* 3110 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, /* 3120 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, @@ -1221,221 +877,226 @@ static const YYCODETYPE yy_lookahead[] = { /* 3380 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, /* 3390 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, /* 3400 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3410 */ 347, 347, 347, 347, 347, 347, 347, 347, + /* 3410 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, + /* 3420 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, + /* 3430 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, + /* 3440 */ 347, 347, 347, 347, 347, }; -#define YY_SHIFT_COUNT (839) +#define YY_SHIFT_COUNT (842) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2374) +#define YY_SHIFT_MAX (2391) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 1442, 0, 241, 0, 483, 483, 483, 483, 483, 483, + /* 0 */ 393, 0, 241, 0, 483, 483, 483, 483, 483, 483, /* 10 */ 483, 483, 483, 483, 483, 483, 724, 965, 965, 1206, /* 20 */ 965, 965, 965, 965, 965, 965, 965, 965, 965, 965, /* 30 */ 965, 965, 965, 965, 965, 965, 965, 965, 965, 965, /* 40 */ 965, 965, 965, 965, 965, 965, 965, 965, 965, 965, - /* 50 */ 965, 167, 402, 1084, 251, 405, 587, 405, 405, 251, - /* 60 */ 251, 405, 1325, 405, 240, 1325, 1325, 513, 405, 5, - /* 70 */ 170, 171, 171, 160, 160, 170, 78, 39, 295, 295, - /* 80 */ 326, 171, 171, 171, 171, 171, 171, 171, 171, 171, - /* 90 */ 171, 171, 261, 355, 171, 171, 91, 5, 171, 261, - /* 100 */ 171, 5, 171, 171, 5, 171, 171, 5, 171, 5, - /* 110 */ 5, 5, 171, 400, 202, 202, 465, 198, 118, 118, - /* 120 */ 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, - /* 130 */ 118, 118, 118, 118, 118, 118, 118, 1114, 200, 78, - /* 140 */ 39, 515, 515, 949, 415, 415, 415, 364, 536, 536, - /* 150 */ 1041, 949, 91, 307, 5, 5, 262, 5, 376, 5, - /* 160 */ 376, 376, 506, 618, 577, 577, 577, 577, 577, 577, - /* 170 */ 577, 577, 988, 677, 65, 1132, 66, 523, 242, 76, - /* 180 */ 600, 659, 571, 571, 1059, 1087, 1102, 246, 246, 246, - /* 190 */ 327, 246, 480, 575, 1075, 808, 204, 545, 1075, 1075, - /* 200 */ 1077, 1030, 738, 861, 1030, 530, 1034, 1041, 1216, 1439, - /* 210 */ 1450, 1474, 1281, 91, 1474, 91, 1301, 1484, 1491, 1469, - /* 220 */ 1491, 1469, 1343, 1484, 1491, 1484, 1469, 1343, 1343, 1424, - /* 230 */ 1428, 1484, 1432, 1484, 1484, 1484, 1518, 1489, 1518, 1489, - /* 240 */ 1474, 91, 91, 1529, 91, 1532, 1538, 91, 1532, 91, - /* 250 */ 1543, 91, 91, 1484, 91, 1518, 5, 5, 5, 5, - /* 260 */ 5, 5, 5, 5, 5, 5, 5, 1484, 618, 618, - /* 270 */ 1518, 376, 376, 376, 1369, 1482, 1474, 400, 1591, 1408, - /* 280 */ 1411, 1529, 400, 1216, 1484, 376, 1344, 1347, 1344, 1347, - /* 290 */ 1341, 1440, 1344, 1356, 1362, 1374, 1216, 1340, 1364, 1372, - /* 300 */ 1385, 1491, 1636, 1542, 1394, 1532, 400, 400, 1347, 376, - /* 310 */ 376, 376, 376, 1347, 376, 1505, 400, 506, 400, 1491, - /* 320 */ 1588, 1590, 376, 1484, 400, 1678, 1666, 1518, 3071, 3071, - /* 330 */ 3071, 3071, 3071, 3071, 3071, 3071, 3071, 36, 462, 306, - /* 340 */ 565, 1069, 435, 805, 551, 15, 30, 650, 779, 40, - /* 350 */ 40, 40, 40, 40, 40, 40, 40, 40, 759, 151, - /* 360 */ 416, 1217, 1217, 730, 461, 457, 468, 678, 479, 961, - /* 370 */ 863, 334, 334, 727, 1184, 774, 727, 727, 727, 1262, - /* 380 */ 1103, 503, 1020, 1273, 1155, 1331, 1187, 1230, 1234, 1242, - /* 390 */ 1307, 1332, 388, 936, 1352, 1085, 1127, 1323, 981, 1326, - /* 400 */ 1333, 1354, 1225, 1090, 637, 1355, 1359, 1360, 1361, 1363, - /* 410 */ 1365, 1375, 1366, 1203, 1274, 873, 1367, 1368, 1370, 1371, - /* 420 */ 1373, 1377, 1072, 991, 1278, 1342, 1348, 1320, 1380, 1710, - /* 430 */ 1717, 1718, 1674, 1722, 1688, 1508, 1699, 1700, 1702, 1517, - /* 440 */ 1742, 1706, 1709, 1524, 1712, 1750, 1528, 1751, 1716, 1755, - /* 450 */ 1719, 1758, 1737, 1766, 1732, 1551, 1771, 1565, 1773, 1569, - /* 460 */ 1572, 1576, 1583, 1783, 1784, 1785, 1593, 1592, 1790, 1791, - /* 470 */ 1645, 1744, 1745, 1795, 1759, 1797, 1798, 1762, 1749, 1802, - /* 480 */ 1754, 1804, 1760, 1806, 1807, 1808, 1761, 1811, 1812, 1813, - /* 490 */ 1815, 1816, 1817, 1657, 1782, 1820, 1661, 1824, 1825, 1826, - /* 500 */ 1827, 1832, 1833, 1840, 1843, 1844, 1845, 1846, 1847, 1855, - /* 510 */ 1857, 1858, 1859, 1860, 1780, 1830, 1805, 1851, 1861, 1863, - /* 520 */ 1864, 1866, 1867, 1874, 1854, 1878, 1733, 1879, 1703, 1881, - /* 530 */ 1738, 1884, 1885, 1869, 1838, 1870, 1839, 1893, 1835, 1873, - /* 540 */ 1894, 1836, 1896, 1848, 1897, 1909, 1876, 1865, 1875, 1911, - /* 550 */ 1877, 1868, 1880, 1915, 1886, 1882, 1883, 1921, 1889, 1924, - /* 560 */ 1890, 1892, 1895, 1888, 1891, 1913, 1898, 1929, 1899, 1901, - /* 570 */ 1931, 1936, 1938, 1939, 1902, 1756, 1941, 1888, 1900, 1945, - /* 580 */ 1950, 1904, 1951, 1952, 1916, 1903, 1917, 1957, 1926, 1907, - /* 590 */ 1919, 1964, 1928, 1918, 1925, 1966, 1933, 1922, 1930, 1968, - /* 600 */ 1976, 1983, 1986, 1987, 1988, 1908, 1905, 1953, 1967, 1992, - /* 610 */ 1956, 1958, 1960, 1962, 1963, 1969, 1979, 1981, 1961, 1970, - /* 620 */ 1984, 1990, 1991, 1993, 2005, 1998, 2023, 2002, 1972, 2028, - /* 630 */ 2007, 1996, 2034, 2035, 2036, 2000, 2039, 2004, 2042, 2022, - /* 640 */ 2025, 2009, 2010, 2012, 1944, 1946, 2053, 1912, 1948, 1850, - /* 650 */ 1888, 2013, 2058, 1914, 2024, 2037, 2063, 1862, 2043, 1932, - /* 660 */ 1935, 2066, 2067, 1949, 1943, 1954, 1955, 2065, 2038, 1796, - /* 670 */ 1971, 1973, 1975, 2019, 1974, 2026, 2006, 1994, 2040, 2050, - /* 680 */ 2003, 1989, 2029, 2030, 2008, 2061, 2049, 2051, 2032, 2079, - /* 690 */ 1801, 2011, 2027, 2127, 2098, 1871, 2095, 2103, 2105, 2106, - /* 700 */ 2107, 2109, 2041, 2044, 2100, 1910, 2114, 2101, 2152, 2153, - /* 710 */ 2048, 2115, 2052, 2054, 2055, 2057, 2060, 1985, 2064, 2156, - /* 720 */ 2117, 1995, 2068, 2056, 1888, 2123, 2131, 2069, 1940, 2071, - /* 730 */ 2178, 2160, 1959, 2077, 2086, 2089, 2090, 2092, 2093, 2147, - /* 740 */ 2096, 2099, 2154, 2094, 2182, 1997, 2104, 2091, 2102, 2169, - /* 750 */ 2176, 2118, 2116, 2188, 2120, 2121, 2190, 2124, 2122, 2196, - /* 760 */ 2130, 2134, 2201, 2136, 2137, 2206, 2141, 2119, 2126, 2128, - /* 770 */ 2132, 2142, 2216, 2145, 2220, 2155, 2216, 2216, 2236, 2189, - /* 780 */ 2192, 2227, 2228, 2229, 2230, 2234, 2235, 2237, 2248, 2250, - /* 790 */ 2193, 2191, 2212, 2194, 2262, 2261, 2268, 2270, 2286, 2273, - /* 800 */ 2275, 2277, 2238, 1961, 2280, 1970, 2281, 2283, 2284, 2295, - /* 810 */ 2306, 2296, 2313, 2298, 2285, 2303, 2346, 2310, 2297, 2309, - /* 820 */ 2352, 2317, 2304, 2322, 2366, 2330, 2318, 2326, 2370, 2335, - /* 830 */ 2336, 2374, 2353, 2343, 2355, 2358, 2359, 2360, 2363, 2367, + /* 50 */ 965, 252, 331, 362, 127, 93, 148, 93, 93, 127, + /* 60 */ 127, 93, 1311, 93, 240, 1311, 1311, 34, 93, 30, + /* 70 */ 13, 43, 43, 182, 182, 13, 88, 308, 313, 313, + /* 80 */ 392, 43, 43, 43, 43, 43, 43, 43, 43, 43, + /* 90 */ 43, 43, 134, 141, 43, 43, 207, 30, 43, 134, + /* 100 */ 43, 30, 43, 43, 30, 43, 43, 30, 43, 30, + /* 110 */ 30, 30, 43, 369, 441, 441, 261, 144, 719, 719, + /* 120 */ 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, + /* 130 */ 719, 719, 719, 719, 719, 719, 719, 1027, 646, 88, + /* 140 */ 308, 1057, 1057, 591, 186, 186, 186, 624, 383, 383, + /* 150 */ 913, 591, 207, 434, 30, 30, 213, 30, 602, 30, + /* 160 */ 602, 602, 455, 814, 90, 90, 90, 90, 90, 90, + /* 170 */ 90, 90, 2121, 935, 66, 415, 16, 244, 237, 105, + /* 180 */ 173, 532, 510, 510, 779, 179, 841, 421, 421, 421, + /* 190 */ 1, 421, 576, 690, 631, 1087, 775, 1067, 631, 631, + /* 200 */ 1104, 1011, 654, 1021, 1011, 1150, 1036, 913, 1226, 1446, + /* 210 */ 1461, 1487, 1295, 207, 1487, 207, 1321, 1501, 1503, 1481, + /* 220 */ 1503, 1481, 1357, 1501, 1503, 1501, 1481, 1357, 1357, 1436, + /* 230 */ 1441, 1501, 1447, 1501, 1501, 1501, 1545, 1517, 1545, 1517, + /* 240 */ 1487, 207, 207, 1555, 207, 1565, 1568, 207, 1565, 207, + /* 250 */ 1576, 207, 207, 1501, 207, 1545, 30, 30, 30, 30, + /* 260 */ 30, 30, 30, 30, 30, 30, 30, 1501, 814, 814, + /* 270 */ 1545, 602, 602, 602, 1406, 1522, 1487, 369, 1610, 1454, + /* 280 */ 1456, 1555, 369, 1226, 1501, 602, 1402, 1407, 1402, 1407, + /* 290 */ 1403, 1499, 1402, 1404, 1408, 1418, 1226, 1405, 1409, 1413, + /* 300 */ 1435, 1503, 1686, 1592, 1442, 1565, 369, 369, 1407, 602, + /* 310 */ 602, 602, 602, 1407, 602, 1532, 369, 455, 369, 1503, + /* 320 */ 1641, 1644, 602, 1501, 369, 1733, 1720, 1545, 3098, 3098, + /* 330 */ 3098, 3098, 3098, 3098, 3098, 3098, 3098, 36, 1439, 15, + /* 340 */ 1238, 555, 271, 662, 549, 891, 981, 1143, 635, 1068, + /* 350 */ 1068, 1068, 1068, 1068, 1068, 1068, 1068, 1068, 676, 790, + /* 360 */ 858, 494, 494, 691, 474, 608, 9, 448, 577, 761, + /* 370 */ 614, 360, 360, 931, 802, 757, 931, 931, 931, 1181, + /* 380 */ 83, 1112, 882, 1271, 399, 1288, 1195, 1215, 1216, 1221, + /* 390 */ 1092, 1302, 410, 1319, 1320, 1343, 1123, 1261, 1294, 1286, + /* 400 */ 1322, 1324, 1352, 1224, 1225, 1231, 1354, 1359, 1360, 1361, + /* 410 */ 1363, 1364, 1373, 1365, 1283, 1355, 1303, 1353, 1367, 1368, + /* 420 */ 1370, 1375, 1376, 836, 1232, 1345, 1386, 1391, 1388, 1412, + /* 430 */ 1772, 1773, 1774, 1731, 1777, 1742, 1556, 1744, 1745, 1746, + /* 440 */ 1560, 1785, 1749, 1751, 1566, 1755, 1793, 1571, 1796, 1766, + /* 450 */ 1805, 1770, 1809, 1788, 1812, 1776, 1595, 1817, 1612, 1822, + /* 460 */ 1616, 1617, 1623, 1627, 1827, 1829, 1832, 1638, 1646, 1842, + /* 470 */ 1844, 1697, 1797, 1798, 1848, 1813, 1851, 1852, 1818, 1802, + /* 480 */ 1854, 1807, 1857, 1815, 1858, 1864, 1873, 1825, 1875, 1877, + /* 490 */ 1878, 1880, 1881, 1882, 1724, 1850, 1890, 1729, 1892, 1893, + /* 500 */ 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1903, 1904, 1906, + /* 510 */ 1907, 1916, 1917, 1918, 1919, 1871, 1921, 1884, 1922, 1923, + /* 520 */ 1925, 1926, 1936, 1938, 1939, 1924, 1940, 1795, 1944, 1800, + /* 530 */ 1945, 1803, 1948, 1950, 1930, 1905, 1931, 1908, 1957, 1901, + /* 540 */ 1927, 1959, 1909, 1960, 1910, 1961, 1962, 1933, 1912, 1929, + /* 550 */ 1965, 1935, 1934, 1937, 1967, 1941, 1942, 1946, 1968, 1943, + /* 560 */ 1973, 1932, 1947, 1949, 1958, 1963, 1970, 1966, 1976, 1951, + /* 570 */ 1954, 1986, 1987, 1990, 1991, 1955, 1819, 1992, 1958, 1969, + /* 580 */ 1999, 2010, 1952, 2011, 2014, 1979, 1972, 1975, 2019, 1983, + /* 590 */ 1985, 1995, 2021, 1997, 1989, 1996, 2027, 2005, 1993, 2003, + /* 600 */ 2043, 2048, 2049, 2050, 2051, 2052, 1953, 1956, 2017, 2034, + /* 610 */ 2057, 2022, 2024, 2025, 2026, 2028, 2029, 2033, 2035, 2031, + /* 620 */ 2038, 2036, 2037, 2053, 2039, 2058, 2055, 2060, 2056, 2082, + /* 630 */ 2062, 2032, 2086, 2065, 2054, 2088, 2089, 2090, 2059, 2092, + /* 640 */ 2069, 2093, 2073, 2079, 2071, 2072, 2075, 2002, 2006, 2114, + /* 650 */ 1964, 2008, 1874, 1958, 2067, 2117, 1971, 2081, 2097, 2124, + /* 660 */ 1974, 2103, 1978, 1977, 2132, 2134, 1981, 1982, 1984, 1988, + /* 670 */ 2118, 2104, 1862, 2040, 2030, 2041, 2091, 2044, 2095, 2061, + /* 680 */ 2046, 2109, 2113, 2047, 2045, 2063, 2064, 2070, 2125, 2112, + /* 690 */ 2116, 2066, 2129, 1911, 2083, 2085, 2164, 2136, 1913, 2138, + /* 700 */ 2140, 2143, 2151, 2152, 2153, 2096, 2098, 2145, 1980, 2163, + /* 710 */ 2148, 2208, 2209, 2106, 2168, 2107, 2108, 2110, 2115, 2119, + /* 720 */ 2042, 2122, 2211, 2175, 2068, 2126, 2120, 1958, 2166, 2187, + /* 730 */ 2123, 2000, 2127, 2221, 2202, 2007, 2130, 2131, 2133, 2135, + /* 740 */ 2137, 2142, 2182, 2139, 2144, 2185, 2147, 2219, 2074, 2146, + /* 750 */ 2128, 2149, 2205, 2222, 2154, 2150, 2227, 2165, 2167, 2237, + /* 760 */ 2170, 2171, 2243, 2174, 2176, 2245, 2178, 2179, 2246, 2188, + /* 770 */ 2158, 2161, 2169, 2172, 2189, 2223, 2191, 2255, 2192, 2223, + /* 780 */ 2223, 2272, 2229, 2232, 2267, 2269, 2273, 2274, 2275, 2276, + /* 790 */ 2277, 2278, 2279, 2239, 2217, 2242, 2220, 2290, 2285, 2287, + /* 800 */ 2288, 2304, 2293, 2297, 2306, 2249, 2031, 2307, 2038, 2308, + /* 810 */ 2310, 2311, 2313, 2319, 2321, 2360, 2324, 2312, 2320, 2365, + /* 820 */ 2329, 2316, 2326, 2369, 2333, 2323, 2334, 2371, 2340, 2336, + /* 830 */ 2342, 2388, 2352, 2353, 2391, 2372, 2362, 2375, 2377, 2378, + /* 840 */ 2379, 2381, 2373, }; #define YY_REDUCE_COUNT (336) -#define YY_REDUCE_MIN (-430) -#define YY_REDUCE_MAX (2613) +#define YY_REDUCE_MIN (-445) +#define YY_REDUCE_MAX (2640) static const short yy_reduce_ofst[] = { - /* 0 */ 431, -303, 149, 185, -23, 390, 421, 630, 662, 872, - /* 10 */ 967, 1150, 1276, 1310, 1384, 1418, 488, -81, 1451, 1527, - /* 20 */ 1557, 1635, 1652, 1669, 1734, 1764, 1829, 1849, 1872, 1887, - /* 30 */ 1906, 1980, 1999, 2015, 2073, 2097, 2140, 2166, 2209, 2233, - /* 40 */ 2276, 2291, 2307, 2384, 2403, 2419, 2477, 2501, 2544, 2570, - /* 50 */ 2613, -305, -202, 384, -187, 31, 451, 558, 660, 541, - /* 60 */ 707, 763, 643, -340, -341, -99, 228, -177, 89, -380, - /* 70 */ -211, 401, 403, -356, -351, -390, -330, -333, -257, 140, - /* 80 */ -218, 412, 487, 619, 628, -312, -225, 634, 669, 681, - /* 90 */ 696, -97, 179, -2, 739, 793, -284, 250, 642, 187, - /* 100 */ 809, 354, 858, 882, -383, 892, 894, 425, 896, 522, - /* 110 */ 455, 620, 905, -66, -425, -425, -296, -149, 35, 159, - /* 120 */ 182, 397, 452, 485, 534, 638, 722, 820, 843, 844, - /* 130 */ 849, 886, 898, 900, 901, 929, 930, -61, -270, -245, - /* 140 */ -342, 278, 429, 632, -270, 206, 350, 12, 531, 698, - /* 150 */ 751, 761, 509, 670, 520, 776, -307, 313, 765, 782, - /* 160 */ 869, 885, 906, 941, -385, 291, 347, 395, 419, 440, - /* 170 */ 478, 419, -430, 686, 754, 870, 857, 855, 1005, 887, - /* 180 */ 982, 982, 999, 1007, 979, 1047, 993, 918, 919, 921, - /* 190 */ 998, 922, 982, 1060, 1009, 1064, 1057, 1031, 1053, 1055, - /* 200 */ 982, 985, 985, 977, 985, 1011, 1004, 1106, 1062, 1045, - /* 210 */ 1048, 1061, 1054, 1130, 1065, 1131, 1076, 1144, 1149, 1104, - /* 220 */ 1152, 1105, 1109, 1158, 1159, 1161, 1113, 1112, 1118, 1154, - /* 230 */ 1157, 1170, 1162, 1172, 1174, 1175, 1185, 1183, 1188, 1186, - /* 240 */ 1108, 1173, 1176, 1145, 1180, 1190, 1133, 1189, 1195, 1191, - /* 250 */ 1146, 1193, 1196, 1204, 1197, 1214, 1192, 1194, 1198, 1199, - /* 260 */ 1200, 1201, 1202, 1205, 1207, 1208, 1215, 1218, 1224, 1226, - /* 270 */ 1223, 1178, 1179, 1181, 1153, 1168, 1171, 1241, 1209, 1182, - /* 280 */ 1210, 1211, 1251, 1213, 1259, 1219, 1137, 1220, 1140, 1221, - /* 290 */ 1139, 1142, 1156, 1151, 1147, 1164, 1222, 1148, 1160, 1166, - /* 300 */ 985, 1291, 1227, 1177, 1212, 1311, 1305, 1308, 1257, 1277, - /* 310 */ 1279, 1280, 1282, 1263, 1283, 1271, 1321, 1302, 1322, 1330, - /* 320 */ 1228, 1303, 1294, 1337, 1334, 1350, 1349, 1351, 1284, 1268, - /* 330 */ 1286, 1287, 1327, 1336, 1339, 1346, 1387, + /* 0 */ 332, -302, 190, 389, 419, 642, 725, 783, 909, 967, + /* 10 */ 1129, 1187, 1214, 668, 1272, 1347, -81, 487, 1384, 1415, + /* 20 */ 1458, 154, 1480, 1551, 1578, 1650, 1676, 1748, 1816, 1885, + /* 30 */ 1902, 1928, 2001, 2023, 2080, 2099, 2157, 2173, 2231, 2253, + /* 40 */ 2268, 2289, 2374, 2405, 2431, 2503, 2524, 2561, 2582, 2619, + /* 50 */ 2640, -172, -339, -423, 102, -421, -208, 451, 558, -159, + /* 60 */ 59, 560, 888, 288, -308, 236, 402, -35, 546, -372, + /* 70 */ -56, -66, 152, -351, -178, -85, -329, -209, -341, -294, + /* 80 */ -306, 310, 380, 386, 425, -362, 108, 438, 493, 554, + /* 90 */ 688, 180, 196, 27, 716, 772, -283, 349, 808, 220, + /* 100 */ 886, 454, 893, 898, -62, 900, 903, 456, 924, 620, + /* 110 */ 523, 655, 936, -113, -327, -327, -40, -347, 33, 163, + /* 120 */ 194, 227, 262, 305, 314, 363, 488, 638, 649, 714, + /* 130 */ 737, 741, 750, 781, 818, 873, 874, -46, -89, 504, + /* 140 */ 698, 759, 793, 605, -89, 62, 344, 427, -445, -199, + /* 150 */ 508, 815, 435, 114, 756, 838, 762, 774, 665, 840, + /* 160 */ 850, 890, 908, 948, -385, 358, 492, 622, 650, 661, + /* 170 */ 693, 650, 753, 819, 932, 963, 748, 885, 943, 918, + /* 180 */ 990, 990, 1034, 1037, 1010, 1066, 1018, 946, 971, 976, + /* 190 */ 1052, 986, 990, 1093, 1065, 1119, 1083, 1053, 1071, 1072, + /* 200 */ 990, 1013, 1013, 994, 1013, 1019, 1014, 1113, 1069, 1059, + /* 210 */ 1061, 1070, 1073, 1140, 1075, 1144, 1090, 1160, 1161, 1115, + /* 220 */ 1165, 1117, 1121, 1169, 1172, 1174, 1126, 1130, 1131, 1176, + /* 230 */ 1173, 1190, 1180, 1192, 1193, 1201, 1211, 1209, 1217, 1210, + /* 240 */ 1132, 1200, 1203, 1182, 1218, 1230, 1167, 1228, 1236, 1233, + /* 250 */ 1183, 1235, 1237, 1239, 1241, 1248, 1219, 1222, 1223, 1227, + /* 260 */ 1234, 1242, 1245, 1252, 1254, 1256, 1257, 1247, 1262, 1263, + /* 270 */ 1268, 1204, 1229, 1249, 1184, 1213, 1212, 1285, 1220, 1244, + /* 280 */ 1240, 1265, 1293, 1246, 1310, 1277, 1197, 1266, 1199, 1267, + /* 290 */ 1202, 1205, 1208, 1251, 1243, 1255, 1273, 1191, 1198, 1207, + /* 300 */ 1013, 1342, 1259, 1250, 1253, 1349, 1346, 1348, 1290, 1315, + /* 310 */ 1317, 1318, 1327, 1314, 1328, 1325, 1374, 1358, 1377, 1381, + /* 320 */ 1282, 1362, 1350, 1392, 1387, 1410, 1411, 1414, 1329, 1331, + /* 330 */ 1338, 1339, 1378, 1379, 1383, 1396, 1423, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 10 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 20 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 30 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 40 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 50 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 60 */ 1884, 2219, 1884, 1884, 2182, 1884, 1884, 1884, 1884, 1884, - /* 70 */ 1884, 1884, 1884, 1884, 1884, 1884, 2189, 1884, 1884, 1884, - /* 80 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 90 */ 1884, 1884, 1884, 1884, 1884, 1884, 1981, 1884, 1884, 1884, - /* 100 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 110 */ 1884, 1884, 1884, 1979, 2422, 1884, 1884, 1884, 1884, 1884, - /* 120 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 130 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2434, 1884, - /* 140 */ 1884, 1955, 1955, 1884, 2434, 2434, 2434, 1979, 2394, 2394, - /* 150 */ 1884, 1884, 1981, 2257, 1884, 1884, 1884, 1884, 1884, 1884, - /* 160 */ 1884, 1884, 2104, 1914, 1884, 1884, 1884, 1884, 2128, 1884, - /* 170 */ 1884, 1884, 2245, 1884, 1884, 2463, 2523, 1884, 1884, 2466, - /* 180 */ 1884, 1884, 1884, 1884, 2194, 1884, 2453, 1884, 1884, 1884, - /* 190 */ 1884, 1884, 1884, 1884, 1884, 1884, 2057, 2239, 1884, 1884, - /* 200 */ 1884, 2426, 2440, 2507, 2427, 2424, 2447, 1884, 2457, 1884, - /* 210 */ 2282, 1884, 2271, 1981, 1884, 1981, 2232, 2177, 1884, 2187, - /* 220 */ 1884, 2187, 2184, 1884, 1884, 1884, 2187, 2184, 2184, 2046, - /* 230 */ 2042, 1884, 2040, 1884, 1884, 1884, 1884, 1939, 1884, 1939, - /* 240 */ 1884, 1981, 1981, 1884, 1981, 1884, 1884, 1981, 1884, 1981, - /* 250 */ 1884, 1981, 1981, 1884, 1981, 1884, 1884, 1884, 1884, 1884, - /* 260 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 270 */ 1884, 1884, 1884, 1884, 2269, 2255, 1884, 1979, 1884, 2243, - /* 280 */ 2241, 1884, 1979, 2457, 1884, 1884, 2477, 2472, 2477, 2472, - /* 290 */ 2491, 2487, 2477, 2496, 2493, 2459, 2457, 2526, 2513, 2509, - /* 300 */ 2440, 1884, 1884, 2445, 2443, 1884, 1979, 1979, 2472, 1884, - /* 310 */ 1884, 1884, 1884, 2472, 1884, 1884, 1979, 1884, 1979, 1884, - /* 320 */ 1884, 2073, 1884, 1884, 1979, 1884, 1923, 1884, 2234, 2260, - /* 330 */ 2215, 2215, 2107, 2107, 2107, 1982, 1889, 1884, 1884, 1884, - /* 340 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2490, - /* 350 */ 2489, 2347, 1884, 2398, 2397, 2396, 2387, 2346, 2069, 1884, - /* 360 */ 1884, 2345, 2344, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 370 */ 1884, 2206, 2205, 2338, 1884, 1884, 2339, 2337, 2336, 1884, - /* 380 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 390 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 400 */ 1884, 1884, 1884, 2510, 2514, 1884, 1884, 1884, 1884, 1884, - /* 410 */ 1884, 2423, 1884, 1884, 1884, 2318, 1884, 1884, 1884, 1884, - /* 420 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 430 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 440 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 450 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 460 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 470 */ 2183, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 480 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 490 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 500 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 510 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 520 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 530 */ 2198, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 540 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 550 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 560 */ 1884, 1884, 1928, 2325, 1884, 1884, 1884, 1884, 1884, 1884, - /* 570 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2328, 1884, 1884, - /* 580 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 590 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 600 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 610 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2021, 2020, - /* 620 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 630 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 640 */ 1884, 1884, 1884, 1884, 2329, 1884, 1884, 1884, 1884, 1884, - /* 650 */ 2320, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 660 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2506, 2460, 1884, - /* 670 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 680 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2318, 1884, 2488, - /* 690 */ 1884, 1884, 2504, 1884, 2508, 1884, 1884, 1884, 1884, 1884, - /* 700 */ 1884, 1884, 2433, 2429, 1884, 1884, 2425, 1884, 1884, 1884, - /* 710 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 720 */ 1884, 1884, 1884, 1884, 2317, 1884, 2384, 1884, 1884, 1884, - /* 730 */ 2418, 1884, 1884, 2369, 1884, 1884, 1884, 1884, 1884, 1884, - /* 740 */ 1884, 1884, 1884, 2329, 1884, 2332, 1884, 1884, 1884, 1884, - /* 750 */ 1884, 2101, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 760 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2085, 2083, 2082, - /* 770 */ 2081, 1884, 2114, 1884, 1884, 1884, 2110, 2109, 1884, 1884, - /* 780 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 790 */ 1884, 1884, 1884, 1884, 2000, 1884, 1884, 1884, 1884, 1884, - /* 800 */ 1884, 1884, 1884, 1992, 1884, 1991, 1884, 1884, 1884, 1884, - /* 810 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 820 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, - /* 830 */ 1884, 1884, 1884, 1913, 1884, 1884, 1884, 1884, 1884, 1884, + /* 0 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 10 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 20 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 30 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 40 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 50 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 60 */ 1889, 2226, 1889, 1889, 2189, 1889, 1889, 1889, 1889, 1889, + /* 70 */ 1889, 1889, 1889, 1889, 1889, 1889, 2196, 1889, 1889, 1889, + /* 80 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 90 */ 1889, 1889, 1889, 1889, 1889, 1889, 1988, 1889, 1889, 1889, + /* 100 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 110 */ 1889, 1889, 1889, 1986, 2429, 1889, 1889, 1889, 1889, 1889, + /* 120 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 130 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2441, 1889, + /* 140 */ 1889, 1960, 1960, 1889, 2441, 2441, 2441, 1986, 2401, 2401, + /* 150 */ 1889, 1889, 1988, 2264, 1889, 1889, 1889, 1889, 1889, 1889, + /* 160 */ 1889, 1889, 2111, 1919, 1889, 1889, 1889, 1889, 2135, 1889, + /* 170 */ 1889, 1889, 2252, 1889, 1889, 2470, 2530, 1889, 1889, 2473, + /* 180 */ 1889, 1889, 1889, 1889, 2201, 1889, 2460, 1889, 1889, 1889, + /* 190 */ 1889, 1889, 1889, 1889, 1889, 1889, 2064, 2246, 1889, 1889, + /* 200 */ 1889, 2433, 2447, 2514, 2434, 2431, 2454, 1889, 2464, 1889, + /* 210 */ 2289, 1889, 2278, 1988, 1889, 1988, 2239, 2184, 1889, 2194, + /* 220 */ 1889, 2194, 2191, 1889, 1889, 1889, 2194, 2191, 2191, 2053, + /* 230 */ 2049, 1889, 2047, 1889, 1889, 1889, 1889, 1944, 1889, 1944, + /* 240 */ 1889, 1988, 1988, 1889, 1988, 1889, 1889, 1988, 1889, 1988, + /* 250 */ 1889, 1988, 1988, 1889, 1988, 1889, 1889, 1889, 1889, 1889, + /* 260 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 270 */ 1889, 1889, 1889, 1889, 2276, 2262, 1889, 1986, 1889, 2250, + /* 280 */ 2248, 1889, 1986, 2464, 1889, 1889, 2484, 2479, 2484, 2479, + /* 290 */ 2498, 2494, 2484, 2503, 2500, 2466, 2464, 2533, 2520, 2516, + /* 300 */ 2447, 1889, 1889, 2452, 2450, 1889, 1986, 1986, 2479, 1889, + /* 310 */ 1889, 1889, 1889, 2479, 1889, 1889, 1986, 1889, 1986, 1889, + /* 320 */ 1889, 2080, 1889, 1889, 1986, 1889, 1928, 1889, 2241, 2267, + /* 330 */ 2222, 2222, 2114, 2114, 2114, 1989, 1894, 1889, 1889, 1889, + /* 340 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2497, + /* 350 */ 2496, 2354, 1889, 2405, 2404, 2403, 2394, 2353, 2076, 1889, + /* 360 */ 1889, 2352, 2351, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 370 */ 1889, 2213, 2212, 2345, 1889, 1889, 2346, 2344, 2343, 1889, + /* 380 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 390 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 400 */ 1889, 1889, 1889, 1889, 2517, 2521, 1889, 1889, 1889, 1889, + /* 410 */ 1889, 1889, 2430, 1889, 1889, 1889, 2325, 1889, 1889, 1889, + /* 420 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 430 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 440 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 450 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 460 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 470 */ 1889, 2190, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 480 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 490 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 500 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 510 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 520 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 530 */ 1889, 2205, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 540 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 550 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 560 */ 1889, 1889, 1889, 1933, 2332, 1889, 1889, 1889, 1889, 1889, + /* 570 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2335, 1889, + /* 580 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 590 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 600 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 610 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2028, + /* 620 */ 2027, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 630 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 640 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2336, 1889, 1889, + /* 650 */ 1889, 1889, 1889, 2327, 1889, 1889, 1889, 1889, 1889, 1889, + /* 660 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 670 */ 2513, 2467, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 680 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 690 */ 2325, 1889, 2495, 1889, 1889, 2511, 1889, 2515, 1889, 1889, + /* 700 */ 1889, 1889, 1889, 1889, 1889, 2440, 2436, 1889, 1889, 2432, + /* 710 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 720 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2324, 1889, 2391, + /* 730 */ 1889, 1889, 1889, 2425, 1889, 1889, 2376, 1889, 1889, 1889, + /* 740 */ 1889, 1889, 1889, 1889, 1889, 1889, 2336, 1889, 2339, 1889, + /* 750 */ 1889, 1889, 1889, 1889, 2108, 1889, 1889, 1889, 1889, 1889, + /* 760 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 770 */ 2092, 2090, 2089, 2088, 1889, 2121, 1889, 1889, 1889, 2117, + /* 780 */ 2116, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 790 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2007, 1889, 1889, + /* 800 */ 1889, 1889, 1889, 1889, 1889, 1889, 1999, 1889, 1998, 1889, + /* 810 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 820 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, + /* 830 */ 1889, 1889, 1889, 1889, 1889, 1889, 1918, 1889, 1889, 1889, + /* 840 */ 1889, 1889, 1889, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1513,6 +1174,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* NK_IPTOKEN => nothing */ 0, /* FORCE => nothing */ 0, /* UNSAFE => nothing */ + 0, /* CLUSTER => nothing */ 0, /* LOCAL => nothing */ 0, /* QNODE => nothing */ 0, /* BNODE => nothing */ @@ -1617,7 +1279,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* SCORES => nothing */ 0, /* TOPICS => nothing */ 0, /* VARIABLES => nothing */ - 0, /* CLUSTER => nothing */ 0, /* BNODES => nothing */ 0, /* SNODES => nothing */ 0, /* TRANSACTIONS => nothing */ @@ -1853,7 +1514,6 @@ struct yyParser { }; typedef struct yyParser yyParser; -#include #ifndef NDEBUG #include static FILE *yyTraceFILE = 0; @@ -1948,111 +1608,111 @@ static const char *const yyTokenName[] = { /* 55 */ "NK_IPTOKEN", /* 56 */ "FORCE", /* 57 */ "UNSAFE", - /* 58 */ "LOCAL", - /* 59 */ "QNODE", - /* 60 */ "BNODE", - /* 61 */ "SNODE", - /* 62 */ "MNODE", - /* 63 */ "VNODE", - /* 64 */ "DATABASE", - /* 65 */ "USE", - /* 66 */ "FLUSH", - /* 67 */ "TRIM", - /* 68 */ "COMPACT", - /* 69 */ "IF", - /* 70 */ "NOT", - /* 71 */ "EXISTS", - /* 72 */ "BUFFER", - /* 73 */ "CACHEMODEL", - /* 74 */ "CACHESIZE", - /* 75 */ "COMP", - /* 76 */ "DURATION", - /* 77 */ "NK_VARIABLE", - /* 78 */ "MAXROWS", - /* 79 */ "MINROWS", - /* 80 */ "KEEP", - /* 81 */ "PAGES", - /* 82 */ "PAGESIZE", - /* 83 */ "TSDB_PAGESIZE", - /* 84 */ "PRECISION", - /* 85 */ "REPLICA", - /* 86 */ "VGROUPS", - /* 87 */ "SINGLE_STABLE", - /* 88 */ "RETENTIONS", - /* 89 */ "SCHEMALESS", - /* 90 */ "WAL_LEVEL", - /* 91 */ "WAL_FSYNC_PERIOD", - /* 92 */ "WAL_RETENTION_PERIOD", - /* 93 */ "WAL_RETENTION_SIZE", - /* 94 */ "WAL_ROLL_PERIOD", - /* 95 */ "WAL_SEGMENT_SIZE", - /* 96 */ "STT_TRIGGER", - /* 97 */ "TABLE_PREFIX", - /* 98 */ "TABLE_SUFFIX", - /* 99 */ "KEEP_TIME_OFFSET", - /* 100 */ "NK_COLON", - /* 101 */ "BWLIMIT", - /* 102 */ "START", - /* 103 */ "TIMESTAMP", - /* 104 */ "END", - /* 105 */ "TABLE", - /* 106 */ "NK_LP", - /* 107 */ "NK_RP", - /* 108 */ "STABLE", - /* 109 */ "COLUMN", - /* 110 */ "MODIFY", - /* 111 */ "RENAME", - /* 112 */ "TAG", - /* 113 */ "SET", - /* 114 */ "NK_EQ", - /* 115 */ "USING", - /* 116 */ "TAGS", - /* 117 */ "BOOL", - /* 118 */ "TINYINT", - /* 119 */ "SMALLINT", - /* 120 */ "INT", - /* 121 */ "INTEGER", - /* 122 */ "BIGINT", - /* 123 */ "FLOAT", - /* 124 */ "DOUBLE", - /* 125 */ "BINARY", - /* 126 */ "NCHAR", - /* 127 */ "UNSIGNED", - /* 128 */ "JSON", - /* 129 */ "VARCHAR", - /* 130 */ "MEDIUMBLOB", - /* 131 */ "BLOB", - /* 132 */ "VARBINARY", - /* 133 */ "GEOMETRY", - /* 134 */ "DECIMAL", - /* 135 */ "COMMENT", - /* 136 */ "MAX_DELAY", - /* 137 */ "WATERMARK", - /* 138 */ "ROLLUP", - /* 139 */ "TTL", - /* 140 */ "SMA", - /* 141 */ "DELETE_MARK", - /* 142 */ "FIRST", - /* 143 */ "LAST", - /* 144 */ "SHOW", - /* 145 */ "PRIVILEGES", - /* 146 */ "DATABASES", - /* 147 */ "TABLES", - /* 148 */ "STABLES", - /* 149 */ "MNODES", - /* 150 */ "QNODES", - /* 151 */ "FUNCTIONS", - /* 152 */ "INDEXES", - /* 153 */ "ACCOUNTS", - /* 154 */ "APPS", - /* 155 */ "CONNECTIONS", - /* 156 */ "LICENCES", - /* 157 */ "GRANTS", - /* 158 */ "QUERIES", - /* 159 */ "SCORES", - /* 160 */ "TOPICS", - /* 161 */ "VARIABLES", - /* 162 */ "CLUSTER", + /* 58 */ "CLUSTER", + /* 59 */ "LOCAL", + /* 60 */ "QNODE", + /* 61 */ "BNODE", + /* 62 */ "SNODE", + /* 63 */ "MNODE", + /* 64 */ "VNODE", + /* 65 */ "DATABASE", + /* 66 */ "USE", + /* 67 */ "FLUSH", + /* 68 */ "TRIM", + /* 69 */ "COMPACT", + /* 70 */ "IF", + /* 71 */ "NOT", + /* 72 */ "EXISTS", + /* 73 */ "BUFFER", + /* 74 */ "CACHEMODEL", + /* 75 */ "CACHESIZE", + /* 76 */ "COMP", + /* 77 */ "DURATION", + /* 78 */ "NK_VARIABLE", + /* 79 */ "MAXROWS", + /* 80 */ "MINROWS", + /* 81 */ "KEEP", + /* 82 */ "PAGES", + /* 83 */ "PAGESIZE", + /* 84 */ "TSDB_PAGESIZE", + /* 85 */ "PRECISION", + /* 86 */ "REPLICA", + /* 87 */ "VGROUPS", + /* 88 */ "SINGLE_STABLE", + /* 89 */ "RETENTIONS", + /* 90 */ "SCHEMALESS", + /* 91 */ "WAL_LEVEL", + /* 92 */ "WAL_FSYNC_PERIOD", + /* 93 */ "WAL_RETENTION_PERIOD", + /* 94 */ "WAL_RETENTION_SIZE", + /* 95 */ "WAL_ROLL_PERIOD", + /* 96 */ "WAL_SEGMENT_SIZE", + /* 97 */ "STT_TRIGGER", + /* 98 */ "TABLE_PREFIX", + /* 99 */ "TABLE_SUFFIX", + /* 100 */ "KEEP_TIME_OFFSET", + /* 101 */ "NK_COLON", + /* 102 */ "BWLIMIT", + /* 103 */ "START", + /* 104 */ "TIMESTAMP", + /* 105 */ "END", + /* 106 */ "TABLE", + /* 107 */ "NK_LP", + /* 108 */ "NK_RP", + /* 109 */ "STABLE", + /* 110 */ "COLUMN", + /* 111 */ "MODIFY", + /* 112 */ "RENAME", + /* 113 */ "TAG", + /* 114 */ "SET", + /* 115 */ "NK_EQ", + /* 116 */ "USING", + /* 117 */ "TAGS", + /* 118 */ "BOOL", + /* 119 */ "TINYINT", + /* 120 */ "SMALLINT", + /* 121 */ "INT", + /* 122 */ "INTEGER", + /* 123 */ "BIGINT", + /* 124 */ "FLOAT", + /* 125 */ "DOUBLE", + /* 126 */ "BINARY", + /* 127 */ "NCHAR", + /* 128 */ "UNSIGNED", + /* 129 */ "JSON", + /* 130 */ "VARCHAR", + /* 131 */ "MEDIUMBLOB", + /* 132 */ "BLOB", + /* 133 */ "VARBINARY", + /* 134 */ "GEOMETRY", + /* 135 */ "DECIMAL", + /* 136 */ "COMMENT", + /* 137 */ "MAX_DELAY", + /* 138 */ "WATERMARK", + /* 139 */ "ROLLUP", + /* 140 */ "TTL", + /* 141 */ "SMA", + /* 142 */ "DELETE_MARK", + /* 143 */ "FIRST", + /* 144 */ "LAST", + /* 145 */ "SHOW", + /* 146 */ "PRIVILEGES", + /* 147 */ "DATABASES", + /* 148 */ "TABLES", + /* 149 */ "STABLES", + /* 150 */ "MNODES", + /* 151 */ "QNODES", + /* 152 */ "FUNCTIONS", + /* 153 */ "INDEXES", + /* 154 */ "ACCOUNTS", + /* 155 */ "APPS", + /* 156 */ "CONNECTIONS", + /* 157 */ "LICENCES", + /* 158 */ "GRANTS", + /* 159 */ "QUERIES", + /* 160 */ "SCORES", + /* 161 */ "TOPICS", + /* 162 */ "VARIABLES", /* 163 */ "BNODES", /* 164 */ "SNODES", /* 165 */ "TRANSACTIONS", @@ -2476,577 +2136,579 @@ static const char *const yyRuleName[] = { /* 68 */ "force_opt ::=", /* 69 */ "force_opt ::= FORCE", /* 70 */ "unsafe_opt ::= UNSAFE", - /* 71 */ "cmd ::= ALTER LOCAL NK_STRING", - /* 72 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING", - /* 73 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER", - /* 74 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER", - /* 75 */ "cmd ::= RESTORE QNODE ON DNODE NK_INTEGER", - /* 76 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER", - /* 77 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER", - /* 78 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER", - /* 79 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER", - /* 80 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER", - /* 81 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER", - /* 82 */ "cmd ::= RESTORE MNODE ON DNODE NK_INTEGER", - /* 83 */ "cmd ::= RESTORE VNODE ON DNODE NK_INTEGER", - /* 84 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options", - /* 85 */ "cmd ::= DROP DATABASE exists_opt db_name", - /* 86 */ "cmd ::= USE db_name", - /* 87 */ "cmd ::= ALTER DATABASE db_name alter_db_options", - /* 88 */ "cmd ::= FLUSH DATABASE db_name", - /* 89 */ "cmd ::= TRIM DATABASE db_name speed_opt", - /* 90 */ "cmd ::= COMPACT DATABASE db_name start_opt end_opt", - /* 91 */ "not_exists_opt ::= IF NOT EXISTS", - /* 92 */ "not_exists_opt ::=", - /* 93 */ "exists_opt ::= IF EXISTS", - /* 94 */ "exists_opt ::=", - /* 95 */ "db_options ::=", - /* 96 */ "db_options ::= db_options BUFFER NK_INTEGER", - /* 97 */ "db_options ::= db_options CACHEMODEL NK_STRING", - /* 98 */ "db_options ::= db_options CACHESIZE NK_INTEGER", - /* 99 */ "db_options ::= db_options COMP NK_INTEGER", - /* 100 */ "db_options ::= db_options DURATION NK_INTEGER", - /* 101 */ "db_options ::= db_options DURATION NK_VARIABLE", - /* 102 */ "db_options ::= db_options MAXROWS NK_INTEGER", - /* 103 */ "db_options ::= db_options MINROWS NK_INTEGER", - /* 104 */ "db_options ::= db_options KEEP integer_list", - /* 105 */ "db_options ::= db_options KEEP variable_list", - /* 106 */ "db_options ::= db_options PAGES NK_INTEGER", - /* 107 */ "db_options ::= db_options PAGESIZE NK_INTEGER", - /* 108 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER", - /* 109 */ "db_options ::= db_options PRECISION NK_STRING", - /* 110 */ "db_options ::= db_options REPLICA NK_INTEGER", - /* 111 */ "db_options ::= db_options VGROUPS NK_INTEGER", - /* 112 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER", - /* 113 */ "db_options ::= db_options RETENTIONS retention_list", - /* 114 */ "db_options ::= db_options SCHEMALESS NK_INTEGER", - /* 115 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER", - /* 116 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER", - /* 117 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER", - /* 118 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", - /* 119 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER", - /* 120 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", - /* 121 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER", - /* 122 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER", - /* 123 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER", - /* 124 */ "db_options ::= db_options TABLE_PREFIX signed", - /* 125 */ "db_options ::= db_options TABLE_SUFFIX signed", - /* 126 */ "db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER", - /* 127 */ "alter_db_options ::= alter_db_option", - /* 128 */ "alter_db_options ::= alter_db_options alter_db_option", - /* 129 */ "alter_db_option ::= BUFFER NK_INTEGER", - /* 130 */ "alter_db_option ::= CACHEMODEL NK_STRING", - /* 131 */ "alter_db_option ::= CACHESIZE NK_INTEGER", - /* 132 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER", - /* 133 */ "alter_db_option ::= KEEP integer_list", - /* 134 */ "alter_db_option ::= KEEP variable_list", - /* 135 */ "alter_db_option ::= PAGES NK_INTEGER", - /* 136 */ "alter_db_option ::= REPLICA NK_INTEGER", - /* 137 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", - /* 138 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", - /* 139 */ "alter_db_option ::= MINROWS NK_INTEGER", - /* 140 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER", - /* 141 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", - /* 142 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER", - /* 143 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", - /* 144 */ "alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER", - /* 145 */ "integer_list ::= NK_INTEGER", - /* 146 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", - /* 147 */ "variable_list ::= NK_VARIABLE", - /* 148 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", - /* 149 */ "retention_list ::= retention", - /* 150 */ "retention_list ::= retention_list NK_COMMA retention", - /* 151 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", - /* 152 */ "retention ::= NK_MINUS NK_COLON NK_VARIABLE", - /* 153 */ "speed_opt ::=", - /* 154 */ "speed_opt ::= BWLIMIT NK_INTEGER", - /* 155 */ "start_opt ::=", - /* 156 */ "start_opt ::= START WITH NK_INTEGER", - /* 157 */ "start_opt ::= START WITH NK_STRING", - /* 158 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", - /* 159 */ "end_opt ::=", - /* 160 */ "end_opt ::= END WITH NK_INTEGER", - /* 161 */ "end_opt ::= END WITH NK_STRING", - /* 162 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", - /* 163 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", - /* 164 */ "cmd ::= CREATE TABLE multi_create_clause", - /* 165 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", - /* 166 */ "cmd ::= DROP TABLE multi_drop_clause", - /* 167 */ "cmd ::= DROP STABLE exists_opt full_table_name", - /* 168 */ "cmd ::= ALTER TABLE alter_table_clause", - /* 169 */ "cmd ::= ALTER STABLE alter_table_clause", - /* 170 */ "alter_table_clause ::= full_table_name alter_table_options", - /* 171 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name", - /* 172 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", - /* 173 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", - /* 174 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", - /* 175 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", - /* 176 */ "alter_table_clause ::= full_table_name DROP TAG column_name", - /* 177 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", - /* 178 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", - /* 179 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal", - /* 180 */ "multi_create_clause ::= create_subtable_clause", - /* 181 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", - /* 182 */ "create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options", - /* 183 */ "multi_drop_clause ::= drop_table_clause", - /* 184 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", - /* 185 */ "drop_table_clause ::= exists_opt full_table_name", - /* 186 */ "specific_cols_opt ::=", - /* 187 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", - /* 188 */ "full_table_name ::= table_name", - /* 189 */ "full_table_name ::= db_name NK_DOT table_name", - /* 190 */ "column_def_list ::= column_def", - /* 191 */ "column_def_list ::= column_def_list NK_COMMA column_def", - /* 192 */ "column_def ::= column_name type_name", - /* 193 */ "type_name ::= BOOL", - /* 194 */ "type_name ::= TINYINT", - /* 195 */ "type_name ::= SMALLINT", - /* 196 */ "type_name ::= INT", - /* 197 */ "type_name ::= INTEGER", - /* 198 */ "type_name ::= BIGINT", - /* 199 */ "type_name ::= FLOAT", - /* 200 */ "type_name ::= DOUBLE", - /* 201 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", - /* 202 */ "type_name ::= TIMESTAMP", - /* 203 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", - /* 204 */ "type_name ::= TINYINT UNSIGNED", - /* 205 */ "type_name ::= SMALLINT UNSIGNED", - /* 206 */ "type_name ::= INT UNSIGNED", - /* 207 */ "type_name ::= BIGINT UNSIGNED", - /* 208 */ "type_name ::= JSON", - /* 209 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", - /* 210 */ "type_name ::= MEDIUMBLOB", - /* 211 */ "type_name ::= BLOB", - /* 212 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", - /* 213 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP", - /* 214 */ "type_name ::= DECIMAL", - /* 215 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", - /* 216 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 217 */ "tags_def_opt ::=", - /* 218 */ "tags_def_opt ::= tags_def", - /* 219 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", - /* 220 */ "table_options ::=", - /* 221 */ "table_options ::= table_options COMMENT NK_STRING", - /* 222 */ "table_options ::= table_options MAX_DELAY duration_list", - /* 223 */ "table_options ::= table_options WATERMARK duration_list", - /* 224 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", - /* 225 */ "table_options ::= table_options TTL NK_INTEGER", - /* 226 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", - /* 227 */ "table_options ::= table_options DELETE_MARK duration_list", - /* 228 */ "alter_table_options ::= alter_table_option", - /* 229 */ "alter_table_options ::= alter_table_options alter_table_option", - /* 230 */ "alter_table_option ::= COMMENT NK_STRING", - /* 231 */ "alter_table_option ::= TTL NK_INTEGER", - /* 232 */ "duration_list ::= duration_literal", - /* 233 */ "duration_list ::= duration_list NK_COMMA duration_literal", - /* 234 */ "rollup_func_list ::= rollup_func_name", - /* 235 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", - /* 236 */ "rollup_func_name ::= function_name", - /* 237 */ "rollup_func_name ::= FIRST", - /* 238 */ "rollup_func_name ::= LAST", - /* 239 */ "col_name_list ::= col_name", - /* 240 */ "col_name_list ::= col_name_list NK_COMMA col_name", - /* 241 */ "col_name ::= column_name", - /* 242 */ "cmd ::= SHOW DNODES", - /* 243 */ "cmd ::= SHOW USERS", - /* 244 */ "cmd ::= SHOW USER PRIVILEGES", - /* 245 */ "cmd ::= SHOW db_kind_opt DATABASES", - /* 246 */ "cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt", - /* 247 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", - /* 248 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", - /* 249 */ "cmd ::= SHOW MNODES", - /* 250 */ "cmd ::= SHOW QNODES", - /* 251 */ "cmd ::= SHOW FUNCTIONS", - /* 252 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", - /* 253 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name", - /* 254 */ "cmd ::= SHOW STREAMS", - /* 255 */ "cmd ::= SHOW ACCOUNTS", - /* 256 */ "cmd ::= SHOW APPS", - /* 257 */ "cmd ::= SHOW CONNECTIONS", - /* 258 */ "cmd ::= SHOW LICENCES", - /* 259 */ "cmd ::= SHOW GRANTS", - /* 260 */ "cmd ::= SHOW CREATE DATABASE db_name", - /* 261 */ "cmd ::= SHOW CREATE TABLE full_table_name", - /* 262 */ "cmd ::= SHOW CREATE STABLE full_table_name", - /* 263 */ "cmd ::= SHOW QUERIES", - /* 264 */ "cmd ::= SHOW SCORES", - /* 265 */ "cmd ::= SHOW TOPICS", - /* 266 */ "cmd ::= SHOW VARIABLES", - /* 267 */ "cmd ::= SHOW CLUSTER VARIABLES", - /* 268 */ "cmd ::= SHOW LOCAL VARIABLES", - /* 269 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", - /* 270 */ "cmd ::= SHOW BNODES", - /* 271 */ "cmd ::= SHOW SNODES", - /* 272 */ "cmd ::= SHOW CLUSTER", - /* 273 */ "cmd ::= SHOW TRANSACTIONS", - /* 274 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", - /* 275 */ "cmd ::= SHOW CONSUMERS", - /* 276 */ "cmd ::= SHOW SUBSCRIPTIONS", - /* 277 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", - /* 278 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", - /* 279 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", - /* 280 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", - /* 281 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", - /* 282 */ "cmd ::= SHOW VNODES", - /* 283 */ "cmd ::= SHOW db_name_cond_opt ALIVE", - /* 284 */ "cmd ::= SHOW CLUSTER ALIVE", - /* 285 */ "cmd ::= SHOW db_name_cond_opt VIEWS", - /* 286 */ "cmd ::= SHOW CREATE VIEW full_table_name", - /* 287 */ "cmd ::= SHOW COMPACTS", - /* 288 */ "cmd ::= SHOW COMPACT NK_INTEGER", - /* 289 */ "table_kind_db_name_cond_opt ::=", - /* 290 */ "table_kind_db_name_cond_opt ::= table_kind", - /* 291 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", - /* 292 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", - /* 293 */ "table_kind ::= NORMAL", - /* 294 */ "table_kind ::= CHILD", - /* 295 */ "db_name_cond_opt ::=", - /* 296 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 297 */ "like_pattern_opt ::=", - /* 298 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 299 */ "table_name_cond ::= table_name", - /* 300 */ "from_db_opt ::=", - /* 301 */ "from_db_opt ::= FROM db_name", - /* 302 */ "tag_list_opt ::=", - /* 303 */ "tag_list_opt ::= tag_item", - /* 304 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", - /* 305 */ "tag_item ::= TBNAME", - /* 306 */ "tag_item ::= QTAGS", - /* 307 */ "tag_item ::= column_name", - /* 308 */ "tag_item ::= column_name column_alias", - /* 309 */ "tag_item ::= column_name AS column_alias", - /* 310 */ "db_kind_opt ::=", - /* 311 */ "db_kind_opt ::= USER", - /* 312 */ "db_kind_opt ::= SYSTEM", - /* 313 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", - /* 314 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", - /* 315 */ "cmd ::= DROP INDEX exists_opt full_index_name", - /* 316 */ "full_index_name ::= index_name", - /* 317 */ "full_index_name ::= db_name NK_DOT index_name", - /* 318 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", - /* 319 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt", - /* 320 */ "func_list ::= func", - /* 321 */ "func_list ::= func_list NK_COMMA func", - /* 322 */ "func ::= sma_func_name NK_LP expression_list NK_RP", - /* 323 */ "sma_func_name ::= function_name", - /* 324 */ "sma_func_name ::= COUNT", - /* 325 */ "sma_func_name ::= FIRST", - /* 326 */ "sma_func_name ::= LAST", - /* 327 */ "sma_func_name ::= LAST_ROW", - /* 328 */ "sma_stream_opt ::=", - /* 329 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", - /* 330 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", - /* 331 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", - /* 332 */ "with_meta ::= AS", - /* 333 */ "with_meta ::= WITH META AS", - /* 334 */ "with_meta ::= ONLY META AS", - /* 335 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", - /* 336 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", - /* 337 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", - /* 338 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 339 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 340 */ "cmd ::= DESC full_table_name", - /* 341 */ "cmd ::= DESCRIBE full_table_name", - /* 342 */ "cmd ::= RESET QUERY CACHE", - /* 343 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", - /* 344 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", - /* 345 */ "analyze_opt ::=", - /* 346 */ "analyze_opt ::= ANALYZE", - /* 347 */ "explain_options ::=", - /* 348 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 349 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 350 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", - /* 351 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 352 */ "agg_func_opt ::=", - /* 353 */ "agg_func_opt ::= AGGREGATE", - /* 354 */ "bufsize_opt ::=", - /* 355 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 356 */ "language_opt ::=", - /* 357 */ "language_opt ::= LANGUAGE NK_STRING", - /* 358 */ "or_replace_opt ::=", - /* 359 */ "or_replace_opt ::= OR REPLACE", - /* 360 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", - /* 361 */ "cmd ::= DROP VIEW exists_opt full_view_name", - /* 362 */ "full_view_name ::= view_name", - /* 363 */ "full_view_name ::= db_name NK_DOT view_name", - /* 364 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery", - /* 365 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 366 */ "cmd ::= PAUSE STREAM exists_opt stream_name", - /* 367 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", - /* 368 */ "col_list_opt ::=", - /* 369 */ "col_list_opt ::= NK_LP col_name_list NK_RP", - /* 370 */ "tag_def_or_ref_opt ::=", - /* 371 */ "tag_def_or_ref_opt ::= tags_def", - /* 372 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP", - /* 373 */ "stream_options ::=", - /* 374 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 375 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 376 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 377 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 378 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", - /* 379 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", - /* 380 */ "stream_options ::= stream_options DELETE_MARK duration_literal", - /* 381 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", - /* 382 */ "subtable_opt ::=", - /* 383 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 384 */ "ignore_opt ::=", - /* 385 */ "ignore_opt ::= IGNORE UNTREATED", - /* 386 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 387 */ "cmd ::= KILL QUERY NK_STRING", - /* 388 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 389 */ "cmd ::= KILL COMPACT NK_INTEGER", - /* 390 */ "cmd ::= BALANCE VGROUP", - /* 391 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", - /* 392 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 393 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 394 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 395 */ "on_vgroup_id ::=", - /* 396 */ "on_vgroup_id ::= ON NK_INTEGER", - /* 397 */ "dnode_list ::= DNODE NK_INTEGER", - /* 398 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 399 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 400 */ "cmd ::= query_or_subquery", - /* 401 */ "cmd ::= insert_query", - /* 402 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 403 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", - /* 404 */ "literal ::= NK_INTEGER", - /* 405 */ "literal ::= NK_FLOAT", - /* 406 */ "literal ::= NK_STRING", - /* 407 */ "literal ::= NK_BOOL", - /* 408 */ "literal ::= TIMESTAMP NK_STRING", - /* 409 */ "literal ::= duration_literal", - /* 410 */ "literal ::= NULL", - /* 411 */ "literal ::= NK_QUESTION", - /* 412 */ "duration_literal ::= NK_VARIABLE", - /* 413 */ "signed ::= NK_INTEGER", - /* 414 */ "signed ::= NK_PLUS NK_INTEGER", - /* 415 */ "signed ::= NK_MINUS NK_INTEGER", - /* 416 */ "signed ::= NK_FLOAT", - /* 417 */ "signed ::= NK_PLUS NK_FLOAT", - /* 418 */ "signed ::= NK_MINUS NK_FLOAT", - /* 419 */ "signed_literal ::= signed", - /* 420 */ "signed_literal ::= NK_STRING", - /* 421 */ "signed_literal ::= NK_BOOL", - /* 422 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 423 */ "signed_literal ::= duration_literal", - /* 424 */ "signed_literal ::= NULL", - /* 425 */ "signed_literal ::= literal_func", - /* 426 */ "signed_literal ::= NK_QUESTION", - /* 427 */ "literal_list ::= signed_literal", - /* 428 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 429 */ "db_name ::= NK_ID", - /* 430 */ "table_name ::= NK_ID", - /* 431 */ "column_name ::= NK_ID", - /* 432 */ "function_name ::= NK_ID", - /* 433 */ "view_name ::= NK_ID", - /* 434 */ "table_alias ::= NK_ID", - /* 435 */ "column_alias ::= NK_ID", - /* 436 */ "column_alias ::= NK_ALIAS", - /* 437 */ "user_name ::= NK_ID", - /* 438 */ "topic_name ::= NK_ID", - /* 439 */ "stream_name ::= NK_ID", - /* 440 */ "cgroup_name ::= NK_ID", - /* 441 */ "index_name ::= NK_ID", - /* 442 */ "expr_or_subquery ::= expression", - /* 443 */ "expression ::= literal", - /* 444 */ "expression ::= pseudo_column", - /* 445 */ "expression ::= column_reference", - /* 446 */ "expression ::= function_expression", - /* 447 */ "expression ::= case_when_expression", - /* 448 */ "expression ::= NK_LP expression NK_RP", - /* 449 */ "expression ::= NK_PLUS expr_or_subquery", - /* 450 */ "expression ::= NK_MINUS expr_or_subquery", - /* 451 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 452 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 453 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 454 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 455 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 456 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 457 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 458 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 459 */ "expression_list ::= expr_or_subquery", - /* 460 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 461 */ "column_reference ::= column_name", - /* 462 */ "column_reference ::= table_name NK_DOT column_name", - /* 463 */ "column_reference ::= NK_ALIAS", - /* 464 */ "column_reference ::= table_name NK_DOT NK_ALIAS", - /* 465 */ "pseudo_column ::= ROWTS", - /* 466 */ "pseudo_column ::= TBNAME", - /* 467 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 468 */ "pseudo_column ::= QSTART", - /* 469 */ "pseudo_column ::= QEND", - /* 470 */ "pseudo_column ::= QDURATION", - /* 471 */ "pseudo_column ::= WSTART", - /* 472 */ "pseudo_column ::= WEND", - /* 473 */ "pseudo_column ::= WDURATION", - /* 474 */ "pseudo_column ::= IROWTS", - /* 475 */ "pseudo_column ::= ISFILLED", - /* 476 */ "pseudo_column ::= QTAGS", - /* 477 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 478 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 479 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 480 */ "function_expression ::= literal_func", - /* 481 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 482 */ "literal_func ::= NOW", - /* 483 */ "noarg_func ::= NOW", - /* 484 */ "noarg_func ::= TODAY", - /* 485 */ "noarg_func ::= TIMEZONE", - /* 486 */ "noarg_func ::= DATABASE", - /* 487 */ "noarg_func ::= CLIENT_VERSION", - /* 488 */ "noarg_func ::= SERVER_VERSION", - /* 489 */ "noarg_func ::= SERVER_STATUS", - /* 490 */ "noarg_func ::= CURRENT_USER", - /* 491 */ "noarg_func ::= USER", - /* 492 */ "star_func ::= COUNT", - /* 493 */ "star_func ::= FIRST", - /* 494 */ "star_func ::= LAST", - /* 495 */ "star_func ::= LAST_ROW", - /* 496 */ "star_func_para_list ::= NK_STAR", - /* 497 */ "star_func_para_list ::= other_para_list", - /* 498 */ "other_para_list ::= star_func_para", - /* 499 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 500 */ "star_func_para ::= expr_or_subquery", - /* 501 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 502 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 503 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 504 */ "when_then_list ::= when_then_expr", - /* 505 */ "when_then_list ::= when_then_list when_then_expr", - /* 506 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 507 */ "case_when_else_opt ::=", - /* 508 */ "case_when_else_opt ::= ELSE common_expression", - /* 509 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 510 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 511 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 512 */ "predicate ::= expr_or_subquery IS NULL", - /* 513 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 514 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 515 */ "compare_op ::= NK_LT", - /* 516 */ "compare_op ::= NK_GT", - /* 517 */ "compare_op ::= NK_LE", - /* 518 */ "compare_op ::= NK_GE", - /* 519 */ "compare_op ::= NK_NE", - /* 520 */ "compare_op ::= NK_EQ", - /* 521 */ "compare_op ::= LIKE", - /* 522 */ "compare_op ::= NOT LIKE", - /* 523 */ "compare_op ::= MATCH", - /* 524 */ "compare_op ::= NMATCH", - /* 525 */ "compare_op ::= CONTAINS", - /* 526 */ "in_op ::= IN", - /* 527 */ "in_op ::= NOT IN", - /* 528 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 529 */ "boolean_value_expression ::= boolean_primary", - /* 530 */ "boolean_value_expression ::= NOT boolean_primary", - /* 531 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 532 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 533 */ "boolean_primary ::= predicate", - /* 534 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 535 */ "common_expression ::= expr_or_subquery", - /* 536 */ "common_expression ::= boolean_value_expression", - /* 537 */ "from_clause_opt ::=", - /* 538 */ "from_clause_opt ::= FROM table_reference_list", - /* 539 */ "table_reference_list ::= table_reference", - /* 540 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 541 */ "table_reference ::= table_primary", - /* 542 */ "table_reference ::= joined_table", - /* 543 */ "table_primary ::= table_name alias_opt", - /* 544 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 545 */ "table_primary ::= subquery alias_opt", - /* 546 */ "table_primary ::= parenthesized_joined_table", - /* 547 */ "alias_opt ::=", - /* 548 */ "alias_opt ::= table_alias", - /* 549 */ "alias_opt ::= AS table_alias", - /* 550 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 551 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 552 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 553 */ "join_type ::=", - /* 554 */ "join_type ::= INNER", - /* 555 */ "query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt", - /* 556 */ "hint_list ::=", - /* 557 */ "hint_list ::= NK_HINT", - /* 558 */ "tag_mode_opt ::=", - /* 559 */ "tag_mode_opt ::= TAGS", - /* 560 */ "set_quantifier_opt ::=", - /* 561 */ "set_quantifier_opt ::= DISTINCT", - /* 562 */ "set_quantifier_opt ::= ALL", - /* 563 */ "select_list ::= select_item", - /* 564 */ "select_list ::= select_list NK_COMMA select_item", - /* 565 */ "select_item ::= NK_STAR", - /* 566 */ "select_item ::= common_expression", - /* 567 */ "select_item ::= common_expression column_alias", - /* 568 */ "select_item ::= common_expression AS column_alias", - /* 569 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 570 */ "where_clause_opt ::=", - /* 571 */ "where_clause_opt ::= WHERE search_condition", - /* 572 */ "partition_by_clause_opt ::=", - /* 573 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 574 */ "partition_list ::= partition_item", - /* 575 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 576 */ "partition_item ::= expr_or_subquery", - /* 577 */ "partition_item ::= expr_or_subquery column_alias", - /* 578 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 579 */ "twindow_clause_opt ::=", - /* 580 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", - /* 581 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 582 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 583 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 584 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 585 */ "sliding_opt ::=", - /* 586 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", - /* 587 */ "interval_sliding_duration_literal ::= NK_VARIABLE", - /* 588 */ "interval_sliding_duration_literal ::= NK_STRING", - /* 589 */ "interval_sliding_duration_literal ::= NK_INTEGER", - /* 590 */ "fill_opt ::=", - /* 591 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 592 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", - /* 593 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", - /* 594 */ "fill_mode ::= NONE", - /* 595 */ "fill_mode ::= PREV", - /* 596 */ "fill_mode ::= NULL", - /* 597 */ "fill_mode ::= NULL_F", - /* 598 */ "fill_mode ::= LINEAR", - /* 599 */ "fill_mode ::= NEXT", - /* 600 */ "group_by_clause_opt ::=", - /* 601 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 602 */ "group_by_list ::= expr_or_subquery", - /* 603 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 604 */ "having_clause_opt ::=", - /* 605 */ "having_clause_opt ::= HAVING search_condition", - /* 606 */ "range_opt ::=", - /* 607 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 608 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", - /* 609 */ "every_opt ::=", - /* 610 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 611 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 612 */ "query_simple ::= query_specification", - /* 613 */ "query_simple ::= union_query_expression", - /* 614 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 615 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 616 */ "query_simple_or_subquery ::= query_simple", - /* 617 */ "query_simple_or_subquery ::= subquery", - /* 618 */ "query_or_subquery ::= query_expression", - /* 619 */ "query_or_subquery ::= subquery", - /* 620 */ "order_by_clause_opt ::=", - /* 621 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 622 */ "slimit_clause_opt ::=", - /* 623 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 624 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 625 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 626 */ "limit_clause_opt ::=", - /* 627 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 628 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 629 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 630 */ "subquery ::= NK_LP query_expression NK_RP", - /* 631 */ "subquery ::= NK_LP subquery NK_RP", - /* 632 */ "search_condition ::= common_expression", - /* 633 */ "sort_specification_list ::= sort_specification", - /* 634 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 635 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 636 */ "ordering_specification_opt ::=", - /* 637 */ "ordering_specification_opt ::= ASC", - /* 638 */ "ordering_specification_opt ::= DESC", - /* 639 */ "null_ordering_opt ::=", - /* 640 */ "null_ordering_opt ::= NULLS FIRST", - /* 641 */ "null_ordering_opt ::= NULLS LAST", + /* 71 */ "cmd ::= ALTER CLUSTER NK_STRING", + /* 72 */ "cmd ::= ALTER CLUSTER NK_STRING NK_STRING", + /* 73 */ "cmd ::= ALTER LOCAL NK_STRING", + /* 74 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING", + /* 75 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER", + /* 76 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER", + /* 77 */ "cmd ::= RESTORE QNODE ON DNODE NK_INTEGER", + /* 78 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER", + /* 79 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER", + /* 80 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER", + /* 81 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER", + /* 82 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER", + /* 83 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER", + /* 84 */ "cmd ::= RESTORE MNODE ON DNODE NK_INTEGER", + /* 85 */ "cmd ::= RESTORE VNODE ON DNODE NK_INTEGER", + /* 86 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options", + /* 87 */ "cmd ::= DROP DATABASE exists_opt db_name", + /* 88 */ "cmd ::= USE db_name", + /* 89 */ "cmd ::= ALTER DATABASE db_name alter_db_options", + /* 90 */ "cmd ::= FLUSH DATABASE db_name", + /* 91 */ "cmd ::= TRIM DATABASE db_name speed_opt", + /* 92 */ "cmd ::= COMPACT DATABASE db_name start_opt end_opt", + /* 93 */ "not_exists_opt ::= IF NOT EXISTS", + /* 94 */ "not_exists_opt ::=", + /* 95 */ "exists_opt ::= IF EXISTS", + /* 96 */ "exists_opt ::=", + /* 97 */ "db_options ::=", + /* 98 */ "db_options ::= db_options BUFFER NK_INTEGER", + /* 99 */ "db_options ::= db_options CACHEMODEL NK_STRING", + /* 100 */ "db_options ::= db_options CACHESIZE NK_INTEGER", + /* 101 */ "db_options ::= db_options COMP NK_INTEGER", + /* 102 */ "db_options ::= db_options DURATION NK_INTEGER", + /* 103 */ "db_options ::= db_options DURATION NK_VARIABLE", + /* 104 */ "db_options ::= db_options MAXROWS NK_INTEGER", + /* 105 */ "db_options ::= db_options MINROWS NK_INTEGER", + /* 106 */ "db_options ::= db_options KEEP integer_list", + /* 107 */ "db_options ::= db_options KEEP variable_list", + /* 108 */ "db_options ::= db_options PAGES NK_INTEGER", + /* 109 */ "db_options ::= db_options PAGESIZE NK_INTEGER", + /* 110 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER", + /* 111 */ "db_options ::= db_options PRECISION NK_STRING", + /* 112 */ "db_options ::= db_options REPLICA NK_INTEGER", + /* 113 */ "db_options ::= db_options VGROUPS NK_INTEGER", + /* 114 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER", + /* 115 */ "db_options ::= db_options RETENTIONS retention_list", + /* 116 */ "db_options ::= db_options SCHEMALESS NK_INTEGER", + /* 117 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER", + /* 118 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER", + /* 119 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER", + /* 120 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", + /* 121 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER", + /* 122 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", + /* 123 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER", + /* 124 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER", + /* 125 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER", + /* 126 */ "db_options ::= db_options TABLE_PREFIX signed", + /* 127 */ "db_options ::= db_options TABLE_SUFFIX signed", + /* 128 */ "db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER", + /* 129 */ "alter_db_options ::= alter_db_option", + /* 130 */ "alter_db_options ::= alter_db_options alter_db_option", + /* 131 */ "alter_db_option ::= BUFFER NK_INTEGER", + /* 132 */ "alter_db_option ::= CACHEMODEL NK_STRING", + /* 133 */ "alter_db_option ::= CACHESIZE NK_INTEGER", + /* 134 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER", + /* 135 */ "alter_db_option ::= KEEP integer_list", + /* 136 */ "alter_db_option ::= KEEP variable_list", + /* 137 */ "alter_db_option ::= PAGES NK_INTEGER", + /* 138 */ "alter_db_option ::= REPLICA NK_INTEGER", + /* 139 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", + /* 140 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", + /* 141 */ "alter_db_option ::= MINROWS NK_INTEGER", + /* 142 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER", + /* 143 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", + /* 144 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER", + /* 145 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", + /* 146 */ "alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER", + /* 147 */ "integer_list ::= NK_INTEGER", + /* 148 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", + /* 149 */ "variable_list ::= NK_VARIABLE", + /* 150 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", + /* 151 */ "retention_list ::= retention", + /* 152 */ "retention_list ::= retention_list NK_COMMA retention", + /* 153 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", + /* 154 */ "retention ::= NK_MINUS NK_COLON NK_VARIABLE", + /* 155 */ "speed_opt ::=", + /* 156 */ "speed_opt ::= BWLIMIT NK_INTEGER", + /* 157 */ "start_opt ::=", + /* 158 */ "start_opt ::= START WITH NK_INTEGER", + /* 159 */ "start_opt ::= START WITH NK_STRING", + /* 160 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", + /* 161 */ "end_opt ::=", + /* 162 */ "end_opt ::= END WITH NK_INTEGER", + /* 163 */ "end_opt ::= END WITH NK_STRING", + /* 164 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", + /* 165 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", + /* 166 */ "cmd ::= CREATE TABLE multi_create_clause", + /* 167 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", + /* 168 */ "cmd ::= DROP TABLE multi_drop_clause", + /* 169 */ "cmd ::= DROP STABLE exists_opt full_table_name", + /* 170 */ "cmd ::= ALTER TABLE alter_table_clause", + /* 171 */ "cmd ::= ALTER STABLE alter_table_clause", + /* 172 */ "alter_table_clause ::= full_table_name alter_table_options", + /* 173 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name", + /* 174 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", + /* 175 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", + /* 176 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", + /* 177 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", + /* 178 */ "alter_table_clause ::= full_table_name DROP TAG column_name", + /* 179 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", + /* 180 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", + /* 181 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal", + /* 182 */ "multi_create_clause ::= create_subtable_clause", + /* 183 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", + /* 184 */ "create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options", + /* 185 */ "multi_drop_clause ::= drop_table_clause", + /* 186 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", + /* 187 */ "drop_table_clause ::= exists_opt full_table_name", + /* 188 */ "specific_cols_opt ::=", + /* 189 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", + /* 190 */ "full_table_name ::= table_name", + /* 191 */ "full_table_name ::= db_name NK_DOT table_name", + /* 192 */ "column_def_list ::= column_def", + /* 193 */ "column_def_list ::= column_def_list NK_COMMA column_def", + /* 194 */ "column_def ::= column_name type_name", + /* 195 */ "type_name ::= BOOL", + /* 196 */ "type_name ::= TINYINT", + /* 197 */ "type_name ::= SMALLINT", + /* 198 */ "type_name ::= INT", + /* 199 */ "type_name ::= INTEGER", + /* 200 */ "type_name ::= BIGINT", + /* 201 */ "type_name ::= FLOAT", + /* 202 */ "type_name ::= DOUBLE", + /* 203 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", + /* 204 */ "type_name ::= TIMESTAMP", + /* 205 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", + /* 206 */ "type_name ::= TINYINT UNSIGNED", + /* 207 */ "type_name ::= SMALLINT UNSIGNED", + /* 208 */ "type_name ::= INT UNSIGNED", + /* 209 */ "type_name ::= BIGINT UNSIGNED", + /* 210 */ "type_name ::= JSON", + /* 211 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", + /* 212 */ "type_name ::= MEDIUMBLOB", + /* 213 */ "type_name ::= BLOB", + /* 214 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", + /* 215 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP", + /* 216 */ "type_name ::= DECIMAL", + /* 217 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", + /* 218 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 219 */ "tags_def_opt ::=", + /* 220 */ "tags_def_opt ::= tags_def", + /* 221 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", + /* 222 */ "table_options ::=", + /* 223 */ "table_options ::= table_options COMMENT NK_STRING", + /* 224 */ "table_options ::= table_options MAX_DELAY duration_list", + /* 225 */ "table_options ::= table_options WATERMARK duration_list", + /* 226 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", + /* 227 */ "table_options ::= table_options TTL NK_INTEGER", + /* 228 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", + /* 229 */ "table_options ::= table_options DELETE_MARK duration_list", + /* 230 */ "alter_table_options ::= alter_table_option", + /* 231 */ "alter_table_options ::= alter_table_options alter_table_option", + /* 232 */ "alter_table_option ::= COMMENT NK_STRING", + /* 233 */ "alter_table_option ::= TTL NK_INTEGER", + /* 234 */ "duration_list ::= duration_literal", + /* 235 */ "duration_list ::= duration_list NK_COMMA duration_literal", + /* 236 */ "rollup_func_list ::= rollup_func_name", + /* 237 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", + /* 238 */ "rollup_func_name ::= function_name", + /* 239 */ "rollup_func_name ::= FIRST", + /* 240 */ "rollup_func_name ::= LAST", + /* 241 */ "col_name_list ::= col_name", + /* 242 */ "col_name_list ::= col_name_list NK_COMMA col_name", + /* 243 */ "col_name ::= column_name", + /* 244 */ "cmd ::= SHOW DNODES", + /* 245 */ "cmd ::= SHOW USERS", + /* 246 */ "cmd ::= SHOW USER PRIVILEGES", + /* 247 */ "cmd ::= SHOW db_kind_opt DATABASES", + /* 248 */ "cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt", + /* 249 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", + /* 250 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", + /* 251 */ "cmd ::= SHOW MNODES", + /* 252 */ "cmd ::= SHOW QNODES", + /* 253 */ "cmd ::= SHOW FUNCTIONS", + /* 254 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", + /* 255 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name", + /* 256 */ "cmd ::= SHOW STREAMS", + /* 257 */ "cmd ::= SHOW ACCOUNTS", + /* 258 */ "cmd ::= SHOW APPS", + /* 259 */ "cmd ::= SHOW CONNECTIONS", + /* 260 */ "cmd ::= SHOW LICENCES", + /* 261 */ "cmd ::= SHOW GRANTS", + /* 262 */ "cmd ::= SHOW CREATE DATABASE db_name", + /* 263 */ "cmd ::= SHOW CREATE TABLE full_table_name", + /* 264 */ "cmd ::= SHOW CREATE STABLE full_table_name", + /* 265 */ "cmd ::= SHOW QUERIES", + /* 266 */ "cmd ::= SHOW SCORES", + /* 267 */ "cmd ::= SHOW TOPICS", + /* 268 */ "cmd ::= SHOW VARIABLES", + /* 269 */ "cmd ::= SHOW CLUSTER VARIABLES", + /* 270 */ "cmd ::= SHOW LOCAL VARIABLES", + /* 271 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", + /* 272 */ "cmd ::= SHOW BNODES", + /* 273 */ "cmd ::= SHOW SNODES", + /* 274 */ "cmd ::= SHOW CLUSTER", + /* 275 */ "cmd ::= SHOW TRANSACTIONS", + /* 276 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", + /* 277 */ "cmd ::= SHOW CONSUMERS", + /* 278 */ "cmd ::= SHOW SUBSCRIPTIONS", + /* 279 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", + /* 280 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", + /* 281 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", + /* 282 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", + /* 283 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", + /* 284 */ "cmd ::= SHOW VNODES", + /* 285 */ "cmd ::= SHOW db_name_cond_opt ALIVE", + /* 286 */ "cmd ::= SHOW CLUSTER ALIVE", + /* 287 */ "cmd ::= SHOW db_name_cond_opt VIEWS", + /* 288 */ "cmd ::= SHOW CREATE VIEW full_table_name", + /* 289 */ "cmd ::= SHOW COMPACTS", + /* 290 */ "cmd ::= SHOW COMPACT NK_INTEGER", + /* 291 */ "table_kind_db_name_cond_opt ::=", + /* 292 */ "table_kind_db_name_cond_opt ::= table_kind", + /* 293 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", + /* 294 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", + /* 295 */ "table_kind ::= NORMAL", + /* 296 */ "table_kind ::= CHILD", + /* 297 */ "db_name_cond_opt ::=", + /* 298 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 299 */ "like_pattern_opt ::=", + /* 300 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 301 */ "table_name_cond ::= table_name", + /* 302 */ "from_db_opt ::=", + /* 303 */ "from_db_opt ::= FROM db_name", + /* 304 */ "tag_list_opt ::=", + /* 305 */ "tag_list_opt ::= tag_item", + /* 306 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", + /* 307 */ "tag_item ::= TBNAME", + /* 308 */ "tag_item ::= QTAGS", + /* 309 */ "tag_item ::= column_name", + /* 310 */ "tag_item ::= column_name column_alias", + /* 311 */ "tag_item ::= column_name AS column_alias", + /* 312 */ "db_kind_opt ::=", + /* 313 */ "db_kind_opt ::= USER", + /* 314 */ "db_kind_opt ::= SYSTEM", + /* 315 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", + /* 316 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", + /* 317 */ "cmd ::= DROP INDEX exists_opt full_index_name", + /* 318 */ "full_index_name ::= index_name", + /* 319 */ "full_index_name ::= db_name NK_DOT index_name", + /* 320 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", + /* 321 */ "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", + /* 322 */ "func_list ::= func", + /* 323 */ "func_list ::= func_list NK_COMMA func", + /* 324 */ "func ::= sma_func_name NK_LP expression_list NK_RP", + /* 325 */ "sma_func_name ::= function_name", + /* 326 */ "sma_func_name ::= COUNT", + /* 327 */ "sma_func_name ::= FIRST", + /* 328 */ "sma_func_name ::= LAST", + /* 329 */ "sma_func_name ::= LAST_ROW", + /* 330 */ "sma_stream_opt ::=", + /* 331 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", + /* 332 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", + /* 333 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", + /* 334 */ "with_meta ::= AS", + /* 335 */ "with_meta ::= WITH META AS", + /* 336 */ "with_meta ::= ONLY META AS", + /* 337 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", + /* 338 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", + /* 339 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", + /* 340 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 341 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 342 */ "cmd ::= DESC full_table_name", + /* 343 */ "cmd ::= DESCRIBE full_table_name", + /* 344 */ "cmd ::= RESET QUERY CACHE", + /* 345 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", + /* 346 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", + /* 347 */ "analyze_opt ::=", + /* 348 */ "analyze_opt ::= ANALYZE", + /* 349 */ "explain_options ::=", + /* 350 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 351 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 352 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", + /* 353 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 354 */ "agg_func_opt ::=", + /* 355 */ "agg_func_opt ::= AGGREGATE", + /* 356 */ "bufsize_opt ::=", + /* 357 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 358 */ "language_opt ::=", + /* 359 */ "language_opt ::= LANGUAGE NK_STRING", + /* 360 */ "or_replace_opt ::=", + /* 361 */ "or_replace_opt ::= OR REPLACE", + /* 362 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", + /* 363 */ "cmd ::= DROP VIEW exists_opt full_view_name", + /* 364 */ "full_view_name ::= view_name", + /* 365 */ "full_view_name ::= db_name NK_DOT view_name", + /* 366 */ "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", + /* 367 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 368 */ "cmd ::= PAUSE STREAM exists_opt stream_name", + /* 369 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", + /* 370 */ "col_list_opt ::=", + /* 371 */ "col_list_opt ::= NK_LP col_name_list NK_RP", + /* 372 */ "tag_def_or_ref_opt ::=", + /* 373 */ "tag_def_or_ref_opt ::= tags_def", + /* 374 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP", + /* 375 */ "stream_options ::=", + /* 376 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 377 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 378 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 379 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 380 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", + /* 381 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", + /* 382 */ "stream_options ::= stream_options DELETE_MARK duration_literal", + /* 383 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", + /* 384 */ "subtable_opt ::=", + /* 385 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 386 */ "ignore_opt ::=", + /* 387 */ "ignore_opt ::= IGNORE UNTREATED", + /* 388 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 389 */ "cmd ::= KILL QUERY NK_STRING", + /* 390 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 391 */ "cmd ::= KILL COMPACT NK_INTEGER", + /* 392 */ "cmd ::= BALANCE VGROUP", + /* 393 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", + /* 394 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 395 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 396 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 397 */ "on_vgroup_id ::=", + /* 398 */ "on_vgroup_id ::= ON NK_INTEGER", + /* 399 */ "dnode_list ::= DNODE NK_INTEGER", + /* 400 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 401 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 402 */ "cmd ::= query_or_subquery", + /* 403 */ "cmd ::= insert_query", + /* 404 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 405 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", + /* 406 */ "literal ::= NK_INTEGER", + /* 407 */ "literal ::= NK_FLOAT", + /* 408 */ "literal ::= NK_STRING", + /* 409 */ "literal ::= NK_BOOL", + /* 410 */ "literal ::= TIMESTAMP NK_STRING", + /* 411 */ "literal ::= duration_literal", + /* 412 */ "literal ::= NULL", + /* 413 */ "literal ::= NK_QUESTION", + /* 414 */ "duration_literal ::= NK_VARIABLE", + /* 415 */ "signed ::= NK_INTEGER", + /* 416 */ "signed ::= NK_PLUS NK_INTEGER", + /* 417 */ "signed ::= NK_MINUS NK_INTEGER", + /* 418 */ "signed ::= NK_FLOAT", + /* 419 */ "signed ::= NK_PLUS NK_FLOAT", + /* 420 */ "signed ::= NK_MINUS NK_FLOAT", + /* 421 */ "signed_literal ::= signed", + /* 422 */ "signed_literal ::= NK_STRING", + /* 423 */ "signed_literal ::= NK_BOOL", + /* 424 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 425 */ "signed_literal ::= duration_literal", + /* 426 */ "signed_literal ::= NULL", + /* 427 */ "signed_literal ::= literal_func", + /* 428 */ "signed_literal ::= NK_QUESTION", + /* 429 */ "literal_list ::= signed_literal", + /* 430 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 431 */ "db_name ::= NK_ID", + /* 432 */ "table_name ::= NK_ID", + /* 433 */ "column_name ::= NK_ID", + /* 434 */ "function_name ::= NK_ID", + /* 435 */ "view_name ::= NK_ID", + /* 436 */ "table_alias ::= NK_ID", + /* 437 */ "column_alias ::= NK_ID", + /* 438 */ "column_alias ::= NK_ALIAS", + /* 439 */ "user_name ::= NK_ID", + /* 440 */ "topic_name ::= NK_ID", + /* 441 */ "stream_name ::= NK_ID", + /* 442 */ "cgroup_name ::= NK_ID", + /* 443 */ "index_name ::= NK_ID", + /* 444 */ "expr_or_subquery ::= expression", + /* 445 */ "expression ::= literal", + /* 446 */ "expression ::= pseudo_column", + /* 447 */ "expression ::= column_reference", + /* 448 */ "expression ::= function_expression", + /* 449 */ "expression ::= case_when_expression", + /* 450 */ "expression ::= NK_LP expression NK_RP", + /* 451 */ "expression ::= NK_PLUS expr_or_subquery", + /* 452 */ "expression ::= NK_MINUS expr_or_subquery", + /* 453 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 454 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 455 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 456 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 457 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 458 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 459 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 460 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 461 */ "expression_list ::= expr_or_subquery", + /* 462 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 463 */ "column_reference ::= column_name", + /* 464 */ "column_reference ::= table_name NK_DOT column_name", + /* 465 */ "column_reference ::= NK_ALIAS", + /* 466 */ "column_reference ::= table_name NK_DOT NK_ALIAS", + /* 467 */ "pseudo_column ::= ROWTS", + /* 468 */ "pseudo_column ::= TBNAME", + /* 469 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 470 */ "pseudo_column ::= QSTART", + /* 471 */ "pseudo_column ::= QEND", + /* 472 */ "pseudo_column ::= QDURATION", + /* 473 */ "pseudo_column ::= WSTART", + /* 474 */ "pseudo_column ::= WEND", + /* 475 */ "pseudo_column ::= WDURATION", + /* 476 */ "pseudo_column ::= IROWTS", + /* 477 */ "pseudo_column ::= ISFILLED", + /* 478 */ "pseudo_column ::= QTAGS", + /* 479 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 480 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 481 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 482 */ "function_expression ::= literal_func", + /* 483 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 484 */ "literal_func ::= NOW", + /* 485 */ "noarg_func ::= NOW", + /* 486 */ "noarg_func ::= TODAY", + /* 487 */ "noarg_func ::= TIMEZONE", + /* 488 */ "noarg_func ::= DATABASE", + /* 489 */ "noarg_func ::= CLIENT_VERSION", + /* 490 */ "noarg_func ::= SERVER_VERSION", + /* 491 */ "noarg_func ::= SERVER_STATUS", + /* 492 */ "noarg_func ::= CURRENT_USER", + /* 493 */ "noarg_func ::= USER", + /* 494 */ "star_func ::= COUNT", + /* 495 */ "star_func ::= FIRST", + /* 496 */ "star_func ::= LAST", + /* 497 */ "star_func ::= LAST_ROW", + /* 498 */ "star_func_para_list ::= NK_STAR", + /* 499 */ "star_func_para_list ::= other_para_list", + /* 500 */ "other_para_list ::= star_func_para", + /* 501 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 502 */ "star_func_para ::= expr_or_subquery", + /* 503 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 504 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 505 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 506 */ "when_then_list ::= when_then_expr", + /* 507 */ "when_then_list ::= when_then_list when_then_expr", + /* 508 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 509 */ "case_when_else_opt ::=", + /* 510 */ "case_when_else_opt ::= ELSE common_expression", + /* 511 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 512 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 513 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 514 */ "predicate ::= expr_or_subquery IS NULL", + /* 515 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 516 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 517 */ "compare_op ::= NK_LT", + /* 518 */ "compare_op ::= NK_GT", + /* 519 */ "compare_op ::= NK_LE", + /* 520 */ "compare_op ::= NK_GE", + /* 521 */ "compare_op ::= NK_NE", + /* 522 */ "compare_op ::= NK_EQ", + /* 523 */ "compare_op ::= LIKE", + /* 524 */ "compare_op ::= NOT LIKE", + /* 525 */ "compare_op ::= MATCH", + /* 526 */ "compare_op ::= NMATCH", + /* 527 */ "compare_op ::= CONTAINS", + /* 528 */ "in_op ::= IN", + /* 529 */ "in_op ::= NOT IN", + /* 530 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 531 */ "boolean_value_expression ::= boolean_primary", + /* 532 */ "boolean_value_expression ::= NOT boolean_primary", + /* 533 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 534 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 535 */ "boolean_primary ::= predicate", + /* 536 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 537 */ "common_expression ::= expr_or_subquery", + /* 538 */ "common_expression ::= boolean_value_expression", + /* 539 */ "from_clause_opt ::=", + /* 540 */ "from_clause_opt ::= FROM table_reference_list", + /* 541 */ "table_reference_list ::= table_reference", + /* 542 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 543 */ "table_reference ::= table_primary", + /* 544 */ "table_reference ::= joined_table", + /* 545 */ "table_primary ::= table_name alias_opt", + /* 546 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 547 */ "table_primary ::= subquery alias_opt", + /* 548 */ "table_primary ::= parenthesized_joined_table", + /* 549 */ "alias_opt ::=", + /* 550 */ "alias_opt ::= table_alias", + /* 551 */ "alias_opt ::= AS table_alias", + /* 552 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 553 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 554 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 555 */ "join_type ::=", + /* 556 */ "join_type ::= INNER", + /* 557 */ "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", + /* 558 */ "hint_list ::=", + /* 559 */ "hint_list ::= NK_HINT", + /* 560 */ "tag_mode_opt ::=", + /* 561 */ "tag_mode_opt ::= TAGS", + /* 562 */ "set_quantifier_opt ::=", + /* 563 */ "set_quantifier_opt ::= DISTINCT", + /* 564 */ "set_quantifier_opt ::= ALL", + /* 565 */ "select_list ::= select_item", + /* 566 */ "select_list ::= select_list NK_COMMA select_item", + /* 567 */ "select_item ::= NK_STAR", + /* 568 */ "select_item ::= common_expression", + /* 569 */ "select_item ::= common_expression column_alias", + /* 570 */ "select_item ::= common_expression AS column_alias", + /* 571 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 572 */ "where_clause_opt ::=", + /* 573 */ "where_clause_opt ::= WHERE search_condition", + /* 574 */ "partition_by_clause_opt ::=", + /* 575 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 576 */ "partition_list ::= partition_item", + /* 577 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 578 */ "partition_item ::= expr_or_subquery", + /* 579 */ "partition_item ::= expr_or_subquery column_alias", + /* 580 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 581 */ "twindow_clause_opt ::=", + /* 582 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", + /* 583 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 584 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 585 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 586 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 587 */ "sliding_opt ::=", + /* 588 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", + /* 589 */ "interval_sliding_duration_literal ::= NK_VARIABLE", + /* 590 */ "interval_sliding_duration_literal ::= NK_STRING", + /* 591 */ "interval_sliding_duration_literal ::= NK_INTEGER", + /* 592 */ "fill_opt ::=", + /* 593 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 594 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", + /* 595 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", + /* 596 */ "fill_mode ::= NONE", + /* 597 */ "fill_mode ::= PREV", + /* 598 */ "fill_mode ::= NULL", + /* 599 */ "fill_mode ::= NULL_F", + /* 600 */ "fill_mode ::= LINEAR", + /* 601 */ "fill_mode ::= NEXT", + /* 602 */ "group_by_clause_opt ::=", + /* 603 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 604 */ "group_by_list ::= expr_or_subquery", + /* 605 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 606 */ "having_clause_opt ::=", + /* 607 */ "having_clause_opt ::= HAVING search_condition", + /* 608 */ "range_opt ::=", + /* 609 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 610 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", + /* 611 */ "every_opt ::=", + /* 612 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 613 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 614 */ "query_simple ::= query_specification", + /* 615 */ "query_simple ::= union_query_expression", + /* 616 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 617 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 618 */ "query_simple_or_subquery ::= query_simple", + /* 619 */ "query_simple_or_subquery ::= subquery", + /* 620 */ "query_or_subquery ::= query_expression", + /* 621 */ "query_or_subquery ::= subquery", + /* 622 */ "order_by_clause_opt ::=", + /* 623 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 624 */ "slimit_clause_opt ::=", + /* 625 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 626 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 627 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 628 */ "limit_clause_opt ::=", + /* 629 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 630 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 631 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 632 */ "subquery ::= NK_LP query_expression NK_RP", + /* 633 */ "subquery ::= NK_LP subquery NK_RP", + /* 634 */ "search_condition ::= common_expression", + /* 635 */ "sort_specification_list ::= sort_specification", + /* 636 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 637 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 638 */ "ordering_specification_opt ::=", + /* 639 */ "ordering_specification_opt ::= ASC", + /* 640 */ "ordering_specification_opt ::= DESC", + /* 641 */ "null_ordering_opt ::=", + /* 642 */ "null_ordering_opt ::= NULLS FIRST", + /* 643 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -3250,9 +2912,7 @@ static void yy_destructor( case 503: /* query_simple_or_subquery */ case 505: /* sort_specification */ { -#line 7 "sql.y" nodesDestroyNode((yypminor->yy232)); -#line 3255 "sql.c" } break; case 348: /* account_options */ @@ -3262,9 +2922,7 @@ static void yy_destructor( case 425: /* with_meta */ case 434: /* bufsize_opt */ { -#line 54 "sql.y" -#line 3267 "sql.c" } break; case 352: /* ip_range_list */ @@ -3301,9 +2959,7 @@ static void yy_destructor( case 499: /* order_by_clause_opt */ case 504: /* sort_specification_list */ { -#line 85 "sql.y" nodesDestroyList((yypminor->yy88)); -#line 3306 "sql.c" } break; case 355: /* user_name */ @@ -3326,32 +2982,24 @@ static void yy_destructor( case 457: /* noarg_func */ case 475: /* alias_opt */ { -#line 812 "sql.y" -#line 3331 "sql.c" } break; case 356: /* sysinfo_opt */ { -#line 112 "sql.y" -#line 3338 "sql.c" } break; case 357: /* privileges */ case 360: /* priv_type_list */ case 361: /* priv_type */ { -#line 121 "sql.y" -#line 3347 "sql.c" } break; case 358: /* priv_level */ { -#line 138 "sql.y" -#line 3354 "sql.c" } break; case 367: /* force_opt */ @@ -3365,75 +3013,55 @@ static void yy_destructor( case 481: /* set_quantifier_opt */ case 482: /* tag_mode_opt */ { -#line 167 "sql.y" -#line 3370 "sql.c" } break; case 380: /* alter_db_option */ case 402: /* alter_table_option */ { -#line 265 "sql.y" -#line 3378 "sql.c" } break; case 392: /* type_name */ { -#line 388 "sql.y" -#line 3385 "sql.c" } break; case 407: /* db_kind_opt */ case 414: /* table_kind */ { -#line 553 "sql.y" -#line 3393 "sql.c" } break; case 408: /* table_kind_db_name_cond_opt */ { -#line 518 "sql.y" -#line 3400 "sql.c" } break; case 465: /* compare_op */ case 466: /* in_op */ { -#line 1002 "sql.y" -#line 3408 "sql.c" } break; case 478: /* join_type */ { -#line 1078 "sql.y" -#line 3415 "sql.c" } break; case 495: /* fill_mode */ { -#line 1169 "sql.y" -#line 3422 "sql.c" } break; case 506: /* ordering_specification_opt */ { -#line 1254 "sql.y" -#line 3429 "sql.c" } break; case 507: /* null_ordering_opt */ { -#line 1260 "sql.y" -#line 3436 "sql.c" } break; /********* End destructor definitions *****************************************/ @@ -3600,7 +3228,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 @@ -5053,21 +4733,15 @@ static YYACTIONTYPE yy_reduce( /********** Begin reduce actions **********************************************/ YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ -#line 50 "sql.y" { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } -#line 5058 "sql.c" yy_destructor(yypParser,348,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ -#line 51 "sql.y" { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } -#line 5064 "sql.c" yy_destructor(yypParser,349,&yymsp[0].minor); break; case 2: /* account_options ::= */ -#line 55 "sql.y" { } -#line 5070 "sql.c" break; case 3: /* account_options ::= account_options PPS literal */ case 4: /* account_options ::= account_options TSERIES literal */ yytestcase(yyruleno==4); @@ -5079,24 +4753,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,348,&yymsp[-2].minor); -#line 56 "sql.y" { } -#line 5084 "sql.c" yy_destructor(yypParser,350,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ { yy_destructor(yypParser,351,&yymsp[0].minor); -#line 68 "sql.y" { } -#line 5092 "sql.c" } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ { yy_destructor(yypParser,349,&yymsp[-1].minor); -#line 69 "sql.y" { } -#line 5099 "sql.c" yy_destructor(yypParser,351,&yymsp[0].minor); } break; @@ -5110,2403 +4778,1626 @@ static YYACTIONTYPE yy_reduce( case 21: /* alter_account_option ::= USERS literal */ yytestcase(yyruleno==21); case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); -#line 73 "sql.y" { } -#line 5115 "sql.c" yy_destructor(yypParser,350,&yymsp[0].minor); break; case 24: /* ip_range_list ::= NK_STRING */ -#line 86 "sql.y" { yylhsminor.yy88 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } -#line 5121 "sql.c" yymsp[0].minor.yy88 = yylhsminor.yy88; break; case 25: /* ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ -#line 87 "sql.y" { yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } -#line 5127 "sql.c" yymsp[-2].minor.yy88 = yylhsminor.yy88; break; case 26: /* white_list ::= HOST ip_range_list */ -#line 91 "sql.y" { yymsp[-1].minor.yy88 = yymsp[0].minor.yy88; } -#line 5133 "sql.c" break; case 27: /* white_list_opt ::= */ - case 186: /* specific_cols_opt ::= */ yytestcase(yyruleno==186); - case 217: /* tags_def_opt ::= */ yytestcase(yyruleno==217); - case 302: /* tag_list_opt ::= */ yytestcase(yyruleno==302); - case 368: /* col_list_opt ::= */ yytestcase(yyruleno==368); - case 370: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==370); - case 572: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==572); - case 600: /* group_by_clause_opt ::= */ yytestcase(yyruleno==600); - case 620: /* order_by_clause_opt ::= */ yytestcase(yyruleno==620); -#line 95 "sql.y" + case 188: /* specific_cols_opt ::= */ yytestcase(yyruleno==188); + case 219: /* tags_def_opt ::= */ yytestcase(yyruleno==219); + case 304: /* tag_list_opt ::= */ yytestcase(yyruleno==304); + case 370: /* col_list_opt ::= */ yytestcase(yyruleno==370); + case 372: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==372); + case 574: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==574); + case 602: /* group_by_clause_opt ::= */ yytestcase(yyruleno==602); + case 622: /* order_by_clause_opt ::= */ yytestcase(yyruleno==622); { yymsp[1].minor.yy88 = NULL; } -#line 5146 "sql.c" break; case 28: /* white_list_opt ::= white_list */ - case 218: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==218); - case 371: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==371); - case 497: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==497); -#line 96 "sql.y" + case 220: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==220); + case 373: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==373); + case 499: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==499); { yylhsminor.yy88 = yymsp[0].minor.yy88; } -#line 5154 "sql.c" yymsp[0].minor.yy88 = yylhsminor.yy88; break; case 29: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ -#line 100 "sql.y" { pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-4].minor.yy993, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy279); pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy88); } -#line 5163 "sql.c" break; case 30: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -#line 104 "sql.y" { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } -#line 5168 "sql.c" break; case 31: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ -#line 105 "sql.y" { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } -#line 5173 "sql.c" break; case 32: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ -#line 106 "sql.y" { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } -#line 5178 "sql.c" break; case 33: /* cmd ::= ALTER USER user_name ADD white_list */ -#line 107 "sql.y" { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy88); } -#line 5183 "sql.c" break; case 34: /* cmd ::= ALTER USER user_name DROP white_list */ -#line 108 "sql.y" { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy88); } -#line 5188 "sql.c" break; case 35: /* cmd ::= DROP USER user_name */ -#line 109 "sql.y" { pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy993); } -#line 5193 "sql.c" break; case 36: /* sysinfo_opt ::= */ -#line 113 "sql.y" { yymsp[1].minor.yy279 = 1; } -#line 5198 "sql.c" break; case 37: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ -#line 114 "sql.y" { yymsp[-1].minor.yy279 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } -#line 5203 "sql.c" break; case 38: /* cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ -#line 117 "sql.y" { pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy221, &yymsp[-3].minor.yy241, &yymsp[0].minor.yy993, yymsp[-2].minor.yy232); } -#line 5208 "sql.c" break; case 39: /* cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ -#line 118 "sql.y" { pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy221, &yymsp[-3].minor.yy241, &yymsp[0].minor.yy993, yymsp[-2].minor.yy232); } -#line 5213 "sql.c" break; case 40: /* privileges ::= ALL */ -#line 122 "sql.y" { yymsp[0].minor.yy221 = PRIVILEGE_TYPE_ALL; } -#line 5218 "sql.c" break; case 41: /* privileges ::= priv_type_list */ case 43: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==43); -#line 123 "sql.y" { yylhsminor.yy221 = yymsp[0].minor.yy221; } -#line 5224 "sql.c" yymsp[0].minor.yy221 = yylhsminor.yy221; break; case 42: /* privileges ::= SUBSCRIBE */ -#line 124 "sql.y" { yymsp[0].minor.yy221 = PRIVILEGE_TYPE_SUBSCRIBE; } -#line 5230 "sql.c" break; case 44: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -#line 129 "sql.y" { yylhsminor.yy221 = yymsp[-2].minor.yy221 | yymsp[0].minor.yy221; } -#line 5235 "sql.c" yymsp[-2].minor.yy221 = yylhsminor.yy221; break; case 45: /* priv_type ::= READ */ -#line 133 "sql.y" { yymsp[0].minor.yy221 = PRIVILEGE_TYPE_READ; } -#line 5241 "sql.c" break; case 46: /* priv_type ::= WRITE */ -#line 134 "sql.y" { yymsp[0].minor.yy221 = PRIVILEGE_TYPE_WRITE; } -#line 5246 "sql.c" break; case 47: /* priv_type ::= ALTER */ -#line 135 "sql.y" { yymsp[0].minor.yy221 = PRIVILEGE_TYPE_ALTER; } -#line 5251 "sql.c" break; case 48: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -#line 139 "sql.y" { yylhsminor.yy241.first = yymsp[-2].minor.yy0; yylhsminor.yy241.second = yymsp[0].minor.yy0; } -#line 5256 "sql.c" yymsp[-2].minor.yy241 = yylhsminor.yy241; break; case 49: /* priv_level ::= db_name NK_DOT NK_STAR */ -#line 140 "sql.y" { yylhsminor.yy241.first = yymsp[-2].minor.yy993; yylhsminor.yy241.second = yymsp[0].minor.yy0; } -#line 5262 "sql.c" yymsp[-2].minor.yy241 = yylhsminor.yy241; break; case 50: /* priv_level ::= db_name NK_DOT table_name */ -#line 141 "sql.y" { yylhsminor.yy241.first = yymsp[-2].minor.yy993; yylhsminor.yy241.second = yymsp[0].minor.yy993; } -#line 5268 "sql.c" yymsp[-2].minor.yy241 = yylhsminor.yy241; break; case 51: /* priv_level ::= topic_name */ -#line 142 "sql.y" { yylhsminor.yy241.first = yymsp[0].minor.yy993; yylhsminor.yy241.second = nil_token; } -#line 5274 "sql.c" yymsp[0].minor.yy241 = yylhsminor.yy241; break; case 52: /* with_opt ::= */ - case 155: /* start_opt ::= */ yytestcase(yyruleno==155); - case 159: /* end_opt ::= */ yytestcase(yyruleno==159); - case 297: /* like_pattern_opt ::= */ yytestcase(yyruleno==297); - case 382: /* subtable_opt ::= */ yytestcase(yyruleno==382); - case 507: /* case_when_else_opt ::= */ yytestcase(yyruleno==507); - case 537: /* from_clause_opt ::= */ yytestcase(yyruleno==537); - case 570: /* where_clause_opt ::= */ yytestcase(yyruleno==570); - case 579: /* twindow_clause_opt ::= */ yytestcase(yyruleno==579); - case 585: /* sliding_opt ::= */ yytestcase(yyruleno==585); - case 590: /* fill_opt ::= */ yytestcase(yyruleno==590); - case 604: /* having_clause_opt ::= */ yytestcase(yyruleno==604); - case 606: /* range_opt ::= */ yytestcase(yyruleno==606); - case 609: /* every_opt ::= */ yytestcase(yyruleno==609); - case 622: /* slimit_clause_opt ::= */ yytestcase(yyruleno==622); - case 626: /* limit_clause_opt ::= */ yytestcase(yyruleno==626); -#line 144 "sql.y" + case 157: /* start_opt ::= */ yytestcase(yyruleno==157); + case 161: /* end_opt ::= */ yytestcase(yyruleno==161); + case 299: /* like_pattern_opt ::= */ yytestcase(yyruleno==299); + case 384: /* subtable_opt ::= */ yytestcase(yyruleno==384); + case 509: /* case_when_else_opt ::= */ yytestcase(yyruleno==509); + case 539: /* from_clause_opt ::= */ yytestcase(yyruleno==539); + case 572: /* where_clause_opt ::= */ yytestcase(yyruleno==572); + case 581: /* twindow_clause_opt ::= */ yytestcase(yyruleno==581); + case 587: /* sliding_opt ::= */ yytestcase(yyruleno==587); + case 592: /* fill_opt ::= */ yytestcase(yyruleno==592); + case 606: /* having_clause_opt ::= */ yytestcase(yyruleno==606); + case 608: /* range_opt ::= */ yytestcase(yyruleno==608); + case 611: /* every_opt ::= */ yytestcase(yyruleno==611); + case 624: /* slimit_clause_opt ::= */ yytestcase(yyruleno==624); + case 628: /* limit_clause_opt ::= */ yytestcase(yyruleno==628); { yymsp[1].minor.yy232 = NULL; } -#line 5295 "sql.c" break; case 53: /* with_opt ::= WITH search_condition */ - case 538: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==538); - case 571: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==571); - case 605: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==605); -#line 145 "sql.y" + case 540: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==540); + case 573: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==573); + case 607: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==607); { yymsp[-1].minor.yy232 = yymsp[0].minor.yy232; } -#line 5303 "sql.c" break; case 54: /* cmd ::= CREATE DNODE dnode_endpoint */ -#line 148 "sql.y" { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy993, NULL); } -#line 5308 "sql.c" break; case 55: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -#line 149 "sql.y" { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0); } -#line 5313 "sql.c" break; case 56: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ -#line 150 "sql.y" { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy985, false); } -#line 5318 "sql.c" break; case 57: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -#line 151 "sql.y" { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy993, yymsp[0].minor.yy985, false); } -#line 5323 "sql.c" break; case 58: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ -#line 152 "sql.y" { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy985); } -#line 5328 "sql.c" break; case 59: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ -#line 153 "sql.y" { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy993, false, yymsp[0].minor.yy985); } -#line 5333 "sql.c" break; case 60: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ -#line 154 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } -#line 5338 "sql.c" break; case 61: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ -#line 155 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 5343 "sql.c" break; case 62: /* cmd ::= ALTER ALL DNODES NK_STRING */ -#line 156 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); } -#line 5348 "sql.c" break; case 63: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ -#line 157 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 5353 "sql.c" break; case 64: /* cmd ::= RESTORE DNODE NK_INTEGER */ -#line 158 "sql.y" { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_DNODE_STMT, &yymsp[0].minor.yy0); } -#line 5358 "sql.c" break; case 65: /* dnode_endpoint ::= NK_STRING */ case 66: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==66); case 67: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==67); - case 324: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==324); - case 325: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==325); - case 326: /* sma_func_name ::= LAST */ yytestcase(yyruleno==326); - case 327: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==327); - case 429: /* db_name ::= NK_ID */ yytestcase(yyruleno==429); - case 430: /* table_name ::= NK_ID */ yytestcase(yyruleno==430); - case 431: /* column_name ::= NK_ID */ yytestcase(yyruleno==431); - case 432: /* function_name ::= NK_ID */ yytestcase(yyruleno==432); - case 433: /* view_name ::= NK_ID */ yytestcase(yyruleno==433); - case 434: /* table_alias ::= NK_ID */ yytestcase(yyruleno==434); - case 435: /* column_alias ::= NK_ID */ yytestcase(yyruleno==435); - case 436: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==436); - case 437: /* user_name ::= NK_ID */ yytestcase(yyruleno==437); - case 438: /* topic_name ::= NK_ID */ yytestcase(yyruleno==438); - case 439: /* stream_name ::= NK_ID */ yytestcase(yyruleno==439); - case 440: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==440); - case 441: /* index_name ::= NK_ID */ yytestcase(yyruleno==441); - case 483: /* noarg_func ::= NOW */ yytestcase(yyruleno==483); - case 484: /* noarg_func ::= TODAY */ yytestcase(yyruleno==484); - case 485: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==485); - case 486: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==486); - case 487: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==487); - case 488: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==488); - case 489: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==489); - case 490: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==490); - case 491: /* noarg_func ::= USER */ yytestcase(yyruleno==491); - case 492: /* star_func ::= COUNT */ yytestcase(yyruleno==492); - case 493: /* star_func ::= FIRST */ yytestcase(yyruleno==493); - case 494: /* star_func ::= LAST */ yytestcase(yyruleno==494); - case 495: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==495); -#line 162 "sql.y" + case 326: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==326); + case 327: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==327); + case 328: /* sma_func_name ::= LAST */ yytestcase(yyruleno==328); + case 329: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==329); + case 431: /* db_name ::= NK_ID */ yytestcase(yyruleno==431); + case 432: /* table_name ::= NK_ID */ yytestcase(yyruleno==432); + case 433: /* column_name ::= NK_ID */ yytestcase(yyruleno==433); + case 434: /* function_name ::= NK_ID */ yytestcase(yyruleno==434); + case 435: /* view_name ::= NK_ID */ yytestcase(yyruleno==435); + case 436: /* table_alias ::= NK_ID */ yytestcase(yyruleno==436); + case 437: /* column_alias ::= NK_ID */ yytestcase(yyruleno==437); + case 438: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==438); + case 439: /* user_name ::= NK_ID */ yytestcase(yyruleno==439); + case 440: /* topic_name ::= NK_ID */ yytestcase(yyruleno==440); + case 441: /* stream_name ::= NK_ID */ yytestcase(yyruleno==441); + case 442: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==442); + case 443: /* index_name ::= NK_ID */ yytestcase(yyruleno==443); + case 485: /* noarg_func ::= NOW */ yytestcase(yyruleno==485); + case 486: /* noarg_func ::= TODAY */ yytestcase(yyruleno==486); + case 487: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==487); + case 488: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==488); + case 489: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==489); + case 490: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==490); + case 491: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==491); + case 492: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==492); + case 493: /* noarg_func ::= USER */ yytestcase(yyruleno==493); + case 494: /* star_func ::= COUNT */ yytestcase(yyruleno==494); + case 495: /* star_func ::= FIRST */ yytestcase(yyruleno==495); + case 496: /* star_func ::= LAST */ yytestcase(yyruleno==496); + case 497: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==497); { yylhsminor.yy993 = yymsp[0].minor.yy0; } -#line 5395 "sql.c" yymsp[0].minor.yy993 = yylhsminor.yy993; break; case 68: /* force_opt ::= */ - case 92: /* not_exists_opt ::= */ yytestcase(yyruleno==92); - case 94: /* exists_opt ::= */ yytestcase(yyruleno==94); - case 345: /* analyze_opt ::= */ yytestcase(yyruleno==345); - case 352: /* agg_func_opt ::= */ yytestcase(yyruleno==352); - case 358: /* or_replace_opt ::= */ yytestcase(yyruleno==358); - case 384: /* ignore_opt ::= */ yytestcase(yyruleno==384); - case 558: /* tag_mode_opt ::= */ yytestcase(yyruleno==558); - case 560: /* set_quantifier_opt ::= */ yytestcase(yyruleno==560); -#line 168 "sql.y" + case 94: /* not_exists_opt ::= */ yytestcase(yyruleno==94); + case 96: /* exists_opt ::= */ yytestcase(yyruleno==96); + case 347: /* analyze_opt ::= */ yytestcase(yyruleno==347); + case 354: /* agg_func_opt ::= */ yytestcase(yyruleno==354); + case 360: /* or_replace_opt ::= */ yytestcase(yyruleno==360); + case 386: /* ignore_opt ::= */ yytestcase(yyruleno==386); + case 560: /* tag_mode_opt ::= */ yytestcase(yyruleno==560); + case 562: /* set_quantifier_opt ::= */ yytestcase(yyruleno==562); { yymsp[1].minor.yy985 = false; } -#line 5409 "sql.c" break; case 69: /* force_opt ::= FORCE */ case 70: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==70); - case 346: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==346); - case 353: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==353); - case 559: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==559); - case 561: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==561); -#line 169 "sql.y" + case 348: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==348); + case 355: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==355); + case 561: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==561); + case 563: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==563); { yymsp[0].minor.yy985 = true; } -#line 5419 "sql.c" break; - case 71: /* cmd ::= ALTER LOCAL NK_STRING */ -#line 176 "sql.y" + case 71: /* cmd ::= ALTER CLUSTER NK_STRING */ +{ pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[0].minor.yy0, NULL); } + break; + case 72: /* cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ +{ pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } + break; + case 73: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } -#line 5424 "sql.c" break; - case 72: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */ -#line 177 "sql.y" + case 74: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 5429 "sql.c" break; - case 73: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ -#line 180 "sql.y" + case 75: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); } -#line 5434 "sql.c" break; - case 74: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */ -#line 181 "sql.y" + case 76: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); } -#line 5439 "sql.c" break; - case 75: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ -#line 182 "sql.y" + case 77: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_QNODE_STMT, &yymsp[0].minor.yy0); } -#line 5444 "sql.c" break; - case 76: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ -#line 185 "sql.y" + case 78: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); } -#line 5449 "sql.c" break; - case 77: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */ -#line 186 "sql.y" + case 79: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); } -#line 5454 "sql.c" break; - case 78: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ -#line 189 "sql.y" + case 80: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); } -#line 5459 "sql.c" break; - case 79: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */ -#line 190 "sql.y" + case 81: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); } -#line 5464 "sql.c" break; - case 80: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ -#line 193 "sql.y" + case 82: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); } -#line 5469 "sql.c" break; - case 81: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */ -#line 194 "sql.y" + case 83: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } -#line 5474 "sql.c" break; - case 82: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ -#line 195 "sql.y" + case 84: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_MNODE_STMT, &yymsp[0].minor.yy0); } -#line 5479 "sql.c" break; - case 83: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ -#line 198 "sql.y" + case 85: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_VNODE_STMT, &yymsp[0].minor.yy0); } -#line 5484 "sql.c" break; - case 84: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -#line 201 "sql.y" + case 86: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ { pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy985, &yymsp[-1].minor.yy993, yymsp[0].minor.yy232); } -#line 5489 "sql.c" break; - case 85: /* cmd ::= DROP DATABASE exists_opt db_name */ -#line 202 "sql.y" + case 87: /* cmd ::= DROP DATABASE exists_opt db_name */ { pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); } -#line 5494 "sql.c" break; - case 86: /* cmd ::= USE db_name */ -#line 203 "sql.y" + case 88: /* cmd ::= USE db_name */ { pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy993); } -#line 5499 "sql.c" break; - case 87: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -#line 204 "sql.y" + case 89: /* cmd ::= ALTER DATABASE db_name alter_db_options */ { pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy993, yymsp[0].minor.yy232); } -#line 5504 "sql.c" break; - case 88: /* cmd ::= FLUSH DATABASE db_name */ -#line 205 "sql.y" + case 90: /* cmd ::= FLUSH DATABASE db_name */ { pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy993); } -#line 5509 "sql.c" break; - case 89: /* cmd ::= TRIM DATABASE db_name speed_opt */ -#line 206 "sql.y" + case 91: /* cmd ::= TRIM DATABASE db_name speed_opt */ { pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy993, yymsp[0].minor.yy92); } -#line 5514 "sql.c" break; - case 90: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ -#line 207 "sql.y" + case 92: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ { pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy993, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } -#line 5519 "sql.c" break; - case 91: /* not_exists_opt ::= IF NOT EXISTS */ -#line 211 "sql.y" + case 93: /* not_exists_opt ::= IF NOT EXISTS */ { yymsp[-2].minor.yy985 = true; } -#line 5524 "sql.c" break; - case 93: /* exists_opt ::= IF EXISTS */ - case 359: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==359); - case 385: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==385); -#line 216 "sql.y" + case 95: /* exists_opt ::= IF EXISTS */ + case 361: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==361); + case 387: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==387); { yymsp[-1].minor.yy985 = true; } -#line 5531 "sql.c" break; - case 95: /* db_options ::= */ -#line 219 "sql.y" + case 97: /* db_options ::= */ { yymsp[1].minor.yy232 = createDefaultDatabaseOptions(pCxt); } -#line 5536 "sql.c" break; - case 96: /* db_options ::= db_options BUFFER NK_INTEGER */ -#line 220 "sql.y" + case 98: /* db_options ::= db_options BUFFER NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } -#line 5541 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 97: /* db_options ::= db_options CACHEMODEL NK_STRING */ -#line 221 "sql.y" + case 99: /* db_options ::= db_options CACHEMODEL NK_STRING */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } -#line 5547 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 98: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -#line 222 "sql.y" + case 100: /* db_options ::= db_options CACHESIZE NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } -#line 5553 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 99: /* db_options ::= db_options COMP NK_INTEGER */ -#line 223 "sql.y" + case 101: /* db_options ::= db_options COMP NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_COMP, &yymsp[0].minor.yy0); } -#line 5559 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 100: /* db_options ::= db_options DURATION NK_INTEGER */ - case 101: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==101); -#line 224 "sql.y" + case 102: /* db_options ::= db_options DURATION NK_INTEGER */ + case 103: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==103); { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } -#line 5566 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 102: /* db_options ::= db_options MAXROWS NK_INTEGER */ -#line 226 "sql.y" + case 104: /* db_options ::= db_options MAXROWS NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } -#line 5572 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 103: /* db_options ::= db_options MINROWS NK_INTEGER */ -#line 227 "sql.y" + case 105: /* db_options ::= db_options MINROWS NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } -#line 5578 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 104: /* db_options ::= db_options KEEP integer_list */ - case 105: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==105); -#line 228 "sql.y" + case 106: /* db_options ::= db_options KEEP integer_list */ + case 107: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==107); { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_KEEP, yymsp[0].minor.yy88); } -#line 5585 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 106: /* db_options ::= db_options PAGES NK_INTEGER */ -#line 230 "sql.y" + case 108: /* db_options ::= db_options PAGES NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } -#line 5591 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 107: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -#line 231 "sql.y" + case 109: /* db_options ::= db_options PAGESIZE NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } -#line 5597 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 108: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -#line 232 "sql.y" + case 110: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } -#line 5603 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 109: /* db_options ::= db_options PRECISION NK_STRING */ -#line 233 "sql.y" + case 111: /* db_options ::= db_options PRECISION NK_STRING */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } -#line 5609 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 110: /* db_options ::= db_options REPLICA NK_INTEGER */ -#line 234 "sql.y" + case 112: /* db_options ::= db_options REPLICA NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } -#line 5615 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 111: /* db_options ::= db_options VGROUPS NK_INTEGER */ -#line 236 "sql.y" + case 113: /* db_options ::= db_options VGROUPS NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } -#line 5621 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 112: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -#line 237 "sql.y" + case 114: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } -#line 5627 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 113: /* db_options ::= db_options RETENTIONS retention_list */ -#line 238 "sql.y" + case 115: /* db_options ::= db_options RETENTIONS retention_list */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_RETENTIONS, yymsp[0].minor.yy88); } -#line 5633 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 114: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -#line 239 "sql.y" + case 116: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } -#line 5639 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 115: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -#line 240 "sql.y" + case 117: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL, &yymsp[0].minor.yy0); } -#line 5645 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 116: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -#line 241 "sql.y" + case 118: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } -#line 5651 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 117: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -#line 242 "sql.y" + case 119: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } -#line 5657 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 118: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ -#line 243 "sql.y" + case 120: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-3].minor.yy232, DB_OPTION_WAL_RETENTION_PERIOD, &t); } -#line 5667 "sql.c" yymsp[-3].minor.yy232 = yylhsminor.yy232; break; - case 119: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -#line 248 "sql.y" + case 121: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } -#line 5673 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 120: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ -#line 249 "sql.y" + case 122: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-3].minor.yy232, DB_OPTION_WAL_RETENTION_SIZE, &t); } -#line 5683 "sql.c" yymsp[-3].minor.yy232 = yylhsminor.yy232; break; - case 121: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -#line 254 "sql.y" + case 123: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } -#line 5689 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 122: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -#line 255 "sql.y" + case 124: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } -#line 5695 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 123: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -#line 256 "sql.y" + case 125: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } -#line 5701 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 124: /* db_options ::= db_options TABLE_PREFIX signed */ -#line 257 "sql.y" + case 126: /* db_options ::= db_options TABLE_PREFIX signed */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy232); } -#line 5707 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 125: /* db_options ::= db_options TABLE_SUFFIX signed */ -#line 258 "sql.y" + case 127: /* db_options ::= db_options TABLE_SUFFIX signed */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy232); } -#line 5713 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 126: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ -#line 259 "sql.y" + case 128: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ { yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } -#line 5719 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 127: /* alter_db_options ::= alter_db_option */ -#line 261 "sql.y" + case 129: /* alter_db_options ::= alter_db_option */ { yylhsminor.yy232 = createAlterDatabaseOptions(pCxt); yylhsminor.yy232 = setAlterDatabaseOption(pCxt, yylhsminor.yy232, &yymsp[0].minor.yy117); } -#line 5725 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 128: /* alter_db_options ::= alter_db_options alter_db_option */ -#line 262 "sql.y" + case 130: /* alter_db_options ::= alter_db_options alter_db_option */ { yylhsminor.yy232 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy232, &yymsp[0].minor.yy117); } -#line 5731 "sql.c" yymsp[-1].minor.yy232 = yylhsminor.yy232; break; - case 129: /* alter_db_option ::= BUFFER NK_INTEGER */ -#line 266 "sql.y" + case 131: /* alter_db_option ::= BUFFER NK_INTEGER */ { yymsp[-1].minor.yy117.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5737 "sql.c" break; - case 130: /* alter_db_option ::= CACHEMODEL NK_STRING */ -#line 267 "sql.y" + case 132: /* alter_db_option ::= CACHEMODEL NK_STRING */ { yymsp[-1].minor.yy117.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5742 "sql.c" break; - case 131: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -#line 268 "sql.y" + case 133: /* alter_db_option ::= CACHESIZE NK_INTEGER */ { yymsp[-1].minor.yy117.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5747 "sql.c" break; - case 132: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -#line 269 "sql.y" + case 134: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ { yymsp[-1].minor.yy117.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5752 "sql.c" break; - case 133: /* alter_db_option ::= KEEP integer_list */ - case 134: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==134); -#line 270 "sql.y" + case 135: /* alter_db_option ::= KEEP integer_list */ + case 136: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==136); { yymsp[-1].minor.yy117.type = DB_OPTION_KEEP; yymsp[-1].minor.yy117.pList = yymsp[0].minor.yy88; } -#line 5758 "sql.c" break; - case 135: /* alter_db_option ::= PAGES NK_INTEGER */ -#line 272 "sql.y" + case 137: /* alter_db_option ::= PAGES NK_INTEGER */ { yymsp[-1].minor.yy117.type = DB_OPTION_PAGES; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5763 "sql.c" break; - case 136: /* alter_db_option ::= REPLICA NK_INTEGER */ -#line 273 "sql.y" + case 138: /* alter_db_option ::= REPLICA NK_INTEGER */ { yymsp[-1].minor.yy117.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5768 "sql.c" break; - case 137: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -#line 275 "sql.y" + case 139: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ { yymsp[-1].minor.yy117.type = DB_OPTION_WAL; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5773 "sql.c" break; - case 138: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -#line 276 "sql.y" + case 140: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ { yymsp[-1].minor.yy117.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5778 "sql.c" break; - case 139: /* alter_db_option ::= MINROWS NK_INTEGER */ -#line 277 "sql.y" + case 141: /* alter_db_option ::= MINROWS NK_INTEGER */ { yymsp[-1].minor.yy117.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5783 "sql.c" break; - case 140: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ -#line 278 "sql.y" + case 142: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ { yymsp[-1].minor.yy117.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5788 "sql.c" break; - case 141: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ -#line 279 "sql.y" + case 143: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yymsp[-2].minor.yy117.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy117.val = t; } -#line 5797 "sql.c" break; - case 142: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ -#line 284 "sql.y" + case 144: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ { yymsp[-1].minor.yy117.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5802 "sql.c" break; - case 143: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ -#line 285 "sql.y" + case 145: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yymsp[-2].minor.yy117.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy117.val = t; } -#line 5811 "sql.c" break; - case 144: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ -#line 290 "sql.y" + case 146: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ { yymsp[-1].minor.yy117.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 5816 "sql.c" break; - case 145: /* integer_list ::= NK_INTEGER */ -#line 294 "sql.y" + case 147: /* integer_list ::= NK_INTEGER */ { yylhsminor.yy88 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 5821 "sql.c" yymsp[0].minor.yy88 = yylhsminor.yy88; break; - case 146: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 398: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==398); -#line 295 "sql.y" + case 148: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ + case 400: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==400); { yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 5828 "sql.c" yymsp[-2].minor.yy88 = yylhsminor.yy88; break; - case 147: /* variable_list ::= NK_VARIABLE */ -#line 299 "sql.y" + case 149: /* variable_list ::= NK_VARIABLE */ { yylhsminor.yy88 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 5834 "sql.c" yymsp[0].minor.yy88 = yylhsminor.yy88; break; - case 148: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -#line 300 "sql.y" + case 150: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ { yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 5840 "sql.c" yymsp[-2].minor.yy88 = yylhsminor.yy88; break; - case 149: /* retention_list ::= retention */ - case 180: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==180); - case 183: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==183); - case 190: /* column_def_list ::= column_def */ yytestcase(yyruleno==190); - case 234: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==234); - case 239: /* col_name_list ::= col_name */ yytestcase(yyruleno==239); - case 303: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==303); - case 320: /* func_list ::= func */ yytestcase(yyruleno==320); - case 427: /* literal_list ::= signed_literal */ yytestcase(yyruleno==427); - case 498: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==498); - case 504: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==504); - case 563: /* select_list ::= select_item */ yytestcase(yyruleno==563); - case 574: /* partition_list ::= partition_item */ yytestcase(yyruleno==574); - case 633: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==633); -#line 304 "sql.y" + case 151: /* retention_list ::= retention */ + case 182: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==182); + case 185: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==185); + case 192: /* column_def_list ::= column_def */ yytestcase(yyruleno==192); + case 236: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==236); + case 241: /* col_name_list ::= col_name */ yytestcase(yyruleno==241); + case 305: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==305); + case 322: /* func_list ::= func */ yytestcase(yyruleno==322); + case 429: /* literal_list ::= signed_literal */ yytestcase(yyruleno==429); + case 500: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==500); + case 506: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==506); + case 565: /* select_list ::= select_item */ yytestcase(yyruleno==565); + case 576: /* partition_list ::= partition_item */ yytestcase(yyruleno==576); + case 635: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==635); { yylhsminor.yy88 = createNodeList(pCxt, yymsp[0].minor.yy232); } -#line 5859 "sql.c" yymsp[0].minor.yy88 = yylhsminor.yy88; break; - case 150: /* retention_list ::= retention_list NK_COMMA retention */ - case 184: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==184); - case 191: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==191); - case 235: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==235); - case 240: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==240); - case 304: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==304); - case 321: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==321); - case 428: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==428); - case 499: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==499); - case 564: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==564); - case 575: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==575); - case 634: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==634); -#line 305 "sql.y" + case 152: /* retention_list ::= retention_list NK_COMMA retention */ + case 186: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==186); + case 193: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==193); + case 237: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==237); + case 242: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==242); + case 306: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==306); + case 323: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==323); + case 430: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==430); + case 501: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==501); + case 566: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==566); + case 577: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==577); + case 636: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==636); { yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, yymsp[0].minor.yy232); } -#line 5876 "sql.c" yymsp[-2].minor.yy88 = yylhsminor.yy88; break; - case 151: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - case 152: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==152); -#line 307 "sql.y" + case 153: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + case 154: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==154); { yylhsminor.yy232 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 5883 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 153: /* speed_opt ::= */ - case 354: /* bufsize_opt ::= */ yytestcase(yyruleno==354); -#line 312 "sql.y" + case 155: /* speed_opt ::= */ + case 356: /* bufsize_opt ::= */ yytestcase(yyruleno==356); { yymsp[1].minor.yy92 = 0; } -#line 5890 "sql.c" break; - case 154: /* speed_opt ::= BWLIMIT NK_INTEGER */ - case 355: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==355); -#line 313 "sql.y" + case 156: /* speed_opt ::= BWLIMIT NK_INTEGER */ + case 357: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==357); { yymsp[-1].minor.yy92 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } -#line 5896 "sql.c" break; - case 156: /* start_opt ::= START WITH NK_INTEGER */ - case 160: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==160); -#line 316 "sql.y" + case 158: /* start_opt ::= START WITH NK_INTEGER */ + case 162: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==162); { yymsp[-2].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } -#line 5902 "sql.c" break; - case 157: /* start_opt ::= START WITH NK_STRING */ - case 161: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==161); -#line 317 "sql.y" + case 159: /* start_opt ::= START WITH NK_STRING */ + case 163: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==163); { yymsp[-2].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } -#line 5908 "sql.c" break; - case 158: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ - case 162: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==162); -#line 318 "sql.y" + case 160: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ + case 164: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==164); { yymsp[-3].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } -#line 5914 "sql.c" break; - case 163: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - case 165: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==165); -#line 327 "sql.y" + 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); { pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy985, yymsp[-5].minor.yy232, yymsp[-3].minor.yy88, yymsp[-1].minor.yy88, yymsp[0].minor.yy232); } -#line 5920 "sql.c" break; - case 164: /* cmd ::= CREATE TABLE multi_create_clause */ -#line 328 "sql.y" + case 166: /* cmd ::= CREATE TABLE multi_create_clause */ { pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy88); } -#line 5925 "sql.c" break; - case 166: /* cmd ::= DROP TABLE multi_drop_clause */ -#line 331 "sql.y" + case 168: /* cmd ::= DROP TABLE multi_drop_clause */ { pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy88); } -#line 5930 "sql.c" break; - case 167: /* cmd ::= DROP STABLE exists_opt full_table_name */ -#line 332 "sql.y" + case 169: /* cmd ::= DROP STABLE exists_opt full_table_name */ { pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy232); } -#line 5935 "sql.c" break; - case 168: /* cmd ::= ALTER TABLE alter_table_clause */ - case 400: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==400); - case 401: /* cmd ::= insert_query */ yytestcase(yyruleno==401); -#line 334 "sql.y" + case 170: /* cmd ::= ALTER TABLE alter_table_clause */ + case 402: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==402); + case 403: /* cmd ::= insert_query */ yytestcase(yyruleno==403); { pCxt->pRootNode = yymsp[0].minor.yy232; } -#line 5942 "sql.c" break; - case 169: /* cmd ::= ALTER STABLE alter_table_clause */ -#line 335 "sql.y" + case 171: /* cmd ::= ALTER STABLE alter_table_clause */ { pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy232); } -#line 5947 "sql.c" break; - case 170: /* alter_table_clause ::= full_table_name alter_table_options */ -#line 337 "sql.y" + case 172: /* alter_table_clause ::= full_table_name alter_table_options */ { yylhsminor.yy232 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } -#line 5952 "sql.c" yymsp[-1].minor.yy232 = yylhsminor.yy232; break; - case 171: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -#line 339 "sql.y" + case 173: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ { yylhsminor.yy232 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400); } -#line 5958 "sql.c" yymsp[-4].minor.yy232 = yylhsminor.yy232; break; - case 172: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -#line 340 "sql.y" + case 174: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ { yylhsminor.yy232 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy232, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy993); } -#line 5964 "sql.c" yymsp[-3].minor.yy232 = yylhsminor.yy232; break; - case 173: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -#line 342 "sql.y" + case 175: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ { yylhsminor.yy232 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400); } -#line 5970 "sql.c" yymsp[-4].minor.yy232 = yylhsminor.yy232; break; - case 174: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -#line 344 "sql.y" + case 176: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ { yylhsminor.yy232 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy993, &yymsp[0].minor.yy993); } -#line 5976 "sql.c" yymsp[-4].minor.yy232 = yylhsminor.yy232; break; - case 175: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -#line 346 "sql.y" + case 177: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ { yylhsminor.yy232 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400); } -#line 5982 "sql.c" yymsp[-4].minor.yy232 = yylhsminor.yy232; break; - case 176: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -#line 347 "sql.y" + case 178: /* alter_table_clause ::= full_table_name DROP TAG column_name */ { yylhsminor.yy232 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy232, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy993); } -#line 5988 "sql.c" yymsp[-3].minor.yy232 = yylhsminor.yy232; break; - case 177: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -#line 349 "sql.y" + case 179: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ { yylhsminor.yy232 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400); } -#line 5994 "sql.c" yymsp[-4].minor.yy232 = yylhsminor.yy232; break; - case 178: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -#line 351 "sql.y" + case 180: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ { yylhsminor.yy232 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy993, &yymsp[0].minor.yy993); } -#line 6000 "sql.c" yymsp[-4].minor.yy232 = yylhsminor.yy232; break; - case 179: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -#line 353 "sql.y" + case 181: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ { yylhsminor.yy232 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy232, &yymsp[-2].minor.yy993, yymsp[0].minor.yy232); } -#line 6006 "sql.c" yymsp[-5].minor.yy232 = yylhsminor.yy232; break; - case 181: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 505: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==505); -#line 358 "sql.y" + case 183: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ + case 507: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==507); { yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-1].minor.yy88, yymsp[0].minor.yy232); } -#line 6013 "sql.c" yymsp[-1].minor.yy88 = yylhsminor.yy88; break; - case 182: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ -#line 362 "sql.y" + case 184: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ { yylhsminor.yy232 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy985, yymsp[-8].minor.yy232, yymsp[-6].minor.yy232, yymsp[-5].minor.yy88, yymsp[-2].minor.yy88, yymsp[0].minor.yy232); } -#line 6019 "sql.c" yymsp[-9].minor.yy232 = yylhsminor.yy232; break; - case 185: /* drop_table_clause ::= exists_opt full_table_name */ -#line 369 "sql.y" + case 187: /* drop_table_clause ::= exists_opt full_table_name */ { yylhsminor.yy232 = createDropTableClause(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy232); } -#line 6025 "sql.c" yymsp[-1].minor.yy232 = yylhsminor.yy232; break; - case 187: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ - case 369: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==369); -#line 374 "sql.y" + case 189: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ + case 371: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==371); { yymsp[-2].minor.yy88 = yymsp[-1].minor.yy88; } -#line 6032 "sql.c" break; - case 188: /* full_table_name ::= table_name */ -#line 376 "sql.y" + case 190: /* full_table_name ::= table_name */ { yylhsminor.yy232 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy993, NULL); } -#line 6037 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 189: /* full_table_name ::= db_name NK_DOT table_name */ -#line 377 "sql.y" + case 191: /* full_table_name ::= db_name NK_DOT table_name */ { yylhsminor.yy232 = createRealTableNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993, NULL); } -#line 6043 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 192: /* column_def ::= column_name type_name */ -#line 384 "sql.y" + case 194: /* column_def ::= column_name type_name */ { yylhsminor.yy232 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400, NULL); } -#line 6049 "sql.c" yymsp[-1].minor.yy232 = yylhsminor.yy232; break; - case 193: /* type_name ::= BOOL */ -#line 389 "sql.y" + case 195: /* type_name ::= BOOL */ { yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_BOOL); } -#line 6055 "sql.c" break; - case 194: /* type_name ::= TINYINT */ -#line 390 "sql.y" + case 196: /* type_name ::= TINYINT */ { yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_TINYINT); } -#line 6060 "sql.c" break; - case 195: /* type_name ::= SMALLINT */ -#line 391 "sql.y" + case 197: /* type_name ::= SMALLINT */ { yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_SMALLINT); } -#line 6065 "sql.c" break; - case 196: /* type_name ::= INT */ - case 197: /* type_name ::= INTEGER */ yytestcase(yyruleno==197); -#line 392 "sql.y" + case 198: /* type_name ::= INT */ + case 199: /* type_name ::= INTEGER */ yytestcase(yyruleno==199); { yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_INT); } -#line 6071 "sql.c" break; - case 198: /* type_name ::= BIGINT */ -#line 394 "sql.y" + case 200: /* type_name ::= BIGINT */ { yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_BIGINT); } -#line 6076 "sql.c" break; - case 199: /* type_name ::= FLOAT */ -#line 395 "sql.y" + case 201: /* type_name ::= FLOAT */ { yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_FLOAT); } -#line 6081 "sql.c" break; - case 200: /* type_name ::= DOUBLE */ -#line 396 "sql.y" + case 202: /* type_name ::= DOUBLE */ { yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_DOUBLE); } -#line 6086 "sql.c" break; - case 201: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -#line 397 "sql.y" + case 203: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } -#line 6091 "sql.c" break; - case 202: /* type_name ::= TIMESTAMP */ -#line 398 "sql.y" + case 204: /* type_name ::= TIMESTAMP */ { yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } -#line 6096 "sql.c" break; - case 203: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -#line 399 "sql.y" + case 205: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } -#line 6101 "sql.c" break; - case 204: /* type_name ::= TINYINT UNSIGNED */ -#line 400 "sql.y" + case 206: /* type_name ::= TINYINT UNSIGNED */ { yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_UTINYINT); } -#line 6106 "sql.c" break; - case 205: /* type_name ::= SMALLINT UNSIGNED */ -#line 401 "sql.y" + case 207: /* type_name ::= SMALLINT UNSIGNED */ { yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_USMALLINT); } -#line 6111 "sql.c" break; - case 206: /* type_name ::= INT UNSIGNED */ -#line 402 "sql.y" + case 208: /* type_name ::= INT UNSIGNED */ { yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_UINT); } -#line 6116 "sql.c" break; - case 207: /* type_name ::= BIGINT UNSIGNED */ -#line 403 "sql.y" + case 209: /* type_name ::= BIGINT UNSIGNED */ { yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_UBIGINT); } -#line 6121 "sql.c" break; - case 208: /* type_name ::= JSON */ -#line 404 "sql.y" + case 210: /* type_name ::= JSON */ { yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_JSON); } -#line 6126 "sql.c" break; - case 209: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -#line 405 "sql.y" + case 211: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } -#line 6131 "sql.c" break; - case 210: /* type_name ::= MEDIUMBLOB */ -#line 406 "sql.y" + case 212: /* type_name ::= MEDIUMBLOB */ { yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } -#line 6136 "sql.c" break; - case 211: /* type_name ::= BLOB */ -#line 407 "sql.y" + case 213: /* type_name ::= BLOB */ { yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_BLOB); } -#line 6141 "sql.c" break; - case 212: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -#line 408 "sql.y" + case 214: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } -#line 6146 "sql.c" break; - case 213: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ -#line 409 "sql.y" + case 215: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } -#line 6151 "sql.c" break; - case 214: /* type_name ::= DECIMAL */ -#line 410 "sql.y" + case 216: /* type_name ::= DECIMAL */ { yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_DECIMAL); } -#line 6156 "sql.c" break; - case 215: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -#line 411 "sql.y" + case 217: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy400 = createDataType(TSDB_DATA_TYPE_DECIMAL); } -#line 6161 "sql.c" break; - case 216: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -#line 412 "sql.y" + case 218: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ { yymsp[-5].minor.yy400 = createDataType(TSDB_DATA_TYPE_DECIMAL); } -#line 6166 "sql.c" break; - case 219: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ - case 372: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==372); -#line 421 "sql.y" + case 221: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ + case 374: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==374); { yymsp[-3].minor.yy88 = yymsp[-1].minor.yy88; } -#line 6172 "sql.c" break; - case 220: /* table_options ::= */ -#line 423 "sql.y" + case 222: /* table_options ::= */ { yymsp[1].minor.yy232 = createDefaultTableOptions(pCxt); } -#line 6177 "sql.c" break; - case 221: /* table_options ::= table_options COMMENT NK_STRING */ -#line 424 "sql.y" + case 223: /* table_options ::= table_options COMMENT NK_STRING */ { yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } -#line 6182 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 222: /* table_options ::= table_options MAX_DELAY duration_list */ -#line 425 "sql.y" + case 224: /* table_options ::= table_options MAX_DELAY duration_list */ { yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy88); } -#line 6188 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 223: /* table_options ::= table_options WATERMARK duration_list */ -#line 426 "sql.y" + case 225: /* table_options ::= table_options WATERMARK duration_list */ { yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy88); } -#line 6194 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 224: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -#line 427 "sql.y" + case 226: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ { yylhsminor.yy232 = setTableOption(pCxt, yymsp[-4].minor.yy232, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy88); } -#line 6200 "sql.c" yymsp[-4].minor.yy232 = yylhsminor.yy232; break; - case 225: /* table_options ::= table_options TTL NK_INTEGER */ -#line 428 "sql.y" + case 227: /* table_options ::= table_options TTL NK_INTEGER */ { yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } -#line 6206 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 226: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -#line 429 "sql.y" + case 228: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ { yylhsminor.yy232 = setTableOption(pCxt, yymsp[-4].minor.yy232, TABLE_OPTION_SMA, yymsp[-1].minor.yy88); } -#line 6212 "sql.c" yymsp[-4].minor.yy232 = yylhsminor.yy232; break; - case 227: /* table_options ::= table_options DELETE_MARK duration_list */ -#line 430 "sql.y" + case 229: /* table_options ::= table_options DELETE_MARK duration_list */ { yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy88); } -#line 6218 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 228: /* alter_table_options ::= alter_table_option */ -#line 432 "sql.y" + case 230: /* alter_table_options ::= alter_table_option */ { yylhsminor.yy232 = createAlterTableOptions(pCxt); yylhsminor.yy232 = setTableOption(pCxt, yylhsminor.yy232, yymsp[0].minor.yy117.type, &yymsp[0].minor.yy117.val); } -#line 6224 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 229: /* alter_table_options ::= alter_table_options alter_table_option */ -#line 433 "sql.y" + case 231: /* alter_table_options ::= alter_table_options alter_table_option */ { yylhsminor.yy232 = setTableOption(pCxt, yymsp[-1].minor.yy232, yymsp[0].minor.yy117.type, &yymsp[0].minor.yy117.val); } -#line 6230 "sql.c" yymsp[-1].minor.yy232 = yylhsminor.yy232; break; - case 230: /* alter_table_option ::= COMMENT NK_STRING */ -#line 437 "sql.y" + case 232: /* alter_table_option ::= COMMENT NK_STRING */ { yymsp[-1].minor.yy117.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 6236 "sql.c" break; - case 231: /* alter_table_option ::= TTL NK_INTEGER */ -#line 438 "sql.y" + case 233: /* alter_table_option ::= TTL NK_INTEGER */ { yymsp[-1].minor.yy117.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } -#line 6241 "sql.c" break; - case 232: /* duration_list ::= duration_literal */ - case 459: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==459); -#line 442 "sql.y" + case 234: /* duration_list ::= duration_literal */ + case 461: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==461); { yylhsminor.yy88 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } -#line 6247 "sql.c" yymsp[0].minor.yy88 = yylhsminor.yy88; break; - case 233: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 460: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==460); -#line 443 "sql.y" + case 235: /* duration_list ::= duration_list NK_COMMA duration_literal */ + case 462: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==462); { yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } -#line 6254 "sql.c" yymsp[-2].minor.yy88 = yylhsminor.yy88; break; - case 236: /* rollup_func_name ::= function_name */ -#line 450 "sql.y" + case 238: /* rollup_func_name ::= function_name */ { yylhsminor.yy232 = createFunctionNode(pCxt, &yymsp[0].minor.yy993, NULL); } -#line 6260 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 237: /* rollup_func_name ::= FIRST */ - case 238: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==238); - case 306: /* tag_item ::= QTAGS */ yytestcase(yyruleno==306); -#line 451 "sql.y" + case 239: /* rollup_func_name ::= FIRST */ + case 240: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==240); + case 308: /* tag_item ::= QTAGS */ yytestcase(yyruleno==308); { yylhsminor.yy232 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } -#line 6268 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 241: /* col_name ::= column_name */ - case 307: /* tag_item ::= column_name */ yytestcase(yyruleno==307); -#line 459 "sql.y" + case 243: /* col_name ::= column_name */ + case 309: /* tag_item ::= column_name */ yytestcase(yyruleno==309); { yylhsminor.yy232 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy993); } -#line 6275 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 242: /* cmd ::= SHOW DNODES */ -#line 462 "sql.y" + case 244: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } -#line 6281 "sql.c" break; - case 243: /* cmd ::= SHOW USERS */ -#line 463 "sql.y" + case 245: /* cmd ::= SHOW USERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } -#line 6286 "sql.c" break; - case 244: /* cmd ::= SHOW USER PRIVILEGES */ -#line 464 "sql.y" + case 246: /* cmd ::= SHOW USER PRIVILEGES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); } -#line 6291 "sql.c" break; - case 245: /* cmd ::= SHOW db_kind_opt DATABASES */ -#line 465 "sql.y" + case 247: /* cmd ::= SHOW db_kind_opt DATABASES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy281); } -#line 6299 "sql.c" break; - case 246: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ -#line 469 "sql.y" + case 248: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ { pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy133, yymsp[0].minor.yy232, OP_TYPE_LIKE); } -#line 6306 "sql.c" break; - case 247: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -#line 472 "sql.y" + case 249: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy232, yymsp[0].minor.yy232, OP_TYPE_LIKE); } -#line 6311 "sql.c" break; - case 248: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -#line 473 "sql.y" + case 250: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy232, NULL, OP_TYPE_LIKE); } -#line 6316 "sql.c" break; - case 249: /* cmd ::= SHOW MNODES */ -#line 474 "sql.y" + case 251: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } -#line 6321 "sql.c" break; - case 250: /* cmd ::= SHOW QNODES */ -#line 476 "sql.y" + case 252: /* cmd ::= SHOW QNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } -#line 6326 "sql.c" break; - case 251: /* cmd ::= SHOW FUNCTIONS */ -#line 477 "sql.y" + case 253: /* cmd ::= SHOW FUNCTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } -#line 6331 "sql.c" break; - case 252: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -#line 478 "sql.y" + case 254: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy232, yymsp[-1].minor.yy232, OP_TYPE_EQUAL); } -#line 6336 "sql.c" break; - case 253: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ -#line 479 "sql.y" + case 255: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy993), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993), OP_TYPE_EQUAL); } -#line 6341 "sql.c" break; - case 254: /* cmd ::= SHOW STREAMS */ -#line 480 "sql.y" + case 256: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } -#line 6346 "sql.c" break; - case 255: /* cmd ::= SHOW ACCOUNTS */ -#line 481 "sql.y" + case 257: /* cmd ::= SHOW ACCOUNTS */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } -#line 6351 "sql.c" break; - case 256: /* cmd ::= SHOW APPS */ -#line 482 "sql.y" + case 258: /* cmd ::= SHOW APPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } -#line 6356 "sql.c" break; - case 257: /* cmd ::= SHOW CONNECTIONS */ -#line 483 "sql.y" + case 259: /* cmd ::= SHOW CONNECTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } -#line 6361 "sql.c" break; - case 258: /* cmd ::= SHOW LICENCES */ - case 259: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==259); -#line 484 "sql.y" + case 260: /* cmd ::= SHOW LICENCES */ + case 261: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==261); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } -#line 6367 "sql.c" break; - case 260: /* cmd ::= SHOW CREATE DATABASE db_name */ -#line 486 "sql.y" + case 262: /* cmd ::= SHOW CREATE DATABASE db_name */ { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy993); } -#line 6372 "sql.c" break; - case 261: /* cmd ::= SHOW CREATE TABLE full_table_name */ -#line 487 "sql.y" + case 263: /* cmd ::= SHOW CREATE TABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy232); } -#line 6377 "sql.c" break; - case 262: /* cmd ::= SHOW CREATE STABLE full_table_name */ -#line 488 "sql.y" + case 264: /* cmd ::= SHOW CREATE STABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy232); } -#line 6382 "sql.c" break; - case 263: /* cmd ::= SHOW QUERIES */ -#line 489 "sql.y" + case 265: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } -#line 6387 "sql.c" break; - case 264: /* cmd ::= SHOW SCORES */ -#line 490 "sql.y" + case 266: /* cmd ::= SHOW SCORES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } -#line 6392 "sql.c" break; - case 265: /* cmd ::= SHOW TOPICS */ -#line 491 "sql.y" + case 267: /* cmd ::= SHOW TOPICS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } -#line 6397 "sql.c" break; - case 266: /* cmd ::= SHOW VARIABLES */ - case 267: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==267); -#line 492 "sql.y" + case 268: /* cmd ::= SHOW VARIABLES */ + case 269: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==269); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } -#line 6403 "sql.c" break; - case 268: /* cmd ::= SHOW LOCAL VARIABLES */ -#line 494 "sql.y" + case 270: /* cmd ::= SHOW LOCAL VARIABLES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } -#line 6408 "sql.c" break; - case 269: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ -#line 495 "sql.y" + case 271: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ { pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy232); } -#line 6413 "sql.c" break; - case 270: /* cmd ::= SHOW BNODES */ -#line 496 "sql.y" + case 272: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } -#line 6418 "sql.c" break; - case 271: /* cmd ::= SHOW SNODES */ -#line 497 "sql.y" + case 273: /* cmd ::= SHOW SNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } -#line 6423 "sql.c" break; - case 272: /* cmd ::= SHOW CLUSTER */ -#line 498 "sql.y" + case 274: /* cmd ::= SHOW CLUSTER */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } -#line 6428 "sql.c" break; - case 273: /* cmd ::= SHOW TRANSACTIONS */ -#line 499 "sql.y" + case 275: /* cmd ::= SHOW TRANSACTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } -#line 6433 "sql.c" break; - case 274: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -#line 500 "sql.y" + case 276: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ { pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy232); } -#line 6438 "sql.c" break; - case 275: /* cmd ::= SHOW CONSUMERS */ -#line 501 "sql.y" + case 277: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } -#line 6443 "sql.c" break; - case 276: /* cmd ::= SHOW SUBSCRIPTIONS */ -#line 502 "sql.y" + case 278: /* cmd ::= SHOW SUBSCRIPTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } -#line 6448 "sql.c" break; - case 277: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -#line 503 "sql.y" + case 279: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy232, yymsp[-1].minor.yy232, OP_TYPE_EQUAL); } -#line 6453 "sql.c" break; - case 278: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ -#line 504 "sql.y" + case 280: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy993), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993), OP_TYPE_EQUAL); } -#line 6458 "sql.c" break; - case 279: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ -#line 505 "sql.y" + case 281: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy232, yymsp[0].minor.yy232, yymsp[-3].minor.yy88); } -#line 6463 "sql.c" break; - case 280: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ -#line 506 "sql.y" + case 282: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ { pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy993), yymsp[-4].minor.yy88); } -#line 6468 "sql.c" break; - case 281: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ -#line 507 "sql.y" + case 283: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } -#line 6473 "sql.c" break; - case 282: /* cmd ::= SHOW VNODES */ -#line 508 "sql.y" + case 284: /* cmd ::= SHOW VNODES */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, NULL); } -#line 6478 "sql.c" break; - case 283: /* cmd ::= SHOW db_name_cond_opt ALIVE */ -#line 510 "sql.y" + case 285: /* cmd ::= SHOW db_name_cond_opt ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy232, QUERY_NODE_SHOW_DB_ALIVE_STMT); } -#line 6483 "sql.c" break; - case 284: /* cmd ::= SHOW CLUSTER ALIVE */ -#line 511 "sql.y" + case 286: /* cmd ::= SHOW CLUSTER ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } -#line 6488 "sql.c" break; - case 285: /* cmd ::= SHOW db_name_cond_opt VIEWS */ -#line 512 "sql.y" + case 287: /* cmd ::= SHOW db_name_cond_opt VIEWS */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-1].minor.yy232, NULL, OP_TYPE_LIKE); } -#line 6493 "sql.c" break; - case 286: /* cmd ::= SHOW CREATE VIEW full_table_name */ -#line 513 "sql.y" + case 288: /* cmd ::= SHOW CREATE VIEW full_table_name */ { pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy232); } -#line 6498 "sql.c" break; - case 287: /* cmd ::= SHOW COMPACTS */ -#line 514 "sql.y" + case 289: /* cmd ::= SHOW COMPACTS */ { pCxt->pRootNode = createShowCompactsStmt(pCxt, QUERY_NODE_SHOW_COMPACTS_STMT); } -#line 6503 "sql.c" break; - case 288: /* cmd ::= SHOW COMPACT NK_INTEGER */ -#line 515 "sql.y" + case 290: /* cmd ::= SHOW COMPACT NK_INTEGER */ { pCxt->pRootNode = createShowCompactDetailsStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 6508 "sql.c" break; - case 289: /* table_kind_db_name_cond_opt ::= */ -#line 519 "sql.y" + case 291: /* table_kind_db_name_cond_opt ::= */ { yymsp[1].minor.yy133.kind = SHOW_KIND_ALL; yymsp[1].minor.yy133.dbName = nil_token; } -#line 6513 "sql.c" break; - case 290: /* table_kind_db_name_cond_opt ::= table_kind */ -#line 520 "sql.y" + case 292: /* table_kind_db_name_cond_opt ::= table_kind */ { yylhsminor.yy133.kind = yymsp[0].minor.yy281; yylhsminor.yy133.dbName = nil_token; } -#line 6518 "sql.c" yymsp[0].minor.yy133 = yylhsminor.yy133; break; - case 291: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ -#line 521 "sql.y" + case 293: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ { yylhsminor.yy133.kind = SHOW_KIND_ALL; yylhsminor.yy133.dbName = yymsp[-1].minor.yy993; } -#line 6524 "sql.c" yymsp[-1].minor.yy133 = yylhsminor.yy133; break; - case 292: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ -#line 522 "sql.y" + case 294: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ { yylhsminor.yy133.kind = yymsp[-2].minor.yy281; yylhsminor.yy133.dbName = yymsp[-1].minor.yy993; } -#line 6530 "sql.c" yymsp[-2].minor.yy133 = yylhsminor.yy133; break; - case 293: /* table_kind ::= NORMAL */ -#line 526 "sql.y" + case 295: /* table_kind ::= NORMAL */ { yymsp[0].minor.yy281 = SHOW_KIND_TABLES_NORMAL; } -#line 6536 "sql.c" break; - case 294: /* table_kind ::= CHILD */ -#line 527 "sql.y" + case 296: /* table_kind ::= CHILD */ { yymsp[0].minor.yy281 = SHOW_KIND_TABLES_CHILD; } -#line 6541 "sql.c" break; - case 295: /* db_name_cond_opt ::= */ - case 300: /* from_db_opt ::= */ yytestcase(yyruleno==300); -#line 529 "sql.y" + case 297: /* db_name_cond_opt ::= */ + case 302: /* from_db_opt ::= */ yytestcase(yyruleno==302); { yymsp[1].minor.yy232 = createDefaultDatabaseCondValue(pCxt); } -#line 6547 "sql.c" break; - case 296: /* db_name_cond_opt ::= db_name NK_DOT */ -#line 530 "sql.y" + case 298: /* db_name_cond_opt ::= db_name NK_DOT */ { yylhsminor.yy232 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy993); } -#line 6552 "sql.c" yymsp[-1].minor.yy232 = yylhsminor.yy232; break; - case 298: /* like_pattern_opt ::= LIKE NK_STRING */ -#line 533 "sql.y" + case 300: /* like_pattern_opt ::= LIKE NK_STRING */ { yymsp[-1].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } -#line 6558 "sql.c" break; - case 299: /* table_name_cond ::= table_name */ -#line 535 "sql.y" + case 301: /* table_name_cond ::= table_name */ { yylhsminor.yy232 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993); } -#line 6563 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 301: /* from_db_opt ::= FROM db_name */ -#line 538 "sql.y" + case 303: /* from_db_opt ::= FROM db_name */ { yymsp[-1].minor.yy232 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993); } -#line 6569 "sql.c" break; - case 305: /* tag_item ::= TBNAME */ -#line 546 "sql.y" + case 307: /* tag_item ::= TBNAME */ { yylhsminor.yy232 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } -#line 6574 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 308: /* tag_item ::= column_name column_alias */ -#line 549 "sql.y" + case 310: /* tag_item ::= column_name column_alias */ { yylhsminor.yy232 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy993), &yymsp[0].minor.yy993); } -#line 6580 "sql.c" yymsp[-1].minor.yy232 = yylhsminor.yy232; break; - case 309: /* tag_item ::= column_name AS column_alias */ -#line 550 "sql.y" + case 311: /* tag_item ::= column_name AS column_alias */ { yylhsminor.yy232 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy993), &yymsp[0].minor.yy993); } -#line 6586 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 310: /* db_kind_opt ::= */ -#line 554 "sql.y" + case 312: /* db_kind_opt ::= */ { yymsp[1].minor.yy281 = SHOW_KIND_ALL; } -#line 6592 "sql.c" break; - case 311: /* db_kind_opt ::= USER */ -#line 555 "sql.y" + case 313: /* db_kind_opt ::= USER */ { yymsp[0].minor.yy281 = SHOW_KIND_DATABASES_USER; } -#line 6597 "sql.c" break; - case 312: /* db_kind_opt ::= SYSTEM */ -#line 556 "sql.y" + case 314: /* db_kind_opt ::= SYSTEM */ { yymsp[0].minor.yy281 = SHOW_KIND_DATABASES_SYSTEM; } -#line 6602 "sql.c" break; - case 313: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ -#line 560 "sql.y" + case 315: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy985, yymsp[-3].minor.yy232, yymsp[-1].minor.yy232, NULL, yymsp[0].minor.yy232); } -#line 6607 "sql.c" break; - case 314: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ -#line 562 "sql.y" + case 316: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy985, yymsp[-5].minor.yy232, yymsp[-3].minor.yy232, yymsp[-1].minor.yy88, NULL); } -#line 6612 "sql.c" break; - case 315: /* cmd ::= DROP INDEX exists_opt full_index_name */ -#line 563 "sql.y" + case 317: /* cmd ::= DROP INDEX exists_opt full_index_name */ { pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy232); } -#line 6617 "sql.c" break; - case 316: /* full_index_name ::= index_name */ -#line 565 "sql.y" + case 318: /* full_index_name ::= index_name */ { yylhsminor.yy232 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy993); } -#line 6622 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 317: /* full_index_name ::= db_name NK_DOT index_name */ -#line 566 "sql.y" + case 319: /* full_index_name ::= db_name NK_DOT index_name */ { yylhsminor.yy232 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993); } -#line 6628 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 318: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -#line 569 "sql.y" + case 320: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ { yymsp[-9].minor.yy232 = createIndexOption(pCxt, yymsp[-7].minor.yy88, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), NULL, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } -#line 6634 "sql.c" break; - case 319: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ -#line 572 "sql.y" + case 321: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ { yymsp[-11].minor.yy232 = createIndexOption(pCxt, yymsp[-9].minor.yy88, releaseRawExprNode(pCxt, yymsp[-5].minor.yy232), releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } -#line 6639 "sql.c" break; - case 322: /* func ::= sma_func_name NK_LP expression_list NK_RP */ -#line 579 "sql.y" + case 324: /* func ::= sma_func_name NK_LP expression_list NK_RP */ { yylhsminor.yy232 = createFunctionNode(pCxt, &yymsp[-3].minor.yy993, yymsp[-1].minor.yy88); } -#line 6644 "sql.c" yymsp[-3].minor.yy232 = yylhsminor.yy232; break; - case 323: /* sma_func_name ::= function_name */ - case 548: /* alias_opt ::= table_alias */ yytestcase(yyruleno==548); -#line 583 "sql.y" + case 325: /* sma_func_name ::= function_name */ + case 550: /* alias_opt ::= table_alias */ yytestcase(yyruleno==550); { yylhsminor.yy993 = yymsp[0].minor.yy993; } -#line 6651 "sql.c" yymsp[0].minor.yy993 = yylhsminor.yy993; break; - case 328: /* sma_stream_opt ::= */ - case 373: /* stream_options ::= */ yytestcase(yyruleno==373); -#line 589 "sql.y" + case 330: /* sma_stream_opt ::= */ + case 375: /* stream_options ::= */ yytestcase(yyruleno==375); { yymsp[1].minor.yy232 = createStreamOptions(pCxt); } -#line 6658 "sql.c" break; - case 329: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ -#line 590 "sql.y" + case 331: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy232)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = yymsp[-2].minor.yy232; } -#line 6663 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 330: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -#line 591 "sql.y" + case 332: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy232)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = yymsp[-2].minor.yy232; } -#line 6669 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 331: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -#line 592 "sql.y" + case 333: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy232)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = yymsp[-2].minor.yy232; } -#line 6675 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 332: /* with_meta ::= AS */ -#line 597 "sql.y" + case 334: /* with_meta ::= AS */ { yymsp[0].minor.yy92 = 0; } -#line 6681 "sql.c" break; - case 333: /* with_meta ::= WITH META AS */ -#line 598 "sql.y" + case 335: /* with_meta ::= WITH META AS */ { yymsp[-2].minor.yy92 = 1; } -#line 6686 "sql.c" break; - case 334: /* with_meta ::= ONLY META AS */ -#line 599 "sql.y" + case 336: /* with_meta ::= ONLY META AS */ { yymsp[-2].minor.yy92 = 2; } -#line 6691 "sql.c" break; - case 335: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -#line 601 "sql.y" + case 337: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ { pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy985, &yymsp[-2].minor.yy993, yymsp[0].minor.yy232); } -#line 6696 "sql.c" break; - case 336: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ -#line 603 "sql.y" + case 338: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ { pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy985, &yymsp[-3].minor.yy993, &yymsp[0].minor.yy993, yymsp[-2].minor.yy92); } -#line 6701 "sql.c" break; - case 337: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ -#line 605 "sql.y" + case 339: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ { pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy985, &yymsp[-4].minor.yy993, yymsp[-1].minor.yy232, yymsp[-3].minor.yy92, yymsp[0].minor.yy232); } -#line 6706 "sql.c" break; - case 338: /* cmd ::= DROP TOPIC exists_opt topic_name */ -#line 607 "sql.y" + case 340: /* cmd ::= DROP TOPIC exists_opt topic_name */ { pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); } -#line 6711 "sql.c" break; - case 339: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -#line 608 "sql.y" + case 341: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ { pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy985, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993); } -#line 6716 "sql.c" break; - case 340: /* cmd ::= DESC full_table_name */ - case 341: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==341); -#line 611 "sql.y" + case 342: /* cmd ::= DESC full_table_name */ + case 343: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==343); { pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy232); } -#line 6722 "sql.c" break; - case 342: /* cmd ::= RESET QUERY CACHE */ -#line 615 "sql.y" + case 344: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } -#line 6727 "sql.c" break; - case 343: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - case 344: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==344); -#line 618 "sql.y" + case 345: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + case 346: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==346); { pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy985, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } -#line 6733 "sql.c" break; - case 347: /* explain_options ::= */ -#line 626 "sql.y" + case 349: /* explain_options ::= */ { yymsp[1].minor.yy232 = createDefaultExplainOptions(pCxt); } -#line 6738 "sql.c" break; - case 348: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -#line 627 "sql.y" + case 350: /* explain_options ::= explain_options VERBOSE NK_BOOL */ { yylhsminor.yy232 = setExplainVerbose(pCxt, yymsp[-2].minor.yy232, &yymsp[0].minor.yy0); } -#line 6743 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 349: /* explain_options ::= explain_options RATIO NK_FLOAT */ -#line 628 "sql.y" + case 351: /* explain_options ::= explain_options RATIO NK_FLOAT */ { yylhsminor.yy232 = setExplainRatio(pCxt, yymsp[-2].minor.yy232, &yymsp[0].minor.yy0); } -#line 6749 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 350: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ -#line 633 "sql.y" + case 352: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ { pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy985, yymsp[-9].minor.yy985, &yymsp[-6].minor.yy993, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy400, yymsp[-1].minor.yy92, &yymsp[0].minor.yy993, yymsp[-10].minor.yy985); } -#line 6755 "sql.c" break; - case 351: /* cmd ::= DROP FUNCTION exists_opt function_name */ -#line 634 "sql.y" + case 353: /* cmd ::= DROP FUNCTION exists_opt function_name */ { pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); } -#line 6760 "sql.c" break; - case 356: /* language_opt ::= */ - case 395: /* on_vgroup_id ::= */ yytestcase(yyruleno==395); -#line 648 "sql.y" + case 358: /* language_opt ::= */ + case 397: /* on_vgroup_id ::= */ yytestcase(yyruleno==397); { yymsp[1].minor.yy993 = nil_token; } -#line 6766 "sql.c" break; - case 357: /* language_opt ::= LANGUAGE NK_STRING */ - case 396: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==396); -#line 649 "sql.y" + case 359: /* language_opt ::= LANGUAGE NK_STRING */ + case 398: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==398); { yymsp[-1].minor.yy993 = yymsp[0].minor.yy0; } -#line 6772 "sql.c" break; - case 360: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ -#line 658 "sql.y" + case 362: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ { pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy985, yymsp[-2].minor.yy232, &yymsp[-1].minor.yy0, yymsp[0].minor.yy232); } -#line 6777 "sql.c" break; - case 361: /* cmd ::= DROP VIEW exists_opt full_view_name */ -#line 659 "sql.y" + case 363: /* cmd ::= DROP VIEW exists_opt full_view_name */ { pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy232); } -#line 6782 "sql.c" break; - case 362: /* full_view_name ::= view_name */ -#line 661 "sql.y" + case 364: /* full_view_name ::= view_name */ { yylhsminor.yy232 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy993); } -#line 6787 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 363: /* full_view_name ::= db_name NK_DOT view_name */ -#line 662 "sql.y" + case 365: /* full_view_name ::= db_name NK_DOT view_name */ { yylhsminor.yy232 = createViewNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993); } -#line 6793 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 364: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ -#line 667 "sql.y" + case 366: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ { pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy985, &yymsp[-8].minor.yy993, yymsp[-5].minor.yy232, yymsp[-7].minor.yy232, yymsp[-3].minor.yy88, yymsp[-2].minor.yy232, yymsp[0].minor.yy232, yymsp[-4].minor.yy88); } -#line 6799 "sql.c" break; - case 365: /* cmd ::= DROP STREAM exists_opt stream_name */ -#line 668 "sql.y" + case 367: /* cmd ::= DROP STREAM exists_opt stream_name */ { pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); } -#line 6804 "sql.c" break; - case 366: /* cmd ::= PAUSE STREAM exists_opt stream_name */ -#line 669 "sql.y" + case 368: /* cmd ::= PAUSE STREAM exists_opt stream_name */ { pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); } -#line 6809 "sql.c" break; - case 367: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ -#line 670 "sql.y" + case 369: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ { pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy985, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); } -#line 6814 "sql.c" break; - case 374: /* stream_options ::= stream_options TRIGGER AT_ONCE */ - case 375: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==375); -#line 684 "sql.y" + case 376: /* stream_options ::= stream_options TRIGGER AT_ONCE */ + case 377: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==377); { yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-2].minor.yy232, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } -#line 6820 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 376: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -#line 686 "sql.y" + case 378: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ { yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-3].minor.yy232, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } -#line 6826 "sql.c" yymsp[-3].minor.yy232 = yylhsminor.yy232; break; - case 377: /* stream_options ::= stream_options WATERMARK duration_literal */ -#line 687 "sql.y" + case 379: /* stream_options ::= stream_options WATERMARK duration_literal */ { yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-2].minor.yy232, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } -#line 6832 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 378: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -#line 688 "sql.y" + case 380: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ { yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-3].minor.yy232, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } -#line 6838 "sql.c" yymsp[-3].minor.yy232 = yylhsminor.yy232; break; - case 379: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -#line 689 "sql.y" + case 381: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ { yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-2].minor.yy232, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } -#line 6844 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 380: /* stream_options ::= stream_options DELETE_MARK duration_literal */ -#line 690 "sql.y" + case 382: /* stream_options ::= stream_options DELETE_MARK duration_literal */ { yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-2].minor.yy232, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } -#line 6850 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 381: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ -#line 691 "sql.y" + case 383: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ { yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-3].minor.yy232, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } -#line 6856 "sql.c" yymsp[-3].minor.yy232 = yylhsminor.yy232; break; - case 383: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 586: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==586); - case 610: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==610); -#line 694 "sql.y" + case 385: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 588: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==588); + case 612: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==612); { yymsp[-3].minor.yy232 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy232); } -#line 6864 "sql.c" break; - case 386: /* cmd ::= KILL CONNECTION NK_INTEGER */ -#line 702 "sql.y" + case 388: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } -#line 6869 "sql.c" break; - case 387: /* cmd ::= KILL QUERY NK_STRING */ -#line 703 "sql.y" + case 389: /* cmd ::= KILL QUERY NK_STRING */ { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } -#line 6874 "sql.c" break; - case 388: /* cmd ::= KILL TRANSACTION NK_INTEGER */ -#line 704 "sql.y" + case 390: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } -#line 6879 "sql.c" break; - case 389: /* cmd ::= KILL COMPACT NK_INTEGER */ -#line 705 "sql.y" + case 391: /* cmd ::= KILL COMPACT NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_COMPACT_STMT, &yymsp[0].minor.yy0); } -#line 6884 "sql.c" break; - case 390: /* cmd ::= BALANCE VGROUP */ -#line 708 "sql.y" + case 392: /* cmd ::= BALANCE VGROUP */ { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } -#line 6889 "sql.c" break; - case 391: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ -#line 709 "sql.y" + case 393: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ { pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy993); } -#line 6894 "sql.c" break; - case 392: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ -#line 710 "sql.y" + case 394: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 6899 "sql.c" break; - case 393: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -#line 711 "sql.y" + case 395: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ { pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy88); } -#line 6904 "sql.c" break; - case 394: /* cmd ::= SPLIT VGROUP NK_INTEGER */ -#line 712 "sql.y" + case 396: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } -#line 6909 "sql.c" break; - case 397: /* dnode_list ::= DNODE NK_INTEGER */ -#line 721 "sql.y" + case 399: /* dnode_list ::= DNODE NK_INTEGER */ { yymsp[-1].minor.yy88 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 6914 "sql.c" break; - case 399: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -#line 728 "sql.y" + case 401: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ { pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } -#line 6919 "sql.c" break; - case 402: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -#line 737 "sql.y" + case 404: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ { yymsp[-6].minor.yy232 = createInsertStmt(pCxt, yymsp[-4].minor.yy232, yymsp[-2].minor.yy88, yymsp[0].minor.yy232); } -#line 6924 "sql.c" break; - case 403: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ -#line 738 "sql.y" + case 405: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ { yymsp[-3].minor.yy232 = createInsertStmt(pCxt, yymsp[-1].minor.yy232, NULL, yymsp[0].minor.yy232); } -#line 6929 "sql.c" break; - case 404: /* literal ::= NK_INTEGER */ -#line 741 "sql.y" + case 406: /* literal ::= NK_INTEGER */ { yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } -#line 6934 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 405: /* literal ::= NK_FLOAT */ -#line 742 "sql.y" + case 407: /* literal ::= NK_FLOAT */ { yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } -#line 6940 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 406: /* literal ::= NK_STRING */ -#line 743 "sql.y" + case 408: /* literal ::= NK_STRING */ { yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } -#line 6946 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 407: /* literal ::= NK_BOOL */ -#line 744 "sql.y" + case 409: /* literal ::= NK_BOOL */ { yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } -#line 6952 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 408: /* literal ::= TIMESTAMP NK_STRING */ -#line 745 "sql.y" + case 410: /* literal ::= TIMESTAMP NK_STRING */ { yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } -#line 6958 "sql.c" yymsp[-1].minor.yy232 = yylhsminor.yy232; break; - case 409: /* literal ::= duration_literal */ - case 419: /* signed_literal ::= signed */ yytestcase(yyruleno==419); - case 442: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==442); - case 443: /* expression ::= literal */ yytestcase(yyruleno==443); - case 445: /* expression ::= column_reference */ yytestcase(yyruleno==445); - case 446: /* expression ::= function_expression */ yytestcase(yyruleno==446); - case 447: /* expression ::= case_when_expression */ yytestcase(yyruleno==447); - case 480: /* function_expression ::= literal_func */ yytestcase(yyruleno==480); - case 529: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==529); - case 533: /* boolean_primary ::= predicate */ yytestcase(yyruleno==533); - case 535: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==535); - case 536: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==536); - case 539: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==539); - case 541: /* table_reference ::= table_primary */ yytestcase(yyruleno==541); - case 542: /* table_reference ::= joined_table */ yytestcase(yyruleno==542); - case 546: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==546); - case 612: /* query_simple ::= query_specification */ yytestcase(yyruleno==612); - case 613: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==613); - case 616: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==616); - case 618: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==618); -#line 746 "sql.y" + case 411: /* literal ::= duration_literal */ + case 421: /* signed_literal ::= signed */ yytestcase(yyruleno==421); + case 444: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==444); + case 445: /* expression ::= literal */ yytestcase(yyruleno==445); + case 447: /* expression ::= column_reference */ yytestcase(yyruleno==447); + case 448: /* expression ::= function_expression */ yytestcase(yyruleno==448); + case 449: /* expression ::= case_when_expression */ yytestcase(yyruleno==449); + case 482: /* function_expression ::= literal_func */ yytestcase(yyruleno==482); + case 531: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==531); + case 535: /* boolean_primary ::= predicate */ yytestcase(yyruleno==535); + case 537: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==537); + case 538: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==538); + case 541: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==541); + case 543: /* table_reference ::= table_primary */ yytestcase(yyruleno==543); + case 544: /* table_reference ::= joined_table */ yytestcase(yyruleno==544); + case 548: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==548); + case 614: /* query_simple ::= query_specification */ yytestcase(yyruleno==614); + case 615: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==615); + case 618: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==618); + case 620: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==620); { yylhsminor.yy232 = yymsp[0].minor.yy232; } -#line 6983 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 410: /* literal ::= NULL */ -#line 747 "sql.y" + case 412: /* literal ::= NULL */ { yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } -#line 6989 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 411: /* literal ::= NK_QUESTION */ -#line 748 "sql.y" + case 413: /* literal ::= NK_QUESTION */ { yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 6995 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 412: /* duration_literal ::= NK_VARIABLE */ - case 587: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==587); - case 588: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==588); - case 589: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==589); -#line 750 "sql.y" + case 414: /* duration_literal ::= NK_VARIABLE */ + case 589: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==589); + case 590: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==590); + case 591: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==591); { yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 7004 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 413: /* signed ::= NK_INTEGER */ -#line 752 "sql.y" + case 415: /* signed ::= NK_INTEGER */ { yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } -#line 7010 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 414: /* signed ::= NK_PLUS NK_INTEGER */ -#line 753 "sql.y" + case 416: /* signed ::= NK_PLUS NK_INTEGER */ { yymsp[-1].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } -#line 7016 "sql.c" break; - case 415: /* signed ::= NK_MINUS NK_INTEGER */ -#line 754 "sql.y" + case 417: /* 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.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } -#line 7025 "sql.c" yymsp[-1].minor.yy232 = yylhsminor.yy232; break; - case 416: /* signed ::= NK_FLOAT */ -#line 759 "sql.y" + case 418: /* signed ::= NK_FLOAT */ { yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } -#line 7031 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 417: /* signed ::= NK_PLUS NK_FLOAT */ -#line 760 "sql.y" + case 419: /* signed ::= NK_PLUS NK_FLOAT */ { yymsp[-1].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } -#line 7037 "sql.c" break; - case 418: /* signed ::= NK_MINUS NK_FLOAT */ -#line 761 "sql.y" + case 420: /* 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.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } -#line 7046 "sql.c" yymsp[-1].minor.yy232 = yylhsminor.yy232; break; - case 420: /* signed_literal ::= NK_STRING */ -#line 768 "sql.y" + case 422: /* signed_literal ::= NK_STRING */ { yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } -#line 7052 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 421: /* signed_literal ::= NK_BOOL */ -#line 769 "sql.y" + case 423: /* signed_literal ::= NK_BOOL */ { yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } -#line 7058 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 422: /* signed_literal ::= TIMESTAMP NK_STRING */ -#line 770 "sql.y" + case 424: /* signed_literal ::= TIMESTAMP NK_STRING */ { yymsp[-1].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } -#line 7064 "sql.c" break; - case 423: /* signed_literal ::= duration_literal */ - case 425: /* signed_literal ::= literal_func */ yytestcase(yyruleno==425); - case 500: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==500); - case 566: /* select_item ::= common_expression */ yytestcase(yyruleno==566); - case 576: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==576); - case 617: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==617); - case 619: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==619); - case 632: /* search_condition ::= common_expression */ yytestcase(yyruleno==632); -#line 771 "sql.y" + case 425: /* signed_literal ::= duration_literal */ + case 427: /* signed_literal ::= literal_func */ yytestcase(yyruleno==427); + case 502: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==502); + case 568: /* select_item ::= common_expression */ yytestcase(yyruleno==568); + case 578: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==578); + case 619: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==619); + case 621: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==621); + case 634: /* search_condition ::= common_expression */ yytestcase(yyruleno==634); { yylhsminor.yy232 = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); } -#line 7076 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 424: /* signed_literal ::= NULL */ -#line 772 "sql.y" + case 426: /* signed_literal ::= NULL */ { yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } -#line 7082 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 426: /* signed_literal ::= NK_QUESTION */ -#line 774 "sql.y" + case 428: /* signed_literal ::= NK_QUESTION */ { yylhsminor.yy232 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } -#line 7088 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 444: /* expression ::= pseudo_column */ -#line 836 "sql.y" + case 446: /* expression ::= pseudo_column */ { yylhsminor.yy232 = yymsp[0].minor.yy232; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy232, true); } -#line 7094 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 448: /* expression ::= NK_LP expression NK_RP */ - case 534: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==534); - case 631: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==631); -#line 840 "sql.y" + case 450: /* expression ::= NK_LP expression NK_RP */ + case 536: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==536); + case 633: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==633); { yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); } -#line 7102 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 449: /* expression ::= NK_PLUS expr_or_subquery */ -#line 841 "sql.y" + case 451: /* expression ::= NK_PLUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } -#line 7111 "sql.c" yymsp[-1].minor.yy232 = yylhsminor.yy232; break; - case 450: /* expression ::= NK_MINUS expr_or_subquery */ -#line 845 "sql.y" + case 452: /* expression ::= NK_MINUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy232), NULL)); } -#line 7120 "sql.c" yymsp[-1].minor.yy232 = yylhsminor.yy232; break; - case 451: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ -#line 849 "sql.y" + case 453: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); } -#line 7130 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 452: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ -#line 854 "sql.y" + case 454: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); } -#line 7140 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 453: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ -#line 859 "sql.y" + case 455: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); } -#line 7150 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 454: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ -#line 864 "sql.y" + case 456: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); } -#line 7160 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 455: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ -#line 869 "sql.y" + case 457: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); } -#line 7170 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 456: /* expression ::= column_reference NK_ARROW NK_STRING */ -#line 874 "sql.y" + case 458: /* expression ::= column_reference NK_ARROW NK_STRING */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } -#line 7179 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 457: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ -#line 878 "sql.y" + case 459: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); } -#line 7189 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 458: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ -#line 883 "sql.y" + case 460: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); } -#line 7199 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 461: /* column_reference ::= column_name */ -#line 894 "sql.y" + case 463: /* column_reference ::= column_name */ { yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy993, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy993)); } -#line 7205 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 462: /* column_reference ::= table_name NK_DOT column_name */ -#line 895 "sql.y" + case 464: /* column_reference ::= table_name NK_DOT column_name */ { yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993, createColumnNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993)); } -#line 7211 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 463: /* column_reference ::= NK_ALIAS */ -#line 896 "sql.y" + case 465: /* column_reference ::= NK_ALIAS */ { yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } -#line 7217 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 464: /* column_reference ::= table_name NK_DOT NK_ALIAS */ -#line 897 "sql.y" + case 466: /* column_reference ::= table_name NK_DOT NK_ALIAS */ { yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0)); } -#line 7223 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 465: /* pseudo_column ::= ROWTS */ - case 466: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==466); - case 468: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==468); - case 469: /* pseudo_column ::= QEND */ yytestcase(yyruleno==469); - case 470: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==470); - case 471: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==471); - case 472: /* pseudo_column ::= WEND */ yytestcase(yyruleno==472); - case 473: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==473); - case 474: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==474); - case 475: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==475); - case 476: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==476); - case 482: /* literal_func ::= NOW */ yytestcase(yyruleno==482); -#line 899 "sql.y" + case 467: /* pseudo_column ::= ROWTS */ + case 468: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==468); + case 470: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==470); + case 471: /* pseudo_column ::= QEND */ yytestcase(yyruleno==471); + case 472: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==472); + case 473: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==473); + case 474: /* pseudo_column ::= WEND */ yytestcase(yyruleno==474); + case 475: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==475); + case 476: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==476); + case 477: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==477); + case 478: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==478); + case 484: /* literal_func ::= NOW */ yytestcase(yyruleno==484); { yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } -#line 7240 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 467: /* pseudo_column ::= table_name NK_DOT TBNAME */ -#line 901 "sql.y" + case 469: /* pseudo_column ::= table_name NK_DOT TBNAME */ { yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy993)))); } -#line 7246 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 477: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 478: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==478); -#line 912 "sql.y" + case 479: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 480: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==480); { yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy993, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy993, yymsp[-1].minor.yy88)); } -#line 7253 "sql.c" yymsp[-3].minor.yy232 = yylhsminor.yy232; break; - case 479: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ -#line 915 "sql.y" + case 481: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ { yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), yymsp[-1].minor.yy400)); } -#line 7259 "sql.c" yymsp[-5].minor.yy232 = yylhsminor.yy232; break; - case 481: /* literal_func ::= noarg_func NK_LP NK_RP */ -#line 918 "sql.y" + case 483: /* literal_func ::= noarg_func NK_LP NK_RP */ { yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy993, NULL)); } -#line 7265 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 496: /* star_func_para_list ::= NK_STAR */ -#line 942 "sql.y" + case 498: /* star_func_para_list ::= NK_STAR */ { yylhsminor.yy88 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } -#line 7271 "sql.c" yymsp[0].minor.yy88 = yylhsminor.yy88; break; - case 501: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 569: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==569); -#line 951 "sql.y" + case 503: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 571: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==571); { yylhsminor.yy232 = createColumnNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0); } -#line 7278 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 502: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ -#line 954 "sql.y" + case 504: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ { yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy88, yymsp[-1].minor.yy232)); } -#line 7284 "sql.c" yymsp[-3].minor.yy232 = yylhsminor.yy232; break; - case 503: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ -#line 956 "sql.y" + case 505: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ { yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), yymsp[-2].minor.yy88, yymsp[-1].minor.yy232)); } -#line 7290 "sql.c" yymsp[-4].minor.yy232 = yylhsminor.yy232; break; - case 506: /* when_then_expr ::= WHEN common_expression THEN common_expression */ -#line 963 "sql.y" + case 508: /* when_then_expr ::= WHEN common_expression THEN common_expression */ { yymsp[-3].minor.yy232 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } -#line 7296 "sql.c" break; - case 508: /* case_when_else_opt ::= ELSE common_expression */ -#line 966 "sql.y" + case 510: /* case_when_else_opt ::= ELSE common_expression */ { yymsp[-1].minor.yy232 = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); } -#line 7301 "sql.c" break; - case 509: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 514: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==514); -#line 969 "sql.y" + case 511: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 516: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==516); { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy708, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); } -#line 7311 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 510: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ -#line 976 "sql.y" + case 512: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy232); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy232), releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); } -#line 7321 "sql.c" yymsp[-4].minor.yy232 = yylhsminor.yy232; break; - case 511: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ -#line 982 "sql.y" + case 513: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy232); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy232), releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); } -#line 7331 "sql.c" yymsp[-5].minor.yy232 = yylhsminor.yy232; break; - case 512: /* predicate ::= expr_or_subquery IS NULL */ -#line 987 "sql.y" + case 514: /* predicate ::= expr_or_subquery IS NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), NULL)); } -#line 7340 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 513: /* predicate ::= expr_or_subquery IS NOT NULL */ -#line 991 "sql.y" + case 515: /* predicate ::= expr_or_subquery IS NOT NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy232); yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), NULL)); } -#line 7349 "sql.c" yymsp[-3].minor.yy232 = yylhsminor.yy232; break; - case 515: /* compare_op ::= NK_LT */ -#line 1003 "sql.y" + case 517: /* compare_op ::= NK_LT */ { yymsp[0].minor.yy708 = OP_TYPE_LOWER_THAN; } -#line 7355 "sql.c" break; - case 516: /* compare_op ::= NK_GT */ -#line 1004 "sql.y" + case 518: /* compare_op ::= NK_GT */ { yymsp[0].minor.yy708 = OP_TYPE_GREATER_THAN; } -#line 7360 "sql.c" break; - case 517: /* compare_op ::= NK_LE */ -#line 1005 "sql.y" + case 519: /* compare_op ::= NK_LE */ { yymsp[0].minor.yy708 = OP_TYPE_LOWER_EQUAL; } -#line 7365 "sql.c" break; - case 518: /* compare_op ::= NK_GE */ -#line 1006 "sql.y" + case 520: /* compare_op ::= NK_GE */ { yymsp[0].minor.yy708 = OP_TYPE_GREATER_EQUAL; } -#line 7370 "sql.c" break; - case 519: /* compare_op ::= NK_NE */ -#line 1007 "sql.y" + case 521: /* compare_op ::= NK_NE */ { yymsp[0].minor.yy708 = OP_TYPE_NOT_EQUAL; } -#line 7375 "sql.c" break; - case 520: /* compare_op ::= NK_EQ */ -#line 1008 "sql.y" + case 522: /* compare_op ::= NK_EQ */ { yymsp[0].minor.yy708 = OP_TYPE_EQUAL; } -#line 7380 "sql.c" break; - case 521: /* compare_op ::= LIKE */ -#line 1009 "sql.y" + case 523: /* compare_op ::= LIKE */ { yymsp[0].minor.yy708 = OP_TYPE_LIKE; } -#line 7385 "sql.c" break; - case 522: /* compare_op ::= NOT LIKE */ -#line 1010 "sql.y" + case 524: /* compare_op ::= NOT LIKE */ { yymsp[-1].minor.yy708 = OP_TYPE_NOT_LIKE; } -#line 7390 "sql.c" break; - case 523: /* compare_op ::= MATCH */ -#line 1011 "sql.y" + case 525: /* compare_op ::= MATCH */ { yymsp[0].minor.yy708 = OP_TYPE_MATCH; } -#line 7395 "sql.c" break; - case 524: /* compare_op ::= NMATCH */ -#line 1012 "sql.y" + case 526: /* compare_op ::= NMATCH */ { yymsp[0].minor.yy708 = OP_TYPE_NMATCH; } -#line 7400 "sql.c" break; - case 525: /* compare_op ::= CONTAINS */ -#line 1013 "sql.y" + case 527: /* compare_op ::= CONTAINS */ { yymsp[0].minor.yy708 = OP_TYPE_JSON_CONTAINS; } -#line 7405 "sql.c" break; - case 526: /* in_op ::= IN */ -#line 1017 "sql.y" + case 528: /* in_op ::= IN */ { yymsp[0].minor.yy708 = OP_TYPE_IN; } -#line 7410 "sql.c" break; - case 527: /* in_op ::= NOT IN */ -#line 1018 "sql.y" + case 529: /* in_op ::= NOT IN */ { yymsp[-1].minor.yy708 = OP_TYPE_NOT_IN; } -#line 7415 "sql.c" break; - case 528: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -#line 1020 "sql.y" + case 530: /* in_predicate_value ::= NK_LP literal_list NK_RP */ { yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy88)); } -#line 7420 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 530: /* boolean_value_expression ::= NOT boolean_primary */ -#line 1024 "sql.y" + case 532: /* boolean_value_expression ::= NOT boolean_primary */ { SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy232), NULL)); } -#line 7429 "sql.c" yymsp[-1].minor.yy232 = yylhsminor.yy232; break; - case 531: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ -#line 1029 "sql.y" + case 533: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); } -#line 7439 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 532: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ -#line 1035 "sql.y" + case 534: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); } -#line 7449 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 540: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -#line 1053 "sql.y" + case 542: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ { yylhsminor.yy232 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy232, yymsp[0].minor.yy232, NULL); } -#line 7455 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 543: /* table_primary ::= table_name alias_opt */ -#line 1059 "sql.y" + case 545: /* table_primary ::= table_name alias_opt */ { yylhsminor.yy232 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy993, &yymsp[0].minor.yy993); } -#line 7461 "sql.c" yymsp[-1].minor.yy232 = yylhsminor.yy232; break; - case 544: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -#line 1060 "sql.y" + case 546: /* table_primary ::= db_name NK_DOT table_name alias_opt */ { yylhsminor.yy232 = createRealTableNode(pCxt, &yymsp[-3].minor.yy993, &yymsp[-1].minor.yy993, &yymsp[0].minor.yy993); } -#line 7467 "sql.c" yymsp[-3].minor.yy232 = yylhsminor.yy232; break; - case 545: /* table_primary ::= subquery alias_opt */ -#line 1061 "sql.y" + case 547: /* table_primary ::= subquery alias_opt */ { yylhsminor.yy232 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232), &yymsp[0].minor.yy993); } -#line 7473 "sql.c" yymsp[-1].minor.yy232 = yylhsminor.yy232; break; - case 547: /* alias_opt ::= */ -#line 1066 "sql.y" + case 549: /* alias_opt ::= */ { yymsp[1].minor.yy993 = nil_token; } -#line 7479 "sql.c" break; - case 549: /* alias_opt ::= AS table_alias */ -#line 1068 "sql.y" + case 551: /* alias_opt ::= AS table_alias */ { yymsp[-1].minor.yy993 = yymsp[0].minor.yy993; } -#line 7484 "sql.c" break; - case 550: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 551: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==551); -#line 1070 "sql.y" + case 552: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 553: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==553); { yymsp[-2].minor.yy232 = yymsp[-1].minor.yy232; } -#line 7490 "sql.c" break; - case 552: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -#line 1075 "sql.y" + case 554: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ { yylhsminor.yy232 = createJoinTableNode(pCxt, yymsp[-4].minor.yy436, yymsp[-5].minor.yy232, yymsp[-2].minor.yy232, yymsp[0].minor.yy232); } -#line 7495 "sql.c" yymsp[-5].minor.yy232 = yylhsminor.yy232; break; - case 553: /* join_type ::= */ -#line 1079 "sql.y" + case 555: /* join_type ::= */ { yymsp[1].minor.yy436 = JOIN_TYPE_INNER; } -#line 7501 "sql.c" break; - case 554: /* join_type ::= INNER */ -#line 1080 "sql.y" + case 556: /* join_type ::= INNER */ { yymsp[0].minor.yy436 = JOIN_TYPE_INNER; } -#line 7506 "sql.c" break; - case 555: /* query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ -#line 1086 "sql.y" + case 557: /* 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.yy232 = createSelectStmt(pCxt, yymsp[-11].minor.yy985, yymsp[-9].minor.yy88, yymsp[-8].minor.yy232, yymsp[-12].minor.yy88); yymsp[-13].minor.yy232 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy232, yymsp[-10].minor.yy985); @@ -7519,224 +6410,145 @@ static YYACTIONTYPE yy_reduce( yymsp[-13].minor.yy232 = addEveryClause(pCxt, yymsp[-13].minor.yy232, yymsp[-4].minor.yy232); yymsp[-13].minor.yy232 = addFillClause(pCxt, yymsp[-13].minor.yy232, yymsp[-3].minor.yy232); } -#line 7522 "sql.c" break; - case 556: /* hint_list ::= */ -#line 1101 "sql.y" + case 558: /* hint_list ::= */ { yymsp[1].minor.yy88 = createHintNodeList(pCxt, NULL); } -#line 7527 "sql.c" break; - case 557: /* hint_list ::= NK_HINT */ -#line 1102 "sql.y" + case 559: /* hint_list ::= NK_HINT */ { yylhsminor.yy88 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } -#line 7532 "sql.c" yymsp[0].minor.yy88 = yylhsminor.yy88; break; - case 562: /* set_quantifier_opt ::= ALL */ -#line 1113 "sql.y" + case 564: /* set_quantifier_opt ::= ALL */ { yymsp[0].minor.yy985 = false; } -#line 7538 "sql.c" break; - case 565: /* select_item ::= NK_STAR */ -#line 1120 "sql.y" + case 567: /* select_item ::= NK_STAR */ { yylhsminor.yy232 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } -#line 7543 "sql.c" yymsp[0].minor.yy232 = yylhsminor.yy232; break; - case 567: /* select_item ::= common_expression column_alias */ - case 577: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==577); -#line 1122 "sql.y" + case 569: /* select_item ::= common_expression column_alias */ + case 579: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==579); { yylhsminor.yy232 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232), &yymsp[0].minor.yy993); } -#line 7550 "sql.c" yymsp[-1].minor.yy232 = yylhsminor.yy232; break; - case 568: /* select_item ::= common_expression AS column_alias */ - case 578: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==578); -#line 1123 "sql.y" + case 570: /* select_item ::= common_expression AS column_alias */ + case 580: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==580); { yylhsminor.yy232 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), &yymsp[0].minor.yy993); } -#line 7557 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 573: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 601: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==601); - case 621: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==621); -#line 1132 "sql.y" + case 575: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 603: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==603); + case 623: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==623); { yymsp[-2].minor.yy88 = yymsp[0].minor.yy88; } -#line 7565 "sql.c" break; - case 580: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ -#line 1145 "sql.y" + case 582: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ { yymsp[-5].minor.yy232 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); } -#line 7570 "sql.c" break; - case 581: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -#line 1146 "sql.y" + case 583: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ { yymsp[-3].minor.yy232 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); } -#line 7575 "sql.c" break; - case 582: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ -#line 1148 "sql.y" + case 584: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-5].minor.yy232 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), NULL, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } -#line 7580 "sql.c" break; - case 583: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ -#line 1152 "sql.y" + case 585: /* 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.yy232 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy232), releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } -#line 7585 "sql.c" break; - case 584: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ -#line 1154 "sql.y" + case 586: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ { yymsp[-6].minor.yy232 = createEventWindowNode(pCxt, yymsp[-3].minor.yy232, yymsp[0].minor.yy232); } -#line 7590 "sql.c" break; - case 591: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -#line 1164 "sql.y" + case 593: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ { yymsp[-3].minor.yy232 = createFillNode(pCxt, yymsp[-1].minor.yy246, NULL); } -#line 7595 "sql.c" break; - case 592: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ -#line 1165 "sql.y" + case 594: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ { yymsp[-5].minor.yy232 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy88)); } -#line 7600 "sql.c" break; - case 593: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ -#line 1166 "sql.y" + case 595: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ { yymsp[-5].minor.yy232 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy88)); } -#line 7605 "sql.c" break; - case 594: /* fill_mode ::= NONE */ -#line 1170 "sql.y" + case 596: /* fill_mode ::= NONE */ { yymsp[0].minor.yy246 = FILL_MODE_NONE; } -#line 7610 "sql.c" break; - case 595: /* fill_mode ::= PREV */ -#line 1171 "sql.y" + case 597: /* fill_mode ::= PREV */ { yymsp[0].minor.yy246 = FILL_MODE_PREV; } -#line 7615 "sql.c" break; - case 596: /* fill_mode ::= NULL */ -#line 1172 "sql.y" + case 598: /* fill_mode ::= NULL */ { yymsp[0].minor.yy246 = FILL_MODE_NULL; } -#line 7620 "sql.c" break; - case 597: /* fill_mode ::= NULL_F */ -#line 1173 "sql.y" + case 599: /* fill_mode ::= NULL_F */ { yymsp[0].minor.yy246 = FILL_MODE_NULL_F; } -#line 7625 "sql.c" break; - case 598: /* fill_mode ::= LINEAR */ -#line 1174 "sql.y" + case 600: /* fill_mode ::= LINEAR */ { yymsp[0].minor.yy246 = FILL_MODE_LINEAR; } -#line 7630 "sql.c" break; - case 599: /* fill_mode ::= NEXT */ -#line 1175 "sql.y" + case 601: /* fill_mode ::= NEXT */ { yymsp[0].minor.yy246 = FILL_MODE_NEXT; } -#line 7635 "sql.c" break; - case 602: /* group_by_list ::= expr_or_subquery */ -#line 1184 "sql.y" + case 604: /* group_by_list ::= expr_or_subquery */ { yylhsminor.yy88 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); } -#line 7640 "sql.c" yymsp[0].minor.yy88 = yylhsminor.yy88; break; - case 603: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ -#line 1185 "sql.y" + case 605: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ { yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); } -#line 7646 "sql.c" yymsp[-2].minor.yy88 = yylhsminor.yy88; break; - case 607: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ -#line 1192 "sql.y" + case 609: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ { yymsp[-5].minor.yy232 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); } -#line 7652 "sql.c" break; - case 608: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ -#line 1194 "sql.y" + case 610: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ { yymsp[-3].minor.yy232 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); } -#line 7657 "sql.c" break; - case 611: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ -#line 1201 "sql.y" + case 613: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { yylhsminor.yy232 = addOrderByClause(pCxt, yymsp[-3].minor.yy232, yymsp[-2].minor.yy88); yylhsminor.yy232 = addSlimitClause(pCxt, yylhsminor.yy232, yymsp[-1].minor.yy232); yylhsminor.yy232 = addLimitClause(pCxt, yylhsminor.yy232, yymsp[0].minor.yy232); } -#line 7666 "sql.c" yymsp[-3].minor.yy232 = yylhsminor.yy232; break; - case 614: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ -#line 1211 "sql.y" + case 616: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ { yylhsminor.yy232 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy232, yymsp[0].minor.yy232); } -#line 7672 "sql.c" yymsp[-3].minor.yy232 = yylhsminor.yy232; break; - case 615: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ -#line 1213 "sql.y" + case 617: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ { yylhsminor.yy232 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy232, yymsp[0].minor.yy232); } -#line 7678 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 623: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 627: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==627); -#line 1227 "sql.y" + case 625: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 629: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==629); { yymsp[-1].minor.yy232 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } -#line 7685 "sql.c" break; - case 624: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 628: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==628); -#line 1228 "sql.y" + case 626: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 630: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==630); { yymsp[-3].minor.yy232 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } -#line 7691 "sql.c" break; - case 625: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 629: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==629); -#line 1229 "sql.y" + case 627: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 631: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==631); { yymsp[-3].minor.yy232 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } -#line 7697 "sql.c" break; - case 630: /* subquery ::= NK_LP query_expression NK_RP */ -#line 1237 "sql.y" + case 632: /* subquery ::= NK_LP query_expression NK_RP */ { yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy232); } -#line 7702 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 635: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ -#line 1251 "sql.y" + case 637: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ { yylhsminor.yy232 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), yymsp[-1].minor.yy834, yymsp[0].minor.yy153); } -#line 7708 "sql.c" yymsp[-2].minor.yy232 = yylhsminor.yy232; break; - case 636: /* ordering_specification_opt ::= */ -#line 1255 "sql.y" + case 638: /* ordering_specification_opt ::= */ { yymsp[1].minor.yy834 = ORDER_ASC; } -#line 7714 "sql.c" break; - case 637: /* ordering_specification_opt ::= ASC */ -#line 1256 "sql.y" + case 639: /* ordering_specification_opt ::= ASC */ { yymsp[0].minor.yy834 = ORDER_ASC; } -#line 7719 "sql.c" break; - case 638: /* ordering_specification_opt ::= DESC */ -#line 1257 "sql.y" + case 640: /* ordering_specification_opt ::= DESC */ { yymsp[0].minor.yy834 = ORDER_DESC; } -#line 7724 "sql.c" break; - case 639: /* null_ordering_opt ::= */ -#line 1261 "sql.y" + case 641: /* null_ordering_opt ::= */ { yymsp[1].minor.yy153 = NULL_ORDER_DEFAULT; } -#line 7729 "sql.c" break; - case 640: /* null_ordering_opt ::= NULLS FIRST */ -#line 1262 "sql.y" + case 642: /* null_ordering_opt ::= NULLS FIRST */ { yymsp[-1].minor.yy153 = NULL_ORDER_FIRST; } -#line 7734 "sql.c" break; - case 641: /* null_ordering_opt ::= NULLS LAST */ -#line 1263 "sql.y" + case 643: /* null_ordering_opt ::= NULLS LAST */ { yymsp[-1].minor.yy153 = NULL_ORDER_LAST; } -#line 7739 "sql.c" break; default: break; @@ -7798,7 +6610,6 @@ static void yy_syntax_error( ParseCTX_FETCH #define TOKEN yyminor /************ Begin %syntax_error code ****************************************/ -#line 29 "sql.y" if (TSDB_CODE_SUCCESS == pCxt->errCode) { if(TOKEN.z) { @@ -7809,7 +6620,6 @@ static void yy_syntax_error( } else if (TSDB_CODE_PAR_DB_NOT_SPECIFIED == pCxt->errCode && TK_NK_FLOAT == TOKEN.type) { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z); } -#line 7812 "sql.c" /************ End %syntax_error code ******************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument variable */ ParseCTX_STORE @@ -7895,56 +6705,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 @@ -8000,13 +6766,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 @@ -8056,7 +6823,7 @@ void Parse( break; #endif } - } + }while( yypParser->yytos>yypParser->yystack ); #ifndef NDEBUG if( yyTraceFILE ){ yyStackEntry *i; From 1f5384ad409d491ee6d37649c95d3d9edaaf212c Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 19 Dec 2023 18:02:53 +0800 Subject: [PATCH 14/93] feat: support uniq active code --- include/common/tgrant.h | 1 + include/common/tmsg.h | 1 + include/common/ttokendef.h | 210 +++++++++++------------ include/util/taoserror.h | 1 + source/dnode/mnode/impl/inc/mndInt.h | 6 + source/dnode/mnode/impl/src/mndCluster.c | 7 +- source/dnode/mnode/impl/src/mndDnode.c | 36 +++- source/dnode/mnode/impl/src/mndMain.c | 20 ++- source/util/src/terror.c | 1 + 9 files changed, 165 insertions(+), 118 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index 52f81e5b80f..e0fc499fea6 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -62,6 +62,7 @@ typedef struct { } SGrantedInfo; int32_t grantCheck(EGrantType grant); +int32_t grantAlterActiveCode(const char* active); char* grantGetMachineId(); #ifndef GRANTS_CFG diff --git a/include/common/tmsg.h b/include/common/tmsg.h index f815d689c58..2be158789f1 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1600,6 +1600,7 @@ typedef struct { SEp ep; char active[TSDB_ACTIVE_KEY_LEN]; char connActive[TSDB_CONN_ACTIVE_KEY_LEN]; + char machineId[TSDB_MACHINE_ID_LEN + 1]; } SDnodeInfo; typedef struct { diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index bdee3934fe2..bd711002aee 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -74,111 +74,111 @@ #define TK_NK_IPTOKEN 55 #define TK_FORCE 56 #define TK_UNSAFE 57 -#define TK_LOCAL 58 -#define TK_QNODE 59 -#define TK_BNODE 60 -#define TK_SNODE 61 -#define TK_MNODE 62 -#define TK_VNODE 63 -#define TK_DATABASE 64 -#define TK_USE 65 -#define TK_FLUSH 66 -#define TK_TRIM 67 -#define TK_COMPACT 68 -#define TK_IF 69 -#define TK_NOT 70 -#define TK_EXISTS 71 -#define TK_BUFFER 72 -#define TK_CACHEMODEL 73 -#define TK_CACHESIZE 74 -#define TK_COMP 75 -#define TK_DURATION 76 -#define TK_NK_VARIABLE 77 -#define TK_MAXROWS 78 -#define TK_MINROWS 79 -#define TK_KEEP 80 -#define TK_PAGES 81 -#define TK_PAGESIZE 82 -#define TK_TSDB_PAGESIZE 83 -#define TK_PRECISION 84 -#define TK_REPLICA 85 -#define TK_VGROUPS 86 -#define TK_SINGLE_STABLE 87 -#define TK_RETENTIONS 88 -#define TK_SCHEMALESS 89 -#define TK_WAL_LEVEL 90 -#define TK_WAL_FSYNC_PERIOD 91 -#define TK_WAL_RETENTION_PERIOD 92 -#define TK_WAL_RETENTION_SIZE 93 -#define TK_WAL_ROLL_PERIOD 94 -#define TK_WAL_SEGMENT_SIZE 95 -#define TK_STT_TRIGGER 96 -#define TK_TABLE_PREFIX 97 -#define TK_TABLE_SUFFIX 98 -#define TK_KEEP_TIME_OFFSET 99 -#define TK_NK_COLON 100 -#define TK_BWLIMIT 101 -#define TK_START 102 -#define TK_TIMESTAMP 103 -#define TK_END 104 -#define TK_TABLE 105 -#define TK_NK_LP 106 -#define TK_NK_RP 107 -#define TK_STABLE 108 -#define TK_COLUMN 109 -#define TK_MODIFY 110 -#define TK_RENAME 111 -#define TK_TAG 112 -#define TK_SET 113 -#define TK_NK_EQ 114 -#define TK_USING 115 -#define TK_TAGS 116 -#define TK_BOOL 117 -#define TK_TINYINT 118 -#define TK_SMALLINT 119 -#define TK_INT 120 -#define TK_INTEGER 121 -#define TK_BIGINT 122 -#define TK_FLOAT 123 -#define TK_DOUBLE 124 -#define TK_BINARY 125 -#define TK_NCHAR 126 -#define TK_UNSIGNED 127 -#define TK_JSON 128 -#define TK_VARCHAR 129 -#define TK_MEDIUMBLOB 130 -#define TK_BLOB 131 -#define TK_VARBINARY 132 -#define TK_GEOMETRY 133 -#define TK_DECIMAL 134 -#define TK_COMMENT 135 -#define TK_MAX_DELAY 136 -#define TK_WATERMARK 137 -#define TK_ROLLUP 138 -#define TK_TTL 139 -#define TK_SMA 140 -#define TK_DELETE_MARK 141 -#define TK_FIRST 142 -#define TK_LAST 143 -#define TK_SHOW 144 -#define TK_PRIVILEGES 145 -#define TK_DATABASES 146 -#define TK_TABLES 147 -#define TK_STABLES 148 -#define TK_MNODES 149 -#define TK_QNODES 150 -#define TK_FUNCTIONS 151 -#define TK_INDEXES 152 -#define TK_ACCOUNTS 153 -#define TK_APPS 154 -#define TK_CONNECTIONS 155 -#define TK_LICENCES 156 -#define TK_GRANTS 157 -#define TK_QUERIES 158 -#define TK_SCORES 159 -#define TK_TOPICS 160 -#define TK_VARIABLES 161 -#define TK_CLUSTER 162 +#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_FUNCTIONS 152 +#define TK_INDEXES 153 +#define TK_ACCOUNTS 154 +#define TK_APPS 155 +#define TK_CONNECTIONS 156 +#define TK_LICENCES 157 +#define TK_GRANTS 158 +#define TK_QUERIES 159 +#define TK_SCORES 160 +#define TK_TOPICS 161 +#define TK_VARIABLES 162 #define TK_BNODES 163 #define TK_SNODES 164 #define TK_TRANSACTIONS 165 diff --git a/include/util/taoserror.h b/include/util/taoserror.h index b53b138e79a..da93e25bed4 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -562,6 +562,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_GRANT_GEN_APP_LIMIT TAOS_DEF_ERROR_CODE(0, 0x0813) #define TSDB_CODE_GRANT_GEN_ENC_IVLD_KLEN TAOS_DEF_ERROR_CODE(0, 0x0814) #define TSDB_CODE_GRANT_PAR_IVLD_DIST TAOS_DEF_ERROR_CODE(0, 0x0815) +#define TSDB_CODE_GRANT_INVALID_HW TAOS_DEF_ERROR_CODE(0, 0x0816) // sync // #define TSDB_CODE_SYN_INVALID_CONFIG TAOS_DEF_ERROR_CODE(0, 0x0900) // 2.x diff --git a/source/dnode/mnode/impl/inc/mndInt.h b/source/dnode/mnode/impl/inc/mndInt.h index 72f9ec17358..3c05c9e258f 100644 --- a/source/dnode/mnode/impl/inc/mndInt.h +++ b/source/dnode/mnode/impl/inc/mndInt.h @@ -25,6 +25,7 @@ #include "tglobal.h" #include "tgrant.h" #include "tqueue.h" +#include "tref.h" #include "ttime.h" #include "version.h" #include "wal.h" @@ -106,6 +107,7 @@ typedef struct { typedef struct SMnode { int32_t selfDnodeId; + int32_t refMgmt; int64_t clusterId; TdThread thread; TdThreadRwlock lock; @@ -133,6 +135,10 @@ typedef struct SMnode { int64_t ipWhiteVer; } SMnode; +typedef struct { + RefFp freeFp; +} SMnodeRefInfo; + void mndSetMsgHandle(SMnode *pMnode, tmsg_t msgType, MndMsgFp fp); int64_t mndGenerateUid(const char *name, int32_t len); diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c index d44e3cbbbc5..9e18063ee39 100644 --- a/source/dnode/mnode/impl/src/mndCluster.c +++ b/source/dnode/mnode/impl/src/mndCluster.c @@ -434,6 +434,7 @@ static int32_t mndProcessConfigClusterReq(SRpcMsg *pReq) { goto _exit; } // code = xxx; + code = grantAlterActiveCode(cfgReq.value); #else code = TSDB_CODE_OPS_NOT_SUPPORT; goto _exit; @@ -447,11 +448,11 @@ _exit: tFreeSMCfgClusterReq(&cfgReq); if (code != 0) { terrno = code; - mError("cluster: failed to config:%s, %s since %s", cfgReq.config, cfgReq.value, terrstr()); + mError("cluster: failed to config:%s %s since %s", cfgReq.config, cfgReq.value, terrstr()); } else { - mError("cluster: success to config:%s, %s", cfgReq.config, cfgReq.value); + mInfo("cluster: success to config:%s %s", cfgReq.config, cfgReq.value); } - return -1; + return code; } static int32_t mndProcessConfigClusterRsp(SRpcMsg *pRsp) { diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index 856d2a1e1e7..414de7513e3 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -59,8 +59,10 @@ enum { }; typedef struct { - char machineId[TSDB_MACHINE_ID_LEN + 1]; - tsem_t sem; + SMnodeRefInfo refInfo; + int64_t refId; + tsem_t sem; + char machineId[TSDB_MACHINE_ID_LEN + 1]; } SMachineInfo; static int32_t mndCreateDefaultDnode(SMnode *pMnode); @@ -416,6 +418,7 @@ void mndGetDnodeData(SMnode *pMnode, SArray *pDnodeInfo) { tstrncpy(dInfo.ep.fqdn, pDnode->fqdn, TSDB_FQDN_LEN); tstrncpy(dInfo.active, pDnode->active, TSDB_ACTIVE_KEY_LEN); tstrncpy(dInfo.connActive, pDnode->connActive, TSDB_CONN_ACTIVE_KEY_LEN); + tstrncpy(dInfo.machineId, pDnode->machineId, TSDB_MACHINE_ID_LEN + 1); sdbRelease(pSdb, pDnode); if (mndIsMnode(pMnode, pDnode->id)) { dInfo.isMnode = 1; @@ -743,13 +746,19 @@ _OVER: } static int32_t mndSendGetMachineToDnode(SMnode *pMnode, SDnodeObj *pObj, SMachineInfo *pInfo) { - SRpcMsg rpcMsg = {.pCont = NULL, .contLen = 0, .msgType = TDMT_MND_GET_MACHINE, .info.ahandle = pInfo}; + SRpcMsg rpcMsg = {.pCont = NULL, .contLen = 0, .msgType = TDMT_MND_GET_MACHINE, .info.ahandle = (void*)pInfo->refId}; SEpSet epSet = {.numOfEps = 1}; strncpy(epSet.eps[0].fqdn, pObj->fqdn, TSDB_FQDN_LEN); epSet.eps[0].port = pObj->port; return tmsgSendReq(&epSet, &rpcMsg); } +static void mndDestroyMachineInfo(void *pInfo) { + if (pInfo) { + tsem_destroy(&((SMachineInfo *)pInfo)->sem); + } +} + static int32_t mndCreateDnode(SMnode *pMnode, SRpcMsg *pReq, SCreateDnodeReq *pCreate) { int32_t code = -1; SSdbRaw *pRaw = NULL; @@ -767,7 +776,11 @@ static int32_t mndCreateDnode(SMnode *pMnode, SRpcMsg *pReq, SCreateDnodeReq *pC terrno = TSDB_CODE_OUT_OF_MEMORY; goto _OVER; } + pInfo->refInfo.freeFp = mndDestroyMachineInfo; tsem_init(&pInfo->sem, 0, 0); + if((pInfo->refId = taosAddRef(pMnode->refMgmt, pInfo)) < 0) { + goto _OVER; + } if ((terrno = mndSendGetMachineToDnode(pMnode, &dnodeObj, pInfo)) != 0) { goto _OVER; } @@ -798,8 +811,7 @@ _OVER: mndTransDrop(pTrans); sdbFreeRaw(pRaw); if (pInfo) { - tsem_destroy(&pInfo->sem); - taosMemoryFree(pInfo); + taosRemoveRef(pMnode->refMgmt, pInfo->refId); } return code; } @@ -1280,10 +1292,16 @@ static int32_t mndProcessGetMachineRsp(SRpcMsg *pRsp) { return -1; } - SMachineInfo *pInfo = pRsp->info.ahandle; - if (pInfo) { - memcpy(pInfo->machineId, pRsp->pCont, TSDB_MACHINE_ID_LEN); - tsem_post(&pInfo->sem); + SMnode *pMnode = pRsp->info.node; + int64_t refId = (int64_t)pRsp->info.ahandle; + + if (pMnode) { + SMachineInfo *pInfo = taosAcquireRef(pMnode->refMgmt, refId); + if (pInfo) { + memcpy(pInfo->machineId, pRsp->pCont, TSDB_MACHINE_ID_LEN); + tsem_post(&pInfo->sem); + taosReleaseRef(pMnode->refMgmt, refId); + } } return 0; diff --git a/source/dnode/mnode/impl/src/mndMain.c b/source/dnode/mnode/impl/src/mndMain.c index 38a92b43e77..1bcd44c9ccf 100644 --- a/source/dnode/mnode/impl/src/mndMain.c +++ b/source/dnode/mnode/impl/src/mndMain.c @@ -543,6 +543,14 @@ static void mndSetOptions(SMnode *pMnode, const SMnodeOpt *pOption) { memcpy(pMnode->syncMgmt.nodeRoles, pOption->nodeRoles, sizeof(pOption->nodeRoles)); } +static void mndDestroyRefInfo(void *pInfo) { + SMnodeRefInfo *pRefInfo = pInfo; + if (pRefInfo && pRefInfo->freeFp) { + (*pRefInfo->freeFp)(pInfo); + } + taosMemoryFree(pInfo); +} + SMnode *mndOpen(const char *path, const SMnodeOpt *pOption) { mInfo("start to open mnode in %s", path); @@ -567,7 +575,16 @@ SMnode *mndOpen(const char *path, const SMnodeOpt *pOption) { return NULL; } - int32_t code = mndCreateDir(pMnode, path); + int32_t code = 0; + if ((pMnode->refMgmt = taosOpenRef(200, mndDestroyRefInfo)) < 0) { + code = terrno; + mError("failed to open mnode since %s", terrstr()); + mndClose(pMnode); + terrno = code; + return NULL; + } + + code = mndCreateDir(pMnode, path); if (code != 0) { code = terrno; mError("failed to open mnode since %s", terrstr()); @@ -610,6 +627,7 @@ void mndClose(SMnode *pMnode) { if (pMnode != NULL) { mInfo("start to close mnode"); mndCleanupSteps(pMnode, -1); + taosCloseRef(pMnode->refMgmt); taosMemoryFreeClear(pMnode->path); taosMemoryFreeClear(pMnode); mInfo("mnode is closed"); diff --git a/source/util/src/terror.c b/source/util/src/terror.c index c29af8bc7e6..6837d5e401a 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -449,6 +449,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_IVLD_KEY, "Invalid key to gen ac TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_APP_LIMIT, "Limited app num to gen active code") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_ENC_IVLD_KLEN, "Invalid klen to encode active code") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_IVLD_DIST, "Invalid dist to parse active code") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_INVALID_HW, "Invalid hardware") // sync TAOS_DEFINE_ERROR(TSDB_CODE_SYN_TIMEOUT, "Sync timeout") From f68d7fa46d40a01e5f5d873ae3d3ad2fdcef99dc Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 19 Dec 2023 20:19:12 +0800 Subject: [PATCH 15/93] feat: support uniq grant --- source/dnode/mnode/impl/src/mndCluster.c | 37 ++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c index 9e18063ee39..ab49e308f4d 100644 --- a/source/dnode/mnode/impl/src/mndCluster.c +++ b/source/dnode/mnode/impl/src/mndCluster.c @@ -423,6 +423,17 @@ static int32_t mndProcessConfigClusterReq(SRpcMsg *pReq) { goto _exit; } + SClusterObj clusterObj = {0}; + void *pIter = NULL; + SClusterObj *pCluster = mndAcquireCluster(pMnode, &pIter); + if (!pCluster || pCluster->id <= 0) { + code = TSDB_CODE_APP_IS_STARTING; + if (pCluster) mndReleaseCluster(pMnode, pCluster, pIter); + goto _exit; + } + memcpy(&clusterObj, pCluster, sizeof(SClusterObj)); + mndReleaseCluster(pMnode, pCluster, pIter); + if (strncmp(cfgReq.config, GRANT_ACTIVE_CODE, 11) == 0) { #ifdef TD_ENTERPRISE if (strlen(cfgReq.config) >= TSDB_DNODE_CONFIG_LEN) { @@ -433,14 +444,36 @@ static int32_t mndProcessConfigClusterReq(SRpcMsg *pReq) { code = TSDB_CODE_INVALID_CFG_VALUE; goto _exit; } - // code = xxx; - code = grantAlterActiveCode(cfgReq.value); + if ((code = grantAlterActiveCode(cfgReq.value)) != 0) { + goto _exit; + } #else code = TSDB_CODE_OPS_NOT_SUPPORT; goto _exit; #endif } + STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "update-cluster"); + if (pTrans == NULL) return -1; + + SSdbRaw *pCommitRaw = mndClusterActionEncode(&clusterObj); + if (pCommitRaw == NULL || mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) { + mError("trans:%d, failed to append commit log since %s", pTrans->id, terrstr()); + mndTransDrop(pTrans); + code = terrno; + goto _exit; + } + (void)sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY); + + if (mndTransPrepare(pMnode, pTrans) != 0) { + mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); + mndTransDrop(pTrans); + code = terrno; + goto _exit; + } + + mndTransDrop(pTrans); + { // audit auditRecord(pReq, pMnode->clusterId, "alterCluster", "", "", cfgReq.sql, cfgReq.sqlLen); } From 47fedce26342123be788383d2a0061eb3bd5068d Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 21 Dec 2023 12:11:00 +0800 Subject: [PATCH 16/93] chore: more code --- include/common/tgrant.h | 2 +- include/os/osDef.h | 4 +++ include/util/taoserror.h | 3 +- source/dnode/mnode/impl/src/mndCluster.c | 40 ++++++++++++++++++++++-- source/dnode/mnode/impl/src/mndDnode.c | 2 ++ source/util/src/terror.c | 5 +-- 6 files changed, 49 insertions(+), 7 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index e0fc499fea6..317e82222f9 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -62,7 +62,7 @@ typedef struct { } SGrantedInfo; int32_t grantCheck(EGrantType grant); -int32_t grantAlterActiveCode(const char* active); +int32_t grantAlterActiveCode(const char* active, char** newActive); char* grantGetMachineId(); #ifndef GRANTS_CFG diff --git a/include/os/osDef.h b/include/os/osDef.h index 1a831f2e862..335b151cac0 100644 --- a/include/os/osDef.h +++ b/include/os/osDef.h @@ -222,6 +222,10 @@ void syslog(int unused, const char *format, ...); do { \ prctl(PR_SET_NAME, (name)); \ } while (0) +#define getThreadName(name) \ + do { \ + prctl(PR_GET_NAME, (name)); \ + } while (0) #endif #else // Windows diff --git a/include/util/taoserror.h b/include/util/taoserror.h index da93e25bed4..7cd7eac64b7 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -562,7 +562,8 @@ int32_t* taosGetErrno(); #define TSDB_CODE_GRANT_GEN_APP_LIMIT TAOS_DEF_ERROR_CODE(0, 0x0813) #define TSDB_CODE_GRANT_GEN_ENC_IVLD_KLEN TAOS_DEF_ERROR_CODE(0, 0x0814) #define TSDB_CODE_GRANT_PAR_IVLD_DIST TAOS_DEF_ERROR_CODE(0, 0x0815) -#define TSDB_CODE_GRANT_INVALID_HW TAOS_DEF_ERROR_CODE(0, 0x0816) +#define TSDB_CODE_GRANT_INVALID_SERVER TAOS_DEF_ERROR_CODE(0, 0x0816) +#define TSDB_CODE_GRANT_LACK_OF_BASIC TAOS_DEF_ERROR_CODE(0, 0x0817) // sync // #define TSDB_CODE_SYN_INVALID_CONFIG TAOS_DEF_ERROR_CODE(0, 0x0900) // 2.x diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c index 9e18063ee39..f9a22a45b61 100644 --- a/source/dnode/mnode/impl/src/mndCluster.c +++ b/source/dnode/mnode/impl/src/mndCluster.c @@ -423,6 +423,17 @@ static int32_t mndProcessConfigClusterReq(SRpcMsg *pReq) { goto _exit; } + SClusterObj clusterObj = {0}; + void *pIter = NULL; + SClusterObj *pCluster = mndAcquireCluster(pMnode, &pIter); + if (!pCluster || pCluster->id <= 0) { + code = TSDB_CODE_APP_IS_STARTING; + if (pCluster) mndReleaseCluster(pMnode, pCluster, pIter); + goto _exit; + } + memcpy(&clusterObj, pCluster, sizeof(SClusterObj)); + mndReleaseCluster(pMnode, pCluster, pIter); + if (strncmp(cfgReq.config, GRANT_ACTIVE_CODE, 11) == 0) { #ifdef TD_ENTERPRISE if (strlen(cfgReq.config) >= TSDB_DNODE_CONFIG_LEN) { @@ -433,14 +444,37 @@ static int32_t mndProcessConfigClusterReq(SRpcMsg *pReq) { code = TSDB_CODE_INVALID_CFG_VALUE; goto _exit; } - // code = xxx; - code = grantAlterActiveCode(cfgReq.value); + char *newActive = NULL; + if ((code = grantAlterActiveCode(cfgReq.value, &newActive)) != 0) { + goto _exit; + } #else code = TSDB_CODE_OPS_NOT_SUPPORT; goto _exit; #endif } + STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "update-cluster"); + if (pTrans == NULL) return -1; + + SSdbRaw *pCommitRaw = mndClusterActionEncode(&clusterObj); + if (pCommitRaw == NULL || mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) { + mError("trans:%d, failed to append commit log since %s", pTrans->id, terrstr()); + mndTransDrop(pTrans); + code = terrno; + goto _exit; + } + (void)sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY); + + if (mndTransPrepare(pMnode, pTrans) != 0) { + mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); + mndTransDrop(pTrans); + code = terrno; + goto _exit; + } + + mndTransDrop(pTrans); + { // audit auditRecord(pReq, pMnode->clusterId, "alterCluster", "", "", cfgReq.sql, cfgReq.sqlLen); } @@ -458,4 +492,4 @@ _exit: static int32_t mndProcessConfigClusterRsp(SRpcMsg *pRsp) { mInfo("config rsp from cluster"); return 0; -} \ No newline at end of file +} diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index 414de7513e3..fec8447b779 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -772,6 +772,7 @@ static int32_t mndCreateDnode(SMnode *pMnode, SRpcMsg *pReq, SCreateDnodeReq *pC dnodeObj.port = pCreate->port; tstrncpy(dnodeObj.fqdn, pCreate->fqdn, TSDB_FQDN_LEN); snprintf(dnodeObj.ep, TSDB_EP_LEN - 1, "%s:%u", pCreate->fqdn, pCreate->port); + #if 0 if (!(pInfo = taosMemoryCalloc(1, sizeof(*pInfo)))) { terrno = TSDB_CODE_OUT_OF_MEMORY; goto _OVER; @@ -793,6 +794,7 @@ static int32_t mndCreateDnode(SMnode *pMnode, SRpcMsg *pReq, SCreateDnodeReq *pC } else { mWarn("Invalid machineId:%s to create dnode:%s", pInfo->machineId, dnodeObj.fqdn); } + #endif pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_GLOBAL, pReq, "create-dnode"); if (pTrans == NULL) goto _OVER; mInfo("trans:%d, used to create dnode:%s", pTrans->id, dnodeObj.ep); diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 6837d5e401a..80aa380ace7 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -449,7 +449,8 @@ TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_IVLD_KEY, "Invalid key to gen ac TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_APP_LIMIT, "Limited app num to gen active code") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_ENC_IVLD_KLEN, "Invalid klen to encode active code") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_IVLD_DIST, "Invalid dist to parse active code") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_INVALID_HW, "Invalid hardware") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_INVALID_SERVER, "Invalid server") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_LACK_OF_BASIC, "Lack of basic function in active code") // sync TAOS_DEFINE_ERROR(TSDB_CODE_SYN_TIMEOUT, "Sync timeout") @@ -592,7 +593,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_PAR_WINDOW_NOT_ALLOWED_FUNC, "Window not allowed" TAOS_DEFINE_ERROR(TSDB_CODE_PAR_STREAM_NOT_ALLOWED_FUNC, "Stream not allowed") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_GROUP_BY_NOT_ALLOWED_FUNC, "Group by not allowd") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_INTERP_CLAUSE, "Invalid interp clause") -TAOS_DEFINE_ERROR(TSDB_CODE_PAR_NO_VALID_FUNC_IN_WIN, "Not valid function ion window") +TAOS_DEFINE_ERROR(TSDB_CODE_PAR_NO_VALID_FUNC_IN_WIN, "Not valid function in window") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_ONLY_SUPPORT_SINGLE_TABLE, "Only support single table") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_SMA_INDEX, "Invalid sma index") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_SELECTED_EXPR, "Invalid SELECTed expression") From 1169fe357a5548d6ddfa1b54ac7cec58809e5cfd Mon Sep 17 00:00:00 2001 From: kailixu Date: Fri, 5 Jan 2024 00:53:38 +0800 Subject: [PATCH 17/93] feat: uniq grant --- include/common/tgrant.h | 53 +++++++++++++------------- include/util/taoserror.h | 2 +- source/common/src/systable.c | 1 + source/dnode/mnode/impl/src/mndMnode.c | 6 +++ source/util/src/terror.c | 30 +++++++-------- 5 files changed, 50 insertions(+), 42 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index 317e82222f9..e6f2502a08f 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -52,9 +52,9 @@ typedef enum { TSDB_GRANT_STREAM_EXPIRE, TSDB_GRANT_TOPIC_EXPIRE, TSDB_GRANT_AUDIT_EXPIRE, + TSDB_GRANT_CSV_EXPIRE, TSDB_GRANT_MULTI_TIER_EXPIRE, TSDB_GRANT_BACKUP_RESTORE_EXPIRE, - TSDB_GRANT_REPLICATION_EXPIRE, } EGrantType; typedef struct { @@ -67,31 +67,32 @@ char* grantGetMachineId(); #ifndef GRANTS_CFG #ifdef TD_ENTERPRISE -#define GRANTS_SCHEMA \ - static const SSysDbTableSchema grantsSchema[] = { \ - {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "streams", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "topics", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "cpu_cores", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "multi_tier_storage_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "streams_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "topics_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "audit_log_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "backup_restore_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "data_replication_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "opc_da", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "opc_ua", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "pi", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "kafka", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "influxdb", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "mqtt", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "opentsdb", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "tdengine2.6", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "tdengine3.0", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ +#define GRANTS_SCHEMA \ + static const SSysDbTableSchema grantsSchema[] = { \ + {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "streams", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "topics", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "cpu_cores", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "multi_tier_storage_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "streams_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "topics_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "audit_log_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "csv_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "backup_restore_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "data_ins", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "opc_ua", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "pi", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "kafka", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "influxdb", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "mqtt", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "avevahistorian", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "opentsdb", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "tdengine2.6", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "tdengine3.0", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ } #else #define GRANTS_SCHEMA \ diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 7cd7eac64b7..2b1e19b2dcf 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -562,7 +562,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_GRANT_GEN_APP_LIMIT TAOS_DEF_ERROR_CODE(0, 0x0813) #define TSDB_CODE_GRANT_GEN_ENC_IVLD_KLEN TAOS_DEF_ERROR_CODE(0, 0x0814) #define TSDB_CODE_GRANT_PAR_IVLD_DIST TAOS_DEF_ERROR_CODE(0, 0x0815) -#define TSDB_CODE_GRANT_INVALID_SERVER TAOS_DEF_ERROR_CODE(0, 0x0816) +#define TSDB_CODE_GRANT_UNLICENSED_CLUSTER TAOS_DEF_ERROR_CODE(0, 0x0816) #define TSDB_CODE_GRANT_LACK_OF_BASIC TAOS_DEF_ERROR_CODE(0, 0x0817) // sync diff --git a/source/common/src/systable.c b/source/common/src/systable.c index a44977a8133..895ec808fc6 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -48,6 +48,7 @@ static const SSysDbTableSchema mnodesSchema[] = { {.name = "status", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "create_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, {.name = "role_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, + // {.name = "machine_id", .bytes = TSDB_MACHINE_ID_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, }; static const SSysDbTableSchema modulesSchema[] = { diff --git a/source/dnode/mnode/impl/src/mndMnode.c b/source/dnode/mnode/impl/src/mndMnode.c index 5a090725777..a310db61d1d 100644 --- a/source/dnode/mnode/impl/src/mndMnode.c +++ b/source/dnode/mnode/impl/src/mndMnode.c @@ -874,6 +874,12 @@ static int32_t mndRetrieveMnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); colDataSetVal(pColInfo, numOfRows, (const char *)&roleTimeMs, false); + // char machineId[25] = "JGQ8Y+huRyiz4lHnR9gHngYx"; + // char machieIdVar[26] = {0}; + // STR_WITH_MAXSIZE_TO_VARSTR(machieIdVar, (const char*)&machineId, pShow->pMeta->pSchemas[cols].bytes); + // pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + // colDataSetVal(pColInfo, numOfRows, (const char *)&machineId, false); + numOfRows++; sdbRelease(pSdb, pObj); } diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 80aa380ace7..cdb5db7aaab 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -428,19 +428,19 @@ TAOS_DEFINE_ERROR(TSDB_CODE_QRY_EXECUTOR_INTERNAL_ERROR, "Executor internal err // grant TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_EXPIRED, "License expired") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_DNODE_LIMITED, "DNode creation limited by license") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_ACCT_LIMITED, "Account creation limited by license") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_TIMESERIES_LIMITED, "Time series limited by license") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_DB_LIMITED, "DB creation limited by license") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_USER_LIMITED, "User creation limited by license") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_CONN_LIMITED, "Conn creation limited by license") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_STREAM_LIMITED, "Stream creation limited by license") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_SPEED_LIMITED, "Write speed limited by license") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_STORAGE_LIMITED, "Storage capacity limited by license") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_QUERYTIME_LIMITED, "Query time limited by license") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_CPU_LIMITED, "CPU cores limited by license") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_STABLE_LIMITED, "STable creation limited by license") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_TABLE_LIMITED, "Table creation limited by license") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_DNODE_LIMITED, "Number of dnodes has reached the licensed upper limit") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_ACCT_LIMITED, "Number of accounts has reached the licensed upper limit") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_TIMESERIES_LIMITED, "Number of time series has reached the licensed upper limit") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_DB_LIMITED, "Number of DBs has reached the licensed upper limit") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_USER_LIMITED, "Number of users has reached the licensed upper limit") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_CONN_LIMITED, "Number of connections has reached the licensed upper limit") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_STREAM_LIMITED, "Number of streams has reached the licensed upper limit") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_SPEED_LIMITED, "Write speed has reached the licensed upper limit") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_STORAGE_LIMITED, "Storage capacity has reached the licensed upper limit") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_QUERYTIME_LIMITED, "Query time has reached the licensed upper limit") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_CPU_LIMITED, "Number of CPU cores has reached the licensed upper limit") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_STABLE_LIMITED, "Number of stables has reached the licensed upper limit") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_TABLE_LIMITED, "Number of tables has reached the licensed upper limit") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_IVLD_ACTIVE, "Invalid active code") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_IVLD_KEY, "Invalid key to parse active code") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_DEC_IVLD_KEY, "Invalid key to decode active code") @@ -449,8 +449,8 @@ TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_IVLD_KEY, "Invalid key to gen ac TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_APP_LIMIT, "Limited app num to gen active code") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_ENC_IVLD_KLEN, "Invalid klen to encode active code") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_IVLD_DIST, "Invalid dist to parse active code") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_INVALID_SERVER, "Invalid server") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_LACK_OF_BASIC, "Lack of basic function in active code") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_UNLICENSED_CLUSTER, "Illegal operation, the license is being used by an unlicensed cluster") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_LACK_OF_BASIC, "Lack of basic functions in active code") // sync TAOS_DEFINE_ERROR(TSDB_CODE_SYN_TIMEOUT, "Sync timeout") From 95cb004f80405bcc18d83900cb79a991c225597b Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 17 Jan 2024 11:24:48 +0800 Subject: [PATCH 18/93] feat: support uniq active code --- include/common/tgrant.h | 4 ++-- include/util/taoserror.h | 2 +- source/dnode/mnode/impl/src/mndTopic.c | 4 ---- source/util/src/terror.c | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index e6f2502a08f..4ed7d7bd784 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -48,9 +48,9 @@ typedef enum { TSDB_GRANT_CPU_CORES, TSDB_GRANT_STABLE, TSDB_GRANT_TABLE, - TSDB_GRANT_TOPIC, + TSDB_GRANT_SUBSCRIPTION, TSDB_GRANT_STREAM_EXPIRE, - TSDB_GRANT_TOPIC_EXPIRE, + TSDB_GRANT_SUBSCRIPTION_EXPIRE, TSDB_GRANT_AUDIT_EXPIRE, TSDB_GRANT_CSV_EXPIRE, TSDB_GRANT_MULTI_TIER_EXPIRE, diff --git a/include/util/taoserror.h b/include/util/taoserror.h index c477d53b05e..f1f51c812d4 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -561,7 +561,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_GRANT_PAR_DEC_IVLD_KEY TAOS_DEF_ERROR_CODE(0, 0x0810) #define TSDB_CODE_GRANT_PAR_DEC_IVLD_KLEN TAOS_DEF_ERROR_CODE(0, 0x0811) #define TSDB_CODE_GRANT_GEN_IVLD_KEY TAOS_DEF_ERROR_CODE(0, 0x0812) -#define TSDB_CODE_GRANT_GEN_APP_LIMIT TAOS_DEF_ERROR_CODE(0, 0x0813) +#define TSDB_CODE_GRANT_GEN_ACTIVE_LEN TAOS_DEF_ERROR_CODE(0, 0x0813) #define TSDB_CODE_GRANT_GEN_ENC_IVLD_KLEN TAOS_DEF_ERROR_CODE(0, 0x0814) #define TSDB_CODE_GRANT_PAR_IVLD_DIST TAOS_DEF_ERROR_CODE(0, 0x0815) #define TSDB_CODE_GRANT_UNLICENSED_CLUSTER TAOS_DEF_ERROR_CODE(0, 0x0816) diff --git a/source/dnode/mnode/impl/src/mndTopic.c b/source/dnode/mnode/impl/src/mndTopic.c index 973b522a4d2..0d23db09e55 100644 --- a/source/dnode/mnode/impl/src/mndTopic.c +++ b/source/dnode/mnode/impl/src/mndTopic.c @@ -564,10 +564,6 @@ static int32_t mndProcessCreateTopicReq(SRpcMsg *pReq) { return code; } - if ((terrno = grantCheck(TSDB_GRANT_TOPIC)) < 0) { - goto _OVER; - } - if (tDeserializeSCMCreateTopicReq(pReq->pCont, pReq->contLen, &createTopicReq) != 0) { terrno = TSDB_CODE_INVALID_MSG; goto _OVER; diff --git a/source/util/src/terror.c b/source/util/src/terror.c index bf951ec10b8..fe8276604ab 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -448,7 +448,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_IVLD_KEY, "Invalid key to parse TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_DEC_IVLD_KEY, "Invalid key to decode active code") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_DEC_IVLD_KLEN, "Invalid klen to decode active code") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_IVLD_KEY, "Invalid key to gen active code") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_APP_LIMIT, "Limited app num to gen active code") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_ACTIVE_LEN, "Exceeded active len to gen active code") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_ENC_IVLD_KLEN, "Invalid klen to encode active code") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_IVLD_DIST, "Invalid dist to parse active code") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_UNLICENSED_CLUSTER, "Illegal operation, the license is being used by an unlicensed cluster") From 76558da849018cd414b3a72eab02edd5e84f4549 Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 18 Jan 2024 15:23:38 +0800 Subject: [PATCH 19/93] feat: support uniq grant --- include/common/systable.h | 2 + include/common/tmsg.h | 4 + include/common/ttokendef.h | 378 +- source/common/src/systable.c | 14 + source/dnode/mnode/impl/inc/mndDef.h | 66 + source/dnode/mnode/impl/inc/mndGrant.h | 27 +- source/dnode/mnode/impl/src/mndGrant.c | 64 +- source/dnode/mnode/impl/src/mndShow.c | 4 + source/dnode/mnode/sdb/inc/sdb.h | 3 +- source/libs/nodes/src/nodesCodeFuncs.c | 6 +- source/libs/nodes/src/nodesUtilFuncs.c | 6 +- source/libs/parser/inc/sql.y | 2 + source/libs/parser/src/parAstParser.c | 14 + source/libs/parser/src/parAuthenticator.c | 2 + source/libs/parser/src/parTranslater.c | 16 +- source/libs/parser/src/sql.c | 7714 +++++++++++---------- 16 files changed, 4239 insertions(+), 4083 deletions(-) diff --git a/include/common/systable.h b/include/common/systable.h index 92e79154248..49002b06894 100644 --- a/include/common/systable.h +++ b/include/common/systable.h @@ -52,6 +52,8 @@ extern "C" { #define TSDB_INS_TABLE_VIEWS "ins_views" #define TSDB_INS_TABLE_COMPACTS "ins_compacts" #define TSDB_INS_TABLE_COMPACT_DETAILS "ins_compact_details" +#define TSDB_INS_TABLE_GRANTS_FULL "ins_grants_full" +#define TSDB_INS_TABLE_GRANTS_LOG "ins_grants_log" #define TSDB_PERFORMANCE_SCHEMA_DB "performance_schema" #define TSDB_PERFS_TABLE_SMAS "perf_smas" diff --git a/include/common/tmsg.h b/include/common/tmsg.h index aab2cb44929..8f1dc6fcba7 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -147,6 +147,8 @@ typedef enum _mgmt_table { TSDB_MGMT_TABLE_VIEWS, TSDB_MGMT_TABLE_COMPACT, TSDB_MGMT_TABLE_COMPACT_DETAIL, + TSDB_MGMT_TABLE_GRANTS_FULL, + TSDB_MGMT_TABLE_GRANTS_LOG, TSDB_MGMT_TABLE_MAX, } EShowType; @@ -360,6 +362,8 @@ typedef enum ENodeType { QUERY_NODE_SHOW_VIEWS_STMT, QUERY_NODE_SHOW_COMPACTS_STMT, QUERY_NODE_SHOW_COMPACT_DETAILS_STMT, + QUERY_NODE_SHOW_GRANTS_FULL_STMT, + QUERY_NODE_SHOW_GRANTS_LOG_STMT, // logic plan node QUERY_NODE_LOGIC_PLAN_SCAN = 1000, diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 2ae9a5c050c..7c04d77a7bb 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -175,194 +175,196 @@ #define TK_CONNECTIONS 156 #define TK_LICENCES 157 #define TK_GRANTS 158 -#define TK_QUERIES 159 -#define TK_SCORES 160 -#define TK_TOPICS 161 -#define TK_VARIABLES 162 -#define TK_BNODES 163 -#define TK_SNODES 164 -#define TK_TRANSACTIONS 165 -#define TK_DISTRIBUTED 166 -#define TK_CONSUMERS 167 -#define TK_SUBSCRIPTIONS 168 -#define TK_VNODES 169 -#define TK_ALIVE 170 -#define TK_VIEWS 171 -#define TK_VIEW 172 -#define TK_COMPACTS 173 -#define TK_NORMAL 174 -#define TK_CHILD 175 -#define TK_LIKE 176 -#define TK_TBNAME 177 -#define TK_QTAGS 178 -#define TK_AS 179 -#define TK_SYSTEM 180 -#define TK_INDEX 181 -#define TK_FUNCTION 182 -#define TK_INTERVAL 183 -#define TK_COUNT 184 -#define TK_LAST_ROW 185 -#define TK_META 186 -#define TK_ONLY 187 -#define TK_TOPIC 188 -#define TK_CONSUMER 189 -#define TK_GROUP 190 -#define TK_DESC 191 -#define TK_DESCRIBE 192 -#define TK_RESET 193 -#define TK_QUERY 194 -#define TK_CACHE 195 -#define TK_EXPLAIN 196 -#define TK_ANALYZE 197 -#define TK_VERBOSE 198 -#define TK_NK_BOOL 199 -#define TK_RATIO 200 -#define TK_NK_FLOAT 201 -#define TK_OUTPUTTYPE 202 -#define TK_AGGREGATE 203 -#define TK_BUFSIZE 204 -#define TK_LANGUAGE 205 -#define TK_REPLACE 206 -#define TK_STREAM 207 -#define TK_INTO 208 -#define TK_PAUSE 209 -#define TK_RESUME 210 -#define TK_TRIGGER 211 -#define TK_AT_ONCE 212 -#define TK_WINDOW_CLOSE 213 -#define TK_IGNORE 214 -#define TK_EXPIRED 215 -#define TK_FILL_HISTORY 216 -#define TK_UPDATE 217 -#define TK_SUBTABLE 218 -#define TK_UNTREATED 219 -#define TK_KILL 220 -#define TK_CONNECTION 221 -#define TK_TRANSACTION 222 -#define TK_BALANCE 223 -#define TK_VGROUP 224 -#define TK_LEADER 225 -#define TK_MERGE 226 -#define TK_REDISTRIBUTE 227 -#define TK_SPLIT 228 -#define TK_DELETE 229 -#define TK_INSERT 230 -#define TK_NULL 231 -#define TK_NK_QUESTION 232 -#define TK_NK_ALIAS 233 -#define TK_NK_ARROW 234 -#define TK_ROWTS 235 -#define TK_QSTART 236 -#define TK_QEND 237 -#define TK_QDURATION 238 -#define TK_WSTART 239 -#define TK_WEND 240 -#define TK_WDURATION 241 -#define TK_IROWTS 242 -#define TK_ISFILLED 243 -#define TK_CAST 244 -#define TK_NOW 245 -#define TK_TODAY 246 -#define TK_TIMEZONE 247 -#define TK_CLIENT_VERSION 248 -#define TK_SERVER_VERSION 249 -#define TK_SERVER_STATUS 250 -#define TK_CURRENT_USER 251 -#define TK_CASE 252 -#define TK_WHEN 253 -#define TK_THEN 254 -#define TK_ELSE 255 -#define TK_BETWEEN 256 -#define TK_IS 257 -#define TK_NK_LT 258 -#define TK_NK_GT 259 -#define TK_NK_LE 260 -#define TK_NK_GE 261 -#define TK_NK_NE 262 -#define TK_MATCH 263 -#define TK_NMATCH 264 -#define TK_CONTAINS 265 -#define TK_IN 266 -#define TK_JOIN 267 -#define TK_INNER 268 -#define TK_SELECT 269 -#define TK_NK_HINT 270 -#define TK_DISTINCT 271 -#define TK_WHERE 272 -#define TK_PARTITION 273 -#define TK_BY 274 -#define TK_SESSION 275 -#define TK_STATE_WINDOW 276 -#define TK_EVENT_WINDOW 277 -#define TK_SLIDING 278 -#define TK_FILL 279 -#define TK_VALUE 280 -#define TK_VALUE_F 281 -#define TK_NONE 282 -#define TK_PREV 283 -#define TK_NULL_F 284 -#define TK_LINEAR 285 -#define TK_NEXT 286 -#define TK_HAVING 287 -#define TK_RANGE 288 -#define TK_EVERY 289 -#define TK_ORDER 290 -#define TK_SLIMIT 291 -#define TK_SOFFSET 292 -#define TK_LIMIT 293 -#define TK_OFFSET 294 -#define TK_ASC 295 -#define TK_NULLS 296 -#define TK_ABORT 297 -#define TK_AFTER 298 -#define TK_ATTACH 299 -#define TK_BEFORE 300 -#define TK_BEGIN 301 -#define TK_BITAND 302 -#define TK_BITNOT 303 -#define TK_BITOR 304 -#define TK_BLOCKS 305 -#define TK_CHANGE 306 -#define TK_COMMA 307 -#define TK_CONCAT 308 -#define TK_CONFLICT 309 -#define TK_COPY 310 -#define TK_DEFERRED 311 -#define TK_DELIMITERS 312 -#define TK_DETACH 313 -#define TK_DIVIDE 314 -#define TK_DOT 315 -#define TK_EACH 316 -#define TK_FAIL 317 -#define TK_FILE 318 -#define TK_FOR 319 -#define TK_GLOB 320 -#define TK_ID 321 -#define TK_IMMEDIATE 322 -#define TK_IMPORT 323 -#define TK_INITIALLY 324 -#define TK_INSTEAD 325 -#define TK_ISNULL 326 -#define TK_KEY 327 -#define TK_MODULES 328 -#define TK_NK_BITNOT 329 -#define TK_NK_SEMI 330 -#define TK_NOTNULL 331 -#define TK_OF 332 -#define TK_PLUS 333 -#define TK_PRIVILEGE 334 -#define TK_RAISE 335 -#define TK_RESTRICT 336 -#define TK_ROW 337 -#define TK_SEMI 338 -#define TK_STAR 339 -#define TK_STATEMENT 340 -#define TK_STRICT 341 -#define TK_STRING 342 -#define TK_TIMES 343 -#define TK_VALUES 344 -#define TK_VARIABLE 345 -#define TK_WAL 346 +#define TK_FULL 159 +#define TK_LOG 160 +#define TK_QUERIES 161 +#define TK_SCORES 162 +#define TK_TOPICS 163 +#define TK_VARIABLES 164 +#define TK_BNODES 165 +#define TK_SNODES 166 +#define TK_TRANSACTIONS 167 +#define TK_DISTRIBUTED 168 +#define TK_CONSUMERS 169 +#define TK_SUBSCRIPTIONS 170 +#define TK_VNODES 171 +#define TK_ALIVE 172 +#define TK_VIEWS 173 +#define TK_VIEW 174 +#define TK_COMPACTS 175 +#define TK_NORMAL 176 +#define TK_CHILD 177 +#define TK_LIKE 178 +#define TK_TBNAME 179 +#define TK_QTAGS 180 +#define TK_AS 181 +#define TK_SYSTEM 182 +#define TK_INDEX 183 +#define TK_FUNCTION 184 +#define TK_INTERVAL 185 +#define TK_COUNT 186 +#define TK_LAST_ROW 187 +#define TK_META 188 +#define TK_ONLY 189 +#define TK_TOPIC 190 +#define TK_CONSUMER 191 +#define TK_GROUP 192 +#define TK_DESC 193 +#define TK_DESCRIBE 194 +#define TK_RESET 195 +#define TK_QUERY 196 +#define TK_CACHE 197 +#define TK_EXPLAIN 198 +#define TK_ANALYZE 199 +#define TK_VERBOSE 200 +#define TK_NK_BOOL 201 +#define TK_RATIO 202 +#define TK_NK_FLOAT 203 +#define TK_OUTPUTTYPE 204 +#define TK_AGGREGATE 205 +#define TK_BUFSIZE 206 +#define TK_LANGUAGE 207 +#define TK_REPLACE 208 +#define TK_STREAM 209 +#define TK_INTO 210 +#define TK_PAUSE 211 +#define TK_RESUME 212 +#define TK_TRIGGER 213 +#define TK_AT_ONCE 214 +#define TK_WINDOW_CLOSE 215 +#define TK_IGNORE 216 +#define TK_EXPIRED 217 +#define TK_FILL_HISTORY 218 +#define TK_UPDATE 219 +#define TK_SUBTABLE 220 +#define TK_UNTREATED 221 +#define TK_KILL 222 +#define TK_CONNECTION 223 +#define TK_TRANSACTION 224 +#define TK_BALANCE 225 +#define TK_VGROUP 226 +#define TK_LEADER 227 +#define TK_MERGE 228 +#define TK_REDISTRIBUTE 229 +#define TK_SPLIT 230 +#define TK_DELETE 231 +#define TK_INSERT 232 +#define TK_NULL 233 +#define TK_NK_QUESTION 234 +#define TK_NK_ALIAS 235 +#define TK_NK_ARROW 236 +#define TK_ROWTS 237 +#define TK_QSTART 238 +#define TK_QEND 239 +#define TK_QDURATION 240 +#define TK_WSTART 241 +#define TK_WEND 242 +#define TK_WDURATION 243 +#define TK_IROWTS 244 +#define TK_ISFILLED 245 +#define TK_CAST 246 +#define TK_NOW 247 +#define TK_TODAY 248 +#define TK_TIMEZONE 249 +#define TK_CLIENT_VERSION 250 +#define TK_SERVER_VERSION 251 +#define TK_SERVER_STATUS 252 +#define TK_CURRENT_USER 253 +#define TK_CASE 254 +#define TK_WHEN 255 +#define TK_THEN 256 +#define TK_ELSE 257 +#define TK_BETWEEN 258 +#define TK_IS 259 +#define TK_NK_LT 260 +#define TK_NK_GT 261 +#define TK_NK_LE 262 +#define TK_NK_GE 263 +#define TK_NK_NE 264 +#define TK_MATCH 265 +#define TK_NMATCH 266 +#define TK_CONTAINS 267 +#define TK_IN 268 +#define TK_JOIN 269 +#define TK_INNER 270 +#define TK_SELECT 271 +#define TK_NK_HINT 272 +#define TK_DISTINCT 273 +#define TK_WHERE 274 +#define TK_PARTITION 275 +#define TK_BY 276 +#define TK_SESSION 277 +#define TK_STATE_WINDOW 278 +#define TK_EVENT_WINDOW 279 +#define TK_SLIDING 280 +#define TK_FILL 281 +#define TK_VALUE 282 +#define TK_VALUE_F 283 +#define TK_NONE 284 +#define TK_PREV 285 +#define TK_NULL_F 286 +#define TK_LINEAR 287 +#define TK_NEXT 288 +#define TK_HAVING 289 +#define TK_RANGE 290 +#define TK_EVERY 291 +#define TK_ORDER 292 +#define TK_SLIMIT 293 +#define TK_SOFFSET 294 +#define TK_LIMIT 295 +#define TK_OFFSET 296 +#define TK_ASC 297 +#define TK_NULLS 298 +#define TK_ABORT 299 +#define TK_AFTER 300 +#define TK_ATTACH 301 +#define TK_BEFORE 302 +#define TK_BEGIN 303 +#define TK_BITAND 304 +#define TK_BITNOT 305 +#define TK_BITOR 306 +#define TK_BLOCKS 307 +#define TK_CHANGE 308 +#define TK_COMMA 309 +#define TK_CONCAT 310 +#define TK_CONFLICT 311 +#define TK_COPY 312 +#define TK_DEFERRED 313 +#define TK_DELIMITERS 314 +#define TK_DETACH 315 +#define TK_DIVIDE 316 +#define TK_DOT 317 +#define TK_EACH 318 +#define TK_FAIL 319 +#define TK_FILE 320 +#define TK_FOR 321 +#define TK_GLOB 322 +#define TK_ID 323 +#define TK_IMMEDIATE 324 +#define TK_IMPORT 325 +#define TK_INITIALLY 326 +#define TK_INSTEAD 327 +#define TK_ISNULL 328 +#define TK_KEY 329 +#define TK_MODULES 330 +#define TK_NK_BITNOT 331 +#define TK_NK_SEMI 332 +#define TK_NOTNULL 333 +#define TK_OF 334 +#define TK_PLUS 335 +#define TK_PRIVILEGE 336 +#define TK_RAISE 337 +#define TK_RESTRICT 338 +#define TK_ROW 339 +#define TK_SEMI 340 +#define TK_STAR 341 +#define TK_STATEMENT 342 +#define TK_STRICT 343 +#define TK_STRING 344 +#define TK_TIMES 345 +#define TK_VALUES 346 +#define TK_VARIABLE 347 +#define TK_WAL 348 #define TK_NK_SPACE 600 #define TK_NK_COMMENT 601 diff --git a/source/common/src/systable.c b/source/common/src/systable.c index abe7064fc04..27234e7222f 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -353,6 +353,18 @@ static const SSysDbTableSchema userCompactsDetailSchema[] = { {.name = "start_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = false}, }; +static const SSysDbTableSchema useGrantsFullSchema[] = { + {.name = "grant_name", .bytes = 32 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_INT, .sysInfo = true}, + {.name = "display_name", .bytes = 256 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, + {.name = "limit", .bytes = 512 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, +}; + +static const SSysDbTableSchema useGrantsLogSchema[] = { + {.name = "state", .bytes = 1536 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_INT, .sysInfo = true}, + {.name = "active", .bytes = 512 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, + {.name = "machine", .bytes = 6016 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, +}; + static const SSysTableMeta infosMeta[] = { {TSDB_INS_TABLE_DNODES, dnodesSchema, tListLen(dnodesSchema), true}, {TSDB_INS_TABLE_MNODES, mnodesSchema, tListLen(mnodesSchema), true}, @@ -382,6 +394,8 @@ static const SSysTableMeta infosMeta[] = { {TSDB_INS_TABLE_VIEWS, userViewsSchema, tListLen(userViewsSchema), false}, {TSDB_INS_TABLE_COMPACTS, userCompactsSchema, tListLen(userCompactsSchema), false}, {TSDB_INS_TABLE_COMPACT_DETAILS, userCompactsDetailSchema, tListLen(userCompactsDetailSchema), false}, + {TSDB_INS_TABLE_GRANTS_FULL, useGrantsFullSchema, tListLen(useGrantsFullSchema), false}, + {TSDB_INS_TABLE_GRANTS_LOG, useGrantsLogSchema, tListLen(useGrantsLogSchema), false}, }; static const SSysDbTableSchema connectionsSchema[] = { diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 4701f54d9a5..14e18bb5d90 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -768,6 +768,72 @@ typedef struct { SArray* compactDetail; } SCompactObj; +// SGrantObj +typedef enum { + GRANT_STATE_UNGRANTED = 0, + GRANT_STATE_GRANTED = 1, + GRANT_STATE_EXPIRED = 2, + GRANT_STATE_REVOKED = 3, +} EGrantState; + +typedef enum { + GRANT_STATE_REASON_ALTER = 0, // alter activeCode 'revoked' or 'xxx' + GRANT_STATE_REASON_MISMATCH = 1, // dnode machine mismatch + GRANT_STATE_REASON_EXPIRE = 2, // expire +} EGrantStateReason; + +#define GRANT_STATE_NUM 30 +#define GRANT_ACTIVE_NUM 10 +#define GRANT_ACTIVE_LEN 30 + +typedef struct { + union { + int64_t u0; + struct { + int64_t ts : 36; + int64_t reserve : 4; + int64_t lastState : 8; + int64_t state : 8; + int64_t reason : 8; + }; + }; +} SGrantState; + +typedef struct { + union { + int64_t u0; + struct { + int64_t ts : 36; + int64_t reserve : 28; + }; + }; + char active[GRANT_ACTIVE_LEN + 1]; +} SGrantActive; + +typedef struct { + union { + int64_t u0; + struct { + int64_t ts : 36; + int64_t reserve : 4; + int64_t id : 24; + }; + }; + uint16_t port; + char fqdn[TSDB_FQDN_LEN]; + char machine[TSDB_MACHINE_ID_LEN + 1]; +} SGrantMachine; + +typedef struct { + int32_t id; + int64_t createTime; + int64_t updateTime; + SGrantState state[GRANT_STATE_NUM]; + SGrantActive active[GRANT_ACTIVE_NUM]; + SArray *pMachines; // SGrantMachines + SRWLatch lock; +} SGrantObj; + #ifdef __cplusplus } #endif diff --git a/source/dnode/mnode/impl/inc/mndGrant.h b/source/dnode/mnode/impl/inc/mndGrant.h index 88f118cb8fe..18d2c36a948 100644 --- a/source/dnode/mnode/impl/inc/mndGrant.h +++ b/source/dnode/mnode/impl/inc/mndGrant.h @@ -13,8 +13,8 @@ * along with this program. If not, see . */ -#ifndef TDENGINE_GTANT_H -#define TDENGINE_GTANT_H +#ifndef _TD_MND_GRANT_H_ +#define _TD_MND_GRANT_H_ #ifdef __cplusplus "C" { @@ -23,12 +23,33 @@ #include "mndInt.h" int32_t mndInitGrant(SMnode * pMnode); - void mndCleanupGrant(); + void mndCleanupGrant(SMnode * pMnode); void grantParseParameter(); void grantReset(SMnode * pMnode, EGrantType grant, uint64_t value); void grantAdd(EGrantType grant, uint64_t value); void grantRestore(EGrantType grant, uint64_t value); + +#ifdef TD_ENTERPRISE + + // void initDynGrantVersion(void); + + SGrantObj *mndAcquireGrant(SMnode * pMnode, int32_t id); + void mndReleaseGrant(SMnode * pMnode, SGrantObj *pGrant); + + SSdbRaw *mndGrantActionEncode(SGrantObj * pGrant); + SSdbRow *mndGrantActionDecode(SSdbRaw * pRaw); + int32_t mndGrantActionInsert(SSdb * pSdb, SGrantObj * pGrant); + int32_t mndGrantActionDelete(SSdb * pSdb, SGrantObj * pGrant); + int32_t mndGrantActionUpdate(SSdb * pSdb, SGrantObj * pOldGrant, SGrantObj * pNewGrant); + + int32_t mndProcessUpdMachineReqImpl(void *pMachine, SRpcMsg *pReq); + int32_t mndProcessUpdStateReqImpl(void *pState, SRpcMsg *pReq); + int32_t mndProcessUpdActiveReqImpl(void *pActive, SRpcMsg *pReq); + int32_t mndRetrieveGrantImpl(SRpcMsg * pReq, SShowObj * pShow, SSDataBlock * pBlock, int32_t rows); + +#endif + #ifdef __cplusplus } #endif diff --git a/source/dnode/mnode/impl/src/mndGrant.c b/source/dnode/mnode/impl/src/mndGrant.c index 1c30a2a1393..517f0cc963c 100644 --- a/source/dnode/mnode/impl/src/mndGrant.c +++ b/source/dnode/mnode/impl/src/mndGrant.c @@ -19,6 +19,15 @@ #ifndef _GRANT +#define GRANT_ITEM_SHOW() \ + do { \ + cols++; \ + pColInfo = taosArrayGet(pBlock->pDataBlock, cols); \ + src = "unlimited"; \ + STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); \ + colDataSetVal(pColInfo, numOfRows, tmp, false); \ + } while (0) + static int32_t mndRetrieveGrant(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { int32_t numOfRows = 0; int32_t cols = 0; @@ -31,47 +40,13 @@ static int32_t mndRetrieveGrant(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); colDataSetVal(pColInfo, numOfRows, tmp, false); - cols++; - pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - src = "unlimited"; - STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); - colDataSetVal(pColInfo, numOfRows, tmp, false); - - cols++; - pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - src = "false"; - STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); - colDataSetVal(pColInfo, numOfRows, tmp, false); - - cols++; - pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - src = "unlimited"; - STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); - colDataSetVal(pColInfo, numOfRows, tmp, false); - - cols++; - pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - src = "unlimited"; - STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); - colDataSetVal(pColInfo, numOfRows, tmp, false); - - cols++; - pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - src = "unlimited"; - STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); - colDataSetVal(pColInfo, numOfRows, tmp, false); - - cols++; - pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - src = "unlimited"; - STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); - colDataSetVal(pColInfo, numOfRows, tmp, false); - - cols++; - pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - src = "unlimited"; - STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); - colDataSetVal(pColInfo, numOfRows, tmp, false); + GRANT_ITEM_SHOW(); + GRANT_ITEM_SHOW(); + GRANT_ITEM_SHOW(); + GRANT_ITEM_SHOW(); + GRANT_ITEM_SHOW(); + GRANT_ITEM_SHOW(); + GRANT_ITEM_SHOW(); numOfRows++; } @@ -80,15 +55,20 @@ static int32_t mndRetrieveGrant(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl return numOfRows; } +static int32_t mndRetrieveGrantFull(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { return 0; } +static int32_t mndRetrieveGrantLog(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { return 0; } + static int32_t mndProcessGrantHB(SRpcMsg *pReq) { return TSDB_CODE_SUCCESS; } int32_t mndInitGrant(SMnode *pMnode) { mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_GRANTS, mndRetrieveGrant); + mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_GRANTS_FULL, mndRetrieveGrantFull); + mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_GRANTS_LOG, mndRetrieveGrantLog); mndSetMsgHandle(pMnode, TDMT_MND_GRANT_HB_TIMER, mndProcessGrantHB); return 0; } -void mndCleanupGrant() {} +void mndCleanupGrant(SMnode *pMnode) {} void grantParseParameter() { mError("can't parsed parameter k"); } void grantReset(SMnode *pMnode, EGrantType grant, uint64_t value) {} void grantAdd(EGrantType grant, uint64_t value) {} diff --git a/source/dnode/mnode/impl/src/mndShow.c b/source/dnode/mnode/impl/src/mndShow.c index 8e7e72aa0e4..f770f50b648 100644 --- a/source/dnode/mnode/impl/src/mndShow.c +++ b/source/dnode/mnode/impl/src/mndShow.c @@ -123,6 +123,10 @@ static int32_t convertToRetrieveType(char *name, int32_t len) { type = TSDB_MGMT_TABLE_COMPACT; } else if (strncasecmp(name, TSDB_INS_TABLE_COMPACT_DETAILS, len) == 0) { type = TSDB_MGMT_TABLE_COMPACT_DETAIL; + } else if (strncasecmp(name, TSDB_INS_TABLE_GRANTS_FULL, len) == 0) { + type = TSDB_MGMT_TABLE_GRANTS_FULL; + } else if (strncasecmp(name, TSDB_INS_TABLE_GRANTS_LOG, len) == 0) { + type = TSDB_MGMT_TABLE_GRANTS_LOG; } else { mError("invalid show name:%s len:%d", name, len); } diff --git a/source/dnode/mnode/sdb/inc/sdb.h b/source/dnode/mnode/sdb/inc/sdb.h index e1beaaa9107..9d1125dad20 100644 --- a/source/dnode/mnode/sdb/inc/sdb.h +++ b/source/dnode/mnode/sdb/inc/sdb.h @@ -152,7 +152,8 @@ typedef enum { SDB_STREAM_SEQ = 23, SDB_COMPACT = 24, SDB_COMPACT_DETAIL = 25, - SDB_MAX = 26 + SDB_GRANT = 26, // grant log + SDB_MAX = 27 } ESdbType; typedef struct SSdbRaw { diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 96390130944..5d26a545af2 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -264,7 +264,11 @@ const char* nodesNodeName(ENodeType type) { case QUERY_NODE_SHOW_COMPACTS_STMT: return "ShowCompactsStmt"; case QUERY_NODE_SHOW_COMPACT_DETAILS_STMT: - return "ShowCompactDetailsStmt"; + return "ShowCompactDetailsStmt"; + case QUERY_NODE_SHOW_GRANTS_FULL_STMT: + return "ShowGrantsFullStmt"; + case QUERY_NODE_SHOW_GRANTS_LOG_STMT: + return "ShowGrantsLogStmt"; case QUERY_NODE_DELETE_STMT: return "DeleteStmt"; case QUERY_NODE_INSERT_STMT: diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 2472c9835d2..af50cdd74ee 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -441,6 +441,8 @@ SNode* nodesMakeNode(ENodeType type) { case QUERY_NODE_SHOW_TAGS_STMT: case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT: case QUERY_NODE_SHOW_VIEWS_STMT: + case QUERY_NODE_SHOW_GRANTS_FULL_STMT: + case QUERY_NODE_SHOW_GRANTS_LOG_STMT: return makeNode(type, sizeof(SShowStmt)); case QUERY_NODE_SHOW_TABLE_TAGS_STMT: return makeNode(type, sizeof(SShowTableTagsStmt)); @@ -1079,7 +1081,9 @@ void nodesDestroyNode(SNode* pNode) { case QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT: case QUERY_NODE_SHOW_TAGS_STMT: case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT: - case QUERY_NODE_SHOW_VIEWS_STMT: { + case QUERY_NODE_SHOW_VIEWS_STMT: + case QUERY_NODE_SHOW_GRANTS_FULL_STMT: + case QUERY_NODE_SHOW_GRANTS_LOG_STMT: { SShowStmt* pStmt = (SShowStmt*)pNode; nodesDestroyNode(pStmt->pDbName); nodesDestroyNode(pStmt->pTbName); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 74d87619729..693a7606277 100755 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -487,6 +487,8 @@ cmd ::= SHOW APPS. cmd ::= SHOW CONNECTIONS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } cmd ::= SHOW LICENCES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } cmd ::= SHOW GRANTS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } +cmd ::= SHOW GRANTS FULL. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); } +cmd ::= SHOW GRANTS LOG. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOG_STMT); } cmd ::= SHOW CREATE DATABASE db_name(A). { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &A); } cmd ::= SHOW CREATE TABLE full_table_name(A). { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, A); } cmd ::= SHOW CREATE STABLE full_table_name(A). { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, A); } diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c index be272228fe1..18c809734f8 100644 --- a/source/libs/parser/src/parAstParser.c +++ b/source/libs/parser/src/parAstParser.c @@ -619,6 +619,16 @@ static int32_t collectMetaKeyFromShowCompactDetails(SCollectMetaKeyCxt* pCxt, SS return code; } +static int32_t collectMetaKeyFromShowGrantsFull(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_GRANTS_FULL, + pCxt->pMetaCache); +} + +static int32_t collectMetaKeyFromShowGrantsLog(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_GRANTS_LOG, + pCxt->pMetaCache); +} + static int32_t collectMetaKeyFromShowCreateDatabase(SCollectMetaKeyCxt* pCxt, SShowCreateDatabaseStmt* pStmt) { return reserveDbCfgInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pCxt->pMetaCache); } @@ -839,6 +849,10 @@ static int32_t collectMetaKeyFromQuery(SCollectMetaKeyCxt* pCxt, SNode* pStmt) { return collectMetaKeyFromShowCompacts(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_COMPACT_DETAILS_STMT: return collectMetaKeyFromShowCompactDetails(pCxt, (SShowStmt*)pStmt); + case QUERY_NODE_SHOW_GRANTS_FULL_STMT: + return collectMetaKeyFromShowGrantsFull(pCxt, (SShowStmt*)pStmt); + case QUERY_NODE_SHOW_GRANTS_LOG_STMT: + return collectMetaKeyFromShowGrantsLog(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_CREATE_DATABASE_STMT: return collectMetaKeyFromShowCreateDatabase(pCxt, (SShowCreateDatabaseStmt*)pStmt); case QUERY_NODE_SHOW_CREATE_TABLE_STMT: diff --git a/source/libs/parser/src/parAuthenticator.c b/source/libs/parser/src/parAuthenticator.c index 033991f3514..f1e050e7281 100644 --- a/source/libs/parser/src/parAuthenticator.c +++ b/source/libs/parser/src/parAuthenticator.c @@ -349,6 +349,8 @@ static int32_t authQuery(SAuthCxt* pCxt, SNode* pStmt) { case QUERY_NODE_SHOW_TABLE_DISTRIBUTED_STMT: case QUERY_NODE_SHOW_VNODES_STMT: case QUERY_NODE_SHOW_SCORES_STMT: + case QUERY_NODE_SHOW_GRANTS_FULL_STMT: + case QUERY_NODE_SHOW_GRANTS_LOG_STMT: return !pCxt->pParseCxt->enableSysInfo ? TSDB_CODE_PAR_PERMISSION_DENIED : TSDB_CODE_SUCCESS; case QUERY_NODE_SHOW_TABLES_STMT: case QUERY_NODE_SHOW_STABLES_STMT: diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index bf9342e7e40..536eb568b1a 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -268,7 +268,19 @@ static const SSysTableShowAdapter sysTableShowAdapter[] = { .pTableName = TSDB_INS_TABLE_COMPACT_DETAILS, .numOfShowCols = 1, .pShowCols = {"*"} - }, + }, + { .showType = QUERY_NODE_SHOW_GRANTS_FULL_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_GRANTS_FULL, + .numOfShowCols = 1, + .pShowCols = {"*"} + }, + { .showType = QUERY_NODE_SHOW_GRANTS_FULL_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_GRANTS_LOG, + .numOfShowCols = 1, + .pShowCols = {"*"} + }, }; // clang-format on @@ -10636,6 +10648,8 @@ static int32_t rewriteQuery(STranslateContext* pCxt, SQuery* pQuery) { case QUERY_NODE_SHOW_TAGS_STMT: case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT: case QUERY_NODE_SHOW_VIEWS_STMT: + case QUERY_NODE_SHOW_GRANTS_FULL_STMT: + case QUERY_NODE_SHOW_GRANTS_LOG_STMT: code = rewriteShow(pCxt, pQuery); break; case QUERY_NODE_SHOW_VGROUPS_STMT: diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 8e39ff08d3a..de2a94eb206 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 ** @@ -106,29 +104,29 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 508 +#define YYNOCODE 510 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - SNodeList* yy88; - int32_t yy92; - SAlterOption yy117; - SShowTablesOption yy133; - ENullOrder yy153; - int64_t yy221; - SNode* yy232; - STokenPair yy241; - EFillMode yy246; - int8_t yy279; - EShowKind yy281; - SDataType yy400; - EJoinType yy436; - EOperatorType yy708; - EOrder yy834; - bool yy985; - SToken yy993; + EOperatorType yy20; + int32_t yy40; + EFillMode yy114; + int8_t yy143; + SDataType yy184; + SShowTablesOption yy277; + SNodeList* yy364; + int64_t yy429; + EShowKind yy430; + bool yy437; + ENullOrder yy517; + SAlterOption yy665; + EJoinType yy732; + STokenPair yy777; + SToken yy929; + EOrder yy938; + SNode* yy992; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -144,18 +142,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 843 -#define YYNRULE 644 -#define YYNRULE_WITH_ACTION 644 -#define YYNTOKEN 347 -#define YY_MAX_SHIFT 842 -#define YY_MIN_SHIFTREDUCE 1245 -#define YY_MAX_SHIFTREDUCE 1888 -#define YY_ERROR_ACTION 1889 -#define YY_ACCEPT_ACTION 1890 -#define YY_NO_ACTION 1891 -#define YY_MIN_REDUCE 1892 -#define YY_MAX_REDUCE 2535 +#define YYNSTATE 845 +#define YYNRULE 646 +#define YYNRULE_WITH_ACTION 646 +#define YYNTOKEN 349 +#define YY_MAX_SHIFT 844 +#define YY_MIN_SHIFTREDUCE 1247 +#define YY_MAX_SHIFTREDUCE 1892 +#define YY_ERROR_ACTION 1893 +#define YY_ACCEPT_ACTION 1894 +#define YY_NO_ACTION 1895 +#define YY_MIN_REDUCE 1896 +#define YY_MAX_REDUCE 2541 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -222,881 +220,889 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (3098) +#define YY_ACTTAB_COUNT (3138) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 481, 2193, 174, 465, 1904, 2296, 562, 2071, 464, 563, - /* 10 */ 1935, 419, 48, 46, 1812, 1892, 730, 237, 2399, 168, - /* 20 */ 416, 565, 1653, 1943, 41, 40, 398, 2084, 47, 45, - /* 30 */ 44, 43, 42, 1679, 2133, 1738, 1978, 1651, 68, 136, - /* 40 */ 135, 134, 133, 132, 131, 130, 129, 128, 2337, 219, - /* 50 */ 1678, 669, 2135, 670, 472, 670, 2506, 689, 2506, 381, - /* 60 */ 559, 710, 184, 727, 239, 1733, 1893, 2133, 565, 557, - /* 70 */ 1943, 19, 553, 549, 2512, 203, 2512, 203, 1659, 2507, - /* 80 */ 696, 2507, 696, 2284, 383, 2355, 2197, 127, 95, 2355, - /* 90 */ 126, 125, 124, 123, 122, 121, 120, 119, 118, 529, - /* 100 */ 527, 2303, 365, 744, 839, 385, 217, 15, 1678, 814, - /* 110 */ 813, 812, 811, 428, 2077, 810, 809, 151, 804, 803, - /* 120 */ 802, 801, 800, 799, 798, 150, 792, 791, 790, 427, - /* 130 */ 426, 787, 786, 785, 183, 182, 784, 695, 38, 320, - /* 140 */ 2506, 63, 2336, 1740, 1741, 2374, 688, 727, 114, 2338, - /* 150 */ 748, 2340, 2341, 743, 653, 738, 1572, 1573, 694, 203, - /* 160 */ 186, 578, 2427, 2507, 696, 127, 412, 2423, 126, 125, - /* 170 */ 124, 123, 122, 121, 120, 119, 118, 1713, 1723, 570, - /* 180 */ 61, 205, 563, 1935, 1739, 1742, 1285, 1816, 667, 2457, - /* 190 */ 707, 146, 421, 1678, 1449, 2128, 2130, 1571, 1574, 1654, - /* 200 */ 63, 1652, 1292, 707, 146, 1292, 1681, 1885, 1440, 773, - /* 210 */ 772, 771, 1444, 770, 1446, 1447, 769, 766, 2297, 1455, - /* 220 */ 763, 1457, 1458, 760, 757, 754, 1290, 1291, 1287, 1290, - /* 230 */ 1291, 1657, 1658, 1710, 51, 1712, 1715, 1716, 1717, 1718, - /* 240 */ 1719, 1720, 1721, 1722, 740, 736, 1731, 1732, 1734, 1735, - /* 250 */ 1736, 1737, 2, 48, 46, 52, 112, 1311, 364, 1310, - /* 260 */ 1676, 416, 732, 1653, 2399, 1552, 1553, 513, 670, 2337, - /* 270 */ 532, 2506, 727, 147, 142, 531, 1738, 582, 1651, 41, - /* 280 */ 40, 2074, 742, 47, 45, 44, 43, 42, 685, 2512, - /* 290 */ 203, 495, 1312, 533, 2507, 696, 728, 2082, 367, 497, - /* 300 */ 300, 2435, 706, 304, 138, 705, 1733, 2506, 210, 475, - /* 310 */ 2355, 1884, 19, 202, 2435, 2436, 137, 144, 2440, 1659, - /* 320 */ 2217, 410, 2303, 605, 744, 694, 203, 567, 1679, 171, - /* 330 */ 2507, 696, 173, 564, 624, 623, 622, 2084, 2215, 715, - /* 340 */ 2021, 614, 143, 618, 196, 839, 384, 617, 15, 2217, - /* 350 */ 1714, 1678, 616, 621, 391, 390, 2122, 483, 615, 51, - /* 360 */ 2442, 611, 304, 2336, 409, 302, 2374, 2214, 715, 356, - /* 370 */ 2338, 748, 2340, 2341, 743, 741, 738, 729, 2392, 1854, - /* 380 */ 691, 686, 679, 1915, 1740, 1741, 2439, 2204, 2183, 579, - /* 390 */ 520, 519, 518, 517, 512, 511, 510, 509, 508, 503, - /* 400 */ 502, 501, 500, 492, 491, 490, 1711, 485, 484, 382, - /* 410 */ 1965, 172, 690, 476, 1540, 1541, 340, 304, 1713, 1723, - /* 420 */ 1559, 707, 146, 41, 40, 1739, 1742, 47, 45, 44, - /* 430 */ 43, 42, 625, 338, 74, 1682, 2303, 73, 63, 783, - /* 440 */ 1654, 2511, 1652, 1835, 2506, 580, 2210, 366, 2166, 41, - /* 450 */ 40, 1484, 1485, 47, 45, 44, 43, 42, 1836, 235, - /* 460 */ 544, 542, 539, 2510, 707, 146, 12, 2507, 2509, 63, - /* 470 */ 487, 2193, 1657, 1658, 1710, 1843, 1712, 1715, 1716, 1717, - /* 480 */ 1718, 1719, 1720, 1721, 1722, 740, 736, 1731, 1732, 1734, - /* 490 */ 1735, 1736, 1737, 2, 12, 48, 46, 311, 312, 1834, - /* 500 */ 63, 2265, 310, 416, 2337, 1653, 47, 45, 44, 43, - /* 510 */ 42, 2442, 375, 1914, 728, 2082, 76, 745, 1738, 221, - /* 520 */ 1651, 304, 425, 424, 682, 681, 1841, 1842, 1844, 1845, - /* 530 */ 1846, 204, 2435, 2436, 137, 144, 2440, 2438, 64, 223, - /* 540 */ 2337, 610, 515, 2193, 1913, 2355, 1748, 1660, 1733, 2059, - /* 550 */ 400, 651, 1678, 745, 19, 274, 1767, 2303, 654, 744, - /* 560 */ 463, 1659, 462, 41, 40, 87, 2303, 47, 45, 44, - /* 570 */ 43, 42, 774, 709, 201, 2435, 2436, 1912, 144, 2440, - /* 580 */ 90, 2355, 654, 89, 84, 83, 468, 839, 30, 216, - /* 590 */ 15, 226, 461, 2303, 199, 744, 1678, 2303, 2336, 1404, - /* 600 */ 304, 2374, 460, 458, 357, 2338, 748, 2340, 2341, 743, - /* 610 */ 499, 738, 1911, 363, 1403, 2313, 447, 1768, 498, 444, - /* 620 */ 440, 436, 433, 461, 2058, 1710, 1740, 1741, 1392, 2073, - /* 630 */ 2303, 304, 572, 2256, 2336, 2057, 12, 2374, 10, 2317, - /* 640 */ 114, 2338, 748, 2340, 2341, 743, 88, 738, 1683, 2511, - /* 650 */ 149, 1682, 156, 2398, 2427, 1910, 656, 2256, 412, 2423, - /* 660 */ 1713, 1723, 304, 1855, 1909, 2303, 1681, 1739, 1742, 1394, - /* 670 */ 41, 40, 728, 2082, 47, 45, 44, 43, 42, 1890, - /* 680 */ 1659, 534, 1654, 2319, 1652, 781, 161, 160, 778, 777, - /* 690 */ 776, 158, 208, 738, 783, 523, 9, 37, 414, 1762, - /* 700 */ 1763, 1764, 1765, 1766, 1770, 1771, 1772, 1773, 2303, 1714, - /* 710 */ 1311, 1663, 1310, 1908, 1657, 1658, 1710, 2303, 1712, 1715, - /* 720 */ 1716, 1717, 1718, 1719, 1720, 1721, 1722, 740, 736, 1731, - /* 730 */ 1732, 1734, 1735, 1736, 1737, 2, 48, 46, 1743, 2337, - /* 740 */ 2135, 1653, 728, 2082, 416, 1312, 1653, 397, 728, 2082, - /* 750 */ 2067, 273, 710, 1714, 1878, 2133, 1651, 227, 431, 1738, - /* 760 */ 449, 1651, 56, 430, 695, 1711, 2303, 2506, 469, 2337, - /* 770 */ 1828, 781, 161, 160, 778, 777, 776, 158, 522, 521, - /* 780 */ 2355, 2313, 745, 1408, 1945, 694, 203, 728, 2082, 1733, - /* 790 */ 2507, 696, 2303, 2442, 744, 2322, 106, 1659, 1407, 1682, - /* 800 */ 728, 2082, 1659, 14, 13, 2317, 95, 470, 670, 1711, - /* 810 */ 2355, 2506, 781, 161, 160, 778, 777, 776, 158, 2437, - /* 820 */ 489, 2075, 2303, 839, 744, 302, 1621, 1622, 839, 2512, - /* 830 */ 203, 49, 2078, 2336, 2507, 696, 2374, 2337, 1907, 114, - /* 840 */ 2338, 748, 2340, 2341, 743, 2135, 738, 2135, 325, 2319, - /* 850 */ 745, 186, 406, 2427, 411, 728, 2082, 412, 2423, 738, - /* 860 */ 2133, 1682, 2133, 2336, 1683, 536, 2374, 1740, 1741, 114, - /* 870 */ 2338, 748, 2340, 2341, 743, 504, 738, 649, 2355, 642, - /* 880 */ 2458, 2526, 2176, 2427, 2069, 453, 797, 412, 2423, 2043, - /* 890 */ 2303, 2303, 744, 34, 640, 184, 638, 269, 268, 41, - /* 900 */ 40, 1713, 1723, 47, 45, 44, 43, 42, 1739, 1742, - /* 910 */ 1781, 609, 455, 451, 2135, 608, 728, 2082, 1654, 2198, - /* 920 */ 1652, 420, 1801, 1654, 479, 1652, 794, 670, 272, 2133, - /* 930 */ 2506, 2336, 271, 1769, 2374, 1981, 505, 175, 2338, 748, - /* 940 */ 2340, 2341, 743, 111, 738, 44, 43, 42, 2512, 203, - /* 950 */ 1657, 1658, 108, 2507, 696, 1657, 1658, 1710, 194, 1712, - /* 960 */ 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, 740, 736, - /* 970 */ 1731, 1732, 1734, 1735, 1736, 1737, 2, 48, 46, 671, - /* 980 */ 2468, 620, 619, 36, 655, 416, 711, 1653, 1906, 41, - /* 990 */ 40, 796, 2337, 47, 45, 44, 43, 42, 98, 1903, - /* 1000 */ 1738, 370, 1651, 419, 396, 745, 644, 2465, 624, 623, - /* 1010 */ 622, 171, 1683, 35, 2065, 614, 143, 618, 2337, 2084, - /* 1020 */ 198, 617, 2511, 1774, 2510, 2506, 616, 621, 391, 390, - /* 1030 */ 1733, 745, 615, 2355, 670, 611, 670, 2506, 422, 2506, - /* 1040 */ 1809, 2303, 2086, 1659, 2510, 2303, 171, 744, 2507, 2508, - /* 1050 */ 728, 2082, 2303, 280, 2084, 2512, 203, 2512, 203, 2355, - /* 1060 */ 2507, 696, 2507, 696, 1902, 775, 389, 388, 2126, 839, - /* 1070 */ 506, 2303, 49, 744, 1683, 2337, 41, 40, 728, 2082, - /* 1080 */ 47, 45, 44, 43, 42, 739, 2336, 1901, 745, 2374, - /* 1090 */ 2478, 1900, 114, 2338, 748, 2340, 2341, 743, 581, 738, - /* 1100 */ 1899, 1294, 2129, 2130, 2526, 612, 2427, 1677, 1740, 1741, - /* 1110 */ 412, 2423, 2336, 1314, 1315, 2374, 2355, 2303, 115, 2338, - /* 1120 */ 748, 2340, 2341, 743, 1678, 738, 601, 600, 2303, 1389, - /* 1130 */ 744, 1898, 2427, 2337, 728, 2082, 2426, 2423, 387, 386, - /* 1140 */ 2303, 607, 1713, 1723, 2303, 159, 745, 2135, 677, 1739, - /* 1150 */ 1742, 41, 40, 2303, 2079, 47, 45, 44, 43, 42, - /* 1160 */ 603, 602, 714, 609, 1654, 171, 1652, 608, 1897, 2336, - /* 1170 */ 728, 2082, 2374, 2085, 2355, 114, 2338, 748, 2340, 2341, - /* 1180 */ 743, 2287, 738, 3, 2303, 197, 2303, 2526, 744, 2427, - /* 1190 */ 275, 808, 806, 412, 2423, 54, 1657, 1658, 1710, 2022, - /* 1200 */ 1712, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, 740, - /* 1210 */ 736, 1731, 1732, 1734, 1735, 1736, 1737, 2, 48, 46, - /* 1220 */ 55, 2303, 148, 1896, 1895, 2398, 416, 2336, 1653, 2135, - /* 1230 */ 2374, 2135, 438, 114, 2338, 748, 2340, 2341, 743, 99, - /* 1240 */ 738, 1738, 631, 1651, 723, 2526, 2134, 2427, 728, 2082, - /* 1250 */ 779, 412, 2423, 2126, 297, 728, 2082, 643, 699, 2337, - /* 1260 */ 728, 2082, 728, 2082, 702, 728, 2082, 2313, 283, 1662, - /* 1270 */ 1600, 1733, 745, 270, 2499, 713, 2303, 2303, 2447, 1801, - /* 1280 */ 315, 2321, 725, 1905, 1659, 726, 728, 2082, 2060, 634, - /* 1290 */ 780, 2317, 334, 2126, 159, 2112, 628, 626, 728, 2082, - /* 1300 */ 2355, 1920, 834, 267, 139, 260, 321, 1808, 258, 141, - /* 1310 */ 839, 698, 2303, 15, 744, 613, 86, 2337, 423, 1963, - /* 1320 */ 1954, 152, 170, 425, 424, 262, 264, 159, 261, 263, - /* 1330 */ 745, 266, 2446, 1667, 265, 2319, 413, 1711, 646, 1387, - /* 1340 */ 645, 627, 629, 1952, 72, 738, 1738, 71, 1660, 1740, - /* 1350 */ 1741, 284, 2324, 2336, 735, 50, 2374, 50, 2355, 114, - /* 1360 */ 2338, 748, 2340, 2341, 743, 632, 738, 1887, 1888, 1616, - /* 1370 */ 2303, 2526, 744, 2427, 14, 13, 1733, 412, 2423, 2471, - /* 1380 */ 683, 2356, 1661, 1713, 1723, 187, 50, 159, 50, 1659, - /* 1390 */ 1739, 1742, 50, 309, 75, 100, 157, 159, 66, 788, - /* 1400 */ 752, 157, 1619, 159, 789, 1654, 291, 1652, 140, 157, - /* 1410 */ 2326, 2336, 1946, 2019, 2374, 734, 2018, 114, 2338, 748, - /* 1420 */ 2340, 2341, 743, 1366, 738, 1347, 2202, 1936, 1364, 2526, - /* 1430 */ 1840, 2427, 1839, 1665, 2461, 412, 2423, 1657, 1658, 1710, - /* 1440 */ 680, 1712, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, - /* 1450 */ 740, 736, 1731, 1732, 1734, 1735, 1736, 1737, 2, 429, - /* 1460 */ 289, 333, 712, 1724, 832, 402, 1348, 1569, 313, 720, - /* 1470 */ 687, 317, 1434, 1775, 255, 1462, 1466, 399, 1473, 2337, - /* 1480 */ 717, 2203, 1942, 1471, 162, 2123, 663, 2462, 2472, 296, - /* 1490 */ 178, 708, 745, 299, 2044, 303, 432, 437, 5, 599, - /* 1500 */ 595, 591, 587, 445, 254, 379, 446, 1686, 457, 456, - /* 1510 */ 1668, 212, 1663, 459, 1759, 214, 211, 700, 1593, 328, - /* 1520 */ 2355, 1676, 473, 1677, 480, 703, 225, 482, 486, 488, - /* 1530 */ 493, 507, 2303, 525, 744, 514, 2195, 2337, 516, 524, - /* 1540 */ 526, 537, 1671, 1673, 535, 96, 1664, 229, 252, 540, - /* 1550 */ 745, 538, 230, 541, 232, 543, 736, 1731, 1732, 1734, - /* 1560 */ 1735, 1736, 1737, 545, 2337, 1684, 560, 4, 561, 569, - /* 1570 */ 571, 240, 568, 2336, 92, 1679, 2374, 745, 2355, 114, - /* 1580 */ 2338, 748, 2340, 2341, 743, 1685, 738, 573, 1687, 243, - /* 1590 */ 2303, 2402, 744, 2427, 574, 575, 1688, 412, 2423, 246, - /* 1600 */ 577, 583, 2211, 604, 248, 2355, 93, 2274, 94, 116, - /* 1610 */ 606, 242, 253, 2072, 257, 635, 636, 2303, 2068, 744, - /* 1620 */ 251, 244, 2337, 360, 648, 259, 650, 249, 576, 97, - /* 1630 */ 1680, 2336, 2271, 164, 2374, 745, 165, 114, 2338, 748, - /* 1640 */ 2340, 2341, 743, 2070, 738, 2066, 241, 166, 167, 2400, - /* 1650 */ 329, 2427, 2270, 153, 276, 412, 2423, 2257, 2336, 658, - /* 1660 */ 657, 2374, 281, 2355, 114, 2338, 748, 2340, 2341, 743, - /* 1670 */ 662, 738, 665, 664, 279, 2303, 731, 744, 2427, 659, - /* 1680 */ 674, 684, 412, 2423, 2477, 718, 2476, 286, 288, 693, - /* 1690 */ 8, 672, 2449, 675, 290, 179, 673, 2337, 2529, 2505, - /* 1700 */ 295, 403, 704, 1801, 701, 145, 1681, 298, 2443, 1806, - /* 1710 */ 745, 330, 1804, 190, 721, 305, 2336, 154, 716, 2374, - /* 1720 */ 2225, 2224, 115, 2338, 748, 2340, 2341, 743, 293, 738, - /* 1730 */ 2223, 408, 1, 206, 2337, 331, 2427, 292, 2355, 294, - /* 1740 */ 733, 2423, 722, 155, 2083, 332, 105, 745, 62, 2408, - /* 1750 */ 2303, 107, 744, 2127, 335, 1269, 323, 750, 833, 53, - /* 1760 */ 371, 372, 836, 344, 358, 2337, 337, 163, 348, 838, - /* 1770 */ 359, 339, 2295, 2294, 2293, 2355, 81, 2288, 745, 434, - /* 1780 */ 435, 1644, 1645, 209, 439, 2286, 441, 2303, 442, 744, - /* 1790 */ 443, 746, 1643, 2285, 2374, 380, 2283, 115, 2338, 748, - /* 1800 */ 2340, 2341, 743, 448, 738, 2282, 2355, 450, 2337, 2281, - /* 1810 */ 452, 2427, 2280, 454, 1632, 374, 2423, 2261, 2303, 213, - /* 1820 */ 744, 745, 2260, 215, 1596, 82, 1595, 2238, 2336, 2237, - /* 1830 */ 2337, 2374, 2236, 466, 176, 2338, 748, 2340, 2341, 743, - /* 1840 */ 467, 738, 2235, 745, 2234, 2185, 471, 1539, 2182, 2355, - /* 1850 */ 474, 2181, 2175, 478, 2172, 477, 218, 2171, 2170, 2336, - /* 1860 */ 85, 2303, 2374, 744, 2169, 115, 2338, 748, 2340, 2341, - /* 1870 */ 743, 2355, 738, 2174, 220, 2173, 401, 2168, 2167, 2427, - /* 1880 */ 2165, 2164, 2163, 2303, 2424, 744, 222, 494, 697, 2527, - /* 1890 */ 2162, 496, 2178, 2161, 2160, 2159, 2158, 2157, 2180, 2156, - /* 1900 */ 2155, 2337, 2336, 2154, 2153, 2374, 2152, 2151, 175, 2338, - /* 1910 */ 748, 2340, 2341, 743, 745, 738, 2150, 2149, 2148, 2147, - /* 1920 */ 224, 2146, 2145, 2144, 2336, 2143, 2179, 2374, 2337, 91, - /* 1930 */ 357, 2338, 748, 2340, 2341, 743, 2177, 738, 2142, 2141, - /* 1940 */ 2140, 745, 2355, 228, 2139, 2138, 1545, 528, 2137, 530, - /* 1950 */ 2136, 2469, 1405, 1409, 2303, 368, 744, 1984, 369, 1983, - /* 1960 */ 1982, 1980, 1977, 547, 1401, 1976, 231, 1969, 1956, 2355, - /* 1970 */ 546, 548, 550, 1931, 233, 234, 1930, 236, 554, 552, - /* 1980 */ 558, 2303, 185, 744, 1293, 551, 2259, 2255, 556, 78, - /* 1990 */ 2245, 2233, 2232, 555, 238, 2336, 79, 245, 2374, 2209, - /* 2000 */ 2337, 350, 2338, 748, 2340, 2341, 743, 2323, 738, 247, - /* 2010 */ 2061, 1979, 195, 745, 1975, 566, 584, 586, 250, 1973, - /* 2020 */ 588, 1971, 2336, 585, 1340, 2374, 2337, 1968, 176, 2338, - /* 2030 */ 748, 2340, 2341, 743, 592, 738, 589, 590, 594, 742, - /* 2040 */ 593, 2355, 596, 1951, 597, 598, 407, 692, 1949, 1950, - /* 2050 */ 1948, 1927, 2063, 2303, 1478, 744, 1477, 2062, 1966, 1391, - /* 2060 */ 1964, 1390, 1388, 1386, 805, 1385, 1384, 2355, 65, 256, - /* 2070 */ 1383, 807, 1382, 1379, 1378, 1377, 1376, 392, 393, 2303, - /* 2080 */ 1606, 744, 1955, 2528, 394, 630, 1953, 395, 1926, 1925, - /* 2090 */ 1924, 633, 1923, 1922, 2336, 641, 637, 2374, 2337, 117, - /* 2100 */ 357, 2338, 748, 2340, 2341, 743, 639, 738, 1626, 1628, - /* 2110 */ 1630, 745, 1625, 29, 2258, 69, 278, 2254, 1602, 1604, - /* 2120 */ 2336, 2511, 652, 2374, 2244, 660, 356, 2338, 748, 2340, - /* 2130 */ 2341, 743, 2231, 738, 2230, 2393, 17, 20, 1857, 2355, - /* 2140 */ 842, 6, 21, 57, 415, 7, 22, 31, 285, 676, - /* 2150 */ 58, 2303, 177, 744, 287, 1838, 327, 661, 189, 282, - /* 2160 */ 1581, 200, 33, 1580, 678, 2324, 2337, 67, 666, 24, - /* 2170 */ 188, 32, 193, 80, 668, 1872, 169, 1871, 1827, 745, - /* 2180 */ 404, 830, 826, 822, 818, 23, 324, 18, 1876, 1875, - /* 2190 */ 405, 1877, 2336, 1878, 301, 2374, 60, 180, 357, 2338, - /* 2200 */ 748, 2340, 2341, 743, 1798, 738, 1797, 2355, 2229, 2208, - /* 2210 */ 102, 2207, 417, 101, 25, 319, 308, 103, 1833, 2303, - /* 2220 */ 26, 744, 191, 13, 1669, 719, 314, 113, 1750, 70, - /* 2230 */ 318, 181, 1749, 104, 192, 2337, 108, 2377, 1760, 1728, - /* 2240 */ 737, 1703, 751, 1726, 39, 749, 16, 59, 745, 316, - /* 2250 */ 1725, 27, 2337, 28, 11, 1695, 322, 1463, 1460, 418, - /* 2260 */ 2336, 753, 724, 2374, 755, 745, 357, 2338, 748, 2340, - /* 2270 */ 2341, 743, 756, 738, 758, 1459, 2355, 759, 2337, 1456, - /* 2280 */ 761, 762, 764, 767, 1450, 765, 1454, 1448, 2303, 1453, - /* 2290 */ 744, 745, 1472, 2355, 1468, 768, 109, 1452, 110, 77, - /* 2300 */ 1451, 1338, 307, 782, 1373, 2303, 1370, 744, 747, 306, - /* 2310 */ 1369, 1368, 1367, 1365, 1363, 1362, 1361, 1399, 793, 2355, - /* 2320 */ 1398, 795, 1359, 207, 1358, 1357, 1356, 1395, 277, 647, - /* 2330 */ 1355, 2303, 2374, 744, 1354, 352, 2338, 748, 2340, 2341, - /* 2340 */ 743, 1344, 738, 1353, 1393, 1350, 2336, 1349, 1346, 2374, - /* 2350 */ 1345, 2337, 342, 2338, 748, 2340, 2341, 743, 1343, 738, - /* 2360 */ 1974, 815, 817, 816, 745, 1972, 819, 820, 821, 1970, - /* 2370 */ 823, 1967, 2336, 2337, 824, 2374, 825, 827, 341, 2338, - /* 2380 */ 748, 2340, 2341, 743, 829, 738, 745, 828, 1947, 831, - /* 2390 */ 1282, 1921, 2355, 841, 1270, 835, 1891, 326, 837, 1891, - /* 2400 */ 1655, 336, 840, 1891, 2303, 1891, 744, 1891, 1891, 1891, - /* 2410 */ 1891, 1891, 1891, 1891, 2355, 1891, 1891, 1891, 1891, 1891, - /* 2420 */ 1891, 1891, 1891, 1891, 1891, 1891, 2303, 1891, 744, 1891, - /* 2430 */ 2337, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, - /* 2440 */ 1891, 1891, 1891, 745, 1891, 2336, 1891, 1891, 2374, 2337, - /* 2450 */ 1891, 343, 2338, 748, 2340, 2341, 743, 1891, 738, 1891, - /* 2460 */ 1891, 1891, 745, 1891, 1891, 1891, 1891, 2336, 1891, 1891, - /* 2470 */ 2374, 2355, 1891, 349, 2338, 748, 2340, 2341, 743, 1891, - /* 2480 */ 738, 1891, 1891, 2303, 1891, 744, 1891, 1891, 1891, 1891, - /* 2490 */ 2355, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, - /* 2500 */ 1891, 1891, 2303, 1891, 744, 1891, 1891, 2337, 1891, 1891, - /* 2510 */ 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, - /* 2520 */ 745, 1891, 1891, 2337, 2336, 1891, 1891, 2374, 1891, 1891, - /* 2530 */ 353, 2338, 748, 2340, 2341, 743, 745, 738, 1891, 1891, - /* 2540 */ 1891, 1891, 1891, 2336, 1891, 1891, 2374, 1891, 2355, 345, - /* 2550 */ 2338, 748, 2340, 2341, 743, 1891, 738, 1891, 1891, 1891, - /* 2560 */ 2303, 1891, 744, 1891, 2355, 1891, 1891, 1891, 1891, 1891, - /* 2570 */ 1891, 1891, 1891, 1891, 1891, 1891, 2303, 1891, 744, 1891, - /* 2580 */ 1891, 2337, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, - /* 2590 */ 1891, 1891, 1891, 1891, 745, 1891, 1891, 1891, 1891, 1891, - /* 2600 */ 1891, 2336, 1891, 2337, 2374, 1891, 1891, 354, 2338, 748, - /* 2610 */ 2340, 2341, 743, 1891, 738, 1891, 745, 2336, 2337, 1891, - /* 2620 */ 2374, 1891, 2355, 346, 2338, 748, 2340, 2341, 743, 1891, - /* 2630 */ 738, 745, 1891, 1891, 2303, 1891, 744, 1891, 1891, 2337, - /* 2640 */ 1891, 1891, 1891, 1891, 2355, 1891, 1891, 1891, 1891, 1891, - /* 2650 */ 1891, 1891, 745, 1891, 1891, 1891, 2303, 1891, 744, 2355, - /* 2660 */ 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, - /* 2670 */ 1891, 2303, 1891, 744, 1891, 2336, 1891, 1891, 2374, 1891, - /* 2680 */ 2355, 355, 2338, 748, 2340, 2341, 743, 1891, 738, 1891, - /* 2690 */ 1891, 1891, 2303, 1891, 744, 1891, 1891, 2336, 1891, 1891, - /* 2700 */ 2374, 1891, 1891, 347, 2338, 748, 2340, 2341, 743, 1891, - /* 2710 */ 738, 1891, 2336, 1891, 1891, 2374, 1891, 1891, 361, 2338, - /* 2720 */ 748, 2340, 2341, 743, 2337, 738, 1891, 1891, 1891, 1891, - /* 2730 */ 1891, 1891, 1891, 2336, 1891, 1891, 2374, 745, 1891, 362, - /* 2740 */ 2338, 748, 2340, 2341, 743, 1891, 738, 1891, 1891, 1891, - /* 2750 */ 1891, 1891, 1891, 1891, 1891, 2337, 1891, 1891, 1891, 1891, - /* 2760 */ 1891, 1891, 1891, 1891, 1891, 2355, 1891, 1891, 745, 1891, - /* 2770 */ 1891, 1891, 1891, 1891, 1891, 1891, 1891, 2303, 1891, 744, - /* 2780 */ 1891, 2337, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, - /* 2790 */ 1891, 1891, 1891, 1891, 745, 1891, 2355, 1891, 1891, 1891, - /* 2800 */ 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 2303, 1891, - /* 2810 */ 744, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 2336, 1891, - /* 2820 */ 1891, 2374, 2355, 1891, 2349, 2338, 748, 2340, 2341, 743, - /* 2830 */ 1891, 738, 1891, 1891, 2303, 1891, 744, 1891, 1891, 1891, - /* 2840 */ 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 2336, - /* 2850 */ 1891, 1891, 2374, 2337, 1891, 2348, 2338, 748, 2340, 2341, - /* 2860 */ 743, 1891, 738, 1891, 1891, 1891, 745, 1891, 1891, 1891, - /* 2870 */ 1891, 1891, 1891, 1891, 2337, 2336, 1891, 1891, 2374, 1891, - /* 2880 */ 1891, 2347, 2338, 748, 2340, 2341, 743, 745, 738, 1891, - /* 2890 */ 1891, 1891, 1891, 1891, 2355, 1891, 1891, 1891, 1891, 1891, - /* 2900 */ 1891, 1891, 1891, 1891, 1891, 1891, 2303, 1891, 744, 1891, - /* 2910 */ 1891, 2337, 1891, 1891, 1891, 2355, 1891, 1891, 1891, 1891, - /* 2920 */ 1891, 1891, 1891, 1891, 745, 1891, 1891, 2303, 1891, 744, - /* 2930 */ 1891, 1891, 2337, 1891, 1891, 1891, 1891, 1891, 1891, 1891, - /* 2940 */ 1891, 1891, 1891, 1891, 1891, 745, 1891, 2336, 1891, 1891, - /* 2950 */ 2374, 1891, 2355, 376, 2338, 748, 2340, 2341, 743, 1891, - /* 2960 */ 738, 1891, 1891, 1891, 2303, 1891, 744, 1891, 2336, 2337, - /* 2970 */ 1891, 2374, 1891, 2355, 377, 2338, 748, 2340, 2341, 743, - /* 2980 */ 1891, 738, 745, 1891, 1891, 2303, 1891, 744, 1891, 1891, - /* 2990 */ 2337, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, - /* 3000 */ 1891, 1891, 1891, 745, 1891, 2336, 1891, 1891, 2374, 1891, - /* 3010 */ 2355, 373, 2338, 748, 2340, 2341, 743, 1891, 738, 1891, - /* 3020 */ 1891, 1891, 2303, 1891, 744, 1891, 2336, 1891, 1891, 2374, - /* 3030 */ 1891, 2355, 378, 2338, 748, 2340, 2341, 743, 1891, 738, - /* 3040 */ 1891, 1891, 1891, 2303, 1891, 744, 1891, 1891, 1891, 1891, - /* 3050 */ 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, - /* 3060 */ 1891, 1891, 1891, 746, 1891, 1891, 2374, 1891, 1891, 352, - /* 3070 */ 2338, 748, 2340, 2341, 743, 1891, 738, 1891, 1891, 1891, - /* 3080 */ 1891, 1891, 1891, 1891, 2336, 1891, 1891, 2374, 1891, 1891, - /* 3090 */ 351, 2338, 748, 2340, 2341, 743, 1891, 738, + /* 0 */ 482, 2199, 174, 466, 1908, 2302, 422, 2448, 465, 2132, + /* 10 */ 2134, 420, 48, 46, 1816, 1896, 732, 237, 2405, 168, + /* 20 */ 417, 567, 1657, 1947, 41, 40, 399, 2088, 47, 45, + /* 30 */ 44, 43, 42, 2445, 2137, 1742, 1982, 1655, 196, 136, + /* 40 */ 135, 134, 133, 132, 131, 130, 129, 128, 2343, 219, + /* 50 */ 2126, 68, 2139, 672, 2223, 672, 2512, 691, 2512, 382, + /* 60 */ 564, 712, 184, 565, 1939, 1737, 1897, 2137, 692, 410, + /* 70 */ 9, 19, 2220, 717, 2518, 203, 2518, 203, 1663, 2513, + /* 80 */ 698, 2513, 698, 1683, 384, 2361, 2203, 127, 95, 2361, + /* 90 */ 126, 125, 124, 123, 122, 121, 120, 119, 118, 1682, + /* 100 */ 796, 2309, 1985, 746, 841, 386, 1313, 15, 1312, 816, + /* 110 */ 815, 814, 813, 429, 2081, 812, 811, 151, 806, 805, + /* 120 */ 804, 803, 802, 801, 800, 150, 794, 793, 792, 428, + /* 130 */ 427, 789, 788, 787, 183, 182, 786, 697, 2223, 173, + /* 140 */ 2512, 1314, 2342, 1744, 1745, 2380, 690, 2025, 114, 2344, + /* 150 */ 750, 2346, 2347, 745, 63, 740, 2221, 717, 696, 203, + /* 160 */ 186, 184, 2433, 2513, 698, 798, 413, 2429, 783, 161, + /* 170 */ 160, 780, 779, 778, 158, 626, 625, 624, 2448, 1717, + /* 180 */ 1727, 205, 616, 143, 620, 2204, 1743, 1746, 619, 2463, + /* 190 */ 2139, 2517, 729, 618, 623, 392, 391, 398, 2319, 617, + /* 200 */ 656, 1658, 613, 1656, 2444, 2137, 1486, 1487, 1685, 1889, + /* 210 */ 41, 40, 2327, 63, 47, 45, 44, 43, 42, 272, + /* 220 */ 584, 127, 2323, 271, 126, 125, 124, 123, 122, 121, + /* 230 */ 120, 119, 118, 1661, 1662, 1714, 1682, 1716, 1719, 1720, + /* 240 */ 1721, 1722, 1723, 1724, 1725, 1726, 742, 738, 1735, 1736, + /* 250 */ 1738, 1739, 1740, 1741, 2, 48, 46, 473, 1556, 1557, + /* 260 */ 364, 1683, 1680, 417, 239, 1657, 2325, 414, 567, 515, + /* 270 */ 1947, 2343, 534, 376, 574, 2262, 740, 533, 1742, 51, + /* 280 */ 1655, 41, 40, 1714, 747, 47, 45, 44, 43, 42, + /* 290 */ 1313, 98, 1312, 496, 371, 535, 1882, 397, 1805, 646, + /* 300 */ 367, 498, 531, 529, 2271, 365, 30, 142, 1737, 217, + /* 310 */ 1820, 476, 2361, 1888, 19, 1451, 1682, 1771, 304, 730, + /* 320 */ 2086, 1663, 709, 146, 2309, 1314, 746, 38, 320, 1442, + /* 330 */ 775, 774, 773, 1446, 772, 1448, 1449, 771, 768, 208, + /* 340 */ 1457, 765, 1459, 1460, 762, 759, 756, 841, 385, 687, + /* 350 */ 15, 47, 45, 44, 43, 42, 41, 40, 274, 484, + /* 360 */ 47, 45, 44, 43, 42, 2342, 2133, 2134, 2380, 302, + /* 370 */ 729, 176, 2344, 750, 2346, 2347, 745, 304, 740, 2063, + /* 380 */ 1772, 1859, 730, 2086, 1576, 1577, 1744, 1745, 2517, 2210, + /* 390 */ 2189, 2512, 522, 521, 520, 519, 514, 513, 512, 511, + /* 400 */ 368, 1847, 56, 504, 503, 502, 501, 493, 492, 491, + /* 410 */ 2516, 486, 485, 383, 2513, 2515, 581, 477, 1544, 1545, + /* 420 */ 730, 2086, 1717, 1727, 1563, 699, 2533, 1575, 1578, 1743, + /* 430 */ 1746, 711, 201, 2441, 2442, 2319, 144, 2446, 730, 2086, + /* 440 */ 137, 693, 688, 681, 1658, 63, 1656, 607, 2448, 2077, + /* 450 */ 684, 683, 1845, 1846, 1848, 1849, 1850, 729, 470, 2323, + /* 460 */ 37, 415, 1766, 1767, 1768, 1769, 1770, 1774, 1775, 1776, + /* 470 */ 1777, 2062, 582, 2216, 2443, 1718, 1661, 1662, 1714, 106, + /* 480 */ 1716, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 742, + /* 490 */ 738, 1735, 1736, 1738, 1739, 1740, 1741, 2, 12, 48, + /* 500 */ 46, 2343, 569, 2325, 2079, 1682, 1287, 417, 566, 1657, + /* 510 */ 1394, 14, 13, 740, 747, 783, 161, 160, 780, 779, + /* 520 */ 778, 158, 1742, 34, 1655, 1294, 450, 488, 2199, 41, + /* 530 */ 40, 1715, 2343, 47, 45, 44, 43, 42, 464, 655, + /* 540 */ 463, 785, 2361, 95, 51, 747, 580, 1949, 1289, 1292, + /* 550 */ 1293, 1396, 1737, 12, 2309, 10, 746, 1294, 19, 626, + /* 560 */ 625, 624, 99, 426, 425, 1663, 616, 143, 620, 2082, + /* 570 */ 462, 2303, 619, 2361, 1919, 111, 221, 618, 623, 392, + /* 580 */ 391, 1292, 1293, 617, 108, 2309, 613, 746, 1664, 517, + /* 590 */ 2199, 841, 63, 1604, 15, 2342, 730, 2086, 2380, 2343, + /* 600 */ 1685, 114, 2344, 750, 2346, 2347, 745, 2139, 740, 304, + /* 610 */ 2139, 149, 747, 156, 2404, 2433, 137, 407, 1785, 413, + /* 620 */ 2429, 672, 716, 612, 2512, 2137, 2342, 2309, 1894, 2380, + /* 630 */ 1744, 1745, 114, 2344, 750, 2346, 2347, 745, 226, 740, + /* 640 */ 2361, 411, 2518, 203, 2532, 785, 2433, 2513, 698, 171, + /* 650 */ 413, 2429, 2309, 454, 746, 41, 40, 2088, 2330, 47, + /* 660 */ 45, 44, 43, 42, 41, 40, 1717, 1727, 47, 45, + /* 670 */ 44, 43, 42, 1743, 1746, 799, 390, 389, 2047, 1752, + /* 680 */ 456, 452, 709, 146, 653, 1682, 1316, 1317, 1658, 148, + /* 690 */ 1656, 2319, 2404, 2342, 572, 2293, 2380, 565, 1939, 114, + /* 700 */ 2344, 750, 2346, 2347, 745, 2328, 740, 432, 304, 311, + /* 710 */ 312, 2408, 431, 2433, 310, 2323, 2332, 413, 2429, 525, + /* 720 */ 1661, 1662, 1714, 1663, 1716, 1719, 1720, 1721, 1722, 1723, + /* 730 */ 1724, 1725, 1726, 742, 738, 1735, 1736, 1738, 1739, 1740, + /* 740 */ 1741, 2, 48, 46, 1747, 2343, 439, 1657, 388, 387, + /* 750 */ 417, 609, 1657, 644, 1667, 1858, 304, 672, 712, 2325, + /* 760 */ 2512, 302, 1655, 12, 1832, 1742, 420, 1655, 642, 740, + /* 770 */ 640, 269, 268, 611, 171, 2343, 1839, 610, 2518, 203, + /* 780 */ 776, 227, 2088, 2513, 698, 52, 2361, 734, 747, 2405, + /* 790 */ 2471, 1840, 300, 2441, 708, 1737, 138, 707, 2309, 2512, + /* 800 */ 746, 325, 561, 1663, 524, 523, 730, 2086, 1663, 2517, + /* 810 */ 223, 559, 2512, 159, 555, 551, 2361, 696, 203, 171, + /* 820 */ 730, 2086, 2513, 698, 2172, 423, 471, 2089, 2309, 841, + /* 830 */ 746, 2516, 1838, 171, 841, 2513, 2514, 49, 2157, 2342, + /* 840 */ 490, 2088, 2380, 2343, 1718, 114, 2344, 750, 2346, 2347, + /* 850 */ 745, 90, 740, 651, 89, 1686, 747, 186, 2484, 2433, + /* 860 */ 656, 730, 2086, 413, 2429, 730, 2086, 1918, 2139, 2342, + /* 870 */ 730, 2086, 2380, 1744, 1745, 114, 2344, 750, 2346, 2347, + /* 880 */ 745, 505, 740, 725, 2361, 506, 2464, 2532, 55, 2433, + /* 890 */ 507, 603, 602, 413, 2429, 197, 2309, 2075, 746, 334, + /* 900 */ 1715, 36, 2116, 672, 605, 604, 2512, 41, 40, 1717, + /* 910 */ 1727, 47, 45, 44, 43, 42, 1743, 1746, 614, 88, + /* 920 */ 2309, 730, 2086, 2139, 2518, 203, 1658, 1682, 1656, 2513, + /* 930 */ 698, 1658, 671, 1656, 658, 2262, 1686, 2342, 2138, 1917, + /* 940 */ 2380, 583, 1391, 114, 2344, 750, 2346, 2347, 745, 304, + /* 950 */ 740, 44, 43, 42, 1296, 2532, 2071, 2433, 1661, 1662, + /* 960 */ 1681, 413, 2429, 1661, 1662, 1714, 2026, 1716, 1719, 1720, + /* 970 */ 1721, 1722, 1723, 1724, 1725, 1726, 742, 738, 1735, 1736, + /* 980 */ 1738, 1739, 1740, 1741, 2, 48, 46, 2343, 500, 730, + /* 990 */ 2086, 255, 2309, 417, 2073, 1657, 499, 510, 509, 2139, + /* 1000 */ 747, 273, 679, 730, 2086, 633, 412, 178, 1742, 2083, + /* 1010 */ 1655, 622, 621, 2516, 2137, 3, 601, 597, 593, 589, + /* 1020 */ 645, 254, 1813, 275, 2064, 41, 40, 54, 2361, 47, + /* 1030 */ 45, 44, 43, 42, 730, 2086, 270, 1686, 1737, 1773, + /* 1040 */ 2309, 1406, 746, 1410, 730, 2086, 2139, 730, 2086, 1916, + /* 1050 */ 657, 1663, 636, 421, 283, 2069, 1405, 152, 1409, 630, + /* 1060 */ 628, 2137, 96, 61, 715, 252, 267, 315, 41, 40, + /* 1070 */ 1687, 669, 47, 45, 44, 43, 42, 841, 1625, 1626, + /* 1080 */ 49, 2342, 1682, 2343, 2380, 1686, 1718, 114, 2344, 750, + /* 1090 */ 2346, 2347, 745, 2182, 740, 713, 747, 194, 2505, 2532, + /* 1100 */ 672, 2433, 2309, 2512, 1915, 413, 2429, 72, 730, 2086, + /* 1110 */ 71, 1914, 730, 2086, 730, 2086, 1744, 1745, 2061, 35, + /* 1120 */ 1913, 2518, 203, 536, 2361, 538, 2513, 698, 727, 1778, + /* 1130 */ 242, 2290, 728, 611, 321, 480, 2309, 610, 746, 251, + /* 1140 */ 244, 1912, 1715, 810, 808, 672, 249, 578, 2512, 730, + /* 1150 */ 2086, 1687, 1717, 1727, 701, 709, 146, 2309, 777, 1743, + /* 1160 */ 1746, 2130, 709, 146, 2309, 241, 2518, 203, 648, 424, + /* 1170 */ 647, 2513, 698, 2309, 1658, 2090, 1656, 2342, 697, 1911, + /* 1180 */ 2380, 2512, 1910, 114, 2344, 750, 2346, 2347, 745, 1907, + /* 1190 */ 740, 1906, 2453, 1805, 2309, 2532, 1905, 2433, 199, 696, + /* 1200 */ 203, 413, 2429, 737, 2513, 698, 1661, 1662, 1714, 1904, + /* 1210 */ 1716, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 742, + /* 1220 */ 738, 1735, 1736, 1738, 1739, 1740, 1741, 2, 48, 46, + /* 1230 */ 2343, 1903, 2309, 159, 159, 2309, 417, 1902, 1657, 1901, + /* 1240 */ 1900, 170, 2309, 747, 2309, 2452, 198, 781, 704, 2309, + /* 1250 */ 2130, 1742, 1687, 1655, 783, 161, 160, 780, 779, 778, + /* 1260 */ 158, 112, 2309, 1899, 76, 202, 2441, 2442, 284, 144, + /* 1270 */ 2446, 2361, 204, 2441, 2442, 1666, 144, 2446, 147, 782, + /* 1280 */ 280, 1737, 2130, 2309, 2309, 746, 2078, 1924, 836, 139, + /* 1290 */ 2309, 1812, 2309, 2309, 1663, 260, 262, 1715, 258, 261, + /* 1300 */ 1687, 86, 700, 264, 266, 615, 263, 265, 1620, 1623, + /* 1310 */ 50, 50, 100, 187, 741, 87, 2309, 1891, 1892, 159, + /* 1320 */ 841, 1969, 50, 15, 2342, 1665, 2343, 2380, 1967, 1389, + /* 1330 */ 114, 2344, 750, 2346, 2347, 745, 1909, 740, 309, 747, + /* 1340 */ 1958, 1956, 2532, 627, 2433, 426, 425, 75, 413, 2429, + /* 1350 */ 629, 14, 13, 2477, 297, 1671, 790, 157, 210, 1744, + /* 1360 */ 1745, 141, 631, 634, 159, 1763, 791, 2361, 1742, 1349, + /* 1370 */ 1664, 66, 50, 685, 291, 2023, 2022, 50, 2362, 2309, + /* 1380 */ 1368, 746, 2208, 1940, 2467, 1844, 1843, 682, 289, 403, + /* 1390 */ 1366, 1950, 689, 719, 714, 1717, 1727, 1573, 1737, 754, + /* 1400 */ 430, 157, 1743, 1746, 159, 140, 157, 400, 2209, 1946, + /* 1410 */ 1350, 1663, 2127, 313, 665, 702, 2468, 1658, 2478, 1656, + /* 1420 */ 2342, 710, 722, 2380, 296, 299, 114, 2344, 750, 2346, + /* 1430 */ 2347, 745, 317, 740, 2048, 5, 303, 736, 2406, 1436, + /* 1440 */ 2433, 1669, 433, 834, 413, 2429, 1779, 1728, 438, 1661, + /* 1450 */ 1662, 1714, 333, 1716, 1719, 1720, 1721, 1722, 1723, 1724, + /* 1460 */ 1725, 1726, 742, 738, 1735, 1736, 1738, 1739, 1740, 1741, + /* 1470 */ 2, 380, 172, 446, 1464, 447, 1468, 340, 1690, 1475, + /* 1480 */ 1473, 162, 458, 457, 211, 212, 460, 214, 328, 1597, + /* 1490 */ 1680, 1668, 474, 1681, 338, 74, 483, 225, 73, 481, + /* 1500 */ 2343, 487, 489, 494, 527, 508, 526, 516, 366, 2201, + /* 1510 */ 518, 705, 528, 747, 539, 540, 537, 230, 2343, 229, + /* 1520 */ 235, 546, 544, 541, 542, 543, 232, 545, 547, 1688, + /* 1530 */ 562, 747, 4, 563, 1672, 570, 1667, 571, 573, 1683, + /* 1540 */ 240, 2361, 92, 243, 575, 1689, 576, 1691, 246, 577, + /* 1550 */ 579, 1692, 248, 2309, 2217, 746, 93, 2280, 608, 2361, + /* 1560 */ 94, 63, 585, 253, 606, 637, 1675, 1677, 116, 638, + /* 1570 */ 2076, 2309, 650, 746, 257, 2072, 360, 276, 97, 652, + /* 1580 */ 738, 1735, 1736, 1738, 1739, 1740, 1741, 1684, 259, 164, + /* 1590 */ 165, 153, 2074, 2277, 649, 2070, 2276, 2380, 2343, 64, + /* 1600 */ 352, 2344, 750, 2346, 2347, 745, 166, 740, 329, 660, + /* 1610 */ 167, 747, 2342, 659, 281, 2380, 664, 667, 342, 2344, + /* 1620 */ 750, 2346, 2347, 745, 8, 740, 676, 686, 2263, 661, + /* 1630 */ 695, 720, 2455, 2483, 286, 2482, 677, 666, 675, 2361, + /* 1640 */ 674, 279, 290, 288, 179, 292, 293, 84, 83, 469, + /* 1650 */ 706, 2309, 216, 746, 295, 404, 703, 294, 1805, 2511, + /* 1660 */ 298, 145, 1685, 2535, 1810, 461, 459, 1808, 190, 2449, + /* 1670 */ 305, 154, 330, 718, 2231, 2230, 363, 2343, 2229, 448, + /* 1680 */ 331, 409, 445, 441, 437, 434, 462, 723, 155, 105, + /* 1690 */ 747, 724, 2342, 332, 2087, 2380, 1, 62, 114, 2344, + /* 1700 */ 750, 2346, 2347, 745, 206, 740, 2414, 107, 2343, 752, + /* 1710 */ 733, 2131, 2433, 335, 1271, 838, 413, 2429, 2361, 835, + /* 1720 */ 163, 747, 359, 53, 840, 304, 339, 372, 2301, 323, + /* 1730 */ 2309, 373, 746, 2300, 2343, 2299, 81, 2294, 435, 436, + /* 1740 */ 1648, 344, 337, 1649, 209, 2292, 358, 747, 440, 2361, + /* 1750 */ 442, 348, 443, 1647, 444, 2291, 381, 2289, 449, 2288, + /* 1760 */ 451, 2309, 2287, 746, 453, 2286, 455, 1636, 2267, 213, + /* 1770 */ 2266, 2342, 215, 1600, 2380, 2361, 82, 115, 2344, 750, + /* 1780 */ 2346, 2347, 745, 1599, 740, 2244, 2243, 2309, 2242, 746, + /* 1790 */ 467, 2433, 468, 2241, 2240, 2432, 2429, 2191, 472, 1543, + /* 1800 */ 2188, 475, 2342, 2343, 2187, 2380, 2181, 479, 115, 2344, + /* 1810 */ 750, 2346, 2347, 745, 478, 740, 744, 2178, 218, 2343, + /* 1820 */ 2177, 2176, 2433, 85, 2175, 2180, 735, 2429, 748, 220, + /* 1830 */ 2179, 2380, 747, 2174, 115, 2344, 750, 2346, 2347, 745, + /* 1840 */ 2173, 740, 2171, 2170, 2361, 2169, 222, 495, 2433, 2168, + /* 1850 */ 497, 2184, 375, 2429, 2167, 2166, 2309, 2165, 746, 91, + /* 1860 */ 2361, 2164, 2163, 2186, 2162, 2161, 2160, 2159, 2158, 2156, + /* 1870 */ 2155, 2154, 2309, 2153, 746, 224, 2343, 2152, 2151, 2150, + /* 1880 */ 2149, 2148, 2147, 2185, 2183, 2146, 2145, 2144, 228, 747, + /* 1890 */ 2143, 530, 2142, 532, 1549, 2141, 2140, 2342, 1407, 1988, + /* 1900 */ 2380, 231, 369, 356, 2344, 750, 2346, 2347, 745, 743, + /* 1910 */ 740, 731, 2398, 2342, 2343, 1411, 2380, 2361, 1987, 175, + /* 1920 */ 2344, 750, 2346, 2347, 745, 233, 740, 747, 1403, 2309, + /* 1930 */ 1986, 746, 1984, 2343, 1981, 548, 550, 1980, 370, 234, + /* 1940 */ 549, 552, 554, 1973, 556, 558, 747, 1960, 553, 560, + /* 1950 */ 1935, 2343, 557, 236, 185, 2361, 78, 1934, 2329, 195, + /* 1960 */ 1295, 673, 2474, 238, 747, 568, 79, 2309, 245, 746, + /* 1970 */ 2342, 2265, 2261, 2380, 2361, 2251, 115, 2344, 750, 2346, + /* 1980 */ 2347, 745, 2239, 740, 2238, 250, 2309, 247, 746, 2215, + /* 1990 */ 2433, 2065, 2361, 1983, 1342, 2430, 1979, 401, 586, 587, + /* 2000 */ 588, 1977, 590, 591, 2309, 592, 746, 1975, 2342, 596, + /* 2010 */ 594, 2380, 1972, 595, 175, 2344, 750, 2346, 2347, 745, + /* 2020 */ 598, 740, 600, 1955, 1953, 599, 1954, 2342, 1952, 2343, + /* 2030 */ 2380, 1931, 2067, 350, 2344, 750, 2346, 2347, 745, 1480, + /* 2040 */ 740, 1479, 747, 65, 256, 2342, 2066, 1393, 2380, 807, + /* 2050 */ 1392, 357, 2344, 750, 2346, 2347, 745, 2475, 740, 1390, + /* 2060 */ 1379, 2343, 1388, 1970, 1387, 393, 1386, 1385, 809, 1968, + /* 2070 */ 2361, 1384, 394, 1381, 747, 402, 1380, 1378, 1959, 694, + /* 2080 */ 395, 1957, 2309, 396, 746, 635, 632, 1930, 1929, 1928, + /* 2090 */ 639, 1927, 641, 1926, 643, 117, 1630, 1632, 1634, 1629, + /* 2100 */ 2264, 29, 2361, 278, 57, 69, 2260, 1606, 58, 2250, + /* 2110 */ 1610, 2237, 1608, 282, 2309, 169, 746, 662, 2236, 663, + /* 2120 */ 1585, 668, 1584, 2342, 2517, 20, 2380, 31, 2343, 357, + /* 2130 */ 2344, 750, 2346, 2347, 745, 6, 740, 670, 21, 67, + /* 2140 */ 22, 747, 2235, 189, 2343, 1861, 7, 678, 285, 33, + /* 2150 */ 680, 200, 287, 1842, 1876, 2342, 177, 744, 2380, 188, + /* 2160 */ 24, 176, 2344, 750, 2346, 2347, 745, 1875, 740, 2361, + /* 2170 */ 405, 32, 2330, 1831, 408, 80, 1880, 1879, 406, 1881, + /* 2180 */ 301, 2309, 17, 746, 1882, 2361, 59, 1802, 1801, 23, + /* 2190 */ 60, 18, 2214, 180, 102, 2213, 721, 2309, 103, 746, + /* 2200 */ 316, 101, 108, 319, 25, 26, 308, 1837, 191, 1754, + /* 2210 */ 11, 2343, 13, 1673, 1764, 314, 2534, 181, 192, 70, + /* 2220 */ 104, 2383, 2342, 1732, 747, 2380, 739, 2343, 357, 2344, + /* 2230 */ 750, 2346, 2347, 745, 1753, 740, 1730, 654, 2342, 39, + /* 2240 */ 747, 2380, 1729, 1699, 356, 2344, 750, 2346, 2347, 745, + /* 2250 */ 16, 740, 2361, 2399, 27, 844, 1707, 416, 28, 753, + /* 2260 */ 419, 1465, 751, 1462, 2309, 755, 746, 757, 2361, 758, + /* 2270 */ 760, 327, 1461, 418, 761, 763, 766, 769, 1458, 1452, + /* 2280 */ 2309, 764, 746, 767, 322, 1450, 770, 193, 1456, 1455, + /* 2290 */ 109, 1454, 749, 1453, 110, 1474, 832, 828, 824, 820, + /* 2300 */ 77, 324, 1470, 1340, 1375, 2342, 784, 1372, 2380, 1371, + /* 2310 */ 1370, 357, 2344, 750, 2346, 2347, 745, 795, 740, 1369, + /* 2320 */ 2343, 2342, 1367, 1365, 2380, 1364, 1363, 357, 2344, 750, + /* 2330 */ 2346, 2347, 745, 747, 740, 1401, 207, 1400, 797, 2343, + /* 2340 */ 1358, 1361, 113, 1360, 1359, 318, 1357, 1356, 1355, 1397, + /* 2350 */ 1395, 1352, 747, 1351, 1348, 1346, 1347, 2343, 1345, 1978, + /* 2360 */ 817, 2361, 819, 1976, 821, 1974, 818, 825, 823, 1971, + /* 2370 */ 747, 827, 829, 2309, 1951, 746, 822, 726, 831, 833, + /* 2380 */ 2361, 1284, 826, 830, 1925, 837, 1272, 843, 326, 839, + /* 2390 */ 1895, 842, 2309, 1659, 746, 336, 1895, 1895, 2361, 1895, + /* 2400 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 2410 */ 2309, 1895, 746, 1895, 2342, 1895, 1895, 2380, 1895, 307, + /* 2420 */ 341, 2344, 750, 2346, 2347, 745, 306, 740, 1895, 1895, + /* 2430 */ 1895, 1895, 1895, 2342, 1895, 2343, 2380, 1895, 1895, 343, + /* 2440 */ 2344, 750, 2346, 2347, 745, 277, 740, 1895, 747, 1895, + /* 2450 */ 1895, 2342, 1895, 1895, 2380, 2343, 1895, 349, 2344, 750, + /* 2460 */ 2346, 2347, 745, 1895, 740, 1895, 1895, 1895, 747, 1895, + /* 2470 */ 1895, 1895, 1895, 1895, 1895, 1895, 2361, 1895, 1895, 1895, + /* 2480 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2309, 1895, + /* 2490 */ 746, 1895, 1895, 1895, 1895, 1895, 2361, 1895, 1895, 1895, + /* 2500 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2309, 1895, + /* 2510 */ 746, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 2520 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2342, + /* 2530 */ 1895, 1895, 2380, 1895, 2343, 353, 2344, 750, 2346, 2347, + /* 2540 */ 745, 1895, 740, 1895, 1895, 1895, 1895, 747, 1895, 2342, + /* 2550 */ 2343, 1895, 2380, 1895, 1895, 345, 2344, 750, 2346, 2347, + /* 2560 */ 745, 1895, 740, 747, 1895, 1895, 1895, 1895, 1895, 2343, + /* 2570 */ 1895, 1895, 1895, 1895, 1895, 2361, 1895, 1895, 1895, 1895, + /* 2580 */ 1895, 1895, 747, 1895, 1895, 1895, 1895, 2309, 1895, 746, + /* 2590 */ 1895, 2361, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 2600 */ 1895, 1895, 1895, 2309, 1895, 746, 1895, 1895, 1895, 1895, + /* 2610 */ 2361, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 2620 */ 1895, 1895, 2309, 1895, 746, 1895, 1895, 1895, 2342, 1895, + /* 2630 */ 1895, 2380, 1895, 1895, 354, 2344, 750, 2346, 2347, 745, + /* 2640 */ 1895, 740, 1895, 1895, 2342, 1895, 1895, 2380, 1895, 2343, + /* 2650 */ 346, 2344, 750, 2346, 2347, 745, 1895, 740, 1895, 1895, + /* 2660 */ 1895, 1895, 747, 2342, 2343, 1895, 2380, 1895, 1895, 355, + /* 2670 */ 2344, 750, 2346, 2347, 745, 1895, 740, 747, 1895, 1895, + /* 2680 */ 2343, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 2690 */ 2361, 1895, 1895, 747, 1895, 1895, 1895, 1895, 1895, 1895, + /* 2700 */ 1895, 1895, 2309, 1895, 746, 2361, 1895, 1895, 1895, 1895, + /* 2710 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2309, 1895, 746, + /* 2720 */ 1895, 2361, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 2730 */ 1895, 1895, 1895, 2309, 1895, 746, 1895, 1895, 1895, 1895, + /* 2740 */ 1895, 1895, 1895, 2342, 1895, 1895, 2380, 2343, 1895, 347, + /* 2750 */ 2344, 750, 2346, 2347, 745, 1895, 740, 1895, 2342, 1895, + /* 2760 */ 747, 2380, 1895, 2343, 361, 2344, 750, 2346, 2347, 745, + /* 2770 */ 1895, 740, 1895, 1895, 2342, 1895, 747, 2380, 2343, 1895, + /* 2780 */ 362, 2344, 750, 2346, 2347, 745, 1895, 740, 2361, 1895, + /* 2790 */ 1895, 747, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 2800 */ 2309, 1895, 746, 1895, 2361, 1895, 1895, 1895, 1895, 1895, + /* 2810 */ 1895, 1895, 1895, 1895, 1895, 1895, 2309, 1895, 746, 2361, + /* 2820 */ 1895, 2343, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 2830 */ 1895, 2309, 1895, 746, 747, 1895, 1895, 1895, 1895, 1895, + /* 2840 */ 1895, 2342, 1895, 2343, 2380, 1895, 1895, 2355, 2344, 750, + /* 2850 */ 2346, 2347, 745, 1895, 740, 1895, 747, 2342, 1895, 1895, + /* 2860 */ 2380, 1895, 2361, 2354, 2344, 750, 2346, 2347, 745, 1895, + /* 2870 */ 740, 1895, 2342, 1895, 2309, 2380, 746, 1895, 2353, 2344, + /* 2880 */ 750, 2346, 2347, 745, 2361, 740, 1895, 1895, 1895, 1895, + /* 2890 */ 1895, 1895, 1895, 1895, 1895, 1895, 2309, 1895, 746, 1895, + /* 2900 */ 2343, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 2910 */ 1895, 1895, 1895, 747, 1895, 2342, 2343, 1895, 2380, 1895, + /* 2920 */ 1895, 377, 2344, 750, 2346, 2347, 745, 1895, 740, 747, + /* 2930 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2342, 1895, 1895, + /* 2940 */ 2380, 2361, 1895, 378, 2344, 750, 2346, 2347, 745, 1895, + /* 2950 */ 740, 1895, 1895, 2309, 1895, 746, 1895, 2361, 1895, 1895, + /* 2960 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2309, + /* 2970 */ 1895, 746, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 2980 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 2990 */ 1895, 1895, 1895, 1895, 2342, 1895, 1895, 2380, 1895, 1895, + /* 3000 */ 374, 2344, 750, 2346, 2347, 745, 1895, 740, 1895, 1895, + /* 3010 */ 2342, 1895, 1895, 2380, 1895, 2343, 379, 2344, 750, 2346, + /* 3020 */ 2347, 745, 1895, 740, 1895, 1895, 1895, 1895, 747, 1895, + /* 3030 */ 2343, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 3040 */ 1895, 1895, 1895, 747, 1895, 1895, 1895, 1895, 1895, 1895, + /* 3050 */ 1895, 1895, 1895, 1895, 1895, 1895, 2361, 1895, 1895, 1895, + /* 3060 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2309, 1895, + /* 3070 */ 746, 2361, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 3080 */ 1895, 1895, 1895, 2309, 1895, 746, 1895, 1895, 1895, 1895, + /* 3090 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 3100 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 748, + /* 3110 */ 1895, 1895, 2380, 1895, 1895, 352, 2344, 750, 2346, 2347, + /* 3120 */ 745, 1895, 740, 1895, 2342, 1895, 1895, 2380, 1895, 1895, + /* 3130 */ 351, 2344, 750, 2346, 2347, 745, 1895, 740, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 362, 363, 349, 426, 351, 426, 357, 392, 431, 360, - /* 10 */ 361, 383, 12, 13, 14, 0, 461, 358, 463, 391, - /* 20 */ 20, 362, 22, 364, 8, 9, 398, 399, 12, 13, - /* 30 */ 14, 15, 16, 20, 406, 35, 0, 37, 4, 24, - /* 40 */ 25, 26, 27, 28, 29, 30, 31, 32, 350, 411, - /* 50 */ 20, 50, 391, 476, 362, 476, 479, 363, 479, 398, - /* 60 */ 51, 363, 391, 20, 358, 65, 0, 406, 362, 60, - /* 70 */ 364, 71, 63, 64, 497, 498, 497, 498, 78, 502, - /* 80 */ 503, 502, 503, 0, 413, 391, 415, 21, 371, 391, - /* 90 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 407, - /* 100 */ 408, 403, 410, 405, 104, 388, 414, 107, 20, 73, - /* 110 */ 74, 75, 76, 77, 397, 79, 80, 81, 82, 83, + /* 0 */ 364, 365, 351, 428, 353, 428, 403, 451, 433, 406, + /* 10 */ 407, 385, 12, 13, 14, 0, 463, 360, 465, 393, + /* 20 */ 20, 364, 22, 366, 8, 9, 400, 401, 12, 13, + /* 30 */ 14, 15, 16, 477, 408, 35, 0, 37, 392, 24, + /* 40 */ 25, 26, 27, 28, 29, 30, 31, 32, 352, 413, + /* 50 */ 404, 4, 393, 478, 407, 478, 481, 365, 481, 400, + /* 60 */ 359, 365, 393, 362, 363, 65, 0, 408, 20, 422, + /* 70 */ 42, 71, 425, 426, 499, 500, 499, 500, 78, 504, + /* 80 */ 505, 504, 505, 20, 415, 393, 417, 21, 373, 393, + /* 90 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 20, + /* 100 */ 13, 405, 0, 407, 104, 390, 20, 107, 22, 73, + /* 110 */ 74, 75, 76, 77, 399, 79, 80, 81, 82, 83, /* 120 */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - /* 130 */ 94, 95, 96, 97, 98, 99, 100, 476, 465, 466, - /* 140 */ 479, 107, 444, 143, 144, 447, 452, 20, 450, 451, - /* 150 */ 452, 453, 454, 455, 20, 457, 143, 144, 497, 498, - /* 160 */ 462, 20, 464, 502, 503, 21, 468, 469, 24, 25, - /* 170 */ 26, 27, 28, 29, 30, 31, 32, 177, 178, 357, - /* 180 */ 179, 483, 360, 361, 184, 185, 4, 14, 187, 491, - /* 190 */ 362, 363, 401, 20, 104, 404, 405, 184, 185, 199, - /* 200 */ 107, 201, 23, 362, 363, 23, 20, 191, 118, 119, - /* 210 */ 120, 121, 122, 123, 124, 125, 126, 127, 426, 129, - /* 220 */ 130, 131, 132, 133, 134, 135, 47, 48, 46, 47, - /* 230 */ 48, 231, 232, 233, 107, 235, 236, 237, 238, 239, + /* 130 */ 94, 95, 96, 97, 98, 99, 100, 478, 407, 374, + /* 140 */ 481, 55, 446, 143, 144, 449, 454, 382, 452, 453, + /* 150 */ 454, 455, 456, 457, 107, 459, 425, 426, 499, 500, + /* 160 */ 464, 393, 466, 504, 505, 78, 470, 471, 136, 137, + /* 170 */ 138, 139, 140, 141, 142, 73, 74, 75, 451, 179, + /* 180 */ 180, 485, 80, 81, 82, 417, 186, 187, 86, 493, + /* 190 */ 393, 3, 20, 91, 92, 93, 94, 400, 381, 97, + /* 200 */ 364, 201, 100, 203, 477, 408, 143, 144, 20, 193, + /* 210 */ 8, 9, 395, 107, 12, 13, 14, 15, 16, 138, + /* 220 */ 70, 21, 405, 142, 24, 25, 26, 27, 28, 29, + /* 230 */ 30, 31, 32, 233, 234, 235, 20, 237, 238, 239, /* 240 */ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, - /* 250 */ 250, 251, 252, 12, 13, 107, 369, 20, 18, 22, - /* 260 */ 20, 20, 461, 22, 463, 177, 178, 27, 476, 350, - /* 270 */ 30, 479, 20, 386, 37, 35, 35, 70, 37, 8, - /* 280 */ 9, 394, 363, 12, 13, 14, 15, 16, 183, 497, - /* 290 */ 498, 51, 55, 53, 502, 503, 362, 363, 58, 59, - /* 300 */ 472, 473, 474, 269, 476, 477, 65, 479, 225, 69, - /* 310 */ 391, 295, 71, 472, 473, 474, 382, 476, 477, 78, - /* 320 */ 405, 383, 403, 389, 405, 497, 498, 14, 20, 391, - /* 330 */ 502, 503, 372, 20, 73, 74, 75, 399, 423, 424, - /* 340 */ 380, 80, 81, 82, 390, 104, 106, 86, 107, 405, - /* 350 */ 177, 20, 91, 92, 93, 94, 402, 117, 97, 107, - /* 360 */ 449, 100, 269, 444, 420, 179, 447, 423, 424, 450, - /* 370 */ 451, 452, 453, 454, 455, 456, 457, 458, 459, 108, - /* 380 */ 275, 276, 277, 350, 143, 144, 475, 147, 148, 362, - /* 390 */ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - /* 400 */ 160, 161, 162, 163, 164, 165, 233, 167, 168, 169, - /* 410 */ 0, 18, 20, 173, 174, 175, 23, 269, 177, 178, - /* 420 */ 180, 362, 363, 8, 9, 184, 185, 12, 13, 14, - /* 430 */ 15, 16, 22, 40, 41, 20, 403, 44, 107, 70, - /* 440 */ 199, 476, 201, 22, 479, 418, 419, 54, 0, 8, - /* 450 */ 9, 143, 144, 12, 13, 14, 15, 16, 37, 66, - /* 460 */ 67, 68, 69, 498, 362, 363, 253, 502, 503, 107, - /* 470 */ 362, 363, 231, 232, 233, 231, 235, 236, 237, 238, - /* 480 */ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, - /* 490 */ 249, 250, 251, 252, 253, 12, 13, 137, 138, 78, - /* 500 */ 107, 387, 142, 20, 350, 22, 12, 13, 14, 15, - /* 510 */ 16, 449, 71, 350, 362, 363, 117, 363, 35, 411, - /* 520 */ 37, 269, 12, 13, 280, 281, 282, 283, 284, 285, - /* 530 */ 286, 472, 473, 474, 382, 476, 477, 475, 145, 65, - /* 540 */ 350, 389, 362, 363, 350, 391, 14, 37, 65, 0, - /* 550 */ 396, 117, 20, 363, 71, 441, 115, 403, 362, 405, - /* 560 */ 198, 78, 200, 8, 9, 166, 403, 12, 13, 14, - /* 570 */ 15, 16, 117, 471, 472, 473, 474, 350, 476, 477, - /* 580 */ 106, 391, 362, 109, 191, 192, 193, 104, 33, 196, - /* 590 */ 107, 411, 230, 403, 179, 405, 20, 403, 444, 22, - /* 600 */ 269, 447, 209, 210, 450, 451, 452, 453, 454, 455, - /* 610 */ 162, 457, 350, 220, 37, 379, 223, 176, 170, 226, - /* 620 */ 227, 228, 229, 230, 0, 233, 143, 144, 37, 393, - /* 630 */ 403, 269, 436, 437, 444, 0, 253, 447, 255, 403, - /* 640 */ 450, 451, 452, 453, 454, 455, 172, 457, 233, 3, - /* 650 */ 460, 20, 462, 463, 464, 350, 436, 437, 468, 469, - /* 660 */ 177, 178, 269, 108, 350, 403, 20, 184, 185, 78, - /* 670 */ 8, 9, 362, 363, 12, 13, 14, 15, 16, 347, - /* 680 */ 78, 104, 199, 447, 201, 136, 137, 138, 139, 140, - /* 690 */ 141, 142, 382, 457, 70, 87, 42, 256, 257, 258, - /* 700 */ 259, 260, 261, 262, 263, 264, 265, 266, 403, 177, - /* 710 */ 20, 201, 22, 350, 231, 232, 233, 403, 235, 236, - /* 720 */ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, - /* 730 */ 247, 248, 249, 250, 251, 252, 12, 13, 14, 350, - /* 740 */ 391, 22, 362, 363, 20, 55, 22, 398, 362, 363, - /* 750 */ 392, 137, 363, 177, 108, 406, 37, 149, 426, 35, - /* 760 */ 69, 37, 382, 431, 476, 233, 403, 479, 382, 350, - /* 770 */ 108, 136, 137, 138, 139, 140, 141, 142, 170, 171, - /* 780 */ 391, 379, 363, 22, 365, 497, 498, 362, 363, 65, - /* 790 */ 502, 503, 403, 449, 405, 393, 369, 78, 37, 20, - /* 800 */ 362, 363, 78, 1, 2, 403, 371, 382, 476, 233, - /* 810 */ 391, 479, 136, 137, 138, 139, 140, 141, 142, 475, - /* 820 */ 382, 394, 403, 104, 405, 179, 212, 213, 104, 497, - /* 830 */ 498, 107, 397, 444, 502, 503, 447, 350, 350, 450, - /* 840 */ 451, 452, 453, 454, 455, 391, 457, 391, 34, 447, - /* 850 */ 363, 462, 398, 464, 398, 362, 363, 468, 469, 457, - /* 860 */ 406, 20, 406, 444, 233, 104, 447, 143, 144, 450, - /* 870 */ 451, 452, 453, 454, 455, 382, 457, 426, 391, 21, - /* 880 */ 491, 462, 0, 464, 392, 194, 378, 468, 469, 381, - /* 890 */ 403, 403, 405, 2, 36, 391, 38, 39, 40, 8, - /* 900 */ 9, 177, 178, 12, 13, 14, 15, 16, 184, 185, - /* 910 */ 108, 136, 221, 222, 391, 140, 362, 363, 199, 415, - /* 920 */ 201, 398, 268, 199, 42, 201, 13, 476, 138, 406, - /* 930 */ 479, 444, 142, 176, 447, 0, 382, 450, 451, 452, - /* 940 */ 453, 454, 455, 107, 457, 14, 15, 16, 497, 498, - /* 950 */ 231, 232, 116, 502, 503, 231, 232, 233, 179, 235, - /* 960 */ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, - /* 970 */ 246, 247, 248, 249, 250, 251, 252, 12, 13, 492, - /* 980 */ 493, 376, 377, 2, 426, 20, 426, 22, 350, 8, - /* 990 */ 9, 78, 350, 12, 13, 14, 15, 16, 208, 350, - /* 1000 */ 35, 211, 37, 383, 214, 363, 216, 365, 73, 74, - /* 1010 */ 75, 391, 233, 256, 392, 80, 81, 82, 350, 399, - /* 1020 */ 179, 86, 476, 266, 3, 479, 91, 92, 93, 94, - /* 1030 */ 65, 363, 97, 391, 476, 100, 476, 479, 383, 479, - /* 1040 */ 4, 403, 392, 78, 498, 403, 391, 405, 502, 503, - /* 1050 */ 362, 363, 403, 392, 399, 497, 498, 497, 498, 391, - /* 1060 */ 502, 503, 502, 503, 350, 400, 39, 40, 403, 104, - /* 1070 */ 382, 403, 107, 405, 233, 350, 8, 9, 362, 363, - /* 1080 */ 12, 13, 14, 15, 16, 392, 444, 350, 363, 447, - /* 1090 */ 365, 350, 450, 451, 452, 453, 454, 455, 382, 457, - /* 1100 */ 350, 14, 404, 405, 462, 13, 464, 20, 143, 144, - /* 1110 */ 468, 469, 444, 56, 57, 447, 391, 403, 450, 451, - /* 1120 */ 452, 453, 454, 455, 20, 457, 367, 368, 403, 37, - /* 1130 */ 405, 350, 464, 350, 362, 363, 468, 469, 111, 112, - /* 1140 */ 403, 114, 177, 178, 403, 33, 363, 391, 365, 184, - /* 1150 */ 185, 8, 9, 403, 382, 12, 13, 14, 15, 16, - /* 1160 */ 367, 368, 406, 136, 199, 391, 201, 140, 350, 444, - /* 1170 */ 362, 363, 447, 399, 391, 450, 451, 452, 453, 454, - /* 1180 */ 455, 0, 457, 33, 403, 432, 403, 462, 405, 464, - /* 1190 */ 382, 376, 377, 468, 469, 45, 231, 232, 233, 380, - /* 1200 */ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, - /* 1210 */ 245, 246, 247, 248, 249, 250, 251, 252, 12, 13, - /* 1220 */ 108, 403, 460, 350, 350, 463, 20, 444, 22, 391, - /* 1230 */ 447, 391, 51, 450, 451, 452, 453, 454, 455, 172, - /* 1240 */ 457, 35, 4, 37, 406, 462, 406, 464, 362, 363, - /* 1250 */ 400, 468, 469, 403, 506, 362, 363, 19, 33, 350, - /* 1260 */ 362, 363, 362, 363, 33, 362, 363, 379, 382, 37, - /* 1270 */ 203, 65, 363, 35, 365, 382, 403, 403, 267, 268, - /* 1280 */ 382, 393, 382, 351, 78, 382, 362, 363, 0, 51, - /* 1290 */ 400, 403, 384, 403, 33, 387, 58, 59, 362, 363, - /* 1300 */ 391, 353, 354, 65, 33, 110, 382, 271, 113, 366, - /* 1310 */ 104, 290, 403, 107, 405, 13, 45, 350, 382, 0, - /* 1320 */ 0, 33, 179, 12, 13, 110, 110, 33, 113, 113, - /* 1330 */ 363, 110, 365, 22, 113, 447, 448, 233, 215, 37, - /* 1340 */ 217, 22, 22, 0, 106, 457, 35, 109, 37, 143, - /* 1350 */ 144, 65, 49, 444, 71, 33, 447, 33, 391, 450, - /* 1360 */ 451, 452, 453, 454, 455, 22, 457, 143, 144, 108, - /* 1370 */ 403, 462, 405, 464, 1, 2, 65, 468, 469, 416, - /* 1380 */ 495, 391, 37, 177, 178, 33, 33, 33, 33, 78, - /* 1390 */ 184, 185, 33, 33, 33, 109, 33, 33, 33, 13, - /* 1400 */ 33, 33, 108, 33, 13, 199, 488, 201, 33, 33, - /* 1410 */ 107, 444, 0, 379, 447, 104, 379, 450, 451, 452, - /* 1420 */ 453, 454, 455, 37, 457, 37, 416, 361, 37, 462, - /* 1430 */ 108, 464, 108, 201, 416, 468, 469, 231, 232, 233, - /* 1440 */ 494, 235, 236, 237, 238, 239, 240, 241, 242, 243, - /* 1450 */ 244, 245, 246, 247, 248, 249, 250, 251, 252, 366, - /* 1460 */ 108, 108, 108, 108, 52, 494, 78, 108, 108, 108, - /* 1470 */ 494, 108, 108, 108, 35, 108, 108, 425, 108, 350, - /* 1480 */ 494, 416, 363, 108, 108, 402, 433, 416, 416, 470, - /* 1490 */ 51, 478, 363, 499, 381, 481, 427, 51, 272, 60, - /* 1500 */ 61, 62, 63, 42, 65, 446, 445, 20, 438, 214, - /* 1510 */ 199, 371, 201, 438, 231, 371, 443, 292, 197, 429, - /* 1520 */ 391, 20, 362, 20, 363, 294, 45, 412, 363, 412, - /* 1530 */ 409, 362, 403, 176, 405, 363, 362, 350, 412, 409, - /* 1540 */ 409, 105, 231, 232, 103, 106, 201, 374, 109, 102, - /* 1550 */ 363, 375, 362, 373, 362, 362, 245, 246, 247, 248, - /* 1560 */ 249, 250, 251, 362, 350, 20, 355, 50, 359, 359, - /* 1570 */ 438, 371, 355, 444, 371, 20, 447, 363, 391, 450, - /* 1580 */ 451, 452, 453, 454, 455, 20, 457, 405, 20, 371, - /* 1590 */ 403, 462, 405, 464, 364, 428, 20, 468, 469, 371, - /* 1600 */ 364, 362, 419, 355, 371, 391, 371, 403, 371, 362, - /* 1610 */ 391, 172, 371, 391, 391, 353, 353, 403, 391, 405, - /* 1620 */ 181, 182, 350, 355, 218, 391, 442, 188, 189, 107, - /* 1630 */ 20, 444, 403, 391, 447, 363, 391, 450, 451, 452, - /* 1640 */ 453, 454, 455, 391, 457, 391, 207, 391, 391, 462, - /* 1650 */ 438, 464, 403, 440, 369, 468, 469, 437, 444, 205, - /* 1660 */ 204, 447, 369, 391, 450, 451, 452, 453, 454, 455, - /* 1670 */ 405, 457, 362, 427, 434, 403, 462, 405, 464, 435, - /* 1680 */ 403, 279, 468, 469, 487, 278, 487, 421, 421, 190, - /* 1690 */ 287, 273, 490, 289, 489, 487, 288, 350, 507, 501, - /* 1700 */ 427, 296, 293, 268, 291, 363, 20, 500, 449, 117, - /* 1710 */ 363, 421, 270, 364, 182, 369, 444, 369, 403, 447, - /* 1720 */ 403, 403, 450, 451, 452, 453, 454, 455, 485, 457, - /* 1730 */ 403, 403, 482, 480, 350, 421, 464, 486, 391, 484, - /* 1740 */ 468, 469, 417, 369, 363, 387, 369, 363, 107, 467, - /* 1750 */ 403, 107, 405, 403, 362, 22, 369, 395, 38, 430, - /* 1760 */ 422, 422, 352, 385, 385, 350, 370, 356, 385, 355, - /* 1770 */ 439, 348, 0, 0, 0, 391, 45, 0, 363, 37, - /* 1780 */ 224, 37, 37, 37, 224, 0, 37, 403, 37, 405, - /* 1790 */ 224, 444, 37, 0, 447, 224, 0, 450, 451, 452, - /* 1800 */ 453, 454, 455, 37, 457, 0, 391, 37, 350, 0, - /* 1810 */ 22, 464, 0, 37, 219, 468, 469, 0, 403, 207, - /* 1820 */ 405, 363, 0, 207, 201, 208, 199, 0, 444, 0, - /* 1830 */ 350, 447, 0, 195, 450, 451, 452, 453, 454, 455, - /* 1840 */ 194, 457, 0, 363, 0, 148, 49, 49, 0, 391, - /* 1850 */ 37, 0, 0, 51, 0, 37, 49, 0, 0, 444, - /* 1860 */ 45, 403, 447, 405, 0, 450, 451, 452, 453, 454, - /* 1870 */ 455, 391, 457, 0, 49, 0, 396, 0, 0, 464, - /* 1880 */ 0, 0, 0, 403, 469, 405, 162, 37, 504, 505, - /* 1890 */ 0, 162, 0, 0, 0, 0, 0, 0, 0, 0, - /* 1900 */ 0, 350, 444, 0, 0, 447, 0, 0, 450, 451, - /* 1910 */ 452, 453, 454, 455, 363, 457, 0, 0, 0, 0, - /* 1920 */ 49, 0, 0, 0, 444, 0, 0, 447, 350, 45, - /* 1930 */ 450, 451, 452, 453, 454, 455, 0, 457, 0, 0, - /* 1940 */ 0, 363, 391, 148, 0, 0, 22, 147, 0, 146, - /* 1950 */ 0, 493, 22, 22, 403, 50, 405, 0, 50, 0, - /* 1960 */ 0, 0, 0, 51, 37, 0, 65, 0, 0, 391, - /* 1970 */ 37, 42, 37, 0, 65, 65, 0, 45, 37, 42, - /* 1980 */ 37, 403, 33, 405, 14, 51, 0, 0, 42, 42, - /* 1990 */ 0, 0, 0, 51, 43, 444, 42, 42, 447, 0, - /* 2000 */ 350, 450, 451, 452, 453, 454, 455, 49, 457, 190, - /* 2010 */ 0, 0, 49, 363, 0, 49, 37, 42, 49, 0, - /* 2020 */ 37, 0, 444, 51, 72, 447, 350, 0, 450, 451, - /* 2030 */ 452, 453, 454, 455, 37, 457, 51, 42, 42, 363, - /* 2040 */ 51, 391, 37, 0, 51, 42, 396, 496, 0, 0, - /* 2050 */ 0, 0, 0, 403, 37, 405, 22, 0, 0, 37, - /* 2060 */ 0, 37, 37, 37, 33, 37, 37, 391, 115, 113, - /* 2070 */ 37, 33, 37, 37, 37, 22, 37, 22, 22, 403, - /* 2080 */ 206, 405, 0, 505, 22, 53, 0, 22, 0, 0, - /* 2090 */ 0, 37, 0, 0, 444, 22, 37, 447, 350, 20, - /* 2100 */ 450, 451, 452, 453, 454, 455, 37, 457, 37, 37, - /* 2110 */ 108, 363, 37, 107, 0, 107, 49, 0, 37, 22, - /* 2120 */ 444, 3, 1, 447, 0, 22, 450, 451, 452, 453, - /* 2130 */ 454, 455, 0, 457, 0, 459, 274, 33, 108, 391, - /* 2140 */ 19, 50, 33, 179, 396, 50, 33, 107, 107, 105, - /* 2150 */ 179, 403, 107, 405, 108, 108, 35, 179, 33, 182, - /* 2160 */ 179, 49, 33, 179, 103, 49, 350, 3, 186, 33, - /* 2170 */ 107, 107, 51, 107, 186, 37, 202, 37, 108, 363, - /* 2180 */ 37, 60, 61, 62, 63, 274, 65, 274, 37, 37, - /* 2190 */ 37, 108, 444, 108, 49, 447, 33, 49, 450, 451, - /* 2200 */ 452, 453, 454, 455, 108, 457, 108, 391, 0, 0, - /* 2210 */ 42, 0, 396, 107, 107, 49, 108, 42, 108, 403, - /* 2220 */ 33, 405, 107, 2, 22, 183, 107, 106, 105, 107, - /* 2230 */ 109, 49, 105, 107, 49, 350, 116, 107, 231, 108, - /* 2240 */ 107, 22, 37, 108, 107, 117, 107, 267, 363, 181, - /* 2250 */ 108, 107, 350, 107, 254, 108, 33, 108, 108, 37, - /* 2260 */ 444, 107, 141, 447, 37, 363, 450, 451, 452, 453, - /* 2270 */ 454, 455, 107, 457, 37, 108, 391, 107, 350, 108, - /* 2280 */ 37, 107, 37, 37, 108, 107, 128, 108, 403, 128, - /* 2290 */ 405, 363, 37, 391, 22, 107, 107, 128, 107, 107, - /* 2300 */ 128, 72, 181, 71, 37, 403, 37, 405, 234, 188, - /* 2310 */ 37, 37, 37, 37, 37, 37, 37, 78, 101, 391, - /* 2320 */ 78, 101, 37, 33, 37, 37, 22, 78, 207, 444, - /* 2330 */ 37, 403, 447, 405, 37, 450, 451, 452, 453, 454, - /* 2340 */ 455, 22, 457, 37, 37, 37, 444, 37, 37, 447, - /* 2350 */ 37, 350, 450, 451, 452, 453, 454, 455, 37, 457, - /* 2360 */ 0, 37, 42, 51, 363, 0, 37, 51, 42, 0, - /* 2370 */ 37, 0, 444, 350, 51, 447, 42, 37, 450, 451, - /* 2380 */ 452, 453, 454, 455, 42, 457, 363, 51, 0, 37, - /* 2390 */ 37, 0, 391, 20, 22, 33, 508, 22, 21, 508, - /* 2400 */ 22, 22, 21, 508, 403, 508, 405, 508, 508, 508, - /* 2410 */ 508, 508, 508, 508, 391, 508, 508, 508, 508, 508, - /* 2420 */ 508, 508, 508, 508, 508, 508, 403, 508, 405, 508, - /* 2430 */ 350, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2440 */ 508, 508, 508, 363, 508, 444, 508, 508, 447, 350, - /* 2450 */ 508, 450, 451, 452, 453, 454, 455, 508, 457, 508, - /* 2460 */ 508, 508, 363, 508, 508, 508, 508, 444, 508, 508, - /* 2470 */ 447, 391, 508, 450, 451, 452, 453, 454, 455, 508, - /* 2480 */ 457, 508, 508, 403, 508, 405, 508, 508, 508, 508, - /* 2490 */ 391, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2500 */ 508, 508, 403, 508, 405, 508, 508, 350, 508, 508, - /* 2510 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2520 */ 363, 508, 508, 350, 444, 508, 508, 447, 508, 508, - /* 2530 */ 450, 451, 452, 453, 454, 455, 363, 457, 508, 508, - /* 2540 */ 508, 508, 508, 444, 508, 508, 447, 508, 391, 450, - /* 2550 */ 451, 452, 453, 454, 455, 508, 457, 508, 508, 508, - /* 2560 */ 403, 508, 405, 508, 391, 508, 508, 508, 508, 508, - /* 2570 */ 508, 508, 508, 508, 508, 508, 403, 508, 405, 508, - /* 2580 */ 508, 350, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2590 */ 508, 508, 508, 508, 363, 508, 508, 508, 508, 508, - /* 2600 */ 508, 444, 508, 350, 447, 508, 508, 450, 451, 452, - /* 2610 */ 453, 454, 455, 508, 457, 508, 363, 444, 350, 508, - /* 2620 */ 447, 508, 391, 450, 451, 452, 453, 454, 455, 508, - /* 2630 */ 457, 363, 508, 508, 403, 508, 405, 508, 508, 350, - /* 2640 */ 508, 508, 508, 508, 391, 508, 508, 508, 508, 508, - /* 2650 */ 508, 508, 363, 508, 508, 508, 403, 508, 405, 391, - /* 2660 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2670 */ 508, 403, 508, 405, 508, 444, 508, 508, 447, 508, - /* 2680 */ 391, 450, 451, 452, 453, 454, 455, 508, 457, 508, - /* 2690 */ 508, 508, 403, 508, 405, 508, 508, 444, 508, 508, - /* 2700 */ 447, 508, 508, 450, 451, 452, 453, 454, 455, 508, - /* 2710 */ 457, 508, 444, 508, 508, 447, 508, 508, 450, 451, - /* 2720 */ 452, 453, 454, 455, 350, 457, 508, 508, 508, 508, - /* 2730 */ 508, 508, 508, 444, 508, 508, 447, 363, 508, 450, - /* 2740 */ 451, 452, 453, 454, 455, 508, 457, 508, 508, 508, - /* 2750 */ 508, 508, 508, 508, 508, 350, 508, 508, 508, 508, - /* 2760 */ 508, 508, 508, 508, 508, 391, 508, 508, 363, 508, - /* 2770 */ 508, 508, 508, 508, 508, 508, 508, 403, 508, 405, - /* 2780 */ 508, 350, 508, 508, 508, 508, 508, 508, 508, 508, - /* 2790 */ 508, 508, 508, 508, 363, 508, 391, 508, 508, 508, - /* 2800 */ 508, 508, 508, 508, 508, 508, 508, 508, 403, 508, - /* 2810 */ 405, 508, 508, 508, 508, 508, 508, 508, 444, 508, - /* 2820 */ 508, 447, 391, 508, 450, 451, 452, 453, 454, 455, - /* 2830 */ 508, 457, 508, 508, 403, 508, 405, 508, 508, 508, - /* 2840 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 444, - /* 2850 */ 508, 508, 447, 350, 508, 450, 451, 452, 453, 454, - /* 2860 */ 455, 508, 457, 508, 508, 508, 363, 508, 508, 508, - /* 2870 */ 508, 508, 508, 508, 350, 444, 508, 508, 447, 508, - /* 2880 */ 508, 450, 451, 452, 453, 454, 455, 363, 457, 508, - /* 2890 */ 508, 508, 508, 508, 391, 508, 508, 508, 508, 508, - /* 2900 */ 508, 508, 508, 508, 508, 508, 403, 508, 405, 508, - /* 2910 */ 508, 350, 508, 508, 508, 391, 508, 508, 508, 508, - /* 2920 */ 508, 508, 508, 508, 363, 508, 508, 403, 508, 405, - /* 2930 */ 508, 508, 350, 508, 508, 508, 508, 508, 508, 508, - /* 2940 */ 508, 508, 508, 508, 508, 363, 508, 444, 508, 508, - /* 2950 */ 447, 508, 391, 450, 451, 452, 453, 454, 455, 508, - /* 2960 */ 457, 508, 508, 508, 403, 508, 405, 508, 444, 350, - /* 2970 */ 508, 447, 508, 391, 450, 451, 452, 453, 454, 455, - /* 2980 */ 508, 457, 363, 508, 508, 403, 508, 405, 508, 508, - /* 2990 */ 350, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 3000 */ 508, 508, 508, 363, 508, 444, 508, 508, 447, 508, - /* 3010 */ 391, 450, 451, 452, 453, 454, 455, 508, 457, 508, - /* 3020 */ 508, 508, 403, 508, 405, 508, 444, 508, 508, 447, - /* 3030 */ 508, 391, 450, 451, 452, 453, 454, 455, 508, 457, - /* 3040 */ 508, 508, 508, 403, 508, 405, 508, 508, 508, 508, - /* 3050 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 3060 */ 508, 508, 508, 444, 508, 508, 447, 508, 508, 450, - /* 3070 */ 451, 452, 453, 454, 455, 508, 457, 508, 508, 508, - /* 3080 */ 508, 508, 508, 508, 444, 508, 508, 447, 508, 508, - /* 3090 */ 450, 451, 452, 453, 454, 455, 508, 457, 347, 347, - /* 3100 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3110 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3120 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3130 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3140 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3150 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3160 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3170 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3180 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3190 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3200 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3210 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3220 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3230 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3240 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3250 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3260 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3270 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3280 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3290 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3300 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3310 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3320 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3330 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3340 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3350 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3360 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3370 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3380 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3390 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3400 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3410 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3420 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3430 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - /* 3440 */ 347, 347, 347, 347, 347, + /* 250 */ 250, 251, 252, 253, 254, 12, 13, 364, 179, 180, + /* 260 */ 18, 20, 20, 20, 360, 22, 449, 450, 364, 27, + /* 270 */ 366, 352, 30, 71, 438, 439, 459, 35, 35, 107, + /* 280 */ 37, 8, 9, 235, 365, 12, 13, 14, 15, 16, + /* 290 */ 20, 210, 22, 51, 213, 53, 108, 216, 270, 218, + /* 300 */ 58, 59, 409, 410, 389, 412, 33, 37, 65, 416, + /* 310 */ 14, 69, 393, 297, 71, 104, 20, 115, 271, 364, + /* 320 */ 365, 78, 364, 365, 405, 55, 407, 467, 468, 118, + /* 330 */ 119, 120, 121, 122, 123, 124, 125, 126, 127, 384, + /* 340 */ 129, 130, 131, 132, 133, 134, 135, 104, 106, 185, + /* 350 */ 107, 12, 13, 14, 15, 16, 8, 9, 443, 117, + /* 360 */ 12, 13, 14, 15, 16, 446, 406, 407, 449, 181, + /* 370 */ 20, 452, 453, 454, 455, 456, 457, 271, 459, 0, + /* 380 */ 178, 108, 364, 365, 143, 144, 143, 144, 478, 147, + /* 390 */ 148, 481, 150, 151, 152, 153, 154, 155, 156, 157, + /* 400 */ 158, 233, 384, 161, 162, 163, 164, 165, 166, 167, + /* 410 */ 500, 169, 170, 171, 504, 505, 364, 175, 176, 177, + /* 420 */ 364, 365, 179, 180, 182, 506, 507, 186, 187, 186, + /* 430 */ 187, 473, 474, 475, 476, 381, 478, 479, 364, 365, + /* 440 */ 384, 277, 278, 279, 201, 107, 203, 391, 451, 395, + /* 450 */ 282, 283, 284, 285, 286, 287, 288, 20, 384, 405, + /* 460 */ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + /* 470 */ 268, 0, 420, 421, 477, 179, 233, 234, 235, 371, + /* 480 */ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + /* 490 */ 247, 248, 249, 250, 251, 252, 253, 254, 255, 12, + /* 500 */ 13, 352, 14, 449, 396, 20, 4, 20, 20, 22, + /* 510 */ 37, 1, 2, 459, 365, 136, 137, 138, 139, 140, + /* 520 */ 141, 142, 35, 2, 37, 23, 69, 364, 365, 8, + /* 530 */ 9, 235, 352, 12, 13, 14, 15, 16, 200, 20, + /* 540 */ 202, 70, 393, 373, 107, 365, 20, 367, 46, 47, + /* 550 */ 48, 78, 65, 255, 405, 257, 407, 23, 71, 73, + /* 560 */ 74, 75, 174, 12, 13, 78, 80, 81, 82, 399, + /* 570 */ 232, 428, 86, 393, 352, 107, 413, 91, 92, 93, + /* 580 */ 94, 47, 48, 97, 116, 405, 100, 407, 37, 364, + /* 590 */ 365, 104, 107, 205, 107, 446, 364, 365, 449, 352, + /* 600 */ 20, 452, 453, 454, 455, 456, 457, 393, 459, 271, + /* 610 */ 393, 462, 365, 464, 465, 466, 384, 400, 108, 470, + /* 620 */ 471, 478, 408, 391, 481, 408, 446, 405, 349, 449, + /* 630 */ 143, 144, 452, 453, 454, 455, 456, 457, 413, 459, + /* 640 */ 393, 385, 499, 500, 464, 70, 466, 504, 505, 393, + /* 650 */ 470, 471, 405, 196, 407, 8, 9, 401, 49, 12, + /* 660 */ 13, 14, 15, 16, 8, 9, 179, 180, 12, 13, + /* 670 */ 14, 15, 16, 186, 187, 380, 39, 40, 383, 14, + /* 680 */ 223, 224, 364, 365, 117, 20, 56, 57, 201, 462, + /* 690 */ 203, 381, 465, 446, 359, 0, 449, 362, 363, 452, + /* 700 */ 453, 454, 455, 456, 457, 395, 459, 428, 271, 137, + /* 710 */ 138, 464, 433, 466, 142, 405, 107, 470, 471, 87, + /* 720 */ 233, 234, 235, 78, 237, 238, 239, 240, 241, 242, + /* 730 */ 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + /* 740 */ 253, 254, 12, 13, 14, 352, 51, 22, 111, 112, + /* 750 */ 20, 114, 22, 21, 203, 108, 271, 478, 365, 449, + /* 760 */ 481, 181, 37, 255, 108, 35, 385, 37, 36, 459, + /* 770 */ 38, 39, 40, 136, 393, 352, 22, 140, 499, 500, + /* 780 */ 117, 149, 401, 504, 505, 107, 393, 463, 365, 465, + /* 790 */ 367, 37, 474, 475, 476, 65, 478, 479, 405, 481, + /* 800 */ 407, 34, 51, 78, 172, 173, 364, 365, 78, 478, + /* 810 */ 65, 60, 481, 33, 63, 64, 393, 499, 500, 393, + /* 820 */ 364, 365, 504, 505, 0, 385, 384, 401, 405, 104, + /* 830 */ 407, 500, 78, 393, 104, 504, 505, 107, 0, 446, + /* 840 */ 384, 401, 449, 352, 179, 452, 453, 454, 455, 456, + /* 850 */ 457, 106, 459, 428, 109, 20, 365, 464, 367, 466, + /* 860 */ 364, 364, 365, 470, 471, 364, 365, 352, 393, 446, + /* 870 */ 364, 365, 449, 143, 144, 452, 453, 454, 455, 456, + /* 880 */ 457, 384, 459, 408, 393, 384, 493, 464, 108, 466, + /* 890 */ 384, 369, 370, 470, 471, 434, 405, 394, 407, 386, + /* 900 */ 235, 2, 389, 478, 369, 370, 481, 8, 9, 179, + /* 910 */ 180, 12, 13, 14, 15, 16, 186, 187, 13, 174, + /* 920 */ 405, 364, 365, 393, 499, 500, 201, 20, 203, 504, + /* 930 */ 505, 201, 50, 203, 438, 439, 20, 446, 408, 352, + /* 940 */ 449, 384, 37, 452, 453, 454, 455, 456, 457, 271, + /* 950 */ 459, 14, 15, 16, 14, 464, 394, 466, 233, 234, + /* 960 */ 20, 470, 471, 233, 234, 235, 382, 237, 238, 239, + /* 970 */ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + /* 980 */ 250, 251, 252, 253, 254, 12, 13, 352, 164, 364, + /* 990 */ 365, 35, 405, 20, 394, 22, 172, 159, 160, 393, + /* 1000 */ 365, 137, 367, 364, 365, 4, 400, 51, 35, 384, + /* 1010 */ 37, 378, 379, 3, 408, 33, 60, 61, 62, 63, + /* 1020 */ 19, 65, 4, 384, 0, 8, 9, 45, 393, 12, + /* 1030 */ 13, 14, 15, 16, 364, 365, 35, 20, 65, 178, + /* 1040 */ 405, 22, 407, 22, 364, 365, 393, 364, 365, 352, + /* 1050 */ 428, 78, 51, 400, 384, 394, 37, 33, 37, 58, + /* 1060 */ 59, 408, 106, 181, 384, 109, 65, 384, 8, 9, + /* 1070 */ 235, 189, 12, 13, 14, 15, 16, 104, 214, 215, + /* 1080 */ 107, 446, 20, 352, 449, 20, 179, 452, 453, 454, + /* 1090 */ 455, 456, 457, 0, 459, 428, 365, 181, 367, 464, + /* 1100 */ 478, 466, 405, 481, 352, 470, 471, 106, 364, 365, + /* 1110 */ 109, 352, 364, 365, 364, 365, 143, 144, 0, 258, + /* 1120 */ 352, 499, 500, 104, 393, 104, 504, 505, 384, 268, + /* 1130 */ 174, 0, 384, 136, 384, 42, 405, 140, 407, 183, + /* 1140 */ 184, 352, 235, 378, 379, 478, 190, 191, 481, 364, + /* 1150 */ 365, 235, 179, 180, 33, 364, 365, 405, 402, 186, + /* 1160 */ 187, 405, 364, 365, 405, 209, 499, 500, 217, 384, + /* 1170 */ 219, 504, 505, 405, 201, 394, 203, 446, 478, 352, + /* 1180 */ 449, 481, 352, 452, 453, 454, 455, 456, 457, 352, + /* 1190 */ 459, 352, 269, 270, 405, 464, 352, 466, 181, 499, + /* 1200 */ 500, 470, 471, 71, 504, 505, 233, 234, 235, 352, + /* 1210 */ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + /* 1220 */ 247, 248, 249, 250, 251, 252, 253, 254, 12, 13, + /* 1230 */ 352, 352, 405, 33, 33, 405, 20, 352, 22, 352, + /* 1240 */ 352, 181, 405, 365, 405, 367, 181, 402, 33, 405, + /* 1250 */ 405, 35, 235, 37, 136, 137, 138, 139, 140, 141, + /* 1260 */ 142, 371, 405, 352, 117, 474, 475, 476, 65, 478, + /* 1270 */ 479, 393, 474, 475, 476, 37, 478, 479, 388, 402, + /* 1280 */ 394, 65, 405, 405, 405, 407, 396, 355, 356, 33, + /* 1290 */ 405, 273, 405, 405, 78, 110, 110, 235, 113, 113, + /* 1300 */ 235, 45, 292, 110, 110, 13, 113, 113, 108, 108, + /* 1310 */ 33, 33, 109, 33, 394, 168, 405, 143, 144, 33, + /* 1320 */ 104, 0, 33, 107, 446, 37, 352, 449, 0, 37, + /* 1330 */ 452, 453, 454, 455, 456, 457, 353, 459, 33, 365, + /* 1340 */ 0, 0, 464, 22, 466, 12, 13, 33, 470, 471, + /* 1350 */ 22, 1, 2, 418, 508, 22, 13, 33, 227, 143, + /* 1360 */ 144, 368, 22, 22, 33, 233, 13, 393, 35, 37, + /* 1370 */ 37, 33, 33, 497, 490, 381, 381, 33, 393, 405, + /* 1380 */ 37, 407, 418, 363, 418, 108, 108, 496, 108, 496, + /* 1390 */ 37, 0, 496, 496, 108, 179, 180, 108, 65, 33, + /* 1400 */ 368, 33, 186, 187, 33, 33, 33, 427, 418, 365, + /* 1410 */ 78, 78, 404, 108, 435, 294, 418, 201, 418, 203, + /* 1420 */ 446, 480, 108, 449, 472, 501, 452, 453, 454, 455, + /* 1430 */ 456, 457, 108, 459, 383, 274, 483, 104, 464, 108, + /* 1440 */ 466, 203, 429, 52, 470, 471, 108, 108, 51, 233, + /* 1450 */ 234, 235, 108, 237, 238, 239, 240, 241, 242, 243, + /* 1460 */ 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + /* 1470 */ 254, 448, 18, 42, 108, 447, 108, 23, 20, 108, + /* 1480 */ 108, 108, 440, 216, 445, 373, 440, 373, 431, 199, + /* 1490 */ 20, 203, 364, 20, 40, 41, 414, 45, 44, 365, + /* 1500 */ 352, 365, 414, 411, 178, 364, 411, 365, 54, 364, + /* 1510 */ 414, 296, 411, 365, 105, 377, 103, 364, 352, 376, + /* 1520 */ 66, 67, 68, 69, 102, 375, 364, 364, 364, 20, + /* 1530 */ 357, 365, 50, 361, 201, 357, 203, 361, 440, 20, + /* 1540 */ 373, 393, 373, 373, 407, 20, 366, 20, 373, 430, + /* 1550 */ 366, 20, 373, 405, 421, 407, 373, 405, 393, 393, + /* 1560 */ 373, 107, 364, 373, 357, 355, 233, 234, 364, 355, + /* 1570 */ 393, 405, 220, 407, 393, 393, 357, 371, 107, 444, + /* 1580 */ 247, 248, 249, 250, 251, 252, 253, 20, 393, 393, + /* 1590 */ 393, 442, 393, 405, 446, 393, 405, 449, 352, 145, + /* 1600 */ 452, 453, 454, 455, 456, 457, 393, 459, 440, 207, + /* 1610 */ 393, 365, 446, 206, 371, 449, 407, 364, 452, 453, + /* 1620 */ 454, 455, 456, 457, 289, 459, 405, 281, 439, 437, + /* 1630 */ 192, 280, 492, 489, 423, 489, 291, 429, 290, 393, + /* 1640 */ 275, 436, 491, 423, 489, 488, 487, 193, 194, 195, + /* 1650 */ 295, 405, 198, 407, 429, 298, 293, 486, 270, 503, + /* 1660 */ 502, 365, 20, 509, 117, 211, 212, 272, 366, 451, + /* 1670 */ 371, 371, 423, 405, 405, 405, 222, 352, 405, 225, + /* 1680 */ 423, 405, 228, 229, 230, 231, 232, 184, 371, 371, + /* 1690 */ 365, 419, 446, 389, 365, 449, 484, 107, 452, 453, + /* 1700 */ 454, 455, 456, 457, 482, 459, 469, 107, 352, 397, + /* 1710 */ 464, 405, 466, 364, 22, 354, 470, 471, 393, 38, + /* 1720 */ 358, 365, 441, 432, 357, 271, 350, 424, 0, 371, + /* 1730 */ 405, 424, 407, 0, 352, 0, 45, 0, 37, 226, + /* 1740 */ 37, 387, 372, 37, 37, 0, 387, 365, 226, 393, + /* 1750 */ 37, 387, 37, 37, 226, 0, 226, 0, 37, 0, + /* 1760 */ 37, 405, 0, 407, 22, 0, 37, 221, 0, 209, + /* 1770 */ 0, 446, 209, 203, 449, 393, 210, 452, 453, 454, + /* 1780 */ 455, 456, 457, 201, 459, 0, 0, 405, 0, 407, + /* 1790 */ 197, 466, 196, 0, 0, 470, 471, 148, 49, 49, + /* 1800 */ 0, 37, 446, 352, 0, 449, 0, 51, 452, 453, + /* 1810 */ 454, 455, 456, 457, 37, 459, 365, 0, 49, 352, + /* 1820 */ 0, 0, 466, 45, 0, 0, 470, 471, 446, 49, + /* 1830 */ 0, 449, 365, 0, 452, 453, 454, 455, 456, 457, + /* 1840 */ 0, 459, 0, 0, 393, 0, 164, 37, 466, 0, + /* 1850 */ 164, 0, 470, 471, 0, 0, 405, 0, 407, 45, + /* 1860 */ 393, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* 1870 */ 0, 0, 405, 0, 407, 49, 352, 0, 0, 0, + /* 1880 */ 0, 0, 0, 0, 0, 0, 0, 0, 148, 365, + /* 1890 */ 0, 147, 0, 146, 22, 0, 0, 446, 22, 0, + /* 1900 */ 449, 65, 50, 452, 453, 454, 455, 456, 457, 458, + /* 1910 */ 459, 460, 461, 446, 352, 22, 449, 393, 0, 452, + /* 1920 */ 453, 454, 455, 456, 457, 65, 459, 365, 37, 405, + /* 1930 */ 0, 407, 0, 352, 0, 37, 42, 0, 50, 65, + /* 1940 */ 51, 37, 42, 0, 37, 42, 365, 0, 51, 37, + /* 1950 */ 0, 352, 51, 45, 33, 393, 42, 0, 49, 49, + /* 1960 */ 14, 494, 495, 43, 365, 49, 42, 405, 42, 407, + /* 1970 */ 446, 0, 0, 449, 393, 0, 452, 453, 454, 455, + /* 1980 */ 456, 457, 0, 459, 0, 49, 405, 192, 407, 0, + /* 1990 */ 466, 0, 393, 0, 72, 471, 0, 398, 37, 51, + /* 2000 */ 42, 0, 37, 51, 405, 42, 407, 0, 446, 42, + /* 2010 */ 37, 449, 0, 51, 452, 453, 454, 455, 456, 457, + /* 2020 */ 37, 459, 42, 0, 0, 51, 0, 446, 0, 352, + /* 2030 */ 449, 0, 0, 452, 453, 454, 455, 456, 457, 37, + /* 2040 */ 459, 22, 365, 115, 113, 446, 0, 37, 449, 33, + /* 2050 */ 37, 452, 453, 454, 455, 456, 457, 495, 459, 37, + /* 2060 */ 22, 352, 37, 0, 37, 22, 37, 37, 33, 0, + /* 2070 */ 393, 37, 22, 37, 365, 398, 37, 37, 0, 498, + /* 2080 */ 22, 0, 405, 22, 407, 37, 53, 0, 0, 0, + /* 2090 */ 37, 0, 37, 0, 22, 20, 37, 37, 108, 37, + /* 2100 */ 0, 107, 393, 49, 181, 107, 0, 37, 181, 0, + /* 2110 */ 208, 0, 22, 184, 405, 204, 407, 22, 0, 181, + /* 2120 */ 181, 188, 181, 446, 3, 33, 449, 107, 352, 452, + /* 2130 */ 453, 454, 455, 456, 457, 50, 459, 188, 33, 3, + /* 2140 */ 33, 365, 0, 33, 352, 108, 50, 105, 107, 33, + /* 2150 */ 103, 49, 108, 108, 37, 446, 107, 365, 449, 107, + /* 2160 */ 33, 452, 453, 454, 455, 456, 457, 37, 459, 393, + /* 2170 */ 37, 107, 49, 108, 398, 107, 37, 37, 37, 108, + /* 2180 */ 49, 405, 276, 407, 108, 393, 269, 108, 108, 276, + /* 2190 */ 33, 276, 0, 49, 42, 0, 185, 405, 42, 407, + /* 2200 */ 183, 107, 116, 49, 107, 33, 108, 108, 107, 105, + /* 2210 */ 256, 352, 2, 22, 233, 107, 507, 49, 49, 107, + /* 2220 */ 107, 107, 446, 108, 365, 449, 107, 352, 452, 453, + /* 2230 */ 454, 455, 456, 457, 105, 459, 108, 1, 446, 107, + /* 2240 */ 365, 449, 108, 108, 452, 453, 454, 455, 456, 457, + /* 2250 */ 107, 459, 393, 461, 107, 19, 22, 398, 107, 37, + /* 2260 */ 37, 108, 117, 108, 405, 107, 407, 37, 393, 107, + /* 2270 */ 37, 35, 108, 398, 107, 37, 37, 37, 108, 108, + /* 2280 */ 405, 107, 407, 107, 33, 108, 107, 51, 128, 128, + /* 2290 */ 107, 128, 236, 128, 107, 37, 60, 61, 62, 63, + /* 2300 */ 107, 65, 22, 72, 37, 446, 71, 37, 449, 37, + /* 2310 */ 37, 452, 453, 454, 455, 456, 457, 101, 459, 37, + /* 2320 */ 352, 446, 37, 37, 449, 37, 37, 452, 453, 454, + /* 2330 */ 455, 456, 457, 365, 459, 78, 33, 78, 101, 352, + /* 2340 */ 22, 37, 106, 37, 37, 109, 37, 37, 37, 78, + /* 2350 */ 37, 37, 365, 37, 37, 22, 37, 352, 37, 0, + /* 2360 */ 37, 393, 42, 0, 37, 0, 51, 37, 42, 0, + /* 2370 */ 365, 42, 37, 405, 0, 407, 51, 141, 42, 37, + /* 2380 */ 393, 37, 51, 51, 0, 33, 22, 20, 22, 21, + /* 2390 */ 510, 21, 405, 22, 407, 22, 510, 510, 393, 510, + /* 2400 */ 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, + /* 2410 */ 405, 510, 407, 510, 446, 510, 510, 449, 510, 183, + /* 2420 */ 452, 453, 454, 455, 456, 457, 190, 459, 510, 510, + /* 2430 */ 510, 510, 510, 446, 510, 352, 449, 510, 510, 452, + /* 2440 */ 453, 454, 455, 456, 457, 209, 459, 510, 365, 510, + /* 2450 */ 510, 446, 510, 510, 449, 352, 510, 452, 453, 454, + /* 2460 */ 455, 456, 457, 510, 459, 510, 510, 510, 365, 510, + /* 2470 */ 510, 510, 510, 510, 510, 510, 393, 510, 510, 510, + /* 2480 */ 510, 510, 510, 510, 510, 510, 510, 510, 405, 510, + /* 2490 */ 407, 510, 510, 510, 510, 510, 393, 510, 510, 510, + /* 2500 */ 510, 510, 510, 510, 510, 510, 510, 510, 405, 510, + /* 2510 */ 407, 510, 510, 510, 510, 510, 510, 510, 510, 510, + /* 2520 */ 510, 510, 510, 510, 510, 510, 510, 510, 510, 446, + /* 2530 */ 510, 510, 449, 510, 352, 452, 453, 454, 455, 456, + /* 2540 */ 457, 510, 459, 510, 510, 510, 510, 365, 510, 446, + /* 2550 */ 352, 510, 449, 510, 510, 452, 453, 454, 455, 456, + /* 2560 */ 457, 510, 459, 365, 510, 510, 510, 510, 510, 352, + /* 2570 */ 510, 510, 510, 510, 510, 393, 510, 510, 510, 510, + /* 2580 */ 510, 510, 365, 510, 510, 510, 510, 405, 510, 407, + /* 2590 */ 510, 393, 510, 510, 510, 510, 510, 510, 510, 510, + /* 2600 */ 510, 510, 510, 405, 510, 407, 510, 510, 510, 510, + /* 2610 */ 393, 510, 510, 510, 510, 510, 510, 510, 510, 510, + /* 2620 */ 510, 510, 405, 510, 407, 510, 510, 510, 446, 510, + /* 2630 */ 510, 449, 510, 510, 452, 453, 454, 455, 456, 457, + /* 2640 */ 510, 459, 510, 510, 446, 510, 510, 449, 510, 352, + /* 2650 */ 452, 453, 454, 455, 456, 457, 510, 459, 510, 510, + /* 2660 */ 510, 510, 365, 446, 352, 510, 449, 510, 510, 452, + /* 2670 */ 453, 454, 455, 456, 457, 510, 459, 365, 510, 510, + /* 2680 */ 352, 510, 510, 510, 510, 510, 510, 510, 510, 510, + /* 2690 */ 393, 510, 510, 365, 510, 510, 510, 510, 510, 510, + /* 2700 */ 510, 510, 405, 510, 407, 393, 510, 510, 510, 510, + /* 2710 */ 510, 510, 510, 510, 510, 510, 510, 405, 510, 407, + /* 2720 */ 510, 393, 510, 510, 510, 510, 510, 510, 510, 510, + /* 2730 */ 510, 510, 510, 405, 510, 407, 510, 510, 510, 510, + /* 2740 */ 510, 510, 510, 446, 510, 510, 449, 352, 510, 452, + /* 2750 */ 453, 454, 455, 456, 457, 510, 459, 510, 446, 510, + /* 2760 */ 365, 449, 510, 352, 452, 453, 454, 455, 456, 457, + /* 2770 */ 510, 459, 510, 510, 446, 510, 365, 449, 352, 510, + /* 2780 */ 452, 453, 454, 455, 456, 457, 510, 459, 393, 510, + /* 2790 */ 510, 365, 510, 510, 510, 510, 510, 510, 510, 510, + /* 2800 */ 405, 510, 407, 510, 393, 510, 510, 510, 510, 510, + /* 2810 */ 510, 510, 510, 510, 510, 510, 405, 510, 407, 393, + /* 2820 */ 510, 352, 510, 510, 510, 510, 510, 510, 510, 510, + /* 2830 */ 510, 405, 510, 407, 365, 510, 510, 510, 510, 510, + /* 2840 */ 510, 446, 510, 352, 449, 510, 510, 452, 453, 454, + /* 2850 */ 455, 456, 457, 510, 459, 510, 365, 446, 510, 510, + /* 2860 */ 449, 510, 393, 452, 453, 454, 455, 456, 457, 510, + /* 2870 */ 459, 510, 446, 510, 405, 449, 407, 510, 452, 453, + /* 2880 */ 454, 455, 456, 457, 393, 459, 510, 510, 510, 510, + /* 2890 */ 510, 510, 510, 510, 510, 510, 405, 510, 407, 510, + /* 2900 */ 352, 510, 510, 510, 510, 510, 510, 510, 510, 510, + /* 2910 */ 510, 510, 510, 365, 510, 446, 352, 510, 449, 510, + /* 2920 */ 510, 452, 453, 454, 455, 456, 457, 510, 459, 365, + /* 2930 */ 510, 510, 510, 510, 510, 510, 510, 446, 510, 510, + /* 2940 */ 449, 393, 510, 452, 453, 454, 455, 456, 457, 510, + /* 2950 */ 459, 510, 510, 405, 510, 407, 510, 393, 510, 510, + /* 2960 */ 510, 510, 510, 510, 510, 510, 510, 510, 510, 405, + /* 2970 */ 510, 407, 510, 510, 510, 510, 510, 510, 510, 510, + /* 2980 */ 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, + /* 2990 */ 510, 510, 510, 510, 446, 510, 510, 449, 510, 510, + /* 3000 */ 452, 453, 454, 455, 456, 457, 510, 459, 510, 510, + /* 3010 */ 446, 510, 510, 449, 510, 352, 452, 453, 454, 455, + /* 3020 */ 456, 457, 510, 459, 510, 510, 510, 510, 365, 510, + /* 3030 */ 352, 510, 510, 510, 510, 510, 510, 510, 510, 510, + /* 3040 */ 510, 510, 510, 365, 510, 510, 510, 510, 510, 510, + /* 3050 */ 510, 510, 510, 510, 510, 510, 393, 510, 510, 510, + /* 3060 */ 510, 510, 510, 510, 510, 510, 510, 510, 405, 510, + /* 3070 */ 407, 393, 510, 510, 510, 510, 510, 510, 510, 510, + /* 3080 */ 510, 510, 510, 405, 510, 407, 510, 510, 510, 510, + /* 3090 */ 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, + /* 3100 */ 510, 510, 510, 510, 510, 510, 510, 510, 510, 446, + /* 3110 */ 510, 510, 449, 510, 510, 452, 453, 454, 455, 456, + /* 3120 */ 457, 510, 459, 510, 446, 510, 510, 449, 510, 510, + /* 3130 */ 452, 453, 454, 455, 456, 457, 510, 459, 349, 349, + /* 3140 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3150 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3160 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3170 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3180 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3190 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3200 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3210 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3220 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3230 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3240 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3250 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3260 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3270 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3280 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3290 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3300 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3310 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3320 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3330 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3340 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3350 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3360 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3370 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3380 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3390 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3400 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3410 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3420 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3430 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3440 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3450 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3460 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3470 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + /* 3480 */ 349, 349, 349, 349, 349, 349, 349, }; -#define YY_SHIFT_COUNT (842) +#define YY_SHIFT_COUNT (844) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2391) +#define YY_SHIFT_MAX (2384) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 393, 0, 241, 0, 483, 483, 483, 483, 483, 483, - /* 10 */ 483, 483, 483, 483, 483, 483, 724, 965, 965, 1206, - /* 20 */ 965, 965, 965, 965, 965, 965, 965, 965, 965, 965, - /* 30 */ 965, 965, 965, 965, 965, 965, 965, 965, 965, 965, - /* 40 */ 965, 965, 965, 965, 965, 965, 965, 965, 965, 965, - /* 50 */ 965, 252, 331, 362, 127, 93, 148, 93, 93, 127, - /* 60 */ 127, 93, 1311, 93, 240, 1311, 1311, 34, 93, 30, - /* 70 */ 13, 43, 43, 182, 182, 13, 88, 308, 313, 313, - /* 80 */ 392, 43, 43, 43, 43, 43, 43, 43, 43, 43, - /* 90 */ 43, 43, 134, 141, 43, 43, 207, 30, 43, 134, - /* 100 */ 43, 30, 43, 43, 30, 43, 43, 30, 43, 30, - /* 110 */ 30, 30, 43, 369, 441, 441, 261, 144, 719, 719, - /* 120 */ 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, - /* 130 */ 719, 719, 719, 719, 719, 719, 719, 1027, 646, 88, - /* 140 */ 308, 1057, 1057, 591, 186, 186, 186, 624, 383, 383, - /* 150 */ 913, 591, 207, 434, 30, 30, 213, 30, 602, 30, - /* 160 */ 602, 602, 455, 814, 90, 90, 90, 90, 90, 90, - /* 170 */ 90, 90, 2121, 935, 66, 415, 16, 244, 237, 105, - /* 180 */ 173, 532, 510, 510, 779, 179, 841, 421, 421, 421, - /* 190 */ 1, 421, 576, 690, 631, 1087, 775, 1067, 631, 631, - /* 200 */ 1104, 1011, 654, 1021, 1011, 1150, 1036, 913, 1226, 1446, - /* 210 */ 1461, 1487, 1295, 207, 1487, 207, 1321, 1501, 1503, 1481, - /* 220 */ 1503, 1481, 1357, 1501, 1503, 1501, 1481, 1357, 1357, 1436, - /* 230 */ 1441, 1501, 1447, 1501, 1501, 1501, 1545, 1517, 1545, 1517, - /* 240 */ 1487, 207, 207, 1555, 207, 1565, 1568, 207, 1565, 207, - /* 250 */ 1576, 207, 207, 1501, 207, 1545, 30, 30, 30, 30, - /* 260 */ 30, 30, 30, 30, 30, 30, 30, 1501, 814, 814, - /* 270 */ 1545, 602, 602, 602, 1406, 1522, 1487, 369, 1610, 1454, - /* 280 */ 1456, 1555, 369, 1226, 1501, 602, 1402, 1407, 1402, 1407, - /* 290 */ 1403, 1499, 1402, 1404, 1408, 1418, 1226, 1405, 1409, 1413, - /* 300 */ 1435, 1503, 1686, 1592, 1442, 1565, 369, 369, 1407, 602, - /* 310 */ 602, 602, 602, 1407, 602, 1532, 369, 455, 369, 1503, - /* 320 */ 1641, 1644, 602, 1501, 369, 1733, 1720, 1545, 3098, 3098, - /* 330 */ 3098, 3098, 3098, 3098, 3098, 3098, 3098, 36, 1439, 15, - /* 340 */ 1238, 555, 271, 662, 549, 891, 981, 1143, 635, 1068, - /* 350 */ 1068, 1068, 1068, 1068, 1068, 1068, 1068, 1068, 676, 790, - /* 360 */ 858, 494, 494, 691, 474, 608, 9, 448, 577, 761, - /* 370 */ 614, 360, 360, 931, 802, 757, 931, 931, 931, 1181, - /* 380 */ 83, 1112, 882, 1271, 399, 1288, 1195, 1215, 1216, 1221, - /* 390 */ 1092, 1302, 410, 1319, 1320, 1343, 1123, 1261, 1294, 1286, - /* 400 */ 1322, 1324, 1352, 1224, 1225, 1231, 1354, 1359, 1360, 1361, - /* 410 */ 1363, 1364, 1373, 1365, 1283, 1355, 1303, 1353, 1367, 1368, - /* 420 */ 1370, 1375, 1376, 836, 1232, 1345, 1386, 1391, 1388, 1412, - /* 430 */ 1772, 1773, 1774, 1731, 1777, 1742, 1556, 1744, 1745, 1746, - /* 440 */ 1560, 1785, 1749, 1751, 1566, 1755, 1793, 1571, 1796, 1766, - /* 450 */ 1805, 1770, 1809, 1788, 1812, 1776, 1595, 1817, 1612, 1822, - /* 460 */ 1616, 1617, 1623, 1627, 1827, 1829, 1832, 1638, 1646, 1842, - /* 470 */ 1844, 1697, 1797, 1798, 1848, 1813, 1851, 1852, 1818, 1802, - /* 480 */ 1854, 1807, 1857, 1815, 1858, 1864, 1873, 1825, 1875, 1877, - /* 490 */ 1878, 1880, 1881, 1882, 1724, 1850, 1890, 1729, 1892, 1893, - /* 500 */ 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1903, 1904, 1906, - /* 510 */ 1907, 1916, 1917, 1918, 1919, 1871, 1921, 1884, 1922, 1923, - /* 520 */ 1925, 1926, 1936, 1938, 1939, 1924, 1940, 1795, 1944, 1800, - /* 530 */ 1945, 1803, 1948, 1950, 1930, 1905, 1931, 1908, 1957, 1901, - /* 540 */ 1927, 1959, 1909, 1960, 1910, 1961, 1962, 1933, 1912, 1929, - /* 550 */ 1965, 1935, 1934, 1937, 1967, 1941, 1942, 1946, 1968, 1943, - /* 560 */ 1973, 1932, 1947, 1949, 1958, 1963, 1970, 1966, 1976, 1951, - /* 570 */ 1954, 1986, 1987, 1990, 1991, 1955, 1819, 1992, 1958, 1969, - /* 580 */ 1999, 2010, 1952, 2011, 2014, 1979, 1972, 1975, 2019, 1983, - /* 590 */ 1985, 1995, 2021, 1997, 1989, 1996, 2027, 2005, 1993, 2003, - /* 600 */ 2043, 2048, 2049, 2050, 2051, 2052, 1953, 1956, 2017, 2034, - /* 610 */ 2057, 2022, 2024, 2025, 2026, 2028, 2029, 2033, 2035, 2031, - /* 620 */ 2038, 2036, 2037, 2053, 2039, 2058, 2055, 2060, 2056, 2082, - /* 630 */ 2062, 2032, 2086, 2065, 2054, 2088, 2089, 2090, 2059, 2092, - /* 640 */ 2069, 2093, 2073, 2079, 2071, 2072, 2075, 2002, 2006, 2114, - /* 650 */ 1964, 2008, 1874, 1958, 2067, 2117, 1971, 2081, 2097, 2124, - /* 660 */ 1974, 2103, 1978, 1977, 2132, 2134, 1981, 1982, 1984, 1988, - /* 670 */ 2118, 2104, 1862, 2040, 2030, 2041, 2091, 2044, 2095, 2061, - /* 680 */ 2046, 2109, 2113, 2047, 2045, 2063, 2064, 2070, 2125, 2112, - /* 690 */ 2116, 2066, 2129, 1911, 2083, 2085, 2164, 2136, 1913, 2138, - /* 700 */ 2140, 2143, 2151, 2152, 2153, 2096, 2098, 2145, 1980, 2163, - /* 710 */ 2148, 2208, 2209, 2106, 2168, 2107, 2108, 2110, 2115, 2119, - /* 720 */ 2042, 2122, 2211, 2175, 2068, 2126, 2120, 1958, 2166, 2187, - /* 730 */ 2123, 2000, 2127, 2221, 2202, 2007, 2130, 2131, 2133, 2135, - /* 740 */ 2137, 2142, 2182, 2139, 2144, 2185, 2147, 2219, 2074, 2146, - /* 750 */ 2128, 2149, 2205, 2222, 2154, 2150, 2227, 2165, 2167, 2237, - /* 760 */ 2170, 2171, 2243, 2174, 2176, 2245, 2178, 2179, 2246, 2188, - /* 770 */ 2158, 2161, 2169, 2172, 2189, 2223, 2191, 2255, 2192, 2223, - /* 780 */ 2223, 2272, 2229, 2232, 2267, 2269, 2273, 2274, 2275, 2276, - /* 790 */ 2277, 2278, 2279, 2239, 2217, 2242, 2220, 2290, 2285, 2287, - /* 800 */ 2288, 2304, 2293, 2297, 2306, 2249, 2031, 2307, 2038, 2308, - /* 810 */ 2310, 2311, 2313, 2319, 2321, 2360, 2324, 2312, 2320, 2365, - /* 820 */ 2329, 2316, 2326, 2369, 2333, 2323, 2334, 2371, 2340, 2336, - /* 830 */ 2342, 2388, 2352, 2353, 2391, 2372, 2362, 2375, 2377, 2378, - /* 840 */ 2379, 2381, 2373, + /* 0 */ 1454, 0, 243, 0, 487, 487, 487, 487, 487, 487, + /* 10 */ 487, 487, 487, 487, 487, 487, 730, 973, 973, 1216, + /* 20 */ 973, 973, 973, 973, 973, 973, 973, 973, 973, 973, + /* 30 */ 973, 973, 973, 973, 973, 973, 973, 973, 973, 973, + /* 40 */ 973, 973, 973, 973, 973, 973, 973, 973, 973, 973, + /* 50 */ 973, 437, 485, 338, 172, 106, 678, 106, 106, 172, + /* 60 */ 172, 106, 1333, 106, 242, 1333, 1333, 47, 106, 216, + /* 70 */ 241, 350, 350, 502, 502, 241, 79, 63, 488, 488, + /* 80 */ 48, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 90 */ 350, 350, 519, 526, 350, 350, 150, 216, 350, 519, + /* 100 */ 350, 216, 350, 350, 216, 350, 350, 216, 350, 216, + /* 110 */ 216, 216, 350, 575, 202, 202, 486, 200, 725, 725, + /* 120 */ 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, + /* 130 */ 725, 725, 725, 725, 725, 725, 725, 637, 188, 79, + /* 140 */ 63, 630, 630, 473, 580, 580, 580, 471, 298, 298, + /* 150 */ 87, 473, 150, 567, 216, 216, 508, 216, 645, 216, + /* 160 */ 645, 645, 663, 767, 211, 211, 211, 211, 211, 211, + /* 170 */ 211, 211, 2236, 102, 66, 1017, 16, 168, 270, 164, + /* 180 */ 296, 665, 551, 551, 916, 534, 1065, 754, 754, 754, + /* 190 */ 882, 754, 907, 86, 835, 940, 997, 388, 835, 835, + /* 200 */ 1062, 923, 28, 1010, 923, 982, 1018, 87, 1161, 1397, + /* 210 */ 1431, 1458, 1267, 150, 1458, 150, 1290, 1470, 1473, 1452, + /* 220 */ 1473, 1452, 1326, 1470, 1473, 1470, 1452, 1326, 1326, 1409, + /* 230 */ 1413, 1470, 1422, 1470, 1470, 1470, 1509, 1482, 1509, 1482, + /* 240 */ 1458, 150, 150, 1519, 150, 1525, 1527, 150, 1525, 150, + /* 250 */ 1531, 150, 150, 1470, 150, 1509, 216, 216, 216, 216, + /* 260 */ 216, 216, 216, 216, 216, 216, 216, 1470, 767, 767, + /* 270 */ 1509, 645, 645, 645, 1352, 1471, 1458, 575, 1567, 1402, + /* 280 */ 1407, 1519, 575, 1161, 1470, 645, 1346, 1351, 1346, 1351, + /* 290 */ 1335, 1438, 1346, 1345, 1348, 1365, 1161, 1357, 1355, 1363, + /* 300 */ 1388, 1473, 1642, 1547, 1395, 1525, 575, 575, 1351, 645, + /* 310 */ 645, 645, 645, 1351, 645, 1503, 575, 663, 575, 1473, + /* 320 */ 1590, 1600, 645, 1470, 575, 1692, 1681, 1509, 3138, 3138, + /* 330 */ 3138, 3138, 3138, 3138, 3138, 3138, 3138, 36, 956, 15, + /* 340 */ 1001, 273, 647, 656, 379, 521, 899, 1060, 1118, 348, + /* 350 */ 348, 348, 348, 348, 348, 348, 348, 348, 32, 81, + /* 360 */ 732, 339, 339, 457, 745, 632, 751, 824, 838, 1019, + /* 370 */ 1021, 864, 572, 572, 937, 510, 861, 937, 937, 937, + /* 380 */ 695, 1131, 780, 1093, 1256, 1147, 1024, 1185, 1186, 1193, + /* 390 */ 1194, 905, 1292, 1321, 1328, 1340, 1341, 951, 1200, 1201, + /* 400 */ 1203, 1277, 1278, 1280, 1174, 1121, 1215, 1286, 1289, 1305, + /* 410 */ 1314, 1324, 1331, 1350, 1338, 1132, 1339, 609, 1344, 1366, + /* 420 */ 1368, 1371, 1372, 1373, 468, 1238, 1288, 1343, 1353, 1332, + /* 430 */ 1391, 1728, 1733, 1735, 1691, 1737, 1701, 1513, 1703, 1706, + /* 440 */ 1707, 1522, 1745, 1713, 1715, 1528, 1716, 1755, 1530, 1757, + /* 450 */ 1721, 1759, 1723, 1762, 1742, 1765, 1729, 1546, 1768, 1560, + /* 460 */ 1770, 1563, 1566, 1570, 1582, 1785, 1786, 1788, 1593, 1596, + /* 470 */ 1793, 1794, 1649, 1749, 1750, 1800, 1764, 1804, 1806, 1777, + /* 480 */ 1756, 1817, 1769, 1820, 1778, 1821, 1824, 1825, 1780, 1830, + /* 490 */ 1833, 1840, 1842, 1843, 1845, 1682, 1810, 1849, 1686, 1851, + /* 500 */ 1854, 1855, 1857, 1861, 1862, 1863, 1864, 1865, 1866, 1867, + /* 510 */ 1868, 1869, 1870, 1871, 1873, 1877, 1878, 1826, 1879, 1814, + /* 520 */ 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1872, 1887, 1740, + /* 530 */ 1890, 1744, 1892, 1747, 1895, 1896, 1876, 1852, 1893, 1888, + /* 540 */ 1899, 1836, 1891, 1918, 1860, 1930, 1874, 1932, 1934, 1898, + /* 550 */ 1889, 1894, 1937, 1904, 1897, 1900, 1943, 1907, 1901, 1903, + /* 560 */ 1947, 1912, 1950, 1908, 1914, 1921, 1909, 1910, 1946, 1916, + /* 570 */ 1957, 1920, 1924, 1971, 1972, 1975, 1982, 1926, 1795, 1984, + /* 580 */ 1909, 1936, 1989, 1991, 1922, 1993, 1996, 1961, 1948, 1958, + /* 590 */ 2001, 1965, 1952, 1963, 2007, 1973, 1962, 1967, 2012, 1983, + /* 600 */ 1974, 1980, 2023, 2024, 2026, 2028, 2031, 2032, 1928, 1931, + /* 610 */ 2002, 2019, 2046, 2010, 2013, 2022, 2025, 2027, 2029, 2030, + /* 620 */ 2034, 2016, 2035, 2036, 2039, 2038, 2040, 2063, 2043, 2069, + /* 630 */ 2050, 2078, 2058, 2033, 2081, 2061, 2048, 2087, 2088, 2089, + /* 640 */ 2053, 2091, 2055, 2093, 2072, 2075, 2059, 2060, 2062, 1990, + /* 650 */ 1994, 2100, 1923, 1998, 1902, 1909, 2054, 2106, 1927, 2070, + /* 660 */ 2090, 2109, 1911, 2095, 1938, 1929, 2111, 2118, 1939, 1933, + /* 670 */ 1941, 1949, 2121, 2092, 1906, 2020, 2037, 2041, 2085, 2042, + /* 680 */ 2096, 2047, 2044, 2105, 2107, 2045, 2049, 2052, 2064, 2065, + /* 690 */ 2110, 2102, 2123, 2068, 2116, 1913, 2071, 2076, 2136, 2127, + /* 700 */ 1915, 2117, 2130, 2133, 2139, 2140, 2141, 2079, 2080, 2131, + /* 710 */ 1917, 2157, 2144, 2142, 2192, 2094, 2152, 2097, 2098, 2099, + /* 720 */ 2101, 2108, 2011, 2112, 2195, 2156, 2017, 2113, 2086, 1909, + /* 730 */ 2154, 2172, 2104, 1954, 2129, 2210, 2191, 1981, 2114, 2115, + /* 740 */ 2119, 2128, 2132, 2134, 2168, 2143, 2147, 2169, 2135, 2234, + /* 750 */ 2056, 2151, 2145, 2153, 2222, 2223, 2158, 2155, 2230, 2162, + /* 760 */ 2164, 2233, 2167, 2170, 2238, 2174, 2171, 2239, 2176, 2177, + /* 770 */ 2240, 2179, 2160, 2161, 2163, 2165, 2183, 2251, 2187, 2258, + /* 780 */ 2193, 2251, 2251, 2280, 2231, 2235, 2267, 2270, 2272, 2273, + /* 790 */ 2282, 2285, 2286, 2288, 2289, 2257, 2216, 2259, 2237, 2303, + /* 800 */ 2304, 2306, 2307, 2318, 2309, 2310, 2311, 2271, 2016, 2313, + /* 810 */ 2035, 2314, 2316, 2317, 2319, 2333, 2321, 2359, 2323, 2315, + /* 820 */ 2320, 2363, 2327, 2325, 2326, 2365, 2330, 2331, 2329, 2369, + /* 830 */ 2335, 2332, 2336, 2374, 2342, 2344, 2384, 2364, 2352, 2366, + /* 840 */ 2368, 2371, 2373, 2370, 2367, }; #define YY_REDUCE_COUNT (336) -#define YY_REDUCE_MIN (-445) -#define YY_REDUCE_MAX (2640) +#define YY_REDUCE_MIN (-447) +#define YY_REDUCE_MAX (2678) static const short yy_reduce_ofst[] = { - /* 0 */ 332, -302, 190, 389, 419, 642, 725, 783, 909, 967, - /* 10 */ 1129, 1187, 1214, 668, 1272, 1347, -81, 487, 1384, 1415, - /* 20 */ 1458, 154, 1480, 1551, 1578, 1650, 1676, 1748, 1816, 1885, - /* 30 */ 1902, 1928, 2001, 2023, 2080, 2099, 2157, 2173, 2231, 2253, - /* 40 */ 2268, 2289, 2374, 2405, 2431, 2503, 2524, 2561, 2582, 2619, - /* 50 */ 2640, -172, -339, -423, 102, -421, -208, 451, 558, -159, - /* 60 */ 59, 560, 888, 288, -308, 236, 402, -35, 546, -372, - /* 70 */ -56, -66, 152, -351, -178, -85, -329, -209, -341, -294, - /* 80 */ -306, 310, 380, 386, 425, -362, 108, 438, 493, 554, - /* 90 */ 688, 180, 196, 27, 716, 772, -283, 349, 808, 220, - /* 100 */ 886, 454, 893, 898, -62, 900, 903, 456, 924, 620, - /* 110 */ 523, 655, 936, -113, -327, -327, -40, -347, 33, 163, - /* 120 */ 194, 227, 262, 305, 314, 363, 488, 638, 649, 714, - /* 130 */ 737, 741, 750, 781, 818, 873, 874, -46, -89, 504, - /* 140 */ 698, 759, 793, 605, -89, 62, 344, 427, -445, -199, - /* 150 */ 508, 815, 435, 114, 756, 838, 762, 774, 665, 840, - /* 160 */ 850, 890, 908, 948, -385, 358, 492, 622, 650, 661, - /* 170 */ 693, 650, 753, 819, 932, 963, 748, 885, 943, 918, - /* 180 */ 990, 990, 1034, 1037, 1010, 1066, 1018, 946, 971, 976, - /* 190 */ 1052, 986, 990, 1093, 1065, 1119, 1083, 1053, 1071, 1072, - /* 200 */ 990, 1013, 1013, 994, 1013, 1019, 1014, 1113, 1069, 1059, - /* 210 */ 1061, 1070, 1073, 1140, 1075, 1144, 1090, 1160, 1161, 1115, - /* 220 */ 1165, 1117, 1121, 1169, 1172, 1174, 1126, 1130, 1131, 1176, - /* 230 */ 1173, 1190, 1180, 1192, 1193, 1201, 1211, 1209, 1217, 1210, - /* 240 */ 1132, 1200, 1203, 1182, 1218, 1230, 1167, 1228, 1236, 1233, - /* 250 */ 1183, 1235, 1237, 1239, 1241, 1248, 1219, 1222, 1223, 1227, - /* 260 */ 1234, 1242, 1245, 1252, 1254, 1256, 1257, 1247, 1262, 1263, - /* 270 */ 1268, 1204, 1229, 1249, 1184, 1213, 1212, 1285, 1220, 1244, - /* 280 */ 1240, 1265, 1293, 1246, 1310, 1277, 1197, 1266, 1199, 1267, - /* 290 */ 1202, 1205, 1208, 1251, 1243, 1255, 1273, 1191, 1198, 1207, - /* 300 */ 1013, 1342, 1259, 1250, 1253, 1349, 1346, 1348, 1290, 1315, - /* 310 */ 1317, 1318, 1327, 1314, 1328, 1325, 1374, 1358, 1377, 1381, - /* 320 */ 1282, 1362, 1350, 1392, 1387, 1410, 1411, 1414, 1329, 1331, - /* 330 */ 1338, 1339, 1378, 1379, 1383, 1396, 1423, + /* 0 */ 279, -304, 149, 393, 180, 423, 491, 635, 731, 878, + /* 10 */ 247, 974, 1246, 1325, 1356, 1382, 1451, 1467, -81, 1524, + /* 20 */ 1562, 1599, 1677, 1581, 1709, 1776, 1792, 1859, 1875, 1148, + /* 30 */ 1166, 1968, 1987, 2005, 2083, 2103, 2182, 2198, 2217, 2297, + /* 40 */ 2312, 2328, 2395, 2411, 2426, 2469, 2491, 2548, 2564, 2663, + /* 50 */ 2678, 318, -341, -425, -42, -423, 143, 425, 622, 791, + /* 60 */ 798, 667, -183, 700, -107, 54, 310, -90, 331, -374, + /* 70 */ -353, 56, 232, -299, 335, -269, -331, -397, -343, -96, + /* 80 */ -308, -45, 18, 74, 442, -364, 163, 456, 497, 501, + /* 90 */ 506, 225, -164, 52, 557, 625, -285, -203, 639, 496, + /* 100 */ 670, 217, 680, 683, 256, 744, 748, 606, 750, 381, + /* 110 */ 653, 440, 785, 890, -140, -140, -235, -349, 222, 515, + /* 120 */ 587, 697, 752, 759, 768, 789, 827, 830, 837, 839, + /* 130 */ 844, 857, 879, 885, 887, 888, 911, -354, -444, -232, + /* 140 */ -40, 522, 535, 633, -444, -273, -3, 108, -447, 324, + /* 150 */ 295, 765, 170, -85, 214, 475, 227, 426, 756, 530, + /* 160 */ 845, 877, 513, 932, 503, 562, 600, 661, 781, 886, + /* 170 */ 920, 781, 461, 584, 983, 935, 846, 876, 993, 884, + /* 180 */ 985, 985, 994, 995, 964, 1020, 966, 891, 893, 896, + /* 190 */ 980, 897, 985, 1032, 990, 1044, 1008, 979, 998, 1000, + /* 200 */ 985, 941, 941, 924, 941, 952, 953, 1051, 1013, 1023, + /* 210 */ 1028, 1042, 1039, 1112, 1046, 1114, 1057, 1128, 1134, 1082, + /* 220 */ 1136, 1088, 1092, 1141, 1142, 1145, 1096, 1095, 1101, 1138, + /* 230 */ 1143, 1153, 1150, 1162, 1163, 1164, 1173, 1172, 1178, 1176, + /* 240 */ 1098, 1167, 1169, 1137, 1170, 1180, 1119, 1175, 1184, 1179, + /* 250 */ 1133, 1183, 1187, 1198, 1190, 1207, 1165, 1177, 1181, 1182, + /* 260 */ 1195, 1196, 1197, 1199, 1202, 1213, 1217, 1204, 1210, 1214, + /* 270 */ 1219, 1152, 1188, 1191, 1135, 1149, 1168, 1206, 1189, 1192, + /* 280 */ 1205, 1209, 1243, 1208, 1253, 1221, 1144, 1211, 1146, 1220, + /* 290 */ 1140, 1151, 1155, 1157, 1159, 1171, 1225, 1154, 1156, 1158, + /* 300 */ 941, 1296, 1218, 1212, 1222, 1302, 1299, 1300, 1249, 1268, + /* 310 */ 1269, 1270, 1273, 1257, 1276, 1272, 1317, 1304, 1318, 1329, + /* 320 */ 1237, 1312, 1306, 1349, 1358, 1361, 1362, 1367, 1291, 1281, + /* 330 */ 1303, 1307, 1354, 1359, 1364, 1370, 1376, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 10 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 20 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 30 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 40 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 50 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 60 */ 1889, 2226, 1889, 1889, 2189, 1889, 1889, 1889, 1889, 1889, - /* 70 */ 1889, 1889, 1889, 1889, 1889, 1889, 2196, 1889, 1889, 1889, - /* 80 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 90 */ 1889, 1889, 1889, 1889, 1889, 1889, 1988, 1889, 1889, 1889, - /* 100 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 110 */ 1889, 1889, 1889, 1986, 2429, 1889, 1889, 1889, 1889, 1889, - /* 120 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 130 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2441, 1889, - /* 140 */ 1889, 1960, 1960, 1889, 2441, 2441, 2441, 1986, 2401, 2401, - /* 150 */ 1889, 1889, 1988, 2264, 1889, 1889, 1889, 1889, 1889, 1889, - /* 160 */ 1889, 1889, 2111, 1919, 1889, 1889, 1889, 1889, 2135, 1889, - /* 170 */ 1889, 1889, 2252, 1889, 1889, 2470, 2530, 1889, 1889, 2473, - /* 180 */ 1889, 1889, 1889, 1889, 2201, 1889, 2460, 1889, 1889, 1889, - /* 190 */ 1889, 1889, 1889, 1889, 1889, 1889, 2064, 2246, 1889, 1889, - /* 200 */ 1889, 2433, 2447, 2514, 2434, 2431, 2454, 1889, 2464, 1889, - /* 210 */ 2289, 1889, 2278, 1988, 1889, 1988, 2239, 2184, 1889, 2194, - /* 220 */ 1889, 2194, 2191, 1889, 1889, 1889, 2194, 2191, 2191, 2053, - /* 230 */ 2049, 1889, 2047, 1889, 1889, 1889, 1889, 1944, 1889, 1944, - /* 240 */ 1889, 1988, 1988, 1889, 1988, 1889, 1889, 1988, 1889, 1988, - /* 250 */ 1889, 1988, 1988, 1889, 1988, 1889, 1889, 1889, 1889, 1889, - /* 260 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 270 */ 1889, 1889, 1889, 1889, 2276, 2262, 1889, 1986, 1889, 2250, - /* 280 */ 2248, 1889, 1986, 2464, 1889, 1889, 2484, 2479, 2484, 2479, - /* 290 */ 2498, 2494, 2484, 2503, 2500, 2466, 2464, 2533, 2520, 2516, - /* 300 */ 2447, 1889, 1889, 2452, 2450, 1889, 1986, 1986, 2479, 1889, - /* 310 */ 1889, 1889, 1889, 2479, 1889, 1889, 1986, 1889, 1986, 1889, - /* 320 */ 1889, 2080, 1889, 1889, 1986, 1889, 1928, 1889, 2241, 2267, - /* 330 */ 2222, 2222, 2114, 2114, 2114, 1989, 1894, 1889, 1889, 1889, - /* 340 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2497, - /* 350 */ 2496, 2354, 1889, 2405, 2404, 2403, 2394, 2353, 2076, 1889, - /* 360 */ 1889, 2352, 2351, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 370 */ 1889, 2213, 2212, 2345, 1889, 1889, 2346, 2344, 2343, 1889, - /* 380 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 390 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 400 */ 1889, 1889, 1889, 1889, 2517, 2521, 1889, 1889, 1889, 1889, - /* 410 */ 1889, 1889, 2430, 1889, 1889, 1889, 2325, 1889, 1889, 1889, - /* 420 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 430 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 440 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 450 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 460 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 470 */ 1889, 2190, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 480 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 490 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 500 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 510 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 520 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 530 */ 1889, 2205, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 540 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 550 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 560 */ 1889, 1889, 1889, 1933, 2332, 1889, 1889, 1889, 1889, 1889, - /* 570 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2335, 1889, - /* 580 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 590 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 600 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 610 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2028, - /* 620 */ 2027, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 630 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 640 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2336, 1889, 1889, - /* 650 */ 1889, 1889, 1889, 2327, 1889, 1889, 1889, 1889, 1889, 1889, - /* 660 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 670 */ 2513, 2467, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 680 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 690 */ 2325, 1889, 2495, 1889, 1889, 2511, 1889, 2515, 1889, 1889, - /* 700 */ 1889, 1889, 1889, 1889, 1889, 2440, 2436, 1889, 1889, 2432, - /* 710 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 720 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2324, 1889, 2391, - /* 730 */ 1889, 1889, 1889, 2425, 1889, 1889, 2376, 1889, 1889, 1889, - /* 740 */ 1889, 1889, 1889, 1889, 1889, 1889, 2336, 1889, 2339, 1889, - /* 750 */ 1889, 1889, 1889, 1889, 2108, 1889, 1889, 1889, 1889, 1889, - /* 760 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 770 */ 2092, 2090, 2089, 2088, 1889, 2121, 1889, 1889, 1889, 2117, - /* 780 */ 2116, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 790 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 2007, 1889, 1889, - /* 800 */ 1889, 1889, 1889, 1889, 1889, 1889, 1999, 1889, 1998, 1889, - /* 810 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 820 */ 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, 1889, - /* 830 */ 1889, 1889, 1889, 1889, 1889, 1889, 1918, 1889, 1889, 1889, - /* 840 */ 1889, 1889, 1889, + /* 0 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 10 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 20 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 30 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 40 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 50 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 60 */ 1893, 2232, 1893, 1893, 2195, 1893, 1893, 1893, 1893, 1893, + /* 70 */ 1893, 1893, 1893, 1893, 1893, 1893, 2202, 1893, 1893, 1893, + /* 80 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 90 */ 1893, 1893, 1893, 1893, 1893, 1893, 1992, 1893, 1893, 1893, + /* 100 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 110 */ 1893, 1893, 1893, 1990, 2435, 1893, 1893, 1893, 1893, 1893, + /* 120 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 130 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 2447, 1893, + /* 140 */ 1893, 1964, 1964, 1893, 2447, 2447, 2447, 1990, 2407, 2407, + /* 150 */ 1893, 1893, 1992, 2270, 1893, 1893, 1893, 1893, 1893, 1893, + /* 160 */ 1893, 1893, 2115, 1923, 1893, 1893, 1893, 1893, 2139, 1893, + /* 170 */ 1893, 1893, 2258, 1893, 1893, 2476, 2536, 1893, 1893, 2479, + /* 180 */ 1893, 1893, 1893, 1893, 2207, 1893, 2466, 1893, 1893, 1893, + /* 190 */ 1893, 1893, 1893, 1893, 1893, 1893, 2068, 2252, 1893, 1893, + /* 200 */ 1893, 2439, 2453, 2520, 2440, 2437, 2460, 1893, 2470, 1893, + /* 210 */ 2295, 1893, 2284, 1992, 1893, 1992, 2245, 2190, 1893, 2200, + /* 220 */ 1893, 2200, 2197, 1893, 1893, 1893, 2200, 2197, 2197, 2057, + /* 230 */ 2053, 1893, 2051, 1893, 1893, 1893, 1893, 1948, 1893, 1948, + /* 240 */ 1893, 1992, 1992, 1893, 1992, 1893, 1893, 1992, 1893, 1992, + /* 250 */ 1893, 1992, 1992, 1893, 1992, 1893, 1893, 1893, 1893, 1893, + /* 260 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 270 */ 1893, 1893, 1893, 1893, 2282, 2268, 1893, 1990, 1893, 2256, + /* 280 */ 2254, 1893, 1990, 2470, 1893, 1893, 2490, 2485, 2490, 2485, + /* 290 */ 2504, 2500, 2490, 2509, 2506, 2472, 2470, 2539, 2526, 2522, + /* 300 */ 2453, 1893, 1893, 2458, 2456, 1893, 1990, 1990, 2485, 1893, + /* 310 */ 1893, 1893, 1893, 2485, 1893, 1893, 1990, 1893, 1990, 1893, + /* 320 */ 1893, 2084, 1893, 1893, 1990, 1893, 1932, 1893, 2247, 2273, + /* 330 */ 2228, 2228, 2118, 2118, 2118, 1993, 1898, 1893, 1893, 1893, + /* 340 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 2503, + /* 350 */ 2502, 2360, 1893, 2411, 2410, 2409, 2400, 2359, 2080, 1893, + /* 360 */ 1893, 2358, 2357, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 370 */ 1893, 1893, 2219, 2218, 2351, 1893, 1893, 2352, 2350, 2349, + /* 380 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 390 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 400 */ 1893, 1893, 1893, 1893, 1893, 2523, 2527, 1893, 1893, 1893, + /* 410 */ 1893, 1893, 1893, 2436, 1893, 1893, 1893, 2331, 1893, 1893, + /* 420 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 430 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 440 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 450 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 460 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 470 */ 1893, 1893, 2196, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 480 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 490 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 500 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 510 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 520 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 530 */ 1893, 1893, 1893, 2211, 1893, 1893, 1893, 1893, 1893, 1893, + /* 540 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 550 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 560 */ 1893, 1893, 1893, 1893, 1893, 1937, 2338, 1893, 1893, 1893, + /* 570 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 580 */ 2341, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 590 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 600 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 610 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 620 */ 1893, 2032, 2031, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 630 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 640 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 2342, + /* 650 */ 1893, 1893, 1893, 1893, 1893, 2333, 1893, 1893, 1893, 1893, + /* 660 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 670 */ 1893, 1893, 2519, 2473, 1893, 1893, 1893, 1893, 1893, 1893, + /* 680 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 690 */ 1893, 1893, 2331, 1893, 2501, 1893, 1893, 2517, 1893, 2521, + /* 700 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 2446, 2442, 1893, + /* 710 */ 1893, 2438, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 720 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 2330, + /* 730 */ 1893, 2397, 1893, 1893, 1893, 2431, 1893, 1893, 2382, 1893, + /* 740 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 2342, 1893, + /* 750 */ 2345, 1893, 1893, 1893, 1893, 1893, 2112, 1893, 1893, 1893, + /* 760 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 770 */ 1893, 1893, 2096, 2094, 2093, 2092, 1893, 2125, 1893, 1893, + /* 780 */ 1893, 2121, 2120, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 790 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 2011, + /* 800 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 2003, 1893, + /* 810 */ 2002, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 820 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, + /* 830 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1922, 1893, + /* 840 */ 1893, 1893, 1893, 1893, 1893, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1221,7 +1227,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* BWLIMIT => nothing */ 0, /* START => nothing */ 0, /* TIMESTAMP => nothing */ - 297, /* END => ABORT */ + 299, /* END => ABORT */ 0, /* TABLE => nothing */ 0, /* NK_LP => nothing */ 0, /* NK_RP => nothing */ @@ -1275,6 +1281,8 @@ static const YYCODETYPE yyFallback[] = { 0, /* CONNECTIONS => nothing */ 0, /* LICENCES => nothing */ 0, /* GRANTS => nothing */ + 0, /* FULL => nothing */ + 0, /* LOG => nothing */ 0, /* QUERIES => nothing */ 0, /* SCORES => nothing */ 0, /* TOPICS => nothing */ @@ -1288,7 +1296,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* VNODES => nothing */ 0, /* ALIVE => nothing */ 0, /* VIEWS => nothing */ - 297, /* VIEW => ABORT */ + 299, /* VIEW => ABORT */ 0, /* COMPACTS => nothing */ 0, /* NORMAL => nothing */ 0, /* CHILD => nothing */ @@ -1414,55 +1422,55 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ABORT => nothing */ - 297, /* AFTER => ABORT */ - 297, /* ATTACH => ABORT */ - 297, /* BEFORE => ABORT */ - 297, /* BEGIN => ABORT */ - 297, /* BITAND => ABORT */ - 297, /* BITNOT => ABORT */ - 297, /* BITOR => ABORT */ - 297, /* BLOCKS => ABORT */ - 297, /* CHANGE => ABORT */ - 297, /* COMMA => ABORT */ - 297, /* CONCAT => ABORT */ - 297, /* CONFLICT => ABORT */ - 297, /* COPY => ABORT */ - 297, /* DEFERRED => ABORT */ - 297, /* DELIMITERS => ABORT */ - 297, /* DETACH => ABORT */ - 297, /* DIVIDE => ABORT */ - 297, /* DOT => ABORT */ - 297, /* EACH => ABORT */ - 297, /* FAIL => ABORT */ - 297, /* FILE => ABORT */ - 297, /* FOR => ABORT */ - 297, /* GLOB => ABORT */ - 297, /* ID => ABORT */ - 297, /* IMMEDIATE => ABORT */ - 297, /* IMPORT => ABORT */ - 297, /* INITIALLY => ABORT */ - 297, /* INSTEAD => ABORT */ - 297, /* ISNULL => ABORT */ - 297, /* KEY => ABORT */ - 297, /* MODULES => ABORT */ - 297, /* NK_BITNOT => ABORT */ - 297, /* NK_SEMI => ABORT */ - 297, /* NOTNULL => ABORT */ - 297, /* OF => ABORT */ - 297, /* PLUS => ABORT */ - 297, /* PRIVILEGE => ABORT */ - 297, /* RAISE => ABORT */ - 297, /* RESTRICT => ABORT */ - 297, /* ROW => ABORT */ - 297, /* SEMI => ABORT */ - 297, /* STAR => ABORT */ - 297, /* STATEMENT => ABORT */ - 297, /* STRICT => ABORT */ - 297, /* STRING => ABORT */ - 297, /* TIMES => ABORT */ - 297, /* VALUES => ABORT */ - 297, /* VARIABLE => ABORT */ - 297, /* WAL => ABORT */ + 299, /* AFTER => ABORT */ + 299, /* ATTACH => ABORT */ + 299, /* BEFORE => ABORT */ + 299, /* BEGIN => ABORT */ + 299, /* BITAND => ABORT */ + 299, /* BITNOT => ABORT */ + 299, /* BITOR => ABORT */ + 299, /* BLOCKS => ABORT */ + 299, /* CHANGE => ABORT */ + 299, /* COMMA => ABORT */ + 299, /* CONCAT => ABORT */ + 299, /* CONFLICT => ABORT */ + 299, /* COPY => ABORT */ + 299, /* DEFERRED => ABORT */ + 299, /* DELIMITERS => ABORT */ + 299, /* DETACH => ABORT */ + 299, /* DIVIDE => ABORT */ + 299, /* DOT => ABORT */ + 299, /* EACH => ABORT */ + 299, /* FAIL => ABORT */ + 299, /* FILE => ABORT */ + 299, /* FOR => ABORT */ + 299, /* GLOB => ABORT */ + 299, /* ID => ABORT */ + 299, /* IMMEDIATE => ABORT */ + 299, /* IMPORT => ABORT */ + 299, /* INITIALLY => ABORT */ + 299, /* INSTEAD => ABORT */ + 299, /* ISNULL => ABORT */ + 299, /* KEY => ABORT */ + 299, /* MODULES => ABORT */ + 299, /* NK_BITNOT => ABORT */ + 299, /* NK_SEMI => ABORT */ + 299, /* NOTNULL => ABORT */ + 299, /* OF => ABORT */ + 299, /* PLUS => ABORT */ + 299, /* PRIVILEGE => ABORT */ + 299, /* RAISE => ABORT */ + 299, /* RESTRICT => ABORT */ + 299, /* ROW => ABORT */ + 299, /* SEMI => ABORT */ + 299, /* STAR => ABORT */ + 299, /* STATEMENT => ABORT */ + 299, /* STRICT => ABORT */ + 299, /* STRING => ABORT */ + 299, /* TIMES => ABORT */ + 299, /* VALUES => ABORT */ + 299, /* VARIABLE => ABORT */ + 299, /* WAL => ABORT */ }; #endif /* YYFALLBACK */ @@ -1709,355 +1717,357 @@ static const char *const yyTokenName[] = { /* 156 */ "CONNECTIONS", /* 157 */ "LICENCES", /* 158 */ "GRANTS", - /* 159 */ "QUERIES", - /* 160 */ "SCORES", - /* 161 */ "TOPICS", - /* 162 */ "VARIABLES", - /* 163 */ "BNODES", - /* 164 */ "SNODES", - /* 165 */ "TRANSACTIONS", - /* 166 */ "DISTRIBUTED", - /* 167 */ "CONSUMERS", - /* 168 */ "SUBSCRIPTIONS", - /* 169 */ "VNODES", - /* 170 */ "ALIVE", - /* 171 */ "VIEWS", - /* 172 */ "VIEW", - /* 173 */ "COMPACTS", - /* 174 */ "NORMAL", - /* 175 */ "CHILD", - /* 176 */ "LIKE", - /* 177 */ "TBNAME", - /* 178 */ "QTAGS", - /* 179 */ "AS", - /* 180 */ "SYSTEM", - /* 181 */ "INDEX", - /* 182 */ "FUNCTION", - /* 183 */ "INTERVAL", - /* 184 */ "COUNT", - /* 185 */ "LAST_ROW", - /* 186 */ "META", - /* 187 */ "ONLY", - /* 188 */ "TOPIC", - /* 189 */ "CONSUMER", - /* 190 */ "GROUP", - /* 191 */ "DESC", - /* 192 */ "DESCRIBE", - /* 193 */ "RESET", - /* 194 */ "QUERY", - /* 195 */ "CACHE", - /* 196 */ "EXPLAIN", - /* 197 */ "ANALYZE", - /* 198 */ "VERBOSE", - /* 199 */ "NK_BOOL", - /* 200 */ "RATIO", - /* 201 */ "NK_FLOAT", - /* 202 */ "OUTPUTTYPE", - /* 203 */ "AGGREGATE", - /* 204 */ "BUFSIZE", - /* 205 */ "LANGUAGE", - /* 206 */ "REPLACE", - /* 207 */ "STREAM", - /* 208 */ "INTO", - /* 209 */ "PAUSE", - /* 210 */ "RESUME", - /* 211 */ "TRIGGER", - /* 212 */ "AT_ONCE", - /* 213 */ "WINDOW_CLOSE", - /* 214 */ "IGNORE", - /* 215 */ "EXPIRED", - /* 216 */ "FILL_HISTORY", - /* 217 */ "UPDATE", - /* 218 */ "SUBTABLE", - /* 219 */ "UNTREATED", - /* 220 */ "KILL", - /* 221 */ "CONNECTION", - /* 222 */ "TRANSACTION", - /* 223 */ "BALANCE", - /* 224 */ "VGROUP", - /* 225 */ "LEADER", - /* 226 */ "MERGE", - /* 227 */ "REDISTRIBUTE", - /* 228 */ "SPLIT", - /* 229 */ "DELETE", - /* 230 */ "INSERT", - /* 231 */ "NULL", - /* 232 */ "NK_QUESTION", - /* 233 */ "NK_ALIAS", - /* 234 */ "NK_ARROW", - /* 235 */ "ROWTS", - /* 236 */ "QSTART", - /* 237 */ "QEND", - /* 238 */ "QDURATION", - /* 239 */ "WSTART", - /* 240 */ "WEND", - /* 241 */ "WDURATION", - /* 242 */ "IROWTS", - /* 243 */ "ISFILLED", - /* 244 */ "CAST", - /* 245 */ "NOW", - /* 246 */ "TODAY", - /* 247 */ "TIMEZONE", - /* 248 */ "CLIENT_VERSION", - /* 249 */ "SERVER_VERSION", - /* 250 */ "SERVER_STATUS", - /* 251 */ "CURRENT_USER", - /* 252 */ "CASE", - /* 253 */ "WHEN", - /* 254 */ "THEN", - /* 255 */ "ELSE", - /* 256 */ "BETWEEN", - /* 257 */ "IS", - /* 258 */ "NK_LT", - /* 259 */ "NK_GT", - /* 260 */ "NK_LE", - /* 261 */ "NK_GE", - /* 262 */ "NK_NE", - /* 263 */ "MATCH", - /* 264 */ "NMATCH", - /* 265 */ "CONTAINS", - /* 266 */ "IN", - /* 267 */ "JOIN", - /* 268 */ "INNER", - /* 269 */ "SELECT", - /* 270 */ "NK_HINT", - /* 271 */ "DISTINCT", - /* 272 */ "WHERE", - /* 273 */ "PARTITION", - /* 274 */ "BY", - /* 275 */ "SESSION", - /* 276 */ "STATE_WINDOW", - /* 277 */ "EVENT_WINDOW", - /* 278 */ "SLIDING", - /* 279 */ "FILL", - /* 280 */ "VALUE", - /* 281 */ "VALUE_F", - /* 282 */ "NONE", - /* 283 */ "PREV", - /* 284 */ "NULL_F", - /* 285 */ "LINEAR", - /* 286 */ "NEXT", - /* 287 */ "HAVING", - /* 288 */ "RANGE", - /* 289 */ "EVERY", - /* 290 */ "ORDER", - /* 291 */ "SLIMIT", - /* 292 */ "SOFFSET", - /* 293 */ "LIMIT", - /* 294 */ "OFFSET", - /* 295 */ "ASC", - /* 296 */ "NULLS", - /* 297 */ "ABORT", - /* 298 */ "AFTER", - /* 299 */ "ATTACH", - /* 300 */ "BEFORE", - /* 301 */ "BEGIN", - /* 302 */ "BITAND", - /* 303 */ "BITNOT", - /* 304 */ "BITOR", - /* 305 */ "BLOCKS", - /* 306 */ "CHANGE", - /* 307 */ "COMMA", - /* 308 */ "CONCAT", - /* 309 */ "CONFLICT", - /* 310 */ "COPY", - /* 311 */ "DEFERRED", - /* 312 */ "DELIMITERS", - /* 313 */ "DETACH", - /* 314 */ "DIVIDE", - /* 315 */ "DOT", - /* 316 */ "EACH", - /* 317 */ "FAIL", - /* 318 */ "FILE", - /* 319 */ "FOR", - /* 320 */ "GLOB", - /* 321 */ "ID", - /* 322 */ "IMMEDIATE", - /* 323 */ "IMPORT", - /* 324 */ "INITIALLY", - /* 325 */ "INSTEAD", - /* 326 */ "ISNULL", - /* 327 */ "KEY", - /* 328 */ "MODULES", - /* 329 */ "NK_BITNOT", - /* 330 */ "NK_SEMI", - /* 331 */ "NOTNULL", - /* 332 */ "OF", - /* 333 */ "PLUS", - /* 334 */ "PRIVILEGE", - /* 335 */ "RAISE", - /* 336 */ "RESTRICT", - /* 337 */ "ROW", - /* 338 */ "SEMI", - /* 339 */ "STAR", - /* 340 */ "STATEMENT", - /* 341 */ "STRICT", - /* 342 */ "STRING", - /* 343 */ "TIMES", - /* 344 */ "VALUES", - /* 345 */ "VARIABLE", - /* 346 */ "WAL", - /* 347 */ "cmd", - /* 348 */ "account_options", - /* 349 */ "alter_account_options", - /* 350 */ "literal", - /* 351 */ "alter_account_option", - /* 352 */ "ip_range_list", - /* 353 */ "white_list", - /* 354 */ "white_list_opt", - /* 355 */ "user_name", - /* 356 */ "sysinfo_opt", - /* 357 */ "privileges", - /* 358 */ "priv_level", - /* 359 */ "with_opt", - /* 360 */ "priv_type_list", - /* 361 */ "priv_type", - /* 362 */ "db_name", - /* 363 */ "table_name", - /* 364 */ "topic_name", - /* 365 */ "search_condition", - /* 366 */ "dnode_endpoint", - /* 367 */ "force_opt", - /* 368 */ "unsafe_opt", - /* 369 */ "not_exists_opt", - /* 370 */ "db_options", - /* 371 */ "exists_opt", - /* 372 */ "alter_db_options", - /* 373 */ "speed_opt", - /* 374 */ "start_opt", - /* 375 */ "end_opt", - /* 376 */ "integer_list", - /* 377 */ "variable_list", - /* 378 */ "retention_list", - /* 379 */ "signed", - /* 380 */ "alter_db_option", - /* 381 */ "retention", - /* 382 */ "full_table_name", - /* 383 */ "column_def_list", - /* 384 */ "tags_def_opt", - /* 385 */ "table_options", - /* 386 */ "multi_create_clause", - /* 387 */ "tags_def", - /* 388 */ "multi_drop_clause", - /* 389 */ "alter_table_clause", - /* 390 */ "alter_table_options", - /* 391 */ "column_name", - /* 392 */ "type_name", - /* 393 */ "signed_literal", - /* 394 */ "create_subtable_clause", - /* 395 */ "specific_cols_opt", - /* 396 */ "expression_list", - /* 397 */ "drop_table_clause", - /* 398 */ "col_name_list", - /* 399 */ "column_def", - /* 400 */ "duration_list", - /* 401 */ "rollup_func_list", - /* 402 */ "alter_table_option", - /* 403 */ "duration_literal", - /* 404 */ "rollup_func_name", - /* 405 */ "function_name", - /* 406 */ "col_name", - /* 407 */ "db_kind_opt", - /* 408 */ "table_kind_db_name_cond_opt", - /* 409 */ "like_pattern_opt", - /* 410 */ "db_name_cond_opt", - /* 411 */ "table_name_cond", - /* 412 */ "from_db_opt", - /* 413 */ "tag_list_opt", - /* 414 */ "table_kind", - /* 415 */ "tag_item", - /* 416 */ "column_alias", - /* 417 */ "index_options", - /* 418 */ "full_index_name", - /* 419 */ "index_name", - /* 420 */ "func_list", - /* 421 */ "sliding_opt", - /* 422 */ "sma_stream_opt", - /* 423 */ "func", - /* 424 */ "sma_func_name", - /* 425 */ "with_meta", - /* 426 */ "query_or_subquery", - /* 427 */ "where_clause_opt", - /* 428 */ "cgroup_name", - /* 429 */ "analyze_opt", - /* 430 */ "explain_options", - /* 431 */ "insert_query", - /* 432 */ "or_replace_opt", - /* 433 */ "agg_func_opt", - /* 434 */ "bufsize_opt", - /* 435 */ "language_opt", - /* 436 */ "full_view_name", - /* 437 */ "view_name", - /* 438 */ "stream_name", - /* 439 */ "stream_options", - /* 440 */ "col_list_opt", - /* 441 */ "tag_def_or_ref_opt", - /* 442 */ "subtable_opt", - /* 443 */ "ignore_opt", - /* 444 */ "expression", - /* 445 */ "on_vgroup_id", - /* 446 */ "dnode_list", - /* 447 */ "literal_func", - /* 448 */ "literal_list", - /* 449 */ "table_alias", - /* 450 */ "expr_or_subquery", - /* 451 */ "pseudo_column", - /* 452 */ "column_reference", - /* 453 */ "function_expression", - /* 454 */ "case_when_expression", - /* 455 */ "star_func", - /* 456 */ "star_func_para_list", - /* 457 */ "noarg_func", - /* 458 */ "other_para_list", - /* 459 */ "star_func_para", - /* 460 */ "when_then_list", - /* 461 */ "case_when_else_opt", - /* 462 */ "common_expression", - /* 463 */ "when_then_expr", - /* 464 */ "predicate", - /* 465 */ "compare_op", - /* 466 */ "in_op", - /* 467 */ "in_predicate_value", - /* 468 */ "boolean_value_expression", - /* 469 */ "boolean_primary", - /* 470 */ "from_clause_opt", - /* 471 */ "table_reference_list", - /* 472 */ "table_reference", - /* 473 */ "table_primary", - /* 474 */ "joined_table", - /* 475 */ "alias_opt", - /* 476 */ "subquery", - /* 477 */ "parenthesized_joined_table", - /* 478 */ "join_type", - /* 479 */ "query_specification", - /* 480 */ "hint_list", - /* 481 */ "set_quantifier_opt", - /* 482 */ "tag_mode_opt", - /* 483 */ "select_list", - /* 484 */ "partition_by_clause_opt", - /* 485 */ "range_opt", - /* 486 */ "every_opt", - /* 487 */ "fill_opt", - /* 488 */ "twindow_clause_opt", - /* 489 */ "group_by_clause_opt", - /* 490 */ "having_clause_opt", - /* 491 */ "select_item", - /* 492 */ "partition_list", - /* 493 */ "partition_item", - /* 494 */ "interval_sliding_duration_literal", - /* 495 */ "fill_mode", - /* 496 */ "group_by_list", - /* 497 */ "query_expression", - /* 498 */ "query_simple", - /* 499 */ "order_by_clause_opt", - /* 500 */ "slimit_clause_opt", - /* 501 */ "limit_clause_opt", - /* 502 */ "union_query_expression", - /* 503 */ "query_simple_or_subquery", - /* 504 */ "sort_specification_list", - /* 505 */ "sort_specification", - /* 506 */ "ordering_specification_opt", - /* 507 */ "null_ordering_opt", + /* 159 */ "FULL", + /* 160 */ "LOG", + /* 161 */ "QUERIES", + /* 162 */ "SCORES", + /* 163 */ "TOPICS", + /* 164 */ "VARIABLES", + /* 165 */ "BNODES", + /* 166 */ "SNODES", + /* 167 */ "TRANSACTIONS", + /* 168 */ "DISTRIBUTED", + /* 169 */ "CONSUMERS", + /* 170 */ "SUBSCRIPTIONS", + /* 171 */ "VNODES", + /* 172 */ "ALIVE", + /* 173 */ "VIEWS", + /* 174 */ "VIEW", + /* 175 */ "COMPACTS", + /* 176 */ "NORMAL", + /* 177 */ "CHILD", + /* 178 */ "LIKE", + /* 179 */ "TBNAME", + /* 180 */ "QTAGS", + /* 181 */ "AS", + /* 182 */ "SYSTEM", + /* 183 */ "INDEX", + /* 184 */ "FUNCTION", + /* 185 */ "INTERVAL", + /* 186 */ "COUNT", + /* 187 */ "LAST_ROW", + /* 188 */ "META", + /* 189 */ "ONLY", + /* 190 */ "TOPIC", + /* 191 */ "CONSUMER", + /* 192 */ "GROUP", + /* 193 */ "DESC", + /* 194 */ "DESCRIBE", + /* 195 */ "RESET", + /* 196 */ "QUERY", + /* 197 */ "CACHE", + /* 198 */ "EXPLAIN", + /* 199 */ "ANALYZE", + /* 200 */ "VERBOSE", + /* 201 */ "NK_BOOL", + /* 202 */ "RATIO", + /* 203 */ "NK_FLOAT", + /* 204 */ "OUTPUTTYPE", + /* 205 */ "AGGREGATE", + /* 206 */ "BUFSIZE", + /* 207 */ "LANGUAGE", + /* 208 */ "REPLACE", + /* 209 */ "STREAM", + /* 210 */ "INTO", + /* 211 */ "PAUSE", + /* 212 */ "RESUME", + /* 213 */ "TRIGGER", + /* 214 */ "AT_ONCE", + /* 215 */ "WINDOW_CLOSE", + /* 216 */ "IGNORE", + /* 217 */ "EXPIRED", + /* 218 */ "FILL_HISTORY", + /* 219 */ "UPDATE", + /* 220 */ "SUBTABLE", + /* 221 */ "UNTREATED", + /* 222 */ "KILL", + /* 223 */ "CONNECTION", + /* 224 */ "TRANSACTION", + /* 225 */ "BALANCE", + /* 226 */ "VGROUP", + /* 227 */ "LEADER", + /* 228 */ "MERGE", + /* 229 */ "REDISTRIBUTE", + /* 230 */ "SPLIT", + /* 231 */ "DELETE", + /* 232 */ "INSERT", + /* 233 */ "NULL", + /* 234 */ "NK_QUESTION", + /* 235 */ "NK_ALIAS", + /* 236 */ "NK_ARROW", + /* 237 */ "ROWTS", + /* 238 */ "QSTART", + /* 239 */ "QEND", + /* 240 */ "QDURATION", + /* 241 */ "WSTART", + /* 242 */ "WEND", + /* 243 */ "WDURATION", + /* 244 */ "IROWTS", + /* 245 */ "ISFILLED", + /* 246 */ "CAST", + /* 247 */ "NOW", + /* 248 */ "TODAY", + /* 249 */ "TIMEZONE", + /* 250 */ "CLIENT_VERSION", + /* 251 */ "SERVER_VERSION", + /* 252 */ "SERVER_STATUS", + /* 253 */ "CURRENT_USER", + /* 254 */ "CASE", + /* 255 */ "WHEN", + /* 256 */ "THEN", + /* 257 */ "ELSE", + /* 258 */ "BETWEEN", + /* 259 */ "IS", + /* 260 */ "NK_LT", + /* 261 */ "NK_GT", + /* 262 */ "NK_LE", + /* 263 */ "NK_GE", + /* 264 */ "NK_NE", + /* 265 */ "MATCH", + /* 266 */ "NMATCH", + /* 267 */ "CONTAINS", + /* 268 */ "IN", + /* 269 */ "JOIN", + /* 270 */ "INNER", + /* 271 */ "SELECT", + /* 272 */ "NK_HINT", + /* 273 */ "DISTINCT", + /* 274 */ "WHERE", + /* 275 */ "PARTITION", + /* 276 */ "BY", + /* 277 */ "SESSION", + /* 278 */ "STATE_WINDOW", + /* 279 */ "EVENT_WINDOW", + /* 280 */ "SLIDING", + /* 281 */ "FILL", + /* 282 */ "VALUE", + /* 283 */ "VALUE_F", + /* 284 */ "NONE", + /* 285 */ "PREV", + /* 286 */ "NULL_F", + /* 287 */ "LINEAR", + /* 288 */ "NEXT", + /* 289 */ "HAVING", + /* 290 */ "RANGE", + /* 291 */ "EVERY", + /* 292 */ "ORDER", + /* 293 */ "SLIMIT", + /* 294 */ "SOFFSET", + /* 295 */ "LIMIT", + /* 296 */ "OFFSET", + /* 297 */ "ASC", + /* 298 */ "NULLS", + /* 299 */ "ABORT", + /* 300 */ "AFTER", + /* 301 */ "ATTACH", + /* 302 */ "BEFORE", + /* 303 */ "BEGIN", + /* 304 */ "BITAND", + /* 305 */ "BITNOT", + /* 306 */ "BITOR", + /* 307 */ "BLOCKS", + /* 308 */ "CHANGE", + /* 309 */ "COMMA", + /* 310 */ "CONCAT", + /* 311 */ "CONFLICT", + /* 312 */ "COPY", + /* 313 */ "DEFERRED", + /* 314 */ "DELIMITERS", + /* 315 */ "DETACH", + /* 316 */ "DIVIDE", + /* 317 */ "DOT", + /* 318 */ "EACH", + /* 319 */ "FAIL", + /* 320 */ "FILE", + /* 321 */ "FOR", + /* 322 */ "GLOB", + /* 323 */ "ID", + /* 324 */ "IMMEDIATE", + /* 325 */ "IMPORT", + /* 326 */ "INITIALLY", + /* 327 */ "INSTEAD", + /* 328 */ "ISNULL", + /* 329 */ "KEY", + /* 330 */ "MODULES", + /* 331 */ "NK_BITNOT", + /* 332 */ "NK_SEMI", + /* 333 */ "NOTNULL", + /* 334 */ "OF", + /* 335 */ "PLUS", + /* 336 */ "PRIVILEGE", + /* 337 */ "RAISE", + /* 338 */ "RESTRICT", + /* 339 */ "ROW", + /* 340 */ "SEMI", + /* 341 */ "STAR", + /* 342 */ "STATEMENT", + /* 343 */ "STRICT", + /* 344 */ "STRING", + /* 345 */ "TIMES", + /* 346 */ "VALUES", + /* 347 */ "VARIABLE", + /* 348 */ "WAL", + /* 349 */ "cmd", + /* 350 */ "account_options", + /* 351 */ "alter_account_options", + /* 352 */ "literal", + /* 353 */ "alter_account_option", + /* 354 */ "ip_range_list", + /* 355 */ "white_list", + /* 356 */ "white_list_opt", + /* 357 */ "user_name", + /* 358 */ "sysinfo_opt", + /* 359 */ "privileges", + /* 360 */ "priv_level", + /* 361 */ "with_opt", + /* 362 */ "priv_type_list", + /* 363 */ "priv_type", + /* 364 */ "db_name", + /* 365 */ "table_name", + /* 366 */ "topic_name", + /* 367 */ "search_condition", + /* 368 */ "dnode_endpoint", + /* 369 */ "force_opt", + /* 370 */ "unsafe_opt", + /* 371 */ "not_exists_opt", + /* 372 */ "db_options", + /* 373 */ "exists_opt", + /* 374 */ "alter_db_options", + /* 375 */ "speed_opt", + /* 376 */ "start_opt", + /* 377 */ "end_opt", + /* 378 */ "integer_list", + /* 379 */ "variable_list", + /* 380 */ "retention_list", + /* 381 */ "signed", + /* 382 */ "alter_db_option", + /* 383 */ "retention", + /* 384 */ "full_table_name", + /* 385 */ "column_def_list", + /* 386 */ "tags_def_opt", + /* 387 */ "table_options", + /* 388 */ "multi_create_clause", + /* 389 */ "tags_def", + /* 390 */ "multi_drop_clause", + /* 391 */ "alter_table_clause", + /* 392 */ "alter_table_options", + /* 393 */ "column_name", + /* 394 */ "type_name", + /* 395 */ "signed_literal", + /* 396 */ "create_subtable_clause", + /* 397 */ "specific_cols_opt", + /* 398 */ "expression_list", + /* 399 */ "drop_table_clause", + /* 400 */ "col_name_list", + /* 401 */ "column_def", + /* 402 */ "duration_list", + /* 403 */ "rollup_func_list", + /* 404 */ "alter_table_option", + /* 405 */ "duration_literal", + /* 406 */ "rollup_func_name", + /* 407 */ "function_name", + /* 408 */ "col_name", + /* 409 */ "db_kind_opt", + /* 410 */ "table_kind_db_name_cond_opt", + /* 411 */ "like_pattern_opt", + /* 412 */ "db_name_cond_opt", + /* 413 */ "table_name_cond", + /* 414 */ "from_db_opt", + /* 415 */ "tag_list_opt", + /* 416 */ "table_kind", + /* 417 */ "tag_item", + /* 418 */ "column_alias", + /* 419 */ "index_options", + /* 420 */ "full_index_name", + /* 421 */ "index_name", + /* 422 */ "func_list", + /* 423 */ "sliding_opt", + /* 424 */ "sma_stream_opt", + /* 425 */ "func", + /* 426 */ "sma_func_name", + /* 427 */ "with_meta", + /* 428 */ "query_or_subquery", + /* 429 */ "where_clause_opt", + /* 430 */ "cgroup_name", + /* 431 */ "analyze_opt", + /* 432 */ "explain_options", + /* 433 */ "insert_query", + /* 434 */ "or_replace_opt", + /* 435 */ "agg_func_opt", + /* 436 */ "bufsize_opt", + /* 437 */ "language_opt", + /* 438 */ "full_view_name", + /* 439 */ "view_name", + /* 440 */ "stream_name", + /* 441 */ "stream_options", + /* 442 */ "col_list_opt", + /* 443 */ "tag_def_or_ref_opt", + /* 444 */ "subtable_opt", + /* 445 */ "ignore_opt", + /* 446 */ "expression", + /* 447 */ "on_vgroup_id", + /* 448 */ "dnode_list", + /* 449 */ "literal_func", + /* 450 */ "literal_list", + /* 451 */ "table_alias", + /* 452 */ "expr_or_subquery", + /* 453 */ "pseudo_column", + /* 454 */ "column_reference", + /* 455 */ "function_expression", + /* 456 */ "case_when_expression", + /* 457 */ "star_func", + /* 458 */ "star_func_para_list", + /* 459 */ "noarg_func", + /* 460 */ "other_para_list", + /* 461 */ "star_func_para", + /* 462 */ "when_then_list", + /* 463 */ "case_when_else_opt", + /* 464 */ "common_expression", + /* 465 */ "when_then_expr", + /* 466 */ "predicate", + /* 467 */ "compare_op", + /* 468 */ "in_op", + /* 469 */ "in_predicate_value", + /* 470 */ "boolean_value_expression", + /* 471 */ "boolean_primary", + /* 472 */ "from_clause_opt", + /* 473 */ "table_reference_list", + /* 474 */ "table_reference", + /* 475 */ "table_primary", + /* 476 */ "joined_table", + /* 477 */ "alias_opt", + /* 478 */ "subquery", + /* 479 */ "parenthesized_joined_table", + /* 480 */ "join_type", + /* 481 */ "query_specification", + /* 482 */ "hint_list", + /* 483 */ "set_quantifier_opt", + /* 484 */ "tag_mode_opt", + /* 485 */ "select_list", + /* 486 */ "partition_by_clause_opt", + /* 487 */ "range_opt", + /* 488 */ "every_opt", + /* 489 */ "fill_opt", + /* 490 */ "twindow_clause_opt", + /* 491 */ "group_by_clause_opt", + /* 492 */ "having_clause_opt", + /* 493 */ "select_item", + /* 494 */ "partition_list", + /* 495 */ "partition_item", + /* 496 */ "interval_sliding_duration_literal", + /* 497 */ "fill_mode", + /* 498 */ "group_by_list", + /* 499 */ "query_expression", + /* 500 */ "query_simple", + /* 501 */ "order_by_clause_opt", + /* 502 */ "slimit_clause_opt", + /* 503 */ "limit_clause_opt", + /* 504 */ "union_query_expression", + /* 505 */ "query_simple_or_subquery", + /* 506 */ "sort_specification_list", + /* 507 */ "sort_specification", + /* 508 */ "ordering_specification_opt", + /* 509 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -2327,388 +2337,390 @@ static const char *const yyRuleName[] = { /* 259 */ "cmd ::= SHOW CONNECTIONS", /* 260 */ "cmd ::= SHOW LICENCES", /* 261 */ "cmd ::= SHOW GRANTS", - /* 262 */ "cmd ::= SHOW CREATE DATABASE db_name", - /* 263 */ "cmd ::= SHOW CREATE TABLE full_table_name", - /* 264 */ "cmd ::= SHOW CREATE STABLE full_table_name", - /* 265 */ "cmd ::= SHOW QUERIES", - /* 266 */ "cmd ::= SHOW SCORES", - /* 267 */ "cmd ::= SHOW TOPICS", - /* 268 */ "cmd ::= SHOW VARIABLES", - /* 269 */ "cmd ::= SHOW CLUSTER VARIABLES", - /* 270 */ "cmd ::= SHOW LOCAL VARIABLES", - /* 271 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", - /* 272 */ "cmd ::= SHOW BNODES", - /* 273 */ "cmd ::= SHOW SNODES", - /* 274 */ "cmd ::= SHOW CLUSTER", - /* 275 */ "cmd ::= SHOW TRANSACTIONS", - /* 276 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", - /* 277 */ "cmd ::= SHOW CONSUMERS", - /* 278 */ "cmd ::= SHOW SUBSCRIPTIONS", - /* 279 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", - /* 280 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", - /* 281 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", - /* 282 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", - /* 283 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", - /* 284 */ "cmd ::= SHOW VNODES", - /* 285 */ "cmd ::= SHOW db_name_cond_opt ALIVE", - /* 286 */ "cmd ::= SHOW CLUSTER ALIVE", - /* 287 */ "cmd ::= SHOW db_name_cond_opt VIEWS", - /* 288 */ "cmd ::= SHOW CREATE VIEW full_table_name", - /* 289 */ "cmd ::= SHOW COMPACTS", - /* 290 */ "cmd ::= SHOW COMPACT NK_INTEGER", - /* 291 */ "table_kind_db_name_cond_opt ::=", - /* 292 */ "table_kind_db_name_cond_opt ::= table_kind", - /* 293 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", - /* 294 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", - /* 295 */ "table_kind ::= NORMAL", - /* 296 */ "table_kind ::= CHILD", - /* 297 */ "db_name_cond_opt ::=", - /* 298 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 299 */ "like_pattern_opt ::=", - /* 300 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 301 */ "table_name_cond ::= table_name", - /* 302 */ "from_db_opt ::=", - /* 303 */ "from_db_opt ::= FROM db_name", - /* 304 */ "tag_list_opt ::=", - /* 305 */ "tag_list_opt ::= tag_item", - /* 306 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", - /* 307 */ "tag_item ::= TBNAME", - /* 308 */ "tag_item ::= QTAGS", - /* 309 */ "tag_item ::= column_name", - /* 310 */ "tag_item ::= column_name column_alias", - /* 311 */ "tag_item ::= column_name AS column_alias", - /* 312 */ "db_kind_opt ::=", - /* 313 */ "db_kind_opt ::= USER", - /* 314 */ "db_kind_opt ::= SYSTEM", - /* 315 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", - /* 316 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", - /* 317 */ "cmd ::= DROP INDEX exists_opt full_index_name", - /* 318 */ "full_index_name ::= index_name", - /* 319 */ "full_index_name ::= db_name NK_DOT index_name", - /* 320 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", - /* 321 */ "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", - /* 322 */ "func_list ::= func", - /* 323 */ "func_list ::= func_list NK_COMMA func", - /* 324 */ "func ::= sma_func_name NK_LP expression_list NK_RP", - /* 325 */ "sma_func_name ::= function_name", - /* 326 */ "sma_func_name ::= COUNT", - /* 327 */ "sma_func_name ::= FIRST", - /* 328 */ "sma_func_name ::= LAST", - /* 329 */ "sma_func_name ::= LAST_ROW", - /* 330 */ "sma_stream_opt ::=", - /* 331 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", - /* 332 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", - /* 333 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", - /* 334 */ "with_meta ::= AS", - /* 335 */ "with_meta ::= WITH META AS", - /* 336 */ "with_meta ::= ONLY META AS", - /* 337 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", - /* 338 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", - /* 339 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", - /* 340 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 341 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 342 */ "cmd ::= DESC full_table_name", - /* 343 */ "cmd ::= DESCRIBE full_table_name", - /* 344 */ "cmd ::= RESET QUERY CACHE", - /* 345 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", - /* 346 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", - /* 347 */ "analyze_opt ::=", - /* 348 */ "analyze_opt ::= ANALYZE", - /* 349 */ "explain_options ::=", - /* 350 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 351 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 352 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", - /* 353 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 354 */ "agg_func_opt ::=", - /* 355 */ "agg_func_opt ::= AGGREGATE", - /* 356 */ "bufsize_opt ::=", - /* 357 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 358 */ "language_opt ::=", - /* 359 */ "language_opt ::= LANGUAGE NK_STRING", - /* 360 */ "or_replace_opt ::=", - /* 361 */ "or_replace_opt ::= OR REPLACE", - /* 362 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", - /* 363 */ "cmd ::= DROP VIEW exists_opt full_view_name", - /* 364 */ "full_view_name ::= view_name", - /* 365 */ "full_view_name ::= db_name NK_DOT view_name", - /* 366 */ "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", - /* 367 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 368 */ "cmd ::= PAUSE STREAM exists_opt stream_name", - /* 369 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", - /* 370 */ "col_list_opt ::=", - /* 371 */ "col_list_opt ::= NK_LP col_name_list NK_RP", - /* 372 */ "tag_def_or_ref_opt ::=", - /* 373 */ "tag_def_or_ref_opt ::= tags_def", - /* 374 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP", - /* 375 */ "stream_options ::=", - /* 376 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 377 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 378 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 379 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 380 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", - /* 381 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", - /* 382 */ "stream_options ::= stream_options DELETE_MARK duration_literal", - /* 383 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", - /* 384 */ "subtable_opt ::=", - /* 385 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 386 */ "ignore_opt ::=", - /* 387 */ "ignore_opt ::= IGNORE UNTREATED", - /* 388 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 389 */ "cmd ::= KILL QUERY NK_STRING", - /* 390 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 391 */ "cmd ::= KILL COMPACT NK_INTEGER", - /* 392 */ "cmd ::= BALANCE VGROUP", - /* 393 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", - /* 394 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 395 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 396 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 397 */ "on_vgroup_id ::=", - /* 398 */ "on_vgroup_id ::= ON NK_INTEGER", - /* 399 */ "dnode_list ::= DNODE NK_INTEGER", - /* 400 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 401 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 402 */ "cmd ::= query_or_subquery", - /* 403 */ "cmd ::= insert_query", - /* 404 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 405 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", - /* 406 */ "literal ::= NK_INTEGER", - /* 407 */ "literal ::= NK_FLOAT", - /* 408 */ "literal ::= NK_STRING", - /* 409 */ "literal ::= NK_BOOL", - /* 410 */ "literal ::= TIMESTAMP NK_STRING", - /* 411 */ "literal ::= duration_literal", - /* 412 */ "literal ::= NULL", - /* 413 */ "literal ::= NK_QUESTION", - /* 414 */ "duration_literal ::= NK_VARIABLE", - /* 415 */ "signed ::= NK_INTEGER", - /* 416 */ "signed ::= NK_PLUS NK_INTEGER", - /* 417 */ "signed ::= NK_MINUS NK_INTEGER", - /* 418 */ "signed ::= NK_FLOAT", - /* 419 */ "signed ::= NK_PLUS NK_FLOAT", - /* 420 */ "signed ::= NK_MINUS NK_FLOAT", - /* 421 */ "signed_literal ::= signed", - /* 422 */ "signed_literal ::= NK_STRING", - /* 423 */ "signed_literal ::= NK_BOOL", - /* 424 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 425 */ "signed_literal ::= duration_literal", - /* 426 */ "signed_literal ::= NULL", - /* 427 */ "signed_literal ::= literal_func", - /* 428 */ "signed_literal ::= NK_QUESTION", - /* 429 */ "literal_list ::= signed_literal", - /* 430 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 431 */ "db_name ::= NK_ID", - /* 432 */ "table_name ::= NK_ID", - /* 433 */ "column_name ::= NK_ID", - /* 434 */ "function_name ::= NK_ID", - /* 435 */ "view_name ::= NK_ID", - /* 436 */ "table_alias ::= NK_ID", - /* 437 */ "column_alias ::= NK_ID", - /* 438 */ "column_alias ::= NK_ALIAS", - /* 439 */ "user_name ::= NK_ID", - /* 440 */ "topic_name ::= NK_ID", - /* 441 */ "stream_name ::= NK_ID", - /* 442 */ "cgroup_name ::= NK_ID", - /* 443 */ "index_name ::= NK_ID", - /* 444 */ "expr_or_subquery ::= expression", - /* 445 */ "expression ::= literal", - /* 446 */ "expression ::= pseudo_column", - /* 447 */ "expression ::= column_reference", - /* 448 */ "expression ::= function_expression", - /* 449 */ "expression ::= case_when_expression", - /* 450 */ "expression ::= NK_LP expression NK_RP", - /* 451 */ "expression ::= NK_PLUS expr_or_subquery", - /* 452 */ "expression ::= NK_MINUS expr_or_subquery", - /* 453 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 454 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 455 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 456 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 457 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 458 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 459 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 460 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 461 */ "expression_list ::= expr_or_subquery", - /* 462 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 463 */ "column_reference ::= column_name", - /* 464 */ "column_reference ::= table_name NK_DOT column_name", - /* 465 */ "column_reference ::= NK_ALIAS", - /* 466 */ "column_reference ::= table_name NK_DOT NK_ALIAS", - /* 467 */ "pseudo_column ::= ROWTS", - /* 468 */ "pseudo_column ::= TBNAME", - /* 469 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 470 */ "pseudo_column ::= QSTART", - /* 471 */ "pseudo_column ::= QEND", - /* 472 */ "pseudo_column ::= QDURATION", - /* 473 */ "pseudo_column ::= WSTART", - /* 474 */ "pseudo_column ::= WEND", - /* 475 */ "pseudo_column ::= WDURATION", - /* 476 */ "pseudo_column ::= IROWTS", - /* 477 */ "pseudo_column ::= ISFILLED", - /* 478 */ "pseudo_column ::= QTAGS", - /* 479 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 480 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 481 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 482 */ "function_expression ::= literal_func", - /* 483 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 484 */ "literal_func ::= NOW", - /* 485 */ "noarg_func ::= NOW", - /* 486 */ "noarg_func ::= TODAY", - /* 487 */ "noarg_func ::= TIMEZONE", - /* 488 */ "noarg_func ::= DATABASE", - /* 489 */ "noarg_func ::= CLIENT_VERSION", - /* 490 */ "noarg_func ::= SERVER_VERSION", - /* 491 */ "noarg_func ::= SERVER_STATUS", - /* 492 */ "noarg_func ::= CURRENT_USER", - /* 493 */ "noarg_func ::= USER", - /* 494 */ "star_func ::= COUNT", - /* 495 */ "star_func ::= FIRST", - /* 496 */ "star_func ::= LAST", - /* 497 */ "star_func ::= LAST_ROW", - /* 498 */ "star_func_para_list ::= NK_STAR", - /* 499 */ "star_func_para_list ::= other_para_list", - /* 500 */ "other_para_list ::= star_func_para", - /* 501 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 502 */ "star_func_para ::= expr_or_subquery", - /* 503 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 504 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 505 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 506 */ "when_then_list ::= when_then_expr", - /* 507 */ "when_then_list ::= when_then_list when_then_expr", - /* 508 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 509 */ "case_when_else_opt ::=", - /* 510 */ "case_when_else_opt ::= ELSE common_expression", - /* 511 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 512 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 513 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 514 */ "predicate ::= expr_or_subquery IS NULL", - /* 515 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 516 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 517 */ "compare_op ::= NK_LT", - /* 518 */ "compare_op ::= NK_GT", - /* 519 */ "compare_op ::= NK_LE", - /* 520 */ "compare_op ::= NK_GE", - /* 521 */ "compare_op ::= NK_NE", - /* 522 */ "compare_op ::= NK_EQ", - /* 523 */ "compare_op ::= LIKE", - /* 524 */ "compare_op ::= NOT LIKE", - /* 525 */ "compare_op ::= MATCH", - /* 526 */ "compare_op ::= NMATCH", - /* 527 */ "compare_op ::= CONTAINS", - /* 528 */ "in_op ::= IN", - /* 529 */ "in_op ::= NOT IN", - /* 530 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 531 */ "boolean_value_expression ::= boolean_primary", - /* 532 */ "boolean_value_expression ::= NOT boolean_primary", - /* 533 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 534 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 535 */ "boolean_primary ::= predicate", - /* 536 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 537 */ "common_expression ::= expr_or_subquery", - /* 538 */ "common_expression ::= boolean_value_expression", - /* 539 */ "from_clause_opt ::=", - /* 540 */ "from_clause_opt ::= FROM table_reference_list", - /* 541 */ "table_reference_list ::= table_reference", - /* 542 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 543 */ "table_reference ::= table_primary", - /* 544 */ "table_reference ::= joined_table", - /* 545 */ "table_primary ::= table_name alias_opt", - /* 546 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 547 */ "table_primary ::= subquery alias_opt", - /* 548 */ "table_primary ::= parenthesized_joined_table", - /* 549 */ "alias_opt ::=", - /* 550 */ "alias_opt ::= table_alias", - /* 551 */ "alias_opt ::= AS table_alias", - /* 552 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 553 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 554 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 555 */ "join_type ::=", - /* 556 */ "join_type ::= INNER", - /* 557 */ "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", - /* 558 */ "hint_list ::=", - /* 559 */ "hint_list ::= NK_HINT", - /* 560 */ "tag_mode_opt ::=", - /* 561 */ "tag_mode_opt ::= TAGS", - /* 562 */ "set_quantifier_opt ::=", - /* 563 */ "set_quantifier_opt ::= DISTINCT", - /* 564 */ "set_quantifier_opt ::= ALL", - /* 565 */ "select_list ::= select_item", - /* 566 */ "select_list ::= select_list NK_COMMA select_item", - /* 567 */ "select_item ::= NK_STAR", - /* 568 */ "select_item ::= common_expression", - /* 569 */ "select_item ::= common_expression column_alias", - /* 570 */ "select_item ::= common_expression AS column_alias", - /* 571 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 572 */ "where_clause_opt ::=", - /* 573 */ "where_clause_opt ::= WHERE search_condition", - /* 574 */ "partition_by_clause_opt ::=", - /* 575 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 576 */ "partition_list ::= partition_item", - /* 577 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 578 */ "partition_item ::= expr_or_subquery", - /* 579 */ "partition_item ::= expr_or_subquery column_alias", - /* 580 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 581 */ "twindow_clause_opt ::=", - /* 582 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", - /* 583 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 584 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 585 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 586 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 587 */ "sliding_opt ::=", - /* 588 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", - /* 589 */ "interval_sliding_duration_literal ::= NK_VARIABLE", - /* 590 */ "interval_sliding_duration_literal ::= NK_STRING", - /* 591 */ "interval_sliding_duration_literal ::= NK_INTEGER", - /* 592 */ "fill_opt ::=", - /* 593 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 594 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", - /* 595 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", - /* 596 */ "fill_mode ::= NONE", - /* 597 */ "fill_mode ::= PREV", - /* 598 */ "fill_mode ::= NULL", - /* 599 */ "fill_mode ::= NULL_F", - /* 600 */ "fill_mode ::= LINEAR", - /* 601 */ "fill_mode ::= NEXT", - /* 602 */ "group_by_clause_opt ::=", - /* 603 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 604 */ "group_by_list ::= expr_or_subquery", - /* 605 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 606 */ "having_clause_opt ::=", - /* 607 */ "having_clause_opt ::= HAVING search_condition", - /* 608 */ "range_opt ::=", - /* 609 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 610 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", - /* 611 */ "every_opt ::=", - /* 612 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 613 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 614 */ "query_simple ::= query_specification", - /* 615 */ "query_simple ::= union_query_expression", - /* 616 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 617 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 618 */ "query_simple_or_subquery ::= query_simple", - /* 619 */ "query_simple_or_subquery ::= subquery", - /* 620 */ "query_or_subquery ::= query_expression", - /* 621 */ "query_or_subquery ::= subquery", - /* 622 */ "order_by_clause_opt ::=", - /* 623 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 624 */ "slimit_clause_opt ::=", - /* 625 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 626 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 627 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 628 */ "limit_clause_opt ::=", - /* 629 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 630 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 631 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 632 */ "subquery ::= NK_LP query_expression NK_RP", - /* 633 */ "subquery ::= NK_LP subquery NK_RP", - /* 634 */ "search_condition ::= common_expression", - /* 635 */ "sort_specification_list ::= sort_specification", - /* 636 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 637 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 638 */ "ordering_specification_opt ::=", - /* 639 */ "ordering_specification_opt ::= ASC", - /* 640 */ "ordering_specification_opt ::= DESC", - /* 641 */ "null_ordering_opt ::=", - /* 642 */ "null_ordering_opt ::= NULLS FIRST", - /* 643 */ "null_ordering_opt ::= NULLS LAST", + /* 262 */ "cmd ::= SHOW GRANTS FULL", + /* 263 */ "cmd ::= SHOW GRANTS LOG", + /* 264 */ "cmd ::= SHOW CREATE DATABASE db_name", + /* 265 */ "cmd ::= SHOW CREATE TABLE full_table_name", + /* 266 */ "cmd ::= SHOW CREATE STABLE full_table_name", + /* 267 */ "cmd ::= SHOW QUERIES", + /* 268 */ "cmd ::= SHOW SCORES", + /* 269 */ "cmd ::= SHOW TOPICS", + /* 270 */ "cmd ::= SHOW VARIABLES", + /* 271 */ "cmd ::= SHOW CLUSTER VARIABLES", + /* 272 */ "cmd ::= SHOW LOCAL VARIABLES", + /* 273 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", + /* 274 */ "cmd ::= SHOW BNODES", + /* 275 */ "cmd ::= SHOW SNODES", + /* 276 */ "cmd ::= SHOW CLUSTER", + /* 277 */ "cmd ::= SHOW TRANSACTIONS", + /* 278 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", + /* 279 */ "cmd ::= SHOW CONSUMERS", + /* 280 */ "cmd ::= SHOW SUBSCRIPTIONS", + /* 281 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", + /* 282 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", + /* 283 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", + /* 284 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", + /* 285 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", + /* 286 */ "cmd ::= SHOW VNODES", + /* 287 */ "cmd ::= SHOW db_name_cond_opt ALIVE", + /* 288 */ "cmd ::= SHOW CLUSTER ALIVE", + /* 289 */ "cmd ::= SHOW db_name_cond_opt VIEWS", + /* 290 */ "cmd ::= SHOW CREATE VIEW full_table_name", + /* 291 */ "cmd ::= SHOW COMPACTS", + /* 292 */ "cmd ::= SHOW COMPACT NK_INTEGER", + /* 293 */ "table_kind_db_name_cond_opt ::=", + /* 294 */ "table_kind_db_name_cond_opt ::= table_kind", + /* 295 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", + /* 296 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", + /* 297 */ "table_kind ::= NORMAL", + /* 298 */ "table_kind ::= CHILD", + /* 299 */ "db_name_cond_opt ::=", + /* 300 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 301 */ "like_pattern_opt ::=", + /* 302 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 303 */ "table_name_cond ::= table_name", + /* 304 */ "from_db_opt ::=", + /* 305 */ "from_db_opt ::= FROM db_name", + /* 306 */ "tag_list_opt ::=", + /* 307 */ "tag_list_opt ::= tag_item", + /* 308 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", + /* 309 */ "tag_item ::= TBNAME", + /* 310 */ "tag_item ::= QTAGS", + /* 311 */ "tag_item ::= column_name", + /* 312 */ "tag_item ::= column_name column_alias", + /* 313 */ "tag_item ::= column_name AS column_alias", + /* 314 */ "db_kind_opt ::=", + /* 315 */ "db_kind_opt ::= USER", + /* 316 */ "db_kind_opt ::= SYSTEM", + /* 317 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", + /* 318 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", + /* 319 */ "cmd ::= DROP INDEX exists_opt full_index_name", + /* 320 */ "full_index_name ::= index_name", + /* 321 */ "full_index_name ::= db_name NK_DOT index_name", + /* 322 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", + /* 323 */ "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", + /* 324 */ "func_list ::= func", + /* 325 */ "func_list ::= func_list NK_COMMA func", + /* 326 */ "func ::= sma_func_name NK_LP expression_list NK_RP", + /* 327 */ "sma_func_name ::= function_name", + /* 328 */ "sma_func_name ::= COUNT", + /* 329 */ "sma_func_name ::= FIRST", + /* 330 */ "sma_func_name ::= LAST", + /* 331 */ "sma_func_name ::= LAST_ROW", + /* 332 */ "sma_stream_opt ::=", + /* 333 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", + /* 334 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", + /* 335 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", + /* 336 */ "with_meta ::= AS", + /* 337 */ "with_meta ::= WITH META AS", + /* 338 */ "with_meta ::= ONLY META AS", + /* 339 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", + /* 340 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", + /* 341 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", + /* 342 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 343 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 344 */ "cmd ::= DESC full_table_name", + /* 345 */ "cmd ::= DESCRIBE full_table_name", + /* 346 */ "cmd ::= RESET QUERY CACHE", + /* 347 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", + /* 348 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", + /* 349 */ "analyze_opt ::=", + /* 350 */ "analyze_opt ::= ANALYZE", + /* 351 */ "explain_options ::=", + /* 352 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 353 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 354 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", + /* 355 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 356 */ "agg_func_opt ::=", + /* 357 */ "agg_func_opt ::= AGGREGATE", + /* 358 */ "bufsize_opt ::=", + /* 359 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 360 */ "language_opt ::=", + /* 361 */ "language_opt ::= LANGUAGE NK_STRING", + /* 362 */ "or_replace_opt ::=", + /* 363 */ "or_replace_opt ::= OR REPLACE", + /* 364 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", + /* 365 */ "cmd ::= DROP VIEW exists_opt full_view_name", + /* 366 */ "full_view_name ::= view_name", + /* 367 */ "full_view_name ::= db_name NK_DOT view_name", + /* 368 */ "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", + /* 369 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 370 */ "cmd ::= PAUSE STREAM exists_opt stream_name", + /* 371 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", + /* 372 */ "col_list_opt ::=", + /* 373 */ "col_list_opt ::= NK_LP col_name_list NK_RP", + /* 374 */ "tag_def_or_ref_opt ::=", + /* 375 */ "tag_def_or_ref_opt ::= tags_def", + /* 376 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP", + /* 377 */ "stream_options ::=", + /* 378 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 379 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 380 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 381 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 382 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", + /* 383 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", + /* 384 */ "stream_options ::= stream_options DELETE_MARK duration_literal", + /* 385 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", + /* 386 */ "subtable_opt ::=", + /* 387 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 388 */ "ignore_opt ::=", + /* 389 */ "ignore_opt ::= IGNORE UNTREATED", + /* 390 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 391 */ "cmd ::= KILL QUERY NK_STRING", + /* 392 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 393 */ "cmd ::= KILL COMPACT NK_INTEGER", + /* 394 */ "cmd ::= BALANCE VGROUP", + /* 395 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", + /* 396 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 397 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 398 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 399 */ "on_vgroup_id ::=", + /* 400 */ "on_vgroup_id ::= ON NK_INTEGER", + /* 401 */ "dnode_list ::= DNODE NK_INTEGER", + /* 402 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 403 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 404 */ "cmd ::= query_or_subquery", + /* 405 */ "cmd ::= insert_query", + /* 406 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 407 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", + /* 408 */ "literal ::= NK_INTEGER", + /* 409 */ "literal ::= NK_FLOAT", + /* 410 */ "literal ::= NK_STRING", + /* 411 */ "literal ::= NK_BOOL", + /* 412 */ "literal ::= TIMESTAMP NK_STRING", + /* 413 */ "literal ::= duration_literal", + /* 414 */ "literal ::= NULL", + /* 415 */ "literal ::= NK_QUESTION", + /* 416 */ "duration_literal ::= NK_VARIABLE", + /* 417 */ "signed ::= NK_INTEGER", + /* 418 */ "signed ::= NK_PLUS NK_INTEGER", + /* 419 */ "signed ::= NK_MINUS NK_INTEGER", + /* 420 */ "signed ::= NK_FLOAT", + /* 421 */ "signed ::= NK_PLUS NK_FLOAT", + /* 422 */ "signed ::= NK_MINUS NK_FLOAT", + /* 423 */ "signed_literal ::= signed", + /* 424 */ "signed_literal ::= NK_STRING", + /* 425 */ "signed_literal ::= NK_BOOL", + /* 426 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 427 */ "signed_literal ::= duration_literal", + /* 428 */ "signed_literal ::= NULL", + /* 429 */ "signed_literal ::= literal_func", + /* 430 */ "signed_literal ::= NK_QUESTION", + /* 431 */ "literal_list ::= signed_literal", + /* 432 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 433 */ "db_name ::= NK_ID", + /* 434 */ "table_name ::= NK_ID", + /* 435 */ "column_name ::= NK_ID", + /* 436 */ "function_name ::= NK_ID", + /* 437 */ "view_name ::= NK_ID", + /* 438 */ "table_alias ::= NK_ID", + /* 439 */ "column_alias ::= NK_ID", + /* 440 */ "column_alias ::= NK_ALIAS", + /* 441 */ "user_name ::= NK_ID", + /* 442 */ "topic_name ::= NK_ID", + /* 443 */ "stream_name ::= NK_ID", + /* 444 */ "cgroup_name ::= NK_ID", + /* 445 */ "index_name ::= NK_ID", + /* 446 */ "expr_or_subquery ::= expression", + /* 447 */ "expression ::= literal", + /* 448 */ "expression ::= pseudo_column", + /* 449 */ "expression ::= column_reference", + /* 450 */ "expression ::= function_expression", + /* 451 */ "expression ::= case_when_expression", + /* 452 */ "expression ::= NK_LP expression NK_RP", + /* 453 */ "expression ::= NK_PLUS expr_or_subquery", + /* 454 */ "expression ::= NK_MINUS expr_or_subquery", + /* 455 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 456 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 457 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 458 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 459 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 460 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 461 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 462 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 463 */ "expression_list ::= expr_or_subquery", + /* 464 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 465 */ "column_reference ::= column_name", + /* 466 */ "column_reference ::= table_name NK_DOT column_name", + /* 467 */ "column_reference ::= NK_ALIAS", + /* 468 */ "column_reference ::= table_name NK_DOT NK_ALIAS", + /* 469 */ "pseudo_column ::= ROWTS", + /* 470 */ "pseudo_column ::= TBNAME", + /* 471 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 472 */ "pseudo_column ::= QSTART", + /* 473 */ "pseudo_column ::= QEND", + /* 474 */ "pseudo_column ::= QDURATION", + /* 475 */ "pseudo_column ::= WSTART", + /* 476 */ "pseudo_column ::= WEND", + /* 477 */ "pseudo_column ::= WDURATION", + /* 478 */ "pseudo_column ::= IROWTS", + /* 479 */ "pseudo_column ::= ISFILLED", + /* 480 */ "pseudo_column ::= QTAGS", + /* 481 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 482 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 483 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 484 */ "function_expression ::= literal_func", + /* 485 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 486 */ "literal_func ::= NOW", + /* 487 */ "noarg_func ::= NOW", + /* 488 */ "noarg_func ::= TODAY", + /* 489 */ "noarg_func ::= TIMEZONE", + /* 490 */ "noarg_func ::= DATABASE", + /* 491 */ "noarg_func ::= CLIENT_VERSION", + /* 492 */ "noarg_func ::= SERVER_VERSION", + /* 493 */ "noarg_func ::= SERVER_STATUS", + /* 494 */ "noarg_func ::= CURRENT_USER", + /* 495 */ "noarg_func ::= USER", + /* 496 */ "star_func ::= COUNT", + /* 497 */ "star_func ::= FIRST", + /* 498 */ "star_func ::= LAST", + /* 499 */ "star_func ::= LAST_ROW", + /* 500 */ "star_func_para_list ::= NK_STAR", + /* 501 */ "star_func_para_list ::= other_para_list", + /* 502 */ "other_para_list ::= star_func_para", + /* 503 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 504 */ "star_func_para ::= expr_or_subquery", + /* 505 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 506 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 507 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 508 */ "when_then_list ::= when_then_expr", + /* 509 */ "when_then_list ::= when_then_list when_then_expr", + /* 510 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 511 */ "case_when_else_opt ::=", + /* 512 */ "case_when_else_opt ::= ELSE common_expression", + /* 513 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 514 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 515 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 516 */ "predicate ::= expr_or_subquery IS NULL", + /* 517 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 518 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 519 */ "compare_op ::= NK_LT", + /* 520 */ "compare_op ::= NK_GT", + /* 521 */ "compare_op ::= NK_LE", + /* 522 */ "compare_op ::= NK_GE", + /* 523 */ "compare_op ::= NK_NE", + /* 524 */ "compare_op ::= NK_EQ", + /* 525 */ "compare_op ::= LIKE", + /* 526 */ "compare_op ::= NOT LIKE", + /* 527 */ "compare_op ::= MATCH", + /* 528 */ "compare_op ::= NMATCH", + /* 529 */ "compare_op ::= CONTAINS", + /* 530 */ "in_op ::= IN", + /* 531 */ "in_op ::= NOT IN", + /* 532 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 533 */ "boolean_value_expression ::= boolean_primary", + /* 534 */ "boolean_value_expression ::= NOT boolean_primary", + /* 535 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 536 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 537 */ "boolean_primary ::= predicate", + /* 538 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 539 */ "common_expression ::= expr_or_subquery", + /* 540 */ "common_expression ::= boolean_value_expression", + /* 541 */ "from_clause_opt ::=", + /* 542 */ "from_clause_opt ::= FROM table_reference_list", + /* 543 */ "table_reference_list ::= table_reference", + /* 544 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 545 */ "table_reference ::= table_primary", + /* 546 */ "table_reference ::= joined_table", + /* 547 */ "table_primary ::= table_name alias_opt", + /* 548 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 549 */ "table_primary ::= subquery alias_opt", + /* 550 */ "table_primary ::= parenthesized_joined_table", + /* 551 */ "alias_opt ::=", + /* 552 */ "alias_opt ::= table_alias", + /* 553 */ "alias_opt ::= AS table_alias", + /* 554 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 555 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 556 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 557 */ "join_type ::=", + /* 558 */ "join_type ::= INNER", + /* 559 */ "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", + /* 560 */ "hint_list ::=", + /* 561 */ "hint_list ::= NK_HINT", + /* 562 */ "tag_mode_opt ::=", + /* 563 */ "tag_mode_opt ::= TAGS", + /* 564 */ "set_quantifier_opt ::=", + /* 565 */ "set_quantifier_opt ::= DISTINCT", + /* 566 */ "set_quantifier_opt ::= ALL", + /* 567 */ "select_list ::= select_item", + /* 568 */ "select_list ::= select_list NK_COMMA select_item", + /* 569 */ "select_item ::= NK_STAR", + /* 570 */ "select_item ::= common_expression", + /* 571 */ "select_item ::= common_expression column_alias", + /* 572 */ "select_item ::= common_expression AS column_alias", + /* 573 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 574 */ "where_clause_opt ::=", + /* 575 */ "where_clause_opt ::= WHERE search_condition", + /* 576 */ "partition_by_clause_opt ::=", + /* 577 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 578 */ "partition_list ::= partition_item", + /* 579 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 580 */ "partition_item ::= expr_or_subquery", + /* 581 */ "partition_item ::= expr_or_subquery column_alias", + /* 582 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 583 */ "twindow_clause_opt ::=", + /* 584 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", + /* 585 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 586 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 587 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 588 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 589 */ "sliding_opt ::=", + /* 590 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", + /* 591 */ "interval_sliding_duration_literal ::= NK_VARIABLE", + /* 592 */ "interval_sliding_duration_literal ::= NK_STRING", + /* 593 */ "interval_sliding_duration_literal ::= NK_INTEGER", + /* 594 */ "fill_opt ::=", + /* 595 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 596 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", + /* 597 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", + /* 598 */ "fill_mode ::= NONE", + /* 599 */ "fill_mode ::= PREV", + /* 600 */ "fill_mode ::= NULL", + /* 601 */ "fill_mode ::= NULL_F", + /* 602 */ "fill_mode ::= LINEAR", + /* 603 */ "fill_mode ::= NEXT", + /* 604 */ "group_by_clause_opt ::=", + /* 605 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 606 */ "group_by_list ::= expr_or_subquery", + /* 607 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 608 */ "having_clause_opt ::=", + /* 609 */ "having_clause_opt ::= HAVING search_condition", + /* 610 */ "range_opt ::=", + /* 611 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 612 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", + /* 613 */ "every_opt ::=", + /* 614 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 615 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 616 */ "query_simple ::= query_specification", + /* 617 */ "query_simple ::= union_query_expression", + /* 618 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 619 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 620 */ "query_simple_or_subquery ::= query_simple", + /* 621 */ "query_simple_or_subquery ::= subquery", + /* 622 */ "query_or_subquery ::= query_expression", + /* 623 */ "query_or_subquery ::= subquery", + /* 624 */ "order_by_clause_opt ::=", + /* 625 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 626 */ "slimit_clause_opt ::=", + /* 627 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 628 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 629 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 630 */ "limit_clause_opt ::=", + /* 631 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 632 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 633 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 634 */ "subquery ::= NK_LP query_expression NK_RP", + /* 635 */ "subquery ::= NK_LP subquery NK_RP", + /* 636 */ "search_condition ::= common_expression", + /* 637 */ "sort_specification_list ::= sort_specification", + /* 638 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 639 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 640 */ "ordering_specification_opt ::=", + /* 641 */ "ordering_specification_opt ::= ASC", + /* 642 */ "ordering_specification_opt ::= DESC", + /* 643 */ "null_ordering_opt ::=", + /* 644 */ "null_ordering_opt ::= NULLS FIRST", + /* 645 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -2835,231 +2847,231 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 347: /* cmd */ - case 350: /* literal */ - case 359: /* with_opt */ - case 365: /* search_condition */ - case 370: /* db_options */ - case 372: /* alter_db_options */ - case 374: /* start_opt */ - case 375: /* end_opt */ - case 379: /* signed */ - case 381: /* retention */ - case 382: /* full_table_name */ - case 385: /* table_options */ - case 389: /* alter_table_clause */ - case 390: /* alter_table_options */ - case 393: /* signed_literal */ - case 394: /* create_subtable_clause */ - case 397: /* drop_table_clause */ - case 399: /* column_def */ - case 403: /* duration_literal */ - case 404: /* rollup_func_name */ - case 406: /* col_name */ - case 409: /* like_pattern_opt */ - case 410: /* db_name_cond_opt */ - case 411: /* table_name_cond */ - case 412: /* from_db_opt */ - case 415: /* tag_item */ - case 417: /* index_options */ - case 418: /* full_index_name */ - case 421: /* sliding_opt */ - case 422: /* sma_stream_opt */ - case 423: /* func */ - case 426: /* query_or_subquery */ - case 427: /* where_clause_opt */ - case 430: /* explain_options */ - case 431: /* insert_query */ - case 436: /* full_view_name */ - case 439: /* stream_options */ - case 442: /* subtable_opt */ - case 444: /* expression */ - case 447: /* literal_func */ - case 450: /* expr_or_subquery */ - case 451: /* pseudo_column */ - case 452: /* column_reference */ - case 453: /* function_expression */ - case 454: /* case_when_expression */ - case 459: /* star_func_para */ - case 461: /* case_when_else_opt */ - case 462: /* common_expression */ - case 463: /* when_then_expr */ - case 464: /* predicate */ - case 467: /* in_predicate_value */ - case 468: /* boolean_value_expression */ - case 469: /* boolean_primary */ - case 470: /* from_clause_opt */ - case 471: /* table_reference_list */ - case 472: /* table_reference */ - case 473: /* table_primary */ - case 474: /* joined_table */ - case 476: /* subquery */ - case 477: /* parenthesized_joined_table */ - case 479: /* query_specification */ - case 485: /* range_opt */ - case 486: /* every_opt */ - case 487: /* fill_opt */ - case 488: /* twindow_clause_opt */ - case 490: /* having_clause_opt */ - case 491: /* select_item */ - case 493: /* partition_item */ - case 494: /* interval_sliding_duration_literal */ - case 497: /* query_expression */ - case 498: /* query_simple */ - case 500: /* slimit_clause_opt */ - case 501: /* limit_clause_opt */ - case 502: /* union_query_expression */ - case 503: /* query_simple_or_subquery */ - case 505: /* sort_specification */ + case 349: /* cmd */ + case 352: /* literal */ + case 361: /* with_opt */ + case 367: /* search_condition */ + case 372: /* db_options */ + case 374: /* alter_db_options */ + case 376: /* start_opt */ + case 377: /* end_opt */ + case 381: /* signed */ + case 383: /* retention */ + case 384: /* full_table_name */ + case 387: /* table_options */ + case 391: /* alter_table_clause */ + case 392: /* alter_table_options */ + case 395: /* signed_literal */ + case 396: /* create_subtable_clause */ + case 399: /* drop_table_clause */ + case 401: /* column_def */ + case 405: /* duration_literal */ + case 406: /* rollup_func_name */ + case 408: /* col_name */ + case 411: /* like_pattern_opt */ + case 412: /* db_name_cond_opt */ + case 413: /* table_name_cond */ + case 414: /* from_db_opt */ + case 417: /* tag_item */ + case 419: /* index_options */ + case 420: /* full_index_name */ + case 423: /* sliding_opt */ + case 424: /* sma_stream_opt */ + case 425: /* func */ + case 428: /* query_or_subquery */ + case 429: /* where_clause_opt */ + case 432: /* explain_options */ + case 433: /* insert_query */ + case 438: /* full_view_name */ + case 441: /* stream_options */ + case 444: /* subtable_opt */ + case 446: /* expression */ + case 449: /* literal_func */ + case 452: /* expr_or_subquery */ + case 453: /* pseudo_column */ + case 454: /* column_reference */ + case 455: /* function_expression */ + case 456: /* case_when_expression */ + case 461: /* star_func_para */ + case 463: /* case_when_else_opt */ + case 464: /* common_expression */ + case 465: /* when_then_expr */ + case 466: /* predicate */ + case 469: /* in_predicate_value */ + case 470: /* boolean_value_expression */ + case 471: /* boolean_primary */ + case 472: /* from_clause_opt */ + case 473: /* table_reference_list */ + case 474: /* table_reference */ + case 475: /* table_primary */ + case 476: /* joined_table */ + case 478: /* subquery */ + case 479: /* parenthesized_joined_table */ + case 481: /* query_specification */ + case 487: /* range_opt */ + case 488: /* every_opt */ + case 489: /* fill_opt */ + case 490: /* twindow_clause_opt */ + case 492: /* having_clause_opt */ + case 493: /* select_item */ + case 495: /* partition_item */ + case 496: /* interval_sliding_duration_literal */ + case 499: /* query_expression */ + case 500: /* query_simple */ + case 502: /* slimit_clause_opt */ + case 503: /* limit_clause_opt */ + case 504: /* union_query_expression */ + case 505: /* query_simple_or_subquery */ + case 507: /* sort_specification */ { - nodesDestroyNode((yypminor->yy232)); + nodesDestroyNode((yypminor->yy992)); } break; - case 348: /* account_options */ - case 349: /* alter_account_options */ - case 351: /* alter_account_option */ - case 373: /* speed_opt */ - case 425: /* with_meta */ - case 434: /* bufsize_opt */ + case 350: /* account_options */ + case 351: /* alter_account_options */ + case 353: /* alter_account_option */ + case 375: /* speed_opt */ + case 427: /* with_meta */ + case 436: /* bufsize_opt */ { } break; - case 352: /* ip_range_list */ - case 353: /* white_list */ - case 354: /* white_list_opt */ - case 376: /* integer_list */ - case 377: /* variable_list */ - case 378: /* retention_list */ - case 383: /* column_def_list */ - case 384: /* tags_def_opt */ - case 386: /* multi_create_clause */ - case 387: /* tags_def */ - case 388: /* multi_drop_clause */ - case 395: /* specific_cols_opt */ - case 396: /* expression_list */ - case 398: /* col_name_list */ - case 400: /* duration_list */ - case 401: /* rollup_func_list */ - case 413: /* tag_list_opt */ - case 420: /* func_list */ - case 440: /* col_list_opt */ - case 441: /* tag_def_or_ref_opt */ - case 446: /* dnode_list */ - case 448: /* literal_list */ - case 456: /* star_func_para_list */ - case 458: /* other_para_list */ - case 460: /* when_then_list */ - case 480: /* hint_list */ - case 483: /* select_list */ - case 484: /* partition_by_clause_opt */ - case 489: /* group_by_clause_opt */ - case 492: /* partition_list */ - case 496: /* group_by_list */ - case 499: /* order_by_clause_opt */ - case 504: /* sort_specification_list */ + case 354: /* ip_range_list */ + case 355: /* white_list */ + case 356: /* white_list_opt */ + case 378: /* integer_list */ + case 379: /* variable_list */ + case 380: /* retention_list */ + case 385: /* column_def_list */ + case 386: /* tags_def_opt */ + case 388: /* multi_create_clause */ + case 389: /* tags_def */ + case 390: /* multi_drop_clause */ + case 397: /* specific_cols_opt */ + case 398: /* expression_list */ + case 400: /* col_name_list */ + case 402: /* duration_list */ + case 403: /* rollup_func_list */ + case 415: /* tag_list_opt */ + case 422: /* func_list */ + case 442: /* col_list_opt */ + case 443: /* tag_def_or_ref_opt */ + case 448: /* dnode_list */ + case 450: /* literal_list */ + case 458: /* star_func_para_list */ + case 460: /* other_para_list */ + case 462: /* when_then_list */ + case 482: /* hint_list */ + case 485: /* select_list */ + case 486: /* partition_by_clause_opt */ + case 491: /* group_by_clause_opt */ + case 494: /* partition_list */ + case 498: /* group_by_list */ + case 501: /* order_by_clause_opt */ + case 506: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy88)); + nodesDestroyList((yypminor->yy364)); } break; - case 355: /* user_name */ - case 362: /* db_name */ - case 363: /* table_name */ - case 364: /* topic_name */ - case 366: /* dnode_endpoint */ - case 391: /* column_name */ - case 405: /* function_name */ - case 416: /* column_alias */ - case 419: /* index_name */ - case 424: /* sma_func_name */ - case 428: /* cgroup_name */ - case 435: /* language_opt */ - case 437: /* view_name */ - case 438: /* stream_name */ - case 445: /* on_vgroup_id */ - case 449: /* table_alias */ - case 455: /* star_func */ - case 457: /* noarg_func */ - case 475: /* alias_opt */ + case 357: /* user_name */ + case 364: /* db_name */ + case 365: /* table_name */ + case 366: /* topic_name */ + case 368: /* dnode_endpoint */ + case 393: /* column_name */ + case 407: /* function_name */ + case 418: /* column_alias */ + case 421: /* index_name */ + case 426: /* sma_func_name */ + case 430: /* cgroup_name */ + case 437: /* language_opt */ + case 439: /* view_name */ + case 440: /* stream_name */ + case 447: /* on_vgroup_id */ + case 451: /* table_alias */ + case 457: /* star_func */ + case 459: /* noarg_func */ + case 477: /* alias_opt */ { } break; - case 356: /* sysinfo_opt */ + case 358: /* sysinfo_opt */ { } break; - case 357: /* privileges */ - case 360: /* priv_type_list */ - case 361: /* priv_type */ + case 359: /* privileges */ + case 362: /* priv_type_list */ + case 363: /* priv_type */ { } break; - case 358: /* priv_level */ + case 360: /* priv_level */ { } break; - case 367: /* force_opt */ - case 368: /* unsafe_opt */ - case 369: /* not_exists_opt */ - case 371: /* exists_opt */ - case 429: /* analyze_opt */ - case 432: /* or_replace_opt */ - case 433: /* agg_func_opt */ - case 443: /* ignore_opt */ - case 481: /* set_quantifier_opt */ - case 482: /* tag_mode_opt */ + case 369: /* force_opt */ + case 370: /* unsafe_opt */ + case 371: /* not_exists_opt */ + case 373: /* exists_opt */ + case 431: /* analyze_opt */ + case 434: /* or_replace_opt */ + case 435: /* agg_func_opt */ + case 445: /* ignore_opt */ + case 483: /* set_quantifier_opt */ + case 484: /* tag_mode_opt */ { } break; - case 380: /* alter_db_option */ - case 402: /* alter_table_option */ + case 382: /* alter_db_option */ + case 404: /* alter_table_option */ { } break; - case 392: /* type_name */ + case 394: /* type_name */ { } break; - case 407: /* db_kind_opt */ - case 414: /* table_kind */ + case 409: /* db_kind_opt */ + case 416: /* table_kind */ { } break; - case 408: /* table_kind_db_name_cond_opt */ + case 410: /* table_kind_db_name_cond_opt */ { } break; - case 465: /* compare_op */ - case 466: /* in_op */ + case 467: /* compare_op */ + case 468: /* in_op */ { } break; - case 478: /* join_type */ + case 480: /* join_type */ { } break; - case 495: /* fill_mode */ + case 497: /* fill_mode */ { } break; - case 506: /* ordering_specification_opt */ + case 508: /* ordering_specification_opt */ { } break; - case 507: /* null_ordering_opt */ + case 509: /* null_ordering_opt */ { } @@ -3350,650 +3362,652 @@ static void yy_shift( /* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side ** of that rule */ static const YYCODETYPE yyRuleInfoLhs[] = { - 347, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - 347, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - 348, /* (2) account_options ::= */ - 348, /* (3) account_options ::= account_options PPS literal */ - 348, /* (4) account_options ::= account_options TSERIES literal */ - 348, /* (5) account_options ::= account_options STORAGE literal */ - 348, /* (6) account_options ::= account_options STREAMS literal */ - 348, /* (7) account_options ::= account_options QTIME literal */ - 348, /* (8) account_options ::= account_options DBS literal */ - 348, /* (9) account_options ::= account_options USERS literal */ - 348, /* (10) account_options ::= account_options CONNS literal */ - 348, /* (11) account_options ::= account_options STATE literal */ - 349, /* (12) alter_account_options ::= alter_account_option */ - 349, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - 351, /* (14) alter_account_option ::= PASS literal */ - 351, /* (15) alter_account_option ::= PPS literal */ - 351, /* (16) alter_account_option ::= TSERIES literal */ - 351, /* (17) alter_account_option ::= STORAGE literal */ - 351, /* (18) alter_account_option ::= STREAMS literal */ - 351, /* (19) alter_account_option ::= QTIME literal */ - 351, /* (20) alter_account_option ::= DBS literal */ - 351, /* (21) alter_account_option ::= USERS literal */ - 351, /* (22) alter_account_option ::= CONNS literal */ - 351, /* (23) alter_account_option ::= STATE literal */ - 352, /* (24) ip_range_list ::= NK_STRING */ - 352, /* (25) ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ - 353, /* (26) white_list ::= HOST ip_range_list */ - 354, /* (27) white_list_opt ::= */ - 354, /* (28) white_list_opt ::= white_list */ - 347, /* (29) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ - 347, /* (30) cmd ::= ALTER USER user_name PASS NK_STRING */ - 347, /* (31) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ - 347, /* (32) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ - 347, /* (33) cmd ::= ALTER USER user_name ADD white_list */ - 347, /* (34) cmd ::= ALTER USER user_name DROP white_list */ - 347, /* (35) cmd ::= DROP USER user_name */ - 356, /* (36) sysinfo_opt ::= */ - 356, /* (37) sysinfo_opt ::= SYSINFO NK_INTEGER */ - 347, /* (38) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ - 347, /* (39) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ - 357, /* (40) privileges ::= ALL */ - 357, /* (41) privileges ::= priv_type_list */ - 357, /* (42) privileges ::= SUBSCRIBE */ - 360, /* (43) priv_type_list ::= priv_type */ - 360, /* (44) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - 361, /* (45) priv_type ::= READ */ - 361, /* (46) priv_type ::= WRITE */ - 361, /* (47) priv_type ::= ALTER */ - 358, /* (48) priv_level ::= NK_STAR NK_DOT NK_STAR */ - 358, /* (49) priv_level ::= db_name NK_DOT NK_STAR */ - 358, /* (50) priv_level ::= db_name NK_DOT table_name */ - 358, /* (51) priv_level ::= topic_name */ - 359, /* (52) with_opt ::= */ - 359, /* (53) with_opt ::= WITH search_condition */ - 347, /* (54) cmd ::= CREATE DNODE dnode_endpoint */ - 347, /* (55) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ - 347, /* (56) cmd ::= DROP DNODE NK_INTEGER force_opt */ - 347, /* (57) cmd ::= DROP DNODE dnode_endpoint force_opt */ - 347, /* (58) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ - 347, /* (59) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ - 347, /* (60) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - 347, /* (61) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - 347, /* (62) cmd ::= ALTER ALL DNODES NK_STRING */ - 347, /* (63) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - 347, /* (64) cmd ::= RESTORE DNODE NK_INTEGER */ - 366, /* (65) dnode_endpoint ::= NK_STRING */ - 366, /* (66) dnode_endpoint ::= NK_ID */ - 366, /* (67) dnode_endpoint ::= NK_IPTOKEN */ - 367, /* (68) force_opt ::= */ - 367, /* (69) force_opt ::= FORCE */ - 368, /* (70) unsafe_opt ::= UNSAFE */ - 347, /* (71) cmd ::= ALTER CLUSTER NK_STRING */ - 347, /* (72) cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ - 347, /* (73) cmd ::= ALTER LOCAL NK_STRING */ - 347, /* (74) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - 347, /* (75) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - 347, /* (76) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - 347, /* (77) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ - 347, /* (78) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - 347, /* (79) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - 347, /* (80) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - 347, /* (81) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - 347, /* (82) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - 347, /* (83) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - 347, /* (84) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ - 347, /* (85) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ - 347, /* (86) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - 347, /* (87) cmd ::= DROP DATABASE exists_opt db_name */ - 347, /* (88) cmd ::= USE db_name */ - 347, /* (89) cmd ::= ALTER DATABASE db_name alter_db_options */ - 347, /* (90) cmd ::= FLUSH DATABASE db_name */ - 347, /* (91) cmd ::= TRIM DATABASE db_name speed_opt */ - 347, /* (92) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ - 369, /* (93) not_exists_opt ::= IF NOT EXISTS */ - 369, /* (94) not_exists_opt ::= */ - 371, /* (95) exists_opt ::= IF EXISTS */ - 371, /* (96) exists_opt ::= */ - 370, /* (97) db_options ::= */ - 370, /* (98) db_options ::= db_options BUFFER NK_INTEGER */ - 370, /* (99) db_options ::= db_options CACHEMODEL NK_STRING */ - 370, /* (100) db_options ::= db_options CACHESIZE NK_INTEGER */ - 370, /* (101) db_options ::= db_options COMP NK_INTEGER */ - 370, /* (102) db_options ::= db_options DURATION NK_INTEGER */ - 370, /* (103) db_options ::= db_options DURATION NK_VARIABLE */ - 370, /* (104) db_options ::= db_options MAXROWS NK_INTEGER */ - 370, /* (105) db_options ::= db_options MINROWS NK_INTEGER */ - 370, /* (106) db_options ::= db_options KEEP integer_list */ - 370, /* (107) db_options ::= db_options KEEP variable_list */ - 370, /* (108) db_options ::= db_options PAGES NK_INTEGER */ - 370, /* (109) db_options ::= db_options PAGESIZE NK_INTEGER */ - 370, /* (110) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - 370, /* (111) db_options ::= db_options PRECISION NK_STRING */ - 370, /* (112) db_options ::= db_options REPLICA NK_INTEGER */ - 370, /* (113) db_options ::= db_options VGROUPS NK_INTEGER */ - 370, /* (114) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - 370, /* (115) db_options ::= db_options RETENTIONS retention_list */ - 370, /* (116) db_options ::= db_options SCHEMALESS NK_INTEGER */ - 370, /* (117) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - 370, /* (118) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - 370, /* (119) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - 370, /* (120) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 370, /* (121) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - 370, /* (122) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 370, /* (123) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - 370, /* (124) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - 370, /* (125) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - 370, /* (126) db_options ::= db_options TABLE_PREFIX signed */ - 370, /* (127) db_options ::= db_options TABLE_SUFFIX signed */ - 370, /* (128) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ - 372, /* (129) alter_db_options ::= alter_db_option */ - 372, /* (130) alter_db_options ::= alter_db_options alter_db_option */ - 380, /* (131) alter_db_option ::= BUFFER NK_INTEGER */ - 380, /* (132) alter_db_option ::= CACHEMODEL NK_STRING */ - 380, /* (133) alter_db_option ::= CACHESIZE NK_INTEGER */ - 380, /* (134) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - 380, /* (135) alter_db_option ::= KEEP integer_list */ - 380, /* (136) alter_db_option ::= KEEP variable_list */ - 380, /* (137) alter_db_option ::= PAGES NK_INTEGER */ - 380, /* (138) alter_db_option ::= REPLICA NK_INTEGER */ - 380, /* (139) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - 380, /* (140) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - 380, /* (141) alter_db_option ::= MINROWS NK_INTEGER */ - 380, /* (142) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ - 380, /* (143) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 380, /* (144) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ - 380, /* (145) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 380, /* (146) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ - 376, /* (147) integer_list ::= NK_INTEGER */ - 376, /* (148) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - 377, /* (149) variable_list ::= NK_VARIABLE */ - 377, /* (150) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - 378, /* (151) retention_list ::= retention */ - 378, /* (152) retention_list ::= retention_list NK_COMMA retention */ - 381, /* (153) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - 381, /* (154) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ - 373, /* (155) speed_opt ::= */ - 373, /* (156) speed_opt ::= BWLIMIT NK_INTEGER */ - 374, /* (157) start_opt ::= */ - 374, /* (158) start_opt ::= START WITH NK_INTEGER */ - 374, /* (159) start_opt ::= START WITH NK_STRING */ - 374, /* (160) start_opt ::= START WITH TIMESTAMP NK_STRING */ - 375, /* (161) end_opt ::= */ - 375, /* (162) end_opt ::= END WITH NK_INTEGER */ - 375, /* (163) end_opt ::= END WITH NK_STRING */ - 375, /* (164) end_opt ::= END WITH TIMESTAMP NK_STRING */ - 347, /* (165) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - 347, /* (166) cmd ::= CREATE TABLE multi_create_clause */ - 347, /* (167) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - 347, /* (168) cmd ::= DROP TABLE multi_drop_clause */ - 347, /* (169) cmd ::= DROP STABLE exists_opt full_table_name */ - 347, /* (170) cmd ::= ALTER TABLE alter_table_clause */ - 347, /* (171) cmd ::= ALTER STABLE alter_table_clause */ - 389, /* (172) alter_table_clause ::= full_table_name alter_table_options */ - 389, /* (173) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - 389, /* (174) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - 389, /* (175) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - 389, /* (176) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - 389, /* (177) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - 389, /* (178) alter_table_clause ::= full_table_name DROP TAG column_name */ - 389, /* (179) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - 389, /* (180) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - 389, /* (181) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - 386, /* (182) multi_create_clause ::= create_subtable_clause */ - 386, /* (183) multi_create_clause ::= multi_create_clause create_subtable_clause */ - 394, /* (184) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ - 388, /* (185) multi_drop_clause ::= drop_table_clause */ - 388, /* (186) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ - 397, /* (187) drop_table_clause ::= exists_opt full_table_name */ - 395, /* (188) specific_cols_opt ::= */ - 395, /* (189) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - 382, /* (190) full_table_name ::= table_name */ - 382, /* (191) full_table_name ::= db_name NK_DOT table_name */ - 383, /* (192) column_def_list ::= column_def */ - 383, /* (193) column_def_list ::= column_def_list NK_COMMA column_def */ - 399, /* (194) column_def ::= column_name type_name */ - 392, /* (195) type_name ::= BOOL */ - 392, /* (196) type_name ::= TINYINT */ - 392, /* (197) type_name ::= SMALLINT */ - 392, /* (198) type_name ::= INT */ - 392, /* (199) type_name ::= INTEGER */ - 392, /* (200) type_name ::= BIGINT */ - 392, /* (201) type_name ::= FLOAT */ - 392, /* (202) type_name ::= DOUBLE */ - 392, /* (203) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - 392, /* (204) type_name ::= TIMESTAMP */ - 392, /* (205) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - 392, /* (206) type_name ::= TINYINT UNSIGNED */ - 392, /* (207) type_name ::= SMALLINT UNSIGNED */ - 392, /* (208) type_name ::= INT UNSIGNED */ - 392, /* (209) type_name ::= BIGINT UNSIGNED */ - 392, /* (210) type_name ::= JSON */ - 392, /* (211) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - 392, /* (212) type_name ::= MEDIUMBLOB */ - 392, /* (213) type_name ::= BLOB */ - 392, /* (214) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - 392, /* (215) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ - 392, /* (216) type_name ::= DECIMAL */ - 392, /* (217) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - 392, /* (218) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 384, /* (219) tags_def_opt ::= */ - 384, /* (220) tags_def_opt ::= tags_def */ - 387, /* (221) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - 385, /* (222) table_options ::= */ - 385, /* (223) table_options ::= table_options COMMENT NK_STRING */ - 385, /* (224) table_options ::= table_options MAX_DELAY duration_list */ - 385, /* (225) table_options ::= table_options WATERMARK duration_list */ - 385, /* (226) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - 385, /* (227) table_options ::= table_options TTL NK_INTEGER */ - 385, /* (228) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - 385, /* (229) table_options ::= table_options DELETE_MARK duration_list */ - 390, /* (230) alter_table_options ::= alter_table_option */ - 390, /* (231) alter_table_options ::= alter_table_options alter_table_option */ - 402, /* (232) alter_table_option ::= COMMENT NK_STRING */ - 402, /* (233) alter_table_option ::= TTL NK_INTEGER */ - 400, /* (234) duration_list ::= duration_literal */ - 400, /* (235) duration_list ::= duration_list NK_COMMA duration_literal */ - 401, /* (236) rollup_func_list ::= rollup_func_name */ - 401, /* (237) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - 404, /* (238) rollup_func_name ::= function_name */ - 404, /* (239) rollup_func_name ::= FIRST */ - 404, /* (240) rollup_func_name ::= LAST */ - 398, /* (241) col_name_list ::= col_name */ - 398, /* (242) col_name_list ::= col_name_list NK_COMMA col_name */ - 406, /* (243) col_name ::= column_name */ - 347, /* (244) cmd ::= SHOW DNODES */ - 347, /* (245) cmd ::= SHOW USERS */ - 347, /* (246) cmd ::= SHOW USER PRIVILEGES */ - 347, /* (247) cmd ::= SHOW db_kind_opt DATABASES */ - 347, /* (248) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ - 347, /* (249) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - 347, /* (250) cmd ::= SHOW db_name_cond_opt VGROUPS */ - 347, /* (251) cmd ::= SHOW MNODES */ - 347, /* (252) cmd ::= SHOW QNODES */ - 347, /* (253) cmd ::= SHOW FUNCTIONS */ - 347, /* (254) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - 347, /* (255) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ - 347, /* (256) cmd ::= SHOW STREAMS */ - 347, /* (257) cmd ::= SHOW ACCOUNTS */ - 347, /* (258) cmd ::= SHOW APPS */ - 347, /* (259) cmd ::= SHOW CONNECTIONS */ - 347, /* (260) cmd ::= SHOW LICENCES */ - 347, /* (261) cmd ::= SHOW GRANTS */ - 347, /* (262) cmd ::= SHOW CREATE DATABASE db_name */ - 347, /* (263) cmd ::= SHOW CREATE TABLE full_table_name */ - 347, /* (264) cmd ::= SHOW CREATE STABLE full_table_name */ - 347, /* (265) cmd ::= SHOW QUERIES */ - 347, /* (266) cmd ::= SHOW SCORES */ - 347, /* (267) cmd ::= SHOW TOPICS */ - 347, /* (268) cmd ::= SHOW VARIABLES */ - 347, /* (269) cmd ::= SHOW CLUSTER VARIABLES */ - 347, /* (270) cmd ::= SHOW LOCAL VARIABLES */ - 347, /* (271) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - 347, /* (272) cmd ::= SHOW BNODES */ - 347, /* (273) cmd ::= SHOW SNODES */ - 347, /* (274) cmd ::= SHOW CLUSTER */ - 347, /* (275) cmd ::= SHOW TRANSACTIONS */ - 347, /* (276) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - 347, /* (277) cmd ::= SHOW CONSUMERS */ - 347, /* (278) cmd ::= SHOW SUBSCRIPTIONS */ - 347, /* (279) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - 347, /* (280) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ - 347, /* (281) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - 347, /* (282) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ - 347, /* (283) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ - 347, /* (284) cmd ::= SHOW VNODES */ - 347, /* (285) cmd ::= SHOW db_name_cond_opt ALIVE */ - 347, /* (286) cmd ::= SHOW CLUSTER ALIVE */ - 347, /* (287) cmd ::= SHOW db_name_cond_opt VIEWS */ - 347, /* (288) cmd ::= SHOW CREATE VIEW full_table_name */ - 347, /* (289) cmd ::= SHOW COMPACTS */ - 347, /* (290) cmd ::= SHOW COMPACT NK_INTEGER */ - 408, /* (291) table_kind_db_name_cond_opt ::= */ - 408, /* (292) table_kind_db_name_cond_opt ::= table_kind */ - 408, /* (293) table_kind_db_name_cond_opt ::= db_name NK_DOT */ - 408, /* (294) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ - 414, /* (295) table_kind ::= NORMAL */ - 414, /* (296) table_kind ::= CHILD */ - 410, /* (297) db_name_cond_opt ::= */ - 410, /* (298) db_name_cond_opt ::= db_name NK_DOT */ - 409, /* (299) like_pattern_opt ::= */ - 409, /* (300) like_pattern_opt ::= LIKE NK_STRING */ - 411, /* (301) table_name_cond ::= table_name */ - 412, /* (302) from_db_opt ::= */ - 412, /* (303) from_db_opt ::= FROM db_name */ - 413, /* (304) tag_list_opt ::= */ - 413, /* (305) tag_list_opt ::= tag_item */ - 413, /* (306) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - 415, /* (307) tag_item ::= TBNAME */ - 415, /* (308) tag_item ::= QTAGS */ - 415, /* (309) tag_item ::= column_name */ - 415, /* (310) tag_item ::= column_name column_alias */ - 415, /* (311) tag_item ::= column_name AS column_alias */ - 407, /* (312) db_kind_opt ::= */ - 407, /* (313) db_kind_opt ::= USER */ - 407, /* (314) db_kind_opt ::= SYSTEM */ - 347, /* (315) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - 347, /* (316) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - 347, /* (317) cmd ::= DROP INDEX exists_opt full_index_name */ - 418, /* (318) full_index_name ::= index_name */ - 418, /* (319) full_index_name ::= db_name NK_DOT index_name */ - 417, /* (320) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - 417, /* (321) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ - 420, /* (322) func_list ::= func */ - 420, /* (323) func_list ::= func_list NK_COMMA func */ - 423, /* (324) func ::= sma_func_name NK_LP expression_list NK_RP */ - 424, /* (325) sma_func_name ::= function_name */ - 424, /* (326) sma_func_name ::= COUNT */ - 424, /* (327) sma_func_name ::= FIRST */ - 424, /* (328) sma_func_name ::= LAST */ - 424, /* (329) sma_func_name ::= LAST_ROW */ - 422, /* (330) sma_stream_opt ::= */ - 422, /* (331) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - 422, /* (332) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - 422, /* (333) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - 425, /* (334) with_meta ::= AS */ - 425, /* (335) with_meta ::= WITH META AS */ - 425, /* (336) with_meta ::= ONLY META AS */ - 347, /* (337) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - 347, /* (338) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - 347, /* (339) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - 347, /* (340) cmd ::= DROP TOPIC exists_opt topic_name */ - 347, /* (341) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - 347, /* (342) cmd ::= DESC full_table_name */ - 347, /* (343) cmd ::= DESCRIBE full_table_name */ - 347, /* (344) cmd ::= RESET QUERY CACHE */ - 347, /* (345) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - 347, /* (346) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - 429, /* (347) analyze_opt ::= */ - 429, /* (348) analyze_opt ::= ANALYZE */ - 430, /* (349) explain_options ::= */ - 430, /* (350) explain_options ::= explain_options VERBOSE NK_BOOL */ - 430, /* (351) explain_options ::= explain_options RATIO NK_FLOAT */ - 347, /* (352) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ - 347, /* (353) cmd ::= DROP FUNCTION exists_opt function_name */ - 433, /* (354) agg_func_opt ::= */ - 433, /* (355) agg_func_opt ::= AGGREGATE */ - 434, /* (356) bufsize_opt ::= */ - 434, /* (357) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 435, /* (358) language_opt ::= */ - 435, /* (359) language_opt ::= LANGUAGE NK_STRING */ - 432, /* (360) or_replace_opt ::= */ - 432, /* (361) or_replace_opt ::= OR REPLACE */ - 347, /* (362) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - 347, /* (363) cmd ::= DROP VIEW exists_opt full_view_name */ - 436, /* (364) full_view_name ::= view_name */ - 436, /* (365) full_view_name ::= db_name NK_DOT view_name */ - 347, /* (366) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ - 347, /* (367) cmd ::= DROP STREAM exists_opt stream_name */ - 347, /* (368) cmd ::= PAUSE STREAM exists_opt stream_name */ - 347, /* (369) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ - 440, /* (370) col_list_opt ::= */ - 440, /* (371) col_list_opt ::= NK_LP col_name_list NK_RP */ - 441, /* (372) tag_def_or_ref_opt ::= */ - 441, /* (373) tag_def_or_ref_opt ::= tags_def */ - 441, /* (374) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ - 439, /* (375) stream_options ::= */ - 439, /* (376) stream_options ::= stream_options TRIGGER AT_ONCE */ - 439, /* (377) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - 439, /* (378) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - 439, /* (379) stream_options ::= stream_options WATERMARK duration_literal */ - 439, /* (380) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - 439, /* (381) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - 439, /* (382) stream_options ::= stream_options DELETE_MARK duration_literal */ - 439, /* (383) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - 442, /* (384) subtable_opt ::= */ - 442, /* (385) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - 443, /* (386) ignore_opt ::= */ - 443, /* (387) ignore_opt ::= IGNORE UNTREATED */ - 347, /* (388) cmd ::= KILL CONNECTION NK_INTEGER */ - 347, /* (389) cmd ::= KILL QUERY NK_STRING */ - 347, /* (390) cmd ::= KILL TRANSACTION NK_INTEGER */ - 347, /* (391) cmd ::= KILL COMPACT NK_INTEGER */ - 347, /* (392) cmd ::= BALANCE VGROUP */ - 347, /* (393) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - 347, /* (394) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - 347, /* (395) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - 347, /* (396) cmd ::= SPLIT VGROUP NK_INTEGER */ - 445, /* (397) on_vgroup_id ::= */ - 445, /* (398) on_vgroup_id ::= ON NK_INTEGER */ - 446, /* (399) dnode_list ::= DNODE NK_INTEGER */ - 446, /* (400) dnode_list ::= dnode_list DNODE NK_INTEGER */ - 347, /* (401) cmd ::= DELETE FROM full_table_name where_clause_opt */ - 347, /* (402) cmd ::= query_or_subquery */ - 347, /* (403) cmd ::= insert_query */ - 431, /* (404) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - 431, /* (405) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - 350, /* (406) literal ::= NK_INTEGER */ - 350, /* (407) literal ::= NK_FLOAT */ - 350, /* (408) literal ::= NK_STRING */ - 350, /* (409) literal ::= NK_BOOL */ - 350, /* (410) literal ::= TIMESTAMP NK_STRING */ - 350, /* (411) literal ::= duration_literal */ - 350, /* (412) literal ::= NULL */ - 350, /* (413) literal ::= NK_QUESTION */ - 403, /* (414) duration_literal ::= NK_VARIABLE */ - 379, /* (415) signed ::= NK_INTEGER */ - 379, /* (416) signed ::= NK_PLUS NK_INTEGER */ - 379, /* (417) signed ::= NK_MINUS NK_INTEGER */ - 379, /* (418) signed ::= NK_FLOAT */ - 379, /* (419) signed ::= NK_PLUS NK_FLOAT */ - 379, /* (420) signed ::= NK_MINUS NK_FLOAT */ - 393, /* (421) signed_literal ::= signed */ - 393, /* (422) signed_literal ::= NK_STRING */ - 393, /* (423) signed_literal ::= NK_BOOL */ - 393, /* (424) signed_literal ::= TIMESTAMP NK_STRING */ - 393, /* (425) signed_literal ::= duration_literal */ - 393, /* (426) signed_literal ::= NULL */ - 393, /* (427) signed_literal ::= literal_func */ - 393, /* (428) signed_literal ::= NK_QUESTION */ - 448, /* (429) literal_list ::= signed_literal */ - 448, /* (430) literal_list ::= literal_list NK_COMMA signed_literal */ - 362, /* (431) db_name ::= NK_ID */ - 363, /* (432) table_name ::= NK_ID */ - 391, /* (433) column_name ::= NK_ID */ - 405, /* (434) function_name ::= NK_ID */ - 437, /* (435) view_name ::= NK_ID */ - 449, /* (436) table_alias ::= NK_ID */ - 416, /* (437) column_alias ::= NK_ID */ - 416, /* (438) column_alias ::= NK_ALIAS */ - 355, /* (439) user_name ::= NK_ID */ - 364, /* (440) topic_name ::= NK_ID */ - 438, /* (441) stream_name ::= NK_ID */ - 428, /* (442) cgroup_name ::= NK_ID */ - 419, /* (443) index_name ::= NK_ID */ - 450, /* (444) expr_or_subquery ::= expression */ - 444, /* (445) expression ::= literal */ - 444, /* (446) expression ::= pseudo_column */ - 444, /* (447) expression ::= column_reference */ - 444, /* (448) expression ::= function_expression */ - 444, /* (449) expression ::= case_when_expression */ - 444, /* (450) expression ::= NK_LP expression NK_RP */ - 444, /* (451) expression ::= NK_PLUS expr_or_subquery */ - 444, /* (452) expression ::= NK_MINUS expr_or_subquery */ - 444, /* (453) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - 444, /* (454) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - 444, /* (455) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - 444, /* (456) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - 444, /* (457) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - 444, /* (458) expression ::= column_reference NK_ARROW NK_STRING */ - 444, /* (459) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - 444, /* (460) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - 396, /* (461) expression_list ::= expr_or_subquery */ - 396, /* (462) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - 452, /* (463) column_reference ::= column_name */ - 452, /* (464) column_reference ::= table_name NK_DOT column_name */ - 452, /* (465) column_reference ::= NK_ALIAS */ - 452, /* (466) column_reference ::= table_name NK_DOT NK_ALIAS */ - 451, /* (467) pseudo_column ::= ROWTS */ - 451, /* (468) pseudo_column ::= TBNAME */ - 451, /* (469) pseudo_column ::= table_name NK_DOT TBNAME */ - 451, /* (470) pseudo_column ::= QSTART */ - 451, /* (471) pseudo_column ::= QEND */ - 451, /* (472) pseudo_column ::= QDURATION */ - 451, /* (473) pseudo_column ::= WSTART */ - 451, /* (474) pseudo_column ::= WEND */ - 451, /* (475) pseudo_column ::= WDURATION */ - 451, /* (476) pseudo_column ::= IROWTS */ - 451, /* (477) pseudo_column ::= ISFILLED */ - 451, /* (478) pseudo_column ::= QTAGS */ - 453, /* (479) function_expression ::= function_name NK_LP expression_list NK_RP */ - 453, /* (480) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - 453, /* (481) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - 453, /* (482) function_expression ::= literal_func */ - 447, /* (483) literal_func ::= noarg_func NK_LP NK_RP */ - 447, /* (484) literal_func ::= NOW */ - 457, /* (485) noarg_func ::= NOW */ - 457, /* (486) noarg_func ::= TODAY */ - 457, /* (487) noarg_func ::= TIMEZONE */ - 457, /* (488) noarg_func ::= DATABASE */ - 457, /* (489) noarg_func ::= CLIENT_VERSION */ - 457, /* (490) noarg_func ::= SERVER_VERSION */ - 457, /* (491) noarg_func ::= SERVER_STATUS */ - 457, /* (492) noarg_func ::= CURRENT_USER */ - 457, /* (493) noarg_func ::= USER */ - 455, /* (494) star_func ::= COUNT */ - 455, /* (495) star_func ::= FIRST */ - 455, /* (496) star_func ::= LAST */ - 455, /* (497) star_func ::= LAST_ROW */ - 456, /* (498) star_func_para_list ::= NK_STAR */ - 456, /* (499) star_func_para_list ::= other_para_list */ - 458, /* (500) other_para_list ::= star_func_para */ - 458, /* (501) other_para_list ::= other_para_list NK_COMMA star_func_para */ - 459, /* (502) star_func_para ::= expr_or_subquery */ - 459, /* (503) star_func_para ::= table_name NK_DOT NK_STAR */ - 454, /* (504) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - 454, /* (505) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - 460, /* (506) when_then_list ::= when_then_expr */ - 460, /* (507) when_then_list ::= when_then_list when_then_expr */ - 463, /* (508) when_then_expr ::= WHEN common_expression THEN common_expression */ - 461, /* (509) case_when_else_opt ::= */ - 461, /* (510) case_when_else_opt ::= ELSE common_expression */ - 464, /* (511) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - 464, /* (512) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - 464, /* (513) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - 464, /* (514) predicate ::= expr_or_subquery IS NULL */ - 464, /* (515) predicate ::= expr_or_subquery IS NOT NULL */ - 464, /* (516) predicate ::= expr_or_subquery in_op in_predicate_value */ - 465, /* (517) compare_op ::= NK_LT */ - 465, /* (518) compare_op ::= NK_GT */ - 465, /* (519) compare_op ::= NK_LE */ - 465, /* (520) compare_op ::= NK_GE */ - 465, /* (521) compare_op ::= NK_NE */ - 465, /* (522) compare_op ::= NK_EQ */ - 465, /* (523) compare_op ::= LIKE */ - 465, /* (524) compare_op ::= NOT LIKE */ - 465, /* (525) compare_op ::= MATCH */ - 465, /* (526) compare_op ::= NMATCH */ - 465, /* (527) compare_op ::= CONTAINS */ - 466, /* (528) in_op ::= IN */ - 466, /* (529) in_op ::= NOT IN */ - 467, /* (530) in_predicate_value ::= NK_LP literal_list NK_RP */ - 468, /* (531) boolean_value_expression ::= boolean_primary */ - 468, /* (532) boolean_value_expression ::= NOT boolean_primary */ - 468, /* (533) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - 468, /* (534) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - 469, /* (535) boolean_primary ::= predicate */ - 469, /* (536) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - 462, /* (537) common_expression ::= expr_or_subquery */ - 462, /* (538) common_expression ::= boolean_value_expression */ - 470, /* (539) from_clause_opt ::= */ - 470, /* (540) from_clause_opt ::= FROM table_reference_list */ - 471, /* (541) table_reference_list ::= table_reference */ - 471, /* (542) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - 472, /* (543) table_reference ::= table_primary */ - 472, /* (544) table_reference ::= joined_table */ - 473, /* (545) table_primary ::= table_name alias_opt */ - 473, /* (546) table_primary ::= db_name NK_DOT table_name alias_opt */ - 473, /* (547) table_primary ::= subquery alias_opt */ - 473, /* (548) table_primary ::= parenthesized_joined_table */ - 475, /* (549) alias_opt ::= */ - 475, /* (550) alias_opt ::= table_alias */ - 475, /* (551) alias_opt ::= AS table_alias */ - 477, /* (552) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - 477, /* (553) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - 474, /* (554) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - 478, /* (555) join_type ::= */ - 478, /* (556) join_type ::= INNER */ - 479, /* (557) query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ - 480, /* (558) hint_list ::= */ - 480, /* (559) hint_list ::= NK_HINT */ - 482, /* (560) tag_mode_opt ::= */ - 482, /* (561) tag_mode_opt ::= TAGS */ - 481, /* (562) set_quantifier_opt ::= */ - 481, /* (563) set_quantifier_opt ::= DISTINCT */ - 481, /* (564) set_quantifier_opt ::= ALL */ - 483, /* (565) select_list ::= select_item */ - 483, /* (566) select_list ::= select_list NK_COMMA select_item */ - 491, /* (567) select_item ::= NK_STAR */ - 491, /* (568) select_item ::= common_expression */ - 491, /* (569) select_item ::= common_expression column_alias */ - 491, /* (570) select_item ::= common_expression AS column_alias */ - 491, /* (571) select_item ::= table_name NK_DOT NK_STAR */ - 427, /* (572) where_clause_opt ::= */ - 427, /* (573) where_clause_opt ::= WHERE search_condition */ - 484, /* (574) partition_by_clause_opt ::= */ - 484, /* (575) partition_by_clause_opt ::= PARTITION BY partition_list */ - 492, /* (576) partition_list ::= partition_item */ - 492, /* (577) partition_list ::= partition_list NK_COMMA partition_item */ - 493, /* (578) partition_item ::= expr_or_subquery */ - 493, /* (579) partition_item ::= expr_or_subquery column_alias */ - 493, /* (580) partition_item ::= expr_or_subquery AS column_alias */ - 488, /* (581) twindow_clause_opt ::= */ - 488, /* (582) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - 488, /* (583) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - 488, /* (584) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 488, /* (585) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 488, /* (586) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - 421, /* (587) sliding_opt ::= */ - 421, /* (588) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - 494, /* (589) interval_sliding_duration_literal ::= NK_VARIABLE */ - 494, /* (590) interval_sliding_duration_literal ::= NK_STRING */ - 494, /* (591) interval_sliding_duration_literal ::= NK_INTEGER */ - 487, /* (592) fill_opt ::= */ - 487, /* (593) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - 487, /* (594) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - 487, /* (595) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - 495, /* (596) fill_mode ::= NONE */ - 495, /* (597) fill_mode ::= PREV */ - 495, /* (598) fill_mode ::= NULL */ - 495, /* (599) fill_mode ::= NULL_F */ - 495, /* (600) fill_mode ::= LINEAR */ - 495, /* (601) fill_mode ::= NEXT */ - 489, /* (602) group_by_clause_opt ::= */ - 489, /* (603) group_by_clause_opt ::= GROUP BY group_by_list */ - 496, /* (604) group_by_list ::= expr_or_subquery */ - 496, /* (605) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 490, /* (606) having_clause_opt ::= */ - 490, /* (607) having_clause_opt ::= HAVING search_condition */ - 485, /* (608) range_opt ::= */ - 485, /* (609) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - 485, /* (610) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 486, /* (611) every_opt ::= */ - 486, /* (612) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - 497, /* (613) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - 498, /* (614) query_simple ::= query_specification */ - 498, /* (615) query_simple ::= union_query_expression */ - 502, /* (616) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - 502, /* (617) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - 503, /* (618) query_simple_or_subquery ::= query_simple */ - 503, /* (619) query_simple_or_subquery ::= subquery */ - 426, /* (620) query_or_subquery ::= query_expression */ - 426, /* (621) query_or_subquery ::= subquery */ - 499, /* (622) order_by_clause_opt ::= */ - 499, /* (623) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 500, /* (624) slimit_clause_opt ::= */ - 500, /* (625) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - 500, /* (626) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - 500, /* (627) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 501, /* (628) limit_clause_opt ::= */ - 501, /* (629) limit_clause_opt ::= LIMIT NK_INTEGER */ - 501, /* (630) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - 501, /* (631) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 476, /* (632) subquery ::= NK_LP query_expression NK_RP */ - 476, /* (633) subquery ::= NK_LP subquery NK_RP */ - 365, /* (634) search_condition ::= common_expression */ - 504, /* (635) sort_specification_list ::= sort_specification */ - 504, /* (636) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - 505, /* (637) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 506, /* (638) ordering_specification_opt ::= */ - 506, /* (639) ordering_specification_opt ::= ASC */ - 506, /* (640) ordering_specification_opt ::= DESC */ - 507, /* (641) null_ordering_opt ::= */ - 507, /* (642) null_ordering_opt ::= NULLS FIRST */ - 507, /* (643) null_ordering_opt ::= NULLS LAST */ + 349, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + 349, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + 350, /* (2) account_options ::= */ + 350, /* (3) account_options ::= account_options PPS literal */ + 350, /* (4) account_options ::= account_options TSERIES literal */ + 350, /* (5) account_options ::= account_options STORAGE literal */ + 350, /* (6) account_options ::= account_options STREAMS literal */ + 350, /* (7) account_options ::= account_options QTIME literal */ + 350, /* (8) account_options ::= account_options DBS literal */ + 350, /* (9) account_options ::= account_options USERS literal */ + 350, /* (10) account_options ::= account_options CONNS literal */ + 350, /* (11) account_options ::= account_options STATE literal */ + 351, /* (12) alter_account_options ::= alter_account_option */ + 351, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + 353, /* (14) alter_account_option ::= PASS literal */ + 353, /* (15) alter_account_option ::= PPS literal */ + 353, /* (16) alter_account_option ::= TSERIES literal */ + 353, /* (17) alter_account_option ::= STORAGE literal */ + 353, /* (18) alter_account_option ::= STREAMS literal */ + 353, /* (19) alter_account_option ::= QTIME literal */ + 353, /* (20) alter_account_option ::= DBS literal */ + 353, /* (21) alter_account_option ::= USERS literal */ + 353, /* (22) alter_account_option ::= CONNS literal */ + 353, /* (23) alter_account_option ::= STATE literal */ + 354, /* (24) ip_range_list ::= NK_STRING */ + 354, /* (25) ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ + 355, /* (26) white_list ::= HOST ip_range_list */ + 356, /* (27) white_list_opt ::= */ + 356, /* (28) white_list_opt ::= white_list */ + 349, /* (29) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ + 349, /* (30) cmd ::= ALTER USER user_name PASS NK_STRING */ + 349, /* (31) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ + 349, /* (32) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ + 349, /* (33) cmd ::= ALTER USER user_name ADD white_list */ + 349, /* (34) cmd ::= ALTER USER user_name DROP white_list */ + 349, /* (35) cmd ::= DROP USER user_name */ + 358, /* (36) sysinfo_opt ::= */ + 358, /* (37) sysinfo_opt ::= SYSINFO NK_INTEGER */ + 349, /* (38) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ + 349, /* (39) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ + 359, /* (40) privileges ::= ALL */ + 359, /* (41) privileges ::= priv_type_list */ + 359, /* (42) privileges ::= SUBSCRIBE */ + 362, /* (43) priv_type_list ::= priv_type */ + 362, /* (44) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + 363, /* (45) priv_type ::= READ */ + 363, /* (46) priv_type ::= WRITE */ + 363, /* (47) priv_type ::= ALTER */ + 360, /* (48) priv_level ::= NK_STAR NK_DOT NK_STAR */ + 360, /* (49) priv_level ::= db_name NK_DOT NK_STAR */ + 360, /* (50) priv_level ::= db_name NK_DOT table_name */ + 360, /* (51) priv_level ::= topic_name */ + 361, /* (52) with_opt ::= */ + 361, /* (53) with_opt ::= WITH search_condition */ + 349, /* (54) cmd ::= CREATE DNODE dnode_endpoint */ + 349, /* (55) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + 349, /* (56) cmd ::= DROP DNODE NK_INTEGER force_opt */ + 349, /* (57) cmd ::= DROP DNODE dnode_endpoint force_opt */ + 349, /* (58) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ + 349, /* (59) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ + 349, /* (60) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + 349, /* (61) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + 349, /* (62) cmd ::= ALTER ALL DNODES NK_STRING */ + 349, /* (63) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + 349, /* (64) cmd ::= RESTORE DNODE NK_INTEGER */ + 368, /* (65) dnode_endpoint ::= NK_STRING */ + 368, /* (66) dnode_endpoint ::= NK_ID */ + 368, /* (67) dnode_endpoint ::= NK_IPTOKEN */ + 369, /* (68) force_opt ::= */ + 369, /* (69) force_opt ::= FORCE */ + 370, /* (70) unsafe_opt ::= UNSAFE */ + 349, /* (71) cmd ::= ALTER CLUSTER NK_STRING */ + 349, /* (72) cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ + 349, /* (73) cmd ::= ALTER LOCAL NK_STRING */ + 349, /* (74) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + 349, /* (75) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + 349, /* (76) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + 349, /* (77) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ + 349, /* (78) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + 349, /* (79) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + 349, /* (80) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + 349, /* (81) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + 349, /* (82) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + 349, /* (83) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + 349, /* (84) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ + 349, /* (85) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ + 349, /* (86) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + 349, /* (87) cmd ::= DROP DATABASE exists_opt db_name */ + 349, /* (88) cmd ::= USE db_name */ + 349, /* (89) cmd ::= ALTER DATABASE db_name alter_db_options */ + 349, /* (90) cmd ::= FLUSH DATABASE db_name */ + 349, /* (91) cmd ::= TRIM DATABASE db_name speed_opt */ + 349, /* (92) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ + 371, /* (93) not_exists_opt ::= IF NOT EXISTS */ + 371, /* (94) not_exists_opt ::= */ + 373, /* (95) exists_opt ::= IF EXISTS */ + 373, /* (96) exists_opt ::= */ + 372, /* (97) db_options ::= */ + 372, /* (98) db_options ::= db_options BUFFER NK_INTEGER */ + 372, /* (99) db_options ::= db_options CACHEMODEL NK_STRING */ + 372, /* (100) db_options ::= db_options CACHESIZE NK_INTEGER */ + 372, /* (101) db_options ::= db_options COMP NK_INTEGER */ + 372, /* (102) db_options ::= db_options DURATION NK_INTEGER */ + 372, /* (103) db_options ::= db_options DURATION NK_VARIABLE */ + 372, /* (104) db_options ::= db_options MAXROWS NK_INTEGER */ + 372, /* (105) db_options ::= db_options MINROWS NK_INTEGER */ + 372, /* (106) db_options ::= db_options KEEP integer_list */ + 372, /* (107) db_options ::= db_options KEEP variable_list */ + 372, /* (108) db_options ::= db_options PAGES NK_INTEGER */ + 372, /* (109) db_options ::= db_options PAGESIZE NK_INTEGER */ + 372, /* (110) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + 372, /* (111) db_options ::= db_options PRECISION NK_STRING */ + 372, /* (112) db_options ::= db_options REPLICA NK_INTEGER */ + 372, /* (113) db_options ::= db_options VGROUPS NK_INTEGER */ + 372, /* (114) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + 372, /* (115) db_options ::= db_options RETENTIONS retention_list */ + 372, /* (116) db_options ::= db_options SCHEMALESS NK_INTEGER */ + 372, /* (117) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + 372, /* (118) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + 372, /* (119) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + 372, /* (120) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 372, /* (121) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + 372, /* (122) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 372, /* (123) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + 372, /* (124) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + 372, /* (125) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + 372, /* (126) db_options ::= db_options TABLE_PREFIX signed */ + 372, /* (127) db_options ::= db_options TABLE_SUFFIX signed */ + 372, /* (128) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ + 374, /* (129) alter_db_options ::= alter_db_option */ + 374, /* (130) alter_db_options ::= alter_db_options alter_db_option */ + 382, /* (131) alter_db_option ::= BUFFER NK_INTEGER */ + 382, /* (132) alter_db_option ::= CACHEMODEL NK_STRING */ + 382, /* (133) alter_db_option ::= CACHESIZE NK_INTEGER */ + 382, /* (134) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + 382, /* (135) alter_db_option ::= KEEP integer_list */ + 382, /* (136) alter_db_option ::= KEEP variable_list */ + 382, /* (137) alter_db_option ::= PAGES NK_INTEGER */ + 382, /* (138) alter_db_option ::= REPLICA NK_INTEGER */ + 382, /* (139) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + 382, /* (140) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + 382, /* (141) alter_db_option ::= MINROWS NK_INTEGER */ + 382, /* (142) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ + 382, /* (143) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 382, /* (144) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ + 382, /* (145) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 382, /* (146) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ + 378, /* (147) integer_list ::= NK_INTEGER */ + 378, /* (148) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + 379, /* (149) variable_list ::= NK_VARIABLE */ + 379, /* (150) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + 380, /* (151) retention_list ::= retention */ + 380, /* (152) retention_list ::= retention_list NK_COMMA retention */ + 383, /* (153) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + 383, /* (154) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ + 375, /* (155) speed_opt ::= */ + 375, /* (156) speed_opt ::= BWLIMIT NK_INTEGER */ + 376, /* (157) start_opt ::= */ + 376, /* (158) start_opt ::= START WITH NK_INTEGER */ + 376, /* (159) start_opt ::= START WITH NK_STRING */ + 376, /* (160) start_opt ::= START WITH TIMESTAMP NK_STRING */ + 377, /* (161) end_opt ::= */ + 377, /* (162) end_opt ::= END WITH NK_INTEGER */ + 377, /* (163) end_opt ::= END WITH NK_STRING */ + 377, /* (164) end_opt ::= END WITH TIMESTAMP NK_STRING */ + 349, /* (165) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + 349, /* (166) cmd ::= CREATE TABLE multi_create_clause */ + 349, /* (167) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + 349, /* (168) cmd ::= DROP TABLE multi_drop_clause */ + 349, /* (169) cmd ::= DROP STABLE exists_opt full_table_name */ + 349, /* (170) cmd ::= ALTER TABLE alter_table_clause */ + 349, /* (171) cmd ::= ALTER STABLE alter_table_clause */ + 391, /* (172) alter_table_clause ::= full_table_name alter_table_options */ + 391, /* (173) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + 391, /* (174) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + 391, /* (175) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + 391, /* (176) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + 391, /* (177) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + 391, /* (178) alter_table_clause ::= full_table_name DROP TAG column_name */ + 391, /* (179) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + 391, /* (180) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + 391, /* (181) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + 388, /* (182) multi_create_clause ::= create_subtable_clause */ + 388, /* (183) multi_create_clause ::= multi_create_clause create_subtable_clause */ + 396, /* (184) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ + 390, /* (185) multi_drop_clause ::= drop_table_clause */ + 390, /* (186) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ + 399, /* (187) drop_table_clause ::= exists_opt full_table_name */ + 397, /* (188) specific_cols_opt ::= */ + 397, /* (189) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + 384, /* (190) full_table_name ::= table_name */ + 384, /* (191) full_table_name ::= db_name NK_DOT table_name */ + 385, /* (192) column_def_list ::= column_def */ + 385, /* (193) column_def_list ::= column_def_list NK_COMMA column_def */ + 401, /* (194) column_def ::= column_name type_name */ + 394, /* (195) type_name ::= BOOL */ + 394, /* (196) type_name ::= TINYINT */ + 394, /* (197) type_name ::= SMALLINT */ + 394, /* (198) type_name ::= INT */ + 394, /* (199) type_name ::= INTEGER */ + 394, /* (200) type_name ::= BIGINT */ + 394, /* (201) type_name ::= FLOAT */ + 394, /* (202) type_name ::= DOUBLE */ + 394, /* (203) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + 394, /* (204) type_name ::= TIMESTAMP */ + 394, /* (205) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + 394, /* (206) type_name ::= TINYINT UNSIGNED */ + 394, /* (207) type_name ::= SMALLINT UNSIGNED */ + 394, /* (208) type_name ::= INT UNSIGNED */ + 394, /* (209) type_name ::= BIGINT UNSIGNED */ + 394, /* (210) type_name ::= JSON */ + 394, /* (211) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + 394, /* (212) type_name ::= MEDIUMBLOB */ + 394, /* (213) type_name ::= BLOB */ + 394, /* (214) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + 394, /* (215) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + 394, /* (216) type_name ::= DECIMAL */ + 394, /* (217) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + 394, /* (218) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 386, /* (219) tags_def_opt ::= */ + 386, /* (220) tags_def_opt ::= tags_def */ + 389, /* (221) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + 387, /* (222) table_options ::= */ + 387, /* (223) table_options ::= table_options COMMENT NK_STRING */ + 387, /* (224) table_options ::= table_options MAX_DELAY duration_list */ + 387, /* (225) table_options ::= table_options WATERMARK duration_list */ + 387, /* (226) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + 387, /* (227) table_options ::= table_options TTL NK_INTEGER */ + 387, /* (228) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + 387, /* (229) table_options ::= table_options DELETE_MARK duration_list */ + 392, /* (230) alter_table_options ::= alter_table_option */ + 392, /* (231) alter_table_options ::= alter_table_options alter_table_option */ + 404, /* (232) alter_table_option ::= COMMENT NK_STRING */ + 404, /* (233) alter_table_option ::= TTL NK_INTEGER */ + 402, /* (234) duration_list ::= duration_literal */ + 402, /* (235) duration_list ::= duration_list NK_COMMA duration_literal */ + 403, /* (236) rollup_func_list ::= rollup_func_name */ + 403, /* (237) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + 406, /* (238) rollup_func_name ::= function_name */ + 406, /* (239) rollup_func_name ::= FIRST */ + 406, /* (240) rollup_func_name ::= LAST */ + 400, /* (241) col_name_list ::= col_name */ + 400, /* (242) col_name_list ::= col_name_list NK_COMMA col_name */ + 408, /* (243) col_name ::= column_name */ + 349, /* (244) cmd ::= SHOW DNODES */ + 349, /* (245) cmd ::= SHOW USERS */ + 349, /* (246) cmd ::= SHOW USER PRIVILEGES */ + 349, /* (247) cmd ::= SHOW db_kind_opt DATABASES */ + 349, /* (248) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + 349, /* (249) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + 349, /* (250) cmd ::= SHOW db_name_cond_opt VGROUPS */ + 349, /* (251) cmd ::= SHOW MNODES */ + 349, /* (252) cmd ::= SHOW QNODES */ + 349, /* (253) cmd ::= SHOW FUNCTIONS */ + 349, /* (254) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + 349, /* (255) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ + 349, /* (256) cmd ::= SHOW STREAMS */ + 349, /* (257) cmd ::= SHOW ACCOUNTS */ + 349, /* (258) cmd ::= SHOW APPS */ + 349, /* (259) cmd ::= SHOW CONNECTIONS */ + 349, /* (260) cmd ::= SHOW LICENCES */ + 349, /* (261) cmd ::= SHOW GRANTS */ + 349, /* (262) cmd ::= SHOW GRANTS FULL */ + 349, /* (263) cmd ::= SHOW GRANTS LOG */ + 349, /* (264) cmd ::= SHOW CREATE DATABASE db_name */ + 349, /* (265) cmd ::= SHOW CREATE TABLE full_table_name */ + 349, /* (266) cmd ::= SHOW CREATE STABLE full_table_name */ + 349, /* (267) cmd ::= SHOW QUERIES */ + 349, /* (268) cmd ::= SHOW SCORES */ + 349, /* (269) cmd ::= SHOW TOPICS */ + 349, /* (270) cmd ::= SHOW VARIABLES */ + 349, /* (271) cmd ::= SHOW CLUSTER VARIABLES */ + 349, /* (272) cmd ::= SHOW LOCAL VARIABLES */ + 349, /* (273) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + 349, /* (274) cmd ::= SHOW BNODES */ + 349, /* (275) cmd ::= SHOW SNODES */ + 349, /* (276) cmd ::= SHOW CLUSTER */ + 349, /* (277) cmd ::= SHOW TRANSACTIONS */ + 349, /* (278) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + 349, /* (279) cmd ::= SHOW CONSUMERS */ + 349, /* (280) cmd ::= SHOW SUBSCRIPTIONS */ + 349, /* (281) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + 349, /* (282) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + 349, /* (283) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + 349, /* (284) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + 349, /* (285) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + 349, /* (286) cmd ::= SHOW VNODES */ + 349, /* (287) cmd ::= SHOW db_name_cond_opt ALIVE */ + 349, /* (288) cmd ::= SHOW CLUSTER ALIVE */ + 349, /* (289) cmd ::= SHOW db_name_cond_opt VIEWS */ + 349, /* (290) cmd ::= SHOW CREATE VIEW full_table_name */ + 349, /* (291) cmd ::= SHOW COMPACTS */ + 349, /* (292) cmd ::= SHOW COMPACT NK_INTEGER */ + 410, /* (293) table_kind_db_name_cond_opt ::= */ + 410, /* (294) table_kind_db_name_cond_opt ::= table_kind */ + 410, /* (295) table_kind_db_name_cond_opt ::= db_name NK_DOT */ + 410, /* (296) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + 416, /* (297) table_kind ::= NORMAL */ + 416, /* (298) table_kind ::= CHILD */ + 412, /* (299) db_name_cond_opt ::= */ + 412, /* (300) db_name_cond_opt ::= db_name NK_DOT */ + 411, /* (301) like_pattern_opt ::= */ + 411, /* (302) like_pattern_opt ::= LIKE NK_STRING */ + 413, /* (303) table_name_cond ::= table_name */ + 414, /* (304) from_db_opt ::= */ + 414, /* (305) from_db_opt ::= FROM db_name */ + 415, /* (306) tag_list_opt ::= */ + 415, /* (307) tag_list_opt ::= tag_item */ + 415, /* (308) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + 417, /* (309) tag_item ::= TBNAME */ + 417, /* (310) tag_item ::= QTAGS */ + 417, /* (311) tag_item ::= column_name */ + 417, /* (312) tag_item ::= column_name column_alias */ + 417, /* (313) tag_item ::= column_name AS column_alias */ + 409, /* (314) db_kind_opt ::= */ + 409, /* (315) db_kind_opt ::= USER */ + 409, /* (316) db_kind_opt ::= SYSTEM */ + 349, /* (317) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + 349, /* (318) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + 349, /* (319) cmd ::= DROP INDEX exists_opt full_index_name */ + 420, /* (320) full_index_name ::= index_name */ + 420, /* (321) full_index_name ::= db_name NK_DOT index_name */ + 419, /* (322) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + 419, /* (323) 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 */ + 422, /* (324) func_list ::= func */ + 422, /* (325) func_list ::= func_list NK_COMMA func */ + 425, /* (326) func ::= sma_func_name NK_LP expression_list NK_RP */ + 426, /* (327) sma_func_name ::= function_name */ + 426, /* (328) sma_func_name ::= COUNT */ + 426, /* (329) sma_func_name ::= FIRST */ + 426, /* (330) sma_func_name ::= LAST */ + 426, /* (331) sma_func_name ::= LAST_ROW */ + 424, /* (332) sma_stream_opt ::= */ + 424, /* (333) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + 424, /* (334) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + 424, /* (335) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + 427, /* (336) with_meta ::= AS */ + 427, /* (337) with_meta ::= WITH META AS */ + 427, /* (338) with_meta ::= ONLY META AS */ + 349, /* (339) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + 349, /* (340) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + 349, /* (341) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + 349, /* (342) cmd ::= DROP TOPIC exists_opt topic_name */ + 349, /* (343) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + 349, /* (344) cmd ::= DESC full_table_name */ + 349, /* (345) cmd ::= DESCRIBE full_table_name */ + 349, /* (346) cmd ::= RESET QUERY CACHE */ + 349, /* (347) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + 349, /* (348) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + 431, /* (349) analyze_opt ::= */ + 431, /* (350) analyze_opt ::= ANALYZE */ + 432, /* (351) explain_options ::= */ + 432, /* (352) explain_options ::= explain_options VERBOSE NK_BOOL */ + 432, /* (353) explain_options ::= explain_options RATIO NK_FLOAT */ + 349, /* (354) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ + 349, /* (355) cmd ::= DROP FUNCTION exists_opt function_name */ + 435, /* (356) agg_func_opt ::= */ + 435, /* (357) agg_func_opt ::= AGGREGATE */ + 436, /* (358) bufsize_opt ::= */ + 436, /* (359) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 437, /* (360) language_opt ::= */ + 437, /* (361) language_opt ::= LANGUAGE NK_STRING */ + 434, /* (362) or_replace_opt ::= */ + 434, /* (363) or_replace_opt ::= OR REPLACE */ + 349, /* (364) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + 349, /* (365) cmd ::= DROP VIEW exists_opt full_view_name */ + 438, /* (366) full_view_name ::= view_name */ + 438, /* (367) full_view_name ::= db_name NK_DOT view_name */ + 349, /* (368) 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 */ + 349, /* (369) cmd ::= DROP STREAM exists_opt stream_name */ + 349, /* (370) cmd ::= PAUSE STREAM exists_opt stream_name */ + 349, /* (371) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + 442, /* (372) col_list_opt ::= */ + 442, /* (373) col_list_opt ::= NK_LP col_name_list NK_RP */ + 443, /* (374) tag_def_or_ref_opt ::= */ + 443, /* (375) tag_def_or_ref_opt ::= tags_def */ + 443, /* (376) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ + 441, /* (377) stream_options ::= */ + 441, /* (378) stream_options ::= stream_options TRIGGER AT_ONCE */ + 441, /* (379) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + 441, /* (380) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + 441, /* (381) stream_options ::= stream_options WATERMARK duration_literal */ + 441, /* (382) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + 441, /* (383) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + 441, /* (384) stream_options ::= stream_options DELETE_MARK duration_literal */ + 441, /* (385) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + 444, /* (386) subtable_opt ::= */ + 444, /* (387) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + 445, /* (388) ignore_opt ::= */ + 445, /* (389) ignore_opt ::= IGNORE UNTREATED */ + 349, /* (390) cmd ::= KILL CONNECTION NK_INTEGER */ + 349, /* (391) cmd ::= KILL QUERY NK_STRING */ + 349, /* (392) cmd ::= KILL TRANSACTION NK_INTEGER */ + 349, /* (393) cmd ::= KILL COMPACT NK_INTEGER */ + 349, /* (394) cmd ::= BALANCE VGROUP */ + 349, /* (395) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + 349, /* (396) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + 349, /* (397) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + 349, /* (398) cmd ::= SPLIT VGROUP NK_INTEGER */ + 447, /* (399) on_vgroup_id ::= */ + 447, /* (400) on_vgroup_id ::= ON NK_INTEGER */ + 448, /* (401) dnode_list ::= DNODE NK_INTEGER */ + 448, /* (402) dnode_list ::= dnode_list DNODE NK_INTEGER */ + 349, /* (403) cmd ::= DELETE FROM full_table_name where_clause_opt */ + 349, /* (404) cmd ::= query_or_subquery */ + 349, /* (405) cmd ::= insert_query */ + 433, /* (406) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + 433, /* (407) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + 352, /* (408) literal ::= NK_INTEGER */ + 352, /* (409) literal ::= NK_FLOAT */ + 352, /* (410) literal ::= NK_STRING */ + 352, /* (411) literal ::= NK_BOOL */ + 352, /* (412) literal ::= TIMESTAMP NK_STRING */ + 352, /* (413) literal ::= duration_literal */ + 352, /* (414) literal ::= NULL */ + 352, /* (415) literal ::= NK_QUESTION */ + 405, /* (416) duration_literal ::= NK_VARIABLE */ + 381, /* (417) signed ::= NK_INTEGER */ + 381, /* (418) signed ::= NK_PLUS NK_INTEGER */ + 381, /* (419) signed ::= NK_MINUS NK_INTEGER */ + 381, /* (420) signed ::= NK_FLOAT */ + 381, /* (421) signed ::= NK_PLUS NK_FLOAT */ + 381, /* (422) signed ::= NK_MINUS NK_FLOAT */ + 395, /* (423) signed_literal ::= signed */ + 395, /* (424) signed_literal ::= NK_STRING */ + 395, /* (425) signed_literal ::= NK_BOOL */ + 395, /* (426) signed_literal ::= TIMESTAMP NK_STRING */ + 395, /* (427) signed_literal ::= duration_literal */ + 395, /* (428) signed_literal ::= NULL */ + 395, /* (429) signed_literal ::= literal_func */ + 395, /* (430) signed_literal ::= NK_QUESTION */ + 450, /* (431) literal_list ::= signed_literal */ + 450, /* (432) literal_list ::= literal_list NK_COMMA signed_literal */ + 364, /* (433) db_name ::= NK_ID */ + 365, /* (434) table_name ::= NK_ID */ + 393, /* (435) column_name ::= NK_ID */ + 407, /* (436) function_name ::= NK_ID */ + 439, /* (437) view_name ::= NK_ID */ + 451, /* (438) table_alias ::= NK_ID */ + 418, /* (439) column_alias ::= NK_ID */ + 418, /* (440) column_alias ::= NK_ALIAS */ + 357, /* (441) user_name ::= NK_ID */ + 366, /* (442) topic_name ::= NK_ID */ + 440, /* (443) stream_name ::= NK_ID */ + 430, /* (444) cgroup_name ::= NK_ID */ + 421, /* (445) index_name ::= NK_ID */ + 452, /* (446) expr_or_subquery ::= expression */ + 446, /* (447) expression ::= literal */ + 446, /* (448) expression ::= pseudo_column */ + 446, /* (449) expression ::= column_reference */ + 446, /* (450) expression ::= function_expression */ + 446, /* (451) expression ::= case_when_expression */ + 446, /* (452) expression ::= NK_LP expression NK_RP */ + 446, /* (453) expression ::= NK_PLUS expr_or_subquery */ + 446, /* (454) expression ::= NK_MINUS expr_or_subquery */ + 446, /* (455) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + 446, /* (456) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + 446, /* (457) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + 446, /* (458) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + 446, /* (459) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + 446, /* (460) expression ::= column_reference NK_ARROW NK_STRING */ + 446, /* (461) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + 446, /* (462) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + 398, /* (463) expression_list ::= expr_or_subquery */ + 398, /* (464) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + 454, /* (465) column_reference ::= column_name */ + 454, /* (466) column_reference ::= table_name NK_DOT column_name */ + 454, /* (467) column_reference ::= NK_ALIAS */ + 454, /* (468) column_reference ::= table_name NK_DOT NK_ALIAS */ + 453, /* (469) pseudo_column ::= ROWTS */ + 453, /* (470) pseudo_column ::= TBNAME */ + 453, /* (471) pseudo_column ::= table_name NK_DOT TBNAME */ + 453, /* (472) pseudo_column ::= QSTART */ + 453, /* (473) pseudo_column ::= QEND */ + 453, /* (474) pseudo_column ::= QDURATION */ + 453, /* (475) pseudo_column ::= WSTART */ + 453, /* (476) pseudo_column ::= WEND */ + 453, /* (477) pseudo_column ::= WDURATION */ + 453, /* (478) pseudo_column ::= IROWTS */ + 453, /* (479) pseudo_column ::= ISFILLED */ + 453, /* (480) pseudo_column ::= QTAGS */ + 455, /* (481) function_expression ::= function_name NK_LP expression_list NK_RP */ + 455, /* (482) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + 455, /* (483) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + 455, /* (484) function_expression ::= literal_func */ + 449, /* (485) literal_func ::= noarg_func NK_LP NK_RP */ + 449, /* (486) literal_func ::= NOW */ + 459, /* (487) noarg_func ::= NOW */ + 459, /* (488) noarg_func ::= TODAY */ + 459, /* (489) noarg_func ::= TIMEZONE */ + 459, /* (490) noarg_func ::= DATABASE */ + 459, /* (491) noarg_func ::= CLIENT_VERSION */ + 459, /* (492) noarg_func ::= SERVER_VERSION */ + 459, /* (493) noarg_func ::= SERVER_STATUS */ + 459, /* (494) noarg_func ::= CURRENT_USER */ + 459, /* (495) noarg_func ::= USER */ + 457, /* (496) star_func ::= COUNT */ + 457, /* (497) star_func ::= FIRST */ + 457, /* (498) star_func ::= LAST */ + 457, /* (499) star_func ::= LAST_ROW */ + 458, /* (500) star_func_para_list ::= NK_STAR */ + 458, /* (501) star_func_para_list ::= other_para_list */ + 460, /* (502) other_para_list ::= star_func_para */ + 460, /* (503) other_para_list ::= other_para_list NK_COMMA star_func_para */ + 461, /* (504) star_func_para ::= expr_or_subquery */ + 461, /* (505) star_func_para ::= table_name NK_DOT NK_STAR */ + 456, /* (506) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + 456, /* (507) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + 462, /* (508) when_then_list ::= when_then_expr */ + 462, /* (509) when_then_list ::= when_then_list when_then_expr */ + 465, /* (510) when_then_expr ::= WHEN common_expression THEN common_expression */ + 463, /* (511) case_when_else_opt ::= */ + 463, /* (512) case_when_else_opt ::= ELSE common_expression */ + 466, /* (513) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + 466, /* (514) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + 466, /* (515) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + 466, /* (516) predicate ::= expr_or_subquery IS NULL */ + 466, /* (517) predicate ::= expr_or_subquery IS NOT NULL */ + 466, /* (518) predicate ::= expr_or_subquery in_op in_predicate_value */ + 467, /* (519) compare_op ::= NK_LT */ + 467, /* (520) compare_op ::= NK_GT */ + 467, /* (521) compare_op ::= NK_LE */ + 467, /* (522) compare_op ::= NK_GE */ + 467, /* (523) compare_op ::= NK_NE */ + 467, /* (524) compare_op ::= NK_EQ */ + 467, /* (525) compare_op ::= LIKE */ + 467, /* (526) compare_op ::= NOT LIKE */ + 467, /* (527) compare_op ::= MATCH */ + 467, /* (528) compare_op ::= NMATCH */ + 467, /* (529) compare_op ::= CONTAINS */ + 468, /* (530) in_op ::= IN */ + 468, /* (531) in_op ::= NOT IN */ + 469, /* (532) in_predicate_value ::= NK_LP literal_list NK_RP */ + 470, /* (533) boolean_value_expression ::= boolean_primary */ + 470, /* (534) boolean_value_expression ::= NOT boolean_primary */ + 470, /* (535) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + 470, /* (536) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + 471, /* (537) boolean_primary ::= predicate */ + 471, /* (538) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + 464, /* (539) common_expression ::= expr_or_subquery */ + 464, /* (540) common_expression ::= boolean_value_expression */ + 472, /* (541) from_clause_opt ::= */ + 472, /* (542) from_clause_opt ::= FROM table_reference_list */ + 473, /* (543) table_reference_list ::= table_reference */ + 473, /* (544) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + 474, /* (545) table_reference ::= table_primary */ + 474, /* (546) table_reference ::= joined_table */ + 475, /* (547) table_primary ::= table_name alias_opt */ + 475, /* (548) table_primary ::= db_name NK_DOT table_name alias_opt */ + 475, /* (549) table_primary ::= subquery alias_opt */ + 475, /* (550) table_primary ::= parenthesized_joined_table */ + 477, /* (551) alias_opt ::= */ + 477, /* (552) alias_opt ::= table_alias */ + 477, /* (553) alias_opt ::= AS table_alias */ + 479, /* (554) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + 479, /* (555) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + 476, /* (556) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + 480, /* (557) join_type ::= */ + 480, /* (558) join_type ::= INNER */ + 481, /* (559) 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 */ + 482, /* (560) hint_list ::= */ + 482, /* (561) hint_list ::= NK_HINT */ + 484, /* (562) tag_mode_opt ::= */ + 484, /* (563) tag_mode_opt ::= TAGS */ + 483, /* (564) set_quantifier_opt ::= */ + 483, /* (565) set_quantifier_opt ::= DISTINCT */ + 483, /* (566) set_quantifier_opt ::= ALL */ + 485, /* (567) select_list ::= select_item */ + 485, /* (568) select_list ::= select_list NK_COMMA select_item */ + 493, /* (569) select_item ::= NK_STAR */ + 493, /* (570) select_item ::= common_expression */ + 493, /* (571) select_item ::= common_expression column_alias */ + 493, /* (572) select_item ::= common_expression AS column_alias */ + 493, /* (573) select_item ::= table_name NK_DOT NK_STAR */ + 429, /* (574) where_clause_opt ::= */ + 429, /* (575) where_clause_opt ::= WHERE search_condition */ + 486, /* (576) partition_by_clause_opt ::= */ + 486, /* (577) partition_by_clause_opt ::= PARTITION BY partition_list */ + 494, /* (578) partition_list ::= partition_item */ + 494, /* (579) partition_list ::= partition_list NK_COMMA partition_item */ + 495, /* (580) partition_item ::= expr_or_subquery */ + 495, /* (581) partition_item ::= expr_or_subquery column_alias */ + 495, /* (582) partition_item ::= expr_or_subquery AS column_alias */ + 490, /* (583) twindow_clause_opt ::= */ + 490, /* (584) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + 490, /* (585) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + 490, /* (586) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 490, /* (587) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 490, /* (588) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + 423, /* (589) sliding_opt ::= */ + 423, /* (590) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + 496, /* (591) interval_sliding_duration_literal ::= NK_VARIABLE */ + 496, /* (592) interval_sliding_duration_literal ::= NK_STRING */ + 496, /* (593) interval_sliding_duration_literal ::= NK_INTEGER */ + 489, /* (594) fill_opt ::= */ + 489, /* (595) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + 489, /* (596) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + 489, /* (597) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + 497, /* (598) fill_mode ::= NONE */ + 497, /* (599) fill_mode ::= PREV */ + 497, /* (600) fill_mode ::= NULL */ + 497, /* (601) fill_mode ::= NULL_F */ + 497, /* (602) fill_mode ::= LINEAR */ + 497, /* (603) fill_mode ::= NEXT */ + 491, /* (604) group_by_clause_opt ::= */ + 491, /* (605) group_by_clause_opt ::= GROUP BY group_by_list */ + 498, /* (606) group_by_list ::= expr_or_subquery */ + 498, /* (607) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 492, /* (608) having_clause_opt ::= */ + 492, /* (609) having_clause_opt ::= HAVING search_condition */ + 487, /* (610) range_opt ::= */ + 487, /* (611) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + 487, /* (612) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 488, /* (613) every_opt ::= */ + 488, /* (614) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + 499, /* (615) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + 500, /* (616) query_simple ::= query_specification */ + 500, /* (617) query_simple ::= union_query_expression */ + 504, /* (618) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + 504, /* (619) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + 505, /* (620) query_simple_or_subquery ::= query_simple */ + 505, /* (621) query_simple_or_subquery ::= subquery */ + 428, /* (622) query_or_subquery ::= query_expression */ + 428, /* (623) query_or_subquery ::= subquery */ + 501, /* (624) order_by_clause_opt ::= */ + 501, /* (625) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 502, /* (626) slimit_clause_opt ::= */ + 502, /* (627) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + 502, /* (628) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + 502, /* (629) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 503, /* (630) limit_clause_opt ::= */ + 503, /* (631) limit_clause_opt ::= LIMIT NK_INTEGER */ + 503, /* (632) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + 503, /* (633) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 478, /* (634) subquery ::= NK_LP query_expression NK_RP */ + 478, /* (635) subquery ::= NK_LP subquery NK_RP */ + 367, /* (636) search_condition ::= common_expression */ + 506, /* (637) sort_specification_list ::= sort_specification */ + 506, /* (638) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + 507, /* (639) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 508, /* (640) ordering_specification_opt ::= */ + 508, /* (641) ordering_specification_opt ::= ASC */ + 508, /* (642) ordering_specification_opt ::= DESC */ + 509, /* (643) null_ordering_opt ::= */ + 509, /* (644) null_ordering_opt ::= NULLS FIRST */ + 509, /* (645) null_ordering_opt ::= NULLS LAST */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -4261,388 +4275,390 @@ static const signed char yyRuleInfoNRhs[] = { -2, /* (259) cmd ::= SHOW CONNECTIONS */ -2, /* (260) cmd ::= SHOW LICENCES */ -2, /* (261) cmd ::= SHOW GRANTS */ - -4, /* (262) cmd ::= SHOW CREATE DATABASE db_name */ - -4, /* (263) cmd ::= SHOW CREATE TABLE full_table_name */ - -4, /* (264) cmd ::= SHOW CREATE STABLE full_table_name */ - -2, /* (265) cmd ::= SHOW QUERIES */ - -2, /* (266) cmd ::= SHOW SCORES */ - -2, /* (267) cmd ::= SHOW TOPICS */ - -2, /* (268) cmd ::= SHOW VARIABLES */ - -3, /* (269) cmd ::= SHOW CLUSTER VARIABLES */ - -3, /* (270) cmd ::= SHOW LOCAL VARIABLES */ - -5, /* (271) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - -2, /* (272) cmd ::= SHOW BNODES */ - -2, /* (273) cmd ::= SHOW SNODES */ - -2, /* (274) cmd ::= SHOW CLUSTER */ - -2, /* (275) cmd ::= SHOW TRANSACTIONS */ - -4, /* (276) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - -2, /* (277) cmd ::= SHOW CONSUMERS */ - -2, /* (278) cmd ::= SHOW SUBSCRIPTIONS */ - -5, /* (279) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - -6, /* (280) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ - -7, /* (281) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - -8, /* (282) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ - -5, /* (283) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ - -2, /* (284) cmd ::= SHOW VNODES */ - -3, /* (285) cmd ::= SHOW db_name_cond_opt ALIVE */ - -3, /* (286) cmd ::= SHOW CLUSTER ALIVE */ - -3, /* (287) cmd ::= SHOW db_name_cond_opt VIEWS */ - -4, /* (288) cmd ::= SHOW CREATE VIEW full_table_name */ - -2, /* (289) cmd ::= SHOW COMPACTS */ - -3, /* (290) cmd ::= SHOW COMPACT NK_INTEGER */ - 0, /* (291) table_kind_db_name_cond_opt ::= */ - -1, /* (292) table_kind_db_name_cond_opt ::= table_kind */ - -2, /* (293) table_kind_db_name_cond_opt ::= db_name NK_DOT */ - -3, /* (294) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ - -1, /* (295) table_kind ::= NORMAL */ - -1, /* (296) table_kind ::= CHILD */ - 0, /* (297) db_name_cond_opt ::= */ - -2, /* (298) db_name_cond_opt ::= db_name NK_DOT */ - 0, /* (299) like_pattern_opt ::= */ - -2, /* (300) like_pattern_opt ::= LIKE NK_STRING */ - -1, /* (301) table_name_cond ::= table_name */ - 0, /* (302) from_db_opt ::= */ - -2, /* (303) from_db_opt ::= FROM db_name */ - 0, /* (304) tag_list_opt ::= */ - -1, /* (305) tag_list_opt ::= tag_item */ - -3, /* (306) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - -1, /* (307) tag_item ::= TBNAME */ - -1, /* (308) tag_item ::= QTAGS */ - -1, /* (309) tag_item ::= column_name */ - -2, /* (310) tag_item ::= column_name column_alias */ - -3, /* (311) tag_item ::= column_name AS column_alias */ - 0, /* (312) db_kind_opt ::= */ - -1, /* (313) db_kind_opt ::= USER */ - -1, /* (314) db_kind_opt ::= SYSTEM */ - -8, /* (315) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - -9, /* (316) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - -4, /* (317) cmd ::= DROP INDEX exists_opt full_index_name */ - -1, /* (318) full_index_name ::= index_name */ - -3, /* (319) full_index_name ::= db_name NK_DOT index_name */ - -10, /* (320) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - -12, /* (321) 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 */ - -1, /* (322) func_list ::= func */ - -3, /* (323) func_list ::= func_list NK_COMMA func */ - -4, /* (324) func ::= sma_func_name NK_LP expression_list NK_RP */ - -1, /* (325) sma_func_name ::= function_name */ - -1, /* (326) sma_func_name ::= COUNT */ - -1, /* (327) sma_func_name ::= FIRST */ - -1, /* (328) sma_func_name ::= LAST */ - -1, /* (329) sma_func_name ::= LAST_ROW */ - 0, /* (330) sma_stream_opt ::= */ - -3, /* (331) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - -3, /* (332) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - -3, /* (333) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - -1, /* (334) with_meta ::= AS */ - -3, /* (335) with_meta ::= WITH META AS */ - -3, /* (336) with_meta ::= ONLY META AS */ - -6, /* (337) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - -7, /* (338) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - -8, /* (339) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - -4, /* (340) cmd ::= DROP TOPIC exists_opt topic_name */ - -7, /* (341) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - -2, /* (342) cmd ::= DESC full_table_name */ - -2, /* (343) cmd ::= DESCRIBE full_table_name */ - -3, /* (344) cmd ::= RESET QUERY CACHE */ - -4, /* (345) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - -4, /* (346) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - 0, /* (347) analyze_opt ::= */ - -1, /* (348) analyze_opt ::= ANALYZE */ - 0, /* (349) explain_options ::= */ - -3, /* (350) explain_options ::= explain_options VERBOSE NK_BOOL */ - -3, /* (351) explain_options ::= explain_options RATIO NK_FLOAT */ - -12, /* (352) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ - -4, /* (353) cmd ::= DROP FUNCTION exists_opt function_name */ - 0, /* (354) agg_func_opt ::= */ - -1, /* (355) agg_func_opt ::= AGGREGATE */ - 0, /* (356) bufsize_opt ::= */ - -2, /* (357) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 0, /* (358) language_opt ::= */ - -2, /* (359) language_opt ::= LANGUAGE NK_STRING */ - 0, /* (360) or_replace_opt ::= */ - -2, /* (361) or_replace_opt ::= OR REPLACE */ - -6, /* (362) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - -4, /* (363) cmd ::= DROP VIEW exists_opt full_view_name */ - -1, /* (364) full_view_name ::= view_name */ - -3, /* (365) full_view_name ::= db_name NK_DOT view_name */ - -12, /* (366) 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 */ - -4, /* (367) cmd ::= DROP STREAM exists_opt stream_name */ - -4, /* (368) cmd ::= PAUSE STREAM exists_opt stream_name */ - -5, /* (369) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ - 0, /* (370) col_list_opt ::= */ - -3, /* (371) col_list_opt ::= NK_LP col_name_list NK_RP */ - 0, /* (372) tag_def_or_ref_opt ::= */ - -1, /* (373) tag_def_or_ref_opt ::= tags_def */ - -4, /* (374) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ - 0, /* (375) stream_options ::= */ - -3, /* (376) stream_options ::= stream_options TRIGGER AT_ONCE */ - -3, /* (377) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - -4, /* (378) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - -3, /* (379) stream_options ::= stream_options WATERMARK duration_literal */ - -4, /* (380) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - -3, /* (381) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - -3, /* (382) stream_options ::= stream_options DELETE_MARK duration_literal */ - -4, /* (383) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - 0, /* (384) subtable_opt ::= */ - -4, /* (385) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - 0, /* (386) ignore_opt ::= */ - -2, /* (387) ignore_opt ::= IGNORE UNTREATED */ - -3, /* (388) cmd ::= KILL CONNECTION NK_INTEGER */ - -3, /* (389) cmd ::= KILL QUERY NK_STRING */ - -3, /* (390) cmd ::= KILL TRANSACTION NK_INTEGER */ - -3, /* (391) cmd ::= KILL COMPACT NK_INTEGER */ - -2, /* (392) cmd ::= BALANCE VGROUP */ - -4, /* (393) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - -4, /* (394) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - -4, /* (395) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - -3, /* (396) cmd ::= SPLIT VGROUP NK_INTEGER */ - 0, /* (397) on_vgroup_id ::= */ - -2, /* (398) on_vgroup_id ::= ON NK_INTEGER */ - -2, /* (399) dnode_list ::= DNODE NK_INTEGER */ - -3, /* (400) dnode_list ::= dnode_list DNODE NK_INTEGER */ - -4, /* (401) cmd ::= DELETE FROM full_table_name where_clause_opt */ - -1, /* (402) cmd ::= query_or_subquery */ - -1, /* (403) cmd ::= insert_query */ - -7, /* (404) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - -4, /* (405) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - -1, /* (406) literal ::= NK_INTEGER */ - -1, /* (407) literal ::= NK_FLOAT */ - -1, /* (408) literal ::= NK_STRING */ - -1, /* (409) literal ::= NK_BOOL */ - -2, /* (410) literal ::= TIMESTAMP NK_STRING */ - -1, /* (411) literal ::= duration_literal */ - -1, /* (412) literal ::= NULL */ - -1, /* (413) literal ::= NK_QUESTION */ - -1, /* (414) duration_literal ::= NK_VARIABLE */ - -1, /* (415) signed ::= NK_INTEGER */ - -2, /* (416) signed ::= NK_PLUS NK_INTEGER */ - -2, /* (417) signed ::= NK_MINUS NK_INTEGER */ - -1, /* (418) signed ::= NK_FLOAT */ - -2, /* (419) signed ::= NK_PLUS NK_FLOAT */ - -2, /* (420) signed ::= NK_MINUS NK_FLOAT */ - -1, /* (421) signed_literal ::= signed */ - -1, /* (422) signed_literal ::= NK_STRING */ - -1, /* (423) signed_literal ::= NK_BOOL */ - -2, /* (424) signed_literal ::= TIMESTAMP NK_STRING */ - -1, /* (425) signed_literal ::= duration_literal */ - -1, /* (426) signed_literal ::= NULL */ - -1, /* (427) signed_literal ::= literal_func */ - -1, /* (428) signed_literal ::= NK_QUESTION */ - -1, /* (429) literal_list ::= signed_literal */ - -3, /* (430) literal_list ::= literal_list NK_COMMA signed_literal */ - -1, /* (431) db_name ::= NK_ID */ - -1, /* (432) table_name ::= NK_ID */ - -1, /* (433) column_name ::= NK_ID */ - -1, /* (434) function_name ::= NK_ID */ - -1, /* (435) view_name ::= NK_ID */ - -1, /* (436) table_alias ::= NK_ID */ - -1, /* (437) column_alias ::= NK_ID */ - -1, /* (438) column_alias ::= NK_ALIAS */ - -1, /* (439) user_name ::= NK_ID */ - -1, /* (440) topic_name ::= NK_ID */ - -1, /* (441) stream_name ::= NK_ID */ - -1, /* (442) cgroup_name ::= NK_ID */ - -1, /* (443) index_name ::= NK_ID */ - -1, /* (444) expr_or_subquery ::= expression */ - -1, /* (445) expression ::= literal */ - -1, /* (446) expression ::= pseudo_column */ - -1, /* (447) expression ::= column_reference */ - -1, /* (448) expression ::= function_expression */ - -1, /* (449) expression ::= case_when_expression */ - -3, /* (450) expression ::= NK_LP expression NK_RP */ - -2, /* (451) expression ::= NK_PLUS expr_or_subquery */ - -2, /* (452) expression ::= NK_MINUS expr_or_subquery */ - -3, /* (453) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - -3, /* (454) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - -3, /* (455) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - -3, /* (456) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - -3, /* (457) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - -3, /* (458) expression ::= column_reference NK_ARROW NK_STRING */ - -3, /* (459) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - -3, /* (460) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - -1, /* (461) expression_list ::= expr_or_subquery */ - -3, /* (462) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - -1, /* (463) column_reference ::= column_name */ - -3, /* (464) column_reference ::= table_name NK_DOT column_name */ - -1, /* (465) column_reference ::= NK_ALIAS */ - -3, /* (466) column_reference ::= table_name NK_DOT NK_ALIAS */ - -1, /* (467) pseudo_column ::= ROWTS */ - -1, /* (468) pseudo_column ::= TBNAME */ - -3, /* (469) pseudo_column ::= table_name NK_DOT TBNAME */ - -1, /* (470) pseudo_column ::= QSTART */ - -1, /* (471) pseudo_column ::= QEND */ - -1, /* (472) pseudo_column ::= QDURATION */ - -1, /* (473) pseudo_column ::= WSTART */ - -1, /* (474) pseudo_column ::= WEND */ - -1, /* (475) pseudo_column ::= WDURATION */ - -1, /* (476) pseudo_column ::= IROWTS */ - -1, /* (477) pseudo_column ::= ISFILLED */ - -1, /* (478) pseudo_column ::= QTAGS */ - -4, /* (479) function_expression ::= function_name NK_LP expression_list NK_RP */ - -4, /* (480) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - -6, /* (481) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - -1, /* (482) function_expression ::= literal_func */ - -3, /* (483) literal_func ::= noarg_func NK_LP NK_RP */ - -1, /* (484) literal_func ::= NOW */ - -1, /* (485) noarg_func ::= NOW */ - -1, /* (486) noarg_func ::= TODAY */ - -1, /* (487) noarg_func ::= TIMEZONE */ - -1, /* (488) noarg_func ::= DATABASE */ - -1, /* (489) noarg_func ::= CLIENT_VERSION */ - -1, /* (490) noarg_func ::= SERVER_VERSION */ - -1, /* (491) noarg_func ::= SERVER_STATUS */ - -1, /* (492) noarg_func ::= CURRENT_USER */ - -1, /* (493) noarg_func ::= USER */ - -1, /* (494) star_func ::= COUNT */ - -1, /* (495) star_func ::= FIRST */ - -1, /* (496) star_func ::= LAST */ - -1, /* (497) star_func ::= LAST_ROW */ - -1, /* (498) star_func_para_list ::= NK_STAR */ - -1, /* (499) star_func_para_list ::= other_para_list */ - -1, /* (500) other_para_list ::= star_func_para */ - -3, /* (501) other_para_list ::= other_para_list NK_COMMA star_func_para */ - -1, /* (502) star_func_para ::= expr_or_subquery */ - -3, /* (503) star_func_para ::= table_name NK_DOT NK_STAR */ - -4, /* (504) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - -5, /* (505) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - -1, /* (506) when_then_list ::= when_then_expr */ - -2, /* (507) when_then_list ::= when_then_list when_then_expr */ - -4, /* (508) when_then_expr ::= WHEN common_expression THEN common_expression */ - 0, /* (509) case_when_else_opt ::= */ - -2, /* (510) case_when_else_opt ::= ELSE common_expression */ - -3, /* (511) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - -5, /* (512) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - -6, /* (513) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - -3, /* (514) predicate ::= expr_or_subquery IS NULL */ - -4, /* (515) predicate ::= expr_or_subquery IS NOT NULL */ - -3, /* (516) predicate ::= expr_or_subquery in_op in_predicate_value */ - -1, /* (517) compare_op ::= NK_LT */ - -1, /* (518) compare_op ::= NK_GT */ - -1, /* (519) compare_op ::= NK_LE */ - -1, /* (520) compare_op ::= NK_GE */ - -1, /* (521) compare_op ::= NK_NE */ - -1, /* (522) compare_op ::= NK_EQ */ - -1, /* (523) compare_op ::= LIKE */ - -2, /* (524) compare_op ::= NOT LIKE */ - -1, /* (525) compare_op ::= MATCH */ - -1, /* (526) compare_op ::= NMATCH */ - -1, /* (527) compare_op ::= CONTAINS */ - -1, /* (528) in_op ::= IN */ - -2, /* (529) in_op ::= NOT IN */ - -3, /* (530) in_predicate_value ::= NK_LP literal_list NK_RP */ - -1, /* (531) boolean_value_expression ::= boolean_primary */ - -2, /* (532) boolean_value_expression ::= NOT boolean_primary */ - -3, /* (533) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - -3, /* (534) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - -1, /* (535) boolean_primary ::= predicate */ - -3, /* (536) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - -1, /* (537) common_expression ::= expr_or_subquery */ - -1, /* (538) common_expression ::= boolean_value_expression */ - 0, /* (539) from_clause_opt ::= */ - -2, /* (540) from_clause_opt ::= FROM table_reference_list */ - -1, /* (541) table_reference_list ::= table_reference */ - -3, /* (542) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - -1, /* (543) table_reference ::= table_primary */ - -1, /* (544) table_reference ::= joined_table */ - -2, /* (545) table_primary ::= table_name alias_opt */ - -4, /* (546) table_primary ::= db_name NK_DOT table_name alias_opt */ - -2, /* (547) table_primary ::= subquery alias_opt */ - -1, /* (548) table_primary ::= parenthesized_joined_table */ - 0, /* (549) alias_opt ::= */ - -1, /* (550) alias_opt ::= table_alias */ - -2, /* (551) alias_opt ::= AS table_alias */ - -3, /* (552) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - -3, /* (553) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - -6, /* (554) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - 0, /* (555) join_type ::= */ - -1, /* (556) join_type ::= INNER */ - -14, /* (557) 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 */ - 0, /* (558) hint_list ::= */ - -1, /* (559) hint_list ::= NK_HINT */ - 0, /* (560) tag_mode_opt ::= */ - -1, /* (561) tag_mode_opt ::= TAGS */ - 0, /* (562) set_quantifier_opt ::= */ - -1, /* (563) set_quantifier_opt ::= DISTINCT */ - -1, /* (564) set_quantifier_opt ::= ALL */ - -1, /* (565) select_list ::= select_item */ - -3, /* (566) select_list ::= select_list NK_COMMA select_item */ - -1, /* (567) select_item ::= NK_STAR */ - -1, /* (568) select_item ::= common_expression */ - -2, /* (569) select_item ::= common_expression column_alias */ - -3, /* (570) select_item ::= common_expression AS column_alias */ - -3, /* (571) select_item ::= table_name NK_DOT NK_STAR */ - 0, /* (572) where_clause_opt ::= */ - -2, /* (573) where_clause_opt ::= WHERE search_condition */ - 0, /* (574) partition_by_clause_opt ::= */ - -3, /* (575) partition_by_clause_opt ::= PARTITION BY partition_list */ - -1, /* (576) partition_list ::= partition_item */ - -3, /* (577) partition_list ::= partition_list NK_COMMA partition_item */ - -1, /* (578) partition_item ::= expr_or_subquery */ - -2, /* (579) partition_item ::= expr_or_subquery column_alias */ - -3, /* (580) partition_item ::= expr_or_subquery AS column_alias */ - 0, /* (581) twindow_clause_opt ::= */ - -6, /* (582) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - -4, /* (583) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - -6, /* (584) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - -8, /* (585) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - -7, /* (586) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - 0, /* (587) sliding_opt ::= */ - -4, /* (588) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - -1, /* (589) interval_sliding_duration_literal ::= NK_VARIABLE */ - -1, /* (590) interval_sliding_duration_literal ::= NK_STRING */ - -1, /* (591) interval_sliding_duration_literal ::= NK_INTEGER */ - 0, /* (592) fill_opt ::= */ - -4, /* (593) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - -6, /* (594) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - -6, /* (595) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - -1, /* (596) fill_mode ::= NONE */ - -1, /* (597) fill_mode ::= PREV */ - -1, /* (598) fill_mode ::= NULL */ - -1, /* (599) fill_mode ::= NULL_F */ - -1, /* (600) fill_mode ::= LINEAR */ - -1, /* (601) fill_mode ::= NEXT */ - 0, /* (602) group_by_clause_opt ::= */ - -3, /* (603) group_by_clause_opt ::= GROUP BY group_by_list */ - -1, /* (604) group_by_list ::= expr_or_subquery */ - -3, /* (605) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 0, /* (606) having_clause_opt ::= */ - -2, /* (607) having_clause_opt ::= HAVING search_condition */ - 0, /* (608) range_opt ::= */ - -6, /* (609) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - -4, /* (610) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 0, /* (611) every_opt ::= */ - -4, /* (612) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - -4, /* (613) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - -1, /* (614) query_simple ::= query_specification */ - -1, /* (615) query_simple ::= union_query_expression */ - -4, /* (616) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - -3, /* (617) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - -1, /* (618) query_simple_or_subquery ::= query_simple */ - -1, /* (619) query_simple_or_subquery ::= subquery */ - -1, /* (620) query_or_subquery ::= query_expression */ - -1, /* (621) query_or_subquery ::= subquery */ - 0, /* (622) order_by_clause_opt ::= */ - -3, /* (623) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 0, /* (624) slimit_clause_opt ::= */ - -2, /* (625) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - -4, /* (626) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - -4, /* (627) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 0, /* (628) limit_clause_opt ::= */ - -2, /* (629) limit_clause_opt ::= LIMIT NK_INTEGER */ - -4, /* (630) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - -4, /* (631) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - -3, /* (632) subquery ::= NK_LP query_expression NK_RP */ - -3, /* (633) subquery ::= NK_LP subquery NK_RP */ - -1, /* (634) search_condition ::= common_expression */ - -1, /* (635) sort_specification_list ::= sort_specification */ - -3, /* (636) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - -3, /* (637) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 0, /* (638) ordering_specification_opt ::= */ - -1, /* (639) ordering_specification_opt ::= ASC */ - -1, /* (640) ordering_specification_opt ::= DESC */ - 0, /* (641) null_ordering_opt ::= */ - -2, /* (642) null_ordering_opt ::= NULLS FIRST */ - -2, /* (643) null_ordering_opt ::= NULLS LAST */ + -3, /* (262) cmd ::= SHOW GRANTS FULL */ + -3, /* (263) cmd ::= SHOW GRANTS LOG */ + -4, /* (264) cmd ::= SHOW CREATE DATABASE db_name */ + -4, /* (265) cmd ::= SHOW CREATE TABLE full_table_name */ + -4, /* (266) cmd ::= SHOW CREATE STABLE full_table_name */ + -2, /* (267) cmd ::= SHOW QUERIES */ + -2, /* (268) cmd ::= SHOW SCORES */ + -2, /* (269) cmd ::= SHOW TOPICS */ + -2, /* (270) cmd ::= SHOW VARIABLES */ + -3, /* (271) cmd ::= SHOW CLUSTER VARIABLES */ + -3, /* (272) cmd ::= SHOW LOCAL VARIABLES */ + -5, /* (273) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + -2, /* (274) cmd ::= SHOW BNODES */ + -2, /* (275) cmd ::= SHOW SNODES */ + -2, /* (276) cmd ::= SHOW CLUSTER */ + -2, /* (277) cmd ::= SHOW TRANSACTIONS */ + -4, /* (278) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + -2, /* (279) cmd ::= SHOW CONSUMERS */ + -2, /* (280) cmd ::= SHOW SUBSCRIPTIONS */ + -5, /* (281) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + -6, /* (282) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + -7, /* (283) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + -8, /* (284) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + -5, /* (285) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + -2, /* (286) cmd ::= SHOW VNODES */ + -3, /* (287) cmd ::= SHOW db_name_cond_opt ALIVE */ + -3, /* (288) cmd ::= SHOW CLUSTER ALIVE */ + -3, /* (289) cmd ::= SHOW db_name_cond_opt VIEWS */ + -4, /* (290) cmd ::= SHOW CREATE VIEW full_table_name */ + -2, /* (291) cmd ::= SHOW COMPACTS */ + -3, /* (292) cmd ::= SHOW COMPACT NK_INTEGER */ + 0, /* (293) table_kind_db_name_cond_opt ::= */ + -1, /* (294) table_kind_db_name_cond_opt ::= table_kind */ + -2, /* (295) table_kind_db_name_cond_opt ::= db_name NK_DOT */ + -3, /* (296) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + -1, /* (297) table_kind ::= NORMAL */ + -1, /* (298) table_kind ::= CHILD */ + 0, /* (299) db_name_cond_opt ::= */ + -2, /* (300) db_name_cond_opt ::= db_name NK_DOT */ + 0, /* (301) like_pattern_opt ::= */ + -2, /* (302) like_pattern_opt ::= LIKE NK_STRING */ + -1, /* (303) table_name_cond ::= table_name */ + 0, /* (304) from_db_opt ::= */ + -2, /* (305) from_db_opt ::= FROM db_name */ + 0, /* (306) tag_list_opt ::= */ + -1, /* (307) tag_list_opt ::= tag_item */ + -3, /* (308) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + -1, /* (309) tag_item ::= TBNAME */ + -1, /* (310) tag_item ::= QTAGS */ + -1, /* (311) tag_item ::= column_name */ + -2, /* (312) tag_item ::= column_name column_alias */ + -3, /* (313) tag_item ::= column_name AS column_alias */ + 0, /* (314) db_kind_opt ::= */ + -1, /* (315) db_kind_opt ::= USER */ + -1, /* (316) db_kind_opt ::= SYSTEM */ + -8, /* (317) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + -9, /* (318) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + -4, /* (319) cmd ::= DROP INDEX exists_opt full_index_name */ + -1, /* (320) full_index_name ::= index_name */ + -3, /* (321) full_index_name ::= db_name NK_DOT index_name */ + -10, /* (322) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + -12, /* (323) 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 */ + -1, /* (324) func_list ::= func */ + -3, /* (325) func_list ::= func_list NK_COMMA func */ + -4, /* (326) func ::= sma_func_name NK_LP expression_list NK_RP */ + -1, /* (327) sma_func_name ::= function_name */ + -1, /* (328) sma_func_name ::= COUNT */ + -1, /* (329) sma_func_name ::= FIRST */ + -1, /* (330) sma_func_name ::= LAST */ + -1, /* (331) sma_func_name ::= LAST_ROW */ + 0, /* (332) sma_stream_opt ::= */ + -3, /* (333) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + -3, /* (334) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + -3, /* (335) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + -1, /* (336) with_meta ::= AS */ + -3, /* (337) with_meta ::= WITH META AS */ + -3, /* (338) with_meta ::= ONLY META AS */ + -6, /* (339) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + -7, /* (340) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + -8, /* (341) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + -4, /* (342) cmd ::= DROP TOPIC exists_opt topic_name */ + -7, /* (343) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + -2, /* (344) cmd ::= DESC full_table_name */ + -2, /* (345) cmd ::= DESCRIBE full_table_name */ + -3, /* (346) cmd ::= RESET QUERY CACHE */ + -4, /* (347) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + -4, /* (348) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + 0, /* (349) analyze_opt ::= */ + -1, /* (350) analyze_opt ::= ANALYZE */ + 0, /* (351) explain_options ::= */ + -3, /* (352) explain_options ::= explain_options VERBOSE NK_BOOL */ + -3, /* (353) explain_options ::= explain_options RATIO NK_FLOAT */ + -12, /* (354) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ + -4, /* (355) cmd ::= DROP FUNCTION exists_opt function_name */ + 0, /* (356) agg_func_opt ::= */ + -1, /* (357) agg_func_opt ::= AGGREGATE */ + 0, /* (358) bufsize_opt ::= */ + -2, /* (359) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 0, /* (360) language_opt ::= */ + -2, /* (361) language_opt ::= LANGUAGE NK_STRING */ + 0, /* (362) or_replace_opt ::= */ + -2, /* (363) or_replace_opt ::= OR REPLACE */ + -6, /* (364) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + -4, /* (365) cmd ::= DROP VIEW exists_opt full_view_name */ + -1, /* (366) full_view_name ::= view_name */ + -3, /* (367) full_view_name ::= db_name NK_DOT view_name */ + -12, /* (368) 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 */ + -4, /* (369) cmd ::= DROP STREAM exists_opt stream_name */ + -4, /* (370) cmd ::= PAUSE STREAM exists_opt stream_name */ + -5, /* (371) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + 0, /* (372) col_list_opt ::= */ + -3, /* (373) col_list_opt ::= NK_LP col_name_list NK_RP */ + 0, /* (374) tag_def_or_ref_opt ::= */ + -1, /* (375) tag_def_or_ref_opt ::= tags_def */ + -4, /* (376) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ + 0, /* (377) stream_options ::= */ + -3, /* (378) stream_options ::= stream_options TRIGGER AT_ONCE */ + -3, /* (379) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + -4, /* (380) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + -3, /* (381) stream_options ::= stream_options WATERMARK duration_literal */ + -4, /* (382) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + -3, /* (383) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + -3, /* (384) stream_options ::= stream_options DELETE_MARK duration_literal */ + -4, /* (385) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + 0, /* (386) subtable_opt ::= */ + -4, /* (387) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + 0, /* (388) ignore_opt ::= */ + -2, /* (389) ignore_opt ::= IGNORE UNTREATED */ + -3, /* (390) cmd ::= KILL CONNECTION NK_INTEGER */ + -3, /* (391) cmd ::= KILL QUERY NK_STRING */ + -3, /* (392) cmd ::= KILL TRANSACTION NK_INTEGER */ + -3, /* (393) cmd ::= KILL COMPACT NK_INTEGER */ + -2, /* (394) cmd ::= BALANCE VGROUP */ + -4, /* (395) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + -4, /* (396) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + -4, /* (397) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + -3, /* (398) cmd ::= SPLIT VGROUP NK_INTEGER */ + 0, /* (399) on_vgroup_id ::= */ + -2, /* (400) on_vgroup_id ::= ON NK_INTEGER */ + -2, /* (401) dnode_list ::= DNODE NK_INTEGER */ + -3, /* (402) dnode_list ::= dnode_list DNODE NK_INTEGER */ + -4, /* (403) cmd ::= DELETE FROM full_table_name where_clause_opt */ + -1, /* (404) cmd ::= query_or_subquery */ + -1, /* (405) cmd ::= insert_query */ + -7, /* (406) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + -4, /* (407) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + -1, /* (408) literal ::= NK_INTEGER */ + -1, /* (409) literal ::= NK_FLOAT */ + -1, /* (410) literal ::= NK_STRING */ + -1, /* (411) literal ::= NK_BOOL */ + -2, /* (412) literal ::= TIMESTAMP NK_STRING */ + -1, /* (413) literal ::= duration_literal */ + -1, /* (414) literal ::= NULL */ + -1, /* (415) literal ::= NK_QUESTION */ + -1, /* (416) duration_literal ::= NK_VARIABLE */ + -1, /* (417) signed ::= NK_INTEGER */ + -2, /* (418) signed ::= NK_PLUS NK_INTEGER */ + -2, /* (419) signed ::= NK_MINUS NK_INTEGER */ + -1, /* (420) signed ::= NK_FLOAT */ + -2, /* (421) signed ::= NK_PLUS NK_FLOAT */ + -2, /* (422) signed ::= NK_MINUS NK_FLOAT */ + -1, /* (423) signed_literal ::= signed */ + -1, /* (424) signed_literal ::= NK_STRING */ + -1, /* (425) signed_literal ::= NK_BOOL */ + -2, /* (426) signed_literal ::= TIMESTAMP NK_STRING */ + -1, /* (427) signed_literal ::= duration_literal */ + -1, /* (428) signed_literal ::= NULL */ + -1, /* (429) signed_literal ::= literal_func */ + -1, /* (430) signed_literal ::= NK_QUESTION */ + -1, /* (431) literal_list ::= signed_literal */ + -3, /* (432) literal_list ::= literal_list NK_COMMA signed_literal */ + -1, /* (433) db_name ::= NK_ID */ + -1, /* (434) table_name ::= NK_ID */ + -1, /* (435) column_name ::= NK_ID */ + -1, /* (436) function_name ::= NK_ID */ + -1, /* (437) view_name ::= NK_ID */ + -1, /* (438) table_alias ::= NK_ID */ + -1, /* (439) column_alias ::= NK_ID */ + -1, /* (440) column_alias ::= NK_ALIAS */ + -1, /* (441) user_name ::= NK_ID */ + -1, /* (442) topic_name ::= NK_ID */ + -1, /* (443) stream_name ::= NK_ID */ + -1, /* (444) cgroup_name ::= NK_ID */ + -1, /* (445) index_name ::= NK_ID */ + -1, /* (446) expr_or_subquery ::= expression */ + -1, /* (447) expression ::= literal */ + -1, /* (448) expression ::= pseudo_column */ + -1, /* (449) expression ::= column_reference */ + -1, /* (450) expression ::= function_expression */ + -1, /* (451) expression ::= case_when_expression */ + -3, /* (452) expression ::= NK_LP expression NK_RP */ + -2, /* (453) expression ::= NK_PLUS expr_or_subquery */ + -2, /* (454) expression ::= NK_MINUS expr_or_subquery */ + -3, /* (455) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + -3, /* (456) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + -3, /* (457) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + -3, /* (458) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + -3, /* (459) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + -3, /* (460) expression ::= column_reference NK_ARROW NK_STRING */ + -3, /* (461) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + -3, /* (462) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + -1, /* (463) expression_list ::= expr_or_subquery */ + -3, /* (464) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + -1, /* (465) column_reference ::= column_name */ + -3, /* (466) column_reference ::= table_name NK_DOT column_name */ + -1, /* (467) column_reference ::= NK_ALIAS */ + -3, /* (468) column_reference ::= table_name NK_DOT NK_ALIAS */ + -1, /* (469) pseudo_column ::= ROWTS */ + -1, /* (470) pseudo_column ::= TBNAME */ + -3, /* (471) pseudo_column ::= table_name NK_DOT TBNAME */ + -1, /* (472) pseudo_column ::= QSTART */ + -1, /* (473) pseudo_column ::= QEND */ + -1, /* (474) pseudo_column ::= QDURATION */ + -1, /* (475) pseudo_column ::= WSTART */ + -1, /* (476) pseudo_column ::= WEND */ + -1, /* (477) pseudo_column ::= WDURATION */ + -1, /* (478) pseudo_column ::= IROWTS */ + -1, /* (479) pseudo_column ::= ISFILLED */ + -1, /* (480) pseudo_column ::= QTAGS */ + -4, /* (481) function_expression ::= function_name NK_LP expression_list NK_RP */ + -4, /* (482) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + -6, /* (483) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + -1, /* (484) function_expression ::= literal_func */ + -3, /* (485) literal_func ::= noarg_func NK_LP NK_RP */ + -1, /* (486) literal_func ::= NOW */ + -1, /* (487) noarg_func ::= NOW */ + -1, /* (488) noarg_func ::= TODAY */ + -1, /* (489) noarg_func ::= TIMEZONE */ + -1, /* (490) noarg_func ::= DATABASE */ + -1, /* (491) noarg_func ::= CLIENT_VERSION */ + -1, /* (492) noarg_func ::= SERVER_VERSION */ + -1, /* (493) noarg_func ::= SERVER_STATUS */ + -1, /* (494) noarg_func ::= CURRENT_USER */ + -1, /* (495) noarg_func ::= USER */ + -1, /* (496) star_func ::= COUNT */ + -1, /* (497) star_func ::= FIRST */ + -1, /* (498) star_func ::= LAST */ + -1, /* (499) star_func ::= LAST_ROW */ + -1, /* (500) star_func_para_list ::= NK_STAR */ + -1, /* (501) star_func_para_list ::= other_para_list */ + -1, /* (502) other_para_list ::= star_func_para */ + -3, /* (503) other_para_list ::= other_para_list NK_COMMA star_func_para */ + -1, /* (504) star_func_para ::= expr_or_subquery */ + -3, /* (505) star_func_para ::= table_name NK_DOT NK_STAR */ + -4, /* (506) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + -5, /* (507) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + -1, /* (508) when_then_list ::= when_then_expr */ + -2, /* (509) when_then_list ::= when_then_list when_then_expr */ + -4, /* (510) when_then_expr ::= WHEN common_expression THEN common_expression */ + 0, /* (511) case_when_else_opt ::= */ + -2, /* (512) case_when_else_opt ::= ELSE common_expression */ + -3, /* (513) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + -5, /* (514) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + -6, /* (515) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + -3, /* (516) predicate ::= expr_or_subquery IS NULL */ + -4, /* (517) predicate ::= expr_or_subquery IS NOT NULL */ + -3, /* (518) predicate ::= expr_or_subquery in_op in_predicate_value */ + -1, /* (519) compare_op ::= NK_LT */ + -1, /* (520) compare_op ::= NK_GT */ + -1, /* (521) compare_op ::= NK_LE */ + -1, /* (522) compare_op ::= NK_GE */ + -1, /* (523) compare_op ::= NK_NE */ + -1, /* (524) compare_op ::= NK_EQ */ + -1, /* (525) compare_op ::= LIKE */ + -2, /* (526) compare_op ::= NOT LIKE */ + -1, /* (527) compare_op ::= MATCH */ + -1, /* (528) compare_op ::= NMATCH */ + -1, /* (529) compare_op ::= CONTAINS */ + -1, /* (530) in_op ::= IN */ + -2, /* (531) in_op ::= NOT IN */ + -3, /* (532) in_predicate_value ::= NK_LP literal_list NK_RP */ + -1, /* (533) boolean_value_expression ::= boolean_primary */ + -2, /* (534) boolean_value_expression ::= NOT boolean_primary */ + -3, /* (535) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + -3, /* (536) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + -1, /* (537) boolean_primary ::= predicate */ + -3, /* (538) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + -1, /* (539) common_expression ::= expr_or_subquery */ + -1, /* (540) common_expression ::= boolean_value_expression */ + 0, /* (541) from_clause_opt ::= */ + -2, /* (542) from_clause_opt ::= FROM table_reference_list */ + -1, /* (543) table_reference_list ::= table_reference */ + -3, /* (544) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + -1, /* (545) table_reference ::= table_primary */ + -1, /* (546) table_reference ::= joined_table */ + -2, /* (547) table_primary ::= table_name alias_opt */ + -4, /* (548) table_primary ::= db_name NK_DOT table_name alias_opt */ + -2, /* (549) table_primary ::= subquery alias_opt */ + -1, /* (550) table_primary ::= parenthesized_joined_table */ + 0, /* (551) alias_opt ::= */ + -1, /* (552) alias_opt ::= table_alias */ + -2, /* (553) alias_opt ::= AS table_alias */ + -3, /* (554) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + -3, /* (555) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + -6, /* (556) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + 0, /* (557) join_type ::= */ + -1, /* (558) join_type ::= INNER */ + -14, /* (559) 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 */ + 0, /* (560) hint_list ::= */ + -1, /* (561) hint_list ::= NK_HINT */ + 0, /* (562) tag_mode_opt ::= */ + -1, /* (563) tag_mode_opt ::= TAGS */ + 0, /* (564) set_quantifier_opt ::= */ + -1, /* (565) set_quantifier_opt ::= DISTINCT */ + -1, /* (566) set_quantifier_opt ::= ALL */ + -1, /* (567) select_list ::= select_item */ + -3, /* (568) select_list ::= select_list NK_COMMA select_item */ + -1, /* (569) select_item ::= NK_STAR */ + -1, /* (570) select_item ::= common_expression */ + -2, /* (571) select_item ::= common_expression column_alias */ + -3, /* (572) select_item ::= common_expression AS column_alias */ + -3, /* (573) select_item ::= table_name NK_DOT NK_STAR */ + 0, /* (574) where_clause_opt ::= */ + -2, /* (575) where_clause_opt ::= WHERE search_condition */ + 0, /* (576) partition_by_clause_opt ::= */ + -3, /* (577) partition_by_clause_opt ::= PARTITION BY partition_list */ + -1, /* (578) partition_list ::= partition_item */ + -3, /* (579) partition_list ::= partition_list NK_COMMA partition_item */ + -1, /* (580) partition_item ::= expr_or_subquery */ + -2, /* (581) partition_item ::= expr_or_subquery column_alias */ + -3, /* (582) partition_item ::= expr_or_subquery AS column_alias */ + 0, /* (583) twindow_clause_opt ::= */ + -6, /* (584) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + -4, /* (585) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + -6, /* (586) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + -8, /* (587) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + -7, /* (588) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + 0, /* (589) sliding_opt ::= */ + -4, /* (590) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + -1, /* (591) interval_sliding_duration_literal ::= NK_VARIABLE */ + -1, /* (592) interval_sliding_duration_literal ::= NK_STRING */ + -1, /* (593) interval_sliding_duration_literal ::= NK_INTEGER */ + 0, /* (594) fill_opt ::= */ + -4, /* (595) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + -6, /* (596) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + -6, /* (597) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + -1, /* (598) fill_mode ::= NONE */ + -1, /* (599) fill_mode ::= PREV */ + -1, /* (600) fill_mode ::= NULL */ + -1, /* (601) fill_mode ::= NULL_F */ + -1, /* (602) fill_mode ::= LINEAR */ + -1, /* (603) fill_mode ::= NEXT */ + 0, /* (604) group_by_clause_opt ::= */ + -3, /* (605) group_by_clause_opt ::= GROUP BY group_by_list */ + -1, /* (606) group_by_list ::= expr_or_subquery */ + -3, /* (607) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 0, /* (608) having_clause_opt ::= */ + -2, /* (609) having_clause_opt ::= HAVING search_condition */ + 0, /* (610) range_opt ::= */ + -6, /* (611) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + -4, /* (612) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 0, /* (613) every_opt ::= */ + -4, /* (614) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + -4, /* (615) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + -1, /* (616) query_simple ::= query_specification */ + -1, /* (617) query_simple ::= union_query_expression */ + -4, /* (618) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + -3, /* (619) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + -1, /* (620) query_simple_or_subquery ::= query_simple */ + -1, /* (621) query_simple_or_subquery ::= subquery */ + -1, /* (622) query_or_subquery ::= query_expression */ + -1, /* (623) query_or_subquery ::= subquery */ + 0, /* (624) order_by_clause_opt ::= */ + -3, /* (625) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 0, /* (626) slimit_clause_opt ::= */ + -2, /* (627) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + -4, /* (628) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + -4, /* (629) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 0, /* (630) limit_clause_opt ::= */ + -2, /* (631) limit_clause_opt ::= LIMIT NK_INTEGER */ + -4, /* (632) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + -4, /* (633) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + -3, /* (634) subquery ::= NK_LP query_expression NK_RP */ + -3, /* (635) subquery ::= NK_LP subquery NK_RP */ + -1, /* (636) search_condition ::= common_expression */ + -1, /* (637) sort_specification_list ::= sort_specification */ + -3, /* (638) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + -3, /* (639) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 0, /* (640) ordering_specification_opt ::= */ + -1, /* (641) ordering_specification_opt ::= ASC */ + -1, /* (642) ordering_specification_opt ::= DESC */ + 0, /* (643) null_ordering_opt ::= */ + -2, /* (644) null_ordering_opt ::= NULLS FIRST */ + -2, /* (645) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -4734,11 +4750,11 @@ static YYACTIONTYPE yy_reduce( YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,348,&yymsp[0].minor); + yy_destructor(yypParser,350,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,349,&yymsp[0].minor); + yy_destructor(yypParser,351,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -4752,20 +4768,20 @@ static YYACTIONTYPE yy_reduce( case 9: /* account_options ::= account_options USERS literal */ yytestcase(yyruleno==9); case 10: /* account_options ::= account_options CONNS literal */ yytestcase(yyruleno==10); case 11: /* account_options ::= account_options STATE literal */ yytestcase(yyruleno==11); -{ yy_destructor(yypParser,348,&yymsp[-2].minor); +{ yy_destructor(yypParser,350,&yymsp[-2].minor); { } - yy_destructor(yypParser,350,&yymsp[0].minor); + yy_destructor(yypParser,352,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,351,&yymsp[0].minor); +{ yy_destructor(yypParser,353,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,349,&yymsp[-1].minor); +{ yy_destructor(yypParser,351,&yymsp[-1].minor); { } - yy_destructor(yypParser,351,&yymsp[0].minor); + yy_destructor(yypParser,353,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -4779,154 +4795,154 @@ static YYACTIONTYPE yy_reduce( case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); { } - yy_destructor(yypParser,350,&yymsp[0].minor); + yy_destructor(yypParser,352,&yymsp[0].minor); break; case 24: /* ip_range_list ::= NK_STRING */ -{ yylhsminor.yy88 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy88 = yylhsminor.yy88; +{ yylhsminor.yy364 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy364 = yylhsminor.yy364; break; case 25: /* ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ -{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy88 = yylhsminor.yy88; +{ yylhsminor.yy364 = addNodeToList(pCxt, yymsp[-2].minor.yy364, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy364 = yylhsminor.yy364; break; case 26: /* white_list ::= HOST ip_range_list */ -{ yymsp[-1].minor.yy88 = yymsp[0].minor.yy88; } +{ yymsp[-1].minor.yy364 = yymsp[0].minor.yy364; } break; case 27: /* white_list_opt ::= */ case 188: /* specific_cols_opt ::= */ yytestcase(yyruleno==188); case 219: /* tags_def_opt ::= */ yytestcase(yyruleno==219); - case 304: /* tag_list_opt ::= */ yytestcase(yyruleno==304); - case 370: /* col_list_opt ::= */ yytestcase(yyruleno==370); - case 372: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==372); - case 574: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==574); - case 602: /* group_by_clause_opt ::= */ yytestcase(yyruleno==602); - case 622: /* order_by_clause_opt ::= */ yytestcase(yyruleno==622); -{ yymsp[1].minor.yy88 = NULL; } + case 306: /* tag_list_opt ::= */ yytestcase(yyruleno==306); + case 372: /* col_list_opt ::= */ yytestcase(yyruleno==372); + case 374: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==374); + case 576: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==576); + case 604: /* group_by_clause_opt ::= */ yytestcase(yyruleno==604); + case 624: /* order_by_clause_opt ::= */ yytestcase(yyruleno==624); +{ yymsp[1].minor.yy364 = NULL; } break; case 28: /* white_list_opt ::= white_list */ case 220: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==220); - case 373: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==373); - case 499: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==499); -{ yylhsminor.yy88 = yymsp[0].minor.yy88; } - yymsp[0].minor.yy88 = yylhsminor.yy88; + case 375: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==375); + case 501: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==501); +{ yylhsminor.yy364 = yymsp[0].minor.yy364; } + yymsp[0].minor.yy364 = yylhsminor.yy364; break; case 29: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ { - pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-4].minor.yy993, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy279); - pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy88); + pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-4].minor.yy929, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy143); + pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy364); } break; case 30: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy929, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 31: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy929, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } break; case 32: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy929, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } break; case 33: /* cmd ::= ALTER USER user_name ADD white_list */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy88); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy929, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy364); } break; case 34: /* cmd ::= ALTER USER user_name DROP white_list */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy88); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy929, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy364); } break; case 35: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy993); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy929); } break; case 36: /* sysinfo_opt ::= */ -{ yymsp[1].minor.yy279 = 1; } +{ yymsp[1].minor.yy143 = 1; } break; case 37: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ -{ yymsp[-1].minor.yy279 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy143 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } break; case 38: /* cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy221, &yymsp[-3].minor.yy241, &yymsp[0].minor.yy993, yymsp[-2].minor.yy232); } +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy429, &yymsp[-3].minor.yy777, &yymsp[0].minor.yy929, yymsp[-2].minor.yy992); } break; case 39: /* cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy221, &yymsp[-3].minor.yy241, &yymsp[0].minor.yy993, yymsp[-2].minor.yy232); } +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy429, &yymsp[-3].minor.yy777, &yymsp[0].minor.yy929, yymsp[-2].minor.yy992); } break; case 40: /* privileges ::= ALL */ -{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_ALL; } +{ yymsp[0].minor.yy429 = PRIVILEGE_TYPE_ALL; } break; case 41: /* privileges ::= priv_type_list */ case 43: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==43); -{ yylhsminor.yy221 = yymsp[0].minor.yy221; } - yymsp[0].minor.yy221 = yylhsminor.yy221; +{ yylhsminor.yy429 = yymsp[0].minor.yy429; } + yymsp[0].minor.yy429 = yylhsminor.yy429; break; case 42: /* privileges ::= SUBSCRIBE */ -{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_SUBSCRIBE; } +{ yymsp[0].minor.yy429 = PRIVILEGE_TYPE_SUBSCRIBE; } break; case 44: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy221 = yymsp[-2].minor.yy221 | yymsp[0].minor.yy221; } - yymsp[-2].minor.yy221 = yylhsminor.yy221; +{ yylhsminor.yy429 = yymsp[-2].minor.yy429 | yymsp[0].minor.yy429; } + yymsp[-2].minor.yy429 = yylhsminor.yy429; break; case 45: /* priv_type ::= READ */ -{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_READ; } +{ yymsp[0].minor.yy429 = PRIVILEGE_TYPE_READ; } break; case 46: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_WRITE; } +{ yymsp[0].minor.yy429 = PRIVILEGE_TYPE_WRITE; } break; case 47: /* priv_type ::= ALTER */ -{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_ALTER; } +{ yymsp[0].minor.yy429 = PRIVILEGE_TYPE_ALTER; } break; case 48: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy241.first = yymsp[-2].minor.yy0; yylhsminor.yy241.second = yymsp[0].minor.yy0; } - yymsp[-2].minor.yy241 = yylhsminor.yy241; +{ yylhsminor.yy777.first = yymsp[-2].minor.yy0; yylhsminor.yy777.second = yymsp[0].minor.yy0; } + yymsp[-2].minor.yy777 = yylhsminor.yy777; break; case 49: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy241.first = yymsp[-2].minor.yy993; yylhsminor.yy241.second = yymsp[0].minor.yy0; } - yymsp[-2].minor.yy241 = yylhsminor.yy241; +{ yylhsminor.yy777.first = yymsp[-2].minor.yy929; yylhsminor.yy777.second = yymsp[0].minor.yy0; } + yymsp[-2].minor.yy777 = yylhsminor.yy777; break; case 50: /* priv_level ::= db_name NK_DOT table_name */ -{ yylhsminor.yy241.first = yymsp[-2].minor.yy993; yylhsminor.yy241.second = yymsp[0].minor.yy993; } - yymsp[-2].minor.yy241 = yylhsminor.yy241; +{ yylhsminor.yy777.first = yymsp[-2].minor.yy929; yylhsminor.yy777.second = yymsp[0].minor.yy929; } + yymsp[-2].minor.yy777 = yylhsminor.yy777; break; case 51: /* priv_level ::= topic_name */ -{ yylhsminor.yy241.first = yymsp[0].minor.yy993; yylhsminor.yy241.second = nil_token; } - yymsp[0].minor.yy241 = yylhsminor.yy241; +{ yylhsminor.yy777.first = yymsp[0].minor.yy929; yylhsminor.yy777.second = nil_token; } + yymsp[0].minor.yy777 = yylhsminor.yy777; break; case 52: /* with_opt ::= */ case 157: /* start_opt ::= */ yytestcase(yyruleno==157); case 161: /* end_opt ::= */ yytestcase(yyruleno==161); - case 299: /* like_pattern_opt ::= */ yytestcase(yyruleno==299); - case 384: /* subtable_opt ::= */ yytestcase(yyruleno==384); - case 509: /* case_when_else_opt ::= */ yytestcase(yyruleno==509); - case 539: /* from_clause_opt ::= */ yytestcase(yyruleno==539); - case 572: /* where_clause_opt ::= */ yytestcase(yyruleno==572); - case 581: /* twindow_clause_opt ::= */ yytestcase(yyruleno==581); - case 587: /* sliding_opt ::= */ yytestcase(yyruleno==587); - case 592: /* fill_opt ::= */ yytestcase(yyruleno==592); - case 606: /* having_clause_opt ::= */ yytestcase(yyruleno==606); - case 608: /* range_opt ::= */ yytestcase(yyruleno==608); - case 611: /* every_opt ::= */ yytestcase(yyruleno==611); - case 624: /* slimit_clause_opt ::= */ yytestcase(yyruleno==624); - case 628: /* limit_clause_opt ::= */ yytestcase(yyruleno==628); -{ yymsp[1].minor.yy232 = NULL; } + case 301: /* like_pattern_opt ::= */ yytestcase(yyruleno==301); + case 386: /* subtable_opt ::= */ yytestcase(yyruleno==386); + case 511: /* case_when_else_opt ::= */ yytestcase(yyruleno==511); + case 541: /* from_clause_opt ::= */ yytestcase(yyruleno==541); + case 574: /* where_clause_opt ::= */ yytestcase(yyruleno==574); + case 583: /* twindow_clause_opt ::= */ yytestcase(yyruleno==583); + case 589: /* sliding_opt ::= */ yytestcase(yyruleno==589); + case 594: /* fill_opt ::= */ yytestcase(yyruleno==594); + case 608: /* having_clause_opt ::= */ yytestcase(yyruleno==608); + case 610: /* range_opt ::= */ yytestcase(yyruleno==610); + case 613: /* every_opt ::= */ yytestcase(yyruleno==613); + case 626: /* slimit_clause_opt ::= */ yytestcase(yyruleno==626); + case 630: /* limit_clause_opt ::= */ yytestcase(yyruleno==630); +{ yymsp[1].minor.yy992 = NULL; } break; case 53: /* with_opt ::= WITH search_condition */ - case 540: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==540); - case 573: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==573); - case 607: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==607); -{ yymsp[-1].minor.yy232 = yymsp[0].minor.yy232; } + case 542: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==542); + case 575: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==575); + case 609: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==609); +{ yymsp[-1].minor.yy992 = yymsp[0].minor.yy992; } break; case 54: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy993, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy929, NULL); } break; case 55: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy0); } break; case 56: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy985, false); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy437, false); } break; case 57: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy993, yymsp[0].minor.yy985, false); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy929, yymsp[0].minor.yy437, false); } break; case 58: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy985); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy437); } break; case 59: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy993, false, yymsp[0].minor.yy985); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy929, false, yymsp[0].minor.yy437); } break; case 60: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -4946,57 +4962,57 @@ static YYACTIONTYPE yy_reduce( case 65: /* dnode_endpoint ::= NK_STRING */ case 66: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==66); case 67: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==67); - case 326: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==326); - case 327: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==327); - case 328: /* sma_func_name ::= LAST */ yytestcase(yyruleno==328); - case 329: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==329); - case 431: /* db_name ::= NK_ID */ yytestcase(yyruleno==431); - case 432: /* table_name ::= NK_ID */ yytestcase(yyruleno==432); - case 433: /* column_name ::= NK_ID */ yytestcase(yyruleno==433); - case 434: /* function_name ::= NK_ID */ yytestcase(yyruleno==434); - case 435: /* view_name ::= NK_ID */ yytestcase(yyruleno==435); - case 436: /* table_alias ::= NK_ID */ yytestcase(yyruleno==436); - case 437: /* column_alias ::= NK_ID */ yytestcase(yyruleno==437); - case 438: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==438); - case 439: /* user_name ::= NK_ID */ yytestcase(yyruleno==439); - case 440: /* topic_name ::= NK_ID */ yytestcase(yyruleno==440); - case 441: /* stream_name ::= NK_ID */ yytestcase(yyruleno==441); - case 442: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==442); - case 443: /* index_name ::= NK_ID */ yytestcase(yyruleno==443); - case 485: /* noarg_func ::= NOW */ yytestcase(yyruleno==485); - case 486: /* noarg_func ::= TODAY */ yytestcase(yyruleno==486); - case 487: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==487); - case 488: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==488); - case 489: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==489); - case 490: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==490); - case 491: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==491); - case 492: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==492); - case 493: /* noarg_func ::= USER */ yytestcase(yyruleno==493); - case 494: /* star_func ::= COUNT */ yytestcase(yyruleno==494); - case 495: /* star_func ::= FIRST */ yytestcase(yyruleno==495); - case 496: /* star_func ::= LAST */ yytestcase(yyruleno==496); - case 497: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==497); -{ yylhsminor.yy993 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy993 = yylhsminor.yy993; + case 328: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==328); + case 329: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==329); + case 330: /* sma_func_name ::= LAST */ yytestcase(yyruleno==330); + case 331: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==331); + case 433: /* db_name ::= NK_ID */ yytestcase(yyruleno==433); + case 434: /* table_name ::= NK_ID */ yytestcase(yyruleno==434); + case 435: /* column_name ::= NK_ID */ yytestcase(yyruleno==435); + case 436: /* function_name ::= NK_ID */ yytestcase(yyruleno==436); + case 437: /* view_name ::= NK_ID */ yytestcase(yyruleno==437); + case 438: /* table_alias ::= NK_ID */ yytestcase(yyruleno==438); + case 439: /* column_alias ::= NK_ID */ yytestcase(yyruleno==439); + case 440: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==440); + case 441: /* user_name ::= NK_ID */ yytestcase(yyruleno==441); + case 442: /* topic_name ::= NK_ID */ yytestcase(yyruleno==442); + case 443: /* stream_name ::= NK_ID */ yytestcase(yyruleno==443); + case 444: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==444); + case 445: /* index_name ::= NK_ID */ yytestcase(yyruleno==445); + case 487: /* noarg_func ::= NOW */ yytestcase(yyruleno==487); + case 488: /* noarg_func ::= TODAY */ yytestcase(yyruleno==488); + case 489: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==489); + case 490: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==490); + case 491: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==491); + case 492: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==492); + case 493: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==493); + case 494: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==494); + case 495: /* noarg_func ::= USER */ yytestcase(yyruleno==495); + case 496: /* star_func ::= COUNT */ yytestcase(yyruleno==496); + case 497: /* star_func ::= FIRST */ yytestcase(yyruleno==497); + case 498: /* star_func ::= LAST */ yytestcase(yyruleno==498); + case 499: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==499); +{ yylhsminor.yy929 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy929 = yylhsminor.yy929; break; case 68: /* force_opt ::= */ case 94: /* not_exists_opt ::= */ yytestcase(yyruleno==94); case 96: /* exists_opt ::= */ yytestcase(yyruleno==96); - case 347: /* analyze_opt ::= */ yytestcase(yyruleno==347); - case 354: /* agg_func_opt ::= */ yytestcase(yyruleno==354); - case 360: /* or_replace_opt ::= */ yytestcase(yyruleno==360); - case 386: /* ignore_opt ::= */ yytestcase(yyruleno==386); - case 560: /* tag_mode_opt ::= */ yytestcase(yyruleno==560); - case 562: /* set_quantifier_opt ::= */ yytestcase(yyruleno==562); -{ yymsp[1].minor.yy985 = false; } + case 349: /* analyze_opt ::= */ yytestcase(yyruleno==349); + case 356: /* agg_func_opt ::= */ yytestcase(yyruleno==356); + case 362: /* or_replace_opt ::= */ yytestcase(yyruleno==362); + case 388: /* ignore_opt ::= */ yytestcase(yyruleno==388); + case 562: /* tag_mode_opt ::= */ yytestcase(yyruleno==562); + case 564: /* set_quantifier_opt ::= */ yytestcase(yyruleno==564); +{ yymsp[1].minor.yy437 = false; } break; case 69: /* force_opt ::= FORCE */ case 70: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==70); - case 348: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==348); - case 355: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==355); - case 561: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==561); - case 563: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==563); -{ yymsp[0].minor.yy985 = true; } + case 350: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==350); + case 357: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==357); + case 563: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==563); + case 565: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==565); +{ yymsp[0].minor.yy437 = true; } break; case 71: /* cmd ::= ALTER CLUSTER NK_STRING */ { pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -5044,241 +5060,241 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_VNODE_STMT, &yymsp[0].minor.yy0); } break; case 86: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy985, &yymsp[-1].minor.yy993, yymsp[0].minor.yy232); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy437, &yymsp[-1].minor.yy929, yymsp[0].minor.yy992); } break; case 87: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy437, &yymsp[0].minor.yy929); } break; case 88: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy993); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy929); } break; case 89: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy993, yymsp[0].minor.yy232); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy929, yymsp[0].minor.yy992); } break; case 90: /* cmd ::= FLUSH DATABASE db_name */ -{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy993); } +{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy929); } break; case 91: /* cmd ::= TRIM DATABASE db_name speed_opt */ -{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy993, yymsp[0].minor.yy92); } +{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy929, yymsp[0].minor.yy40); } break; case 92: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ -{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy993, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } +{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy929, yymsp[-1].minor.yy992, yymsp[0].minor.yy992); } break; case 93: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy985 = true; } +{ yymsp[-2].minor.yy437 = true; } break; case 95: /* exists_opt ::= IF EXISTS */ - case 361: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==361); - case 387: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==387); -{ yymsp[-1].minor.yy985 = true; } + case 363: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==363); + case 389: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==389); +{ yymsp[-1].minor.yy437 = true; } break; case 97: /* db_options ::= */ -{ yymsp[1].minor.yy232 = createDefaultDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy992 = createDefaultDatabaseOptions(pCxt); } break; case 98: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 99: /* db_options ::= db_options CACHEMODEL NK_STRING */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 100: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 101: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 102: /* db_options ::= db_options DURATION NK_INTEGER */ case 103: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==103); -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 104: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 105: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 106: /* db_options ::= db_options KEEP integer_list */ case 107: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==107); -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_KEEP, yymsp[0].minor.yy88); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_KEEP, yymsp[0].minor.yy364); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 108: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 109: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 110: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 111: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 112: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 113: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 114: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 115: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_RETENTIONS, yymsp[0].minor.yy88); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_RETENTIONS, yymsp[0].minor.yy364); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 116: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 117: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 118: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 119: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 120: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-3].minor.yy232, DB_OPTION_WAL_RETENTION_PERIOD, &t); + yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-3].minor.yy992, DB_OPTION_WAL_RETENTION_PERIOD, &t); } - yymsp[-3].minor.yy232 = yylhsminor.yy232; + yymsp[-3].minor.yy992 = yylhsminor.yy992; break; case 121: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 122: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-3].minor.yy232, DB_OPTION_WAL_RETENTION_SIZE, &t); + yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-3].minor.yy992, DB_OPTION_WAL_RETENTION_SIZE, &t); } - yymsp[-3].minor.yy232 = yylhsminor.yy232; + yymsp[-3].minor.yy992 = yylhsminor.yy992; break; case 123: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 124: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 125: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 126: /* db_options ::= db_options TABLE_PREFIX signed */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy232); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy992); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 127: /* db_options ::= db_options TABLE_SUFFIX signed */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy232); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy992); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 128: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ -{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 129: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy232 = createAlterDatabaseOptions(pCxt); yylhsminor.yy232 = setAlterDatabaseOption(pCxt, yylhsminor.yy232, &yymsp[0].minor.yy117); } - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createAlterDatabaseOptions(pCxt); yylhsminor.yy992 = setAlterDatabaseOption(pCxt, yylhsminor.yy992, &yymsp[0].minor.yy665); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; case 130: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy232 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy232, &yymsp[0].minor.yy117); } - yymsp[-1].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy992, &yymsp[0].minor.yy665); } + yymsp[-1].minor.yy992 = yylhsminor.yy992; break; case 131: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy117.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy665.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } break; case 132: /* alter_db_option ::= CACHEMODEL NK_STRING */ -{ yymsp[-1].minor.yy117.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy665.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } break; case 133: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -{ yymsp[-1].minor.yy117.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy665.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } break; case 134: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy117.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy665.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } break; case 135: /* alter_db_option ::= KEEP integer_list */ case 136: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==136); -{ yymsp[-1].minor.yy117.type = DB_OPTION_KEEP; yymsp[-1].minor.yy117.pList = yymsp[0].minor.yy88; } +{ yymsp[-1].minor.yy665.type = DB_OPTION_KEEP; yymsp[-1].minor.yy665.pList = yymsp[0].minor.yy364; } break; case 137: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy117.type = DB_OPTION_PAGES; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy665.type = DB_OPTION_PAGES; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } break; case 138: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy117.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy665.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } break; case 139: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -{ yymsp[-1].minor.yy117.type = DB_OPTION_WAL; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy665.type = DB_OPTION_WAL; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } break; case 140: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -{ yymsp[-1].minor.yy117.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy665.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } break; case 141: /* alter_db_option ::= MINROWS NK_INTEGER */ -{ yymsp[-1].minor.yy117.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy665.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } break; case 142: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy117.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy665.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } break; case 143: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yymsp[-2].minor.yy117.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy117.val = t; + yymsp[-2].minor.yy665.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy665.val = t; } break; case 144: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ -{ yymsp[-1].minor.yy117.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy665.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } break; case 145: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yymsp[-2].minor.yy117.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy117.val = t; + yymsp[-2].minor.yy665.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy665.val = t; } break; case 146: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ -{ yymsp[-1].minor.yy117.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy665.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } break; case 147: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy88 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy88 = yylhsminor.yy88; +{ yylhsminor.yy364 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy364 = yylhsminor.yy364; break; case 148: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 400: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==400); -{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy88 = yylhsminor.yy88; + case 402: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==402); +{ yylhsminor.yy364 = addNodeToList(pCxt, yymsp[-2].minor.yy364, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy364 = yylhsminor.yy364; break; case 149: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy88 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy88 = yylhsminor.yy88; +{ yylhsminor.yy364 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy364 = yylhsminor.yy364; break; case 150: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy88 = yylhsminor.yy88; +{ yylhsminor.yy364 = addNodeToList(pCxt, yymsp[-2].minor.yy364, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy364 = yylhsminor.yy364; break; case 151: /* retention_list ::= retention */ case 182: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==182); @@ -5286,290 +5302,290 @@ static YYACTIONTYPE yy_reduce( case 192: /* column_def_list ::= column_def */ yytestcase(yyruleno==192); case 236: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==236); case 241: /* col_name_list ::= col_name */ yytestcase(yyruleno==241); - case 305: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==305); - case 322: /* func_list ::= func */ yytestcase(yyruleno==322); - case 429: /* literal_list ::= signed_literal */ yytestcase(yyruleno==429); - case 500: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==500); - case 506: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==506); - case 565: /* select_list ::= select_item */ yytestcase(yyruleno==565); - case 576: /* partition_list ::= partition_item */ yytestcase(yyruleno==576); - case 635: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==635); -{ yylhsminor.yy88 = createNodeList(pCxt, yymsp[0].minor.yy232); } - yymsp[0].minor.yy88 = yylhsminor.yy88; + case 307: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==307); + case 324: /* func_list ::= func */ yytestcase(yyruleno==324); + case 431: /* literal_list ::= signed_literal */ yytestcase(yyruleno==431); + case 502: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==502); + case 508: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==508); + case 567: /* select_list ::= select_item */ yytestcase(yyruleno==567); + case 578: /* partition_list ::= partition_item */ yytestcase(yyruleno==578); + case 637: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==637); +{ yylhsminor.yy364 = createNodeList(pCxt, yymsp[0].minor.yy992); } + yymsp[0].minor.yy364 = yylhsminor.yy364; break; case 152: /* retention_list ::= retention_list NK_COMMA retention */ case 186: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==186); case 193: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==193); case 237: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==237); case 242: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==242); - case 306: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==306); - case 323: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==323); - case 430: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==430); - case 501: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==501); - case 566: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==566); - case 577: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==577); - case 636: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==636); -{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, yymsp[0].minor.yy232); } - yymsp[-2].minor.yy88 = yylhsminor.yy88; + case 308: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==308); + case 325: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==325); + case 432: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==432); + case 503: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==503); + case 568: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==568); + case 579: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==579); + case 638: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==638); +{ yylhsminor.yy364 = addNodeToList(pCxt, yymsp[-2].minor.yy364, yymsp[0].minor.yy992); } + yymsp[-2].minor.yy364 = yylhsminor.yy364; break; case 153: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ case 154: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==154); -{ yylhsminor.yy232 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 155: /* speed_opt ::= */ - case 356: /* bufsize_opt ::= */ yytestcase(yyruleno==356); -{ yymsp[1].minor.yy92 = 0; } + case 358: /* bufsize_opt ::= */ yytestcase(yyruleno==358); +{ yymsp[1].minor.yy40 = 0; } break; case 156: /* speed_opt ::= BWLIMIT NK_INTEGER */ - case 357: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==357); -{ yymsp[-1].minor.yy92 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } + case 359: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==359); +{ yymsp[-1].minor.yy40 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; case 158: /* start_opt ::= START WITH NK_INTEGER */ case 162: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==162); -{ yymsp[-2].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-2].minor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 159: /* start_opt ::= START WITH NK_STRING */ case 163: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==163); -{ yymsp[-2].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +{ yymsp[-2].minor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; case 160: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ case 164: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==164); -{ yymsp[-3].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +{ yymsp[-3].minor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } 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); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy985, yymsp[-5].minor.yy232, yymsp[-3].minor.yy88, yymsp[-1].minor.yy88, yymsp[0].minor.yy232); } +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy437, yymsp[-5].minor.yy992, yymsp[-3].minor.yy364, yymsp[-1].minor.yy364, yymsp[0].minor.yy992); } break; case 166: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy88); } +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy364); } break; case 168: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy88); } +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy364); } break; case 169: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy232); } +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy437, yymsp[0].minor.yy992); } break; case 170: /* cmd ::= ALTER TABLE alter_table_clause */ - case 402: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==402); - case 403: /* cmd ::= insert_query */ yytestcase(yyruleno==403); -{ pCxt->pRootNode = yymsp[0].minor.yy232; } + case 404: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==404); + case 405: /* cmd ::= insert_query */ yytestcase(yyruleno==405); +{ pCxt->pRootNode = yymsp[0].minor.yy992; } break; case 171: /* cmd ::= ALTER STABLE alter_table_clause */ -{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy232); } +{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy992); } break; case 172: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy232 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } - yymsp[-1].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy992, yymsp[0].minor.yy992); } + yymsp[-1].minor.yy992 = yylhsminor.yy992; break; case 173: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy232 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400); } - yymsp[-4].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy992, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy929, yymsp[0].minor.yy184); } + yymsp[-4].minor.yy992 = yylhsminor.yy992; break; case 174: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy232 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy232, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy993); } - yymsp[-3].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy992, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy929); } + yymsp[-3].minor.yy992 = yylhsminor.yy992; break; case 175: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy232 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400); } - yymsp[-4].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy992, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy929, yymsp[0].minor.yy184); } + yymsp[-4].minor.yy992 = yylhsminor.yy992; break; case 176: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy232 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy993, &yymsp[0].minor.yy993); } - yymsp[-4].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy992, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy929, &yymsp[0].minor.yy929); } + yymsp[-4].minor.yy992 = yylhsminor.yy992; break; case 177: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy232 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400); } - yymsp[-4].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy992, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy929, yymsp[0].minor.yy184); } + yymsp[-4].minor.yy992 = yylhsminor.yy992; break; case 178: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy232 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy232, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy993); } - yymsp[-3].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy992, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy929); } + yymsp[-3].minor.yy992 = yylhsminor.yy992; break; case 179: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy232 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400); } - yymsp[-4].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy992, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy929, yymsp[0].minor.yy184); } + yymsp[-4].minor.yy992 = yylhsminor.yy992; break; case 180: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy232 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy993, &yymsp[0].minor.yy993); } - yymsp[-4].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy992, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy929, &yymsp[0].minor.yy929); } + yymsp[-4].minor.yy992 = yylhsminor.yy992; break; case 181: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -{ yylhsminor.yy232 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy232, &yymsp[-2].minor.yy993, yymsp[0].minor.yy232); } - yymsp[-5].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy992, &yymsp[-2].minor.yy929, yymsp[0].minor.yy992); } + yymsp[-5].minor.yy992 = yylhsminor.yy992; break; case 183: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 507: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==507); -{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-1].minor.yy88, yymsp[0].minor.yy232); } - yymsp[-1].minor.yy88 = yylhsminor.yy88; + case 509: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==509); +{ yylhsminor.yy364 = addNodeToList(pCxt, yymsp[-1].minor.yy364, yymsp[0].minor.yy992); } + yymsp[-1].minor.yy364 = yylhsminor.yy364; break; case 184: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ -{ yylhsminor.yy232 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy985, yymsp[-8].minor.yy232, yymsp[-6].minor.yy232, yymsp[-5].minor.yy88, yymsp[-2].minor.yy88, yymsp[0].minor.yy232); } - yymsp[-9].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy437, yymsp[-8].minor.yy992, yymsp[-6].minor.yy992, yymsp[-5].minor.yy364, yymsp[-2].minor.yy364, yymsp[0].minor.yy992); } + yymsp[-9].minor.yy992 = yylhsminor.yy992; break; case 187: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy232 = createDropTableClause(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy232); } - yymsp[-1].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createDropTableClause(pCxt, yymsp[-1].minor.yy437, yymsp[0].minor.yy992); } + yymsp[-1].minor.yy992 = yylhsminor.yy992; break; case 189: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ - case 371: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==371); -{ yymsp[-2].minor.yy88 = yymsp[-1].minor.yy88; } + case 373: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==373); +{ yymsp[-2].minor.yy364 = yymsp[-1].minor.yy364; } break; case 190: /* full_table_name ::= table_name */ -{ yylhsminor.yy232 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy993, NULL); } - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy929, NULL); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; case 191: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy232 = createRealTableNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993, NULL); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createRealTableNode(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy929, NULL); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 194: /* column_def ::= column_name type_name */ -{ yylhsminor.yy232 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400, NULL); } - yymsp[-1].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy929, yymsp[0].minor.yy184, NULL); } + yymsp[-1].minor.yy992 = yylhsminor.yy992; break; case 195: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_BOOL); } +{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 196: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_TINYINT); } +{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 197: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 198: /* type_name ::= INT */ case 199: /* type_name ::= INTEGER */ yytestcase(yyruleno==199); -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_INT); } +{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_INT); } break; case 200: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_BIGINT); } +{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 201: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_FLOAT); } +{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 202: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 203: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy184 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 204: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 205: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy184 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 206: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +{ yymsp[-1].minor.yy184 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 207: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +{ yymsp[-1].minor.yy184 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 208: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_UINT); } +{ yymsp[-1].minor.yy184 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 209: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +{ yymsp[-1].minor.yy184 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 210: /* type_name ::= JSON */ -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_JSON); } +{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 211: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy184 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 212: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 213: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_BLOB); } +{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 214: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy184 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 215: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy184 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } break; case 216: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 217: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy400 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-3].minor.yy184 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 218: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy400 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-5].minor.yy184 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 221: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ - case 374: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==374); -{ yymsp[-3].minor.yy88 = yymsp[-1].minor.yy88; } + case 376: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==376); +{ yymsp[-3].minor.yy364 = yymsp[-1].minor.yy364; } break; case 222: /* table_options ::= */ -{ yymsp[1].minor.yy232 = createDefaultTableOptions(pCxt); } +{ yymsp[1].minor.yy992 = createDefaultTableOptions(pCxt); } break; case 223: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setTableOption(pCxt, yymsp[-2].minor.yy992, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 224: /* table_options ::= table_options MAX_DELAY duration_list */ -{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy88); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setTableOption(pCxt, yymsp[-2].minor.yy992, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy364); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 225: /* table_options ::= table_options WATERMARK duration_list */ -{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy88); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setTableOption(pCxt, yymsp[-2].minor.yy992, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy364); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 226: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-4].minor.yy232, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy88); } - yymsp[-4].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setTableOption(pCxt, yymsp[-4].minor.yy992, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy364); } + yymsp[-4].minor.yy992 = yylhsminor.yy992; break; case 227: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setTableOption(pCxt, yymsp[-2].minor.yy992, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 228: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-4].minor.yy232, TABLE_OPTION_SMA, yymsp[-1].minor.yy88); } - yymsp[-4].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setTableOption(pCxt, yymsp[-4].minor.yy992, TABLE_OPTION_SMA, yymsp[-1].minor.yy364); } + yymsp[-4].minor.yy992 = yylhsminor.yy992; break; case 229: /* table_options ::= table_options DELETE_MARK duration_list */ -{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy88); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setTableOption(pCxt, yymsp[-2].minor.yy992, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy364); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; case 230: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy232 = createAlterTableOptions(pCxt); yylhsminor.yy232 = setTableOption(pCxt, yylhsminor.yy232, yymsp[0].minor.yy117.type, &yymsp[0].minor.yy117.val); } - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createAlterTableOptions(pCxt); yylhsminor.yy992 = setTableOption(pCxt, yylhsminor.yy992, yymsp[0].minor.yy665.type, &yymsp[0].minor.yy665.val); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; case 231: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-1].minor.yy232, yymsp[0].minor.yy117.type, &yymsp[0].minor.yy117.val); } - yymsp[-1].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = setTableOption(pCxt, yymsp[-1].minor.yy992, yymsp[0].minor.yy665.type, &yymsp[0].minor.yy665.val); } + yymsp[-1].minor.yy992 = yylhsminor.yy992; break; case 232: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy117.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy665.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } break; case 233: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy117.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy665.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } break; case 234: /* duration_list ::= duration_literal */ - case 461: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==461); -{ yylhsminor.yy88 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } - yymsp[0].minor.yy88 = yylhsminor.yy88; + case 463: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==463); +{ yylhsminor.yy364 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy992)); } + yymsp[0].minor.yy364 = yylhsminor.yy364; break; case 235: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 462: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==462); -{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } - yymsp[-2].minor.yy88 = yylhsminor.yy88; + case 464: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==464); +{ yylhsminor.yy364 = addNodeToList(pCxt, yymsp[-2].minor.yy364, releaseRawExprNode(pCxt, yymsp[0].minor.yy992)); } + yymsp[-2].minor.yy364 = yylhsminor.yy364; break; case 238: /* rollup_func_name ::= function_name */ -{ yylhsminor.yy232 = createFunctionNode(pCxt, &yymsp[0].minor.yy993, NULL); } - yymsp[0].minor.yy232 = yylhsminor.yy232; +{ yylhsminor.yy992 = createFunctionNode(pCxt, &yymsp[0].minor.yy929, NULL); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; case 239: /* rollup_func_name ::= FIRST */ case 240: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==240); - case 308: /* tag_item ::= QTAGS */ yytestcase(yyruleno==308); -{ yylhsminor.yy232 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 310: /* tag_item ::= QTAGS */ yytestcase(yyruleno==310); +{ yylhsminor.yy992 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; case 243: /* col_name ::= column_name */ - case 309: /* tag_item ::= column_name */ yytestcase(yyruleno==309); -{ yylhsminor.yy232 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy993); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 311: /* tag_item ::= column_name */ yytestcase(yyruleno==311); +{ yylhsminor.yy992 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy929); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; case 244: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } @@ -5583,19 +5599,19 @@ static YYACTIONTYPE yy_reduce( case 247: /* cmd ::= SHOW db_kind_opt DATABASES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); - setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy281); + setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy430); } break; case 248: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ { - pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy133, yymsp[0].minor.yy232, OP_TYPE_LIKE); + pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy277, yymsp[0].minor.yy992, OP_TYPE_LIKE); } break; case 249: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy232, yymsp[0].minor.yy232, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy992, yymsp[0].minor.yy992, OP_TYPE_LIKE); } break; case 250: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy232, NULL, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy992, NULL, OP_TYPE_LIKE); } break; case 251: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } @@ -5607,10 +5623,10 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; case 254: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy232, yymsp[-1].minor.yy232, OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy992, yymsp[-1].minor.yy992, OP_TYPE_EQUAL); } break; case 255: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy993), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993), OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy929), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy929), OP_TYPE_EQUAL); } break; case 256: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } @@ -5628,927 +5644,933 @@ static YYACTIONTYPE yy_reduce( case 261: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==261); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } break; - case 262: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy993); } + case 262: /* cmd ::= SHOW GRANTS FULL */ +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); } break; - case 263: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy232); } + case 263: /* cmd ::= SHOW GRANTS LOG */ +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOG_STMT); } break; - case 264: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy232); } + case 264: /* cmd ::= SHOW CREATE DATABASE db_name */ +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy929); } break; - case 265: /* cmd ::= SHOW QUERIES */ + case 265: /* cmd ::= SHOW CREATE TABLE full_table_name */ +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy992); } + break; + case 266: /* cmd ::= SHOW CREATE STABLE full_table_name */ +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy992); } + break; + case 267: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } break; - case 266: /* cmd ::= SHOW SCORES */ + case 268: /* cmd ::= SHOW SCORES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } break; - case 267: /* cmd ::= SHOW TOPICS */ + case 269: /* cmd ::= SHOW TOPICS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } break; - case 268: /* cmd ::= SHOW VARIABLES */ - case 269: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==269); + case 270: /* cmd ::= SHOW VARIABLES */ + case 271: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==271); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } break; - case 270: /* cmd ::= SHOW LOCAL VARIABLES */ + case 272: /* cmd ::= SHOW LOCAL VARIABLES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } break; - case 271: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy232); } + case 273: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ +{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy992); } break; - case 272: /* cmd ::= SHOW BNODES */ + case 274: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } break; - case 273: /* cmd ::= SHOW SNODES */ + case 275: /* cmd ::= SHOW SNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } break; - case 274: /* cmd ::= SHOW CLUSTER */ + case 276: /* cmd ::= SHOW CLUSTER */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } break; - case 275: /* cmd ::= SHOW TRANSACTIONS */ + case 277: /* cmd ::= SHOW TRANSACTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; - case 276: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy232); } + case 278: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ +{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy992); } break; - case 277: /* cmd ::= SHOW CONSUMERS */ + case 279: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } break; - case 278: /* cmd ::= SHOW SUBSCRIPTIONS */ + case 280: /* cmd ::= SHOW SUBSCRIPTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } break; - case 279: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy232, yymsp[-1].minor.yy232, OP_TYPE_EQUAL); } + case 281: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy992, yymsp[-1].minor.yy992, OP_TYPE_EQUAL); } break; - case 280: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy993), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993), OP_TYPE_EQUAL); } + case 282: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy929), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy929), OP_TYPE_EQUAL); } break; - case 281: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy232, yymsp[0].minor.yy232, yymsp[-3].minor.yy88); } + case 283: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy992, yymsp[0].minor.yy992, yymsp[-3].minor.yy364); } break; - case 282: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy993), yymsp[-4].minor.yy88); } + case 284: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy929), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy929), yymsp[-4].minor.yy364); } break; - case 283: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + case 285: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } break; - case 284: /* cmd ::= SHOW VNODES */ + case 286: /* cmd ::= SHOW VNODES */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, NULL); } break; - case 285: /* cmd ::= SHOW db_name_cond_opt ALIVE */ -{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy232, QUERY_NODE_SHOW_DB_ALIVE_STMT); } + case 287: /* cmd ::= SHOW db_name_cond_opt ALIVE */ +{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy992, QUERY_NODE_SHOW_DB_ALIVE_STMT); } break; - case 286: /* cmd ::= SHOW CLUSTER ALIVE */ + case 288: /* cmd ::= SHOW CLUSTER ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } break; - case 287: /* cmd ::= SHOW db_name_cond_opt VIEWS */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-1].minor.yy232, NULL, OP_TYPE_LIKE); } + case 289: /* cmd ::= SHOW db_name_cond_opt VIEWS */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-1].minor.yy992, NULL, OP_TYPE_LIKE); } break; - case 288: /* cmd ::= SHOW CREATE VIEW full_table_name */ -{ pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy232); } + case 290: /* cmd ::= SHOW CREATE VIEW full_table_name */ +{ pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy992); } break; - case 289: /* cmd ::= SHOW COMPACTS */ + case 291: /* cmd ::= SHOW COMPACTS */ { pCxt->pRootNode = createShowCompactsStmt(pCxt, QUERY_NODE_SHOW_COMPACTS_STMT); } break; - case 290: /* cmd ::= SHOW COMPACT NK_INTEGER */ + case 292: /* cmd ::= SHOW COMPACT NK_INTEGER */ { pCxt->pRootNode = createShowCompactDetailsStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 291: /* table_kind_db_name_cond_opt ::= */ -{ yymsp[1].minor.yy133.kind = SHOW_KIND_ALL; yymsp[1].minor.yy133.dbName = nil_token; } + case 293: /* table_kind_db_name_cond_opt ::= */ +{ yymsp[1].minor.yy277.kind = SHOW_KIND_ALL; yymsp[1].minor.yy277.dbName = nil_token; } break; - case 292: /* table_kind_db_name_cond_opt ::= table_kind */ -{ yylhsminor.yy133.kind = yymsp[0].minor.yy281; yylhsminor.yy133.dbName = nil_token; } - yymsp[0].minor.yy133 = yylhsminor.yy133; + case 294: /* table_kind_db_name_cond_opt ::= table_kind */ +{ yylhsminor.yy277.kind = yymsp[0].minor.yy430; yylhsminor.yy277.dbName = nil_token; } + yymsp[0].minor.yy277 = yylhsminor.yy277; break; - case 293: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy133.kind = SHOW_KIND_ALL; yylhsminor.yy133.dbName = yymsp[-1].minor.yy993; } - yymsp[-1].minor.yy133 = yylhsminor.yy133; + case 295: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ +{ yylhsminor.yy277.kind = SHOW_KIND_ALL; yylhsminor.yy277.dbName = yymsp[-1].minor.yy929; } + yymsp[-1].minor.yy277 = yylhsminor.yy277; break; - case 294: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ -{ yylhsminor.yy133.kind = yymsp[-2].minor.yy281; yylhsminor.yy133.dbName = yymsp[-1].minor.yy993; } - yymsp[-2].minor.yy133 = yylhsminor.yy133; + case 296: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ +{ yylhsminor.yy277.kind = yymsp[-2].minor.yy430; yylhsminor.yy277.dbName = yymsp[-1].minor.yy929; } + yymsp[-2].minor.yy277 = yylhsminor.yy277; break; - case 295: /* table_kind ::= NORMAL */ -{ yymsp[0].minor.yy281 = SHOW_KIND_TABLES_NORMAL; } + case 297: /* table_kind ::= NORMAL */ +{ yymsp[0].minor.yy430 = SHOW_KIND_TABLES_NORMAL; } break; - case 296: /* table_kind ::= CHILD */ -{ yymsp[0].minor.yy281 = SHOW_KIND_TABLES_CHILD; } + case 298: /* table_kind ::= CHILD */ +{ yymsp[0].minor.yy430 = SHOW_KIND_TABLES_CHILD; } break; - case 297: /* db_name_cond_opt ::= */ - case 302: /* from_db_opt ::= */ yytestcase(yyruleno==302); -{ yymsp[1].minor.yy232 = createDefaultDatabaseCondValue(pCxt); } + case 299: /* db_name_cond_opt ::= */ + case 304: /* from_db_opt ::= */ yytestcase(yyruleno==304); +{ yymsp[1].minor.yy992 = createDefaultDatabaseCondValue(pCxt); } break; - case 298: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy232 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy993); } - yymsp[-1].minor.yy232 = yylhsminor.yy232; + case 300: /* db_name_cond_opt ::= db_name NK_DOT */ +{ yylhsminor.yy992 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy929); } + yymsp[-1].minor.yy992 = yylhsminor.yy992; break; - case 300: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + case 302: /* like_pattern_opt ::= LIKE NK_STRING */ +{ yymsp[-1].minor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; - case 301: /* table_name_cond ::= table_name */ -{ yylhsminor.yy232 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 303: /* table_name_cond ::= table_name */ +{ yylhsminor.yy992 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy929); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 303: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy232 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993); } + case 305: /* from_db_opt ::= FROM db_name */ +{ yymsp[-1].minor.yy992 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy929); } break; - case 307: /* tag_item ::= TBNAME */ -{ yylhsminor.yy232 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 309: /* tag_item ::= TBNAME */ +{ yylhsminor.yy992 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 310: /* tag_item ::= column_name column_alias */ -{ yylhsminor.yy232 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy993), &yymsp[0].minor.yy993); } - yymsp[-1].minor.yy232 = yylhsminor.yy232; + case 312: /* tag_item ::= column_name column_alias */ +{ yylhsminor.yy992 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy929), &yymsp[0].minor.yy929); } + yymsp[-1].minor.yy992 = yylhsminor.yy992; break; - case 311: /* tag_item ::= column_name AS column_alias */ -{ yylhsminor.yy232 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy993), &yymsp[0].minor.yy993); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 313: /* tag_item ::= column_name AS column_alias */ +{ yylhsminor.yy992 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy929), &yymsp[0].minor.yy929); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 312: /* db_kind_opt ::= */ -{ yymsp[1].minor.yy281 = SHOW_KIND_ALL; } + case 314: /* db_kind_opt ::= */ +{ yymsp[1].minor.yy430 = SHOW_KIND_ALL; } break; - case 313: /* db_kind_opt ::= USER */ -{ yymsp[0].minor.yy281 = SHOW_KIND_DATABASES_USER; } + case 315: /* db_kind_opt ::= USER */ +{ yymsp[0].minor.yy430 = SHOW_KIND_DATABASES_USER; } break; - case 314: /* db_kind_opt ::= SYSTEM */ -{ yymsp[0].minor.yy281 = SHOW_KIND_DATABASES_SYSTEM; } + case 316: /* db_kind_opt ::= SYSTEM */ +{ yymsp[0].minor.yy430 = SHOW_KIND_DATABASES_SYSTEM; } break; - case 315: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy985, yymsp[-3].minor.yy232, yymsp[-1].minor.yy232, NULL, yymsp[0].minor.yy232); } + case 317: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy437, yymsp[-3].minor.yy992, yymsp[-1].minor.yy992, NULL, yymsp[0].minor.yy992); } break; - case 316: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy985, yymsp[-5].minor.yy232, yymsp[-3].minor.yy232, yymsp[-1].minor.yy88, NULL); } + case 318: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy437, yymsp[-5].minor.yy992, yymsp[-3].minor.yy992, yymsp[-1].minor.yy364, NULL); } break; - case 317: /* cmd ::= DROP INDEX exists_opt full_index_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy232); } + case 319: /* cmd ::= DROP INDEX exists_opt full_index_name */ +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy437, yymsp[0].minor.yy992); } break; - case 318: /* full_index_name ::= index_name */ -{ yylhsminor.yy232 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy993); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 320: /* full_index_name ::= index_name */ +{ yylhsminor.yy992 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy929); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 319: /* full_index_name ::= db_name NK_DOT index_name */ -{ yylhsminor.yy232 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 321: /* full_index_name ::= db_name NK_DOT index_name */ +{ yylhsminor.yy992 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy929); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 320: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-9].minor.yy232 = createIndexOption(pCxt, yymsp[-7].minor.yy88, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), NULL, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } + case 322: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ +{ yymsp[-9].minor.yy992 = createIndexOption(pCxt, yymsp[-7].minor.yy364, releaseRawExprNode(pCxt, yymsp[-3].minor.yy992), NULL, yymsp[-1].minor.yy992, yymsp[0].minor.yy992); } break; - case 321: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-11].minor.yy232 = createIndexOption(pCxt, yymsp[-9].minor.yy88, releaseRawExprNode(pCxt, yymsp[-5].minor.yy232), releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } + case 323: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ +{ yymsp[-11].minor.yy992 = createIndexOption(pCxt, yymsp[-9].minor.yy364, releaseRawExprNode(pCxt, yymsp[-5].minor.yy992), releaseRawExprNode(pCxt, yymsp[-3].minor.yy992), yymsp[-1].minor.yy992, yymsp[0].minor.yy992); } break; - case 324: /* func ::= sma_func_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy232 = createFunctionNode(pCxt, &yymsp[-3].minor.yy993, yymsp[-1].minor.yy88); } - yymsp[-3].minor.yy232 = yylhsminor.yy232; + case 326: /* func ::= sma_func_name NK_LP expression_list NK_RP */ +{ yylhsminor.yy992 = createFunctionNode(pCxt, &yymsp[-3].minor.yy929, yymsp[-1].minor.yy364); } + yymsp[-3].minor.yy992 = yylhsminor.yy992; break; - case 325: /* sma_func_name ::= function_name */ - case 550: /* alias_opt ::= table_alias */ yytestcase(yyruleno==550); -{ yylhsminor.yy993 = yymsp[0].minor.yy993; } - yymsp[0].minor.yy993 = yylhsminor.yy993; + case 327: /* sma_func_name ::= function_name */ + case 552: /* alias_opt ::= table_alias */ yytestcase(yyruleno==552); +{ yylhsminor.yy929 = yymsp[0].minor.yy929; } + yymsp[0].minor.yy929 = yylhsminor.yy929; break; - case 330: /* sma_stream_opt ::= */ - case 375: /* stream_options ::= */ yytestcase(yyruleno==375); -{ yymsp[1].minor.yy232 = createStreamOptions(pCxt); } + case 332: /* sma_stream_opt ::= */ + case 377: /* stream_options ::= */ yytestcase(yyruleno==377); +{ yymsp[1].minor.yy992 = createStreamOptions(pCxt); } break; - case 331: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy232)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = yymsp[-2].minor.yy232; } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 333: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy992)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy992); yylhsminor.yy992 = yymsp[-2].minor.yy992; } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 332: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy232)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = yymsp[-2].minor.yy232; } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 334: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy992)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy992); yylhsminor.yy992 = yymsp[-2].minor.yy992; } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 333: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy232)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = yymsp[-2].minor.yy232; } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 335: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy992)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy992); yylhsminor.yy992 = yymsp[-2].minor.yy992; } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 334: /* with_meta ::= AS */ -{ yymsp[0].minor.yy92 = 0; } + case 336: /* with_meta ::= AS */ +{ yymsp[0].minor.yy40 = 0; } break; - case 335: /* with_meta ::= WITH META AS */ -{ yymsp[-2].minor.yy92 = 1; } + case 337: /* with_meta ::= WITH META AS */ +{ yymsp[-2].minor.yy40 = 1; } break; - case 336: /* with_meta ::= ONLY META AS */ -{ yymsp[-2].minor.yy92 = 2; } + case 338: /* with_meta ::= ONLY META AS */ +{ yymsp[-2].minor.yy40 = 2; } break; - case 337: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy985, &yymsp[-2].minor.yy993, yymsp[0].minor.yy232); } + case 339: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ +{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy437, &yymsp[-2].minor.yy929, yymsp[0].minor.yy992); } break; - case 338: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy985, &yymsp[-3].minor.yy993, &yymsp[0].minor.yy993, yymsp[-2].minor.yy92); } + case 340: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy437, &yymsp[-3].minor.yy929, &yymsp[0].minor.yy929, yymsp[-2].minor.yy40); } break; - case 339: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy985, &yymsp[-4].minor.yy993, yymsp[-1].minor.yy232, yymsp[-3].minor.yy92, yymsp[0].minor.yy232); } + case 341: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy437, &yymsp[-4].minor.yy929, yymsp[-1].minor.yy992, yymsp[-3].minor.yy40, yymsp[0].minor.yy992); } break; - case 340: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); } + case 342: /* cmd ::= DROP TOPIC exists_opt topic_name */ +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy437, &yymsp[0].minor.yy929); } break; - case 341: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy985, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993); } + case 343: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy437, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy929); } break; - case 342: /* cmd ::= DESC full_table_name */ - case 343: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==343); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy232); } + case 344: /* cmd ::= DESC full_table_name */ + case 345: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==345); +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy992); } break; - case 344: /* cmd ::= RESET QUERY CACHE */ + case 346: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 345: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - case 346: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==346); -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy985, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } + case 347: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + case 348: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==348); +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy437, yymsp[-1].minor.yy992, yymsp[0].minor.yy992); } break; - case 349: /* explain_options ::= */ -{ yymsp[1].minor.yy232 = createDefaultExplainOptions(pCxt); } + case 351: /* explain_options ::= */ +{ yymsp[1].minor.yy992 = createDefaultExplainOptions(pCxt); } break; - case 350: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy232 = setExplainVerbose(pCxt, yymsp[-2].minor.yy232, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 352: /* explain_options ::= explain_options VERBOSE NK_BOOL */ +{ yylhsminor.yy992 = setExplainVerbose(pCxt, yymsp[-2].minor.yy992, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 351: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy232 = setExplainRatio(pCxt, yymsp[-2].minor.yy232, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 353: /* explain_options ::= explain_options RATIO NK_FLOAT */ +{ yylhsminor.yy992 = setExplainRatio(pCxt, yymsp[-2].minor.yy992, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 352: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ -{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy985, yymsp[-9].minor.yy985, &yymsp[-6].minor.yy993, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy400, yymsp[-1].minor.yy92, &yymsp[0].minor.yy993, yymsp[-10].minor.yy985); } + case 354: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy437, yymsp[-9].minor.yy437, &yymsp[-6].minor.yy929, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy184, yymsp[-1].minor.yy40, &yymsp[0].minor.yy929, yymsp[-10].minor.yy437); } break; - case 353: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); } + case 355: /* cmd ::= DROP FUNCTION exists_opt function_name */ +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy437, &yymsp[0].minor.yy929); } break; - case 358: /* language_opt ::= */ - case 397: /* on_vgroup_id ::= */ yytestcase(yyruleno==397); -{ yymsp[1].minor.yy993 = nil_token; } + case 360: /* language_opt ::= */ + case 399: /* on_vgroup_id ::= */ yytestcase(yyruleno==399); +{ yymsp[1].minor.yy929 = nil_token; } break; - case 359: /* language_opt ::= LANGUAGE NK_STRING */ - case 398: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==398); -{ yymsp[-1].minor.yy993 = yymsp[0].minor.yy0; } + case 361: /* language_opt ::= LANGUAGE NK_STRING */ + case 400: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==400); +{ yymsp[-1].minor.yy929 = yymsp[0].minor.yy0; } break; - case 362: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy985, yymsp[-2].minor.yy232, &yymsp[-1].minor.yy0, yymsp[0].minor.yy232); } + case 364: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ +{ pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy437, yymsp[-2].minor.yy992, &yymsp[-1].minor.yy0, yymsp[0].minor.yy992); } break; - case 363: /* cmd ::= DROP VIEW exists_opt full_view_name */ -{ pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy232); } + case 365: /* cmd ::= DROP VIEW exists_opt full_view_name */ +{ pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy437, yymsp[0].minor.yy992); } break; - case 364: /* full_view_name ::= view_name */ -{ yylhsminor.yy232 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy993); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 366: /* full_view_name ::= view_name */ +{ yylhsminor.yy992 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy929); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 365: /* full_view_name ::= db_name NK_DOT view_name */ -{ yylhsminor.yy232 = createViewNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 367: /* full_view_name ::= db_name NK_DOT view_name */ +{ yylhsminor.yy992 = createViewNode(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy929); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 366: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy985, &yymsp[-8].minor.yy993, yymsp[-5].minor.yy232, yymsp[-7].minor.yy232, yymsp[-3].minor.yy88, yymsp[-2].minor.yy232, yymsp[0].minor.yy232, yymsp[-4].minor.yy88); } + case 368: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy437, &yymsp[-8].minor.yy929, yymsp[-5].minor.yy992, yymsp[-7].minor.yy992, yymsp[-3].minor.yy364, yymsp[-2].minor.yy992, yymsp[0].minor.yy992, yymsp[-4].minor.yy364); } break; - case 367: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); } + case 369: /* cmd ::= DROP STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy437, &yymsp[0].minor.yy929); } break; - case 368: /* cmd ::= PAUSE STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); } + case 370: /* cmd ::= PAUSE STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy437, &yymsp[0].minor.yy929); } break; - case 369: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ -{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy985, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); } + case 371: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ +{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy437, yymsp[-1].minor.yy437, &yymsp[0].minor.yy929); } break; - case 376: /* stream_options ::= stream_options TRIGGER AT_ONCE */ - case 377: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==377); -{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-2].minor.yy232, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 378: /* stream_options ::= stream_options TRIGGER AT_ONCE */ + case 379: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==379); +{ yylhsminor.yy992 = setStreamOptions(pCxt, yymsp[-2].minor.yy992, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 378: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-3].minor.yy232, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } - yymsp[-3].minor.yy232 = yylhsminor.yy232; + case 380: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ +{ yylhsminor.yy992 = setStreamOptions(pCxt, yymsp[-3].minor.yy992, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy992)); } + yymsp[-3].minor.yy992 = yylhsminor.yy992; break; - case 379: /* stream_options ::= stream_options WATERMARK duration_literal */ -{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-2].minor.yy232, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 381: /* stream_options ::= stream_options WATERMARK duration_literal */ +{ yylhsminor.yy992 = setStreamOptions(pCxt, yymsp[-2].minor.yy992, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy992)); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 380: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-3].minor.yy232, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-3].minor.yy232 = yylhsminor.yy232; + case 382: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ +{ yylhsminor.yy992 = setStreamOptions(pCxt, yymsp[-3].minor.yy992, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-3].minor.yy992 = yylhsminor.yy992; break; - case 381: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-2].minor.yy232, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 383: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ +{ yylhsminor.yy992 = setStreamOptions(pCxt, yymsp[-2].minor.yy992, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 382: /* stream_options ::= stream_options DELETE_MARK duration_literal */ -{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-2].minor.yy232, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 384: /* stream_options ::= stream_options DELETE_MARK duration_literal */ +{ yylhsminor.yy992 = setStreamOptions(pCxt, yymsp[-2].minor.yy992, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy992)); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 383: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ -{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-3].minor.yy232, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-3].minor.yy232 = yylhsminor.yy232; + case 385: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ +{ yylhsminor.yy992 = setStreamOptions(pCxt, yymsp[-3].minor.yy992, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-3].minor.yy992 = yylhsminor.yy992; break; - case 385: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 588: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==588); - case 612: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==612); -{ yymsp[-3].minor.yy232 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy232); } + case 387: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 590: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==590); + case 614: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==614); +{ yymsp[-3].minor.yy992 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy992); } break; - case 388: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 390: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 389: /* cmd ::= KILL QUERY NK_STRING */ + case 391: /* cmd ::= KILL QUERY NK_STRING */ { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 390: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 392: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 391: /* cmd ::= KILL COMPACT NK_INTEGER */ + case 393: /* cmd ::= KILL COMPACT NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_COMPACT_STMT, &yymsp[0].minor.yy0); } break; - case 392: /* cmd ::= BALANCE VGROUP */ + case 394: /* cmd ::= BALANCE VGROUP */ { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } break; - case 393: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ -{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy993); } + case 395: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ +{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy929); } break; - case 394: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 396: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 395: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy88); } + case 397: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy364); } break; - case 396: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 398: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 399: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy88 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + case 401: /* dnode_list ::= DNODE NK_INTEGER */ +{ yymsp[-1].minor.yy364 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 401: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } + case 403: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ +{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy992, yymsp[0].minor.yy992); } break; - case 404: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -{ yymsp[-6].minor.yy232 = createInsertStmt(pCxt, yymsp[-4].minor.yy232, yymsp[-2].minor.yy88, yymsp[0].minor.yy232); } + case 406: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ +{ yymsp[-6].minor.yy992 = createInsertStmt(pCxt, yymsp[-4].minor.yy992, yymsp[-2].minor.yy364, yymsp[0].minor.yy992); } break; - case 405: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ -{ yymsp[-3].minor.yy232 = createInsertStmt(pCxt, yymsp[-1].minor.yy232, NULL, yymsp[0].minor.yy232); } + case 407: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ +{ yymsp[-3].minor.yy992 = createInsertStmt(pCxt, yymsp[-1].minor.yy992, NULL, yymsp[0].minor.yy992); } break; - case 406: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 408: /* literal ::= NK_INTEGER */ +{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 407: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 409: /* literal ::= NK_FLOAT */ +{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 408: /* literal ::= NK_STRING */ -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 410: /* literal ::= NK_STRING */ +{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 409: /* literal ::= NK_BOOL */ -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 411: /* literal ::= NK_BOOL */ +{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 410: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy232 = yylhsminor.yy232; + case 412: /* literal ::= TIMESTAMP NK_STRING */ +{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy992 = yylhsminor.yy992; break; - case 411: /* literal ::= duration_literal */ - case 421: /* signed_literal ::= signed */ yytestcase(yyruleno==421); - case 444: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==444); - case 445: /* expression ::= literal */ yytestcase(yyruleno==445); - case 447: /* expression ::= column_reference */ yytestcase(yyruleno==447); - case 448: /* expression ::= function_expression */ yytestcase(yyruleno==448); - case 449: /* expression ::= case_when_expression */ yytestcase(yyruleno==449); - case 482: /* function_expression ::= literal_func */ yytestcase(yyruleno==482); - case 531: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==531); - case 535: /* boolean_primary ::= predicate */ yytestcase(yyruleno==535); - case 537: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==537); - case 538: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==538); - case 541: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==541); - case 543: /* table_reference ::= table_primary */ yytestcase(yyruleno==543); - case 544: /* table_reference ::= joined_table */ yytestcase(yyruleno==544); - case 548: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==548); - case 614: /* query_simple ::= query_specification */ yytestcase(yyruleno==614); - case 615: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==615); - case 618: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==618); - case 620: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==620); -{ yylhsminor.yy232 = yymsp[0].minor.yy232; } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 413: /* literal ::= duration_literal */ + case 423: /* signed_literal ::= signed */ yytestcase(yyruleno==423); + case 446: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==446); + case 447: /* expression ::= literal */ yytestcase(yyruleno==447); + case 449: /* expression ::= column_reference */ yytestcase(yyruleno==449); + case 450: /* expression ::= function_expression */ yytestcase(yyruleno==450); + case 451: /* expression ::= case_when_expression */ yytestcase(yyruleno==451); + case 484: /* function_expression ::= literal_func */ yytestcase(yyruleno==484); + case 533: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==533); + case 537: /* boolean_primary ::= predicate */ yytestcase(yyruleno==537); + case 539: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==539); + case 540: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==540); + case 543: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==543); + case 545: /* table_reference ::= table_primary */ yytestcase(yyruleno==545); + case 546: /* table_reference ::= joined_table */ yytestcase(yyruleno==546); + case 550: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==550); + case 616: /* query_simple ::= query_specification */ yytestcase(yyruleno==616); + case 617: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==617); + case 620: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==620); + case 622: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==622); +{ yylhsminor.yy992 = yymsp[0].minor.yy992; } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 412: /* literal ::= NULL */ -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 414: /* literal ::= NULL */ +{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 413: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 415: /* literal ::= NK_QUESTION */ +{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 414: /* duration_literal ::= NK_VARIABLE */ - case 589: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==589); - case 590: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==590); - case 591: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==591); -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 416: /* duration_literal ::= NK_VARIABLE */ + case 591: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==591); + case 592: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==592); + case 593: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==593); +{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 415: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 417: /* signed ::= NK_INTEGER */ +{ yylhsminor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 416: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + case 418: /* signed ::= NK_PLUS NK_INTEGER */ +{ yymsp[-1].minor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; - case 417: /* signed ::= NK_MINUS NK_INTEGER */ + case 419: /* 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.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy232 = yylhsminor.yy232; + yymsp[-1].minor.yy992 = yylhsminor.yy992; break; - case 418: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 420: /* signed ::= NK_FLOAT */ +{ yylhsminor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 419: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + case 421: /* signed ::= NK_PLUS NK_FLOAT */ +{ yymsp[-1].minor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 420: /* signed ::= NK_MINUS NK_FLOAT */ + case 422: /* 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.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy232 = yylhsminor.yy232; + yymsp[-1].minor.yy992 = yylhsminor.yy992; break; - case 422: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 424: /* signed_literal ::= NK_STRING */ +{ yylhsminor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 423: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 425: /* signed_literal ::= NK_BOOL */ +{ yylhsminor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 424: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + case 426: /* signed_literal ::= TIMESTAMP NK_STRING */ +{ yymsp[-1].minor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 425: /* signed_literal ::= duration_literal */ - case 427: /* signed_literal ::= literal_func */ yytestcase(yyruleno==427); - case 502: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==502); - case 568: /* select_item ::= common_expression */ yytestcase(yyruleno==568); - case 578: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==578); - case 619: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==619); - case 621: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==621); - case 634: /* search_condition ::= common_expression */ yytestcase(yyruleno==634); -{ yylhsminor.yy232 = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 427: /* signed_literal ::= duration_literal */ + case 429: /* signed_literal ::= literal_func */ yytestcase(yyruleno==429); + case 504: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==504); + case 570: /* select_item ::= common_expression */ yytestcase(yyruleno==570); + case 580: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==580); + case 621: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==621); + case 623: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==623); + case 636: /* search_condition ::= common_expression */ yytestcase(yyruleno==636); +{ yylhsminor.yy992 = releaseRawExprNode(pCxt, yymsp[0].minor.yy992); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 426: /* signed_literal ::= NULL */ -{ yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 428: /* signed_literal ::= NULL */ +{ yylhsminor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 428: /* signed_literal ::= NK_QUESTION */ -{ yylhsminor.yy232 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 430: /* signed_literal ::= NK_QUESTION */ +{ yylhsminor.yy992 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 446: /* expression ::= pseudo_column */ -{ yylhsminor.yy232 = yymsp[0].minor.yy232; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy232, true); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 448: /* expression ::= pseudo_column */ +{ yylhsminor.yy992 = yymsp[0].minor.yy992; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy992, true); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 450: /* expression ::= NK_LP expression NK_RP */ - case 536: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==536); - case 633: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==633); -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 452: /* expression ::= NK_LP expression NK_RP */ + case 538: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==538); + case 635: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==635); +{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy992)); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 451: /* expression ::= NK_PLUS expr_or_subquery */ + case 453: /* expression ::= NK_PLUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); + yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy992)); } - yymsp[-1].minor.yy232 = yylhsminor.yy232; + yymsp[-1].minor.yy992 = yylhsminor.yy992; break; - case 452: /* expression ::= NK_MINUS expr_or_subquery */ + case 454: /* expression ::= NK_MINUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy232), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); + yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy992), NULL)); } - yymsp[-1].minor.yy232 = yylhsminor.yy232; + yymsp[-1].minor.yy992 = yylhsminor.yy992; break; - case 453: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + case 455: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); + yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 454: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + case 456: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); + yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 455: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + case 457: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); + yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 456: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + case 458: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); + yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 457: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ + case 459: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); + yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 458: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 460: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); + yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 459: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + case 461: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); + yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 460: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + case 462: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); + yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 463: /* column_reference ::= column_name */ -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy993, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy993)); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 465: /* column_reference ::= column_name */ +{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy929, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy929)); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 464: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993, createColumnNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993)); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 466: /* column_reference ::= table_name NK_DOT column_name */ +{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy929, createColumnNode(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy929)); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 465: /* column_reference ::= NK_ALIAS */ -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 467: /* column_reference ::= NK_ALIAS */ +{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 466: /* column_reference ::= table_name NK_DOT NK_ALIAS */ -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 468: /* column_reference ::= table_name NK_DOT NK_ALIAS */ +{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 467: /* pseudo_column ::= ROWTS */ - case 468: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==468); - case 470: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==470); - case 471: /* pseudo_column ::= QEND */ yytestcase(yyruleno==471); - case 472: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==472); - case 473: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==473); - case 474: /* pseudo_column ::= WEND */ yytestcase(yyruleno==474); - case 475: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==475); - case 476: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==476); - case 477: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==477); - case 478: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==478); - case 484: /* literal_func ::= NOW */ yytestcase(yyruleno==484); -{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 469: /* pseudo_column ::= ROWTS */ + case 470: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==470); + case 472: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==472); + case 473: /* pseudo_column ::= QEND */ yytestcase(yyruleno==473); + case 474: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==474); + case 475: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==475); + case 476: /* pseudo_column ::= WEND */ yytestcase(yyruleno==476); + case 477: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==477); + case 478: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==478); + case 479: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==479); + case 480: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==480); + case 486: /* literal_func ::= NOW */ yytestcase(yyruleno==486); +{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 469: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy993)))); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 471: /* pseudo_column ::= table_name NK_DOT TBNAME */ +{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy929)))); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 479: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 480: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==480); -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy993, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy993, yymsp[-1].minor.yy88)); } - yymsp[-3].minor.yy232 = yylhsminor.yy232; + case 481: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 482: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==482); +{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy929, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy929, yymsp[-1].minor.yy364)); } + yymsp[-3].minor.yy992 = yylhsminor.yy992; break; - case 481: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), yymsp[-1].minor.yy400)); } - yymsp[-5].minor.yy232 = yylhsminor.yy232; + case 483: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ +{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy992), yymsp[-1].minor.yy184)); } + yymsp[-5].minor.yy992 = yylhsminor.yy992; break; - case 483: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy993, NULL)); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 485: /* literal_func ::= noarg_func NK_LP NK_RP */ +{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy929, NULL)); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 498: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy88 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy88 = yylhsminor.yy88; + case 500: /* star_func_para_list ::= NK_STAR */ +{ yylhsminor.yy364 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy364 = yylhsminor.yy364; break; - case 503: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 571: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==571); -{ yylhsminor.yy232 = createColumnNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 505: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 573: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==573); +{ yylhsminor.yy992 = createColumnNode(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 504: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy88, yymsp[-1].minor.yy232)); } - yymsp[-3].minor.yy232 = yylhsminor.yy232; + case 506: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ +{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy364, yymsp[-1].minor.yy992)); } + yymsp[-3].minor.yy992 = yylhsminor.yy992; break; - case 505: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), yymsp[-2].minor.yy88, yymsp[-1].minor.yy232)); } - yymsp[-4].minor.yy232 = yylhsminor.yy232; + case 507: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ +{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy992), yymsp[-2].minor.yy364, yymsp[-1].minor.yy992)); } + yymsp[-4].minor.yy992 = yylhsminor.yy992; break; - case 508: /* when_then_expr ::= WHEN common_expression THEN common_expression */ -{ yymsp[-3].minor.yy232 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); } + case 510: /* when_then_expr ::= WHEN common_expression THEN common_expression */ +{ yymsp[-3].minor.yy992 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992)); } break; - case 510: /* case_when_else_opt ::= ELSE common_expression */ -{ yymsp[-1].minor.yy232 = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); } + case 512: /* case_when_else_opt ::= ELSE common_expression */ +{ yymsp[-1].minor.yy992 = releaseRawExprNode(pCxt, yymsp[0].minor.yy992); } break; - case 511: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 516: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==516); + case 513: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 518: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==518); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy708, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); + yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy20, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 512: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 514: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy232), releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy992); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); + yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy992), releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); } - yymsp[-4].minor.yy232 = yylhsminor.yy232; + yymsp[-4].minor.yy992 = yylhsminor.yy992; break; - case 513: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 515: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy232), releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy992); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); + yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy992), releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); } - yymsp[-5].minor.yy232 = yylhsminor.yy232; + yymsp[-5].minor.yy992 = yylhsminor.yy992; break; - case 514: /* predicate ::= expr_or_subquery IS NULL */ + case 516: /* predicate ::= expr_or_subquery IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); + yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), NULL)); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 515: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 517: /* predicate ::= expr_or_subquery IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy992); + yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy992), NULL)); } - yymsp[-3].minor.yy232 = yylhsminor.yy232; + yymsp[-3].minor.yy992 = yylhsminor.yy992; break; - case 517: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy708 = OP_TYPE_LOWER_THAN; } + case 519: /* compare_op ::= NK_LT */ +{ yymsp[0].minor.yy20 = OP_TYPE_LOWER_THAN; } break; - case 518: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy708 = OP_TYPE_GREATER_THAN; } + case 520: /* compare_op ::= NK_GT */ +{ yymsp[0].minor.yy20 = OP_TYPE_GREATER_THAN; } break; - case 519: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy708 = OP_TYPE_LOWER_EQUAL; } + case 521: /* compare_op ::= NK_LE */ +{ yymsp[0].minor.yy20 = OP_TYPE_LOWER_EQUAL; } break; - case 520: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy708 = OP_TYPE_GREATER_EQUAL; } + case 522: /* compare_op ::= NK_GE */ +{ yymsp[0].minor.yy20 = OP_TYPE_GREATER_EQUAL; } break; - case 521: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy708 = OP_TYPE_NOT_EQUAL; } + case 523: /* compare_op ::= NK_NE */ +{ yymsp[0].minor.yy20 = OP_TYPE_NOT_EQUAL; } break; - case 522: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy708 = OP_TYPE_EQUAL; } + case 524: /* compare_op ::= NK_EQ */ +{ yymsp[0].minor.yy20 = OP_TYPE_EQUAL; } break; - case 523: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy708 = OP_TYPE_LIKE; } + case 525: /* compare_op ::= LIKE */ +{ yymsp[0].minor.yy20 = OP_TYPE_LIKE; } break; - case 524: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy708 = OP_TYPE_NOT_LIKE; } + case 526: /* compare_op ::= NOT LIKE */ +{ yymsp[-1].minor.yy20 = OP_TYPE_NOT_LIKE; } break; - case 525: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy708 = OP_TYPE_MATCH; } + case 527: /* compare_op ::= MATCH */ +{ yymsp[0].minor.yy20 = OP_TYPE_MATCH; } break; - case 526: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy708 = OP_TYPE_NMATCH; } + case 528: /* compare_op ::= NMATCH */ +{ yymsp[0].minor.yy20 = OP_TYPE_NMATCH; } break; - case 527: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy708 = OP_TYPE_JSON_CONTAINS; } + case 529: /* compare_op ::= CONTAINS */ +{ yymsp[0].minor.yy20 = OP_TYPE_JSON_CONTAINS; } break; - case 528: /* in_op ::= IN */ -{ yymsp[0].minor.yy708 = OP_TYPE_IN; } + case 530: /* in_op ::= IN */ +{ yymsp[0].minor.yy20 = OP_TYPE_IN; } break; - case 529: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy708 = OP_TYPE_NOT_IN; } + case 531: /* in_op ::= NOT IN */ +{ yymsp[-1].minor.yy20 = OP_TYPE_NOT_IN; } break; - case 530: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy88)); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 532: /* in_predicate_value ::= NK_LP literal_list NK_RP */ +{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy364)); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 532: /* boolean_value_expression ::= NOT boolean_primary */ + case 534: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy232), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); + yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy992), NULL)); } - yymsp[-1].minor.yy232 = yylhsminor.yy232; + yymsp[-1].minor.yy992 = yylhsminor.yy992; break; - case 533: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 535: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); + yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 534: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 536: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232); - yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); + yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 542: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy232 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy232, yymsp[0].minor.yy232, NULL); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 544: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +{ yylhsminor.yy992 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy992, yymsp[0].minor.yy992, NULL); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 545: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy232 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy993, &yymsp[0].minor.yy993); } - yymsp[-1].minor.yy232 = yylhsminor.yy232; + case 547: /* table_primary ::= table_name alias_opt */ +{ yylhsminor.yy992 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy929, &yymsp[0].minor.yy929); } + yymsp[-1].minor.yy992 = yylhsminor.yy992; break; - case 546: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy232 = createRealTableNode(pCxt, &yymsp[-3].minor.yy993, &yymsp[-1].minor.yy993, &yymsp[0].minor.yy993); } - yymsp[-3].minor.yy232 = yylhsminor.yy232; + case 548: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +{ yylhsminor.yy992 = createRealTableNode(pCxt, &yymsp[-3].minor.yy929, &yymsp[-1].minor.yy929, &yymsp[0].minor.yy929); } + yymsp[-3].minor.yy992 = yylhsminor.yy992; break; - case 547: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy232 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232), &yymsp[0].minor.yy993); } - yymsp[-1].minor.yy232 = yylhsminor.yy232; + case 549: /* table_primary ::= subquery alias_opt */ +{ yylhsminor.yy992 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy992), &yymsp[0].minor.yy929); } + yymsp[-1].minor.yy992 = yylhsminor.yy992; break; - case 549: /* alias_opt ::= */ -{ yymsp[1].minor.yy993 = nil_token; } + case 551: /* alias_opt ::= */ +{ yymsp[1].minor.yy929 = nil_token; } break; - case 551: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy993 = yymsp[0].minor.yy993; } + case 553: /* alias_opt ::= AS table_alias */ +{ yymsp[-1].minor.yy929 = yymsp[0].minor.yy929; } break; - case 552: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 553: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==553); -{ yymsp[-2].minor.yy232 = yymsp[-1].minor.yy232; } + case 554: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 555: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==555); +{ yymsp[-2].minor.yy992 = yymsp[-1].minor.yy992; } break; - case 554: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy232 = createJoinTableNode(pCxt, yymsp[-4].minor.yy436, yymsp[-5].minor.yy232, yymsp[-2].minor.yy232, yymsp[0].minor.yy232); } - yymsp[-5].minor.yy232 = yylhsminor.yy232; + case 556: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ +{ yylhsminor.yy992 = createJoinTableNode(pCxt, yymsp[-4].minor.yy732, yymsp[-5].minor.yy992, yymsp[-2].minor.yy992, yymsp[0].minor.yy992); } + yymsp[-5].minor.yy992 = yylhsminor.yy992; break; - case 555: /* join_type ::= */ -{ yymsp[1].minor.yy436 = JOIN_TYPE_INNER; } + case 557: /* join_type ::= */ +{ yymsp[1].minor.yy732 = JOIN_TYPE_INNER; } break; - case 556: /* join_type ::= INNER */ -{ yymsp[0].minor.yy436 = JOIN_TYPE_INNER; } + case 558: /* join_type ::= INNER */ +{ yymsp[0].minor.yy732 = JOIN_TYPE_INNER; } break; - case 557: /* 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 */ + case 559: /* 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.yy232 = createSelectStmt(pCxt, yymsp[-11].minor.yy985, yymsp[-9].minor.yy88, yymsp[-8].minor.yy232, yymsp[-12].minor.yy88); - yymsp[-13].minor.yy232 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy232, yymsp[-10].minor.yy985); - yymsp[-13].minor.yy232 = addWhereClause(pCxt, yymsp[-13].minor.yy232, yymsp[-7].minor.yy232); - yymsp[-13].minor.yy232 = addPartitionByClause(pCxt, yymsp[-13].minor.yy232, yymsp[-6].minor.yy88); - yymsp[-13].minor.yy232 = addWindowClauseClause(pCxt, yymsp[-13].minor.yy232, yymsp[-2].minor.yy232); - yymsp[-13].minor.yy232 = addGroupByClause(pCxt, yymsp[-13].minor.yy232, yymsp[-1].minor.yy88); - yymsp[-13].minor.yy232 = addHavingClause(pCxt, yymsp[-13].minor.yy232, yymsp[0].minor.yy232); - yymsp[-13].minor.yy232 = addRangeClause(pCxt, yymsp[-13].minor.yy232, yymsp[-5].minor.yy232); - yymsp[-13].minor.yy232 = addEveryClause(pCxt, yymsp[-13].minor.yy232, yymsp[-4].minor.yy232); - yymsp[-13].minor.yy232 = addFillClause(pCxt, yymsp[-13].minor.yy232, yymsp[-3].minor.yy232); + yymsp[-13].minor.yy992 = createSelectStmt(pCxt, yymsp[-11].minor.yy437, yymsp[-9].minor.yy364, yymsp[-8].minor.yy992, yymsp[-12].minor.yy364); + yymsp[-13].minor.yy992 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy992, yymsp[-10].minor.yy437); + yymsp[-13].minor.yy992 = addWhereClause(pCxt, yymsp[-13].minor.yy992, yymsp[-7].minor.yy992); + yymsp[-13].minor.yy992 = addPartitionByClause(pCxt, yymsp[-13].minor.yy992, yymsp[-6].minor.yy364); + yymsp[-13].minor.yy992 = addWindowClauseClause(pCxt, yymsp[-13].minor.yy992, yymsp[-2].minor.yy992); + yymsp[-13].minor.yy992 = addGroupByClause(pCxt, yymsp[-13].minor.yy992, yymsp[-1].minor.yy364); + yymsp[-13].minor.yy992 = addHavingClause(pCxt, yymsp[-13].minor.yy992, yymsp[0].minor.yy992); + yymsp[-13].minor.yy992 = addRangeClause(pCxt, yymsp[-13].minor.yy992, yymsp[-5].minor.yy992); + yymsp[-13].minor.yy992 = addEveryClause(pCxt, yymsp[-13].minor.yy992, yymsp[-4].minor.yy992); + yymsp[-13].minor.yy992 = addFillClause(pCxt, yymsp[-13].minor.yy992, yymsp[-3].minor.yy992); } break; - case 558: /* hint_list ::= */ -{ yymsp[1].minor.yy88 = createHintNodeList(pCxt, NULL); } + case 560: /* hint_list ::= */ +{ yymsp[1].minor.yy364 = createHintNodeList(pCxt, NULL); } break; - case 559: /* hint_list ::= NK_HINT */ -{ yylhsminor.yy88 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy88 = yylhsminor.yy88; + case 561: /* hint_list ::= NK_HINT */ +{ yylhsminor.yy364 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy364 = yylhsminor.yy364; break; - case 564: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy985 = false; } + case 566: /* set_quantifier_opt ::= ALL */ +{ yymsp[0].minor.yy437 = false; } break; - case 567: /* select_item ::= NK_STAR */ -{ yylhsminor.yy232 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy232 = yylhsminor.yy232; + case 569: /* select_item ::= NK_STAR */ +{ yylhsminor.yy992 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy992 = yylhsminor.yy992; break; - case 569: /* select_item ::= common_expression column_alias */ - case 579: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==579); -{ yylhsminor.yy232 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232), &yymsp[0].minor.yy993); } - yymsp[-1].minor.yy232 = yylhsminor.yy232; + case 571: /* select_item ::= common_expression column_alias */ + case 581: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==581); +{ yylhsminor.yy992 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy992), &yymsp[0].minor.yy929); } + yymsp[-1].minor.yy992 = yylhsminor.yy992; break; - case 570: /* select_item ::= common_expression AS column_alias */ - case 580: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==580); -{ yylhsminor.yy232 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), &yymsp[0].minor.yy993); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 572: /* select_item ::= common_expression AS column_alias */ + case 582: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==582); +{ yylhsminor.yy992 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), &yymsp[0].minor.yy929); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 575: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 603: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==603); - case 623: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==623); -{ yymsp[-2].minor.yy88 = yymsp[0].minor.yy88; } + case 577: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 605: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==605); + case 625: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==625); +{ yymsp[-2].minor.yy364 = yymsp[0].minor.yy364; } break; - case 582: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ -{ yymsp[-5].minor.yy232 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); } + case 584: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ +{ yymsp[-5].minor.yy992 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy992), releaseRawExprNode(pCxt, yymsp[-1].minor.yy992)); } break; - case 583: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy232 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); } + case 585: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ +{ yymsp[-3].minor.yy992 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy992)); } break; - case 584: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy232 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), NULL, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } + case 586: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-5].minor.yy992 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy992), NULL, yymsp[-1].minor.yy992, yymsp[0].minor.yy992); } break; - case 585: /* 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.yy232 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy232), releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), yymsp[-1].minor.yy232, yymsp[0].minor.yy232); } + case 587: /* 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.yy992 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy992), releaseRawExprNode(pCxt, yymsp[-3].minor.yy992), yymsp[-1].minor.yy992, yymsp[0].minor.yy992); } break; - case 586: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ -{ yymsp[-6].minor.yy232 = createEventWindowNode(pCxt, yymsp[-3].minor.yy232, yymsp[0].minor.yy232); } + case 588: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ +{ yymsp[-6].minor.yy992 = createEventWindowNode(pCxt, yymsp[-3].minor.yy992, yymsp[0].minor.yy992); } break; - case 593: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy232 = createFillNode(pCxt, yymsp[-1].minor.yy246, NULL); } + case 595: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy992 = createFillNode(pCxt, yymsp[-1].minor.yy114, NULL); } break; - case 594: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ -{ yymsp[-5].minor.yy232 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy88)); } + case 596: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ +{ yymsp[-5].minor.yy992 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy364)); } break; - case 595: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ -{ yymsp[-5].minor.yy232 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy88)); } + case 597: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ +{ yymsp[-5].minor.yy992 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy364)); } break; - case 596: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy246 = FILL_MODE_NONE; } + case 598: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy114 = FILL_MODE_NONE; } break; - case 597: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy246 = FILL_MODE_PREV; } + case 599: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy114 = FILL_MODE_PREV; } break; - case 598: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy246 = FILL_MODE_NULL; } + case 600: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy114 = FILL_MODE_NULL; } break; - case 599: /* fill_mode ::= NULL_F */ -{ yymsp[0].minor.yy246 = FILL_MODE_NULL_F; } + case 601: /* fill_mode ::= NULL_F */ +{ yymsp[0].minor.yy114 = FILL_MODE_NULL_F; } break; - case 600: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy246 = FILL_MODE_LINEAR; } + case 602: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy114 = FILL_MODE_LINEAR; } break; - case 601: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy246 = FILL_MODE_NEXT; } + case 603: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy114 = FILL_MODE_NEXT; } break; - case 604: /* group_by_list ::= expr_or_subquery */ -{ yylhsminor.yy88 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); } - yymsp[0].minor.yy88 = yylhsminor.yy88; + case 606: /* group_by_list ::= expr_or_subquery */ +{ yylhsminor.yy364 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); } + yymsp[0].minor.yy364 = yylhsminor.yy364; break; - case 605: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ -{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); } - yymsp[-2].minor.yy88 = yylhsminor.yy88; + case 607: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ +{ yylhsminor.yy364 = addNodeToList(pCxt, yymsp[-2].minor.yy364, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); } + yymsp[-2].minor.yy364 = yylhsminor.yy364; break; - case 609: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ -{ yymsp[-5].minor.yy232 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); } + case 611: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ +{ yymsp[-5].minor.yy992 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy992), releaseRawExprNode(pCxt, yymsp[-1].minor.yy992)); } break; - case 610: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy232 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); } + case 612: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ +{ yymsp[-3].minor.yy992 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy992)); } break; - case 613: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 615: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy232 = addOrderByClause(pCxt, yymsp[-3].minor.yy232, yymsp[-2].minor.yy88); - yylhsminor.yy232 = addSlimitClause(pCxt, yylhsminor.yy232, yymsp[-1].minor.yy232); - yylhsminor.yy232 = addLimitClause(pCxt, yylhsminor.yy232, yymsp[0].minor.yy232); + yylhsminor.yy992 = addOrderByClause(pCxt, yymsp[-3].minor.yy992, yymsp[-2].minor.yy364); + yylhsminor.yy992 = addSlimitClause(pCxt, yylhsminor.yy992, yymsp[-1].minor.yy992); + yylhsminor.yy992 = addLimitClause(pCxt, yylhsminor.yy992, yymsp[0].minor.yy992); } - yymsp[-3].minor.yy232 = yylhsminor.yy232; + yymsp[-3].minor.yy992 = yylhsminor.yy992; break; - case 616: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ -{ yylhsminor.yy232 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy232, yymsp[0].minor.yy232); } - yymsp[-3].minor.yy232 = yylhsminor.yy232; + case 618: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ +{ yylhsminor.yy992 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy992, yymsp[0].minor.yy992); } + yymsp[-3].minor.yy992 = yylhsminor.yy992; break; - case 617: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ -{ yylhsminor.yy232 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy232, yymsp[0].minor.yy232); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 619: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ +{ yylhsminor.yy992 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy992, yymsp[0].minor.yy992); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 625: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 629: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==629); -{ yymsp[-1].minor.yy232 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 627: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 631: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==631); +{ yymsp[-1].minor.yy992 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 626: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 630: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==630); -{ yymsp[-3].minor.yy232 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 628: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 632: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==632); +{ yymsp[-3].minor.yy992 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 627: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 631: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==631); -{ yymsp[-3].minor.yy232 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 629: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 633: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==633); +{ yymsp[-3].minor.yy992 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 632: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy232); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 634: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy992); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 637: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy232 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), yymsp[-1].minor.yy834, yymsp[0].minor.yy153); } - yymsp[-2].minor.yy232 = yylhsminor.yy232; + case 639: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy992 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), yymsp[-1].minor.yy938, yymsp[0].minor.yy517); } + yymsp[-2].minor.yy992 = yylhsminor.yy992; break; - case 638: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy834 = ORDER_ASC; } + case 640: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy938 = ORDER_ASC; } break; - case 639: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy834 = ORDER_ASC; } + case 641: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy938 = ORDER_ASC; } break; - case 640: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy834 = ORDER_DESC; } + case 642: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy938 = ORDER_DESC; } break; - case 641: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy153 = NULL_ORDER_DEFAULT; } + case 643: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy517 = NULL_ORDER_DEFAULT; } break; - case 642: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy153 = NULL_ORDER_FIRST; } + case 644: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy517 = NULL_ORDER_FIRST; } break; - case 643: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy153 = NULL_ORDER_LAST; } + case 645: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy517 = NULL_ORDER_LAST; } break; default: break; From 5d189f69ec6354cd5989348c36a041f54667b2ae Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 18 Jan 2024 15:51:45 +0800 Subject: [PATCH 20/93] feat: support uniq grant --- source/libs/nodes/src/nodesCodeFuncs.c | 16 ++++++++++++++++ source/libs/parser/src/parTokenizer.c | 2 ++ 2 files changed, 18 insertions(+) diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 5d26a545af2..793f14596d9 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -6579,6 +6579,14 @@ static int32_t showVariablesStmtToJson(const void* pObj, SJson* pJson) { return static int32_t jsonToShowVariablesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } +static int32_t showGrantsFullStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowGrantsFullStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showGrantsLogStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowGrantsLogStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + static const char* jkShowDnodeVariablesStmtDnodeId = "DnodeId"; static const char* jkShowDnodeVariablesStmtLikePattern = "LikePattern"; @@ -7066,6 +7074,10 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return showConsumersStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_VARIABLES_STMT: return showVariablesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_GRANTS_FULL_STMT: + return showGrantsFullStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_GRANTS_LOG_STMT: + return showGrantsLogStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT: return showDnodeVariablesStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_TRANSACTIONS_STMT: @@ -7391,6 +7403,10 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToShowConsumersStmt(pJson, pObj); case QUERY_NODE_SHOW_VARIABLES_STMT: return jsonToShowVariablesStmt(pJson, pObj); + case QUERY_NODE_SHOW_GRANTS_FULL_STMT: + return jsonToShowGrantsFullStmt(pJson, pObj); + case QUERY_NODE_SHOW_GRANTS_LOG_STMT: + return jsonToShowGrantsLogStmt(pJson, pObj); case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT: return jsonToShowDnodeVariablesStmt(pJson, pObj); case QUERY_NODE_SHOW_TRANSACTIONS_STMT: diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 072892fe7fd..ee4ae248729 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -109,6 +109,8 @@ static SKeyword keywordTable[] = { {"GEOMETRY", TK_GEOMETRY}, {"GRANT", TK_GRANT}, {"GRANTS", TK_GRANTS}, + {"FULL", TK_FULL}, + {"LOG", TK_LOG}, {"GROUP", TK_GROUP}, {"HAVING", TK_HAVING}, {"HOST", TK_HOST}, From 1daa2246511bced1e46de78117e0e9ad6700318b Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 18 Jan 2024 17:49:11 +0800 Subject: [PATCH 21/93] feat: support uniq grant --- include/common/systable.h | 1 + include/common/tmsg.h | 4 +- include/common/ttokendef.h | 377 +- include/libs/nodes/cmdnodes.h | 2 +- include/util/tdef.h | 2 + source/common/src/systable.c | 6 + source/dnode/mnode/impl/inc/mndDef.h | 3 +- source/dnode/mnode/impl/inc/mndGrant.h | 8 +- source/dnode/mnode/impl/src/mndCluster.c | 92 +- source/dnode/mnode/impl/src/mndGrant.c | 2 + source/dnode/mnode/impl/src/mndShow.c | 2 + source/libs/nodes/src/nodesCodeFuncs.c | 10 + source/libs/nodes/src/nodesUtilFuncs.c | 4 +- source/libs/parser/inc/sql.y | 1 + source/libs/parser/src/parAstParser.c | 7 + source/libs/parser/src/parAuthenticator.c | 1 + source/libs/parser/src/parTokenizer.c | 1 + source/libs/parser/src/parTranslater.c | 9 +- source/libs/parser/src/sql.c | 7706 ++++++++++----------- 19 files changed, 4096 insertions(+), 4142 deletions(-) diff --git a/include/common/systable.h b/include/common/systable.h index 49002b06894..9a07090c930 100644 --- a/include/common/systable.h +++ b/include/common/systable.h @@ -54,6 +54,7 @@ extern "C" { #define TSDB_INS_TABLE_COMPACT_DETAILS "ins_compact_details" #define TSDB_INS_TABLE_GRANTS_FULL "ins_grants_full" #define TSDB_INS_TABLE_GRANTS_LOG "ins_grants_log" +#define TSDB_INS_TABLE_MACHINES "ins_machines" #define TSDB_PERFORMANCE_SCHEMA_DB "performance_schema" #define TSDB_PERFS_TABLE_SMAS "perf_smas" diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 8f1dc6fcba7..084a445423c 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -149,6 +149,7 @@ typedef enum _mgmt_table { TSDB_MGMT_TABLE_COMPACT_DETAIL, TSDB_MGMT_TABLE_GRANTS_FULL, TSDB_MGMT_TABLE_GRANTS_LOG, + TSDB_MGMT_TABLE_MACHINES, TSDB_MGMT_TABLE_MAX, } EShowType; @@ -364,6 +365,7 @@ typedef enum ENodeType { QUERY_NODE_SHOW_COMPACT_DETAILS_STMT, QUERY_NODE_SHOW_GRANTS_FULL_STMT, QUERY_NODE_SHOW_GRANTS_LOG_STMT, + QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT, // logic plan node QUERY_NODE_LOGIC_PLAN_SCAN = 1000, @@ -2031,7 +2033,7 @@ void tFreeSExplainRsp(SExplainRsp* pRsp); typedef struct { char config[TSDB_DNODE_CONFIG_LEN]; - char value[TSDB_DNODE_VALUE_LEN]; + char value[TSDB_CLUSTER_VALUE_LEN]; int32_t sqlLen; char* sql; } SMCfgClusterReq; diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 7c04d77a7bb..52d4cf10a47 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -177,194 +177,195 @@ #define TK_GRANTS 158 #define TK_FULL 159 #define TK_LOG 160 -#define TK_QUERIES 161 -#define TK_SCORES 162 -#define TK_TOPICS 163 -#define TK_VARIABLES 164 -#define TK_BNODES 165 -#define TK_SNODES 166 -#define TK_TRANSACTIONS 167 -#define TK_DISTRIBUTED 168 -#define TK_CONSUMERS 169 -#define TK_SUBSCRIPTIONS 170 -#define TK_VNODES 171 -#define TK_ALIVE 172 -#define TK_VIEWS 173 -#define TK_VIEW 174 -#define TK_COMPACTS 175 -#define TK_NORMAL 176 -#define TK_CHILD 177 -#define TK_LIKE 178 -#define TK_TBNAME 179 -#define TK_QTAGS 180 -#define TK_AS 181 -#define TK_SYSTEM 182 -#define TK_INDEX 183 -#define TK_FUNCTION 184 -#define TK_INTERVAL 185 -#define TK_COUNT 186 -#define TK_LAST_ROW 187 -#define TK_META 188 -#define TK_ONLY 189 -#define TK_TOPIC 190 -#define TK_CONSUMER 191 -#define TK_GROUP 192 -#define TK_DESC 193 -#define TK_DESCRIBE 194 -#define TK_RESET 195 -#define TK_QUERY 196 -#define TK_CACHE 197 -#define TK_EXPLAIN 198 -#define TK_ANALYZE 199 -#define TK_VERBOSE 200 -#define TK_NK_BOOL 201 -#define TK_RATIO 202 -#define TK_NK_FLOAT 203 -#define TK_OUTPUTTYPE 204 -#define TK_AGGREGATE 205 -#define TK_BUFSIZE 206 -#define TK_LANGUAGE 207 -#define TK_REPLACE 208 -#define TK_STREAM 209 -#define TK_INTO 210 -#define TK_PAUSE 211 -#define TK_RESUME 212 -#define TK_TRIGGER 213 -#define TK_AT_ONCE 214 -#define TK_WINDOW_CLOSE 215 -#define TK_IGNORE 216 -#define TK_EXPIRED 217 -#define TK_FILL_HISTORY 218 -#define TK_UPDATE 219 -#define TK_SUBTABLE 220 -#define TK_UNTREATED 221 -#define TK_KILL 222 -#define TK_CONNECTION 223 -#define TK_TRANSACTION 224 -#define TK_BALANCE 225 -#define TK_VGROUP 226 -#define TK_LEADER 227 -#define TK_MERGE 228 -#define TK_REDISTRIBUTE 229 -#define TK_SPLIT 230 -#define TK_DELETE 231 -#define TK_INSERT 232 -#define TK_NULL 233 -#define TK_NK_QUESTION 234 -#define TK_NK_ALIAS 235 -#define TK_NK_ARROW 236 -#define TK_ROWTS 237 -#define TK_QSTART 238 -#define TK_QEND 239 -#define TK_QDURATION 240 -#define TK_WSTART 241 -#define TK_WEND 242 -#define TK_WDURATION 243 -#define TK_IROWTS 244 -#define TK_ISFILLED 245 -#define TK_CAST 246 -#define TK_NOW 247 -#define TK_TODAY 248 -#define TK_TIMEZONE 249 -#define TK_CLIENT_VERSION 250 -#define TK_SERVER_VERSION 251 -#define TK_SERVER_STATUS 252 -#define TK_CURRENT_USER 253 -#define TK_CASE 254 -#define TK_WHEN 255 -#define TK_THEN 256 -#define TK_ELSE 257 -#define TK_BETWEEN 258 -#define TK_IS 259 -#define TK_NK_LT 260 -#define TK_NK_GT 261 -#define TK_NK_LE 262 -#define TK_NK_GE 263 -#define TK_NK_NE 264 -#define TK_MATCH 265 -#define TK_NMATCH 266 -#define TK_CONTAINS 267 -#define TK_IN 268 -#define TK_JOIN 269 -#define TK_INNER 270 -#define TK_SELECT 271 -#define TK_NK_HINT 272 -#define TK_DISTINCT 273 -#define TK_WHERE 274 -#define TK_PARTITION 275 -#define TK_BY 276 -#define TK_SESSION 277 -#define TK_STATE_WINDOW 278 -#define TK_EVENT_WINDOW 279 -#define TK_SLIDING 280 -#define TK_FILL 281 -#define TK_VALUE 282 -#define TK_VALUE_F 283 -#define TK_NONE 284 -#define TK_PREV 285 -#define TK_NULL_F 286 -#define TK_LINEAR 287 -#define TK_NEXT 288 -#define TK_HAVING 289 -#define TK_RANGE 290 -#define TK_EVERY 291 -#define TK_ORDER 292 -#define TK_SLIMIT 293 -#define TK_SOFFSET 294 -#define TK_LIMIT 295 -#define TK_OFFSET 296 -#define TK_ASC 297 -#define TK_NULLS 298 -#define TK_ABORT 299 -#define TK_AFTER 300 -#define TK_ATTACH 301 -#define TK_BEFORE 302 -#define TK_BEGIN 303 -#define TK_BITAND 304 -#define TK_BITNOT 305 -#define TK_BITOR 306 -#define TK_BLOCKS 307 -#define TK_CHANGE 308 -#define TK_COMMA 309 -#define TK_CONCAT 310 -#define TK_CONFLICT 311 -#define TK_COPY 312 -#define TK_DEFERRED 313 -#define TK_DELIMITERS 314 -#define TK_DETACH 315 -#define TK_DIVIDE 316 -#define TK_DOT 317 -#define TK_EACH 318 -#define TK_FAIL 319 -#define TK_FILE 320 -#define TK_FOR 321 -#define TK_GLOB 322 -#define TK_ID 323 -#define TK_IMMEDIATE 324 -#define TK_IMPORT 325 -#define TK_INITIALLY 326 -#define TK_INSTEAD 327 -#define TK_ISNULL 328 -#define TK_KEY 329 -#define TK_MODULES 330 -#define TK_NK_BITNOT 331 -#define TK_NK_SEMI 332 -#define TK_NOTNULL 333 -#define TK_OF 334 -#define TK_PLUS 335 -#define TK_PRIVILEGE 336 -#define TK_RAISE 337 -#define TK_RESTRICT 338 -#define TK_ROW 339 -#define TK_SEMI 340 -#define TK_STAR 341 -#define TK_STATEMENT 342 -#define TK_STRICT 343 -#define TK_STRING 344 -#define TK_TIMES 345 -#define TK_VALUES 346 -#define TK_VARIABLE 347 -#define TK_WAL 348 +#define TK_MACHINES 161 +#define TK_QUERIES 162 +#define TK_SCORES 163 +#define TK_TOPICS 164 +#define TK_VARIABLES 165 +#define TK_BNODES 166 +#define TK_SNODES 167 +#define TK_TRANSACTIONS 168 +#define TK_DISTRIBUTED 169 +#define TK_CONSUMERS 170 +#define TK_SUBSCRIPTIONS 171 +#define TK_VNODES 172 +#define TK_ALIVE 173 +#define TK_VIEWS 174 +#define TK_VIEW 175 +#define TK_COMPACTS 176 +#define TK_NORMAL 177 +#define TK_CHILD 178 +#define TK_LIKE 179 +#define TK_TBNAME 180 +#define TK_QTAGS 181 +#define TK_AS 182 +#define TK_SYSTEM 183 +#define TK_INDEX 184 +#define TK_FUNCTION 185 +#define TK_INTERVAL 186 +#define TK_COUNT 187 +#define TK_LAST_ROW 188 +#define TK_META 189 +#define TK_ONLY 190 +#define TK_TOPIC 191 +#define TK_CONSUMER 192 +#define TK_GROUP 193 +#define TK_DESC 194 +#define TK_DESCRIBE 195 +#define TK_RESET 196 +#define TK_QUERY 197 +#define TK_CACHE 198 +#define TK_EXPLAIN 199 +#define TK_ANALYZE 200 +#define TK_VERBOSE 201 +#define TK_NK_BOOL 202 +#define TK_RATIO 203 +#define TK_NK_FLOAT 204 +#define TK_OUTPUTTYPE 205 +#define TK_AGGREGATE 206 +#define TK_BUFSIZE 207 +#define TK_LANGUAGE 208 +#define TK_REPLACE 209 +#define TK_STREAM 210 +#define TK_INTO 211 +#define TK_PAUSE 212 +#define TK_RESUME 213 +#define TK_TRIGGER 214 +#define TK_AT_ONCE 215 +#define TK_WINDOW_CLOSE 216 +#define TK_IGNORE 217 +#define TK_EXPIRED 218 +#define TK_FILL_HISTORY 219 +#define TK_UPDATE 220 +#define TK_SUBTABLE 221 +#define TK_UNTREATED 222 +#define TK_KILL 223 +#define TK_CONNECTION 224 +#define TK_TRANSACTION 225 +#define TK_BALANCE 226 +#define TK_VGROUP 227 +#define TK_LEADER 228 +#define TK_MERGE 229 +#define TK_REDISTRIBUTE 230 +#define TK_SPLIT 231 +#define TK_DELETE 232 +#define TK_INSERT 233 +#define TK_NULL 234 +#define TK_NK_QUESTION 235 +#define TK_NK_ALIAS 236 +#define TK_NK_ARROW 237 +#define TK_ROWTS 238 +#define TK_QSTART 239 +#define TK_QEND 240 +#define TK_QDURATION 241 +#define TK_WSTART 242 +#define TK_WEND 243 +#define TK_WDURATION 244 +#define TK_IROWTS 245 +#define TK_ISFILLED 246 +#define TK_CAST 247 +#define TK_NOW 248 +#define TK_TODAY 249 +#define TK_TIMEZONE 250 +#define TK_CLIENT_VERSION 251 +#define TK_SERVER_VERSION 252 +#define TK_SERVER_STATUS 253 +#define TK_CURRENT_USER 254 +#define TK_CASE 255 +#define TK_WHEN 256 +#define TK_THEN 257 +#define TK_ELSE 258 +#define TK_BETWEEN 259 +#define TK_IS 260 +#define TK_NK_LT 261 +#define TK_NK_GT 262 +#define TK_NK_LE 263 +#define TK_NK_GE 264 +#define TK_NK_NE 265 +#define TK_MATCH 266 +#define TK_NMATCH 267 +#define TK_CONTAINS 268 +#define TK_IN 269 +#define TK_JOIN 270 +#define TK_INNER 271 +#define TK_SELECT 272 +#define TK_NK_HINT 273 +#define TK_DISTINCT 274 +#define TK_WHERE 275 +#define TK_PARTITION 276 +#define TK_BY 277 +#define TK_SESSION 278 +#define TK_STATE_WINDOW 279 +#define TK_EVENT_WINDOW 280 +#define TK_SLIDING 281 +#define TK_FILL 282 +#define TK_VALUE 283 +#define TK_VALUE_F 284 +#define TK_NONE 285 +#define TK_PREV 286 +#define TK_NULL_F 287 +#define TK_LINEAR 288 +#define TK_NEXT 289 +#define TK_HAVING 290 +#define TK_RANGE 291 +#define TK_EVERY 292 +#define TK_ORDER 293 +#define TK_SLIMIT 294 +#define TK_SOFFSET 295 +#define TK_LIMIT 296 +#define TK_OFFSET 297 +#define TK_ASC 298 +#define TK_NULLS 299 +#define TK_ABORT 300 +#define TK_AFTER 301 +#define TK_ATTACH 302 +#define TK_BEFORE 303 +#define TK_BEGIN 304 +#define TK_BITAND 305 +#define TK_BITNOT 306 +#define TK_BITOR 307 +#define TK_BLOCKS 308 +#define TK_CHANGE 309 +#define TK_COMMA 310 +#define TK_CONCAT 311 +#define TK_CONFLICT 312 +#define TK_COPY 313 +#define TK_DEFERRED 314 +#define TK_DELIMITERS 315 +#define TK_DETACH 316 +#define TK_DIVIDE 317 +#define TK_DOT 318 +#define TK_EACH 319 +#define TK_FAIL 320 +#define TK_FILE 321 +#define TK_FOR 322 +#define TK_GLOB 323 +#define TK_ID 324 +#define TK_IMMEDIATE 325 +#define TK_IMPORT 326 +#define TK_INITIALLY 327 +#define TK_INSTEAD 328 +#define TK_ISNULL 329 +#define TK_KEY 330 +#define TK_MODULES 331 +#define TK_NK_BITNOT 332 +#define TK_NK_SEMI 333 +#define TK_NOTNULL 334 +#define TK_OF 335 +#define TK_PLUS 336 +#define TK_PRIVILEGE 337 +#define TK_RAISE 338 +#define TK_RESTRICT 339 +#define TK_ROW 340 +#define TK_SEMI 341 +#define TK_STAR 342 +#define TK_STATEMENT 343 +#define TK_STRICT 344 +#define TK_STRING 345 +#define TK_TIMES 346 +#define TK_VALUES 347 +#define TK_VARIABLE 348 +#define TK_WAL 349 #define TK_NK_SPACE 600 #define TK_NK_COMMENT 601 diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index 9063f6ac0b9..9a12d7b98fd 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -423,7 +423,7 @@ typedef struct SDropCGroupStmt { typedef struct SAlterClusterStmt { ENodeType type; char config[TSDB_DNODE_CONFIG_LEN]; - char value[TSDB_DNODE_VALUE_LEN]; + char value[TSDB_CLUSTER_VALUE_LEN]; } SAlterClusterStmt; typedef struct SAlterLocalStmt { diff --git a/include/util/tdef.h b/include/util/tdef.h index b51eb75607f..8bddc15e9c2 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -286,6 +286,8 @@ typedef enum ELogicConditionType { #define TSDB_DNODE_CONFIG_LEN 128 #define TSDB_DNODE_VALUE_LEN 256 +#define TSDB_CLUSTER_VALUE_LEN 1024 + #define TSDB_ACTIVE_KEY_LEN 109 #define TSDB_CONN_ACTIVE_KEY_LEN 255 #define TSDB_UNIQ_ACTIVE_KEY_LEN 249 diff --git a/source/common/src/systable.c b/source/common/src/systable.c index 27234e7222f..fbcb59524e5 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -365,6 +365,11 @@ static const SSysDbTableSchema useGrantsLogSchema[] = { {.name = "machine", .bytes = 6016 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, }; +static const SSysDbTableSchema useMachinesSchema[] = { + {.name = "id", .type = TSDB_DATA_TYPE_BIGINT, .sysInfo = false}, + {.name = "machine", .bytes = 6016 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false}, +}; + static const SSysTableMeta infosMeta[] = { {TSDB_INS_TABLE_DNODES, dnodesSchema, tListLen(dnodesSchema), true}, {TSDB_INS_TABLE_MNODES, mnodesSchema, tListLen(mnodesSchema), true}, @@ -396,6 +401,7 @@ static const SSysTableMeta infosMeta[] = { {TSDB_INS_TABLE_COMPACT_DETAILS, userCompactsDetailSchema, tListLen(userCompactsDetailSchema), false}, {TSDB_INS_TABLE_GRANTS_FULL, useGrantsFullSchema, tListLen(useGrantsFullSchema), false}, {TSDB_INS_TABLE_GRANTS_LOG, useGrantsLogSchema, tListLen(useGrantsLogSchema), false}, + {TSDB_INS_TABLE_MACHINES, useMachinesSchema, tListLen(useMachinesSchema), false}, }; static const SSysDbTableSchema connectionsSchema[] = { diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 14e18bb5d90..9635e00ac83 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -830,7 +830,8 @@ typedef struct { int64_t updateTime; SGrantState state[GRANT_STATE_NUM]; SGrantActive active[GRANT_ACTIVE_NUM]; - SArray *pMachines; // SGrantMachines + char* pActive; + SArray* pMachines; // SGrantMachines SRWLatch lock; } SGrantObj; diff --git a/source/dnode/mnode/impl/inc/mndGrant.h b/source/dnode/mnode/impl/inc/mndGrant.h index 18d2c36a948..aea680ad5f7 100644 --- a/source/dnode/mnode/impl/inc/mndGrant.h +++ b/source/dnode/mnode/impl/inc/mndGrant.h @@ -29,13 +29,10 @@ void grantAdd(EGrantType grant, uint64_t value); void grantRestore(EGrantType grant, uint64_t value); - #ifdef TD_ENTERPRISE - // void initDynGrantVersion(void); - SGrantObj *mndAcquireGrant(SMnode * pMnode, int32_t id); - void mndReleaseGrant(SMnode * pMnode, SGrantObj *pGrant); + void mndReleaseGrant(SMnode * pMnode, SGrantObj * pGrant); SSdbRaw *mndGrantActionEncode(SGrantObj * pGrant); SSdbRow *mndGrantActionDecode(SSdbRaw * pRaw); @@ -48,6 +45,9 @@ int32_t mndProcessUpdActiveReqImpl(void *pActive, SRpcMsg *pReq); int32_t mndRetrieveGrantImpl(SRpcMsg * pReq, SShowObj * pShow, SSDataBlock * pBlock, int32_t rows); + int32_t mndProcessConfigClusterReq(SRpcMsg * pReq); + int32_t mndProcessConfigClusterRsp(SRpcMsg * pReq); + #endif #ifdef __cplusplus diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c index f9a22a45b61..a583b0e7bb0 100644 --- a/source/dnode/mnode/impl/src/mndCluster.c +++ b/source/dnode/mnode/impl/src/mndCluster.c @@ -33,8 +33,6 @@ static int32_t mndCreateDefaultCluster(SMnode *pMnode); static int32_t mndRetrieveClusters(SRpcMsg *pMsg, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows); static void mndCancelGetNextCluster(SMnode *pMnode, void *pIter); static int32_t mndProcessUptimeTimer(SRpcMsg *pReq); -static int32_t mndProcessConfigClusterReq(SRpcMsg *pReq); -static int32_t mndProcessConfigClusterRsp(SRpcMsg *pReq); int32_t mndInitCluster(SMnode *pMnode) { SSdbTable table = { @@ -49,8 +47,6 @@ int32_t mndInitCluster(SMnode *pMnode) { }; mndSetMsgHandle(pMnode, TDMT_MND_UPTIME_TIMER, mndProcessUptimeTimer); - mndSetMsgHandle(pMnode, TDMT_MND_CONFIG_CLUSTER, mndProcessConfigClusterReq); - mndSetMsgHandle(pMnode, TDMT_MND_CONFIG_CLUSTER_RSP, mndProcessConfigClusterRsp); mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_CLUSTER, mndRetrieveClusters); mndAddShowFreeIterHandle(pMnode, TSDB_MGMT_TABLE_CLUSTER, mndCancelGetNextCluster); @@ -406,90 +402,4 @@ static int32_t mndProcessUptimeTimer(SRpcMsg *pReq) { mndTransDrop(pTrans); return 0; -} - -static int32_t mndProcessConfigClusterReq(SRpcMsg *pReq) { - SMnode *pMnode = pReq->info.node; - SMCfgClusterReq cfgReq = {0}; - if (tDeserializeSMCfgClusterReq(pReq->pCont, pReq->contLen, &cfgReq) != 0) { - terrno = TSDB_CODE_INVALID_MSG; - return -1; - } - - int32_t code = 0; - mInfo("cluster: start to config, option:%s, value:%s", cfgReq.config, cfgReq.value); - if (mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_CONFIG_CLUSTER) != 0) { - code = terrno != 0 ? terrno : TSDB_CODE_MND_NO_RIGHTS; - goto _exit; - } - - SClusterObj clusterObj = {0}; - void *pIter = NULL; - SClusterObj *pCluster = mndAcquireCluster(pMnode, &pIter); - if (!pCluster || pCluster->id <= 0) { - code = TSDB_CODE_APP_IS_STARTING; - if (pCluster) mndReleaseCluster(pMnode, pCluster, pIter); - goto _exit; - } - memcpy(&clusterObj, pCluster, sizeof(SClusterObj)); - mndReleaseCluster(pMnode, pCluster, pIter); - - if (strncmp(cfgReq.config, GRANT_ACTIVE_CODE, 11) == 0) { -#ifdef TD_ENTERPRISE - if (strlen(cfgReq.config) >= TSDB_DNODE_CONFIG_LEN) { - code = TSDB_CODE_INVALID_CFG; - goto _exit; - } - if (strlen(cfgReq.value) >= TSDB_DNODE_VALUE_LEN) { - code = TSDB_CODE_INVALID_CFG_VALUE; - goto _exit; - } - char *newActive = NULL; - if ((code = grantAlterActiveCode(cfgReq.value, &newActive)) != 0) { - goto _exit; - } -#else - code = TSDB_CODE_OPS_NOT_SUPPORT; - goto _exit; -#endif - } - - STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "update-cluster"); - if (pTrans == NULL) return -1; - - SSdbRaw *pCommitRaw = mndClusterActionEncode(&clusterObj); - if (pCommitRaw == NULL || mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) { - mError("trans:%d, failed to append commit log since %s", pTrans->id, terrstr()); - mndTransDrop(pTrans); - code = terrno; - goto _exit; - } - (void)sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY); - - if (mndTransPrepare(pMnode, pTrans) != 0) { - mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); - mndTransDrop(pTrans); - code = terrno; - goto _exit; - } - - mndTransDrop(pTrans); - - { // audit - auditRecord(pReq, pMnode->clusterId, "alterCluster", "", "", cfgReq.sql, cfgReq.sqlLen); - } -_exit: - tFreeSMCfgClusterReq(&cfgReq); - if (code != 0) { - terrno = code; - mError("cluster: failed to config:%s %s since %s", cfgReq.config, cfgReq.value, terrstr()); - } else { - mInfo("cluster: success to config:%s %s", cfgReq.config, cfgReq.value); - } - return code; -} - -static int32_t mndProcessConfigClusterRsp(SRpcMsg *pRsp) { - mInfo("config rsp from cluster"); - return 0; -} +} \ No newline at end of file diff --git a/source/dnode/mnode/impl/src/mndGrant.c b/source/dnode/mnode/impl/src/mndGrant.c index 517f0cc963c..75314f67727 100644 --- a/source/dnode/mnode/impl/src/mndGrant.c +++ b/source/dnode/mnode/impl/src/mndGrant.c @@ -57,6 +57,7 @@ static int32_t mndRetrieveGrant(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl static int32_t mndRetrieveGrantFull(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { return 0; } static int32_t mndRetrieveGrantLog(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { return 0; } +static int32_t mndRetrieveMachines(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { return 0; } static int32_t mndProcessGrantHB(SRpcMsg *pReq) { return TSDB_CODE_SUCCESS; } @@ -64,6 +65,7 @@ int32_t mndInitGrant(SMnode *pMnode) { mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_GRANTS, mndRetrieveGrant); mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_GRANTS_FULL, mndRetrieveGrantFull); mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_GRANTS_LOG, mndRetrieveGrantLog); + mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_MACHINES, mndRetrieveMachines); mndSetMsgHandle(pMnode, TDMT_MND_GRANT_HB_TIMER, mndProcessGrantHB); return 0; } diff --git a/source/dnode/mnode/impl/src/mndShow.c b/source/dnode/mnode/impl/src/mndShow.c index f770f50b648..687b5d0299b 100644 --- a/source/dnode/mnode/impl/src/mndShow.c +++ b/source/dnode/mnode/impl/src/mndShow.c @@ -127,6 +127,8 @@ static int32_t convertToRetrieveType(char *name, int32_t len) { type = TSDB_MGMT_TABLE_GRANTS_FULL; } else if (strncasecmp(name, TSDB_INS_TABLE_GRANTS_LOG, len) == 0) { type = TSDB_MGMT_TABLE_GRANTS_LOG; + } else if (strncasecmp(name, TSDB_INS_TABLE_MACHINES, len) == 0) { + type = TSDB_MGMT_TABLE_MACHINES; } else { mError("invalid show name:%s len:%d", name, len); } diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 793f14596d9..254a8925462 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -269,6 +269,8 @@ const char* nodesNodeName(ENodeType type) { return "ShowGrantsFullStmt"; case QUERY_NODE_SHOW_GRANTS_LOG_STMT: return "ShowGrantsLogStmt"; + case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: + return "ShowClusterMachinesStmt"; case QUERY_NODE_DELETE_STMT: return "DeleteStmt"; case QUERY_NODE_INSERT_STMT: @@ -6585,8 +6587,12 @@ static int32_t jsonToShowGrantsFullStmt(const SJson* pJson, void* pObj) { return static int32_t showGrantsLogStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } +static int32_t showClusterMachinesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + static int32_t jsonToShowGrantsLogStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } +static int32_t jsonToShowClusterMachinesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + static const char* jkShowDnodeVariablesStmtDnodeId = "DnodeId"; static const char* jkShowDnodeVariablesStmtLikePattern = "LikePattern"; @@ -7078,6 +7084,8 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return showGrantsFullStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_GRANTS_LOG_STMT: return showGrantsLogStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: + return showClusterMachinesStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT: return showDnodeVariablesStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_TRANSACTIONS_STMT: @@ -7407,6 +7415,8 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToShowGrantsFullStmt(pJson, pObj); case QUERY_NODE_SHOW_GRANTS_LOG_STMT: return jsonToShowGrantsLogStmt(pJson, pObj); + case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: + return jsonToShowClusterMachinesStmt(pJson, pObj); case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT: return jsonToShowDnodeVariablesStmt(pJson, pObj); case QUERY_NODE_SHOW_TRANSACTIONS_STMT: diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index af50cdd74ee..696971d47db 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -443,6 +443,7 @@ SNode* nodesMakeNode(ENodeType type) { case QUERY_NODE_SHOW_VIEWS_STMT: case QUERY_NODE_SHOW_GRANTS_FULL_STMT: case QUERY_NODE_SHOW_GRANTS_LOG_STMT: + case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: return makeNode(type, sizeof(SShowStmt)); case QUERY_NODE_SHOW_TABLE_TAGS_STMT: return makeNode(type, sizeof(SShowTableTagsStmt)); @@ -1083,7 +1084,8 @@ void nodesDestroyNode(SNode* pNode) { case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT: case QUERY_NODE_SHOW_VIEWS_STMT: case QUERY_NODE_SHOW_GRANTS_FULL_STMT: - case QUERY_NODE_SHOW_GRANTS_LOG_STMT: { + case QUERY_NODE_SHOW_GRANTS_LOG_STMT: + case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: { SShowStmt* pStmt = (SShowStmt*)pNode; nodesDestroyNode(pStmt->pDbName); nodesDestroyNode(pStmt->pTbName); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 693a7606277..875fe05b11d 100755 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -489,6 +489,7 @@ cmd ::= SHOW LICENCES. cmd ::= SHOW GRANTS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } cmd ::= SHOW GRANTS FULL. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); } cmd ::= SHOW GRANTS LOG. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOG_STMT); } +cmd ::= SHOW CLUSTER MACHINES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT); } cmd ::= SHOW CREATE DATABASE db_name(A). { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &A); } cmd ::= SHOW CREATE TABLE full_table_name(A). { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, A); } cmd ::= SHOW CREATE STABLE full_table_name(A). { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, A); } diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c index 18c809734f8..4910ba35498 100644 --- a/source/libs/parser/src/parAstParser.c +++ b/source/libs/parser/src/parAstParser.c @@ -629,6 +629,11 @@ static int32_t collectMetaKeyFromShowGrantsLog(SCollectMetaKeyCxt* pCxt, SShowSt pCxt->pMetaCache); } +static int32_t collectMetaKeyFromShowClusterMachines(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_MACHINES, + pCxt->pMetaCache); +} + static int32_t collectMetaKeyFromShowCreateDatabase(SCollectMetaKeyCxt* pCxt, SShowCreateDatabaseStmt* pStmt) { return reserveDbCfgInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pCxt->pMetaCache); } @@ -853,6 +858,8 @@ static int32_t collectMetaKeyFromQuery(SCollectMetaKeyCxt* pCxt, SNode* pStmt) { return collectMetaKeyFromShowGrantsFull(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_GRANTS_LOG_STMT: return collectMetaKeyFromShowGrantsLog(pCxt, (SShowStmt*)pStmt); + case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: + return collectMetaKeyFromShowClusterMachines(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_CREATE_DATABASE_STMT: return collectMetaKeyFromShowCreateDatabase(pCxt, (SShowCreateDatabaseStmt*)pStmt); case QUERY_NODE_SHOW_CREATE_TABLE_STMT: diff --git a/source/libs/parser/src/parAuthenticator.c b/source/libs/parser/src/parAuthenticator.c index f1e050e7281..dcb452311b6 100644 --- a/source/libs/parser/src/parAuthenticator.c +++ b/source/libs/parser/src/parAuthenticator.c @@ -351,6 +351,7 @@ static int32_t authQuery(SAuthCxt* pCxt, SNode* pStmt) { case QUERY_NODE_SHOW_SCORES_STMT: case QUERY_NODE_SHOW_GRANTS_FULL_STMT: case QUERY_NODE_SHOW_GRANTS_LOG_STMT: + case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: return !pCxt->pParseCxt->enableSysInfo ? TSDB_CODE_PAR_PERMISSION_DENIED : TSDB_CODE_SUCCESS; case QUERY_NODE_SHOW_TABLES_STMT: case QUERY_NODE_SHOW_STABLES_STMT: diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index ee4ae248729..7f486dfc7ba 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -111,6 +111,7 @@ static SKeyword keywordTable[] = { {"GRANTS", TK_GRANTS}, {"FULL", TK_FULL}, {"LOG", TK_LOG}, + {"MACHINES", TK_MACHINES}, {"GROUP", TK_GROUP}, {"HAVING", TK_HAVING}, {"HOST", TK_HOST}, diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 536eb568b1a..c5efdab5336 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -275,12 +275,18 @@ static const SSysTableShowAdapter sysTableShowAdapter[] = { .numOfShowCols = 1, .pShowCols = {"*"} }, - { .showType = QUERY_NODE_SHOW_GRANTS_FULL_STMT, + { .showType = QUERY_NODE_SHOW_GRANTS_LOG_STMT, .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_GRANTS_LOG, .numOfShowCols = 1, .pShowCols = {"*"} }, + { .showType = QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_MACHINES, + .numOfShowCols = 1, + .pShowCols = {"*"} + }, }; // clang-format on @@ -10650,6 +10656,7 @@ static int32_t rewriteQuery(STranslateContext* pCxt, SQuery* pQuery) { case QUERY_NODE_SHOW_VIEWS_STMT: case QUERY_NODE_SHOW_GRANTS_FULL_STMT: case QUERY_NODE_SHOW_GRANTS_LOG_STMT: + case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: code = rewriteShow(pCxt, pQuery); break; case QUERY_NODE_SHOW_VGROUPS_STMT: diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index de2a94eb206..0b0dc657b11 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -104,29 +104,29 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 510 +#define YYNOCODE 511 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - EOperatorType yy20; - int32_t yy40; - EFillMode yy114; - int8_t yy143; - SDataType yy184; - SShowTablesOption yy277; - SNodeList* yy364; - int64_t yy429; - EShowKind yy430; - bool yy437; - ENullOrder yy517; - SAlterOption yy665; - EJoinType yy732; - STokenPair yy777; - SToken yy929; - EOrder yy938; - SNode* yy992; + EOperatorType yy30; + EJoinType yy246; + int64_t yy277; + ENullOrder yy361; + STokenPair yy483; + SNode* yy490; + SNodeList* yy502; + SAlterOption yy529; + SToken yy561; + EShowKind yy579; + EFillMode yy718; + int32_t yy774; + SDataType yy826; + bool yy845; + EOrder yy876; + SShowTablesOption yy961; + int8_t yy1013; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -142,18 +142,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 845 -#define YYNRULE 646 -#define YYNRULE_WITH_ACTION 646 -#define YYNTOKEN 349 -#define YY_MAX_SHIFT 844 -#define YY_MIN_SHIFTREDUCE 1247 -#define YY_MAX_SHIFTREDUCE 1892 -#define YY_ERROR_ACTION 1893 -#define YY_ACCEPT_ACTION 1894 -#define YY_NO_ACTION 1895 -#define YY_MIN_REDUCE 1896 -#define YY_MAX_REDUCE 2541 +#define YYNSTATE 846 +#define YYNRULE 647 +#define YYNRULE_WITH_ACTION 647 +#define YYNTOKEN 350 +#define YY_MAX_SHIFT 845 +#define YY_MIN_SHIFTREDUCE 1248 +#define YY_MAX_SHIFTREDUCE 1894 +#define YY_ERROR_ACTION 1895 +#define YY_ACCEPT_ACTION 1896 +#define YY_NO_ACTION 1897 +#define YY_MIN_REDUCE 1898 +#define YY_MAX_REDUCE 2544 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -220,889 +220,879 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (3138) +#define YY_ACTTAB_COUNT (3083) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 482, 2199, 174, 466, 1908, 2302, 422, 2448, 465, 2132, - /* 10 */ 2134, 420, 48, 46, 1816, 1896, 732, 237, 2405, 168, - /* 20 */ 417, 567, 1657, 1947, 41, 40, 399, 2088, 47, 45, - /* 30 */ 44, 43, 42, 2445, 2137, 1742, 1982, 1655, 196, 136, - /* 40 */ 135, 134, 133, 132, 131, 130, 129, 128, 2343, 219, - /* 50 */ 2126, 68, 2139, 672, 2223, 672, 2512, 691, 2512, 382, - /* 60 */ 564, 712, 184, 565, 1939, 1737, 1897, 2137, 692, 410, - /* 70 */ 9, 19, 2220, 717, 2518, 203, 2518, 203, 1663, 2513, - /* 80 */ 698, 2513, 698, 1683, 384, 2361, 2203, 127, 95, 2361, - /* 90 */ 126, 125, 124, 123, 122, 121, 120, 119, 118, 1682, - /* 100 */ 796, 2309, 1985, 746, 841, 386, 1313, 15, 1312, 816, - /* 110 */ 815, 814, 813, 429, 2081, 812, 811, 151, 806, 805, - /* 120 */ 804, 803, 802, 801, 800, 150, 794, 793, 792, 428, - /* 130 */ 427, 789, 788, 787, 183, 182, 786, 697, 2223, 173, - /* 140 */ 2512, 1314, 2342, 1744, 1745, 2380, 690, 2025, 114, 2344, - /* 150 */ 750, 2346, 2347, 745, 63, 740, 2221, 717, 696, 203, - /* 160 */ 186, 184, 2433, 2513, 698, 798, 413, 2429, 783, 161, - /* 170 */ 160, 780, 779, 778, 158, 626, 625, 624, 2448, 1717, - /* 180 */ 1727, 205, 616, 143, 620, 2204, 1743, 1746, 619, 2463, - /* 190 */ 2139, 2517, 729, 618, 623, 392, 391, 398, 2319, 617, - /* 200 */ 656, 1658, 613, 1656, 2444, 2137, 1486, 1487, 1685, 1889, - /* 210 */ 41, 40, 2327, 63, 47, 45, 44, 43, 42, 272, - /* 220 */ 584, 127, 2323, 271, 126, 125, 124, 123, 122, 121, - /* 230 */ 120, 119, 118, 1661, 1662, 1714, 1682, 1716, 1719, 1720, - /* 240 */ 1721, 1722, 1723, 1724, 1725, 1726, 742, 738, 1735, 1736, - /* 250 */ 1738, 1739, 1740, 1741, 2, 48, 46, 473, 1556, 1557, - /* 260 */ 364, 1683, 1680, 417, 239, 1657, 2325, 414, 567, 515, - /* 270 */ 1947, 2343, 534, 376, 574, 2262, 740, 533, 1742, 51, - /* 280 */ 1655, 41, 40, 1714, 747, 47, 45, 44, 43, 42, - /* 290 */ 1313, 98, 1312, 496, 371, 535, 1882, 397, 1805, 646, - /* 300 */ 367, 498, 531, 529, 2271, 365, 30, 142, 1737, 217, - /* 310 */ 1820, 476, 2361, 1888, 19, 1451, 1682, 1771, 304, 730, - /* 320 */ 2086, 1663, 709, 146, 2309, 1314, 746, 38, 320, 1442, - /* 330 */ 775, 774, 773, 1446, 772, 1448, 1449, 771, 768, 208, - /* 340 */ 1457, 765, 1459, 1460, 762, 759, 756, 841, 385, 687, - /* 350 */ 15, 47, 45, 44, 43, 42, 41, 40, 274, 484, - /* 360 */ 47, 45, 44, 43, 42, 2342, 2133, 2134, 2380, 302, - /* 370 */ 729, 176, 2344, 750, 2346, 2347, 745, 304, 740, 2063, - /* 380 */ 1772, 1859, 730, 2086, 1576, 1577, 1744, 1745, 2517, 2210, - /* 390 */ 2189, 2512, 522, 521, 520, 519, 514, 513, 512, 511, - /* 400 */ 368, 1847, 56, 504, 503, 502, 501, 493, 492, 491, - /* 410 */ 2516, 486, 485, 383, 2513, 2515, 581, 477, 1544, 1545, - /* 420 */ 730, 2086, 1717, 1727, 1563, 699, 2533, 1575, 1578, 1743, - /* 430 */ 1746, 711, 201, 2441, 2442, 2319, 144, 2446, 730, 2086, - /* 440 */ 137, 693, 688, 681, 1658, 63, 1656, 607, 2448, 2077, - /* 450 */ 684, 683, 1845, 1846, 1848, 1849, 1850, 729, 470, 2323, - /* 460 */ 37, 415, 1766, 1767, 1768, 1769, 1770, 1774, 1775, 1776, - /* 470 */ 1777, 2062, 582, 2216, 2443, 1718, 1661, 1662, 1714, 106, - /* 480 */ 1716, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 742, - /* 490 */ 738, 1735, 1736, 1738, 1739, 1740, 1741, 2, 12, 48, - /* 500 */ 46, 2343, 569, 2325, 2079, 1682, 1287, 417, 566, 1657, - /* 510 */ 1394, 14, 13, 740, 747, 783, 161, 160, 780, 779, - /* 520 */ 778, 158, 1742, 34, 1655, 1294, 450, 488, 2199, 41, - /* 530 */ 40, 1715, 2343, 47, 45, 44, 43, 42, 464, 655, - /* 540 */ 463, 785, 2361, 95, 51, 747, 580, 1949, 1289, 1292, - /* 550 */ 1293, 1396, 1737, 12, 2309, 10, 746, 1294, 19, 626, - /* 560 */ 625, 624, 99, 426, 425, 1663, 616, 143, 620, 2082, - /* 570 */ 462, 2303, 619, 2361, 1919, 111, 221, 618, 623, 392, - /* 580 */ 391, 1292, 1293, 617, 108, 2309, 613, 746, 1664, 517, - /* 590 */ 2199, 841, 63, 1604, 15, 2342, 730, 2086, 2380, 2343, - /* 600 */ 1685, 114, 2344, 750, 2346, 2347, 745, 2139, 740, 304, - /* 610 */ 2139, 149, 747, 156, 2404, 2433, 137, 407, 1785, 413, - /* 620 */ 2429, 672, 716, 612, 2512, 2137, 2342, 2309, 1894, 2380, - /* 630 */ 1744, 1745, 114, 2344, 750, 2346, 2347, 745, 226, 740, - /* 640 */ 2361, 411, 2518, 203, 2532, 785, 2433, 2513, 698, 171, - /* 650 */ 413, 2429, 2309, 454, 746, 41, 40, 2088, 2330, 47, - /* 660 */ 45, 44, 43, 42, 41, 40, 1717, 1727, 47, 45, - /* 670 */ 44, 43, 42, 1743, 1746, 799, 390, 389, 2047, 1752, - /* 680 */ 456, 452, 709, 146, 653, 1682, 1316, 1317, 1658, 148, - /* 690 */ 1656, 2319, 2404, 2342, 572, 2293, 2380, 565, 1939, 114, - /* 700 */ 2344, 750, 2346, 2347, 745, 2328, 740, 432, 304, 311, - /* 710 */ 312, 2408, 431, 2433, 310, 2323, 2332, 413, 2429, 525, - /* 720 */ 1661, 1662, 1714, 1663, 1716, 1719, 1720, 1721, 1722, 1723, - /* 730 */ 1724, 1725, 1726, 742, 738, 1735, 1736, 1738, 1739, 1740, - /* 740 */ 1741, 2, 48, 46, 1747, 2343, 439, 1657, 388, 387, - /* 750 */ 417, 609, 1657, 644, 1667, 1858, 304, 672, 712, 2325, - /* 760 */ 2512, 302, 1655, 12, 1832, 1742, 420, 1655, 642, 740, - /* 770 */ 640, 269, 268, 611, 171, 2343, 1839, 610, 2518, 203, - /* 780 */ 776, 227, 2088, 2513, 698, 52, 2361, 734, 747, 2405, - /* 790 */ 2471, 1840, 300, 2441, 708, 1737, 138, 707, 2309, 2512, - /* 800 */ 746, 325, 561, 1663, 524, 523, 730, 2086, 1663, 2517, - /* 810 */ 223, 559, 2512, 159, 555, 551, 2361, 696, 203, 171, - /* 820 */ 730, 2086, 2513, 698, 2172, 423, 471, 2089, 2309, 841, - /* 830 */ 746, 2516, 1838, 171, 841, 2513, 2514, 49, 2157, 2342, - /* 840 */ 490, 2088, 2380, 2343, 1718, 114, 2344, 750, 2346, 2347, - /* 850 */ 745, 90, 740, 651, 89, 1686, 747, 186, 2484, 2433, - /* 860 */ 656, 730, 2086, 413, 2429, 730, 2086, 1918, 2139, 2342, - /* 870 */ 730, 2086, 2380, 1744, 1745, 114, 2344, 750, 2346, 2347, - /* 880 */ 745, 505, 740, 725, 2361, 506, 2464, 2532, 55, 2433, - /* 890 */ 507, 603, 602, 413, 2429, 197, 2309, 2075, 746, 334, - /* 900 */ 1715, 36, 2116, 672, 605, 604, 2512, 41, 40, 1717, - /* 910 */ 1727, 47, 45, 44, 43, 42, 1743, 1746, 614, 88, - /* 920 */ 2309, 730, 2086, 2139, 2518, 203, 1658, 1682, 1656, 2513, - /* 930 */ 698, 1658, 671, 1656, 658, 2262, 1686, 2342, 2138, 1917, - /* 940 */ 2380, 583, 1391, 114, 2344, 750, 2346, 2347, 745, 304, - /* 950 */ 740, 44, 43, 42, 1296, 2532, 2071, 2433, 1661, 1662, - /* 960 */ 1681, 413, 2429, 1661, 1662, 1714, 2026, 1716, 1719, 1720, - /* 970 */ 1721, 1722, 1723, 1724, 1725, 1726, 742, 738, 1735, 1736, - /* 980 */ 1738, 1739, 1740, 1741, 2, 48, 46, 2343, 500, 730, - /* 990 */ 2086, 255, 2309, 417, 2073, 1657, 499, 510, 509, 2139, - /* 1000 */ 747, 273, 679, 730, 2086, 633, 412, 178, 1742, 2083, - /* 1010 */ 1655, 622, 621, 2516, 2137, 3, 601, 597, 593, 589, - /* 1020 */ 645, 254, 1813, 275, 2064, 41, 40, 54, 2361, 47, - /* 1030 */ 45, 44, 43, 42, 730, 2086, 270, 1686, 1737, 1773, - /* 1040 */ 2309, 1406, 746, 1410, 730, 2086, 2139, 730, 2086, 1916, - /* 1050 */ 657, 1663, 636, 421, 283, 2069, 1405, 152, 1409, 630, - /* 1060 */ 628, 2137, 96, 61, 715, 252, 267, 315, 41, 40, - /* 1070 */ 1687, 669, 47, 45, 44, 43, 42, 841, 1625, 1626, - /* 1080 */ 49, 2342, 1682, 2343, 2380, 1686, 1718, 114, 2344, 750, - /* 1090 */ 2346, 2347, 745, 2182, 740, 713, 747, 194, 2505, 2532, - /* 1100 */ 672, 2433, 2309, 2512, 1915, 413, 2429, 72, 730, 2086, - /* 1110 */ 71, 1914, 730, 2086, 730, 2086, 1744, 1745, 2061, 35, - /* 1120 */ 1913, 2518, 203, 536, 2361, 538, 2513, 698, 727, 1778, - /* 1130 */ 242, 2290, 728, 611, 321, 480, 2309, 610, 746, 251, - /* 1140 */ 244, 1912, 1715, 810, 808, 672, 249, 578, 2512, 730, - /* 1150 */ 2086, 1687, 1717, 1727, 701, 709, 146, 2309, 777, 1743, - /* 1160 */ 1746, 2130, 709, 146, 2309, 241, 2518, 203, 648, 424, - /* 1170 */ 647, 2513, 698, 2309, 1658, 2090, 1656, 2342, 697, 1911, - /* 1180 */ 2380, 2512, 1910, 114, 2344, 750, 2346, 2347, 745, 1907, - /* 1190 */ 740, 1906, 2453, 1805, 2309, 2532, 1905, 2433, 199, 696, - /* 1200 */ 203, 413, 2429, 737, 2513, 698, 1661, 1662, 1714, 1904, - /* 1210 */ 1716, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 742, - /* 1220 */ 738, 1735, 1736, 1738, 1739, 1740, 1741, 2, 48, 46, - /* 1230 */ 2343, 1903, 2309, 159, 159, 2309, 417, 1902, 1657, 1901, - /* 1240 */ 1900, 170, 2309, 747, 2309, 2452, 198, 781, 704, 2309, - /* 1250 */ 2130, 1742, 1687, 1655, 783, 161, 160, 780, 779, 778, - /* 1260 */ 158, 112, 2309, 1899, 76, 202, 2441, 2442, 284, 144, - /* 1270 */ 2446, 2361, 204, 2441, 2442, 1666, 144, 2446, 147, 782, - /* 1280 */ 280, 1737, 2130, 2309, 2309, 746, 2078, 1924, 836, 139, - /* 1290 */ 2309, 1812, 2309, 2309, 1663, 260, 262, 1715, 258, 261, - /* 1300 */ 1687, 86, 700, 264, 266, 615, 263, 265, 1620, 1623, - /* 1310 */ 50, 50, 100, 187, 741, 87, 2309, 1891, 1892, 159, - /* 1320 */ 841, 1969, 50, 15, 2342, 1665, 2343, 2380, 1967, 1389, - /* 1330 */ 114, 2344, 750, 2346, 2347, 745, 1909, 740, 309, 747, - /* 1340 */ 1958, 1956, 2532, 627, 2433, 426, 425, 75, 413, 2429, - /* 1350 */ 629, 14, 13, 2477, 297, 1671, 790, 157, 210, 1744, - /* 1360 */ 1745, 141, 631, 634, 159, 1763, 791, 2361, 1742, 1349, - /* 1370 */ 1664, 66, 50, 685, 291, 2023, 2022, 50, 2362, 2309, - /* 1380 */ 1368, 746, 2208, 1940, 2467, 1844, 1843, 682, 289, 403, - /* 1390 */ 1366, 1950, 689, 719, 714, 1717, 1727, 1573, 1737, 754, - /* 1400 */ 430, 157, 1743, 1746, 159, 140, 157, 400, 2209, 1946, - /* 1410 */ 1350, 1663, 2127, 313, 665, 702, 2468, 1658, 2478, 1656, - /* 1420 */ 2342, 710, 722, 2380, 296, 299, 114, 2344, 750, 2346, - /* 1430 */ 2347, 745, 317, 740, 2048, 5, 303, 736, 2406, 1436, - /* 1440 */ 2433, 1669, 433, 834, 413, 2429, 1779, 1728, 438, 1661, - /* 1450 */ 1662, 1714, 333, 1716, 1719, 1720, 1721, 1722, 1723, 1724, - /* 1460 */ 1725, 1726, 742, 738, 1735, 1736, 1738, 1739, 1740, 1741, - /* 1470 */ 2, 380, 172, 446, 1464, 447, 1468, 340, 1690, 1475, - /* 1480 */ 1473, 162, 458, 457, 211, 212, 460, 214, 328, 1597, - /* 1490 */ 1680, 1668, 474, 1681, 338, 74, 483, 225, 73, 481, - /* 1500 */ 2343, 487, 489, 494, 527, 508, 526, 516, 366, 2201, - /* 1510 */ 518, 705, 528, 747, 539, 540, 537, 230, 2343, 229, - /* 1520 */ 235, 546, 544, 541, 542, 543, 232, 545, 547, 1688, - /* 1530 */ 562, 747, 4, 563, 1672, 570, 1667, 571, 573, 1683, - /* 1540 */ 240, 2361, 92, 243, 575, 1689, 576, 1691, 246, 577, - /* 1550 */ 579, 1692, 248, 2309, 2217, 746, 93, 2280, 608, 2361, - /* 1560 */ 94, 63, 585, 253, 606, 637, 1675, 1677, 116, 638, - /* 1570 */ 2076, 2309, 650, 746, 257, 2072, 360, 276, 97, 652, - /* 1580 */ 738, 1735, 1736, 1738, 1739, 1740, 1741, 1684, 259, 164, - /* 1590 */ 165, 153, 2074, 2277, 649, 2070, 2276, 2380, 2343, 64, - /* 1600 */ 352, 2344, 750, 2346, 2347, 745, 166, 740, 329, 660, - /* 1610 */ 167, 747, 2342, 659, 281, 2380, 664, 667, 342, 2344, - /* 1620 */ 750, 2346, 2347, 745, 8, 740, 676, 686, 2263, 661, - /* 1630 */ 695, 720, 2455, 2483, 286, 2482, 677, 666, 675, 2361, - /* 1640 */ 674, 279, 290, 288, 179, 292, 293, 84, 83, 469, - /* 1650 */ 706, 2309, 216, 746, 295, 404, 703, 294, 1805, 2511, - /* 1660 */ 298, 145, 1685, 2535, 1810, 461, 459, 1808, 190, 2449, - /* 1670 */ 305, 154, 330, 718, 2231, 2230, 363, 2343, 2229, 448, - /* 1680 */ 331, 409, 445, 441, 437, 434, 462, 723, 155, 105, - /* 1690 */ 747, 724, 2342, 332, 2087, 2380, 1, 62, 114, 2344, - /* 1700 */ 750, 2346, 2347, 745, 206, 740, 2414, 107, 2343, 752, - /* 1710 */ 733, 2131, 2433, 335, 1271, 838, 413, 2429, 2361, 835, - /* 1720 */ 163, 747, 359, 53, 840, 304, 339, 372, 2301, 323, - /* 1730 */ 2309, 373, 746, 2300, 2343, 2299, 81, 2294, 435, 436, - /* 1740 */ 1648, 344, 337, 1649, 209, 2292, 358, 747, 440, 2361, - /* 1750 */ 442, 348, 443, 1647, 444, 2291, 381, 2289, 449, 2288, - /* 1760 */ 451, 2309, 2287, 746, 453, 2286, 455, 1636, 2267, 213, - /* 1770 */ 2266, 2342, 215, 1600, 2380, 2361, 82, 115, 2344, 750, - /* 1780 */ 2346, 2347, 745, 1599, 740, 2244, 2243, 2309, 2242, 746, - /* 1790 */ 467, 2433, 468, 2241, 2240, 2432, 2429, 2191, 472, 1543, - /* 1800 */ 2188, 475, 2342, 2343, 2187, 2380, 2181, 479, 115, 2344, - /* 1810 */ 750, 2346, 2347, 745, 478, 740, 744, 2178, 218, 2343, - /* 1820 */ 2177, 2176, 2433, 85, 2175, 2180, 735, 2429, 748, 220, - /* 1830 */ 2179, 2380, 747, 2174, 115, 2344, 750, 2346, 2347, 745, - /* 1840 */ 2173, 740, 2171, 2170, 2361, 2169, 222, 495, 2433, 2168, - /* 1850 */ 497, 2184, 375, 2429, 2167, 2166, 2309, 2165, 746, 91, - /* 1860 */ 2361, 2164, 2163, 2186, 2162, 2161, 2160, 2159, 2158, 2156, - /* 1870 */ 2155, 2154, 2309, 2153, 746, 224, 2343, 2152, 2151, 2150, - /* 1880 */ 2149, 2148, 2147, 2185, 2183, 2146, 2145, 2144, 228, 747, - /* 1890 */ 2143, 530, 2142, 532, 1549, 2141, 2140, 2342, 1407, 1988, - /* 1900 */ 2380, 231, 369, 356, 2344, 750, 2346, 2347, 745, 743, - /* 1910 */ 740, 731, 2398, 2342, 2343, 1411, 2380, 2361, 1987, 175, - /* 1920 */ 2344, 750, 2346, 2347, 745, 233, 740, 747, 1403, 2309, - /* 1930 */ 1986, 746, 1984, 2343, 1981, 548, 550, 1980, 370, 234, - /* 1940 */ 549, 552, 554, 1973, 556, 558, 747, 1960, 553, 560, - /* 1950 */ 1935, 2343, 557, 236, 185, 2361, 78, 1934, 2329, 195, - /* 1960 */ 1295, 673, 2474, 238, 747, 568, 79, 2309, 245, 746, - /* 1970 */ 2342, 2265, 2261, 2380, 2361, 2251, 115, 2344, 750, 2346, - /* 1980 */ 2347, 745, 2239, 740, 2238, 250, 2309, 247, 746, 2215, - /* 1990 */ 2433, 2065, 2361, 1983, 1342, 2430, 1979, 401, 586, 587, - /* 2000 */ 588, 1977, 590, 591, 2309, 592, 746, 1975, 2342, 596, - /* 2010 */ 594, 2380, 1972, 595, 175, 2344, 750, 2346, 2347, 745, - /* 2020 */ 598, 740, 600, 1955, 1953, 599, 1954, 2342, 1952, 2343, - /* 2030 */ 2380, 1931, 2067, 350, 2344, 750, 2346, 2347, 745, 1480, - /* 2040 */ 740, 1479, 747, 65, 256, 2342, 2066, 1393, 2380, 807, - /* 2050 */ 1392, 357, 2344, 750, 2346, 2347, 745, 2475, 740, 1390, - /* 2060 */ 1379, 2343, 1388, 1970, 1387, 393, 1386, 1385, 809, 1968, - /* 2070 */ 2361, 1384, 394, 1381, 747, 402, 1380, 1378, 1959, 694, - /* 2080 */ 395, 1957, 2309, 396, 746, 635, 632, 1930, 1929, 1928, - /* 2090 */ 639, 1927, 641, 1926, 643, 117, 1630, 1632, 1634, 1629, - /* 2100 */ 2264, 29, 2361, 278, 57, 69, 2260, 1606, 58, 2250, - /* 2110 */ 1610, 2237, 1608, 282, 2309, 169, 746, 662, 2236, 663, - /* 2120 */ 1585, 668, 1584, 2342, 2517, 20, 2380, 31, 2343, 357, - /* 2130 */ 2344, 750, 2346, 2347, 745, 6, 740, 670, 21, 67, - /* 2140 */ 22, 747, 2235, 189, 2343, 1861, 7, 678, 285, 33, - /* 2150 */ 680, 200, 287, 1842, 1876, 2342, 177, 744, 2380, 188, - /* 2160 */ 24, 176, 2344, 750, 2346, 2347, 745, 1875, 740, 2361, - /* 2170 */ 405, 32, 2330, 1831, 408, 80, 1880, 1879, 406, 1881, - /* 2180 */ 301, 2309, 17, 746, 1882, 2361, 59, 1802, 1801, 23, - /* 2190 */ 60, 18, 2214, 180, 102, 2213, 721, 2309, 103, 746, - /* 2200 */ 316, 101, 108, 319, 25, 26, 308, 1837, 191, 1754, - /* 2210 */ 11, 2343, 13, 1673, 1764, 314, 2534, 181, 192, 70, - /* 2220 */ 104, 2383, 2342, 1732, 747, 2380, 739, 2343, 357, 2344, - /* 2230 */ 750, 2346, 2347, 745, 1753, 740, 1730, 654, 2342, 39, - /* 2240 */ 747, 2380, 1729, 1699, 356, 2344, 750, 2346, 2347, 745, - /* 2250 */ 16, 740, 2361, 2399, 27, 844, 1707, 416, 28, 753, - /* 2260 */ 419, 1465, 751, 1462, 2309, 755, 746, 757, 2361, 758, - /* 2270 */ 760, 327, 1461, 418, 761, 763, 766, 769, 1458, 1452, - /* 2280 */ 2309, 764, 746, 767, 322, 1450, 770, 193, 1456, 1455, - /* 2290 */ 109, 1454, 749, 1453, 110, 1474, 832, 828, 824, 820, - /* 2300 */ 77, 324, 1470, 1340, 1375, 2342, 784, 1372, 2380, 1371, - /* 2310 */ 1370, 357, 2344, 750, 2346, 2347, 745, 795, 740, 1369, - /* 2320 */ 2343, 2342, 1367, 1365, 2380, 1364, 1363, 357, 2344, 750, - /* 2330 */ 2346, 2347, 745, 747, 740, 1401, 207, 1400, 797, 2343, - /* 2340 */ 1358, 1361, 113, 1360, 1359, 318, 1357, 1356, 1355, 1397, - /* 2350 */ 1395, 1352, 747, 1351, 1348, 1346, 1347, 2343, 1345, 1978, - /* 2360 */ 817, 2361, 819, 1976, 821, 1974, 818, 825, 823, 1971, - /* 2370 */ 747, 827, 829, 2309, 1951, 746, 822, 726, 831, 833, - /* 2380 */ 2361, 1284, 826, 830, 1925, 837, 1272, 843, 326, 839, - /* 2390 */ 1895, 842, 2309, 1659, 746, 336, 1895, 1895, 2361, 1895, - /* 2400 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, - /* 2410 */ 2309, 1895, 746, 1895, 2342, 1895, 1895, 2380, 1895, 307, - /* 2420 */ 341, 2344, 750, 2346, 2347, 745, 306, 740, 1895, 1895, - /* 2430 */ 1895, 1895, 1895, 2342, 1895, 2343, 2380, 1895, 1895, 343, - /* 2440 */ 2344, 750, 2346, 2347, 745, 277, 740, 1895, 747, 1895, - /* 2450 */ 1895, 2342, 1895, 1895, 2380, 2343, 1895, 349, 2344, 750, - /* 2460 */ 2346, 2347, 745, 1895, 740, 1895, 1895, 1895, 747, 1895, - /* 2470 */ 1895, 1895, 1895, 1895, 1895, 1895, 2361, 1895, 1895, 1895, - /* 2480 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2309, 1895, - /* 2490 */ 746, 1895, 1895, 1895, 1895, 1895, 2361, 1895, 1895, 1895, - /* 2500 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2309, 1895, - /* 2510 */ 746, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, - /* 2520 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2342, - /* 2530 */ 1895, 1895, 2380, 1895, 2343, 353, 2344, 750, 2346, 2347, - /* 2540 */ 745, 1895, 740, 1895, 1895, 1895, 1895, 747, 1895, 2342, - /* 2550 */ 2343, 1895, 2380, 1895, 1895, 345, 2344, 750, 2346, 2347, - /* 2560 */ 745, 1895, 740, 747, 1895, 1895, 1895, 1895, 1895, 2343, - /* 2570 */ 1895, 1895, 1895, 1895, 1895, 2361, 1895, 1895, 1895, 1895, - /* 2580 */ 1895, 1895, 747, 1895, 1895, 1895, 1895, 2309, 1895, 746, - /* 2590 */ 1895, 2361, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, - /* 2600 */ 1895, 1895, 1895, 2309, 1895, 746, 1895, 1895, 1895, 1895, - /* 2610 */ 2361, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, - /* 2620 */ 1895, 1895, 2309, 1895, 746, 1895, 1895, 1895, 2342, 1895, - /* 2630 */ 1895, 2380, 1895, 1895, 354, 2344, 750, 2346, 2347, 745, - /* 2640 */ 1895, 740, 1895, 1895, 2342, 1895, 1895, 2380, 1895, 2343, - /* 2650 */ 346, 2344, 750, 2346, 2347, 745, 1895, 740, 1895, 1895, - /* 2660 */ 1895, 1895, 747, 2342, 2343, 1895, 2380, 1895, 1895, 355, - /* 2670 */ 2344, 750, 2346, 2347, 745, 1895, 740, 747, 1895, 1895, - /* 2680 */ 2343, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, - /* 2690 */ 2361, 1895, 1895, 747, 1895, 1895, 1895, 1895, 1895, 1895, - /* 2700 */ 1895, 1895, 2309, 1895, 746, 2361, 1895, 1895, 1895, 1895, - /* 2710 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2309, 1895, 746, - /* 2720 */ 1895, 2361, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, - /* 2730 */ 1895, 1895, 1895, 2309, 1895, 746, 1895, 1895, 1895, 1895, - /* 2740 */ 1895, 1895, 1895, 2342, 1895, 1895, 2380, 2343, 1895, 347, - /* 2750 */ 2344, 750, 2346, 2347, 745, 1895, 740, 1895, 2342, 1895, - /* 2760 */ 747, 2380, 1895, 2343, 361, 2344, 750, 2346, 2347, 745, - /* 2770 */ 1895, 740, 1895, 1895, 2342, 1895, 747, 2380, 2343, 1895, - /* 2780 */ 362, 2344, 750, 2346, 2347, 745, 1895, 740, 2361, 1895, - /* 2790 */ 1895, 747, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, - /* 2800 */ 2309, 1895, 746, 1895, 2361, 1895, 1895, 1895, 1895, 1895, - /* 2810 */ 1895, 1895, 1895, 1895, 1895, 1895, 2309, 1895, 746, 2361, - /* 2820 */ 1895, 2343, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, - /* 2830 */ 1895, 2309, 1895, 746, 747, 1895, 1895, 1895, 1895, 1895, - /* 2840 */ 1895, 2342, 1895, 2343, 2380, 1895, 1895, 2355, 2344, 750, - /* 2850 */ 2346, 2347, 745, 1895, 740, 1895, 747, 2342, 1895, 1895, - /* 2860 */ 2380, 1895, 2361, 2354, 2344, 750, 2346, 2347, 745, 1895, - /* 2870 */ 740, 1895, 2342, 1895, 2309, 2380, 746, 1895, 2353, 2344, - /* 2880 */ 750, 2346, 2347, 745, 2361, 740, 1895, 1895, 1895, 1895, - /* 2890 */ 1895, 1895, 1895, 1895, 1895, 1895, 2309, 1895, 746, 1895, - /* 2900 */ 2343, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, - /* 2910 */ 1895, 1895, 1895, 747, 1895, 2342, 2343, 1895, 2380, 1895, - /* 2920 */ 1895, 377, 2344, 750, 2346, 2347, 745, 1895, 740, 747, - /* 2930 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2342, 1895, 1895, - /* 2940 */ 2380, 2361, 1895, 378, 2344, 750, 2346, 2347, 745, 1895, - /* 2950 */ 740, 1895, 1895, 2309, 1895, 746, 1895, 2361, 1895, 1895, - /* 2960 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2309, - /* 2970 */ 1895, 746, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, - /* 2980 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, - /* 2990 */ 1895, 1895, 1895, 1895, 2342, 1895, 1895, 2380, 1895, 1895, - /* 3000 */ 374, 2344, 750, 2346, 2347, 745, 1895, 740, 1895, 1895, - /* 3010 */ 2342, 1895, 1895, 2380, 1895, 2343, 379, 2344, 750, 2346, - /* 3020 */ 2347, 745, 1895, 740, 1895, 1895, 1895, 1895, 747, 1895, - /* 3030 */ 2343, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, - /* 3040 */ 1895, 1895, 1895, 747, 1895, 1895, 1895, 1895, 1895, 1895, - /* 3050 */ 1895, 1895, 1895, 1895, 1895, 1895, 2361, 1895, 1895, 1895, - /* 3060 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2309, 1895, - /* 3070 */ 746, 2361, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, - /* 3080 */ 1895, 1895, 1895, 2309, 1895, 746, 1895, 1895, 1895, 1895, - /* 3090 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, - /* 3100 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 748, - /* 3110 */ 1895, 1895, 2380, 1895, 1895, 352, 2344, 750, 2346, 2347, - /* 3120 */ 745, 1895, 740, 1895, 2342, 1895, 1895, 2380, 1895, 1895, - /* 3130 */ 351, 2344, 750, 2346, 2347, 745, 1895, 740, + /* 0 */ 1921, 2322, 565, 2077, 466, 566, 1941, 14, 13, 465, + /* 10 */ 2175, 2305, 48, 46, 1818, 2330, 2520, 34, 411, 2515, + /* 20 */ 417, 1684, 1659, 41, 40, 2326, 171, 47, 45, 44, + /* 30 */ 43, 42, 2073, 645, 2090, 1744, 1984, 1657, 2519, 731, + /* 40 */ 2088, 698, 2516, 2518, 2515, 2346, 38, 320, 643, 582, + /* 50 */ 641, 269, 268, 2312, 673, 710, 146, 2515, 713, 137, + /* 60 */ 112, 673, 697, 203, 2515, 1739, 608, 2516, 699, 2328, + /* 70 */ 414, 19, 174, 2226, 1910, 2521, 203, 147, 1665, 741, + /* 80 */ 2516, 699, 2521, 203, 2226, 2080, 2364, 2516, 699, 41, + /* 90 */ 40, 2224, 718, 47, 45, 44, 43, 42, 2312, 410, + /* 100 */ 747, 585, 2223, 718, 842, 583, 2219, 15, 473, 817, + /* 110 */ 816, 815, 814, 429, 1787, 813, 812, 151, 807, 806, + /* 120 */ 805, 804, 803, 802, 801, 150, 795, 794, 793, 428, + /* 130 */ 427, 790, 789, 788, 183, 182, 787, 2064, 1314, 2345, + /* 140 */ 1313, 63, 2383, 1746, 1747, 114, 2347, 751, 2349, 2350, + /* 150 */ 746, 730, 741, 532, 530, 142, 366, 186, 573, 2436, + /* 160 */ 217, 566, 1941, 413, 2432, 300, 2444, 709, 570, 138, + /* 170 */ 708, 509, 2515, 1315, 567, 508, 184, 2141, 205, 2520, + /* 180 */ 1719, 1729, 2515, 507, 382, 656, 2466, 1745, 1748, 1860, + /* 190 */ 697, 203, 2139, 710, 146, 2516, 699, 1898, 384, 688, + /* 200 */ 2206, 2519, 1660, 63, 1658, 2516, 2517, 786, 196, 710, + /* 210 */ 146, 41, 40, 731, 2088, 47, 45, 44, 43, 42, + /* 220 */ 2128, 136, 135, 134, 133, 132, 131, 130, 129, 128, + /* 230 */ 730, 482, 2202, 208, 1663, 1664, 1716, 52, 1718, 1721, + /* 240 */ 1722, 1723, 1724, 1725, 1726, 1727, 1728, 743, 739, 1737, + /* 250 */ 1738, 1740, 1741, 1742, 1743, 2, 48, 46, 581, 2520, + /* 260 */ 1685, 364, 698, 1682, 417, 2515, 1659, 731, 2088, 99, + /* 270 */ 516, 237, 2346, 535, 376, 568, 1687, 1949, 534, 1744, + /* 280 */ 219, 1657, 692, 697, 203, 745, 272, 56, 2516, 699, + /* 290 */ 271, 694, 689, 682, 496, 450, 536, 464, 1687, 463, + /* 300 */ 1606, 365, 498, 202, 2444, 2445, 304, 144, 2449, 1739, + /* 310 */ 2364, 657, 476, 2364, 1684, 19, 1452, 51, 1773, 204, + /* 320 */ 2444, 2445, 1665, 144, 2449, 2312, 68, 747, 3, 462, + /* 330 */ 1443, 776, 775, 774, 1447, 773, 1449, 1450, 772, 769, + /* 340 */ 54, 1458, 766, 1460, 1461, 763, 760, 757, 842, 385, + /* 350 */ 1684, 15, 784, 161, 160, 781, 780, 779, 158, 98, + /* 360 */ 484, 1987, 371, 2451, 1884, 397, 2345, 647, 304, 2383, + /* 370 */ 2185, 691, 356, 2347, 751, 2349, 2350, 746, 744, 741, + /* 380 */ 732, 2401, 1774, 1578, 1579, 575, 2265, 1746, 1747, 2448, + /* 390 */ 2213, 2192, 1920, 523, 522, 521, 520, 515, 514, 513, + /* 400 */ 512, 368, 304, 710, 146, 502, 501, 500, 499, 493, + /* 410 */ 492, 491, 480, 486, 485, 383, 797, 731, 2088, 477, + /* 420 */ 1546, 1547, 173, 454, 1719, 1729, 1565, 1577, 1580, 63, + /* 430 */ 2027, 1745, 1748, 1297, 627, 626, 625, 137, 302, 1683, + /* 440 */ 730, 617, 143, 621, 613, 2312, 1660, 620, 1658, 184, + /* 450 */ 456, 452, 619, 624, 392, 391, 488, 2202, 618, 1684, + /* 460 */ 302, 614, 37, 415, 1768, 1769, 1770, 1771, 1772, 1776, + /* 470 */ 1777, 1778, 1779, 2207, 1558, 1559, 390, 389, 1663, 1664, + /* 480 */ 1716, 799, 1718, 1721, 1722, 1723, 1724, 1725, 1726, 1727, + /* 490 */ 1728, 743, 739, 1737, 1738, 1740, 1741, 1742, 1743, 2, + /* 500 */ 12, 48, 46, 2346, 738, 221, 2135, 2136, 2322, 417, + /* 510 */ 1720, 1659, 712, 201, 2444, 2445, 748, 144, 2449, 239, + /* 520 */ 159, 1685, 2079, 568, 1744, 1949, 1657, 51, 12, 36, + /* 530 */ 10, 2322, 2326, 95, 2346, 41, 40, 731, 2088, 47, + /* 540 */ 45, 44, 43, 42, 2364, 2331, 63, 713, 388, 387, + /* 550 */ 386, 610, 731, 2088, 1739, 2326, 2312, 470, 747, 2083, + /* 560 */ 19, 627, 626, 625, 731, 2088, 1717, 1665, 617, 143, + /* 570 */ 621, 693, 471, 612, 620, 2364, 2328, 611, 2519, 619, + /* 580 */ 624, 392, 391, 2141, 490, 618, 741, 2312, 614, 747, + /* 590 */ 398, 604, 603, 842, 304, 55, 15, 2345, 2139, 2328, + /* 600 */ 2383, 2346, 786, 114, 2347, 751, 2349, 2350, 746, 741, + /* 610 */ 741, 1317, 1318, 149, 748, 156, 2407, 2436, 9, 41, + /* 620 */ 40, 413, 2432, 47, 45, 44, 43, 42, 2345, 654, + /* 630 */ 1896, 2383, 1746, 1747, 114, 2347, 751, 2349, 2350, 746, + /* 640 */ 2274, 741, 2364, 1822, 1487, 1488, 186, 657, 2436, 1684, + /* 650 */ 518, 2202, 413, 2432, 2312, 127, 747, 1899, 126, 125, + /* 660 */ 124, 123, 122, 121, 120, 119, 118, 1765, 422, 1719, + /* 670 */ 1729, 2134, 2136, 1754, 2451, 2467, 1745, 1748, 127, 1684, + /* 680 */ 12, 126, 125, 124, 123, 122, 121, 120, 119, 118, + /* 690 */ 672, 1660, 304, 1658, 274, 2345, 731, 2088, 2383, 226, + /* 700 */ 2447, 114, 2347, 751, 2349, 2350, 746, 1919, 741, 432, + /* 710 */ 420, 304, 777, 2411, 431, 2436, 503, 159, 171, 413, + /* 720 */ 2432, 659, 2265, 1663, 1664, 1716, 2090, 1718, 1721, 1722, + /* 730 */ 1723, 1724, 1725, 1726, 1727, 1728, 743, 739, 1737, 1738, + /* 740 */ 1740, 1741, 1742, 1743, 2, 48, 46, 1749, 2346, 420, + /* 750 */ 426, 425, 634, 417, 1407, 1659, 1841, 168, 423, 673, + /* 760 */ 2312, 748, 2515, 1951, 399, 2090, 171, 646, 1744, 1406, + /* 770 */ 1657, 1842, 2139, 2159, 2090, 1666, 731, 2088, 2346, 106, + /* 780 */ 2521, 203, 95, 270, 1775, 2516, 699, 1716, 1314, 2364, + /* 790 */ 1313, 748, 1622, 2474, 223, 2141, 504, 1688, 1739, 637, + /* 800 */ 1395, 2312, 407, 747, 2081, 1891, 631, 629, 2084, 1720, + /* 810 */ 2139, 1665, 1840, 267, 47, 45, 44, 43, 42, 2364, + /* 820 */ 41, 40, 61, 1315, 47, 45, 44, 43, 42, 526, + /* 830 */ 670, 2312, 1688, 747, 1688, 90, 537, 842, 89, 1720, + /* 840 */ 49, 1397, 2345, 731, 2088, 2383, 2346, 1807, 114, 2347, + /* 850 */ 751, 2349, 2350, 746, 72, 741, 1659, 71, 1665, 748, + /* 860 */ 2535, 2487, 2436, 505, 35, 1717, 413, 2432, 701, 731, + /* 870 */ 2088, 1657, 2345, 1849, 1780, 2383, 1746, 1747, 114, 2347, + /* 880 */ 751, 2349, 2350, 746, 273, 741, 1918, 2364, 2065, 584, + /* 890 */ 2535, 227, 2436, 2141, 562, 1717, 413, 2432, 1815, 2312, + /* 900 */ 412, 747, 334, 560, 88, 2118, 556, 552, 2139, 1890, + /* 910 */ 731, 2088, 1665, 1719, 1729, 525, 524, 1917, 325, 1411, + /* 920 */ 1745, 1748, 685, 684, 1847, 1848, 1850, 1851, 1852, 2141, + /* 930 */ 2085, 1295, 511, 510, 1410, 1660, 421, 1658, 842, 2312, + /* 940 */ 2345, 612, 1669, 2383, 2139, 611, 114, 2347, 751, 2349, + /* 950 */ 2350, 746, 1916, 741, 1915, 1293, 1294, 1914, 2535, 194, + /* 960 */ 2436, 2075, 1627, 1628, 413, 2432, 2071, 1663, 1664, 1716, + /* 970 */ 2312, 1718, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, + /* 980 */ 743, 739, 1737, 1738, 1740, 1741, 1742, 1743, 2, 48, + /* 990 */ 46, 2346, 606, 605, 199, 2063, 198, 417, 733, 1659, + /* 1000 */ 2408, 539, 623, 622, 748, 2312, 680, 2312, 800, 2092, + /* 1010 */ 2312, 2049, 1744, 1689, 1657, 41, 40, 731, 2088, 47, + /* 1020 */ 45, 44, 43, 42, 784, 161, 160, 781, 780, 779, + /* 1030 */ 158, 171, 2364, 44, 43, 42, 1660, 275, 1658, 2091, + /* 1040 */ 30, 2451, 1739, 280, 2312, 1688, 747, 1913, 1689, 1684, + /* 1050 */ 1689, 311, 312, 41, 40, 1665, 310, 47, 45, 44, + /* 1060 */ 43, 42, 731, 2088, 1288, 1912, 2293, 2446, 1663, 1664, + /* 1070 */ 41, 40, 1909, 2346, 47, 45, 44, 43, 42, 731, + /* 1080 */ 2088, 842, 283, 1295, 49, 2345, 748, 148, 2383, 2346, + /* 1090 */ 2407, 114, 2347, 751, 2349, 2350, 746, 2141, 741, 716, + /* 1100 */ 2312, 702, 748, 2535, 2508, 2436, 1290, 1293, 1294, 413, + /* 1110 */ 2432, 735, 717, 2408, 2364, 1861, 811, 809, 2312, 401, + /* 1120 */ 1746, 1747, 2066, 731, 2088, 2312, 2312, 197, 747, 1908, + /* 1130 */ 2364, 784, 161, 160, 781, 780, 779, 158, 742, 2141, + /* 1140 */ 731, 2088, 2312, 315, 747, 76, 731, 2088, 2141, 731, + /* 1150 */ 2088, 731, 2088, 1834, 726, 152, 1907, 1719, 1729, 778, + /* 1160 */ 424, 1906, 2132, 2140, 1745, 1748, 728, 2345, 1814, 729, + /* 1170 */ 2383, 321, 2028, 357, 2347, 751, 2349, 2350, 746, 1660, + /* 1180 */ 741, 1658, 2312, 2345, 1905, 1904, 2383, 2456, 1807, 114, + /* 1190 */ 2347, 751, 2349, 2350, 746, 1911, 741, 87, 2306, 1903, + /* 1200 */ 652, 2535, 782, 2436, 1902, 2132, 1901, 413, 2432, 2312, + /* 1210 */ 284, 1663, 1664, 1716, 2312, 1718, 1721, 1722, 1723, 1724, + /* 1220 */ 1725, 1726, 1727, 1728, 743, 739, 1737, 1738, 1740, 1741, + /* 1230 */ 1742, 1743, 2, 48, 46, 139, 783, 2312, 2312, 2132, + /* 1240 */ 1971, 417, 615, 1659, 170, 1926, 837, 86, 673, 2296, + /* 1250 */ 673, 2515, 2312, 2515, 100, 2346, 1744, 2312, 1657, 2312, + /* 1260 */ 616, 1689, 628, 255, 260, 1717, 1392, 258, 748, 2521, + /* 1270 */ 203, 2521, 203, 1969, 2516, 699, 2516, 699, 262, 178, + /* 1280 */ 264, 261, 266, 263, 1390, 265, 1739, 1960, 602, 598, + /* 1290 */ 594, 590, 1958, 254, 210, 630, 2364, 41, 40, 1665, + /* 1300 */ 439, 47, 45, 44, 43, 42, 2480, 159, 2312, 632, + /* 1310 */ 747, 649, 705, 648, 635, 50, 50, 2333, 172, 187, + /* 1320 */ 1893, 1894, 1668, 340, 159, 842, 14, 13, 15, 50, + /* 1330 */ 309, 75, 2346, 297, 96, 686, 1667, 252, 1350, 658, + /* 1340 */ 338, 74, 157, 159, 73, 748, 66, 2455, 791, 2345, + /* 1350 */ 792, 141, 2383, 50, 367, 175, 2347, 751, 2349, 2350, + /* 1360 */ 746, 111, 741, 703, 1746, 1747, 235, 547, 545, 542, + /* 1370 */ 108, 291, 1369, 2364, 1367, 2335, 2025, 714, 2365, 1351, + /* 1380 */ 2024, 2211, 1625, 50, 1942, 2312, 2470, 747, 683, 673, + /* 1390 */ 1846, 1845, 2515, 403, 289, 690, 400, 674, 2477, 715, + /* 1400 */ 720, 1719, 1729, 242, 1575, 313, 723, 63, 1745, 1748, + /* 1410 */ 2521, 203, 251, 244, 1948, 2516, 699, 317, 1437, 249, + /* 1420 */ 579, 1781, 430, 1660, 2212, 1658, 2345, 673, 1730, 2383, + /* 1430 */ 2515, 1952, 114, 2347, 751, 2349, 2350, 746, 241, 741, + /* 1440 */ 755, 157, 2129, 159, 2535, 64, 2436, 140, 2521, 203, + /* 1450 */ 413, 2432, 157, 2516, 699, 1663, 1664, 1716, 333, 1718, + /* 1460 */ 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 743, 739, + /* 1470 */ 1737, 1738, 1740, 1741, 1742, 1743, 2, 666, 2471, 296, + /* 1480 */ 2481, 426, 425, 835, 2346, 711, 303, 299, 2050, 1671, + /* 1490 */ 5, 1673, 438, 433, 84, 83, 469, 748, 380, 216, + /* 1500 */ 446, 1692, 447, 1670, 1744, 458, 1666, 457, 212, 214, + /* 1510 */ 460, 2346, 461, 459, 1599, 1465, 1469, 211, 1476, 328, + /* 1520 */ 1682, 474, 1474, 363, 748, 2364, 448, 162, 1683, 445, + /* 1530 */ 441, 437, 434, 462, 1739, 481, 225, 2312, 483, 747, + /* 1540 */ 487, 489, 528, 506, 494, 517, 2204, 1665, 519, 527, + /* 1550 */ 529, 540, 2364, 541, 538, 230, 543, 229, 544, 232, + /* 1560 */ 546, 548, 1690, 563, 2312, 4, 747, 571, 564, 572, + /* 1570 */ 574, 240, 304, 737, 92, 1685, 706, 243, 2345, 576, + /* 1580 */ 2346, 2383, 1691, 577, 114, 2347, 751, 2349, 2350, 746, + /* 1590 */ 1693, 741, 578, 748, 246, 1694, 2409, 580, 2436, 248, + /* 1600 */ 93, 586, 413, 2432, 607, 2345, 2220, 94, 2383, 253, + /* 1610 */ 360, 114, 2347, 751, 2349, 2350, 746, 609, 741, 638, + /* 1620 */ 116, 2364, 639, 734, 2283, 2436, 2078, 651, 257, 413, + /* 1630 */ 2432, 2074, 259, 2312, 653, 747, 164, 165, 2076, 2072, + /* 1640 */ 97, 153, 166, 276, 167, 2280, 1686, 2279, 661, 329, + /* 1650 */ 2266, 662, 660, 281, 279, 687, 2486, 721, 668, 665, + /* 1660 */ 8, 667, 677, 2485, 696, 675, 404, 678, 676, 2458, + /* 1670 */ 2538, 1674, 294, 1669, 2345, 290, 179, 2383, 707, 293, + /* 1680 */ 115, 2347, 751, 2349, 2350, 746, 286, 741, 288, 295, + /* 1690 */ 292, 2514, 704, 1807, 2436, 2346, 655, 145, 2435, 2432, + /* 1700 */ 1687, 1812, 298, 1677, 1679, 2452, 1810, 1, 748, 719, + /* 1710 */ 190, 305, 154, 2234, 845, 724, 155, 739, 1737, 1738, + /* 1720 */ 1740, 1741, 1742, 1743, 2233, 2232, 330, 2346, 331, 409, + /* 1730 */ 327, 725, 105, 2133, 2089, 332, 2364, 62, 107, 2417, + /* 1740 */ 748, 206, 1272, 335, 753, 839, 193, 836, 2312, 841, + /* 1750 */ 747, 323, 163, 372, 53, 833, 829, 825, 821, 359, + /* 1760 */ 324, 373, 2346, 339, 2304, 337, 2303, 2302, 2364, 344, + /* 1770 */ 81, 358, 348, 2297, 435, 748, 436, 1650, 1651, 209, + /* 1780 */ 2312, 440, 747, 2295, 442, 443, 444, 1649, 2294, 2345, + /* 1790 */ 381, 2292, 2383, 449, 2291, 115, 2347, 751, 2349, 2350, + /* 1800 */ 746, 113, 741, 2364, 318, 451, 2290, 453, 2289, 2436, + /* 1810 */ 1638, 455, 2270, 736, 2432, 2312, 213, 747, 2269, 215, + /* 1820 */ 1602, 749, 82, 1601, 2383, 2247, 2246, 115, 2347, 751, + /* 1830 */ 2349, 2350, 746, 2245, 741, 2346, 727, 467, 468, 2244, + /* 1840 */ 2243, 2436, 2194, 2191, 472, 375, 2432, 1545, 748, 2190, + /* 1850 */ 475, 2184, 479, 478, 2181, 2180, 2345, 2179, 2346, 2383, + /* 1860 */ 218, 2178, 176, 2347, 751, 2349, 2350, 746, 85, 741, + /* 1870 */ 2183, 748, 2182, 220, 2177, 2176, 2364, 2174, 2346, 307, + /* 1880 */ 222, 495, 2171, 497, 2169, 2168, 306, 2173, 2312, 2172, + /* 1890 */ 747, 748, 2167, 2346, 2166, 2189, 2165, 2164, 2163, 2364, + /* 1900 */ 2187, 2170, 2162, 2161, 2160, 277, 748, 2158, 2157, 2156, + /* 1910 */ 2155, 2312, 2154, 747, 224, 2152, 700, 2536, 2153, 2364, + /* 1920 */ 2151, 91, 2150, 2149, 402, 2188, 2186, 2148, 2147, 2345, + /* 1930 */ 2146, 2312, 2383, 747, 2364, 115, 2347, 751, 2349, 2350, + /* 1940 */ 746, 1551, 741, 2145, 228, 2144, 2312, 531, 747, 2436, + /* 1950 */ 533, 2143, 2345, 2142, 2433, 2383, 1408, 1412, 175, 2347, + /* 1960 */ 751, 2349, 2350, 746, 1990, 741, 369, 370, 1404, 1989, + /* 1970 */ 231, 233, 2345, 1988, 1986, 2383, 234, 1983, 357, 2347, + /* 1980 */ 751, 2349, 2350, 746, 549, 741, 551, 2345, 1982, 2346, + /* 1990 */ 2383, 550, 553, 350, 2347, 751, 2349, 2350, 746, 554, + /* 2000 */ 741, 2478, 748, 555, 1975, 557, 1962, 558, 559, 561, + /* 2010 */ 1937, 185, 236, 78, 2332, 1296, 1936, 2268, 79, 195, + /* 2020 */ 2264, 2254, 238, 2242, 569, 2346, 245, 247, 2241, 250, + /* 2030 */ 2364, 2218, 2067, 1985, 1343, 1981, 587, 588, 748, 695, + /* 2040 */ 589, 1979, 2312, 592, 747, 591, 1977, 593, 595, 597, + /* 2050 */ 1974, 596, 599, 600, 601, 1957, 1955, 2346, 1956, 1954, + /* 2060 */ 1933, 2069, 1481, 256, 65, 1480, 2364, 1394, 1972, 1380, + /* 2070 */ 745, 408, 2068, 1393, 1391, 1389, 1388, 1387, 2312, 1386, + /* 2080 */ 747, 1385, 808, 2345, 810, 1382, 2383, 393, 1970, 176, + /* 2090 */ 2347, 751, 2349, 2350, 746, 394, 741, 1961, 2364, 1381, + /* 2100 */ 1379, 395, 1959, 396, 1932, 633, 636, 1931, 1930, 1929, + /* 2110 */ 2312, 640, 747, 642, 1928, 644, 117, 1632, 2267, 2345, + /* 2120 */ 1634, 1631, 2383, 57, 278, 357, 2347, 751, 2349, 2350, + /* 2130 */ 746, 29, 741, 69, 2346, 1636, 2263, 1608, 1612, 58, + /* 2140 */ 2253, 1610, 663, 169, 2537, 664, 2240, 748, 2239, 669, + /* 2150 */ 2346, 2345, 2520, 1863, 2383, 20, 17, 356, 2347, 751, + /* 2160 */ 2349, 2350, 746, 748, 741, 1587, 2402, 282, 2346, 1586, + /* 2170 */ 671, 31, 21, 285, 6, 2364, 679, 7, 287, 200, + /* 2180 */ 416, 748, 2333, 22, 177, 681, 1844, 2312, 189, 747, + /* 2190 */ 33, 2364, 188, 32, 67, 24, 418, 1833, 80, 2238, + /* 2200 */ 1883, 23, 1884, 2312, 1878, 747, 1877, 405, 1882, 2364, + /* 2210 */ 18, 1881, 406, 1804, 1803, 301, 59, 60, 2217, 101, + /* 2220 */ 102, 2312, 180, 747, 25, 2216, 108, 103, 2345, 308, + /* 2230 */ 191, 2383, 314, 2346, 357, 2347, 751, 2349, 2350, 746, + /* 2240 */ 1839, 741, 70, 722, 2345, 104, 748, 2383, 26, 319, + /* 2250 */ 357, 2347, 751, 2349, 2350, 746, 1756, 741, 1755, 13, + /* 2260 */ 11, 1675, 650, 1766, 1734, 2383, 2386, 2346, 352, 2347, + /* 2270 */ 751, 2349, 2350, 746, 2364, 741, 1732, 181, 192, 316, + /* 2280 */ 748, 1709, 752, 740, 39, 754, 2312, 1731, 747, 1701, + /* 2290 */ 2346, 750, 1457, 16, 27, 28, 1341, 1466, 419, 756, + /* 2300 */ 758, 1463, 759, 748, 1462, 761, 1459, 764, 2364, 762, + /* 2310 */ 765, 767, 1453, 768, 770, 1451, 771, 109, 1456, 322, + /* 2320 */ 2312, 110, 747, 77, 1475, 1455, 1471, 2345, 1376, 1454, + /* 2330 */ 2383, 2364, 1373, 342, 2347, 751, 2349, 2350, 746, 1372, + /* 2340 */ 741, 207, 785, 2312, 1371, 747, 1370, 2346, 1368, 1366, + /* 2350 */ 1365, 1364, 796, 798, 1402, 1362, 1401, 1361, 1360, 1359, + /* 2360 */ 748, 2345, 1358, 1357, 2383, 1356, 1398, 341, 2347, 751, + /* 2370 */ 2349, 2350, 746, 1396, 741, 1353, 1352, 1349, 1348, 1347, + /* 2380 */ 1346, 1980, 818, 819, 2345, 823, 820, 2383, 2364, 1978, + /* 2390 */ 343, 2347, 751, 2349, 2350, 746, 822, 741, 824, 1976, + /* 2400 */ 2312, 826, 747, 827, 828, 1973, 830, 832, 1953, 831, + /* 2410 */ 834, 1285, 1927, 1273, 326, 838, 840, 1897, 1661, 336, + /* 2420 */ 2346, 843, 844, 1897, 1897, 1897, 1897, 1897, 1897, 1897, + /* 2430 */ 1897, 1897, 1897, 748, 1897, 1897, 1897, 1897, 1897, 1897, + /* 2440 */ 2346, 2345, 1897, 1897, 2383, 1897, 1897, 349, 2347, 751, + /* 2450 */ 2349, 2350, 746, 748, 741, 1897, 1897, 1897, 1897, 1897, + /* 2460 */ 1897, 2364, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, + /* 2470 */ 1897, 1897, 1897, 2312, 1897, 747, 1897, 1897, 1897, 1897, + /* 2480 */ 1897, 2364, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, + /* 2490 */ 1897, 1897, 1897, 2312, 1897, 747, 1897, 1897, 2346, 1897, + /* 2500 */ 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, + /* 2510 */ 1897, 748, 1897, 2346, 2345, 1897, 1897, 2383, 1897, 1897, + /* 2520 */ 353, 2347, 751, 2349, 2350, 746, 748, 741, 1897, 1897, + /* 2530 */ 1897, 1897, 1897, 1897, 2345, 2346, 1897, 2383, 1897, 2364, + /* 2540 */ 345, 2347, 751, 2349, 2350, 746, 1897, 741, 748, 1897, + /* 2550 */ 1897, 2312, 1897, 747, 2364, 1897, 1897, 1897, 1897, 1897, + /* 2560 */ 1897, 1897, 1897, 1897, 1897, 1897, 2312, 1897, 747, 1897, + /* 2570 */ 1897, 1897, 1897, 1897, 1897, 1897, 2364, 1897, 1897, 1897, + /* 2580 */ 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 2312, 1897, + /* 2590 */ 747, 1897, 2345, 2346, 1897, 2383, 1897, 1897, 354, 2347, + /* 2600 */ 751, 2349, 2350, 746, 1897, 741, 748, 2345, 2346, 1897, + /* 2610 */ 2383, 1897, 1897, 346, 2347, 751, 2349, 2350, 746, 1897, + /* 2620 */ 741, 748, 1897, 1897, 1897, 1897, 1897, 1897, 2346, 2345, + /* 2630 */ 1897, 1897, 2383, 1897, 2364, 355, 2347, 751, 2349, 2350, + /* 2640 */ 746, 748, 741, 1897, 1897, 1897, 2312, 1897, 747, 2364, + /* 2650 */ 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, + /* 2660 */ 1897, 2312, 1897, 747, 1897, 1897, 1897, 1897, 1897, 2364, + /* 2670 */ 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, + /* 2680 */ 1897, 2312, 1897, 747, 1897, 1897, 1897, 2345, 1897, 1897, + /* 2690 */ 2383, 1897, 1897, 347, 2347, 751, 2349, 2350, 746, 1897, + /* 2700 */ 741, 2346, 2345, 1897, 1897, 2383, 1897, 1897, 361, 2347, + /* 2710 */ 751, 2349, 2350, 746, 748, 741, 1897, 1897, 1897, 1897, + /* 2720 */ 1897, 2346, 2345, 1897, 1897, 2383, 1897, 1897, 362, 2347, + /* 2730 */ 751, 2349, 2350, 746, 748, 741, 1897, 1897, 2346, 1897, + /* 2740 */ 1897, 1897, 2364, 1897, 1897, 1897, 1897, 1897, 1897, 1897, + /* 2750 */ 1897, 748, 1897, 1897, 2312, 1897, 747, 1897, 1897, 1897, + /* 2760 */ 1897, 1897, 2364, 1897, 1897, 1897, 1897, 1897, 1897, 1897, + /* 2770 */ 1897, 1897, 1897, 1897, 2312, 1897, 747, 1897, 1897, 2364, + /* 2780 */ 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, + /* 2790 */ 1897, 2312, 1897, 747, 1897, 2345, 1897, 1897, 2383, 1897, + /* 2800 */ 1897, 2358, 2347, 751, 2349, 2350, 746, 2346, 741, 1897, + /* 2810 */ 1897, 1897, 1897, 1897, 1897, 2345, 1897, 1897, 2383, 1897, + /* 2820 */ 748, 2357, 2347, 751, 2349, 2350, 746, 1897, 741, 1897, + /* 2830 */ 1897, 1897, 2345, 1897, 1897, 2383, 1897, 1897, 2356, 2347, + /* 2840 */ 751, 2349, 2350, 746, 1897, 741, 1897, 1897, 2364, 1897, + /* 2850 */ 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, + /* 2860 */ 2312, 1897, 747, 1897, 1897, 2346, 1897, 1897, 1897, 1897, + /* 2870 */ 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 748, 1897, + /* 2880 */ 2346, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, + /* 2890 */ 1897, 1897, 1897, 748, 1897, 1897, 1897, 1897, 1897, 1897, + /* 2900 */ 1897, 2345, 2346, 1897, 2383, 1897, 2364, 377, 2347, 751, + /* 2910 */ 2349, 2350, 746, 1897, 741, 748, 1897, 1897, 2312, 1897, + /* 2920 */ 747, 2364, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, + /* 2930 */ 1897, 1897, 1897, 2312, 1897, 747, 1897, 1897, 1897, 1897, + /* 2940 */ 1897, 1897, 1897, 2364, 1897, 1897, 1897, 1897, 1897, 1897, + /* 2950 */ 1897, 1897, 1897, 1897, 1897, 2312, 1897, 747, 1897, 2345, + /* 2960 */ 2346, 1897, 2383, 1897, 1897, 378, 2347, 751, 2349, 2350, + /* 2970 */ 746, 1897, 741, 748, 2345, 2346, 1897, 2383, 1897, 1897, + /* 2980 */ 374, 2347, 751, 2349, 2350, 746, 1897, 741, 748, 1897, + /* 2990 */ 1897, 1897, 1897, 1897, 1897, 1897, 2345, 1897, 1897, 2383, + /* 3000 */ 1897, 2364, 379, 2347, 751, 2349, 2350, 746, 1897, 741, + /* 3010 */ 1897, 1897, 1897, 2312, 1897, 747, 2364, 1897, 1897, 1897, + /* 3020 */ 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 2312, 1897, + /* 3030 */ 747, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, + /* 3040 */ 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, + /* 3050 */ 1897, 1897, 1897, 1897, 749, 1897, 1897, 2383, 1897, 1897, + /* 3060 */ 352, 2347, 751, 2349, 2350, 746, 1897, 741, 1897, 2345, + /* 3070 */ 1897, 1897, 2383, 1897, 1897, 351, 2347, 751, 2349, 2350, + /* 3080 */ 746, 1897, 741, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 364, 365, 351, 428, 353, 428, 403, 451, 433, 406, - /* 10 */ 407, 385, 12, 13, 14, 0, 463, 360, 465, 393, - /* 20 */ 20, 364, 22, 366, 8, 9, 400, 401, 12, 13, - /* 30 */ 14, 15, 16, 477, 408, 35, 0, 37, 392, 24, - /* 40 */ 25, 26, 27, 28, 29, 30, 31, 32, 352, 413, - /* 50 */ 404, 4, 393, 478, 407, 478, 481, 365, 481, 400, - /* 60 */ 359, 365, 393, 362, 363, 65, 0, 408, 20, 422, - /* 70 */ 42, 71, 425, 426, 499, 500, 499, 500, 78, 504, - /* 80 */ 505, 504, 505, 20, 415, 393, 417, 21, 373, 393, - /* 90 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 20, - /* 100 */ 13, 405, 0, 407, 104, 390, 20, 107, 22, 73, - /* 110 */ 74, 75, 76, 77, 399, 79, 80, 81, 82, 83, + /* 0 */ 353, 382, 360, 395, 429, 363, 364, 1, 2, 434, + /* 10 */ 0, 429, 12, 13, 14, 396, 479, 2, 386, 482, + /* 20 */ 20, 20, 22, 8, 9, 406, 394, 12, 13, 14, + /* 30 */ 15, 16, 395, 21, 402, 35, 0, 37, 501, 365, + /* 40 */ 366, 479, 505, 506, 482, 353, 468, 469, 36, 365, + /* 50 */ 38, 39, 40, 406, 479, 365, 366, 482, 366, 385, + /* 60 */ 372, 479, 500, 501, 482, 65, 392, 505, 506, 450, + /* 70 */ 451, 71, 352, 408, 354, 500, 501, 389, 78, 460, + /* 80 */ 505, 506, 500, 501, 408, 397, 394, 505, 506, 8, + /* 90 */ 9, 426, 427, 12, 13, 14, 15, 16, 406, 423, + /* 100 */ 408, 70, 426, 427, 104, 421, 422, 107, 365, 73, + /* 110 */ 74, 75, 76, 77, 108, 79, 80, 81, 82, 83, /* 120 */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - /* 130 */ 94, 95, 96, 97, 98, 99, 100, 478, 407, 374, - /* 140 */ 481, 55, 446, 143, 144, 449, 454, 382, 452, 453, - /* 150 */ 454, 455, 456, 457, 107, 459, 425, 426, 499, 500, - /* 160 */ 464, 393, 466, 504, 505, 78, 470, 471, 136, 137, - /* 170 */ 138, 139, 140, 141, 142, 73, 74, 75, 451, 179, - /* 180 */ 180, 485, 80, 81, 82, 417, 186, 187, 86, 493, - /* 190 */ 393, 3, 20, 91, 92, 93, 94, 400, 381, 97, - /* 200 */ 364, 201, 100, 203, 477, 408, 143, 144, 20, 193, - /* 210 */ 8, 9, 395, 107, 12, 13, 14, 15, 16, 138, - /* 220 */ 70, 21, 405, 142, 24, 25, 26, 27, 28, 29, - /* 230 */ 30, 31, 32, 233, 234, 235, 20, 237, 238, 239, + /* 130 */ 94, 95, 96, 97, 98, 99, 100, 0, 20, 447, + /* 140 */ 22, 107, 450, 143, 144, 453, 454, 455, 456, 457, + /* 150 */ 458, 20, 460, 410, 411, 37, 413, 465, 360, 467, + /* 160 */ 417, 363, 364, 471, 472, 475, 476, 477, 14, 479, + /* 170 */ 480, 161, 482, 55, 20, 165, 394, 394, 486, 479, + /* 180 */ 180, 181, 482, 173, 401, 20, 494, 187, 188, 108, + /* 190 */ 500, 501, 409, 365, 366, 505, 506, 0, 416, 186, + /* 200 */ 418, 501, 202, 107, 204, 505, 506, 70, 393, 365, + /* 210 */ 366, 8, 9, 365, 366, 12, 13, 14, 15, 16, + /* 220 */ 405, 24, 25, 26, 27, 28, 29, 30, 31, 32, + /* 230 */ 20, 365, 366, 385, 234, 235, 236, 107, 238, 239, /* 240 */ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, - /* 250 */ 250, 251, 252, 253, 254, 12, 13, 364, 179, 180, - /* 260 */ 18, 20, 20, 20, 360, 22, 449, 450, 364, 27, - /* 270 */ 366, 352, 30, 71, 438, 439, 459, 35, 35, 107, - /* 280 */ 37, 8, 9, 235, 365, 12, 13, 14, 15, 16, - /* 290 */ 20, 210, 22, 51, 213, 53, 108, 216, 270, 218, - /* 300 */ 58, 59, 409, 410, 389, 412, 33, 37, 65, 416, - /* 310 */ 14, 69, 393, 297, 71, 104, 20, 115, 271, 364, - /* 320 */ 365, 78, 364, 365, 405, 55, 407, 467, 468, 118, - /* 330 */ 119, 120, 121, 122, 123, 124, 125, 126, 127, 384, - /* 340 */ 129, 130, 131, 132, 133, 134, 135, 104, 106, 185, - /* 350 */ 107, 12, 13, 14, 15, 16, 8, 9, 443, 117, - /* 360 */ 12, 13, 14, 15, 16, 446, 406, 407, 449, 181, - /* 370 */ 20, 452, 453, 454, 455, 456, 457, 271, 459, 0, - /* 380 */ 178, 108, 364, 365, 143, 144, 143, 144, 478, 147, - /* 390 */ 148, 481, 150, 151, 152, 153, 154, 155, 156, 157, - /* 400 */ 158, 233, 384, 161, 162, 163, 164, 165, 166, 167, - /* 410 */ 500, 169, 170, 171, 504, 505, 364, 175, 176, 177, - /* 420 */ 364, 365, 179, 180, 182, 506, 507, 186, 187, 186, - /* 430 */ 187, 473, 474, 475, 476, 381, 478, 479, 364, 365, - /* 440 */ 384, 277, 278, 279, 201, 107, 203, 391, 451, 395, - /* 450 */ 282, 283, 284, 285, 286, 287, 288, 20, 384, 405, - /* 460 */ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, - /* 470 */ 268, 0, 420, 421, 477, 179, 233, 234, 235, 371, - /* 480 */ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, - /* 490 */ 247, 248, 249, 250, 251, 252, 253, 254, 255, 12, - /* 500 */ 13, 352, 14, 449, 396, 20, 4, 20, 20, 22, - /* 510 */ 37, 1, 2, 459, 365, 136, 137, 138, 139, 140, - /* 520 */ 141, 142, 35, 2, 37, 23, 69, 364, 365, 8, - /* 530 */ 9, 235, 352, 12, 13, 14, 15, 16, 200, 20, - /* 540 */ 202, 70, 393, 373, 107, 365, 20, 367, 46, 47, - /* 550 */ 48, 78, 65, 255, 405, 257, 407, 23, 71, 73, - /* 560 */ 74, 75, 174, 12, 13, 78, 80, 81, 82, 399, - /* 570 */ 232, 428, 86, 393, 352, 107, 413, 91, 92, 93, - /* 580 */ 94, 47, 48, 97, 116, 405, 100, 407, 37, 364, - /* 590 */ 365, 104, 107, 205, 107, 446, 364, 365, 449, 352, - /* 600 */ 20, 452, 453, 454, 455, 456, 457, 393, 459, 271, - /* 610 */ 393, 462, 365, 464, 465, 466, 384, 400, 108, 470, - /* 620 */ 471, 478, 408, 391, 481, 408, 446, 405, 349, 449, - /* 630 */ 143, 144, 452, 453, 454, 455, 456, 457, 413, 459, - /* 640 */ 393, 385, 499, 500, 464, 70, 466, 504, 505, 393, - /* 650 */ 470, 471, 405, 196, 407, 8, 9, 401, 49, 12, - /* 660 */ 13, 14, 15, 16, 8, 9, 179, 180, 12, 13, - /* 670 */ 14, 15, 16, 186, 187, 380, 39, 40, 383, 14, - /* 680 */ 223, 224, 364, 365, 117, 20, 56, 57, 201, 462, - /* 690 */ 203, 381, 465, 446, 359, 0, 449, 362, 363, 452, - /* 700 */ 453, 454, 455, 456, 457, 395, 459, 428, 271, 137, - /* 710 */ 138, 464, 433, 466, 142, 405, 107, 470, 471, 87, - /* 720 */ 233, 234, 235, 78, 237, 238, 239, 240, 241, 242, - /* 730 */ 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, - /* 740 */ 253, 254, 12, 13, 14, 352, 51, 22, 111, 112, - /* 750 */ 20, 114, 22, 21, 203, 108, 271, 478, 365, 449, - /* 760 */ 481, 181, 37, 255, 108, 35, 385, 37, 36, 459, - /* 770 */ 38, 39, 40, 136, 393, 352, 22, 140, 499, 500, - /* 780 */ 117, 149, 401, 504, 505, 107, 393, 463, 365, 465, - /* 790 */ 367, 37, 474, 475, 476, 65, 478, 479, 405, 481, - /* 800 */ 407, 34, 51, 78, 172, 173, 364, 365, 78, 478, - /* 810 */ 65, 60, 481, 33, 63, 64, 393, 499, 500, 393, - /* 820 */ 364, 365, 504, 505, 0, 385, 384, 401, 405, 104, - /* 830 */ 407, 500, 78, 393, 104, 504, 505, 107, 0, 446, - /* 840 */ 384, 401, 449, 352, 179, 452, 453, 454, 455, 456, - /* 850 */ 457, 106, 459, 428, 109, 20, 365, 464, 367, 466, - /* 860 */ 364, 364, 365, 470, 471, 364, 365, 352, 393, 446, - /* 870 */ 364, 365, 449, 143, 144, 452, 453, 454, 455, 456, - /* 880 */ 457, 384, 459, 408, 393, 384, 493, 464, 108, 466, - /* 890 */ 384, 369, 370, 470, 471, 434, 405, 394, 407, 386, - /* 900 */ 235, 2, 389, 478, 369, 370, 481, 8, 9, 179, - /* 910 */ 180, 12, 13, 14, 15, 16, 186, 187, 13, 174, - /* 920 */ 405, 364, 365, 393, 499, 500, 201, 20, 203, 504, - /* 930 */ 505, 201, 50, 203, 438, 439, 20, 446, 408, 352, - /* 940 */ 449, 384, 37, 452, 453, 454, 455, 456, 457, 271, - /* 950 */ 459, 14, 15, 16, 14, 464, 394, 466, 233, 234, - /* 960 */ 20, 470, 471, 233, 234, 235, 382, 237, 238, 239, - /* 970 */ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, - /* 980 */ 250, 251, 252, 253, 254, 12, 13, 352, 164, 364, - /* 990 */ 365, 35, 405, 20, 394, 22, 172, 159, 160, 393, - /* 1000 */ 365, 137, 367, 364, 365, 4, 400, 51, 35, 384, - /* 1010 */ 37, 378, 379, 3, 408, 33, 60, 61, 62, 63, - /* 1020 */ 19, 65, 4, 384, 0, 8, 9, 45, 393, 12, - /* 1030 */ 13, 14, 15, 16, 364, 365, 35, 20, 65, 178, - /* 1040 */ 405, 22, 407, 22, 364, 365, 393, 364, 365, 352, - /* 1050 */ 428, 78, 51, 400, 384, 394, 37, 33, 37, 58, - /* 1060 */ 59, 408, 106, 181, 384, 109, 65, 384, 8, 9, - /* 1070 */ 235, 189, 12, 13, 14, 15, 16, 104, 214, 215, - /* 1080 */ 107, 446, 20, 352, 449, 20, 179, 452, 453, 454, - /* 1090 */ 455, 456, 457, 0, 459, 428, 365, 181, 367, 464, - /* 1100 */ 478, 466, 405, 481, 352, 470, 471, 106, 364, 365, - /* 1110 */ 109, 352, 364, 365, 364, 365, 143, 144, 0, 258, - /* 1120 */ 352, 499, 500, 104, 393, 104, 504, 505, 384, 268, - /* 1130 */ 174, 0, 384, 136, 384, 42, 405, 140, 407, 183, - /* 1140 */ 184, 352, 235, 378, 379, 478, 190, 191, 481, 364, - /* 1150 */ 365, 235, 179, 180, 33, 364, 365, 405, 402, 186, - /* 1160 */ 187, 405, 364, 365, 405, 209, 499, 500, 217, 384, - /* 1170 */ 219, 504, 505, 405, 201, 394, 203, 446, 478, 352, - /* 1180 */ 449, 481, 352, 452, 453, 454, 455, 456, 457, 352, - /* 1190 */ 459, 352, 269, 270, 405, 464, 352, 466, 181, 499, - /* 1200 */ 500, 470, 471, 71, 504, 505, 233, 234, 235, 352, - /* 1210 */ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, - /* 1220 */ 247, 248, 249, 250, 251, 252, 253, 254, 12, 13, - /* 1230 */ 352, 352, 405, 33, 33, 405, 20, 352, 22, 352, - /* 1240 */ 352, 181, 405, 365, 405, 367, 181, 402, 33, 405, - /* 1250 */ 405, 35, 235, 37, 136, 137, 138, 139, 140, 141, - /* 1260 */ 142, 371, 405, 352, 117, 474, 475, 476, 65, 478, - /* 1270 */ 479, 393, 474, 475, 476, 37, 478, 479, 388, 402, - /* 1280 */ 394, 65, 405, 405, 405, 407, 396, 355, 356, 33, - /* 1290 */ 405, 273, 405, 405, 78, 110, 110, 235, 113, 113, - /* 1300 */ 235, 45, 292, 110, 110, 13, 113, 113, 108, 108, - /* 1310 */ 33, 33, 109, 33, 394, 168, 405, 143, 144, 33, - /* 1320 */ 104, 0, 33, 107, 446, 37, 352, 449, 0, 37, - /* 1330 */ 452, 453, 454, 455, 456, 457, 353, 459, 33, 365, - /* 1340 */ 0, 0, 464, 22, 466, 12, 13, 33, 470, 471, - /* 1350 */ 22, 1, 2, 418, 508, 22, 13, 33, 227, 143, - /* 1360 */ 144, 368, 22, 22, 33, 233, 13, 393, 35, 37, - /* 1370 */ 37, 33, 33, 497, 490, 381, 381, 33, 393, 405, - /* 1380 */ 37, 407, 418, 363, 418, 108, 108, 496, 108, 496, - /* 1390 */ 37, 0, 496, 496, 108, 179, 180, 108, 65, 33, - /* 1400 */ 368, 33, 186, 187, 33, 33, 33, 427, 418, 365, - /* 1410 */ 78, 78, 404, 108, 435, 294, 418, 201, 418, 203, - /* 1420 */ 446, 480, 108, 449, 472, 501, 452, 453, 454, 455, - /* 1430 */ 456, 457, 108, 459, 383, 274, 483, 104, 464, 108, - /* 1440 */ 466, 203, 429, 52, 470, 471, 108, 108, 51, 233, - /* 1450 */ 234, 235, 108, 237, 238, 239, 240, 241, 242, 243, - /* 1460 */ 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, - /* 1470 */ 254, 448, 18, 42, 108, 447, 108, 23, 20, 108, - /* 1480 */ 108, 108, 440, 216, 445, 373, 440, 373, 431, 199, - /* 1490 */ 20, 203, 364, 20, 40, 41, 414, 45, 44, 365, - /* 1500 */ 352, 365, 414, 411, 178, 364, 411, 365, 54, 364, - /* 1510 */ 414, 296, 411, 365, 105, 377, 103, 364, 352, 376, - /* 1520 */ 66, 67, 68, 69, 102, 375, 364, 364, 364, 20, - /* 1530 */ 357, 365, 50, 361, 201, 357, 203, 361, 440, 20, - /* 1540 */ 373, 393, 373, 373, 407, 20, 366, 20, 373, 430, - /* 1550 */ 366, 20, 373, 405, 421, 407, 373, 405, 393, 393, - /* 1560 */ 373, 107, 364, 373, 357, 355, 233, 234, 364, 355, - /* 1570 */ 393, 405, 220, 407, 393, 393, 357, 371, 107, 444, - /* 1580 */ 247, 248, 249, 250, 251, 252, 253, 20, 393, 393, - /* 1590 */ 393, 442, 393, 405, 446, 393, 405, 449, 352, 145, - /* 1600 */ 452, 453, 454, 455, 456, 457, 393, 459, 440, 207, - /* 1610 */ 393, 365, 446, 206, 371, 449, 407, 364, 452, 453, - /* 1620 */ 454, 455, 456, 457, 289, 459, 405, 281, 439, 437, - /* 1630 */ 192, 280, 492, 489, 423, 489, 291, 429, 290, 393, - /* 1640 */ 275, 436, 491, 423, 489, 488, 487, 193, 194, 195, - /* 1650 */ 295, 405, 198, 407, 429, 298, 293, 486, 270, 503, - /* 1660 */ 502, 365, 20, 509, 117, 211, 212, 272, 366, 451, - /* 1670 */ 371, 371, 423, 405, 405, 405, 222, 352, 405, 225, - /* 1680 */ 423, 405, 228, 229, 230, 231, 232, 184, 371, 371, - /* 1690 */ 365, 419, 446, 389, 365, 449, 484, 107, 452, 453, - /* 1700 */ 454, 455, 456, 457, 482, 459, 469, 107, 352, 397, - /* 1710 */ 464, 405, 466, 364, 22, 354, 470, 471, 393, 38, - /* 1720 */ 358, 365, 441, 432, 357, 271, 350, 424, 0, 371, - /* 1730 */ 405, 424, 407, 0, 352, 0, 45, 0, 37, 226, - /* 1740 */ 37, 387, 372, 37, 37, 0, 387, 365, 226, 393, - /* 1750 */ 37, 387, 37, 37, 226, 0, 226, 0, 37, 0, - /* 1760 */ 37, 405, 0, 407, 22, 0, 37, 221, 0, 209, - /* 1770 */ 0, 446, 209, 203, 449, 393, 210, 452, 453, 454, - /* 1780 */ 455, 456, 457, 201, 459, 0, 0, 405, 0, 407, - /* 1790 */ 197, 466, 196, 0, 0, 470, 471, 148, 49, 49, - /* 1800 */ 0, 37, 446, 352, 0, 449, 0, 51, 452, 453, - /* 1810 */ 454, 455, 456, 457, 37, 459, 365, 0, 49, 352, - /* 1820 */ 0, 0, 466, 45, 0, 0, 470, 471, 446, 49, - /* 1830 */ 0, 449, 365, 0, 452, 453, 454, 455, 456, 457, - /* 1840 */ 0, 459, 0, 0, 393, 0, 164, 37, 466, 0, - /* 1850 */ 164, 0, 470, 471, 0, 0, 405, 0, 407, 45, - /* 1860 */ 393, 0, 0, 0, 0, 0, 0, 0, 0, 0, - /* 1870 */ 0, 0, 405, 0, 407, 49, 352, 0, 0, 0, - /* 1880 */ 0, 0, 0, 0, 0, 0, 0, 0, 148, 365, - /* 1890 */ 0, 147, 0, 146, 22, 0, 0, 446, 22, 0, - /* 1900 */ 449, 65, 50, 452, 453, 454, 455, 456, 457, 458, - /* 1910 */ 459, 460, 461, 446, 352, 22, 449, 393, 0, 452, - /* 1920 */ 453, 454, 455, 456, 457, 65, 459, 365, 37, 405, - /* 1930 */ 0, 407, 0, 352, 0, 37, 42, 0, 50, 65, - /* 1940 */ 51, 37, 42, 0, 37, 42, 365, 0, 51, 37, - /* 1950 */ 0, 352, 51, 45, 33, 393, 42, 0, 49, 49, - /* 1960 */ 14, 494, 495, 43, 365, 49, 42, 405, 42, 407, - /* 1970 */ 446, 0, 0, 449, 393, 0, 452, 453, 454, 455, - /* 1980 */ 456, 457, 0, 459, 0, 49, 405, 192, 407, 0, - /* 1990 */ 466, 0, 393, 0, 72, 471, 0, 398, 37, 51, - /* 2000 */ 42, 0, 37, 51, 405, 42, 407, 0, 446, 42, - /* 2010 */ 37, 449, 0, 51, 452, 453, 454, 455, 456, 457, - /* 2020 */ 37, 459, 42, 0, 0, 51, 0, 446, 0, 352, - /* 2030 */ 449, 0, 0, 452, 453, 454, 455, 456, 457, 37, - /* 2040 */ 459, 22, 365, 115, 113, 446, 0, 37, 449, 33, - /* 2050 */ 37, 452, 453, 454, 455, 456, 457, 495, 459, 37, - /* 2060 */ 22, 352, 37, 0, 37, 22, 37, 37, 33, 0, - /* 2070 */ 393, 37, 22, 37, 365, 398, 37, 37, 0, 498, - /* 2080 */ 22, 0, 405, 22, 407, 37, 53, 0, 0, 0, - /* 2090 */ 37, 0, 37, 0, 22, 20, 37, 37, 108, 37, - /* 2100 */ 0, 107, 393, 49, 181, 107, 0, 37, 181, 0, - /* 2110 */ 208, 0, 22, 184, 405, 204, 407, 22, 0, 181, - /* 2120 */ 181, 188, 181, 446, 3, 33, 449, 107, 352, 452, - /* 2130 */ 453, 454, 455, 456, 457, 50, 459, 188, 33, 3, - /* 2140 */ 33, 365, 0, 33, 352, 108, 50, 105, 107, 33, - /* 2150 */ 103, 49, 108, 108, 37, 446, 107, 365, 449, 107, - /* 2160 */ 33, 452, 453, 454, 455, 456, 457, 37, 459, 393, - /* 2170 */ 37, 107, 49, 108, 398, 107, 37, 37, 37, 108, - /* 2180 */ 49, 405, 276, 407, 108, 393, 269, 108, 108, 276, - /* 2190 */ 33, 276, 0, 49, 42, 0, 185, 405, 42, 407, - /* 2200 */ 183, 107, 116, 49, 107, 33, 108, 108, 107, 105, - /* 2210 */ 256, 352, 2, 22, 233, 107, 507, 49, 49, 107, - /* 2220 */ 107, 107, 446, 108, 365, 449, 107, 352, 452, 453, - /* 2230 */ 454, 455, 456, 457, 105, 459, 108, 1, 446, 107, - /* 2240 */ 365, 449, 108, 108, 452, 453, 454, 455, 456, 457, - /* 2250 */ 107, 459, 393, 461, 107, 19, 22, 398, 107, 37, - /* 2260 */ 37, 108, 117, 108, 405, 107, 407, 37, 393, 107, - /* 2270 */ 37, 35, 108, 398, 107, 37, 37, 37, 108, 108, - /* 2280 */ 405, 107, 407, 107, 33, 108, 107, 51, 128, 128, - /* 2290 */ 107, 128, 236, 128, 107, 37, 60, 61, 62, 63, - /* 2300 */ 107, 65, 22, 72, 37, 446, 71, 37, 449, 37, - /* 2310 */ 37, 452, 453, 454, 455, 456, 457, 101, 459, 37, - /* 2320 */ 352, 446, 37, 37, 449, 37, 37, 452, 453, 454, - /* 2330 */ 455, 456, 457, 365, 459, 78, 33, 78, 101, 352, - /* 2340 */ 22, 37, 106, 37, 37, 109, 37, 37, 37, 78, - /* 2350 */ 37, 37, 365, 37, 37, 22, 37, 352, 37, 0, - /* 2360 */ 37, 393, 42, 0, 37, 0, 51, 37, 42, 0, - /* 2370 */ 365, 42, 37, 405, 0, 407, 51, 141, 42, 37, - /* 2380 */ 393, 37, 51, 51, 0, 33, 22, 20, 22, 21, - /* 2390 */ 510, 21, 405, 22, 407, 22, 510, 510, 393, 510, - /* 2400 */ 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, - /* 2410 */ 405, 510, 407, 510, 446, 510, 510, 449, 510, 183, - /* 2420 */ 452, 453, 454, 455, 456, 457, 190, 459, 510, 510, - /* 2430 */ 510, 510, 510, 446, 510, 352, 449, 510, 510, 452, - /* 2440 */ 453, 454, 455, 456, 457, 209, 459, 510, 365, 510, - /* 2450 */ 510, 446, 510, 510, 449, 352, 510, 452, 453, 454, - /* 2460 */ 455, 456, 457, 510, 459, 510, 510, 510, 365, 510, - /* 2470 */ 510, 510, 510, 510, 510, 510, 393, 510, 510, 510, - /* 2480 */ 510, 510, 510, 510, 510, 510, 510, 510, 405, 510, - /* 2490 */ 407, 510, 510, 510, 510, 510, 393, 510, 510, 510, - /* 2500 */ 510, 510, 510, 510, 510, 510, 510, 510, 405, 510, - /* 2510 */ 407, 510, 510, 510, 510, 510, 510, 510, 510, 510, - /* 2520 */ 510, 510, 510, 510, 510, 510, 510, 510, 510, 446, - /* 2530 */ 510, 510, 449, 510, 352, 452, 453, 454, 455, 456, - /* 2540 */ 457, 510, 459, 510, 510, 510, 510, 365, 510, 446, - /* 2550 */ 352, 510, 449, 510, 510, 452, 453, 454, 455, 456, - /* 2560 */ 457, 510, 459, 365, 510, 510, 510, 510, 510, 352, - /* 2570 */ 510, 510, 510, 510, 510, 393, 510, 510, 510, 510, - /* 2580 */ 510, 510, 365, 510, 510, 510, 510, 405, 510, 407, - /* 2590 */ 510, 393, 510, 510, 510, 510, 510, 510, 510, 510, - /* 2600 */ 510, 510, 510, 405, 510, 407, 510, 510, 510, 510, - /* 2610 */ 393, 510, 510, 510, 510, 510, 510, 510, 510, 510, - /* 2620 */ 510, 510, 405, 510, 407, 510, 510, 510, 446, 510, - /* 2630 */ 510, 449, 510, 510, 452, 453, 454, 455, 456, 457, - /* 2640 */ 510, 459, 510, 510, 446, 510, 510, 449, 510, 352, - /* 2650 */ 452, 453, 454, 455, 456, 457, 510, 459, 510, 510, - /* 2660 */ 510, 510, 365, 446, 352, 510, 449, 510, 510, 452, - /* 2670 */ 453, 454, 455, 456, 457, 510, 459, 365, 510, 510, - /* 2680 */ 352, 510, 510, 510, 510, 510, 510, 510, 510, 510, - /* 2690 */ 393, 510, 510, 365, 510, 510, 510, 510, 510, 510, - /* 2700 */ 510, 510, 405, 510, 407, 393, 510, 510, 510, 510, - /* 2710 */ 510, 510, 510, 510, 510, 510, 510, 405, 510, 407, - /* 2720 */ 510, 393, 510, 510, 510, 510, 510, 510, 510, 510, - /* 2730 */ 510, 510, 510, 405, 510, 407, 510, 510, 510, 510, - /* 2740 */ 510, 510, 510, 446, 510, 510, 449, 352, 510, 452, - /* 2750 */ 453, 454, 455, 456, 457, 510, 459, 510, 446, 510, - /* 2760 */ 365, 449, 510, 352, 452, 453, 454, 455, 456, 457, - /* 2770 */ 510, 459, 510, 510, 446, 510, 365, 449, 352, 510, - /* 2780 */ 452, 453, 454, 455, 456, 457, 510, 459, 393, 510, - /* 2790 */ 510, 365, 510, 510, 510, 510, 510, 510, 510, 510, - /* 2800 */ 405, 510, 407, 510, 393, 510, 510, 510, 510, 510, - /* 2810 */ 510, 510, 510, 510, 510, 510, 405, 510, 407, 393, - /* 2820 */ 510, 352, 510, 510, 510, 510, 510, 510, 510, 510, - /* 2830 */ 510, 405, 510, 407, 365, 510, 510, 510, 510, 510, - /* 2840 */ 510, 446, 510, 352, 449, 510, 510, 452, 453, 454, - /* 2850 */ 455, 456, 457, 510, 459, 510, 365, 446, 510, 510, - /* 2860 */ 449, 510, 393, 452, 453, 454, 455, 456, 457, 510, - /* 2870 */ 459, 510, 446, 510, 405, 449, 407, 510, 452, 453, - /* 2880 */ 454, 455, 456, 457, 393, 459, 510, 510, 510, 510, - /* 2890 */ 510, 510, 510, 510, 510, 510, 405, 510, 407, 510, - /* 2900 */ 352, 510, 510, 510, 510, 510, 510, 510, 510, 510, - /* 2910 */ 510, 510, 510, 365, 510, 446, 352, 510, 449, 510, - /* 2920 */ 510, 452, 453, 454, 455, 456, 457, 510, 459, 365, - /* 2930 */ 510, 510, 510, 510, 510, 510, 510, 446, 510, 510, - /* 2940 */ 449, 393, 510, 452, 453, 454, 455, 456, 457, 510, - /* 2950 */ 459, 510, 510, 405, 510, 407, 510, 393, 510, 510, - /* 2960 */ 510, 510, 510, 510, 510, 510, 510, 510, 510, 405, - /* 2970 */ 510, 407, 510, 510, 510, 510, 510, 510, 510, 510, - /* 2980 */ 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, - /* 2990 */ 510, 510, 510, 510, 446, 510, 510, 449, 510, 510, - /* 3000 */ 452, 453, 454, 455, 456, 457, 510, 459, 510, 510, - /* 3010 */ 446, 510, 510, 449, 510, 352, 452, 453, 454, 455, - /* 3020 */ 456, 457, 510, 459, 510, 510, 510, 510, 365, 510, - /* 3030 */ 352, 510, 510, 510, 510, 510, 510, 510, 510, 510, - /* 3040 */ 510, 510, 510, 365, 510, 510, 510, 510, 510, 510, - /* 3050 */ 510, 510, 510, 510, 510, 510, 393, 510, 510, 510, - /* 3060 */ 510, 510, 510, 510, 510, 510, 510, 510, 405, 510, - /* 3070 */ 407, 393, 510, 510, 510, 510, 510, 510, 510, 510, - /* 3080 */ 510, 510, 510, 405, 510, 407, 510, 510, 510, 510, - /* 3090 */ 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, - /* 3100 */ 510, 510, 510, 510, 510, 510, 510, 510, 510, 446, - /* 3110 */ 510, 510, 449, 510, 510, 452, 453, 454, 455, 456, - /* 3120 */ 457, 510, 459, 510, 446, 510, 510, 449, 510, 510, - /* 3130 */ 452, 453, 454, 455, 456, 457, 510, 459, 349, 349, - /* 3140 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3150 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3160 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3170 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3180 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3190 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3200 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3210 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3220 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3230 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3240 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3250 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3260 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3270 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3280 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3290 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3300 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3310 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3320 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3330 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3340 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3350 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3360 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3370 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3380 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3390 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3400 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3410 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3420 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3430 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3440 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3450 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3460 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3470 */ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, - /* 3480 */ 349, 349, 349, 349, 349, 349, 349, + /* 250 */ 250, 251, 252, 253, 254, 255, 12, 13, 20, 3, + /* 260 */ 20, 18, 479, 20, 20, 482, 22, 365, 366, 175, + /* 270 */ 27, 361, 353, 30, 71, 365, 20, 367, 35, 35, + /* 280 */ 414, 37, 366, 500, 501, 366, 138, 385, 505, 506, + /* 290 */ 142, 278, 279, 280, 51, 69, 53, 201, 20, 203, + /* 300 */ 206, 58, 59, 475, 476, 477, 272, 479, 480, 65, + /* 310 */ 394, 365, 69, 394, 20, 71, 104, 107, 115, 475, + /* 320 */ 476, 477, 78, 479, 480, 406, 4, 408, 33, 233, + /* 330 */ 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + /* 340 */ 45, 129, 130, 131, 132, 133, 134, 135, 104, 106, + /* 350 */ 20, 107, 136, 137, 138, 139, 140, 141, 142, 211, + /* 360 */ 117, 0, 214, 452, 108, 217, 447, 219, 272, 450, + /* 370 */ 0, 455, 453, 454, 455, 456, 457, 458, 459, 460, + /* 380 */ 461, 462, 179, 143, 144, 439, 440, 143, 144, 478, + /* 390 */ 147, 148, 353, 150, 151, 152, 153, 154, 155, 156, + /* 400 */ 157, 158, 272, 365, 366, 162, 163, 164, 165, 166, + /* 410 */ 167, 168, 42, 170, 171, 172, 13, 365, 366, 176, + /* 420 */ 177, 178, 375, 197, 180, 181, 183, 187, 188, 107, + /* 430 */ 383, 187, 188, 14, 73, 74, 75, 385, 182, 20, + /* 440 */ 20, 80, 81, 82, 392, 406, 202, 86, 204, 394, + /* 450 */ 224, 225, 91, 92, 93, 94, 365, 366, 97, 20, + /* 460 */ 182, 100, 259, 260, 261, 262, 263, 264, 265, 266, + /* 470 */ 267, 268, 269, 418, 180, 181, 39, 40, 234, 235, + /* 480 */ 236, 78, 238, 239, 240, 241, 242, 243, 244, 245, + /* 490 */ 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + /* 500 */ 256, 12, 13, 353, 71, 414, 407, 408, 382, 20, + /* 510 */ 180, 22, 474, 475, 476, 477, 366, 479, 480, 361, + /* 520 */ 33, 20, 396, 365, 35, 367, 37, 107, 256, 2, + /* 530 */ 258, 382, 406, 374, 353, 8, 9, 365, 366, 12, + /* 540 */ 13, 14, 15, 16, 394, 396, 107, 366, 111, 112, + /* 550 */ 391, 114, 365, 366, 65, 406, 406, 385, 408, 400, + /* 560 */ 71, 73, 74, 75, 365, 366, 236, 78, 80, 81, + /* 570 */ 82, 20, 385, 136, 86, 394, 450, 140, 3, 91, + /* 580 */ 92, 93, 94, 394, 385, 97, 460, 406, 100, 408, + /* 590 */ 401, 370, 371, 104, 272, 108, 107, 447, 409, 450, + /* 600 */ 450, 353, 70, 453, 454, 455, 456, 457, 458, 460, + /* 610 */ 460, 56, 57, 463, 366, 465, 466, 467, 42, 8, + /* 620 */ 9, 471, 472, 12, 13, 14, 15, 16, 447, 117, + /* 630 */ 350, 450, 143, 144, 453, 454, 455, 456, 457, 458, + /* 640 */ 390, 460, 394, 14, 143, 144, 465, 365, 467, 20, + /* 650 */ 365, 366, 471, 472, 406, 21, 408, 0, 24, 25, + /* 660 */ 26, 27, 28, 29, 30, 31, 32, 234, 404, 180, + /* 670 */ 181, 407, 408, 14, 452, 494, 187, 188, 21, 20, + /* 680 */ 256, 24, 25, 26, 27, 28, 29, 30, 31, 32, + /* 690 */ 50, 202, 272, 204, 444, 447, 365, 366, 450, 414, + /* 700 */ 478, 453, 454, 455, 456, 457, 458, 353, 460, 429, + /* 710 */ 386, 272, 117, 465, 434, 467, 385, 33, 394, 471, + /* 720 */ 472, 439, 440, 234, 235, 236, 402, 238, 239, 240, + /* 730 */ 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + /* 740 */ 251, 252, 253, 254, 255, 12, 13, 14, 353, 386, + /* 750 */ 12, 13, 4, 20, 22, 22, 22, 394, 386, 479, + /* 760 */ 406, 366, 482, 368, 401, 402, 394, 19, 35, 37, + /* 770 */ 37, 37, 409, 0, 402, 37, 365, 366, 353, 372, + /* 780 */ 500, 501, 374, 35, 179, 505, 506, 236, 20, 394, + /* 790 */ 22, 366, 108, 368, 65, 394, 385, 20, 65, 51, + /* 800 */ 37, 406, 401, 408, 397, 194, 58, 59, 400, 180, + /* 810 */ 409, 78, 78, 65, 12, 13, 14, 15, 16, 394, + /* 820 */ 8, 9, 182, 55, 12, 13, 14, 15, 16, 87, + /* 830 */ 190, 406, 20, 408, 20, 106, 104, 104, 109, 180, + /* 840 */ 107, 78, 447, 365, 366, 450, 353, 271, 453, 454, + /* 850 */ 455, 456, 457, 458, 106, 460, 22, 109, 78, 366, + /* 860 */ 465, 368, 467, 385, 259, 236, 471, 472, 293, 365, + /* 870 */ 366, 37, 447, 234, 269, 450, 143, 144, 453, 454, + /* 880 */ 455, 456, 457, 458, 137, 460, 353, 394, 0, 385, + /* 890 */ 465, 149, 467, 394, 51, 236, 471, 472, 4, 406, + /* 900 */ 401, 408, 387, 60, 175, 390, 63, 64, 409, 298, + /* 910 */ 365, 366, 78, 180, 181, 173, 174, 353, 34, 22, + /* 920 */ 187, 188, 283, 284, 285, 286, 287, 288, 289, 394, + /* 930 */ 385, 23, 159, 160, 37, 202, 401, 204, 104, 406, + /* 940 */ 447, 136, 204, 450, 409, 140, 453, 454, 455, 456, + /* 950 */ 457, 458, 353, 460, 353, 47, 48, 353, 465, 182, + /* 960 */ 467, 395, 215, 216, 471, 472, 395, 234, 235, 236, + /* 970 */ 406, 238, 239, 240, 241, 242, 243, 244, 245, 246, + /* 980 */ 247, 248, 249, 250, 251, 252, 253, 254, 255, 12, + /* 990 */ 13, 353, 370, 371, 182, 0, 182, 20, 464, 22, + /* 1000 */ 466, 104, 379, 380, 366, 406, 368, 406, 381, 395, + /* 1010 */ 406, 384, 35, 236, 37, 8, 9, 365, 366, 12, + /* 1020 */ 13, 14, 15, 16, 136, 137, 138, 139, 140, 141, + /* 1030 */ 142, 394, 394, 14, 15, 16, 202, 385, 204, 402, + /* 1040 */ 33, 452, 65, 395, 406, 20, 408, 353, 236, 20, + /* 1050 */ 236, 137, 138, 8, 9, 78, 142, 12, 13, 14, + /* 1060 */ 15, 16, 365, 366, 4, 353, 0, 478, 234, 235, + /* 1070 */ 8, 9, 353, 353, 12, 13, 14, 15, 16, 365, + /* 1080 */ 366, 104, 385, 23, 107, 447, 366, 463, 450, 353, + /* 1090 */ 466, 453, 454, 455, 456, 457, 458, 394, 460, 385, + /* 1100 */ 406, 33, 366, 465, 368, 467, 46, 47, 48, 471, + /* 1110 */ 472, 464, 409, 466, 394, 108, 379, 380, 406, 399, + /* 1120 */ 143, 144, 0, 365, 366, 406, 406, 435, 408, 353, + /* 1130 */ 394, 136, 137, 138, 139, 140, 141, 142, 395, 394, + /* 1140 */ 365, 366, 406, 385, 408, 117, 365, 366, 394, 365, + /* 1150 */ 366, 365, 366, 108, 409, 33, 353, 180, 181, 403, + /* 1160 */ 385, 353, 406, 409, 187, 188, 385, 447, 274, 385, + /* 1170 */ 450, 385, 383, 453, 454, 455, 456, 457, 458, 202, + /* 1180 */ 460, 204, 406, 447, 353, 353, 450, 270, 271, 453, + /* 1190 */ 454, 455, 456, 457, 458, 354, 460, 169, 429, 353, + /* 1200 */ 429, 465, 403, 467, 353, 406, 353, 471, 472, 406, + /* 1210 */ 65, 234, 235, 236, 406, 238, 239, 240, 241, 242, + /* 1220 */ 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + /* 1230 */ 253, 254, 255, 12, 13, 33, 403, 406, 406, 406, + /* 1240 */ 0, 20, 13, 22, 182, 356, 357, 45, 479, 0, + /* 1250 */ 479, 482, 406, 482, 109, 353, 35, 406, 37, 406, + /* 1260 */ 13, 236, 22, 35, 110, 236, 37, 113, 366, 500, + /* 1270 */ 501, 500, 501, 0, 505, 506, 505, 506, 110, 51, + /* 1280 */ 110, 113, 110, 113, 37, 113, 65, 0, 60, 61, + /* 1290 */ 62, 63, 0, 65, 228, 22, 394, 8, 9, 78, + /* 1300 */ 51, 12, 13, 14, 15, 16, 419, 33, 406, 22, + /* 1310 */ 408, 218, 33, 220, 22, 33, 33, 49, 18, 33, + /* 1320 */ 143, 144, 37, 23, 33, 104, 1, 2, 107, 33, + /* 1330 */ 33, 33, 353, 509, 106, 498, 37, 109, 37, 429, + /* 1340 */ 40, 41, 33, 33, 44, 366, 33, 368, 13, 447, + /* 1350 */ 13, 369, 450, 33, 54, 453, 454, 455, 456, 457, + /* 1360 */ 458, 107, 460, 295, 143, 144, 66, 67, 68, 69, + /* 1370 */ 116, 491, 37, 394, 37, 107, 382, 429, 394, 78, + /* 1380 */ 382, 419, 108, 33, 364, 406, 419, 408, 497, 479, + /* 1390 */ 108, 108, 482, 497, 108, 497, 428, 495, 496, 108, + /* 1400 */ 497, 180, 181, 175, 108, 108, 108, 107, 187, 188, + /* 1410 */ 500, 501, 184, 185, 366, 505, 506, 108, 108, 191, + /* 1420 */ 192, 108, 369, 202, 419, 204, 447, 479, 108, 450, + /* 1430 */ 482, 0, 453, 454, 455, 456, 457, 458, 210, 460, + /* 1440 */ 33, 33, 405, 33, 465, 145, 467, 33, 500, 501, + /* 1450 */ 471, 472, 33, 505, 506, 234, 235, 236, 108, 238, + /* 1460 */ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + /* 1470 */ 249, 250, 251, 252, 253, 254, 255, 436, 419, 473, + /* 1480 */ 419, 12, 13, 52, 353, 481, 484, 502, 384, 204, + /* 1490 */ 275, 22, 51, 430, 194, 195, 196, 366, 449, 199, + /* 1500 */ 42, 20, 448, 204, 35, 441, 37, 217, 374, 374, + /* 1510 */ 441, 353, 212, 213, 200, 108, 108, 446, 108, 432, + /* 1520 */ 20, 365, 108, 223, 366, 394, 226, 108, 20, 229, + /* 1530 */ 230, 231, 232, 233, 65, 366, 45, 406, 415, 408, + /* 1540 */ 366, 415, 179, 365, 412, 366, 365, 78, 415, 412, + /* 1550 */ 412, 105, 394, 378, 103, 365, 102, 377, 376, 365, + /* 1560 */ 365, 365, 20, 358, 406, 50, 408, 358, 362, 362, + /* 1570 */ 441, 374, 272, 104, 374, 20, 297, 374, 447, 408, + /* 1580 */ 353, 450, 20, 367, 453, 454, 455, 456, 457, 458, + /* 1590 */ 20, 460, 431, 366, 374, 20, 465, 367, 467, 374, + /* 1600 */ 374, 365, 471, 472, 358, 447, 422, 374, 450, 374, + /* 1610 */ 358, 453, 454, 455, 456, 457, 458, 394, 460, 356, + /* 1620 */ 365, 394, 356, 465, 406, 467, 394, 221, 394, 471, + /* 1630 */ 472, 394, 394, 406, 445, 408, 394, 394, 394, 394, + /* 1640 */ 107, 443, 394, 372, 394, 406, 20, 406, 208, 441, + /* 1650 */ 440, 438, 207, 372, 437, 282, 490, 281, 365, 408, + /* 1660 */ 290, 430, 406, 490, 193, 276, 299, 292, 291, 493, + /* 1670 */ 510, 202, 487, 204, 447, 492, 490, 450, 296, 488, + /* 1680 */ 453, 454, 455, 456, 457, 458, 424, 460, 424, 430, + /* 1690 */ 489, 504, 294, 271, 467, 353, 1, 366, 471, 472, + /* 1700 */ 20, 117, 503, 234, 235, 452, 273, 485, 366, 406, + /* 1710 */ 367, 372, 372, 406, 19, 185, 372, 248, 249, 250, + /* 1720 */ 251, 252, 253, 254, 406, 406, 424, 353, 424, 406, + /* 1730 */ 35, 420, 372, 406, 366, 390, 394, 107, 107, 470, + /* 1740 */ 366, 483, 22, 365, 398, 355, 51, 38, 406, 358, + /* 1750 */ 408, 372, 359, 425, 433, 60, 61, 62, 63, 442, + /* 1760 */ 65, 425, 353, 351, 0, 373, 0, 0, 394, 388, + /* 1770 */ 45, 388, 388, 0, 37, 366, 227, 37, 37, 37, + /* 1780 */ 406, 227, 408, 0, 37, 37, 227, 37, 0, 447, + /* 1790 */ 227, 0, 450, 37, 0, 453, 454, 455, 456, 457, + /* 1800 */ 458, 106, 460, 394, 109, 37, 0, 22, 0, 467, + /* 1810 */ 222, 37, 0, 471, 472, 406, 210, 408, 0, 210, + /* 1820 */ 204, 447, 211, 202, 450, 0, 0, 453, 454, 455, + /* 1830 */ 456, 457, 458, 0, 460, 353, 141, 198, 197, 0, + /* 1840 */ 0, 467, 148, 0, 49, 471, 472, 49, 366, 0, + /* 1850 */ 37, 0, 51, 37, 0, 0, 447, 0, 353, 450, + /* 1860 */ 49, 0, 453, 454, 455, 456, 457, 458, 45, 460, + /* 1870 */ 0, 366, 0, 49, 0, 0, 394, 0, 353, 184, + /* 1880 */ 165, 37, 0, 165, 0, 0, 191, 0, 406, 0, + /* 1890 */ 408, 366, 0, 353, 0, 0, 0, 0, 0, 394, + /* 1900 */ 0, 0, 0, 0, 0, 210, 366, 0, 0, 0, + /* 1910 */ 0, 406, 0, 408, 49, 0, 507, 508, 0, 394, + /* 1920 */ 0, 45, 0, 0, 399, 0, 0, 0, 0, 447, + /* 1930 */ 0, 406, 450, 408, 394, 453, 454, 455, 456, 457, + /* 1940 */ 458, 22, 460, 0, 148, 0, 406, 147, 408, 467, + /* 1950 */ 146, 0, 447, 0, 472, 450, 22, 22, 453, 454, + /* 1960 */ 455, 456, 457, 458, 0, 460, 50, 50, 37, 0, + /* 1970 */ 65, 65, 447, 0, 0, 450, 65, 0, 453, 454, + /* 1980 */ 455, 456, 457, 458, 37, 460, 42, 447, 0, 353, + /* 1990 */ 450, 51, 37, 453, 454, 455, 456, 457, 458, 51, + /* 2000 */ 460, 496, 366, 42, 0, 37, 0, 51, 42, 37, + /* 2010 */ 0, 33, 45, 42, 49, 14, 0, 0, 42, 49, + /* 2020 */ 0, 0, 43, 0, 49, 353, 42, 193, 0, 49, + /* 2030 */ 394, 0, 0, 0, 72, 0, 37, 51, 366, 499, + /* 2040 */ 42, 0, 406, 51, 408, 37, 0, 42, 37, 42, + /* 2050 */ 0, 51, 37, 51, 42, 0, 0, 353, 0, 0, + /* 2060 */ 0, 0, 37, 113, 115, 22, 394, 37, 0, 22, + /* 2070 */ 366, 399, 0, 37, 37, 37, 37, 37, 406, 37, + /* 2080 */ 408, 37, 33, 447, 33, 37, 450, 22, 0, 453, + /* 2090 */ 454, 455, 456, 457, 458, 22, 460, 0, 394, 37, + /* 2100 */ 37, 22, 0, 22, 0, 53, 37, 0, 0, 0, + /* 2110 */ 406, 37, 408, 37, 0, 22, 20, 37, 0, 447, + /* 2120 */ 37, 37, 450, 182, 49, 453, 454, 455, 456, 457, + /* 2130 */ 458, 107, 460, 107, 353, 108, 0, 37, 209, 182, + /* 2140 */ 0, 22, 22, 205, 508, 182, 0, 366, 0, 189, + /* 2150 */ 353, 447, 3, 108, 450, 33, 277, 453, 454, 455, + /* 2160 */ 456, 457, 458, 366, 460, 182, 462, 185, 353, 182, + /* 2170 */ 189, 107, 33, 107, 50, 394, 105, 50, 108, 49, + /* 2180 */ 399, 366, 49, 33, 107, 103, 108, 406, 33, 408, + /* 2190 */ 33, 394, 107, 107, 3, 33, 399, 108, 107, 0, + /* 2200 */ 108, 277, 108, 406, 37, 408, 37, 37, 37, 394, + /* 2210 */ 277, 37, 37, 108, 108, 49, 270, 33, 0, 107, + /* 2220 */ 42, 406, 49, 408, 107, 0, 116, 42, 447, 108, + /* 2230 */ 107, 450, 107, 353, 453, 454, 455, 456, 457, 458, + /* 2240 */ 108, 460, 107, 186, 447, 107, 366, 450, 33, 49, + /* 2250 */ 453, 454, 455, 456, 457, 458, 105, 460, 105, 2, + /* 2260 */ 257, 22, 447, 234, 108, 450, 107, 353, 453, 454, + /* 2270 */ 455, 456, 457, 458, 394, 460, 108, 49, 49, 184, + /* 2280 */ 366, 22, 117, 107, 107, 37, 406, 108, 408, 108, + /* 2290 */ 353, 237, 128, 107, 107, 107, 72, 108, 37, 107, + /* 2300 */ 37, 108, 107, 366, 108, 37, 108, 37, 394, 107, + /* 2310 */ 107, 37, 108, 107, 37, 108, 107, 107, 128, 33, + /* 2320 */ 406, 107, 408, 107, 37, 128, 22, 447, 37, 128, + /* 2330 */ 450, 394, 37, 453, 454, 455, 456, 457, 458, 37, + /* 2340 */ 460, 33, 71, 406, 37, 408, 37, 353, 37, 37, + /* 2350 */ 37, 37, 101, 101, 78, 37, 78, 37, 37, 22, + /* 2360 */ 366, 447, 37, 37, 450, 37, 78, 453, 454, 455, + /* 2370 */ 456, 457, 458, 37, 460, 37, 37, 37, 37, 22, + /* 2380 */ 37, 0, 37, 51, 447, 51, 42, 450, 394, 0, + /* 2390 */ 453, 454, 455, 456, 457, 458, 37, 460, 42, 0, + /* 2400 */ 406, 37, 408, 51, 42, 0, 37, 42, 0, 51, + /* 2410 */ 37, 37, 0, 22, 22, 33, 21, 511, 22, 22, + /* 2420 */ 353, 21, 20, 511, 511, 511, 511, 511, 511, 511, + /* 2430 */ 511, 511, 511, 366, 511, 511, 511, 511, 511, 511, + /* 2440 */ 353, 447, 511, 511, 450, 511, 511, 453, 454, 455, + /* 2450 */ 456, 457, 458, 366, 460, 511, 511, 511, 511, 511, + /* 2460 */ 511, 394, 511, 511, 511, 511, 511, 511, 511, 511, + /* 2470 */ 511, 511, 511, 406, 511, 408, 511, 511, 511, 511, + /* 2480 */ 511, 394, 511, 511, 511, 511, 511, 511, 511, 511, + /* 2490 */ 511, 511, 511, 406, 511, 408, 511, 511, 353, 511, + /* 2500 */ 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + /* 2510 */ 511, 366, 511, 353, 447, 511, 511, 450, 511, 511, + /* 2520 */ 453, 454, 455, 456, 457, 458, 366, 460, 511, 511, + /* 2530 */ 511, 511, 511, 511, 447, 353, 511, 450, 511, 394, + /* 2540 */ 453, 454, 455, 456, 457, 458, 511, 460, 366, 511, + /* 2550 */ 511, 406, 511, 408, 394, 511, 511, 511, 511, 511, + /* 2560 */ 511, 511, 511, 511, 511, 511, 406, 511, 408, 511, + /* 2570 */ 511, 511, 511, 511, 511, 511, 394, 511, 511, 511, + /* 2580 */ 511, 511, 511, 511, 511, 511, 511, 511, 406, 511, + /* 2590 */ 408, 511, 447, 353, 511, 450, 511, 511, 453, 454, + /* 2600 */ 455, 456, 457, 458, 511, 460, 366, 447, 353, 511, + /* 2610 */ 450, 511, 511, 453, 454, 455, 456, 457, 458, 511, + /* 2620 */ 460, 366, 511, 511, 511, 511, 511, 511, 353, 447, + /* 2630 */ 511, 511, 450, 511, 394, 453, 454, 455, 456, 457, + /* 2640 */ 458, 366, 460, 511, 511, 511, 406, 511, 408, 394, + /* 2650 */ 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + /* 2660 */ 511, 406, 511, 408, 511, 511, 511, 511, 511, 394, + /* 2670 */ 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + /* 2680 */ 511, 406, 511, 408, 511, 511, 511, 447, 511, 511, + /* 2690 */ 450, 511, 511, 453, 454, 455, 456, 457, 458, 511, + /* 2700 */ 460, 353, 447, 511, 511, 450, 511, 511, 453, 454, + /* 2710 */ 455, 456, 457, 458, 366, 460, 511, 511, 511, 511, + /* 2720 */ 511, 353, 447, 511, 511, 450, 511, 511, 453, 454, + /* 2730 */ 455, 456, 457, 458, 366, 460, 511, 511, 353, 511, + /* 2740 */ 511, 511, 394, 511, 511, 511, 511, 511, 511, 511, + /* 2750 */ 511, 366, 511, 511, 406, 511, 408, 511, 511, 511, + /* 2760 */ 511, 511, 394, 511, 511, 511, 511, 511, 511, 511, + /* 2770 */ 511, 511, 511, 511, 406, 511, 408, 511, 511, 394, + /* 2780 */ 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + /* 2790 */ 511, 406, 511, 408, 511, 447, 511, 511, 450, 511, + /* 2800 */ 511, 453, 454, 455, 456, 457, 458, 353, 460, 511, + /* 2810 */ 511, 511, 511, 511, 511, 447, 511, 511, 450, 511, + /* 2820 */ 366, 453, 454, 455, 456, 457, 458, 511, 460, 511, + /* 2830 */ 511, 511, 447, 511, 511, 450, 511, 511, 453, 454, + /* 2840 */ 455, 456, 457, 458, 511, 460, 511, 511, 394, 511, + /* 2850 */ 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + /* 2860 */ 406, 511, 408, 511, 511, 353, 511, 511, 511, 511, + /* 2870 */ 511, 511, 511, 511, 511, 511, 511, 511, 366, 511, + /* 2880 */ 353, 511, 511, 511, 511, 511, 511, 511, 511, 511, + /* 2890 */ 511, 511, 511, 366, 511, 511, 511, 511, 511, 511, + /* 2900 */ 511, 447, 353, 511, 450, 511, 394, 453, 454, 455, + /* 2910 */ 456, 457, 458, 511, 460, 366, 511, 511, 406, 511, + /* 2920 */ 408, 394, 511, 511, 511, 511, 511, 511, 511, 511, + /* 2930 */ 511, 511, 511, 406, 511, 408, 511, 511, 511, 511, + /* 2940 */ 511, 511, 511, 394, 511, 511, 511, 511, 511, 511, + /* 2950 */ 511, 511, 511, 511, 511, 406, 511, 408, 511, 447, + /* 2960 */ 353, 511, 450, 511, 511, 453, 454, 455, 456, 457, + /* 2970 */ 458, 511, 460, 366, 447, 353, 511, 450, 511, 511, + /* 2980 */ 453, 454, 455, 456, 457, 458, 511, 460, 366, 511, + /* 2990 */ 511, 511, 511, 511, 511, 511, 447, 511, 511, 450, + /* 3000 */ 511, 394, 453, 454, 455, 456, 457, 458, 511, 460, + /* 3010 */ 511, 511, 511, 406, 511, 408, 394, 511, 511, 511, + /* 3020 */ 511, 511, 511, 511, 511, 511, 511, 511, 406, 511, + /* 3030 */ 408, 511, 511, 511, 511, 511, 511, 511, 511, 511, + /* 3040 */ 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + /* 3050 */ 511, 511, 511, 511, 447, 511, 511, 450, 511, 511, + /* 3060 */ 453, 454, 455, 456, 457, 458, 511, 460, 511, 447, + /* 3070 */ 511, 511, 450, 511, 511, 453, 454, 455, 456, 457, + /* 3080 */ 458, 511, 460, 350, 350, 350, 350, 350, 350, 350, + /* 3090 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3100 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3110 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3120 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3130 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3140 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3150 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3160 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3170 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3180 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3190 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3200 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3210 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3220 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3230 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3240 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3250 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3260 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3270 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3280 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3290 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3300 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3310 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3320 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3330 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3340 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3350 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3360 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3370 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3380 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3390 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3400 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3410 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3420 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + /* 3430 */ 350, 350, 350, }; -#define YY_SHIFT_COUNT (844) +#define YY_SHIFT_COUNT (845) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2384) +#define YY_SHIFT_MAX (2412) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 1454, 0, 243, 0, 487, 487, 487, 487, 487, 487, - /* 10 */ 487, 487, 487, 487, 487, 487, 730, 973, 973, 1216, - /* 20 */ 973, 973, 973, 973, 973, 973, 973, 973, 973, 973, - /* 30 */ 973, 973, 973, 973, 973, 973, 973, 973, 973, 973, - /* 40 */ 973, 973, 973, 973, 973, 973, 973, 973, 973, 973, - /* 50 */ 973, 437, 485, 338, 172, 106, 678, 106, 106, 172, - /* 60 */ 172, 106, 1333, 106, 242, 1333, 1333, 47, 106, 216, - /* 70 */ 241, 350, 350, 502, 502, 241, 79, 63, 488, 488, - /* 80 */ 48, 350, 350, 350, 350, 350, 350, 350, 350, 350, - /* 90 */ 350, 350, 519, 526, 350, 350, 150, 216, 350, 519, - /* 100 */ 350, 216, 350, 350, 216, 350, 350, 216, 350, 216, - /* 110 */ 216, 216, 350, 575, 202, 202, 486, 200, 725, 725, - /* 120 */ 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, - /* 130 */ 725, 725, 725, 725, 725, 725, 725, 637, 188, 79, - /* 140 */ 63, 630, 630, 473, 580, 580, 580, 471, 298, 298, - /* 150 */ 87, 473, 150, 567, 216, 216, 508, 216, 645, 216, - /* 160 */ 645, 645, 663, 767, 211, 211, 211, 211, 211, 211, - /* 170 */ 211, 211, 2236, 102, 66, 1017, 16, 168, 270, 164, - /* 180 */ 296, 665, 551, 551, 916, 534, 1065, 754, 754, 754, - /* 190 */ 882, 754, 907, 86, 835, 940, 997, 388, 835, 835, - /* 200 */ 1062, 923, 28, 1010, 923, 982, 1018, 87, 1161, 1397, - /* 210 */ 1431, 1458, 1267, 150, 1458, 150, 1290, 1470, 1473, 1452, - /* 220 */ 1473, 1452, 1326, 1470, 1473, 1470, 1452, 1326, 1326, 1409, - /* 230 */ 1413, 1470, 1422, 1470, 1470, 1470, 1509, 1482, 1509, 1482, - /* 240 */ 1458, 150, 150, 1519, 150, 1525, 1527, 150, 1525, 150, - /* 250 */ 1531, 150, 150, 1470, 150, 1509, 216, 216, 216, 216, - /* 260 */ 216, 216, 216, 216, 216, 216, 216, 1470, 767, 767, - /* 270 */ 1509, 645, 645, 645, 1352, 1471, 1458, 575, 1567, 1402, - /* 280 */ 1407, 1519, 575, 1161, 1470, 645, 1346, 1351, 1346, 1351, - /* 290 */ 1335, 1438, 1346, 1345, 1348, 1365, 1161, 1357, 1355, 1363, - /* 300 */ 1388, 1473, 1642, 1547, 1395, 1525, 575, 575, 1351, 645, - /* 310 */ 645, 645, 645, 1351, 645, 1503, 575, 663, 575, 1473, - /* 320 */ 1590, 1600, 645, 1470, 575, 1692, 1681, 1509, 3138, 3138, - /* 330 */ 3138, 3138, 3138, 3138, 3138, 3138, 3138, 36, 956, 15, - /* 340 */ 1001, 273, 647, 656, 379, 521, 899, 1060, 1118, 348, - /* 350 */ 348, 348, 348, 348, 348, 348, 348, 348, 32, 81, - /* 360 */ 732, 339, 339, 457, 745, 632, 751, 824, 838, 1019, - /* 370 */ 1021, 864, 572, 572, 937, 510, 861, 937, 937, 937, - /* 380 */ 695, 1131, 780, 1093, 1256, 1147, 1024, 1185, 1186, 1193, - /* 390 */ 1194, 905, 1292, 1321, 1328, 1340, 1341, 951, 1200, 1201, - /* 400 */ 1203, 1277, 1278, 1280, 1174, 1121, 1215, 1286, 1289, 1305, - /* 410 */ 1314, 1324, 1331, 1350, 1338, 1132, 1339, 609, 1344, 1366, - /* 420 */ 1368, 1371, 1372, 1373, 468, 1238, 1288, 1343, 1353, 1332, - /* 430 */ 1391, 1728, 1733, 1735, 1691, 1737, 1701, 1513, 1703, 1706, - /* 440 */ 1707, 1522, 1745, 1713, 1715, 1528, 1716, 1755, 1530, 1757, - /* 450 */ 1721, 1759, 1723, 1762, 1742, 1765, 1729, 1546, 1768, 1560, - /* 460 */ 1770, 1563, 1566, 1570, 1582, 1785, 1786, 1788, 1593, 1596, - /* 470 */ 1793, 1794, 1649, 1749, 1750, 1800, 1764, 1804, 1806, 1777, - /* 480 */ 1756, 1817, 1769, 1820, 1778, 1821, 1824, 1825, 1780, 1830, - /* 490 */ 1833, 1840, 1842, 1843, 1845, 1682, 1810, 1849, 1686, 1851, - /* 500 */ 1854, 1855, 1857, 1861, 1862, 1863, 1864, 1865, 1866, 1867, - /* 510 */ 1868, 1869, 1870, 1871, 1873, 1877, 1878, 1826, 1879, 1814, - /* 520 */ 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1872, 1887, 1740, - /* 530 */ 1890, 1744, 1892, 1747, 1895, 1896, 1876, 1852, 1893, 1888, - /* 540 */ 1899, 1836, 1891, 1918, 1860, 1930, 1874, 1932, 1934, 1898, - /* 550 */ 1889, 1894, 1937, 1904, 1897, 1900, 1943, 1907, 1901, 1903, - /* 560 */ 1947, 1912, 1950, 1908, 1914, 1921, 1909, 1910, 1946, 1916, - /* 570 */ 1957, 1920, 1924, 1971, 1972, 1975, 1982, 1926, 1795, 1984, - /* 580 */ 1909, 1936, 1989, 1991, 1922, 1993, 1996, 1961, 1948, 1958, - /* 590 */ 2001, 1965, 1952, 1963, 2007, 1973, 1962, 1967, 2012, 1983, - /* 600 */ 1974, 1980, 2023, 2024, 2026, 2028, 2031, 2032, 1928, 1931, - /* 610 */ 2002, 2019, 2046, 2010, 2013, 2022, 2025, 2027, 2029, 2030, - /* 620 */ 2034, 2016, 2035, 2036, 2039, 2038, 2040, 2063, 2043, 2069, - /* 630 */ 2050, 2078, 2058, 2033, 2081, 2061, 2048, 2087, 2088, 2089, - /* 640 */ 2053, 2091, 2055, 2093, 2072, 2075, 2059, 2060, 2062, 1990, - /* 650 */ 1994, 2100, 1923, 1998, 1902, 1909, 2054, 2106, 1927, 2070, - /* 660 */ 2090, 2109, 1911, 2095, 1938, 1929, 2111, 2118, 1939, 1933, - /* 670 */ 1941, 1949, 2121, 2092, 1906, 2020, 2037, 2041, 2085, 2042, - /* 680 */ 2096, 2047, 2044, 2105, 2107, 2045, 2049, 2052, 2064, 2065, - /* 690 */ 2110, 2102, 2123, 2068, 2116, 1913, 2071, 2076, 2136, 2127, - /* 700 */ 1915, 2117, 2130, 2133, 2139, 2140, 2141, 2079, 2080, 2131, - /* 710 */ 1917, 2157, 2144, 2142, 2192, 2094, 2152, 2097, 2098, 2099, - /* 720 */ 2101, 2108, 2011, 2112, 2195, 2156, 2017, 2113, 2086, 1909, - /* 730 */ 2154, 2172, 2104, 1954, 2129, 2210, 2191, 1981, 2114, 2115, - /* 740 */ 2119, 2128, 2132, 2134, 2168, 2143, 2147, 2169, 2135, 2234, - /* 750 */ 2056, 2151, 2145, 2153, 2222, 2223, 2158, 2155, 2230, 2162, - /* 760 */ 2164, 2233, 2167, 2170, 2238, 2174, 2171, 2239, 2176, 2177, - /* 770 */ 2240, 2179, 2160, 2161, 2163, 2165, 2183, 2251, 2187, 2258, - /* 780 */ 2193, 2251, 2251, 2280, 2231, 2235, 2267, 2270, 2272, 2273, - /* 790 */ 2282, 2285, 2286, 2288, 2289, 2257, 2216, 2259, 2237, 2303, - /* 800 */ 2304, 2306, 2307, 2318, 2309, 2310, 2311, 2271, 2016, 2313, - /* 810 */ 2035, 2314, 2316, 2317, 2319, 2333, 2321, 2359, 2323, 2315, - /* 820 */ 2320, 2363, 2327, 2325, 2326, 2365, 2330, 2331, 2329, 2369, - /* 830 */ 2335, 2332, 2336, 2374, 2342, 2344, 2384, 2364, 2352, 2366, - /* 840 */ 2368, 2371, 2373, 2370, 2367, + /* 0 */ 1300, 0, 244, 0, 489, 489, 489, 489, 489, 489, + /* 10 */ 489, 489, 489, 489, 489, 489, 733, 977, 977, 1221, + /* 20 */ 977, 977, 977, 977, 977, 977, 977, 977, 977, 977, + /* 30 */ 977, 977, 977, 977, 977, 977, 977, 977, 977, 977, + /* 40 */ 977, 977, 977, 977, 977, 977, 977, 977, 977, 977, + /* 50 */ 977, 420, 439, 96, 210, 34, 130, 34, 34, 210, + /* 60 */ 210, 34, 1469, 34, 243, 1469, 1469, 322, 34, 1, + /* 70 */ 240, 131, 131, 1060, 1060, 240, 294, 501, 154, 154, + /* 80 */ 551, 131, 131, 131, 131, 131, 131, 131, 131, 131, + /* 90 */ 131, 131, 165, 238, 131, 131, 31, 1, 131, 165, + /* 100 */ 131, 1, 131, 131, 1, 131, 131, 1, 131, 1, + /* 110 */ 1, 1, 131, 532, 203, 203, 488, 634, 834, 834, + /* 120 */ 834, 834, 834, 834, 834, 834, 834, 834, 834, 834, + /* 130 */ 834, 834, 834, 834, 834, 834, 834, 437, 256, 294, + /* 140 */ 501, 555, 555, 763, 278, 278, 278, 137, 272, 272, + /* 150 */ 403, 763, 31, 512, 1, 1, 424, 1, 780, 1, + /* 160 */ 780, 780, 595, 884, 212, 212, 212, 212, 212, 212, + /* 170 */ 212, 212, 1695, 361, 657, 812, 611, 639, 118, 13, + /* 180 */ 629, 659, 738, 738, 777, 908, 814, 734, 734, 734, + /* 190 */ 640, 734, 330, 768, 1025, 419, 805, 94, 1025, 1025, + /* 200 */ 1029, 917, 576, 575, 917, 295, 894, 403, 1215, 1441, + /* 210 */ 1458, 1481, 1290, 31, 1481, 31, 1314, 1500, 1508, 1491, + /* 220 */ 1508, 1491, 1363, 1500, 1508, 1500, 1491, 1363, 1363, 1446, + /* 230 */ 1451, 1500, 1454, 1500, 1500, 1500, 1542, 1515, 1542, 1515, + /* 240 */ 1481, 31, 31, 1555, 31, 1562, 1570, 31, 1562, 31, + /* 250 */ 1575, 31, 31, 1500, 31, 1542, 1, 1, 1, 1, + /* 260 */ 1, 1, 1, 1, 1, 1, 1, 1500, 884, 884, + /* 270 */ 1542, 780, 780, 780, 1406, 1533, 1481, 532, 1626, 1440, + /* 280 */ 1445, 1555, 532, 1215, 1500, 780, 1373, 1376, 1373, 1376, + /* 290 */ 1370, 1471, 1373, 1375, 1377, 1389, 1215, 1367, 1382, 1398, + /* 300 */ 1422, 1508, 1680, 1584, 1433, 1562, 532, 532, 1376, 780, + /* 310 */ 780, 780, 780, 1376, 780, 1530, 532, 595, 532, 1508, + /* 320 */ 1630, 1631, 780, 1500, 532, 1720, 1709, 1542, 3083, 3083, + /* 330 */ 3083, 3083, 3083, 3083, 3083, 3083, 3083, 36, 1228, 197, + /* 340 */ 748, 1007, 81, 1045, 888, 15, 527, 1062, 995, 1289, + /* 350 */ 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 216, 148, + /* 360 */ 12, 802, 802, 226, 729, 10, 742, 843, 773, 732, + /* 370 */ 897, 747, 914, 914, 1019, 6, 605, 1019, 1019, 1019, + /* 380 */ 1249, 1066, 487, 370, 1202, 1028, 1122, 1154, 1168, 1170, + /* 390 */ 1172, 1229, 1247, 1240, 1273, 1287, 1292, 1093, 684, 1274, + /* 400 */ 1145, 1282, 1283, 1286, 1177, 1068, 1279, 1291, 1296, 1297, + /* 410 */ 1298, 1309, 1310, 1325, 1313, 433, 1320, 1268, 1350, 1407, + /* 420 */ 1408, 1410, 1414, 1419, 1254, 1285, 1299, 1335, 1337, 1301, + /* 430 */ 1431, 1764, 1766, 1767, 1725, 1773, 1737, 1549, 1740, 1741, + /* 440 */ 1742, 1554, 1783, 1747, 1748, 1559, 1750, 1788, 1563, 1791, + /* 450 */ 1756, 1794, 1768, 1806, 1785, 1808, 1774, 1588, 1812, 1606, + /* 460 */ 1818, 1609, 1611, 1616, 1621, 1825, 1826, 1833, 1639, 1641, + /* 470 */ 1839, 1840, 1694, 1795, 1798, 1843, 1813, 1849, 1851, 1816, + /* 480 */ 1801, 1854, 1811, 1855, 1823, 1857, 1861, 1870, 1824, 1872, + /* 490 */ 1874, 1875, 1877, 1887, 1889, 1715, 1844, 1882, 1718, 1884, + /* 500 */ 1885, 1892, 1894, 1895, 1896, 1897, 1898, 1900, 1901, 1902, + /* 510 */ 1903, 1904, 1907, 1908, 1909, 1910, 1912, 1918, 1865, 1915, + /* 520 */ 1876, 1920, 1922, 1923, 1925, 1926, 1927, 1928, 1919, 1930, + /* 530 */ 1796, 1943, 1800, 1945, 1804, 1951, 1953, 1934, 1916, 1935, + /* 540 */ 1917, 1964, 1905, 1931, 1969, 1906, 1973, 1911, 1974, 1977, + /* 550 */ 1947, 1940, 1944, 1988, 1955, 1948, 1961, 2004, 1968, 1956, + /* 560 */ 1966, 2006, 1972, 2010, 1967, 1971, 1978, 1965, 1970, 2001, + /* 570 */ 1975, 2016, 1979, 1976, 2017, 2020, 2021, 2023, 1984, 1834, + /* 580 */ 2028, 1965, 1980, 2031, 2032, 1962, 2033, 2035, 1999, 1986, + /* 590 */ 1998, 2041, 2008, 1992, 2005, 2046, 2011, 2000, 2007, 2050, + /* 600 */ 2015, 2002, 2012, 2055, 2056, 2058, 2059, 2060, 2061, 1949, + /* 610 */ 1950, 2025, 2043, 2072, 2030, 2036, 2037, 2038, 2039, 2040, + /* 620 */ 2042, 2044, 2049, 2051, 2048, 2062, 2047, 2063, 2068, 2065, + /* 630 */ 2088, 2073, 2097, 2079, 2052, 2102, 2081, 2069, 2104, 2107, + /* 640 */ 2108, 2074, 2109, 2076, 2114, 2093, 2096, 2080, 2083, 2084, + /* 650 */ 2027, 2024, 2118, 1941, 2026, 1929, 1965, 2075, 2136, 1957, + /* 660 */ 2100, 2119, 2140, 1938, 2120, 1963, 1982, 2146, 2148, 1983, + /* 670 */ 1960, 1987, 1981, 2149, 2122, 1879, 2064, 2045, 2066, 2124, + /* 680 */ 2071, 2127, 2082, 2070, 2139, 2150, 2078, 2077, 2085, 2086, + /* 690 */ 2089, 2155, 2130, 2133, 2091, 2157, 1924, 2092, 2094, 2191, + /* 700 */ 2162, 1933, 2167, 2169, 2170, 2171, 2174, 2175, 2105, 2106, + /* 710 */ 2166, 1946, 2184, 2173, 2199, 2218, 2112, 2178, 2117, 2121, + /* 720 */ 2132, 2123, 2125, 2057, 2135, 2225, 2185, 2095, 2138, 2110, + /* 730 */ 1965, 2200, 2215, 2151, 2003, 2153, 2257, 2239, 2029, 2159, + /* 740 */ 2156, 2176, 2168, 2177, 2179, 2228, 2186, 2187, 2229, 2181, + /* 750 */ 2259, 2054, 2188, 2165, 2189, 2248, 2261, 2192, 2193, 2263, + /* 760 */ 2195, 2196, 2268, 2202, 2198, 2270, 2203, 2204, 2274, 2206, + /* 770 */ 2207, 2277, 2209, 2164, 2190, 2197, 2201, 2210, 2286, 2214, + /* 780 */ 2287, 2216, 2286, 2286, 2304, 2224, 2271, 2291, 2295, 2302, + /* 790 */ 2307, 2309, 2311, 2312, 2313, 2314, 2276, 2251, 2278, 2252, + /* 800 */ 2308, 2318, 2320, 2321, 2337, 2325, 2326, 2328, 2288, 2049, + /* 810 */ 2336, 2051, 2338, 2339, 2340, 2341, 2357, 2343, 2381, 2345, + /* 820 */ 2332, 2344, 2389, 2359, 2334, 2356, 2399, 2364, 2352, 2362, + /* 830 */ 2405, 2369, 2358, 2365, 2408, 2373, 2374, 2412, 2391, 2382, + /* 840 */ 2392, 2395, 2396, 2397, 2400, 2402, }; #define YY_REDUCE_COUNT (336) -#define YY_REDUCE_MIN (-447) -#define YY_REDUCE_MAX (2678) +#define YY_REDUCE_MIN (-463) +#define YY_REDUCE_MAX (2622) static const short yy_reduce_ofst[] = { - /* 0 */ 279, -304, 149, 393, 180, 423, 491, 635, 731, 878, - /* 10 */ 247, 974, 1246, 1325, 1356, 1382, 1451, 1467, -81, 1524, - /* 20 */ 1562, 1599, 1677, 1581, 1709, 1776, 1792, 1859, 1875, 1148, - /* 30 */ 1166, 1968, 1987, 2005, 2083, 2103, 2182, 2198, 2217, 2297, - /* 40 */ 2312, 2328, 2395, 2411, 2426, 2469, 2491, 2548, 2564, 2663, - /* 50 */ 2678, 318, -341, -425, -42, -423, 143, 425, 622, 791, - /* 60 */ 798, 667, -183, 700, -107, 54, 310, -90, 331, -374, - /* 70 */ -353, 56, 232, -299, 335, -269, -331, -397, -343, -96, - /* 80 */ -308, -45, 18, 74, 442, -364, 163, 456, 497, 501, - /* 90 */ 506, 225, -164, 52, 557, 625, -285, -203, 639, 496, - /* 100 */ 670, 217, 680, 683, 256, 744, 748, 606, 750, 381, - /* 110 */ 653, 440, 785, 890, -140, -140, -235, -349, 222, 515, - /* 120 */ 587, 697, 752, 759, 768, 789, 827, 830, 837, 839, - /* 130 */ 844, 857, 879, 885, 887, 888, 911, -354, -444, -232, - /* 140 */ -40, 522, 535, 633, -444, -273, -3, 108, -447, 324, - /* 150 */ 295, 765, 170, -85, 214, 475, 227, 426, 756, 530, - /* 160 */ 845, 877, 513, 932, 503, 562, 600, 661, 781, 886, - /* 170 */ 920, 781, 461, 584, 983, 935, 846, 876, 993, 884, - /* 180 */ 985, 985, 994, 995, 964, 1020, 966, 891, 893, 896, - /* 190 */ 980, 897, 985, 1032, 990, 1044, 1008, 979, 998, 1000, - /* 200 */ 985, 941, 941, 924, 941, 952, 953, 1051, 1013, 1023, - /* 210 */ 1028, 1042, 1039, 1112, 1046, 1114, 1057, 1128, 1134, 1082, - /* 220 */ 1136, 1088, 1092, 1141, 1142, 1145, 1096, 1095, 1101, 1138, - /* 230 */ 1143, 1153, 1150, 1162, 1163, 1164, 1173, 1172, 1178, 1176, - /* 240 */ 1098, 1167, 1169, 1137, 1170, 1180, 1119, 1175, 1184, 1179, - /* 250 */ 1133, 1183, 1187, 1198, 1190, 1207, 1165, 1177, 1181, 1182, - /* 260 */ 1195, 1196, 1197, 1199, 1202, 1213, 1217, 1204, 1210, 1214, - /* 270 */ 1219, 1152, 1188, 1191, 1135, 1149, 1168, 1206, 1189, 1192, - /* 280 */ 1205, 1209, 1243, 1208, 1253, 1221, 1144, 1211, 1146, 1220, - /* 290 */ 1140, 1151, 1155, 1157, 1159, 1171, 1225, 1154, 1156, 1158, - /* 300 */ 941, 1296, 1218, 1212, 1222, 1302, 1299, 1300, 1249, 1268, - /* 310 */ 1269, 1270, 1273, 1257, 1276, 1272, 1317, 1304, 1318, 1329, - /* 320 */ 1237, 1312, 1306, 1349, 1358, 1361, 1362, 1367, 1291, 1281, - /* 330 */ 1303, 1307, 1354, 1359, 1364, 1370, 1376, + /* 0 */ 280, -308, 150, 181, 395, 425, 493, 638, 736, 979, + /* 10 */ 248, 1131, 1158, 1227, 1342, 1374, -81, 902, 1409, 1482, + /* 20 */ 1505, 720, 1525, 1540, 1636, 1672, 1704, 1781, 1797, 1815, + /* 30 */ 1880, 1914, 1937, 1994, 2067, 2087, 2145, 2160, 2182, 2240, + /* 40 */ 2255, 2275, 2348, 2368, 2385, 2454, 2512, 2527, 2549, 2607, + /* 50 */ 2622, -310, -217, -425, 38, -418, 769, 771, 910, -172, + /* 60 */ -156, 948, -381, -438, -257, 126, 149, -463, -300, 363, + /* 70 */ -324, -326, 52, -358, -202, -335, -218, 264, -90, 158, + /* 80 */ -84, -152, -98, 172, 187, -134, 91, 199, 331, 411, + /* 90 */ 478, 285, -54, -316, 504, 545, 159, 189, 652, 282, + /* 100 */ 697, 401, 714, 758, -368, 781, 784, 499, 786, 324, + /* 110 */ 535, 372, 775, -312, -422, -422, 47, -280, -353, 39, + /* 120 */ 354, 533, 564, 599, 601, 604, 694, 712, 719, 776, + /* 130 */ 803, 808, 831, 832, 846, 851, 853, -185, -89, 55, + /* 140 */ 99, 221, 622, 623, -89, 222, 589, 407, 534, 647, + /* 150 */ 627, 737, 408, 250, 703, 745, 624, 637, 756, 754, + /* 160 */ 799, 833, 515, 889, -392, -363, 566, 571, 614, 648, + /* 170 */ 743, 614, 692, 789, 841, 887, 824, 837, 982, 880, + /* 180 */ 984, 984, 994, 998, 962, 1020, 967, 891, 896, 898, + /* 190 */ 968, 903, 984, 1053, 1005, 1048, 1037, 1041, 1059, 1061, + /* 200 */ 984, 1004, 1004, 985, 1004, 1006, 1002, 1104, 1063, 1049, + /* 210 */ 1054, 1064, 1071, 1134, 1069, 1135, 1087, 1156, 1169, 1123, + /* 220 */ 1174, 1126, 1132, 1178, 1179, 1181, 1133, 1137, 1138, 1175, + /* 230 */ 1180, 1190, 1182, 1194, 1195, 1196, 1205, 1206, 1209, 1207, + /* 240 */ 1129, 1197, 1200, 1171, 1203, 1216, 1161, 1220, 1230, 1225, + /* 250 */ 1184, 1226, 1233, 1236, 1235, 1246, 1223, 1232, 1234, 1237, + /* 260 */ 1238, 1242, 1243, 1244, 1245, 1248, 1250, 1255, 1263, 1266, + /* 270 */ 1252, 1218, 1239, 1241, 1189, 1198, 1208, 1271, 1210, 1213, + /* 280 */ 1217, 1251, 1281, 1231, 1293, 1256, 1166, 1262, 1173, 1264, + /* 290 */ 1176, 1183, 1186, 1201, 1191, 1185, 1259, 1160, 1187, 1199, + /* 300 */ 1004, 1331, 1253, 1222, 1258, 1343, 1339, 1340, 1302, 1303, + /* 310 */ 1307, 1318, 1319, 1304, 1323, 1311, 1344, 1345, 1360, 1368, + /* 320 */ 1269, 1346, 1327, 1378, 1379, 1390, 1393, 1391, 1321, 1317, + /* 330 */ 1328, 1336, 1381, 1383, 1384, 1392, 1412, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 10 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 20 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 30 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 40 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 50 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 60 */ 1893, 2232, 1893, 1893, 2195, 1893, 1893, 1893, 1893, 1893, - /* 70 */ 1893, 1893, 1893, 1893, 1893, 1893, 2202, 1893, 1893, 1893, - /* 80 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 90 */ 1893, 1893, 1893, 1893, 1893, 1893, 1992, 1893, 1893, 1893, - /* 100 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 110 */ 1893, 1893, 1893, 1990, 2435, 1893, 1893, 1893, 1893, 1893, - /* 120 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 130 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 2447, 1893, - /* 140 */ 1893, 1964, 1964, 1893, 2447, 2447, 2447, 1990, 2407, 2407, - /* 150 */ 1893, 1893, 1992, 2270, 1893, 1893, 1893, 1893, 1893, 1893, - /* 160 */ 1893, 1893, 2115, 1923, 1893, 1893, 1893, 1893, 2139, 1893, - /* 170 */ 1893, 1893, 2258, 1893, 1893, 2476, 2536, 1893, 1893, 2479, - /* 180 */ 1893, 1893, 1893, 1893, 2207, 1893, 2466, 1893, 1893, 1893, - /* 190 */ 1893, 1893, 1893, 1893, 1893, 1893, 2068, 2252, 1893, 1893, - /* 200 */ 1893, 2439, 2453, 2520, 2440, 2437, 2460, 1893, 2470, 1893, - /* 210 */ 2295, 1893, 2284, 1992, 1893, 1992, 2245, 2190, 1893, 2200, - /* 220 */ 1893, 2200, 2197, 1893, 1893, 1893, 2200, 2197, 2197, 2057, - /* 230 */ 2053, 1893, 2051, 1893, 1893, 1893, 1893, 1948, 1893, 1948, - /* 240 */ 1893, 1992, 1992, 1893, 1992, 1893, 1893, 1992, 1893, 1992, - /* 250 */ 1893, 1992, 1992, 1893, 1992, 1893, 1893, 1893, 1893, 1893, - /* 260 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 270 */ 1893, 1893, 1893, 1893, 2282, 2268, 1893, 1990, 1893, 2256, - /* 280 */ 2254, 1893, 1990, 2470, 1893, 1893, 2490, 2485, 2490, 2485, - /* 290 */ 2504, 2500, 2490, 2509, 2506, 2472, 2470, 2539, 2526, 2522, - /* 300 */ 2453, 1893, 1893, 2458, 2456, 1893, 1990, 1990, 2485, 1893, - /* 310 */ 1893, 1893, 1893, 2485, 1893, 1893, 1990, 1893, 1990, 1893, - /* 320 */ 1893, 2084, 1893, 1893, 1990, 1893, 1932, 1893, 2247, 2273, - /* 330 */ 2228, 2228, 2118, 2118, 2118, 1993, 1898, 1893, 1893, 1893, - /* 340 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 2503, - /* 350 */ 2502, 2360, 1893, 2411, 2410, 2409, 2400, 2359, 2080, 1893, - /* 360 */ 1893, 2358, 2357, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 370 */ 1893, 1893, 2219, 2218, 2351, 1893, 1893, 2352, 2350, 2349, - /* 380 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 390 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 400 */ 1893, 1893, 1893, 1893, 1893, 2523, 2527, 1893, 1893, 1893, - /* 410 */ 1893, 1893, 1893, 2436, 1893, 1893, 1893, 2331, 1893, 1893, - /* 420 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 430 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 440 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 450 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 460 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 470 */ 1893, 1893, 2196, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 480 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 490 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 500 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 510 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 520 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 530 */ 1893, 1893, 1893, 2211, 1893, 1893, 1893, 1893, 1893, 1893, - /* 540 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 550 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 560 */ 1893, 1893, 1893, 1893, 1893, 1937, 2338, 1893, 1893, 1893, - /* 570 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 580 */ 2341, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 590 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 600 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 610 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 620 */ 1893, 2032, 2031, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 630 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 640 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 2342, - /* 650 */ 1893, 1893, 1893, 1893, 1893, 2333, 1893, 1893, 1893, 1893, - /* 660 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 670 */ 1893, 1893, 2519, 2473, 1893, 1893, 1893, 1893, 1893, 1893, - /* 680 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 690 */ 1893, 1893, 2331, 1893, 2501, 1893, 1893, 2517, 1893, 2521, - /* 700 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 2446, 2442, 1893, - /* 710 */ 1893, 2438, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 720 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 2330, - /* 730 */ 1893, 2397, 1893, 1893, 1893, 2431, 1893, 1893, 2382, 1893, - /* 740 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 2342, 1893, - /* 750 */ 2345, 1893, 1893, 1893, 1893, 1893, 2112, 1893, 1893, 1893, - /* 760 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 770 */ 1893, 1893, 2096, 2094, 2093, 2092, 1893, 2125, 1893, 1893, - /* 780 */ 1893, 2121, 2120, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 790 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 2011, - /* 800 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 2003, 1893, - /* 810 */ 2002, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 820 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, - /* 830 */ 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1922, 1893, - /* 840 */ 1893, 1893, 1893, 1893, 1893, + /* 0 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 10 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 20 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 30 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 40 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 50 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 60 */ 1895, 2235, 1895, 1895, 2198, 1895, 1895, 1895, 1895, 1895, + /* 70 */ 1895, 1895, 1895, 1895, 1895, 1895, 2205, 1895, 1895, 1895, + /* 80 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 90 */ 1895, 1895, 1895, 1895, 1895, 1895, 1994, 1895, 1895, 1895, + /* 100 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 110 */ 1895, 1895, 1895, 1992, 2438, 1895, 1895, 1895, 1895, 1895, + /* 120 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 130 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2450, 1895, + /* 140 */ 1895, 1966, 1966, 1895, 2450, 2450, 2450, 1992, 2410, 2410, + /* 150 */ 1895, 1895, 1994, 2273, 1895, 1895, 1895, 1895, 1895, 1895, + /* 160 */ 1895, 1895, 2117, 1925, 1895, 1895, 1895, 1895, 2141, 1895, + /* 170 */ 1895, 1895, 2261, 1895, 1895, 2479, 2539, 1895, 1895, 2482, + /* 180 */ 1895, 1895, 1895, 1895, 2210, 1895, 2469, 1895, 1895, 1895, + /* 190 */ 1895, 1895, 1895, 1895, 1895, 1895, 2070, 2255, 1895, 1895, + /* 200 */ 1895, 2442, 2456, 2523, 2443, 2440, 2463, 1895, 2473, 1895, + /* 210 */ 2298, 1895, 2287, 1994, 1895, 1994, 2248, 2193, 1895, 2203, + /* 220 */ 1895, 2203, 2200, 1895, 1895, 1895, 2203, 2200, 2200, 2059, + /* 230 */ 2055, 1895, 2053, 1895, 1895, 1895, 1895, 1950, 1895, 1950, + /* 240 */ 1895, 1994, 1994, 1895, 1994, 1895, 1895, 1994, 1895, 1994, + /* 250 */ 1895, 1994, 1994, 1895, 1994, 1895, 1895, 1895, 1895, 1895, + /* 260 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 270 */ 1895, 1895, 1895, 1895, 2285, 2271, 1895, 1992, 1895, 2259, + /* 280 */ 2257, 1895, 1992, 2473, 1895, 1895, 2493, 2488, 2493, 2488, + /* 290 */ 2507, 2503, 2493, 2512, 2509, 2475, 2473, 2542, 2529, 2525, + /* 300 */ 2456, 1895, 1895, 2461, 2459, 1895, 1992, 1992, 2488, 1895, + /* 310 */ 1895, 1895, 1895, 2488, 1895, 1895, 1992, 1895, 1992, 1895, + /* 320 */ 1895, 2086, 1895, 1895, 1992, 1895, 1934, 1895, 2250, 2276, + /* 330 */ 2231, 2231, 2120, 2120, 2120, 1995, 1900, 1895, 1895, 1895, + /* 340 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2506, + /* 350 */ 2505, 2363, 1895, 2414, 2413, 2412, 2403, 2362, 2082, 1895, + /* 360 */ 1895, 2361, 2360, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 370 */ 1895, 1895, 2222, 2221, 2354, 1895, 1895, 2355, 2353, 2352, + /* 380 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 390 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 400 */ 1895, 1895, 1895, 1895, 1895, 2526, 2530, 1895, 1895, 1895, + /* 410 */ 1895, 1895, 1895, 2439, 1895, 1895, 1895, 2334, 1895, 1895, + /* 420 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 430 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 440 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 450 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 460 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 470 */ 1895, 1895, 2199, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 480 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 490 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 500 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 510 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 520 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 530 */ 1895, 1895, 1895, 1895, 2214, 1895, 1895, 1895, 1895, 1895, + /* 540 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 550 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 560 */ 1895, 1895, 1895, 1895, 1895, 1895, 1939, 2341, 1895, 1895, + /* 570 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 580 */ 1895, 2344, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 590 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 600 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 610 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 620 */ 1895, 1895, 2034, 2033, 1895, 1895, 1895, 1895, 1895, 1895, + /* 630 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 640 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 650 */ 2345, 1895, 1895, 1895, 1895, 1895, 2336, 1895, 1895, 1895, + /* 660 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 670 */ 1895, 1895, 1895, 2522, 2476, 1895, 1895, 1895, 1895, 1895, + /* 680 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 690 */ 1895, 1895, 1895, 2334, 1895, 2504, 1895, 1895, 2520, 1895, + /* 700 */ 2524, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2449, 2445, + /* 710 */ 1895, 1895, 2441, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 720 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 730 */ 2333, 1895, 2400, 1895, 1895, 1895, 2434, 1895, 1895, 2385, + /* 740 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2345, + /* 750 */ 1895, 2348, 1895, 1895, 1895, 1895, 1895, 2114, 1895, 1895, + /* 760 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 770 */ 1895, 1895, 1895, 2098, 2096, 2095, 2094, 1895, 2127, 1895, + /* 780 */ 1895, 1895, 2123, 2122, 1895, 1895, 1895, 1895, 1895, 1895, + /* 790 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 800 */ 2013, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2005, + /* 810 */ 1895, 2004, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 820 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, + /* 830 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1924, + /* 840 */ 1895, 1895, 1895, 1895, 1895, 1895, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1227,7 +1217,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* BWLIMIT => nothing */ 0, /* START => nothing */ 0, /* TIMESTAMP => nothing */ - 299, /* END => ABORT */ + 300, /* END => ABORT */ 0, /* TABLE => nothing */ 0, /* NK_LP => nothing */ 0, /* NK_RP => nothing */ @@ -1283,6 +1273,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* GRANTS => nothing */ 0, /* FULL => nothing */ 0, /* LOG => nothing */ + 0, /* MACHINES => nothing */ 0, /* QUERIES => nothing */ 0, /* SCORES => nothing */ 0, /* TOPICS => nothing */ @@ -1296,7 +1287,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* VNODES => nothing */ 0, /* ALIVE => nothing */ 0, /* VIEWS => nothing */ - 299, /* VIEW => ABORT */ + 300, /* VIEW => ABORT */ 0, /* COMPACTS => nothing */ 0, /* NORMAL => nothing */ 0, /* CHILD => nothing */ @@ -1422,55 +1413,55 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ABORT => nothing */ - 299, /* AFTER => ABORT */ - 299, /* ATTACH => ABORT */ - 299, /* BEFORE => ABORT */ - 299, /* BEGIN => ABORT */ - 299, /* BITAND => ABORT */ - 299, /* BITNOT => ABORT */ - 299, /* BITOR => ABORT */ - 299, /* BLOCKS => ABORT */ - 299, /* CHANGE => ABORT */ - 299, /* COMMA => ABORT */ - 299, /* CONCAT => ABORT */ - 299, /* CONFLICT => ABORT */ - 299, /* COPY => ABORT */ - 299, /* DEFERRED => ABORT */ - 299, /* DELIMITERS => ABORT */ - 299, /* DETACH => ABORT */ - 299, /* DIVIDE => ABORT */ - 299, /* DOT => ABORT */ - 299, /* EACH => ABORT */ - 299, /* FAIL => ABORT */ - 299, /* FILE => ABORT */ - 299, /* FOR => ABORT */ - 299, /* GLOB => ABORT */ - 299, /* ID => ABORT */ - 299, /* IMMEDIATE => ABORT */ - 299, /* IMPORT => ABORT */ - 299, /* INITIALLY => ABORT */ - 299, /* INSTEAD => ABORT */ - 299, /* ISNULL => ABORT */ - 299, /* KEY => ABORT */ - 299, /* MODULES => ABORT */ - 299, /* NK_BITNOT => ABORT */ - 299, /* NK_SEMI => ABORT */ - 299, /* NOTNULL => ABORT */ - 299, /* OF => ABORT */ - 299, /* PLUS => ABORT */ - 299, /* PRIVILEGE => ABORT */ - 299, /* RAISE => ABORT */ - 299, /* RESTRICT => ABORT */ - 299, /* ROW => ABORT */ - 299, /* SEMI => ABORT */ - 299, /* STAR => ABORT */ - 299, /* STATEMENT => ABORT */ - 299, /* STRICT => ABORT */ - 299, /* STRING => ABORT */ - 299, /* TIMES => ABORT */ - 299, /* VALUES => ABORT */ - 299, /* VARIABLE => ABORT */ - 299, /* WAL => ABORT */ + 300, /* AFTER => ABORT */ + 300, /* ATTACH => ABORT */ + 300, /* BEFORE => ABORT */ + 300, /* BEGIN => ABORT */ + 300, /* BITAND => ABORT */ + 300, /* BITNOT => ABORT */ + 300, /* BITOR => ABORT */ + 300, /* BLOCKS => ABORT */ + 300, /* CHANGE => ABORT */ + 300, /* COMMA => ABORT */ + 300, /* CONCAT => ABORT */ + 300, /* CONFLICT => ABORT */ + 300, /* COPY => ABORT */ + 300, /* DEFERRED => ABORT */ + 300, /* DELIMITERS => ABORT */ + 300, /* DETACH => ABORT */ + 300, /* DIVIDE => ABORT */ + 300, /* DOT => ABORT */ + 300, /* EACH => ABORT */ + 300, /* FAIL => ABORT */ + 300, /* FILE => ABORT */ + 300, /* FOR => ABORT */ + 300, /* GLOB => ABORT */ + 300, /* ID => ABORT */ + 300, /* IMMEDIATE => ABORT */ + 300, /* IMPORT => ABORT */ + 300, /* INITIALLY => ABORT */ + 300, /* INSTEAD => ABORT */ + 300, /* ISNULL => ABORT */ + 300, /* KEY => ABORT */ + 300, /* MODULES => ABORT */ + 300, /* NK_BITNOT => ABORT */ + 300, /* NK_SEMI => ABORT */ + 300, /* NOTNULL => ABORT */ + 300, /* OF => ABORT */ + 300, /* PLUS => ABORT */ + 300, /* PRIVILEGE => ABORT */ + 300, /* RAISE => ABORT */ + 300, /* RESTRICT => ABORT */ + 300, /* ROW => ABORT */ + 300, /* SEMI => ABORT */ + 300, /* STAR => ABORT */ + 300, /* STATEMENT => ABORT */ + 300, /* STRICT => ABORT */ + 300, /* STRING => ABORT */ + 300, /* TIMES => ABORT */ + 300, /* VALUES => ABORT */ + 300, /* VARIABLE => ABORT */ + 300, /* WAL => ABORT */ }; #endif /* YYFALLBACK */ @@ -1719,355 +1710,356 @@ static const char *const yyTokenName[] = { /* 158 */ "GRANTS", /* 159 */ "FULL", /* 160 */ "LOG", - /* 161 */ "QUERIES", - /* 162 */ "SCORES", - /* 163 */ "TOPICS", - /* 164 */ "VARIABLES", - /* 165 */ "BNODES", - /* 166 */ "SNODES", - /* 167 */ "TRANSACTIONS", - /* 168 */ "DISTRIBUTED", - /* 169 */ "CONSUMERS", - /* 170 */ "SUBSCRIPTIONS", - /* 171 */ "VNODES", - /* 172 */ "ALIVE", - /* 173 */ "VIEWS", - /* 174 */ "VIEW", - /* 175 */ "COMPACTS", - /* 176 */ "NORMAL", - /* 177 */ "CHILD", - /* 178 */ "LIKE", - /* 179 */ "TBNAME", - /* 180 */ "QTAGS", - /* 181 */ "AS", - /* 182 */ "SYSTEM", - /* 183 */ "INDEX", - /* 184 */ "FUNCTION", - /* 185 */ "INTERVAL", - /* 186 */ "COUNT", - /* 187 */ "LAST_ROW", - /* 188 */ "META", - /* 189 */ "ONLY", - /* 190 */ "TOPIC", - /* 191 */ "CONSUMER", - /* 192 */ "GROUP", - /* 193 */ "DESC", - /* 194 */ "DESCRIBE", - /* 195 */ "RESET", - /* 196 */ "QUERY", - /* 197 */ "CACHE", - /* 198 */ "EXPLAIN", - /* 199 */ "ANALYZE", - /* 200 */ "VERBOSE", - /* 201 */ "NK_BOOL", - /* 202 */ "RATIO", - /* 203 */ "NK_FLOAT", - /* 204 */ "OUTPUTTYPE", - /* 205 */ "AGGREGATE", - /* 206 */ "BUFSIZE", - /* 207 */ "LANGUAGE", - /* 208 */ "REPLACE", - /* 209 */ "STREAM", - /* 210 */ "INTO", - /* 211 */ "PAUSE", - /* 212 */ "RESUME", - /* 213 */ "TRIGGER", - /* 214 */ "AT_ONCE", - /* 215 */ "WINDOW_CLOSE", - /* 216 */ "IGNORE", - /* 217 */ "EXPIRED", - /* 218 */ "FILL_HISTORY", - /* 219 */ "UPDATE", - /* 220 */ "SUBTABLE", - /* 221 */ "UNTREATED", - /* 222 */ "KILL", - /* 223 */ "CONNECTION", - /* 224 */ "TRANSACTION", - /* 225 */ "BALANCE", - /* 226 */ "VGROUP", - /* 227 */ "LEADER", - /* 228 */ "MERGE", - /* 229 */ "REDISTRIBUTE", - /* 230 */ "SPLIT", - /* 231 */ "DELETE", - /* 232 */ "INSERT", - /* 233 */ "NULL", - /* 234 */ "NK_QUESTION", - /* 235 */ "NK_ALIAS", - /* 236 */ "NK_ARROW", - /* 237 */ "ROWTS", - /* 238 */ "QSTART", - /* 239 */ "QEND", - /* 240 */ "QDURATION", - /* 241 */ "WSTART", - /* 242 */ "WEND", - /* 243 */ "WDURATION", - /* 244 */ "IROWTS", - /* 245 */ "ISFILLED", - /* 246 */ "CAST", - /* 247 */ "NOW", - /* 248 */ "TODAY", - /* 249 */ "TIMEZONE", - /* 250 */ "CLIENT_VERSION", - /* 251 */ "SERVER_VERSION", - /* 252 */ "SERVER_STATUS", - /* 253 */ "CURRENT_USER", - /* 254 */ "CASE", - /* 255 */ "WHEN", - /* 256 */ "THEN", - /* 257 */ "ELSE", - /* 258 */ "BETWEEN", - /* 259 */ "IS", - /* 260 */ "NK_LT", - /* 261 */ "NK_GT", - /* 262 */ "NK_LE", - /* 263 */ "NK_GE", - /* 264 */ "NK_NE", - /* 265 */ "MATCH", - /* 266 */ "NMATCH", - /* 267 */ "CONTAINS", - /* 268 */ "IN", - /* 269 */ "JOIN", - /* 270 */ "INNER", - /* 271 */ "SELECT", - /* 272 */ "NK_HINT", - /* 273 */ "DISTINCT", - /* 274 */ "WHERE", - /* 275 */ "PARTITION", - /* 276 */ "BY", - /* 277 */ "SESSION", - /* 278 */ "STATE_WINDOW", - /* 279 */ "EVENT_WINDOW", - /* 280 */ "SLIDING", - /* 281 */ "FILL", - /* 282 */ "VALUE", - /* 283 */ "VALUE_F", - /* 284 */ "NONE", - /* 285 */ "PREV", - /* 286 */ "NULL_F", - /* 287 */ "LINEAR", - /* 288 */ "NEXT", - /* 289 */ "HAVING", - /* 290 */ "RANGE", - /* 291 */ "EVERY", - /* 292 */ "ORDER", - /* 293 */ "SLIMIT", - /* 294 */ "SOFFSET", - /* 295 */ "LIMIT", - /* 296 */ "OFFSET", - /* 297 */ "ASC", - /* 298 */ "NULLS", - /* 299 */ "ABORT", - /* 300 */ "AFTER", - /* 301 */ "ATTACH", - /* 302 */ "BEFORE", - /* 303 */ "BEGIN", - /* 304 */ "BITAND", - /* 305 */ "BITNOT", - /* 306 */ "BITOR", - /* 307 */ "BLOCKS", - /* 308 */ "CHANGE", - /* 309 */ "COMMA", - /* 310 */ "CONCAT", - /* 311 */ "CONFLICT", - /* 312 */ "COPY", - /* 313 */ "DEFERRED", - /* 314 */ "DELIMITERS", - /* 315 */ "DETACH", - /* 316 */ "DIVIDE", - /* 317 */ "DOT", - /* 318 */ "EACH", - /* 319 */ "FAIL", - /* 320 */ "FILE", - /* 321 */ "FOR", - /* 322 */ "GLOB", - /* 323 */ "ID", - /* 324 */ "IMMEDIATE", - /* 325 */ "IMPORT", - /* 326 */ "INITIALLY", - /* 327 */ "INSTEAD", - /* 328 */ "ISNULL", - /* 329 */ "KEY", - /* 330 */ "MODULES", - /* 331 */ "NK_BITNOT", - /* 332 */ "NK_SEMI", - /* 333 */ "NOTNULL", - /* 334 */ "OF", - /* 335 */ "PLUS", - /* 336 */ "PRIVILEGE", - /* 337 */ "RAISE", - /* 338 */ "RESTRICT", - /* 339 */ "ROW", - /* 340 */ "SEMI", - /* 341 */ "STAR", - /* 342 */ "STATEMENT", - /* 343 */ "STRICT", - /* 344 */ "STRING", - /* 345 */ "TIMES", - /* 346 */ "VALUES", - /* 347 */ "VARIABLE", - /* 348 */ "WAL", - /* 349 */ "cmd", - /* 350 */ "account_options", - /* 351 */ "alter_account_options", - /* 352 */ "literal", - /* 353 */ "alter_account_option", - /* 354 */ "ip_range_list", - /* 355 */ "white_list", - /* 356 */ "white_list_opt", - /* 357 */ "user_name", - /* 358 */ "sysinfo_opt", - /* 359 */ "privileges", - /* 360 */ "priv_level", - /* 361 */ "with_opt", - /* 362 */ "priv_type_list", - /* 363 */ "priv_type", - /* 364 */ "db_name", - /* 365 */ "table_name", - /* 366 */ "topic_name", - /* 367 */ "search_condition", - /* 368 */ "dnode_endpoint", - /* 369 */ "force_opt", - /* 370 */ "unsafe_opt", - /* 371 */ "not_exists_opt", - /* 372 */ "db_options", - /* 373 */ "exists_opt", - /* 374 */ "alter_db_options", - /* 375 */ "speed_opt", - /* 376 */ "start_opt", - /* 377 */ "end_opt", - /* 378 */ "integer_list", - /* 379 */ "variable_list", - /* 380 */ "retention_list", - /* 381 */ "signed", - /* 382 */ "alter_db_option", - /* 383 */ "retention", - /* 384 */ "full_table_name", - /* 385 */ "column_def_list", - /* 386 */ "tags_def_opt", - /* 387 */ "table_options", - /* 388 */ "multi_create_clause", - /* 389 */ "tags_def", - /* 390 */ "multi_drop_clause", - /* 391 */ "alter_table_clause", - /* 392 */ "alter_table_options", - /* 393 */ "column_name", - /* 394 */ "type_name", - /* 395 */ "signed_literal", - /* 396 */ "create_subtable_clause", - /* 397 */ "specific_cols_opt", - /* 398 */ "expression_list", - /* 399 */ "drop_table_clause", - /* 400 */ "col_name_list", - /* 401 */ "column_def", - /* 402 */ "duration_list", - /* 403 */ "rollup_func_list", - /* 404 */ "alter_table_option", - /* 405 */ "duration_literal", - /* 406 */ "rollup_func_name", - /* 407 */ "function_name", - /* 408 */ "col_name", - /* 409 */ "db_kind_opt", - /* 410 */ "table_kind_db_name_cond_opt", - /* 411 */ "like_pattern_opt", - /* 412 */ "db_name_cond_opt", - /* 413 */ "table_name_cond", - /* 414 */ "from_db_opt", - /* 415 */ "tag_list_opt", - /* 416 */ "table_kind", - /* 417 */ "tag_item", - /* 418 */ "column_alias", - /* 419 */ "index_options", - /* 420 */ "full_index_name", - /* 421 */ "index_name", - /* 422 */ "func_list", - /* 423 */ "sliding_opt", - /* 424 */ "sma_stream_opt", - /* 425 */ "func", - /* 426 */ "sma_func_name", - /* 427 */ "with_meta", - /* 428 */ "query_or_subquery", - /* 429 */ "where_clause_opt", - /* 430 */ "cgroup_name", - /* 431 */ "analyze_opt", - /* 432 */ "explain_options", - /* 433 */ "insert_query", - /* 434 */ "or_replace_opt", - /* 435 */ "agg_func_opt", - /* 436 */ "bufsize_opt", - /* 437 */ "language_opt", - /* 438 */ "full_view_name", - /* 439 */ "view_name", - /* 440 */ "stream_name", - /* 441 */ "stream_options", - /* 442 */ "col_list_opt", - /* 443 */ "tag_def_or_ref_opt", - /* 444 */ "subtable_opt", - /* 445 */ "ignore_opt", - /* 446 */ "expression", - /* 447 */ "on_vgroup_id", - /* 448 */ "dnode_list", - /* 449 */ "literal_func", - /* 450 */ "literal_list", - /* 451 */ "table_alias", - /* 452 */ "expr_or_subquery", - /* 453 */ "pseudo_column", - /* 454 */ "column_reference", - /* 455 */ "function_expression", - /* 456 */ "case_when_expression", - /* 457 */ "star_func", - /* 458 */ "star_func_para_list", - /* 459 */ "noarg_func", - /* 460 */ "other_para_list", - /* 461 */ "star_func_para", - /* 462 */ "when_then_list", - /* 463 */ "case_when_else_opt", - /* 464 */ "common_expression", - /* 465 */ "when_then_expr", - /* 466 */ "predicate", - /* 467 */ "compare_op", - /* 468 */ "in_op", - /* 469 */ "in_predicate_value", - /* 470 */ "boolean_value_expression", - /* 471 */ "boolean_primary", - /* 472 */ "from_clause_opt", - /* 473 */ "table_reference_list", - /* 474 */ "table_reference", - /* 475 */ "table_primary", - /* 476 */ "joined_table", - /* 477 */ "alias_opt", - /* 478 */ "subquery", - /* 479 */ "parenthesized_joined_table", - /* 480 */ "join_type", - /* 481 */ "query_specification", - /* 482 */ "hint_list", - /* 483 */ "set_quantifier_opt", - /* 484 */ "tag_mode_opt", - /* 485 */ "select_list", - /* 486 */ "partition_by_clause_opt", - /* 487 */ "range_opt", - /* 488 */ "every_opt", - /* 489 */ "fill_opt", - /* 490 */ "twindow_clause_opt", - /* 491 */ "group_by_clause_opt", - /* 492 */ "having_clause_opt", - /* 493 */ "select_item", - /* 494 */ "partition_list", - /* 495 */ "partition_item", - /* 496 */ "interval_sliding_duration_literal", - /* 497 */ "fill_mode", - /* 498 */ "group_by_list", - /* 499 */ "query_expression", - /* 500 */ "query_simple", - /* 501 */ "order_by_clause_opt", - /* 502 */ "slimit_clause_opt", - /* 503 */ "limit_clause_opt", - /* 504 */ "union_query_expression", - /* 505 */ "query_simple_or_subquery", - /* 506 */ "sort_specification_list", - /* 507 */ "sort_specification", - /* 508 */ "ordering_specification_opt", - /* 509 */ "null_ordering_opt", + /* 161 */ "MACHINES", + /* 162 */ "QUERIES", + /* 163 */ "SCORES", + /* 164 */ "TOPICS", + /* 165 */ "VARIABLES", + /* 166 */ "BNODES", + /* 167 */ "SNODES", + /* 168 */ "TRANSACTIONS", + /* 169 */ "DISTRIBUTED", + /* 170 */ "CONSUMERS", + /* 171 */ "SUBSCRIPTIONS", + /* 172 */ "VNODES", + /* 173 */ "ALIVE", + /* 174 */ "VIEWS", + /* 175 */ "VIEW", + /* 176 */ "COMPACTS", + /* 177 */ "NORMAL", + /* 178 */ "CHILD", + /* 179 */ "LIKE", + /* 180 */ "TBNAME", + /* 181 */ "QTAGS", + /* 182 */ "AS", + /* 183 */ "SYSTEM", + /* 184 */ "INDEX", + /* 185 */ "FUNCTION", + /* 186 */ "INTERVAL", + /* 187 */ "COUNT", + /* 188 */ "LAST_ROW", + /* 189 */ "META", + /* 190 */ "ONLY", + /* 191 */ "TOPIC", + /* 192 */ "CONSUMER", + /* 193 */ "GROUP", + /* 194 */ "DESC", + /* 195 */ "DESCRIBE", + /* 196 */ "RESET", + /* 197 */ "QUERY", + /* 198 */ "CACHE", + /* 199 */ "EXPLAIN", + /* 200 */ "ANALYZE", + /* 201 */ "VERBOSE", + /* 202 */ "NK_BOOL", + /* 203 */ "RATIO", + /* 204 */ "NK_FLOAT", + /* 205 */ "OUTPUTTYPE", + /* 206 */ "AGGREGATE", + /* 207 */ "BUFSIZE", + /* 208 */ "LANGUAGE", + /* 209 */ "REPLACE", + /* 210 */ "STREAM", + /* 211 */ "INTO", + /* 212 */ "PAUSE", + /* 213 */ "RESUME", + /* 214 */ "TRIGGER", + /* 215 */ "AT_ONCE", + /* 216 */ "WINDOW_CLOSE", + /* 217 */ "IGNORE", + /* 218 */ "EXPIRED", + /* 219 */ "FILL_HISTORY", + /* 220 */ "UPDATE", + /* 221 */ "SUBTABLE", + /* 222 */ "UNTREATED", + /* 223 */ "KILL", + /* 224 */ "CONNECTION", + /* 225 */ "TRANSACTION", + /* 226 */ "BALANCE", + /* 227 */ "VGROUP", + /* 228 */ "LEADER", + /* 229 */ "MERGE", + /* 230 */ "REDISTRIBUTE", + /* 231 */ "SPLIT", + /* 232 */ "DELETE", + /* 233 */ "INSERT", + /* 234 */ "NULL", + /* 235 */ "NK_QUESTION", + /* 236 */ "NK_ALIAS", + /* 237 */ "NK_ARROW", + /* 238 */ "ROWTS", + /* 239 */ "QSTART", + /* 240 */ "QEND", + /* 241 */ "QDURATION", + /* 242 */ "WSTART", + /* 243 */ "WEND", + /* 244 */ "WDURATION", + /* 245 */ "IROWTS", + /* 246 */ "ISFILLED", + /* 247 */ "CAST", + /* 248 */ "NOW", + /* 249 */ "TODAY", + /* 250 */ "TIMEZONE", + /* 251 */ "CLIENT_VERSION", + /* 252 */ "SERVER_VERSION", + /* 253 */ "SERVER_STATUS", + /* 254 */ "CURRENT_USER", + /* 255 */ "CASE", + /* 256 */ "WHEN", + /* 257 */ "THEN", + /* 258 */ "ELSE", + /* 259 */ "BETWEEN", + /* 260 */ "IS", + /* 261 */ "NK_LT", + /* 262 */ "NK_GT", + /* 263 */ "NK_LE", + /* 264 */ "NK_GE", + /* 265 */ "NK_NE", + /* 266 */ "MATCH", + /* 267 */ "NMATCH", + /* 268 */ "CONTAINS", + /* 269 */ "IN", + /* 270 */ "JOIN", + /* 271 */ "INNER", + /* 272 */ "SELECT", + /* 273 */ "NK_HINT", + /* 274 */ "DISTINCT", + /* 275 */ "WHERE", + /* 276 */ "PARTITION", + /* 277 */ "BY", + /* 278 */ "SESSION", + /* 279 */ "STATE_WINDOW", + /* 280 */ "EVENT_WINDOW", + /* 281 */ "SLIDING", + /* 282 */ "FILL", + /* 283 */ "VALUE", + /* 284 */ "VALUE_F", + /* 285 */ "NONE", + /* 286 */ "PREV", + /* 287 */ "NULL_F", + /* 288 */ "LINEAR", + /* 289 */ "NEXT", + /* 290 */ "HAVING", + /* 291 */ "RANGE", + /* 292 */ "EVERY", + /* 293 */ "ORDER", + /* 294 */ "SLIMIT", + /* 295 */ "SOFFSET", + /* 296 */ "LIMIT", + /* 297 */ "OFFSET", + /* 298 */ "ASC", + /* 299 */ "NULLS", + /* 300 */ "ABORT", + /* 301 */ "AFTER", + /* 302 */ "ATTACH", + /* 303 */ "BEFORE", + /* 304 */ "BEGIN", + /* 305 */ "BITAND", + /* 306 */ "BITNOT", + /* 307 */ "BITOR", + /* 308 */ "BLOCKS", + /* 309 */ "CHANGE", + /* 310 */ "COMMA", + /* 311 */ "CONCAT", + /* 312 */ "CONFLICT", + /* 313 */ "COPY", + /* 314 */ "DEFERRED", + /* 315 */ "DELIMITERS", + /* 316 */ "DETACH", + /* 317 */ "DIVIDE", + /* 318 */ "DOT", + /* 319 */ "EACH", + /* 320 */ "FAIL", + /* 321 */ "FILE", + /* 322 */ "FOR", + /* 323 */ "GLOB", + /* 324 */ "ID", + /* 325 */ "IMMEDIATE", + /* 326 */ "IMPORT", + /* 327 */ "INITIALLY", + /* 328 */ "INSTEAD", + /* 329 */ "ISNULL", + /* 330 */ "KEY", + /* 331 */ "MODULES", + /* 332 */ "NK_BITNOT", + /* 333 */ "NK_SEMI", + /* 334 */ "NOTNULL", + /* 335 */ "OF", + /* 336 */ "PLUS", + /* 337 */ "PRIVILEGE", + /* 338 */ "RAISE", + /* 339 */ "RESTRICT", + /* 340 */ "ROW", + /* 341 */ "SEMI", + /* 342 */ "STAR", + /* 343 */ "STATEMENT", + /* 344 */ "STRICT", + /* 345 */ "STRING", + /* 346 */ "TIMES", + /* 347 */ "VALUES", + /* 348 */ "VARIABLE", + /* 349 */ "WAL", + /* 350 */ "cmd", + /* 351 */ "account_options", + /* 352 */ "alter_account_options", + /* 353 */ "literal", + /* 354 */ "alter_account_option", + /* 355 */ "ip_range_list", + /* 356 */ "white_list", + /* 357 */ "white_list_opt", + /* 358 */ "user_name", + /* 359 */ "sysinfo_opt", + /* 360 */ "privileges", + /* 361 */ "priv_level", + /* 362 */ "with_opt", + /* 363 */ "priv_type_list", + /* 364 */ "priv_type", + /* 365 */ "db_name", + /* 366 */ "table_name", + /* 367 */ "topic_name", + /* 368 */ "search_condition", + /* 369 */ "dnode_endpoint", + /* 370 */ "force_opt", + /* 371 */ "unsafe_opt", + /* 372 */ "not_exists_opt", + /* 373 */ "db_options", + /* 374 */ "exists_opt", + /* 375 */ "alter_db_options", + /* 376 */ "speed_opt", + /* 377 */ "start_opt", + /* 378 */ "end_opt", + /* 379 */ "integer_list", + /* 380 */ "variable_list", + /* 381 */ "retention_list", + /* 382 */ "signed", + /* 383 */ "alter_db_option", + /* 384 */ "retention", + /* 385 */ "full_table_name", + /* 386 */ "column_def_list", + /* 387 */ "tags_def_opt", + /* 388 */ "table_options", + /* 389 */ "multi_create_clause", + /* 390 */ "tags_def", + /* 391 */ "multi_drop_clause", + /* 392 */ "alter_table_clause", + /* 393 */ "alter_table_options", + /* 394 */ "column_name", + /* 395 */ "type_name", + /* 396 */ "signed_literal", + /* 397 */ "create_subtable_clause", + /* 398 */ "specific_cols_opt", + /* 399 */ "expression_list", + /* 400 */ "drop_table_clause", + /* 401 */ "col_name_list", + /* 402 */ "column_def", + /* 403 */ "duration_list", + /* 404 */ "rollup_func_list", + /* 405 */ "alter_table_option", + /* 406 */ "duration_literal", + /* 407 */ "rollup_func_name", + /* 408 */ "function_name", + /* 409 */ "col_name", + /* 410 */ "db_kind_opt", + /* 411 */ "table_kind_db_name_cond_opt", + /* 412 */ "like_pattern_opt", + /* 413 */ "db_name_cond_opt", + /* 414 */ "table_name_cond", + /* 415 */ "from_db_opt", + /* 416 */ "tag_list_opt", + /* 417 */ "table_kind", + /* 418 */ "tag_item", + /* 419 */ "column_alias", + /* 420 */ "index_options", + /* 421 */ "full_index_name", + /* 422 */ "index_name", + /* 423 */ "func_list", + /* 424 */ "sliding_opt", + /* 425 */ "sma_stream_opt", + /* 426 */ "func", + /* 427 */ "sma_func_name", + /* 428 */ "with_meta", + /* 429 */ "query_or_subquery", + /* 430 */ "where_clause_opt", + /* 431 */ "cgroup_name", + /* 432 */ "analyze_opt", + /* 433 */ "explain_options", + /* 434 */ "insert_query", + /* 435 */ "or_replace_opt", + /* 436 */ "agg_func_opt", + /* 437 */ "bufsize_opt", + /* 438 */ "language_opt", + /* 439 */ "full_view_name", + /* 440 */ "view_name", + /* 441 */ "stream_name", + /* 442 */ "stream_options", + /* 443 */ "col_list_opt", + /* 444 */ "tag_def_or_ref_opt", + /* 445 */ "subtable_opt", + /* 446 */ "ignore_opt", + /* 447 */ "expression", + /* 448 */ "on_vgroup_id", + /* 449 */ "dnode_list", + /* 450 */ "literal_func", + /* 451 */ "literal_list", + /* 452 */ "table_alias", + /* 453 */ "expr_or_subquery", + /* 454 */ "pseudo_column", + /* 455 */ "column_reference", + /* 456 */ "function_expression", + /* 457 */ "case_when_expression", + /* 458 */ "star_func", + /* 459 */ "star_func_para_list", + /* 460 */ "noarg_func", + /* 461 */ "other_para_list", + /* 462 */ "star_func_para", + /* 463 */ "when_then_list", + /* 464 */ "case_when_else_opt", + /* 465 */ "common_expression", + /* 466 */ "when_then_expr", + /* 467 */ "predicate", + /* 468 */ "compare_op", + /* 469 */ "in_op", + /* 470 */ "in_predicate_value", + /* 471 */ "boolean_value_expression", + /* 472 */ "boolean_primary", + /* 473 */ "from_clause_opt", + /* 474 */ "table_reference_list", + /* 475 */ "table_reference", + /* 476 */ "table_primary", + /* 477 */ "joined_table", + /* 478 */ "alias_opt", + /* 479 */ "subquery", + /* 480 */ "parenthesized_joined_table", + /* 481 */ "join_type", + /* 482 */ "query_specification", + /* 483 */ "hint_list", + /* 484 */ "set_quantifier_opt", + /* 485 */ "tag_mode_opt", + /* 486 */ "select_list", + /* 487 */ "partition_by_clause_opt", + /* 488 */ "range_opt", + /* 489 */ "every_opt", + /* 490 */ "fill_opt", + /* 491 */ "twindow_clause_opt", + /* 492 */ "group_by_clause_opt", + /* 493 */ "having_clause_opt", + /* 494 */ "select_item", + /* 495 */ "partition_list", + /* 496 */ "partition_item", + /* 497 */ "interval_sliding_duration_literal", + /* 498 */ "fill_mode", + /* 499 */ "group_by_list", + /* 500 */ "query_expression", + /* 501 */ "query_simple", + /* 502 */ "order_by_clause_opt", + /* 503 */ "slimit_clause_opt", + /* 504 */ "limit_clause_opt", + /* 505 */ "union_query_expression", + /* 506 */ "query_simple_or_subquery", + /* 507 */ "sort_specification_list", + /* 508 */ "sort_specification", + /* 509 */ "ordering_specification_opt", + /* 510 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -2339,388 +2331,389 @@ static const char *const yyRuleName[] = { /* 261 */ "cmd ::= SHOW GRANTS", /* 262 */ "cmd ::= SHOW GRANTS FULL", /* 263 */ "cmd ::= SHOW GRANTS LOG", - /* 264 */ "cmd ::= SHOW CREATE DATABASE db_name", - /* 265 */ "cmd ::= SHOW CREATE TABLE full_table_name", - /* 266 */ "cmd ::= SHOW CREATE STABLE full_table_name", - /* 267 */ "cmd ::= SHOW QUERIES", - /* 268 */ "cmd ::= SHOW SCORES", - /* 269 */ "cmd ::= SHOW TOPICS", - /* 270 */ "cmd ::= SHOW VARIABLES", - /* 271 */ "cmd ::= SHOW CLUSTER VARIABLES", - /* 272 */ "cmd ::= SHOW LOCAL VARIABLES", - /* 273 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", - /* 274 */ "cmd ::= SHOW BNODES", - /* 275 */ "cmd ::= SHOW SNODES", - /* 276 */ "cmd ::= SHOW CLUSTER", - /* 277 */ "cmd ::= SHOW TRANSACTIONS", - /* 278 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", - /* 279 */ "cmd ::= SHOW CONSUMERS", - /* 280 */ "cmd ::= SHOW SUBSCRIPTIONS", - /* 281 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", - /* 282 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", - /* 283 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", - /* 284 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", - /* 285 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", - /* 286 */ "cmd ::= SHOW VNODES", - /* 287 */ "cmd ::= SHOW db_name_cond_opt ALIVE", - /* 288 */ "cmd ::= SHOW CLUSTER ALIVE", - /* 289 */ "cmd ::= SHOW db_name_cond_opt VIEWS", - /* 290 */ "cmd ::= SHOW CREATE VIEW full_table_name", - /* 291 */ "cmd ::= SHOW COMPACTS", - /* 292 */ "cmd ::= SHOW COMPACT NK_INTEGER", - /* 293 */ "table_kind_db_name_cond_opt ::=", - /* 294 */ "table_kind_db_name_cond_opt ::= table_kind", - /* 295 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", - /* 296 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", - /* 297 */ "table_kind ::= NORMAL", - /* 298 */ "table_kind ::= CHILD", - /* 299 */ "db_name_cond_opt ::=", - /* 300 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 301 */ "like_pattern_opt ::=", - /* 302 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 303 */ "table_name_cond ::= table_name", - /* 304 */ "from_db_opt ::=", - /* 305 */ "from_db_opt ::= FROM db_name", - /* 306 */ "tag_list_opt ::=", - /* 307 */ "tag_list_opt ::= tag_item", - /* 308 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", - /* 309 */ "tag_item ::= TBNAME", - /* 310 */ "tag_item ::= QTAGS", - /* 311 */ "tag_item ::= column_name", - /* 312 */ "tag_item ::= column_name column_alias", - /* 313 */ "tag_item ::= column_name AS column_alias", - /* 314 */ "db_kind_opt ::=", - /* 315 */ "db_kind_opt ::= USER", - /* 316 */ "db_kind_opt ::= SYSTEM", - /* 317 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", - /* 318 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", - /* 319 */ "cmd ::= DROP INDEX exists_opt full_index_name", - /* 320 */ "full_index_name ::= index_name", - /* 321 */ "full_index_name ::= db_name NK_DOT index_name", - /* 322 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", - /* 323 */ "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", - /* 324 */ "func_list ::= func", - /* 325 */ "func_list ::= func_list NK_COMMA func", - /* 326 */ "func ::= sma_func_name NK_LP expression_list NK_RP", - /* 327 */ "sma_func_name ::= function_name", - /* 328 */ "sma_func_name ::= COUNT", - /* 329 */ "sma_func_name ::= FIRST", - /* 330 */ "sma_func_name ::= LAST", - /* 331 */ "sma_func_name ::= LAST_ROW", - /* 332 */ "sma_stream_opt ::=", - /* 333 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", - /* 334 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", - /* 335 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", - /* 336 */ "with_meta ::= AS", - /* 337 */ "with_meta ::= WITH META AS", - /* 338 */ "with_meta ::= ONLY META AS", - /* 339 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", - /* 340 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", - /* 341 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", - /* 342 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 343 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 344 */ "cmd ::= DESC full_table_name", - /* 345 */ "cmd ::= DESCRIBE full_table_name", - /* 346 */ "cmd ::= RESET QUERY CACHE", - /* 347 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", - /* 348 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", - /* 349 */ "analyze_opt ::=", - /* 350 */ "analyze_opt ::= ANALYZE", - /* 351 */ "explain_options ::=", - /* 352 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 353 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 354 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", - /* 355 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 356 */ "agg_func_opt ::=", - /* 357 */ "agg_func_opt ::= AGGREGATE", - /* 358 */ "bufsize_opt ::=", - /* 359 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 360 */ "language_opt ::=", - /* 361 */ "language_opt ::= LANGUAGE NK_STRING", - /* 362 */ "or_replace_opt ::=", - /* 363 */ "or_replace_opt ::= OR REPLACE", - /* 364 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", - /* 365 */ "cmd ::= DROP VIEW exists_opt full_view_name", - /* 366 */ "full_view_name ::= view_name", - /* 367 */ "full_view_name ::= db_name NK_DOT view_name", - /* 368 */ "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", - /* 369 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 370 */ "cmd ::= PAUSE STREAM exists_opt stream_name", - /* 371 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", - /* 372 */ "col_list_opt ::=", - /* 373 */ "col_list_opt ::= NK_LP col_name_list NK_RP", - /* 374 */ "tag_def_or_ref_opt ::=", - /* 375 */ "tag_def_or_ref_opt ::= tags_def", - /* 376 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP", - /* 377 */ "stream_options ::=", - /* 378 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 379 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 380 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 381 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 382 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", - /* 383 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", - /* 384 */ "stream_options ::= stream_options DELETE_MARK duration_literal", - /* 385 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", - /* 386 */ "subtable_opt ::=", - /* 387 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 388 */ "ignore_opt ::=", - /* 389 */ "ignore_opt ::= IGNORE UNTREATED", - /* 390 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 391 */ "cmd ::= KILL QUERY NK_STRING", - /* 392 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 393 */ "cmd ::= KILL COMPACT NK_INTEGER", - /* 394 */ "cmd ::= BALANCE VGROUP", - /* 395 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", - /* 396 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 397 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 398 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 399 */ "on_vgroup_id ::=", - /* 400 */ "on_vgroup_id ::= ON NK_INTEGER", - /* 401 */ "dnode_list ::= DNODE NK_INTEGER", - /* 402 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 403 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 404 */ "cmd ::= query_or_subquery", - /* 405 */ "cmd ::= insert_query", - /* 406 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 407 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", - /* 408 */ "literal ::= NK_INTEGER", - /* 409 */ "literal ::= NK_FLOAT", - /* 410 */ "literal ::= NK_STRING", - /* 411 */ "literal ::= NK_BOOL", - /* 412 */ "literal ::= TIMESTAMP NK_STRING", - /* 413 */ "literal ::= duration_literal", - /* 414 */ "literal ::= NULL", - /* 415 */ "literal ::= NK_QUESTION", - /* 416 */ "duration_literal ::= NK_VARIABLE", - /* 417 */ "signed ::= NK_INTEGER", - /* 418 */ "signed ::= NK_PLUS NK_INTEGER", - /* 419 */ "signed ::= NK_MINUS NK_INTEGER", - /* 420 */ "signed ::= NK_FLOAT", - /* 421 */ "signed ::= NK_PLUS NK_FLOAT", - /* 422 */ "signed ::= NK_MINUS NK_FLOAT", - /* 423 */ "signed_literal ::= signed", - /* 424 */ "signed_literal ::= NK_STRING", - /* 425 */ "signed_literal ::= NK_BOOL", - /* 426 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 427 */ "signed_literal ::= duration_literal", - /* 428 */ "signed_literal ::= NULL", - /* 429 */ "signed_literal ::= literal_func", - /* 430 */ "signed_literal ::= NK_QUESTION", - /* 431 */ "literal_list ::= signed_literal", - /* 432 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 433 */ "db_name ::= NK_ID", - /* 434 */ "table_name ::= NK_ID", - /* 435 */ "column_name ::= NK_ID", - /* 436 */ "function_name ::= NK_ID", - /* 437 */ "view_name ::= NK_ID", - /* 438 */ "table_alias ::= NK_ID", - /* 439 */ "column_alias ::= NK_ID", - /* 440 */ "column_alias ::= NK_ALIAS", - /* 441 */ "user_name ::= NK_ID", - /* 442 */ "topic_name ::= NK_ID", - /* 443 */ "stream_name ::= NK_ID", - /* 444 */ "cgroup_name ::= NK_ID", - /* 445 */ "index_name ::= NK_ID", - /* 446 */ "expr_or_subquery ::= expression", - /* 447 */ "expression ::= literal", - /* 448 */ "expression ::= pseudo_column", - /* 449 */ "expression ::= column_reference", - /* 450 */ "expression ::= function_expression", - /* 451 */ "expression ::= case_when_expression", - /* 452 */ "expression ::= NK_LP expression NK_RP", - /* 453 */ "expression ::= NK_PLUS expr_or_subquery", - /* 454 */ "expression ::= NK_MINUS expr_or_subquery", - /* 455 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 456 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 457 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 458 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 459 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 460 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 461 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 462 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 463 */ "expression_list ::= expr_or_subquery", - /* 464 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 465 */ "column_reference ::= column_name", - /* 466 */ "column_reference ::= table_name NK_DOT column_name", - /* 467 */ "column_reference ::= NK_ALIAS", - /* 468 */ "column_reference ::= table_name NK_DOT NK_ALIAS", - /* 469 */ "pseudo_column ::= ROWTS", - /* 470 */ "pseudo_column ::= TBNAME", - /* 471 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 472 */ "pseudo_column ::= QSTART", - /* 473 */ "pseudo_column ::= QEND", - /* 474 */ "pseudo_column ::= QDURATION", - /* 475 */ "pseudo_column ::= WSTART", - /* 476 */ "pseudo_column ::= WEND", - /* 477 */ "pseudo_column ::= WDURATION", - /* 478 */ "pseudo_column ::= IROWTS", - /* 479 */ "pseudo_column ::= ISFILLED", - /* 480 */ "pseudo_column ::= QTAGS", - /* 481 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 482 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 483 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 484 */ "function_expression ::= literal_func", - /* 485 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 486 */ "literal_func ::= NOW", - /* 487 */ "noarg_func ::= NOW", - /* 488 */ "noarg_func ::= TODAY", - /* 489 */ "noarg_func ::= TIMEZONE", - /* 490 */ "noarg_func ::= DATABASE", - /* 491 */ "noarg_func ::= CLIENT_VERSION", - /* 492 */ "noarg_func ::= SERVER_VERSION", - /* 493 */ "noarg_func ::= SERVER_STATUS", - /* 494 */ "noarg_func ::= CURRENT_USER", - /* 495 */ "noarg_func ::= USER", - /* 496 */ "star_func ::= COUNT", - /* 497 */ "star_func ::= FIRST", - /* 498 */ "star_func ::= LAST", - /* 499 */ "star_func ::= LAST_ROW", - /* 500 */ "star_func_para_list ::= NK_STAR", - /* 501 */ "star_func_para_list ::= other_para_list", - /* 502 */ "other_para_list ::= star_func_para", - /* 503 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 504 */ "star_func_para ::= expr_or_subquery", - /* 505 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 506 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 507 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 508 */ "when_then_list ::= when_then_expr", - /* 509 */ "when_then_list ::= when_then_list when_then_expr", - /* 510 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 511 */ "case_when_else_opt ::=", - /* 512 */ "case_when_else_opt ::= ELSE common_expression", - /* 513 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 514 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 515 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 516 */ "predicate ::= expr_or_subquery IS NULL", - /* 517 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 518 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 519 */ "compare_op ::= NK_LT", - /* 520 */ "compare_op ::= NK_GT", - /* 521 */ "compare_op ::= NK_LE", - /* 522 */ "compare_op ::= NK_GE", - /* 523 */ "compare_op ::= NK_NE", - /* 524 */ "compare_op ::= NK_EQ", - /* 525 */ "compare_op ::= LIKE", - /* 526 */ "compare_op ::= NOT LIKE", - /* 527 */ "compare_op ::= MATCH", - /* 528 */ "compare_op ::= NMATCH", - /* 529 */ "compare_op ::= CONTAINS", - /* 530 */ "in_op ::= IN", - /* 531 */ "in_op ::= NOT IN", - /* 532 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 533 */ "boolean_value_expression ::= boolean_primary", - /* 534 */ "boolean_value_expression ::= NOT boolean_primary", - /* 535 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 536 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 537 */ "boolean_primary ::= predicate", - /* 538 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 539 */ "common_expression ::= expr_or_subquery", - /* 540 */ "common_expression ::= boolean_value_expression", - /* 541 */ "from_clause_opt ::=", - /* 542 */ "from_clause_opt ::= FROM table_reference_list", - /* 543 */ "table_reference_list ::= table_reference", - /* 544 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 545 */ "table_reference ::= table_primary", - /* 546 */ "table_reference ::= joined_table", - /* 547 */ "table_primary ::= table_name alias_opt", - /* 548 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 549 */ "table_primary ::= subquery alias_opt", - /* 550 */ "table_primary ::= parenthesized_joined_table", - /* 551 */ "alias_opt ::=", - /* 552 */ "alias_opt ::= table_alias", - /* 553 */ "alias_opt ::= AS table_alias", - /* 554 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 555 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 556 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 557 */ "join_type ::=", - /* 558 */ "join_type ::= INNER", - /* 559 */ "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", - /* 560 */ "hint_list ::=", - /* 561 */ "hint_list ::= NK_HINT", - /* 562 */ "tag_mode_opt ::=", - /* 563 */ "tag_mode_opt ::= TAGS", - /* 564 */ "set_quantifier_opt ::=", - /* 565 */ "set_quantifier_opt ::= DISTINCT", - /* 566 */ "set_quantifier_opt ::= ALL", - /* 567 */ "select_list ::= select_item", - /* 568 */ "select_list ::= select_list NK_COMMA select_item", - /* 569 */ "select_item ::= NK_STAR", - /* 570 */ "select_item ::= common_expression", - /* 571 */ "select_item ::= common_expression column_alias", - /* 572 */ "select_item ::= common_expression AS column_alias", - /* 573 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 574 */ "where_clause_opt ::=", - /* 575 */ "where_clause_opt ::= WHERE search_condition", - /* 576 */ "partition_by_clause_opt ::=", - /* 577 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 578 */ "partition_list ::= partition_item", - /* 579 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 580 */ "partition_item ::= expr_or_subquery", - /* 581 */ "partition_item ::= expr_or_subquery column_alias", - /* 582 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 583 */ "twindow_clause_opt ::=", - /* 584 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", - /* 585 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 586 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 587 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 588 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 589 */ "sliding_opt ::=", - /* 590 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", - /* 591 */ "interval_sliding_duration_literal ::= NK_VARIABLE", - /* 592 */ "interval_sliding_duration_literal ::= NK_STRING", - /* 593 */ "interval_sliding_duration_literal ::= NK_INTEGER", - /* 594 */ "fill_opt ::=", - /* 595 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 596 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", - /* 597 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", - /* 598 */ "fill_mode ::= NONE", - /* 599 */ "fill_mode ::= PREV", - /* 600 */ "fill_mode ::= NULL", - /* 601 */ "fill_mode ::= NULL_F", - /* 602 */ "fill_mode ::= LINEAR", - /* 603 */ "fill_mode ::= NEXT", - /* 604 */ "group_by_clause_opt ::=", - /* 605 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 606 */ "group_by_list ::= expr_or_subquery", - /* 607 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 608 */ "having_clause_opt ::=", - /* 609 */ "having_clause_opt ::= HAVING search_condition", - /* 610 */ "range_opt ::=", - /* 611 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 612 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", - /* 613 */ "every_opt ::=", - /* 614 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 615 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 616 */ "query_simple ::= query_specification", - /* 617 */ "query_simple ::= union_query_expression", - /* 618 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 619 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 620 */ "query_simple_or_subquery ::= query_simple", - /* 621 */ "query_simple_or_subquery ::= subquery", - /* 622 */ "query_or_subquery ::= query_expression", - /* 623 */ "query_or_subquery ::= subquery", - /* 624 */ "order_by_clause_opt ::=", - /* 625 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 626 */ "slimit_clause_opt ::=", - /* 627 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 628 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 629 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 630 */ "limit_clause_opt ::=", - /* 631 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 632 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 633 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 634 */ "subquery ::= NK_LP query_expression NK_RP", - /* 635 */ "subquery ::= NK_LP subquery NK_RP", - /* 636 */ "search_condition ::= common_expression", - /* 637 */ "sort_specification_list ::= sort_specification", - /* 638 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 639 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 640 */ "ordering_specification_opt ::=", - /* 641 */ "ordering_specification_opt ::= ASC", - /* 642 */ "ordering_specification_opt ::= DESC", - /* 643 */ "null_ordering_opt ::=", - /* 644 */ "null_ordering_opt ::= NULLS FIRST", - /* 645 */ "null_ordering_opt ::= NULLS LAST", + /* 264 */ "cmd ::= SHOW CLUSTER MACHINES", + /* 265 */ "cmd ::= SHOW CREATE DATABASE db_name", + /* 266 */ "cmd ::= SHOW CREATE TABLE full_table_name", + /* 267 */ "cmd ::= SHOW CREATE STABLE full_table_name", + /* 268 */ "cmd ::= SHOW QUERIES", + /* 269 */ "cmd ::= SHOW SCORES", + /* 270 */ "cmd ::= SHOW TOPICS", + /* 271 */ "cmd ::= SHOW VARIABLES", + /* 272 */ "cmd ::= SHOW CLUSTER VARIABLES", + /* 273 */ "cmd ::= SHOW LOCAL VARIABLES", + /* 274 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", + /* 275 */ "cmd ::= SHOW BNODES", + /* 276 */ "cmd ::= SHOW SNODES", + /* 277 */ "cmd ::= SHOW CLUSTER", + /* 278 */ "cmd ::= SHOW TRANSACTIONS", + /* 279 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", + /* 280 */ "cmd ::= SHOW CONSUMERS", + /* 281 */ "cmd ::= SHOW SUBSCRIPTIONS", + /* 282 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", + /* 283 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", + /* 284 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", + /* 285 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", + /* 286 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", + /* 287 */ "cmd ::= SHOW VNODES", + /* 288 */ "cmd ::= SHOW db_name_cond_opt ALIVE", + /* 289 */ "cmd ::= SHOW CLUSTER ALIVE", + /* 290 */ "cmd ::= SHOW db_name_cond_opt VIEWS", + /* 291 */ "cmd ::= SHOW CREATE VIEW full_table_name", + /* 292 */ "cmd ::= SHOW COMPACTS", + /* 293 */ "cmd ::= SHOW COMPACT NK_INTEGER", + /* 294 */ "table_kind_db_name_cond_opt ::=", + /* 295 */ "table_kind_db_name_cond_opt ::= table_kind", + /* 296 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", + /* 297 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", + /* 298 */ "table_kind ::= NORMAL", + /* 299 */ "table_kind ::= CHILD", + /* 300 */ "db_name_cond_opt ::=", + /* 301 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 302 */ "like_pattern_opt ::=", + /* 303 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 304 */ "table_name_cond ::= table_name", + /* 305 */ "from_db_opt ::=", + /* 306 */ "from_db_opt ::= FROM db_name", + /* 307 */ "tag_list_opt ::=", + /* 308 */ "tag_list_opt ::= tag_item", + /* 309 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", + /* 310 */ "tag_item ::= TBNAME", + /* 311 */ "tag_item ::= QTAGS", + /* 312 */ "tag_item ::= column_name", + /* 313 */ "tag_item ::= column_name column_alias", + /* 314 */ "tag_item ::= column_name AS column_alias", + /* 315 */ "db_kind_opt ::=", + /* 316 */ "db_kind_opt ::= USER", + /* 317 */ "db_kind_opt ::= SYSTEM", + /* 318 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", + /* 319 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", + /* 320 */ "cmd ::= DROP INDEX exists_opt full_index_name", + /* 321 */ "full_index_name ::= index_name", + /* 322 */ "full_index_name ::= db_name NK_DOT index_name", + /* 323 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", + /* 324 */ "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", + /* 325 */ "func_list ::= func", + /* 326 */ "func_list ::= func_list NK_COMMA func", + /* 327 */ "func ::= sma_func_name NK_LP expression_list NK_RP", + /* 328 */ "sma_func_name ::= function_name", + /* 329 */ "sma_func_name ::= COUNT", + /* 330 */ "sma_func_name ::= FIRST", + /* 331 */ "sma_func_name ::= LAST", + /* 332 */ "sma_func_name ::= LAST_ROW", + /* 333 */ "sma_stream_opt ::=", + /* 334 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", + /* 335 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", + /* 336 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", + /* 337 */ "with_meta ::= AS", + /* 338 */ "with_meta ::= WITH META AS", + /* 339 */ "with_meta ::= ONLY META AS", + /* 340 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", + /* 341 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", + /* 342 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", + /* 343 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 344 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 345 */ "cmd ::= DESC full_table_name", + /* 346 */ "cmd ::= DESCRIBE full_table_name", + /* 347 */ "cmd ::= RESET QUERY CACHE", + /* 348 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", + /* 349 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", + /* 350 */ "analyze_opt ::=", + /* 351 */ "analyze_opt ::= ANALYZE", + /* 352 */ "explain_options ::=", + /* 353 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 354 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 355 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", + /* 356 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 357 */ "agg_func_opt ::=", + /* 358 */ "agg_func_opt ::= AGGREGATE", + /* 359 */ "bufsize_opt ::=", + /* 360 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 361 */ "language_opt ::=", + /* 362 */ "language_opt ::= LANGUAGE NK_STRING", + /* 363 */ "or_replace_opt ::=", + /* 364 */ "or_replace_opt ::= OR REPLACE", + /* 365 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", + /* 366 */ "cmd ::= DROP VIEW exists_opt full_view_name", + /* 367 */ "full_view_name ::= view_name", + /* 368 */ "full_view_name ::= db_name NK_DOT view_name", + /* 369 */ "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", + /* 370 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 371 */ "cmd ::= PAUSE STREAM exists_opt stream_name", + /* 372 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", + /* 373 */ "col_list_opt ::=", + /* 374 */ "col_list_opt ::= NK_LP col_name_list NK_RP", + /* 375 */ "tag_def_or_ref_opt ::=", + /* 376 */ "tag_def_or_ref_opt ::= tags_def", + /* 377 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP", + /* 378 */ "stream_options ::=", + /* 379 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 380 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 381 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 382 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 383 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", + /* 384 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", + /* 385 */ "stream_options ::= stream_options DELETE_MARK duration_literal", + /* 386 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", + /* 387 */ "subtable_opt ::=", + /* 388 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 389 */ "ignore_opt ::=", + /* 390 */ "ignore_opt ::= IGNORE UNTREATED", + /* 391 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 392 */ "cmd ::= KILL QUERY NK_STRING", + /* 393 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 394 */ "cmd ::= KILL COMPACT NK_INTEGER", + /* 395 */ "cmd ::= BALANCE VGROUP", + /* 396 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", + /* 397 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 398 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 399 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 400 */ "on_vgroup_id ::=", + /* 401 */ "on_vgroup_id ::= ON NK_INTEGER", + /* 402 */ "dnode_list ::= DNODE NK_INTEGER", + /* 403 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 404 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 405 */ "cmd ::= query_or_subquery", + /* 406 */ "cmd ::= insert_query", + /* 407 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 408 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", + /* 409 */ "literal ::= NK_INTEGER", + /* 410 */ "literal ::= NK_FLOAT", + /* 411 */ "literal ::= NK_STRING", + /* 412 */ "literal ::= NK_BOOL", + /* 413 */ "literal ::= TIMESTAMP NK_STRING", + /* 414 */ "literal ::= duration_literal", + /* 415 */ "literal ::= NULL", + /* 416 */ "literal ::= NK_QUESTION", + /* 417 */ "duration_literal ::= NK_VARIABLE", + /* 418 */ "signed ::= NK_INTEGER", + /* 419 */ "signed ::= NK_PLUS NK_INTEGER", + /* 420 */ "signed ::= NK_MINUS NK_INTEGER", + /* 421 */ "signed ::= NK_FLOAT", + /* 422 */ "signed ::= NK_PLUS NK_FLOAT", + /* 423 */ "signed ::= NK_MINUS NK_FLOAT", + /* 424 */ "signed_literal ::= signed", + /* 425 */ "signed_literal ::= NK_STRING", + /* 426 */ "signed_literal ::= NK_BOOL", + /* 427 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 428 */ "signed_literal ::= duration_literal", + /* 429 */ "signed_literal ::= NULL", + /* 430 */ "signed_literal ::= literal_func", + /* 431 */ "signed_literal ::= NK_QUESTION", + /* 432 */ "literal_list ::= signed_literal", + /* 433 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 434 */ "db_name ::= NK_ID", + /* 435 */ "table_name ::= NK_ID", + /* 436 */ "column_name ::= NK_ID", + /* 437 */ "function_name ::= NK_ID", + /* 438 */ "view_name ::= NK_ID", + /* 439 */ "table_alias ::= NK_ID", + /* 440 */ "column_alias ::= NK_ID", + /* 441 */ "column_alias ::= NK_ALIAS", + /* 442 */ "user_name ::= NK_ID", + /* 443 */ "topic_name ::= NK_ID", + /* 444 */ "stream_name ::= NK_ID", + /* 445 */ "cgroup_name ::= NK_ID", + /* 446 */ "index_name ::= NK_ID", + /* 447 */ "expr_or_subquery ::= expression", + /* 448 */ "expression ::= literal", + /* 449 */ "expression ::= pseudo_column", + /* 450 */ "expression ::= column_reference", + /* 451 */ "expression ::= function_expression", + /* 452 */ "expression ::= case_when_expression", + /* 453 */ "expression ::= NK_LP expression NK_RP", + /* 454 */ "expression ::= NK_PLUS expr_or_subquery", + /* 455 */ "expression ::= NK_MINUS expr_or_subquery", + /* 456 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 457 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 458 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 459 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 460 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 461 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 462 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 463 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 464 */ "expression_list ::= expr_or_subquery", + /* 465 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 466 */ "column_reference ::= column_name", + /* 467 */ "column_reference ::= table_name NK_DOT column_name", + /* 468 */ "column_reference ::= NK_ALIAS", + /* 469 */ "column_reference ::= table_name NK_DOT NK_ALIAS", + /* 470 */ "pseudo_column ::= ROWTS", + /* 471 */ "pseudo_column ::= TBNAME", + /* 472 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 473 */ "pseudo_column ::= QSTART", + /* 474 */ "pseudo_column ::= QEND", + /* 475 */ "pseudo_column ::= QDURATION", + /* 476 */ "pseudo_column ::= WSTART", + /* 477 */ "pseudo_column ::= WEND", + /* 478 */ "pseudo_column ::= WDURATION", + /* 479 */ "pseudo_column ::= IROWTS", + /* 480 */ "pseudo_column ::= ISFILLED", + /* 481 */ "pseudo_column ::= QTAGS", + /* 482 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 483 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 484 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 485 */ "function_expression ::= literal_func", + /* 486 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 487 */ "literal_func ::= NOW", + /* 488 */ "noarg_func ::= NOW", + /* 489 */ "noarg_func ::= TODAY", + /* 490 */ "noarg_func ::= TIMEZONE", + /* 491 */ "noarg_func ::= DATABASE", + /* 492 */ "noarg_func ::= CLIENT_VERSION", + /* 493 */ "noarg_func ::= SERVER_VERSION", + /* 494 */ "noarg_func ::= SERVER_STATUS", + /* 495 */ "noarg_func ::= CURRENT_USER", + /* 496 */ "noarg_func ::= USER", + /* 497 */ "star_func ::= COUNT", + /* 498 */ "star_func ::= FIRST", + /* 499 */ "star_func ::= LAST", + /* 500 */ "star_func ::= LAST_ROW", + /* 501 */ "star_func_para_list ::= NK_STAR", + /* 502 */ "star_func_para_list ::= other_para_list", + /* 503 */ "other_para_list ::= star_func_para", + /* 504 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 505 */ "star_func_para ::= expr_or_subquery", + /* 506 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 507 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 508 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 509 */ "when_then_list ::= when_then_expr", + /* 510 */ "when_then_list ::= when_then_list when_then_expr", + /* 511 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 512 */ "case_when_else_opt ::=", + /* 513 */ "case_when_else_opt ::= ELSE common_expression", + /* 514 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 515 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 516 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 517 */ "predicate ::= expr_or_subquery IS NULL", + /* 518 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 519 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 520 */ "compare_op ::= NK_LT", + /* 521 */ "compare_op ::= NK_GT", + /* 522 */ "compare_op ::= NK_LE", + /* 523 */ "compare_op ::= NK_GE", + /* 524 */ "compare_op ::= NK_NE", + /* 525 */ "compare_op ::= NK_EQ", + /* 526 */ "compare_op ::= LIKE", + /* 527 */ "compare_op ::= NOT LIKE", + /* 528 */ "compare_op ::= MATCH", + /* 529 */ "compare_op ::= NMATCH", + /* 530 */ "compare_op ::= CONTAINS", + /* 531 */ "in_op ::= IN", + /* 532 */ "in_op ::= NOT IN", + /* 533 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 534 */ "boolean_value_expression ::= boolean_primary", + /* 535 */ "boolean_value_expression ::= NOT boolean_primary", + /* 536 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 537 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 538 */ "boolean_primary ::= predicate", + /* 539 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 540 */ "common_expression ::= expr_or_subquery", + /* 541 */ "common_expression ::= boolean_value_expression", + /* 542 */ "from_clause_opt ::=", + /* 543 */ "from_clause_opt ::= FROM table_reference_list", + /* 544 */ "table_reference_list ::= table_reference", + /* 545 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 546 */ "table_reference ::= table_primary", + /* 547 */ "table_reference ::= joined_table", + /* 548 */ "table_primary ::= table_name alias_opt", + /* 549 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 550 */ "table_primary ::= subquery alias_opt", + /* 551 */ "table_primary ::= parenthesized_joined_table", + /* 552 */ "alias_opt ::=", + /* 553 */ "alias_opt ::= table_alias", + /* 554 */ "alias_opt ::= AS table_alias", + /* 555 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 556 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 557 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 558 */ "join_type ::=", + /* 559 */ "join_type ::= INNER", + /* 560 */ "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", + /* 561 */ "hint_list ::=", + /* 562 */ "hint_list ::= NK_HINT", + /* 563 */ "tag_mode_opt ::=", + /* 564 */ "tag_mode_opt ::= TAGS", + /* 565 */ "set_quantifier_opt ::=", + /* 566 */ "set_quantifier_opt ::= DISTINCT", + /* 567 */ "set_quantifier_opt ::= ALL", + /* 568 */ "select_list ::= select_item", + /* 569 */ "select_list ::= select_list NK_COMMA select_item", + /* 570 */ "select_item ::= NK_STAR", + /* 571 */ "select_item ::= common_expression", + /* 572 */ "select_item ::= common_expression column_alias", + /* 573 */ "select_item ::= common_expression AS column_alias", + /* 574 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 575 */ "where_clause_opt ::=", + /* 576 */ "where_clause_opt ::= WHERE search_condition", + /* 577 */ "partition_by_clause_opt ::=", + /* 578 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 579 */ "partition_list ::= partition_item", + /* 580 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 581 */ "partition_item ::= expr_or_subquery", + /* 582 */ "partition_item ::= expr_or_subquery column_alias", + /* 583 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 584 */ "twindow_clause_opt ::=", + /* 585 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", + /* 586 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 587 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 588 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 589 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 590 */ "sliding_opt ::=", + /* 591 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", + /* 592 */ "interval_sliding_duration_literal ::= NK_VARIABLE", + /* 593 */ "interval_sliding_duration_literal ::= NK_STRING", + /* 594 */ "interval_sliding_duration_literal ::= NK_INTEGER", + /* 595 */ "fill_opt ::=", + /* 596 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 597 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", + /* 598 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", + /* 599 */ "fill_mode ::= NONE", + /* 600 */ "fill_mode ::= PREV", + /* 601 */ "fill_mode ::= NULL", + /* 602 */ "fill_mode ::= NULL_F", + /* 603 */ "fill_mode ::= LINEAR", + /* 604 */ "fill_mode ::= NEXT", + /* 605 */ "group_by_clause_opt ::=", + /* 606 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 607 */ "group_by_list ::= expr_or_subquery", + /* 608 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 609 */ "having_clause_opt ::=", + /* 610 */ "having_clause_opt ::= HAVING search_condition", + /* 611 */ "range_opt ::=", + /* 612 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 613 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", + /* 614 */ "every_opt ::=", + /* 615 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 616 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 617 */ "query_simple ::= query_specification", + /* 618 */ "query_simple ::= union_query_expression", + /* 619 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 620 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 621 */ "query_simple_or_subquery ::= query_simple", + /* 622 */ "query_simple_or_subquery ::= subquery", + /* 623 */ "query_or_subquery ::= query_expression", + /* 624 */ "query_or_subquery ::= subquery", + /* 625 */ "order_by_clause_opt ::=", + /* 626 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 627 */ "slimit_clause_opt ::=", + /* 628 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 629 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 630 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 631 */ "limit_clause_opt ::=", + /* 632 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 633 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 634 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 635 */ "subquery ::= NK_LP query_expression NK_RP", + /* 636 */ "subquery ::= NK_LP subquery NK_RP", + /* 637 */ "search_condition ::= common_expression", + /* 638 */ "sort_specification_list ::= sort_specification", + /* 639 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 640 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 641 */ "ordering_specification_opt ::=", + /* 642 */ "ordering_specification_opt ::= ASC", + /* 643 */ "ordering_specification_opt ::= DESC", + /* 644 */ "null_ordering_opt ::=", + /* 645 */ "null_ordering_opt ::= NULLS FIRST", + /* 646 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -2847,231 +2840,231 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 349: /* cmd */ - case 352: /* literal */ - case 361: /* with_opt */ - case 367: /* search_condition */ - case 372: /* db_options */ - case 374: /* alter_db_options */ - case 376: /* start_opt */ - case 377: /* end_opt */ - case 381: /* signed */ - case 383: /* retention */ - case 384: /* full_table_name */ - case 387: /* table_options */ - case 391: /* alter_table_clause */ - case 392: /* alter_table_options */ - case 395: /* signed_literal */ - case 396: /* create_subtable_clause */ - case 399: /* drop_table_clause */ - case 401: /* column_def */ - case 405: /* duration_literal */ - case 406: /* rollup_func_name */ - case 408: /* col_name */ - case 411: /* like_pattern_opt */ - case 412: /* db_name_cond_opt */ - case 413: /* table_name_cond */ - case 414: /* from_db_opt */ - case 417: /* tag_item */ - case 419: /* index_options */ - case 420: /* full_index_name */ - case 423: /* sliding_opt */ - case 424: /* sma_stream_opt */ - case 425: /* func */ - case 428: /* query_or_subquery */ - case 429: /* where_clause_opt */ - case 432: /* explain_options */ - case 433: /* insert_query */ - case 438: /* full_view_name */ - case 441: /* stream_options */ - case 444: /* subtable_opt */ - case 446: /* expression */ - case 449: /* literal_func */ - case 452: /* expr_or_subquery */ - case 453: /* pseudo_column */ - case 454: /* column_reference */ - case 455: /* function_expression */ - case 456: /* case_when_expression */ - case 461: /* star_func_para */ - case 463: /* case_when_else_opt */ - case 464: /* common_expression */ - case 465: /* when_then_expr */ - case 466: /* predicate */ - case 469: /* in_predicate_value */ - case 470: /* boolean_value_expression */ - case 471: /* boolean_primary */ - case 472: /* from_clause_opt */ - case 473: /* table_reference_list */ - case 474: /* table_reference */ - case 475: /* table_primary */ - case 476: /* joined_table */ - case 478: /* subquery */ - case 479: /* parenthesized_joined_table */ - case 481: /* query_specification */ - case 487: /* range_opt */ - case 488: /* every_opt */ - case 489: /* fill_opt */ - case 490: /* twindow_clause_opt */ - case 492: /* having_clause_opt */ - case 493: /* select_item */ - case 495: /* partition_item */ - case 496: /* interval_sliding_duration_literal */ - case 499: /* query_expression */ - case 500: /* query_simple */ - case 502: /* slimit_clause_opt */ - case 503: /* limit_clause_opt */ - case 504: /* union_query_expression */ - case 505: /* query_simple_or_subquery */ - case 507: /* sort_specification */ + case 350: /* cmd */ + case 353: /* literal */ + case 362: /* with_opt */ + case 368: /* search_condition */ + case 373: /* db_options */ + case 375: /* alter_db_options */ + case 377: /* start_opt */ + case 378: /* end_opt */ + case 382: /* signed */ + case 384: /* retention */ + case 385: /* full_table_name */ + case 388: /* table_options */ + case 392: /* alter_table_clause */ + case 393: /* alter_table_options */ + case 396: /* signed_literal */ + case 397: /* create_subtable_clause */ + case 400: /* drop_table_clause */ + case 402: /* column_def */ + case 406: /* duration_literal */ + case 407: /* rollup_func_name */ + case 409: /* col_name */ + case 412: /* like_pattern_opt */ + case 413: /* db_name_cond_opt */ + case 414: /* table_name_cond */ + case 415: /* from_db_opt */ + case 418: /* tag_item */ + case 420: /* index_options */ + case 421: /* full_index_name */ + case 424: /* sliding_opt */ + case 425: /* sma_stream_opt */ + case 426: /* func */ + case 429: /* query_or_subquery */ + case 430: /* where_clause_opt */ + case 433: /* explain_options */ + case 434: /* insert_query */ + case 439: /* full_view_name */ + case 442: /* stream_options */ + case 445: /* subtable_opt */ + case 447: /* expression */ + case 450: /* literal_func */ + case 453: /* expr_or_subquery */ + case 454: /* pseudo_column */ + case 455: /* column_reference */ + case 456: /* function_expression */ + case 457: /* case_when_expression */ + case 462: /* star_func_para */ + case 464: /* case_when_else_opt */ + case 465: /* common_expression */ + case 466: /* when_then_expr */ + case 467: /* predicate */ + case 470: /* in_predicate_value */ + case 471: /* boolean_value_expression */ + case 472: /* boolean_primary */ + case 473: /* from_clause_opt */ + case 474: /* table_reference_list */ + case 475: /* table_reference */ + case 476: /* table_primary */ + case 477: /* joined_table */ + case 479: /* subquery */ + case 480: /* parenthesized_joined_table */ + case 482: /* query_specification */ + case 488: /* range_opt */ + case 489: /* every_opt */ + case 490: /* fill_opt */ + case 491: /* twindow_clause_opt */ + case 493: /* having_clause_opt */ + case 494: /* select_item */ + case 496: /* partition_item */ + case 497: /* interval_sliding_duration_literal */ + case 500: /* query_expression */ + case 501: /* query_simple */ + case 503: /* slimit_clause_opt */ + case 504: /* limit_clause_opt */ + case 505: /* union_query_expression */ + case 506: /* query_simple_or_subquery */ + case 508: /* sort_specification */ { - nodesDestroyNode((yypminor->yy992)); + nodesDestroyNode((yypminor->yy490)); } break; - case 350: /* account_options */ - case 351: /* alter_account_options */ - case 353: /* alter_account_option */ - case 375: /* speed_opt */ - case 427: /* with_meta */ - case 436: /* bufsize_opt */ + case 351: /* account_options */ + case 352: /* alter_account_options */ + case 354: /* alter_account_option */ + case 376: /* speed_opt */ + case 428: /* with_meta */ + case 437: /* bufsize_opt */ { } break; - case 354: /* ip_range_list */ - case 355: /* white_list */ - case 356: /* white_list_opt */ - case 378: /* integer_list */ - case 379: /* variable_list */ - case 380: /* retention_list */ - case 385: /* column_def_list */ - case 386: /* tags_def_opt */ - case 388: /* multi_create_clause */ - case 389: /* tags_def */ - case 390: /* multi_drop_clause */ - case 397: /* specific_cols_opt */ - case 398: /* expression_list */ - case 400: /* col_name_list */ - case 402: /* duration_list */ - case 403: /* rollup_func_list */ - case 415: /* tag_list_opt */ - case 422: /* func_list */ - case 442: /* col_list_opt */ - case 443: /* tag_def_or_ref_opt */ - case 448: /* dnode_list */ - case 450: /* literal_list */ - case 458: /* star_func_para_list */ - case 460: /* other_para_list */ - case 462: /* when_then_list */ - case 482: /* hint_list */ - case 485: /* select_list */ - case 486: /* partition_by_clause_opt */ - case 491: /* group_by_clause_opt */ - case 494: /* partition_list */ - case 498: /* group_by_list */ - case 501: /* order_by_clause_opt */ - case 506: /* sort_specification_list */ + case 355: /* ip_range_list */ + case 356: /* white_list */ + case 357: /* white_list_opt */ + case 379: /* integer_list */ + case 380: /* variable_list */ + case 381: /* retention_list */ + case 386: /* column_def_list */ + case 387: /* tags_def_opt */ + case 389: /* multi_create_clause */ + case 390: /* tags_def */ + case 391: /* multi_drop_clause */ + case 398: /* specific_cols_opt */ + case 399: /* expression_list */ + case 401: /* col_name_list */ + case 403: /* duration_list */ + case 404: /* rollup_func_list */ + case 416: /* tag_list_opt */ + case 423: /* func_list */ + case 443: /* col_list_opt */ + case 444: /* tag_def_or_ref_opt */ + case 449: /* dnode_list */ + case 451: /* literal_list */ + case 459: /* star_func_para_list */ + case 461: /* other_para_list */ + case 463: /* when_then_list */ + case 483: /* hint_list */ + case 486: /* select_list */ + case 487: /* partition_by_clause_opt */ + case 492: /* group_by_clause_opt */ + case 495: /* partition_list */ + case 499: /* group_by_list */ + case 502: /* order_by_clause_opt */ + case 507: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy364)); + nodesDestroyList((yypminor->yy502)); } break; - case 357: /* user_name */ - case 364: /* db_name */ - case 365: /* table_name */ - case 366: /* topic_name */ - case 368: /* dnode_endpoint */ - case 393: /* column_name */ - case 407: /* function_name */ - case 418: /* column_alias */ - case 421: /* index_name */ - case 426: /* sma_func_name */ - case 430: /* cgroup_name */ - case 437: /* language_opt */ - case 439: /* view_name */ - case 440: /* stream_name */ - case 447: /* on_vgroup_id */ - case 451: /* table_alias */ - case 457: /* star_func */ - case 459: /* noarg_func */ - case 477: /* alias_opt */ + case 358: /* user_name */ + case 365: /* db_name */ + case 366: /* table_name */ + case 367: /* topic_name */ + case 369: /* dnode_endpoint */ + case 394: /* column_name */ + case 408: /* function_name */ + case 419: /* column_alias */ + case 422: /* index_name */ + case 427: /* sma_func_name */ + case 431: /* cgroup_name */ + case 438: /* language_opt */ + case 440: /* view_name */ + case 441: /* stream_name */ + case 448: /* on_vgroup_id */ + case 452: /* table_alias */ + case 458: /* star_func */ + case 460: /* noarg_func */ + case 478: /* alias_opt */ { } break; - case 358: /* sysinfo_opt */ + case 359: /* sysinfo_opt */ { } break; - case 359: /* privileges */ - case 362: /* priv_type_list */ - case 363: /* priv_type */ + case 360: /* privileges */ + case 363: /* priv_type_list */ + case 364: /* priv_type */ { } break; - case 360: /* priv_level */ + case 361: /* priv_level */ { } break; - case 369: /* force_opt */ - case 370: /* unsafe_opt */ - case 371: /* not_exists_opt */ - case 373: /* exists_opt */ - case 431: /* analyze_opt */ - case 434: /* or_replace_opt */ - case 435: /* agg_func_opt */ - case 445: /* ignore_opt */ - case 483: /* set_quantifier_opt */ - case 484: /* tag_mode_opt */ + case 370: /* force_opt */ + case 371: /* unsafe_opt */ + case 372: /* not_exists_opt */ + case 374: /* exists_opt */ + case 432: /* analyze_opt */ + case 435: /* or_replace_opt */ + case 436: /* agg_func_opt */ + case 446: /* ignore_opt */ + case 484: /* set_quantifier_opt */ + case 485: /* tag_mode_opt */ { } break; - case 382: /* alter_db_option */ - case 404: /* alter_table_option */ + case 383: /* alter_db_option */ + case 405: /* alter_table_option */ { } break; - case 394: /* type_name */ + case 395: /* type_name */ { } break; - case 409: /* db_kind_opt */ - case 416: /* table_kind */ + case 410: /* db_kind_opt */ + case 417: /* table_kind */ { } break; - case 410: /* table_kind_db_name_cond_opt */ + case 411: /* table_kind_db_name_cond_opt */ { } break; - case 467: /* compare_op */ - case 468: /* in_op */ + case 468: /* compare_op */ + case 469: /* in_op */ { } break; - case 480: /* join_type */ + case 481: /* join_type */ { } break; - case 497: /* fill_mode */ + case 498: /* fill_mode */ { } break; - case 508: /* ordering_specification_opt */ + case 509: /* ordering_specification_opt */ { } break; - case 509: /* null_ordering_opt */ + case 510: /* null_ordering_opt */ { } @@ -3362,652 +3355,653 @@ static void yy_shift( /* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side ** of that rule */ static const YYCODETYPE yyRuleInfoLhs[] = { - 349, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - 349, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - 350, /* (2) account_options ::= */ - 350, /* (3) account_options ::= account_options PPS literal */ - 350, /* (4) account_options ::= account_options TSERIES literal */ - 350, /* (5) account_options ::= account_options STORAGE literal */ - 350, /* (6) account_options ::= account_options STREAMS literal */ - 350, /* (7) account_options ::= account_options QTIME literal */ - 350, /* (8) account_options ::= account_options DBS literal */ - 350, /* (9) account_options ::= account_options USERS literal */ - 350, /* (10) account_options ::= account_options CONNS literal */ - 350, /* (11) account_options ::= account_options STATE literal */ - 351, /* (12) alter_account_options ::= alter_account_option */ - 351, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - 353, /* (14) alter_account_option ::= PASS literal */ - 353, /* (15) alter_account_option ::= PPS literal */ - 353, /* (16) alter_account_option ::= TSERIES literal */ - 353, /* (17) alter_account_option ::= STORAGE literal */ - 353, /* (18) alter_account_option ::= STREAMS literal */ - 353, /* (19) alter_account_option ::= QTIME literal */ - 353, /* (20) alter_account_option ::= DBS literal */ - 353, /* (21) alter_account_option ::= USERS literal */ - 353, /* (22) alter_account_option ::= CONNS literal */ - 353, /* (23) alter_account_option ::= STATE literal */ - 354, /* (24) ip_range_list ::= NK_STRING */ - 354, /* (25) ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ - 355, /* (26) white_list ::= HOST ip_range_list */ - 356, /* (27) white_list_opt ::= */ - 356, /* (28) white_list_opt ::= white_list */ - 349, /* (29) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ - 349, /* (30) cmd ::= ALTER USER user_name PASS NK_STRING */ - 349, /* (31) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ - 349, /* (32) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ - 349, /* (33) cmd ::= ALTER USER user_name ADD white_list */ - 349, /* (34) cmd ::= ALTER USER user_name DROP white_list */ - 349, /* (35) cmd ::= DROP USER user_name */ - 358, /* (36) sysinfo_opt ::= */ - 358, /* (37) sysinfo_opt ::= SYSINFO NK_INTEGER */ - 349, /* (38) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ - 349, /* (39) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ - 359, /* (40) privileges ::= ALL */ - 359, /* (41) privileges ::= priv_type_list */ - 359, /* (42) privileges ::= SUBSCRIBE */ - 362, /* (43) priv_type_list ::= priv_type */ - 362, /* (44) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - 363, /* (45) priv_type ::= READ */ - 363, /* (46) priv_type ::= WRITE */ - 363, /* (47) priv_type ::= ALTER */ - 360, /* (48) priv_level ::= NK_STAR NK_DOT NK_STAR */ - 360, /* (49) priv_level ::= db_name NK_DOT NK_STAR */ - 360, /* (50) priv_level ::= db_name NK_DOT table_name */ - 360, /* (51) priv_level ::= topic_name */ - 361, /* (52) with_opt ::= */ - 361, /* (53) with_opt ::= WITH search_condition */ - 349, /* (54) cmd ::= CREATE DNODE dnode_endpoint */ - 349, /* (55) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ - 349, /* (56) cmd ::= DROP DNODE NK_INTEGER force_opt */ - 349, /* (57) cmd ::= DROP DNODE dnode_endpoint force_opt */ - 349, /* (58) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ - 349, /* (59) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ - 349, /* (60) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - 349, /* (61) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - 349, /* (62) cmd ::= ALTER ALL DNODES NK_STRING */ - 349, /* (63) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - 349, /* (64) cmd ::= RESTORE DNODE NK_INTEGER */ - 368, /* (65) dnode_endpoint ::= NK_STRING */ - 368, /* (66) dnode_endpoint ::= NK_ID */ - 368, /* (67) dnode_endpoint ::= NK_IPTOKEN */ - 369, /* (68) force_opt ::= */ - 369, /* (69) force_opt ::= FORCE */ - 370, /* (70) unsafe_opt ::= UNSAFE */ - 349, /* (71) cmd ::= ALTER CLUSTER NK_STRING */ - 349, /* (72) cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ - 349, /* (73) cmd ::= ALTER LOCAL NK_STRING */ - 349, /* (74) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - 349, /* (75) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - 349, /* (76) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - 349, /* (77) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ - 349, /* (78) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - 349, /* (79) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - 349, /* (80) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - 349, /* (81) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - 349, /* (82) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - 349, /* (83) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - 349, /* (84) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ - 349, /* (85) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ - 349, /* (86) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - 349, /* (87) cmd ::= DROP DATABASE exists_opt db_name */ - 349, /* (88) cmd ::= USE db_name */ - 349, /* (89) cmd ::= ALTER DATABASE db_name alter_db_options */ - 349, /* (90) cmd ::= FLUSH DATABASE db_name */ - 349, /* (91) cmd ::= TRIM DATABASE db_name speed_opt */ - 349, /* (92) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ - 371, /* (93) not_exists_opt ::= IF NOT EXISTS */ - 371, /* (94) not_exists_opt ::= */ - 373, /* (95) exists_opt ::= IF EXISTS */ - 373, /* (96) exists_opt ::= */ - 372, /* (97) db_options ::= */ - 372, /* (98) db_options ::= db_options BUFFER NK_INTEGER */ - 372, /* (99) db_options ::= db_options CACHEMODEL NK_STRING */ - 372, /* (100) db_options ::= db_options CACHESIZE NK_INTEGER */ - 372, /* (101) db_options ::= db_options COMP NK_INTEGER */ - 372, /* (102) db_options ::= db_options DURATION NK_INTEGER */ - 372, /* (103) db_options ::= db_options DURATION NK_VARIABLE */ - 372, /* (104) db_options ::= db_options MAXROWS NK_INTEGER */ - 372, /* (105) db_options ::= db_options MINROWS NK_INTEGER */ - 372, /* (106) db_options ::= db_options KEEP integer_list */ - 372, /* (107) db_options ::= db_options KEEP variable_list */ - 372, /* (108) db_options ::= db_options PAGES NK_INTEGER */ - 372, /* (109) db_options ::= db_options PAGESIZE NK_INTEGER */ - 372, /* (110) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - 372, /* (111) db_options ::= db_options PRECISION NK_STRING */ - 372, /* (112) db_options ::= db_options REPLICA NK_INTEGER */ - 372, /* (113) db_options ::= db_options VGROUPS NK_INTEGER */ - 372, /* (114) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - 372, /* (115) db_options ::= db_options RETENTIONS retention_list */ - 372, /* (116) db_options ::= db_options SCHEMALESS NK_INTEGER */ - 372, /* (117) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - 372, /* (118) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - 372, /* (119) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - 372, /* (120) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 372, /* (121) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - 372, /* (122) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 372, /* (123) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - 372, /* (124) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - 372, /* (125) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - 372, /* (126) db_options ::= db_options TABLE_PREFIX signed */ - 372, /* (127) db_options ::= db_options TABLE_SUFFIX signed */ - 372, /* (128) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ - 374, /* (129) alter_db_options ::= alter_db_option */ - 374, /* (130) alter_db_options ::= alter_db_options alter_db_option */ - 382, /* (131) alter_db_option ::= BUFFER NK_INTEGER */ - 382, /* (132) alter_db_option ::= CACHEMODEL NK_STRING */ - 382, /* (133) alter_db_option ::= CACHESIZE NK_INTEGER */ - 382, /* (134) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - 382, /* (135) alter_db_option ::= KEEP integer_list */ - 382, /* (136) alter_db_option ::= KEEP variable_list */ - 382, /* (137) alter_db_option ::= PAGES NK_INTEGER */ - 382, /* (138) alter_db_option ::= REPLICA NK_INTEGER */ - 382, /* (139) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - 382, /* (140) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - 382, /* (141) alter_db_option ::= MINROWS NK_INTEGER */ - 382, /* (142) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ - 382, /* (143) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 382, /* (144) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ - 382, /* (145) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 382, /* (146) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ - 378, /* (147) integer_list ::= NK_INTEGER */ - 378, /* (148) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - 379, /* (149) variable_list ::= NK_VARIABLE */ - 379, /* (150) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - 380, /* (151) retention_list ::= retention */ - 380, /* (152) retention_list ::= retention_list NK_COMMA retention */ - 383, /* (153) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - 383, /* (154) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ - 375, /* (155) speed_opt ::= */ - 375, /* (156) speed_opt ::= BWLIMIT NK_INTEGER */ - 376, /* (157) start_opt ::= */ - 376, /* (158) start_opt ::= START WITH NK_INTEGER */ - 376, /* (159) start_opt ::= START WITH NK_STRING */ - 376, /* (160) start_opt ::= START WITH TIMESTAMP NK_STRING */ - 377, /* (161) end_opt ::= */ - 377, /* (162) end_opt ::= END WITH NK_INTEGER */ - 377, /* (163) end_opt ::= END WITH NK_STRING */ - 377, /* (164) end_opt ::= END WITH TIMESTAMP NK_STRING */ - 349, /* (165) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - 349, /* (166) cmd ::= CREATE TABLE multi_create_clause */ - 349, /* (167) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - 349, /* (168) cmd ::= DROP TABLE multi_drop_clause */ - 349, /* (169) cmd ::= DROP STABLE exists_opt full_table_name */ - 349, /* (170) cmd ::= ALTER TABLE alter_table_clause */ - 349, /* (171) cmd ::= ALTER STABLE alter_table_clause */ - 391, /* (172) alter_table_clause ::= full_table_name alter_table_options */ - 391, /* (173) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - 391, /* (174) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - 391, /* (175) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - 391, /* (176) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - 391, /* (177) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - 391, /* (178) alter_table_clause ::= full_table_name DROP TAG column_name */ - 391, /* (179) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - 391, /* (180) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - 391, /* (181) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - 388, /* (182) multi_create_clause ::= create_subtable_clause */ - 388, /* (183) multi_create_clause ::= multi_create_clause create_subtable_clause */ - 396, /* (184) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ - 390, /* (185) multi_drop_clause ::= drop_table_clause */ - 390, /* (186) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ - 399, /* (187) drop_table_clause ::= exists_opt full_table_name */ - 397, /* (188) specific_cols_opt ::= */ - 397, /* (189) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - 384, /* (190) full_table_name ::= table_name */ - 384, /* (191) full_table_name ::= db_name NK_DOT table_name */ - 385, /* (192) column_def_list ::= column_def */ - 385, /* (193) column_def_list ::= column_def_list NK_COMMA column_def */ - 401, /* (194) column_def ::= column_name type_name */ - 394, /* (195) type_name ::= BOOL */ - 394, /* (196) type_name ::= TINYINT */ - 394, /* (197) type_name ::= SMALLINT */ - 394, /* (198) type_name ::= INT */ - 394, /* (199) type_name ::= INTEGER */ - 394, /* (200) type_name ::= BIGINT */ - 394, /* (201) type_name ::= FLOAT */ - 394, /* (202) type_name ::= DOUBLE */ - 394, /* (203) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - 394, /* (204) type_name ::= TIMESTAMP */ - 394, /* (205) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - 394, /* (206) type_name ::= TINYINT UNSIGNED */ - 394, /* (207) type_name ::= SMALLINT UNSIGNED */ - 394, /* (208) type_name ::= INT UNSIGNED */ - 394, /* (209) type_name ::= BIGINT UNSIGNED */ - 394, /* (210) type_name ::= JSON */ - 394, /* (211) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - 394, /* (212) type_name ::= MEDIUMBLOB */ - 394, /* (213) type_name ::= BLOB */ - 394, /* (214) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - 394, /* (215) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ - 394, /* (216) type_name ::= DECIMAL */ - 394, /* (217) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - 394, /* (218) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 386, /* (219) tags_def_opt ::= */ - 386, /* (220) tags_def_opt ::= tags_def */ - 389, /* (221) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - 387, /* (222) table_options ::= */ - 387, /* (223) table_options ::= table_options COMMENT NK_STRING */ - 387, /* (224) table_options ::= table_options MAX_DELAY duration_list */ - 387, /* (225) table_options ::= table_options WATERMARK duration_list */ - 387, /* (226) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - 387, /* (227) table_options ::= table_options TTL NK_INTEGER */ - 387, /* (228) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - 387, /* (229) table_options ::= table_options DELETE_MARK duration_list */ - 392, /* (230) alter_table_options ::= alter_table_option */ - 392, /* (231) alter_table_options ::= alter_table_options alter_table_option */ - 404, /* (232) alter_table_option ::= COMMENT NK_STRING */ - 404, /* (233) alter_table_option ::= TTL NK_INTEGER */ - 402, /* (234) duration_list ::= duration_literal */ - 402, /* (235) duration_list ::= duration_list NK_COMMA duration_literal */ - 403, /* (236) rollup_func_list ::= rollup_func_name */ - 403, /* (237) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - 406, /* (238) rollup_func_name ::= function_name */ - 406, /* (239) rollup_func_name ::= FIRST */ - 406, /* (240) rollup_func_name ::= LAST */ - 400, /* (241) col_name_list ::= col_name */ - 400, /* (242) col_name_list ::= col_name_list NK_COMMA col_name */ - 408, /* (243) col_name ::= column_name */ - 349, /* (244) cmd ::= SHOW DNODES */ - 349, /* (245) cmd ::= SHOW USERS */ - 349, /* (246) cmd ::= SHOW USER PRIVILEGES */ - 349, /* (247) cmd ::= SHOW db_kind_opt DATABASES */ - 349, /* (248) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ - 349, /* (249) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - 349, /* (250) cmd ::= SHOW db_name_cond_opt VGROUPS */ - 349, /* (251) cmd ::= SHOW MNODES */ - 349, /* (252) cmd ::= SHOW QNODES */ - 349, /* (253) cmd ::= SHOW FUNCTIONS */ - 349, /* (254) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - 349, /* (255) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ - 349, /* (256) cmd ::= SHOW STREAMS */ - 349, /* (257) cmd ::= SHOW ACCOUNTS */ - 349, /* (258) cmd ::= SHOW APPS */ - 349, /* (259) cmd ::= SHOW CONNECTIONS */ - 349, /* (260) cmd ::= SHOW LICENCES */ - 349, /* (261) cmd ::= SHOW GRANTS */ - 349, /* (262) cmd ::= SHOW GRANTS FULL */ - 349, /* (263) cmd ::= SHOW GRANTS LOG */ - 349, /* (264) cmd ::= SHOW CREATE DATABASE db_name */ - 349, /* (265) cmd ::= SHOW CREATE TABLE full_table_name */ - 349, /* (266) cmd ::= SHOW CREATE STABLE full_table_name */ - 349, /* (267) cmd ::= SHOW QUERIES */ - 349, /* (268) cmd ::= SHOW SCORES */ - 349, /* (269) cmd ::= SHOW TOPICS */ - 349, /* (270) cmd ::= SHOW VARIABLES */ - 349, /* (271) cmd ::= SHOW CLUSTER VARIABLES */ - 349, /* (272) cmd ::= SHOW LOCAL VARIABLES */ - 349, /* (273) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - 349, /* (274) cmd ::= SHOW BNODES */ - 349, /* (275) cmd ::= SHOW SNODES */ - 349, /* (276) cmd ::= SHOW CLUSTER */ - 349, /* (277) cmd ::= SHOW TRANSACTIONS */ - 349, /* (278) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - 349, /* (279) cmd ::= SHOW CONSUMERS */ - 349, /* (280) cmd ::= SHOW SUBSCRIPTIONS */ - 349, /* (281) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - 349, /* (282) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ - 349, /* (283) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - 349, /* (284) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ - 349, /* (285) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ - 349, /* (286) cmd ::= SHOW VNODES */ - 349, /* (287) cmd ::= SHOW db_name_cond_opt ALIVE */ - 349, /* (288) cmd ::= SHOW CLUSTER ALIVE */ - 349, /* (289) cmd ::= SHOW db_name_cond_opt VIEWS */ - 349, /* (290) cmd ::= SHOW CREATE VIEW full_table_name */ - 349, /* (291) cmd ::= SHOW COMPACTS */ - 349, /* (292) cmd ::= SHOW COMPACT NK_INTEGER */ - 410, /* (293) table_kind_db_name_cond_opt ::= */ - 410, /* (294) table_kind_db_name_cond_opt ::= table_kind */ - 410, /* (295) table_kind_db_name_cond_opt ::= db_name NK_DOT */ - 410, /* (296) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ - 416, /* (297) table_kind ::= NORMAL */ - 416, /* (298) table_kind ::= CHILD */ - 412, /* (299) db_name_cond_opt ::= */ - 412, /* (300) db_name_cond_opt ::= db_name NK_DOT */ - 411, /* (301) like_pattern_opt ::= */ - 411, /* (302) like_pattern_opt ::= LIKE NK_STRING */ - 413, /* (303) table_name_cond ::= table_name */ - 414, /* (304) from_db_opt ::= */ - 414, /* (305) from_db_opt ::= FROM db_name */ - 415, /* (306) tag_list_opt ::= */ - 415, /* (307) tag_list_opt ::= tag_item */ - 415, /* (308) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - 417, /* (309) tag_item ::= TBNAME */ - 417, /* (310) tag_item ::= QTAGS */ - 417, /* (311) tag_item ::= column_name */ - 417, /* (312) tag_item ::= column_name column_alias */ - 417, /* (313) tag_item ::= column_name AS column_alias */ - 409, /* (314) db_kind_opt ::= */ - 409, /* (315) db_kind_opt ::= USER */ - 409, /* (316) db_kind_opt ::= SYSTEM */ - 349, /* (317) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - 349, /* (318) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - 349, /* (319) cmd ::= DROP INDEX exists_opt full_index_name */ - 420, /* (320) full_index_name ::= index_name */ - 420, /* (321) full_index_name ::= db_name NK_DOT index_name */ - 419, /* (322) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - 419, /* (323) 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 */ - 422, /* (324) func_list ::= func */ - 422, /* (325) func_list ::= func_list NK_COMMA func */ - 425, /* (326) func ::= sma_func_name NK_LP expression_list NK_RP */ - 426, /* (327) sma_func_name ::= function_name */ - 426, /* (328) sma_func_name ::= COUNT */ - 426, /* (329) sma_func_name ::= FIRST */ - 426, /* (330) sma_func_name ::= LAST */ - 426, /* (331) sma_func_name ::= LAST_ROW */ - 424, /* (332) sma_stream_opt ::= */ - 424, /* (333) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - 424, /* (334) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - 424, /* (335) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - 427, /* (336) with_meta ::= AS */ - 427, /* (337) with_meta ::= WITH META AS */ - 427, /* (338) with_meta ::= ONLY META AS */ - 349, /* (339) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - 349, /* (340) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - 349, /* (341) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - 349, /* (342) cmd ::= DROP TOPIC exists_opt topic_name */ - 349, /* (343) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - 349, /* (344) cmd ::= DESC full_table_name */ - 349, /* (345) cmd ::= DESCRIBE full_table_name */ - 349, /* (346) cmd ::= RESET QUERY CACHE */ - 349, /* (347) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - 349, /* (348) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - 431, /* (349) analyze_opt ::= */ - 431, /* (350) analyze_opt ::= ANALYZE */ - 432, /* (351) explain_options ::= */ - 432, /* (352) explain_options ::= explain_options VERBOSE NK_BOOL */ - 432, /* (353) explain_options ::= explain_options RATIO NK_FLOAT */ - 349, /* (354) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ - 349, /* (355) cmd ::= DROP FUNCTION exists_opt function_name */ - 435, /* (356) agg_func_opt ::= */ - 435, /* (357) agg_func_opt ::= AGGREGATE */ - 436, /* (358) bufsize_opt ::= */ - 436, /* (359) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 437, /* (360) language_opt ::= */ - 437, /* (361) language_opt ::= LANGUAGE NK_STRING */ - 434, /* (362) or_replace_opt ::= */ - 434, /* (363) or_replace_opt ::= OR REPLACE */ - 349, /* (364) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - 349, /* (365) cmd ::= DROP VIEW exists_opt full_view_name */ - 438, /* (366) full_view_name ::= view_name */ - 438, /* (367) full_view_name ::= db_name NK_DOT view_name */ - 349, /* (368) 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 */ - 349, /* (369) cmd ::= DROP STREAM exists_opt stream_name */ - 349, /* (370) cmd ::= PAUSE STREAM exists_opt stream_name */ - 349, /* (371) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ - 442, /* (372) col_list_opt ::= */ - 442, /* (373) col_list_opt ::= NK_LP col_name_list NK_RP */ - 443, /* (374) tag_def_or_ref_opt ::= */ - 443, /* (375) tag_def_or_ref_opt ::= tags_def */ - 443, /* (376) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ - 441, /* (377) stream_options ::= */ - 441, /* (378) stream_options ::= stream_options TRIGGER AT_ONCE */ - 441, /* (379) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - 441, /* (380) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - 441, /* (381) stream_options ::= stream_options WATERMARK duration_literal */ - 441, /* (382) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - 441, /* (383) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - 441, /* (384) stream_options ::= stream_options DELETE_MARK duration_literal */ - 441, /* (385) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - 444, /* (386) subtable_opt ::= */ - 444, /* (387) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - 445, /* (388) ignore_opt ::= */ - 445, /* (389) ignore_opt ::= IGNORE UNTREATED */ - 349, /* (390) cmd ::= KILL CONNECTION NK_INTEGER */ - 349, /* (391) cmd ::= KILL QUERY NK_STRING */ - 349, /* (392) cmd ::= KILL TRANSACTION NK_INTEGER */ - 349, /* (393) cmd ::= KILL COMPACT NK_INTEGER */ - 349, /* (394) cmd ::= BALANCE VGROUP */ - 349, /* (395) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - 349, /* (396) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - 349, /* (397) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - 349, /* (398) cmd ::= SPLIT VGROUP NK_INTEGER */ - 447, /* (399) on_vgroup_id ::= */ - 447, /* (400) on_vgroup_id ::= ON NK_INTEGER */ - 448, /* (401) dnode_list ::= DNODE NK_INTEGER */ - 448, /* (402) dnode_list ::= dnode_list DNODE NK_INTEGER */ - 349, /* (403) cmd ::= DELETE FROM full_table_name where_clause_opt */ - 349, /* (404) cmd ::= query_or_subquery */ - 349, /* (405) cmd ::= insert_query */ - 433, /* (406) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - 433, /* (407) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - 352, /* (408) literal ::= NK_INTEGER */ - 352, /* (409) literal ::= NK_FLOAT */ - 352, /* (410) literal ::= NK_STRING */ - 352, /* (411) literal ::= NK_BOOL */ - 352, /* (412) literal ::= TIMESTAMP NK_STRING */ - 352, /* (413) literal ::= duration_literal */ - 352, /* (414) literal ::= NULL */ - 352, /* (415) literal ::= NK_QUESTION */ - 405, /* (416) duration_literal ::= NK_VARIABLE */ - 381, /* (417) signed ::= NK_INTEGER */ - 381, /* (418) signed ::= NK_PLUS NK_INTEGER */ - 381, /* (419) signed ::= NK_MINUS NK_INTEGER */ - 381, /* (420) signed ::= NK_FLOAT */ - 381, /* (421) signed ::= NK_PLUS NK_FLOAT */ - 381, /* (422) signed ::= NK_MINUS NK_FLOAT */ - 395, /* (423) signed_literal ::= signed */ - 395, /* (424) signed_literal ::= NK_STRING */ - 395, /* (425) signed_literal ::= NK_BOOL */ - 395, /* (426) signed_literal ::= TIMESTAMP NK_STRING */ - 395, /* (427) signed_literal ::= duration_literal */ - 395, /* (428) signed_literal ::= NULL */ - 395, /* (429) signed_literal ::= literal_func */ - 395, /* (430) signed_literal ::= NK_QUESTION */ - 450, /* (431) literal_list ::= signed_literal */ - 450, /* (432) literal_list ::= literal_list NK_COMMA signed_literal */ - 364, /* (433) db_name ::= NK_ID */ - 365, /* (434) table_name ::= NK_ID */ - 393, /* (435) column_name ::= NK_ID */ - 407, /* (436) function_name ::= NK_ID */ - 439, /* (437) view_name ::= NK_ID */ - 451, /* (438) table_alias ::= NK_ID */ - 418, /* (439) column_alias ::= NK_ID */ - 418, /* (440) column_alias ::= NK_ALIAS */ - 357, /* (441) user_name ::= NK_ID */ - 366, /* (442) topic_name ::= NK_ID */ - 440, /* (443) stream_name ::= NK_ID */ - 430, /* (444) cgroup_name ::= NK_ID */ - 421, /* (445) index_name ::= NK_ID */ - 452, /* (446) expr_or_subquery ::= expression */ - 446, /* (447) expression ::= literal */ - 446, /* (448) expression ::= pseudo_column */ - 446, /* (449) expression ::= column_reference */ - 446, /* (450) expression ::= function_expression */ - 446, /* (451) expression ::= case_when_expression */ - 446, /* (452) expression ::= NK_LP expression NK_RP */ - 446, /* (453) expression ::= NK_PLUS expr_or_subquery */ - 446, /* (454) expression ::= NK_MINUS expr_or_subquery */ - 446, /* (455) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - 446, /* (456) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - 446, /* (457) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - 446, /* (458) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - 446, /* (459) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - 446, /* (460) expression ::= column_reference NK_ARROW NK_STRING */ - 446, /* (461) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - 446, /* (462) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - 398, /* (463) expression_list ::= expr_or_subquery */ - 398, /* (464) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - 454, /* (465) column_reference ::= column_name */ - 454, /* (466) column_reference ::= table_name NK_DOT column_name */ - 454, /* (467) column_reference ::= NK_ALIAS */ - 454, /* (468) column_reference ::= table_name NK_DOT NK_ALIAS */ - 453, /* (469) pseudo_column ::= ROWTS */ - 453, /* (470) pseudo_column ::= TBNAME */ - 453, /* (471) pseudo_column ::= table_name NK_DOT TBNAME */ - 453, /* (472) pseudo_column ::= QSTART */ - 453, /* (473) pseudo_column ::= QEND */ - 453, /* (474) pseudo_column ::= QDURATION */ - 453, /* (475) pseudo_column ::= WSTART */ - 453, /* (476) pseudo_column ::= WEND */ - 453, /* (477) pseudo_column ::= WDURATION */ - 453, /* (478) pseudo_column ::= IROWTS */ - 453, /* (479) pseudo_column ::= ISFILLED */ - 453, /* (480) pseudo_column ::= QTAGS */ - 455, /* (481) function_expression ::= function_name NK_LP expression_list NK_RP */ - 455, /* (482) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - 455, /* (483) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - 455, /* (484) function_expression ::= literal_func */ - 449, /* (485) literal_func ::= noarg_func NK_LP NK_RP */ - 449, /* (486) literal_func ::= NOW */ - 459, /* (487) noarg_func ::= NOW */ - 459, /* (488) noarg_func ::= TODAY */ - 459, /* (489) noarg_func ::= TIMEZONE */ - 459, /* (490) noarg_func ::= DATABASE */ - 459, /* (491) noarg_func ::= CLIENT_VERSION */ - 459, /* (492) noarg_func ::= SERVER_VERSION */ - 459, /* (493) noarg_func ::= SERVER_STATUS */ - 459, /* (494) noarg_func ::= CURRENT_USER */ - 459, /* (495) noarg_func ::= USER */ - 457, /* (496) star_func ::= COUNT */ - 457, /* (497) star_func ::= FIRST */ - 457, /* (498) star_func ::= LAST */ - 457, /* (499) star_func ::= LAST_ROW */ - 458, /* (500) star_func_para_list ::= NK_STAR */ - 458, /* (501) star_func_para_list ::= other_para_list */ - 460, /* (502) other_para_list ::= star_func_para */ - 460, /* (503) other_para_list ::= other_para_list NK_COMMA star_func_para */ - 461, /* (504) star_func_para ::= expr_or_subquery */ - 461, /* (505) star_func_para ::= table_name NK_DOT NK_STAR */ - 456, /* (506) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - 456, /* (507) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - 462, /* (508) when_then_list ::= when_then_expr */ - 462, /* (509) when_then_list ::= when_then_list when_then_expr */ - 465, /* (510) when_then_expr ::= WHEN common_expression THEN common_expression */ - 463, /* (511) case_when_else_opt ::= */ - 463, /* (512) case_when_else_opt ::= ELSE common_expression */ - 466, /* (513) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - 466, /* (514) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - 466, /* (515) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - 466, /* (516) predicate ::= expr_or_subquery IS NULL */ - 466, /* (517) predicate ::= expr_or_subquery IS NOT NULL */ - 466, /* (518) predicate ::= expr_or_subquery in_op in_predicate_value */ - 467, /* (519) compare_op ::= NK_LT */ - 467, /* (520) compare_op ::= NK_GT */ - 467, /* (521) compare_op ::= NK_LE */ - 467, /* (522) compare_op ::= NK_GE */ - 467, /* (523) compare_op ::= NK_NE */ - 467, /* (524) compare_op ::= NK_EQ */ - 467, /* (525) compare_op ::= LIKE */ - 467, /* (526) compare_op ::= NOT LIKE */ - 467, /* (527) compare_op ::= MATCH */ - 467, /* (528) compare_op ::= NMATCH */ - 467, /* (529) compare_op ::= CONTAINS */ - 468, /* (530) in_op ::= IN */ - 468, /* (531) in_op ::= NOT IN */ - 469, /* (532) in_predicate_value ::= NK_LP literal_list NK_RP */ - 470, /* (533) boolean_value_expression ::= boolean_primary */ - 470, /* (534) boolean_value_expression ::= NOT boolean_primary */ - 470, /* (535) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - 470, /* (536) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - 471, /* (537) boolean_primary ::= predicate */ - 471, /* (538) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - 464, /* (539) common_expression ::= expr_or_subquery */ - 464, /* (540) common_expression ::= boolean_value_expression */ - 472, /* (541) from_clause_opt ::= */ - 472, /* (542) from_clause_opt ::= FROM table_reference_list */ - 473, /* (543) table_reference_list ::= table_reference */ - 473, /* (544) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - 474, /* (545) table_reference ::= table_primary */ - 474, /* (546) table_reference ::= joined_table */ - 475, /* (547) table_primary ::= table_name alias_opt */ - 475, /* (548) table_primary ::= db_name NK_DOT table_name alias_opt */ - 475, /* (549) table_primary ::= subquery alias_opt */ - 475, /* (550) table_primary ::= parenthesized_joined_table */ - 477, /* (551) alias_opt ::= */ - 477, /* (552) alias_opt ::= table_alias */ - 477, /* (553) alias_opt ::= AS table_alias */ - 479, /* (554) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - 479, /* (555) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - 476, /* (556) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - 480, /* (557) join_type ::= */ - 480, /* (558) join_type ::= INNER */ - 481, /* (559) 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 */ - 482, /* (560) hint_list ::= */ - 482, /* (561) hint_list ::= NK_HINT */ - 484, /* (562) tag_mode_opt ::= */ - 484, /* (563) tag_mode_opt ::= TAGS */ - 483, /* (564) set_quantifier_opt ::= */ - 483, /* (565) set_quantifier_opt ::= DISTINCT */ - 483, /* (566) set_quantifier_opt ::= ALL */ - 485, /* (567) select_list ::= select_item */ - 485, /* (568) select_list ::= select_list NK_COMMA select_item */ - 493, /* (569) select_item ::= NK_STAR */ - 493, /* (570) select_item ::= common_expression */ - 493, /* (571) select_item ::= common_expression column_alias */ - 493, /* (572) select_item ::= common_expression AS column_alias */ - 493, /* (573) select_item ::= table_name NK_DOT NK_STAR */ - 429, /* (574) where_clause_opt ::= */ - 429, /* (575) where_clause_opt ::= WHERE search_condition */ - 486, /* (576) partition_by_clause_opt ::= */ - 486, /* (577) partition_by_clause_opt ::= PARTITION BY partition_list */ - 494, /* (578) partition_list ::= partition_item */ - 494, /* (579) partition_list ::= partition_list NK_COMMA partition_item */ - 495, /* (580) partition_item ::= expr_or_subquery */ - 495, /* (581) partition_item ::= expr_or_subquery column_alias */ - 495, /* (582) partition_item ::= expr_or_subquery AS column_alias */ - 490, /* (583) twindow_clause_opt ::= */ - 490, /* (584) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - 490, /* (585) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - 490, /* (586) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 490, /* (587) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 490, /* (588) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - 423, /* (589) sliding_opt ::= */ - 423, /* (590) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - 496, /* (591) interval_sliding_duration_literal ::= NK_VARIABLE */ - 496, /* (592) interval_sliding_duration_literal ::= NK_STRING */ - 496, /* (593) interval_sliding_duration_literal ::= NK_INTEGER */ - 489, /* (594) fill_opt ::= */ - 489, /* (595) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - 489, /* (596) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - 489, /* (597) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - 497, /* (598) fill_mode ::= NONE */ - 497, /* (599) fill_mode ::= PREV */ - 497, /* (600) fill_mode ::= NULL */ - 497, /* (601) fill_mode ::= NULL_F */ - 497, /* (602) fill_mode ::= LINEAR */ - 497, /* (603) fill_mode ::= NEXT */ - 491, /* (604) group_by_clause_opt ::= */ - 491, /* (605) group_by_clause_opt ::= GROUP BY group_by_list */ - 498, /* (606) group_by_list ::= expr_or_subquery */ - 498, /* (607) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 492, /* (608) having_clause_opt ::= */ - 492, /* (609) having_clause_opt ::= HAVING search_condition */ - 487, /* (610) range_opt ::= */ - 487, /* (611) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - 487, /* (612) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 488, /* (613) every_opt ::= */ - 488, /* (614) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - 499, /* (615) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - 500, /* (616) query_simple ::= query_specification */ - 500, /* (617) query_simple ::= union_query_expression */ - 504, /* (618) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - 504, /* (619) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - 505, /* (620) query_simple_or_subquery ::= query_simple */ - 505, /* (621) query_simple_or_subquery ::= subquery */ - 428, /* (622) query_or_subquery ::= query_expression */ - 428, /* (623) query_or_subquery ::= subquery */ - 501, /* (624) order_by_clause_opt ::= */ - 501, /* (625) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 502, /* (626) slimit_clause_opt ::= */ - 502, /* (627) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - 502, /* (628) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - 502, /* (629) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 503, /* (630) limit_clause_opt ::= */ - 503, /* (631) limit_clause_opt ::= LIMIT NK_INTEGER */ - 503, /* (632) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - 503, /* (633) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 478, /* (634) subquery ::= NK_LP query_expression NK_RP */ - 478, /* (635) subquery ::= NK_LP subquery NK_RP */ - 367, /* (636) search_condition ::= common_expression */ - 506, /* (637) sort_specification_list ::= sort_specification */ - 506, /* (638) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - 507, /* (639) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 508, /* (640) ordering_specification_opt ::= */ - 508, /* (641) ordering_specification_opt ::= ASC */ - 508, /* (642) ordering_specification_opt ::= DESC */ - 509, /* (643) null_ordering_opt ::= */ - 509, /* (644) null_ordering_opt ::= NULLS FIRST */ - 509, /* (645) null_ordering_opt ::= NULLS LAST */ + 350, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + 350, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + 351, /* (2) account_options ::= */ + 351, /* (3) account_options ::= account_options PPS literal */ + 351, /* (4) account_options ::= account_options TSERIES literal */ + 351, /* (5) account_options ::= account_options STORAGE literal */ + 351, /* (6) account_options ::= account_options STREAMS literal */ + 351, /* (7) account_options ::= account_options QTIME literal */ + 351, /* (8) account_options ::= account_options DBS literal */ + 351, /* (9) account_options ::= account_options USERS literal */ + 351, /* (10) account_options ::= account_options CONNS literal */ + 351, /* (11) account_options ::= account_options STATE literal */ + 352, /* (12) alter_account_options ::= alter_account_option */ + 352, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + 354, /* (14) alter_account_option ::= PASS literal */ + 354, /* (15) alter_account_option ::= PPS literal */ + 354, /* (16) alter_account_option ::= TSERIES literal */ + 354, /* (17) alter_account_option ::= STORAGE literal */ + 354, /* (18) alter_account_option ::= STREAMS literal */ + 354, /* (19) alter_account_option ::= QTIME literal */ + 354, /* (20) alter_account_option ::= DBS literal */ + 354, /* (21) alter_account_option ::= USERS literal */ + 354, /* (22) alter_account_option ::= CONNS literal */ + 354, /* (23) alter_account_option ::= STATE literal */ + 355, /* (24) ip_range_list ::= NK_STRING */ + 355, /* (25) ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ + 356, /* (26) white_list ::= HOST ip_range_list */ + 357, /* (27) white_list_opt ::= */ + 357, /* (28) white_list_opt ::= white_list */ + 350, /* (29) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ + 350, /* (30) cmd ::= ALTER USER user_name PASS NK_STRING */ + 350, /* (31) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ + 350, /* (32) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ + 350, /* (33) cmd ::= ALTER USER user_name ADD white_list */ + 350, /* (34) cmd ::= ALTER USER user_name DROP white_list */ + 350, /* (35) cmd ::= DROP USER user_name */ + 359, /* (36) sysinfo_opt ::= */ + 359, /* (37) sysinfo_opt ::= SYSINFO NK_INTEGER */ + 350, /* (38) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ + 350, /* (39) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ + 360, /* (40) privileges ::= ALL */ + 360, /* (41) privileges ::= priv_type_list */ + 360, /* (42) privileges ::= SUBSCRIBE */ + 363, /* (43) priv_type_list ::= priv_type */ + 363, /* (44) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + 364, /* (45) priv_type ::= READ */ + 364, /* (46) priv_type ::= WRITE */ + 364, /* (47) priv_type ::= ALTER */ + 361, /* (48) priv_level ::= NK_STAR NK_DOT NK_STAR */ + 361, /* (49) priv_level ::= db_name NK_DOT NK_STAR */ + 361, /* (50) priv_level ::= db_name NK_DOT table_name */ + 361, /* (51) priv_level ::= topic_name */ + 362, /* (52) with_opt ::= */ + 362, /* (53) with_opt ::= WITH search_condition */ + 350, /* (54) cmd ::= CREATE DNODE dnode_endpoint */ + 350, /* (55) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + 350, /* (56) cmd ::= DROP DNODE NK_INTEGER force_opt */ + 350, /* (57) cmd ::= DROP DNODE dnode_endpoint force_opt */ + 350, /* (58) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ + 350, /* (59) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ + 350, /* (60) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + 350, /* (61) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + 350, /* (62) cmd ::= ALTER ALL DNODES NK_STRING */ + 350, /* (63) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + 350, /* (64) cmd ::= RESTORE DNODE NK_INTEGER */ + 369, /* (65) dnode_endpoint ::= NK_STRING */ + 369, /* (66) dnode_endpoint ::= NK_ID */ + 369, /* (67) dnode_endpoint ::= NK_IPTOKEN */ + 370, /* (68) force_opt ::= */ + 370, /* (69) force_opt ::= FORCE */ + 371, /* (70) unsafe_opt ::= UNSAFE */ + 350, /* (71) cmd ::= ALTER CLUSTER NK_STRING */ + 350, /* (72) cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ + 350, /* (73) cmd ::= ALTER LOCAL NK_STRING */ + 350, /* (74) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + 350, /* (75) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + 350, /* (76) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + 350, /* (77) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ + 350, /* (78) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + 350, /* (79) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + 350, /* (80) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + 350, /* (81) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + 350, /* (82) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + 350, /* (83) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + 350, /* (84) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ + 350, /* (85) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ + 350, /* (86) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + 350, /* (87) cmd ::= DROP DATABASE exists_opt db_name */ + 350, /* (88) cmd ::= USE db_name */ + 350, /* (89) cmd ::= ALTER DATABASE db_name alter_db_options */ + 350, /* (90) cmd ::= FLUSH DATABASE db_name */ + 350, /* (91) cmd ::= TRIM DATABASE db_name speed_opt */ + 350, /* (92) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ + 372, /* (93) not_exists_opt ::= IF NOT EXISTS */ + 372, /* (94) not_exists_opt ::= */ + 374, /* (95) exists_opt ::= IF EXISTS */ + 374, /* (96) exists_opt ::= */ + 373, /* (97) db_options ::= */ + 373, /* (98) db_options ::= db_options BUFFER NK_INTEGER */ + 373, /* (99) db_options ::= db_options CACHEMODEL NK_STRING */ + 373, /* (100) db_options ::= db_options CACHESIZE NK_INTEGER */ + 373, /* (101) db_options ::= db_options COMP NK_INTEGER */ + 373, /* (102) db_options ::= db_options DURATION NK_INTEGER */ + 373, /* (103) db_options ::= db_options DURATION NK_VARIABLE */ + 373, /* (104) db_options ::= db_options MAXROWS NK_INTEGER */ + 373, /* (105) db_options ::= db_options MINROWS NK_INTEGER */ + 373, /* (106) db_options ::= db_options KEEP integer_list */ + 373, /* (107) db_options ::= db_options KEEP variable_list */ + 373, /* (108) db_options ::= db_options PAGES NK_INTEGER */ + 373, /* (109) db_options ::= db_options PAGESIZE NK_INTEGER */ + 373, /* (110) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + 373, /* (111) db_options ::= db_options PRECISION NK_STRING */ + 373, /* (112) db_options ::= db_options REPLICA NK_INTEGER */ + 373, /* (113) db_options ::= db_options VGROUPS NK_INTEGER */ + 373, /* (114) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + 373, /* (115) db_options ::= db_options RETENTIONS retention_list */ + 373, /* (116) db_options ::= db_options SCHEMALESS NK_INTEGER */ + 373, /* (117) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + 373, /* (118) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + 373, /* (119) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + 373, /* (120) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 373, /* (121) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + 373, /* (122) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 373, /* (123) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + 373, /* (124) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + 373, /* (125) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + 373, /* (126) db_options ::= db_options TABLE_PREFIX signed */ + 373, /* (127) db_options ::= db_options TABLE_SUFFIX signed */ + 373, /* (128) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ + 375, /* (129) alter_db_options ::= alter_db_option */ + 375, /* (130) alter_db_options ::= alter_db_options alter_db_option */ + 383, /* (131) alter_db_option ::= BUFFER NK_INTEGER */ + 383, /* (132) alter_db_option ::= CACHEMODEL NK_STRING */ + 383, /* (133) alter_db_option ::= CACHESIZE NK_INTEGER */ + 383, /* (134) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + 383, /* (135) alter_db_option ::= KEEP integer_list */ + 383, /* (136) alter_db_option ::= KEEP variable_list */ + 383, /* (137) alter_db_option ::= PAGES NK_INTEGER */ + 383, /* (138) alter_db_option ::= REPLICA NK_INTEGER */ + 383, /* (139) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + 383, /* (140) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + 383, /* (141) alter_db_option ::= MINROWS NK_INTEGER */ + 383, /* (142) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ + 383, /* (143) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 383, /* (144) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ + 383, /* (145) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 383, /* (146) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ + 379, /* (147) integer_list ::= NK_INTEGER */ + 379, /* (148) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + 380, /* (149) variable_list ::= NK_VARIABLE */ + 380, /* (150) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + 381, /* (151) retention_list ::= retention */ + 381, /* (152) retention_list ::= retention_list NK_COMMA retention */ + 384, /* (153) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + 384, /* (154) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ + 376, /* (155) speed_opt ::= */ + 376, /* (156) speed_opt ::= BWLIMIT NK_INTEGER */ + 377, /* (157) start_opt ::= */ + 377, /* (158) start_opt ::= START WITH NK_INTEGER */ + 377, /* (159) start_opt ::= START WITH NK_STRING */ + 377, /* (160) start_opt ::= START WITH TIMESTAMP NK_STRING */ + 378, /* (161) end_opt ::= */ + 378, /* (162) end_opt ::= END WITH NK_INTEGER */ + 378, /* (163) end_opt ::= END WITH NK_STRING */ + 378, /* (164) end_opt ::= END WITH TIMESTAMP NK_STRING */ + 350, /* (165) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + 350, /* (166) cmd ::= CREATE TABLE multi_create_clause */ + 350, /* (167) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + 350, /* (168) cmd ::= DROP TABLE multi_drop_clause */ + 350, /* (169) cmd ::= DROP STABLE exists_opt full_table_name */ + 350, /* (170) cmd ::= ALTER TABLE alter_table_clause */ + 350, /* (171) cmd ::= ALTER STABLE alter_table_clause */ + 392, /* (172) alter_table_clause ::= full_table_name alter_table_options */ + 392, /* (173) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + 392, /* (174) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + 392, /* (175) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + 392, /* (176) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + 392, /* (177) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + 392, /* (178) alter_table_clause ::= full_table_name DROP TAG column_name */ + 392, /* (179) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + 392, /* (180) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + 392, /* (181) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + 389, /* (182) multi_create_clause ::= create_subtable_clause */ + 389, /* (183) multi_create_clause ::= multi_create_clause create_subtable_clause */ + 397, /* (184) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ + 391, /* (185) multi_drop_clause ::= drop_table_clause */ + 391, /* (186) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ + 400, /* (187) drop_table_clause ::= exists_opt full_table_name */ + 398, /* (188) specific_cols_opt ::= */ + 398, /* (189) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + 385, /* (190) full_table_name ::= table_name */ + 385, /* (191) full_table_name ::= db_name NK_DOT table_name */ + 386, /* (192) column_def_list ::= column_def */ + 386, /* (193) column_def_list ::= column_def_list NK_COMMA column_def */ + 402, /* (194) column_def ::= column_name type_name */ + 395, /* (195) type_name ::= BOOL */ + 395, /* (196) type_name ::= TINYINT */ + 395, /* (197) type_name ::= SMALLINT */ + 395, /* (198) type_name ::= INT */ + 395, /* (199) type_name ::= INTEGER */ + 395, /* (200) type_name ::= BIGINT */ + 395, /* (201) type_name ::= FLOAT */ + 395, /* (202) type_name ::= DOUBLE */ + 395, /* (203) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + 395, /* (204) type_name ::= TIMESTAMP */ + 395, /* (205) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + 395, /* (206) type_name ::= TINYINT UNSIGNED */ + 395, /* (207) type_name ::= SMALLINT UNSIGNED */ + 395, /* (208) type_name ::= INT UNSIGNED */ + 395, /* (209) type_name ::= BIGINT UNSIGNED */ + 395, /* (210) type_name ::= JSON */ + 395, /* (211) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + 395, /* (212) type_name ::= MEDIUMBLOB */ + 395, /* (213) type_name ::= BLOB */ + 395, /* (214) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + 395, /* (215) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + 395, /* (216) type_name ::= DECIMAL */ + 395, /* (217) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + 395, /* (218) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 387, /* (219) tags_def_opt ::= */ + 387, /* (220) tags_def_opt ::= tags_def */ + 390, /* (221) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + 388, /* (222) table_options ::= */ + 388, /* (223) table_options ::= table_options COMMENT NK_STRING */ + 388, /* (224) table_options ::= table_options MAX_DELAY duration_list */ + 388, /* (225) table_options ::= table_options WATERMARK duration_list */ + 388, /* (226) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + 388, /* (227) table_options ::= table_options TTL NK_INTEGER */ + 388, /* (228) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + 388, /* (229) table_options ::= table_options DELETE_MARK duration_list */ + 393, /* (230) alter_table_options ::= alter_table_option */ + 393, /* (231) alter_table_options ::= alter_table_options alter_table_option */ + 405, /* (232) alter_table_option ::= COMMENT NK_STRING */ + 405, /* (233) alter_table_option ::= TTL NK_INTEGER */ + 403, /* (234) duration_list ::= duration_literal */ + 403, /* (235) duration_list ::= duration_list NK_COMMA duration_literal */ + 404, /* (236) rollup_func_list ::= rollup_func_name */ + 404, /* (237) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + 407, /* (238) rollup_func_name ::= function_name */ + 407, /* (239) rollup_func_name ::= FIRST */ + 407, /* (240) rollup_func_name ::= LAST */ + 401, /* (241) col_name_list ::= col_name */ + 401, /* (242) col_name_list ::= col_name_list NK_COMMA col_name */ + 409, /* (243) col_name ::= column_name */ + 350, /* (244) cmd ::= SHOW DNODES */ + 350, /* (245) cmd ::= SHOW USERS */ + 350, /* (246) cmd ::= SHOW USER PRIVILEGES */ + 350, /* (247) cmd ::= SHOW db_kind_opt DATABASES */ + 350, /* (248) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + 350, /* (249) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + 350, /* (250) cmd ::= SHOW db_name_cond_opt VGROUPS */ + 350, /* (251) cmd ::= SHOW MNODES */ + 350, /* (252) cmd ::= SHOW QNODES */ + 350, /* (253) cmd ::= SHOW FUNCTIONS */ + 350, /* (254) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + 350, /* (255) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ + 350, /* (256) cmd ::= SHOW STREAMS */ + 350, /* (257) cmd ::= SHOW ACCOUNTS */ + 350, /* (258) cmd ::= SHOW APPS */ + 350, /* (259) cmd ::= SHOW CONNECTIONS */ + 350, /* (260) cmd ::= SHOW LICENCES */ + 350, /* (261) cmd ::= SHOW GRANTS */ + 350, /* (262) cmd ::= SHOW GRANTS FULL */ + 350, /* (263) cmd ::= SHOW GRANTS LOG */ + 350, /* (264) cmd ::= SHOW CLUSTER MACHINES */ + 350, /* (265) cmd ::= SHOW CREATE DATABASE db_name */ + 350, /* (266) cmd ::= SHOW CREATE TABLE full_table_name */ + 350, /* (267) cmd ::= SHOW CREATE STABLE full_table_name */ + 350, /* (268) cmd ::= SHOW QUERIES */ + 350, /* (269) cmd ::= SHOW SCORES */ + 350, /* (270) cmd ::= SHOW TOPICS */ + 350, /* (271) cmd ::= SHOW VARIABLES */ + 350, /* (272) cmd ::= SHOW CLUSTER VARIABLES */ + 350, /* (273) cmd ::= SHOW LOCAL VARIABLES */ + 350, /* (274) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + 350, /* (275) cmd ::= SHOW BNODES */ + 350, /* (276) cmd ::= SHOW SNODES */ + 350, /* (277) cmd ::= SHOW CLUSTER */ + 350, /* (278) cmd ::= SHOW TRANSACTIONS */ + 350, /* (279) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + 350, /* (280) cmd ::= SHOW CONSUMERS */ + 350, /* (281) cmd ::= SHOW SUBSCRIPTIONS */ + 350, /* (282) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + 350, /* (283) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + 350, /* (284) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + 350, /* (285) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + 350, /* (286) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + 350, /* (287) cmd ::= SHOW VNODES */ + 350, /* (288) cmd ::= SHOW db_name_cond_opt ALIVE */ + 350, /* (289) cmd ::= SHOW CLUSTER ALIVE */ + 350, /* (290) cmd ::= SHOW db_name_cond_opt VIEWS */ + 350, /* (291) cmd ::= SHOW CREATE VIEW full_table_name */ + 350, /* (292) cmd ::= SHOW COMPACTS */ + 350, /* (293) cmd ::= SHOW COMPACT NK_INTEGER */ + 411, /* (294) table_kind_db_name_cond_opt ::= */ + 411, /* (295) table_kind_db_name_cond_opt ::= table_kind */ + 411, /* (296) table_kind_db_name_cond_opt ::= db_name NK_DOT */ + 411, /* (297) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + 417, /* (298) table_kind ::= NORMAL */ + 417, /* (299) table_kind ::= CHILD */ + 413, /* (300) db_name_cond_opt ::= */ + 413, /* (301) db_name_cond_opt ::= db_name NK_DOT */ + 412, /* (302) like_pattern_opt ::= */ + 412, /* (303) like_pattern_opt ::= LIKE NK_STRING */ + 414, /* (304) table_name_cond ::= table_name */ + 415, /* (305) from_db_opt ::= */ + 415, /* (306) from_db_opt ::= FROM db_name */ + 416, /* (307) tag_list_opt ::= */ + 416, /* (308) tag_list_opt ::= tag_item */ + 416, /* (309) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + 418, /* (310) tag_item ::= TBNAME */ + 418, /* (311) tag_item ::= QTAGS */ + 418, /* (312) tag_item ::= column_name */ + 418, /* (313) tag_item ::= column_name column_alias */ + 418, /* (314) tag_item ::= column_name AS column_alias */ + 410, /* (315) db_kind_opt ::= */ + 410, /* (316) db_kind_opt ::= USER */ + 410, /* (317) db_kind_opt ::= SYSTEM */ + 350, /* (318) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + 350, /* (319) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + 350, /* (320) cmd ::= DROP INDEX exists_opt full_index_name */ + 421, /* (321) full_index_name ::= index_name */ + 421, /* (322) full_index_name ::= db_name NK_DOT index_name */ + 420, /* (323) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + 420, /* (324) 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 */ + 423, /* (325) func_list ::= func */ + 423, /* (326) func_list ::= func_list NK_COMMA func */ + 426, /* (327) func ::= sma_func_name NK_LP expression_list NK_RP */ + 427, /* (328) sma_func_name ::= function_name */ + 427, /* (329) sma_func_name ::= COUNT */ + 427, /* (330) sma_func_name ::= FIRST */ + 427, /* (331) sma_func_name ::= LAST */ + 427, /* (332) sma_func_name ::= LAST_ROW */ + 425, /* (333) sma_stream_opt ::= */ + 425, /* (334) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + 425, /* (335) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + 425, /* (336) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + 428, /* (337) with_meta ::= AS */ + 428, /* (338) with_meta ::= WITH META AS */ + 428, /* (339) with_meta ::= ONLY META AS */ + 350, /* (340) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + 350, /* (341) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + 350, /* (342) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + 350, /* (343) cmd ::= DROP TOPIC exists_opt topic_name */ + 350, /* (344) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + 350, /* (345) cmd ::= DESC full_table_name */ + 350, /* (346) cmd ::= DESCRIBE full_table_name */ + 350, /* (347) cmd ::= RESET QUERY CACHE */ + 350, /* (348) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + 350, /* (349) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + 432, /* (350) analyze_opt ::= */ + 432, /* (351) analyze_opt ::= ANALYZE */ + 433, /* (352) explain_options ::= */ + 433, /* (353) explain_options ::= explain_options VERBOSE NK_BOOL */ + 433, /* (354) explain_options ::= explain_options RATIO NK_FLOAT */ + 350, /* (355) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ + 350, /* (356) cmd ::= DROP FUNCTION exists_opt function_name */ + 436, /* (357) agg_func_opt ::= */ + 436, /* (358) agg_func_opt ::= AGGREGATE */ + 437, /* (359) bufsize_opt ::= */ + 437, /* (360) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 438, /* (361) language_opt ::= */ + 438, /* (362) language_opt ::= LANGUAGE NK_STRING */ + 435, /* (363) or_replace_opt ::= */ + 435, /* (364) or_replace_opt ::= OR REPLACE */ + 350, /* (365) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + 350, /* (366) cmd ::= DROP VIEW exists_opt full_view_name */ + 439, /* (367) full_view_name ::= view_name */ + 439, /* (368) full_view_name ::= db_name NK_DOT view_name */ + 350, /* (369) 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 */ + 350, /* (370) cmd ::= DROP STREAM exists_opt stream_name */ + 350, /* (371) cmd ::= PAUSE STREAM exists_opt stream_name */ + 350, /* (372) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + 443, /* (373) col_list_opt ::= */ + 443, /* (374) col_list_opt ::= NK_LP col_name_list NK_RP */ + 444, /* (375) tag_def_or_ref_opt ::= */ + 444, /* (376) tag_def_or_ref_opt ::= tags_def */ + 444, /* (377) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ + 442, /* (378) stream_options ::= */ + 442, /* (379) stream_options ::= stream_options TRIGGER AT_ONCE */ + 442, /* (380) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + 442, /* (381) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + 442, /* (382) stream_options ::= stream_options WATERMARK duration_literal */ + 442, /* (383) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + 442, /* (384) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + 442, /* (385) stream_options ::= stream_options DELETE_MARK duration_literal */ + 442, /* (386) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + 445, /* (387) subtable_opt ::= */ + 445, /* (388) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + 446, /* (389) ignore_opt ::= */ + 446, /* (390) ignore_opt ::= IGNORE UNTREATED */ + 350, /* (391) cmd ::= KILL CONNECTION NK_INTEGER */ + 350, /* (392) cmd ::= KILL QUERY NK_STRING */ + 350, /* (393) cmd ::= KILL TRANSACTION NK_INTEGER */ + 350, /* (394) cmd ::= KILL COMPACT NK_INTEGER */ + 350, /* (395) cmd ::= BALANCE VGROUP */ + 350, /* (396) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + 350, /* (397) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + 350, /* (398) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + 350, /* (399) cmd ::= SPLIT VGROUP NK_INTEGER */ + 448, /* (400) on_vgroup_id ::= */ + 448, /* (401) on_vgroup_id ::= ON NK_INTEGER */ + 449, /* (402) dnode_list ::= DNODE NK_INTEGER */ + 449, /* (403) dnode_list ::= dnode_list DNODE NK_INTEGER */ + 350, /* (404) cmd ::= DELETE FROM full_table_name where_clause_opt */ + 350, /* (405) cmd ::= query_or_subquery */ + 350, /* (406) cmd ::= insert_query */ + 434, /* (407) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + 434, /* (408) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + 353, /* (409) literal ::= NK_INTEGER */ + 353, /* (410) literal ::= NK_FLOAT */ + 353, /* (411) literal ::= NK_STRING */ + 353, /* (412) literal ::= NK_BOOL */ + 353, /* (413) literal ::= TIMESTAMP NK_STRING */ + 353, /* (414) literal ::= duration_literal */ + 353, /* (415) literal ::= NULL */ + 353, /* (416) literal ::= NK_QUESTION */ + 406, /* (417) duration_literal ::= NK_VARIABLE */ + 382, /* (418) signed ::= NK_INTEGER */ + 382, /* (419) signed ::= NK_PLUS NK_INTEGER */ + 382, /* (420) signed ::= NK_MINUS NK_INTEGER */ + 382, /* (421) signed ::= NK_FLOAT */ + 382, /* (422) signed ::= NK_PLUS NK_FLOAT */ + 382, /* (423) signed ::= NK_MINUS NK_FLOAT */ + 396, /* (424) signed_literal ::= signed */ + 396, /* (425) signed_literal ::= NK_STRING */ + 396, /* (426) signed_literal ::= NK_BOOL */ + 396, /* (427) signed_literal ::= TIMESTAMP NK_STRING */ + 396, /* (428) signed_literal ::= duration_literal */ + 396, /* (429) signed_literal ::= NULL */ + 396, /* (430) signed_literal ::= literal_func */ + 396, /* (431) signed_literal ::= NK_QUESTION */ + 451, /* (432) literal_list ::= signed_literal */ + 451, /* (433) literal_list ::= literal_list NK_COMMA signed_literal */ + 365, /* (434) db_name ::= NK_ID */ + 366, /* (435) table_name ::= NK_ID */ + 394, /* (436) column_name ::= NK_ID */ + 408, /* (437) function_name ::= NK_ID */ + 440, /* (438) view_name ::= NK_ID */ + 452, /* (439) table_alias ::= NK_ID */ + 419, /* (440) column_alias ::= NK_ID */ + 419, /* (441) column_alias ::= NK_ALIAS */ + 358, /* (442) user_name ::= NK_ID */ + 367, /* (443) topic_name ::= NK_ID */ + 441, /* (444) stream_name ::= NK_ID */ + 431, /* (445) cgroup_name ::= NK_ID */ + 422, /* (446) index_name ::= NK_ID */ + 453, /* (447) expr_or_subquery ::= expression */ + 447, /* (448) expression ::= literal */ + 447, /* (449) expression ::= pseudo_column */ + 447, /* (450) expression ::= column_reference */ + 447, /* (451) expression ::= function_expression */ + 447, /* (452) expression ::= case_when_expression */ + 447, /* (453) expression ::= NK_LP expression NK_RP */ + 447, /* (454) expression ::= NK_PLUS expr_or_subquery */ + 447, /* (455) expression ::= NK_MINUS expr_or_subquery */ + 447, /* (456) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + 447, /* (457) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + 447, /* (458) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + 447, /* (459) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + 447, /* (460) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + 447, /* (461) expression ::= column_reference NK_ARROW NK_STRING */ + 447, /* (462) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + 447, /* (463) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + 399, /* (464) expression_list ::= expr_or_subquery */ + 399, /* (465) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + 455, /* (466) column_reference ::= column_name */ + 455, /* (467) column_reference ::= table_name NK_DOT column_name */ + 455, /* (468) column_reference ::= NK_ALIAS */ + 455, /* (469) column_reference ::= table_name NK_DOT NK_ALIAS */ + 454, /* (470) pseudo_column ::= ROWTS */ + 454, /* (471) pseudo_column ::= TBNAME */ + 454, /* (472) pseudo_column ::= table_name NK_DOT TBNAME */ + 454, /* (473) pseudo_column ::= QSTART */ + 454, /* (474) pseudo_column ::= QEND */ + 454, /* (475) pseudo_column ::= QDURATION */ + 454, /* (476) pseudo_column ::= WSTART */ + 454, /* (477) pseudo_column ::= WEND */ + 454, /* (478) pseudo_column ::= WDURATION */ + 454, /* (479) pseudo_column ::= IROWTS */ + 454, /* (480) pseudo_column ::= ISFILLED */ + 454, /* (481) pseudo_column ::= QTAGS */ + 456, /* (482) function_expression ::= function_name NK_LP expression_list NK_RP */ + 456, /* (483) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + 456, /* (484) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + 456, /* (485) function_expression ::= literal_func */ + 450, /* (486) literal_func ::= noarg_func NK_LP NK_RP */ + 450, /* (487) literal_func ::= NOW */ + 460, /* (488) noarg_func ::= NOW */ + 460, /* (489) noarg_func ::= TODAY */ + 460, /* (490) noarg_func ::= TIMEZONE */ + 460, /* (491) noarg_func ::= DATABASE */ + 460, /* (492) noarg_func ::= CLIENT_VERSION */ + 460, /* (493) noarg_func ::= SERVER_VERSION */ + 460, /* (494) noarg_func ::= SERVER_STATUS */ + 460, /* (495) noarg_func ::= CURRENT_USER */ + 460, /* (496) noarg_func ::= USER */ + 458, /* (497) star_func ::= COUNT */ + 458, /* (498) star_func ::= FIRST */ + 458, /* (499) star_func ::= LAST */ + 458, /* (500) star_func ::= LAST_ROW */ + 459, /* (501) star_func_para_list ::= NK_STAR */ + 459, /* (502) star_func_para_list ::= other_para_list */ + 461, /* (503) other_para_list ::= star_func_para */ + 461, /* (504) other_para_list ::= other_para_list NK_COMMA star_func_para */ + 462, /* (505) star_func_para ::= expr_or_subquery */ + 462, /* (506) star_func_para ::= table_name NK_DOT NK_STAR */ + 457, /* (507) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + 457, /* (508) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + 463, /* (509) when_then_list ::= when_then_expr */ + 463, /* (510) when_then_list ::= when_then_list when_then_expr */ + 466, /* (511) when_then_expr ::= WHEN common_expression THEN common_expression */ + 464, /* (512) case_when_else_opt ::= */ + 464, /* (513) case_when_else_opt ::= ELSE common_expression */ + 467, /* (514) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + 467, /* (515) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + 467, /* (516) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + 467, /* (517) predicate ::= expr_or_subquery IS NULL */ + 467, /* (518) predicate ::= expr_or_subquery IS NOT NULL */ + 467, /* (519) predicate ::= expr_or_subquery in_op in_predicate_value */ + 468, /* (520) compare_op ::= NK_LT */ + 468, /* (521) compare_op ::= NK_GT */ + 468, /* (522) compare_op ::= NK_LE */ + 468, /* (523) compare_op ::= NK_GE */ + 468, /* (524) compare_op ::= NK_NE */ + 468, /* (525) compare_op ::= NK_EQ */ + 468, /* (526) compare_op ::= LIKE */ + 468, /* (527) compare_op ::= NOT LIKE */ + 468, /* (528) compare_op ::= MATCH */ + 468, /* (529) compare_op ::= NMATCH */ + 468, /* (530) compare_op ::= CONTAINS */ + 469, /* (531) in_op ::= IN */ + 469, /* (532) in_op ::= NOT IN */ + 470, /* (533) in_predicate_value ::= NK_LP literal_list NK_RP */ + 471, /* (534) boolean_value_expression ::= boolean_primary */ + 471, /* (535) boolean_value_expression ::= NOT boolean_primary */ + 471, /* (536) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + 471, /* (537) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + 472, /* (538) boolean_primary ::= predicate */ + 472, /* (539) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + 465, /* (540) common_expression ::= expr_or_subquery */ + 465, /* (541) common_expression ::= boolean_value_expression */ + 473, /* (542) from_clause_opt ::= */ + 473, /* (543) from_clause_opt ::= FROM table_reference_list */ + 474, /* (544) table_reference_list ::= table_reference */ + 474, /* (545) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + 475, /* (546) table_reference ::= table_primary */ + 475, /* (547) table_reference ::= joined_table */ + 476, /* (548) table_primary ::= table_name alias_opt */ + 476, /* (549) table_primary ::= db_name NK_DOT table_name alias_opt */ + 476, /* (550) table_primary ::= subquery alias_opt */ + 476, /* (551) table_primary ::= parenthesized_joined_table */ + 478, /* (552) alias_opt ::= */ + 478, /* (553) alias_opt ::= table_alias */ + 478, /* (554) alias_opt ::= AS table_alias */ + 480, /* (555) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + 480, /* (556) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + 477, /* (557) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + 481, /* (558) join_type ::= */ + 481, /* (559) join_type ::= INNER */ + 482, /* (560) 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 */ + 483, /* (561) hint_list ::= */ + 483, /* (562) hint_list ::= NK_HINT */ + 485, /* (563) tag_mode_opt ::= */ + 485, /* (564) tag_mode_opt ::= TAGS */ + 484, /* (565) set_quantifier_opt ::= */ + 484, /* (566) set_quantifier_opt ::= DISTINCT */ + 484, /* (567) set_quantifier_opt ::= ALL */ + 486, /* (568) select_list ::= select_item */ + 486, /* (569) select_list ::= select_list NK_COMMA select_item */ + 494, /* (570) select_item ::= NK_STAR */ + 494, /* (571) select_item ::= common_expression */ + 494, /* (572) select_item ::= common_expression column_alias */ + 494, /* (573) select_item ::= common_expression AS column_alias */ + 494, /* (574) select_item ::= table_name NK_DOT NK_STAR */ + 430, /* (575) where_clause_opt ::= */ + 430, /* (576) where_clause_opt ::= WHERE search_condition */ + 487, /* (577) partition_by_clause_opt ::= */ + 487, /* (578) partition_by_clause_opt ::= PARTITION BY partition_list */ + 495, /* (579) partition_list ::= partition_item */ + 495, /* (580) partition_list ::= partition_list NK_COMMA partition_item */ + 496, /* (581) partition_item ::= expr_or_subquery */ + 496, /* (582) partition_item ::= expr_or_subquery column_alias */ + 496, /* (583) partition_item ::= expr_or_subquery AS column_alias */ + 491, /* (584) twindow_clause_opt ::= */ + 491, /* (585) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + 491, /* (586) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + 491, /* (587) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 491, /* (588) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 491, /* (589) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + 424, /* (590) sliding_opt ::= */ + 424, /* (591) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + 497, /* (592) interval_sliding_duration_literal ::= NK_VARIABLE */ + 497, /* (593) interval_sliding_duration_literal ::= NK_STRING */ + 497, /* (594) interval_sliding_duration_literal ::= NK_INTEGER */ + 490, /* (595) fill_opt ::= */ + 490, /* (596) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + 490, /* (597) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + 490, /* (598) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + 498, /* (599) fill_mode ::= NONE */ + 498, /* (600) fill_mode ::= PREV */ + 498, /* (601) fill_mode ::= NULL */ + 498, /* (602) fill_mode ::= NULL_F */ + 498, /* (603) fill_mode ::= LINEAR */ + 498, /* (604) fill_mode ::= NEXT */ + 492, /* (605) group_by_clause_opt ::= */ + 492, /* (606) group_by_clause_opt ::= GROUP BY group_by_list */ + 499, /* (607) group_by_list ::= expr_or_subquery */ + 499, /* (608) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 493, /* (609) having_clause_opt ::= */ + 493, /* (610) having_clause_opt ::= HAVING search_condition */ + 488, /* (611) range_opt ::= */ + 488, /* (612) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + 488, /* (613) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 489, /* (614) every_opt ::= */ + 489, /* (615) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + 500, /* (616) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + 501, /* (617) query_simple ::= query_specification */ + 501, /* (618) query_simple ::= union_query_expression */ + 505, /* (619) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + 505, /* (620) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + 506, /* (621) query_simple_or_subquery ::= query_simple */ + 506, /* (622) query_simple_or_subquery ::= subquery */ + 429, /* (623) query_or_subquery ::= query_expression */ + 429, /* (624) query_or_subquery ::= subquery */ + 502, /* (625) order_by_clause_opt ::= */ + 502, /* (626) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 503, /* (627) slimit_clause_opt ::= */ + 503, /* (628) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + 503, /* (629) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + 503, /* (630) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 504, /* (631) limit_clause_opt ::= */ + 504, /* (632) limit_clause_opt ::= LIMIT NK_INTEGER */ + 504, /* (633) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + 504, /* (634) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 479, /* (635) subquery ::= NK_LP query_expression NK_RP */ + 479, /* (636) subquery ::= NK_LP subquery NK_RP */ + 368, /* (637) search_condition ::= common_expression */ + 507, /* (638) sort_specification_list ::= sort_specification */ + 507, /* (639) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + 508, /* (640) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 509, /* (641) ordering_specification_opt ::= */ + 509, /* (642) ordering_specification_opt ::= ASC */ + 509, /* (643) ordering_specification_opt ::= DESC */ + 510, /* (644) null_ordering_opt ::= */ + 510, /* (645) null_ordering_opt ::= NULLS FIRST */ + 510, /* (646) null_ordering_opt ::= NULLS LAST */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -4277,388 +4271,389 @@ static const signed char yyRuleInfoNRhs[] = { -2, /* (261) cmd ::= SHOW GRANTS */ -3, /* (262) cmd ::= SHOW GRANTS FULL */ -3, /* (263) cmd ::= SHOW GRANTS LOG */ - -4, /* (264) cmd ::= SHOW CREATE DATABASE db_name */ - -4, /* (265) cmd ::= SHOW CREATE TABLE full_table_name */ - -4, /* (266) cmd ::= SHOW CREATE STABLE full_table_name */ - -2, /* (267) cmd ::= SHOW QUERIES */ - -2, /* (268) cmd ::= SHOW SCORES */ - -2, /* (269) cmd ::= SHOW TOPICS */ - -2, /* (270) cmd ::= SHOW VARIABLES */ - -3, /* (271) cmd ::= SHOW CLUSTER VARIABLES */ - -3, /* (272) cmd ::= SHOW LOCAL VARIABLES */ - -5, /* (273) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - -2, /* (274) cmd ::= SHOW BNODES */ - -2, /* (275) cmd ::= SHOW SNODES */ - -2, /* (276) cmd ::= SHOW CLUSTER */ - -2, /* (277) cmd ::= SHOW TRANSACTIONS */ - -4, /* (278) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - -2, /* (279) cmd ::= SHOW CONSUMERS */ - -2, /* (280) cmd ::= SHOW SUBSCRIPTIONS */ - -5, /* (281) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - -6, /* (282) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ - -7, /* (283) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - -8, /* (284) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ - -5, /* (285) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ - -2, /* (286) cmd ::= SHOW VNODES */ - -3, /* (287) cmd ::= SHOW db_name_cond_opt ALIVE */ - -3, /* (288) cmd ::= SHOW CLUSTER ALIVE */ - -3, /* (289) cmd ::= SHOW db_name_cond_opt VIEWS */ - -4, /* (290) cmd ::= SHOW CREATE VIEW full_table_name */ - -2, /* (291) cmd ::= SHOW COMPACTS */ - -3, /* (292) cmd ::= SHOW COMPACT NK_INTEGER */ - 0, /* (293) table_kind_db_name_cond_opt ::= */ - -1, /* (294) table_kind_db_name_cond_opt ::= table_kind */ - -2, /* (295) table_kind_db_name_cond_opt ::= db_name NK_DOT */ - -3, /* (296) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ - -1, /* (297) table_kind ::= NORMAL */ - -1, /* (298) table_kind ::= CHILD */ - 0, /* (299) db_name_cond_opt ::= */ - -2, /* (300) db_name_cond_opt ::= db_name NK_DOT */ - 0, /* (301) like_pattern_opt ::= */ - -2, /* (302) like_pattern_opt ::= LIKE NK_STRING */ - -1, /* (303) table_name_cond ::= table_name */ - 0, /* (304) from_db_opt ::= */ - -2, /* (305) from_db_opt ::= FROM db_name */ - 0, /* (306) tag_list_opt ::= */ - -1, /* (307) tag_list_opt ::= tag_item */ - -3, /* (308) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - -1, /* (309) tag_item ::= TBNAME */ - -1, /* (310) tag_item ::= QTAGS */ - -1, /* (311) tag_item ::= column_name */ - -2, /* (312) tag_item ::= column_name column_alias */ - -3, /* (313) tag_item ::= column_name AS column_alias */ - 0, /* (314) db_kind_opt ::= */ - -1, /* (315) db_kind_opt ::= USER */ - -1, /* (316) db_kind_opt ::= SYSTEM */ - -8, /* (317) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - -9, /* (318) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - -4, /* (319) cmd ::= DROP INDEX exists_opt full_index_name */ - -1, /* (320) full_index_name ::= index_name */ - -3, /* (321) full_index_name ::= db_name NK_DOT index_name */ - -10, /* (322) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - -12, /* (323) 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 */ - -1, /* (324) func_list ::= func */ - -3, /* (325) func_list ::= func_list NK_COMMA func */ - -4, /* (326) func ::= sma_func_name NK_LP expression_list NK_RP */ - -1, /* (327) sma_func_name ::= function_name */ - -1, /* (328) sma_func_name ::= COUNT */ - -1, /* (329) sma_func_name ::= FIRST */ - -1, /* (330) sma_func_name ::= LAST */ - -1, /* (331) sma_func_name ::= LAST_ROW */ - 0, /* (332) sma_stream_opt ::= */ - -3, /* (333) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - -3, /* (334) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - -3, /* (335) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - -1, /* (336) with_meta ::= AS */ - -3, /* (337) with_meta ::= WITH META AS */ - -3, /* (338) with_meta ::= ONLY META AS */ - -6, /* (339) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - -7, /* (340) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - -8, /* (341) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - -4, /* (342) cmd ::= DROP TOPIC exists_opt topic_name */ - -7, /* (343) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - -2, /* (344) cmd ::= DESC full_table_name */ - -2, /* (345) cmd ::= DESCRIBE full_table_name */ - -3, /* (346) cmd ::= RESET QUERY CACHE */ - -4, /* (347) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - -4, /* (348) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - 0, /* (349) analyze_opt ::= */ - -1, /* (350) analyze_opt ::= ANALYZE */ - 0, /* (351) explain_options ::= */ - -3, /* (352) explain_options ::= explain_options VERBOSE NK_BOOL */ - -3, /* (353) explain_options ::= explain_options RATIO NK_FLOAT */ - -12, /* (354) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ - -4, /* (355) cmd ::= DROP FUNCTION exists_opt function_name */ - 0, /* (356) agg_func_opt ::= */ - -1, /* (357) agg_func_opt ::= AGGREGATE */ - 0, /* (358) bufsize_opt ::= */ - -2, /* (359) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 0, /* (360) language_opt ::= */ - -2, /* (361) language_opt ::= LANGUAGE NK_STRING */ - 0, /* (362) or_replace_opt ::= */ - -2, /* (363) or_replace_opt ::= OR REPLACE */ - -6, /* (364) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - -4, /* (365) cmd ::= DROP VIEW exists_opt full_view_name */ - -1, /* (366) full_view_name ::= view_name */ - -3, /* (367) full_view_name ::= db_name NK_DOT view_name */ - -12, /* (368) 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 */ - -4, /* (369) cmd ::= DROP STREAM exists_opt stream_name */ - -4, /* (370) cmd ::= PAUSE STREAM exists_opt stream_name */ - -5, /* (371) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ - 0, /* (372) col_list_opt ::= */ - -3, /* (373) col_list_opt ::= NK_LP col_name_list NK_RP */ - 0, /* (374) tag_def_or_ref_opt ::= */ - -1, /* (375) tag_def_or_ref_opt ::= tags_def */ - -4, /* (376) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ - 0, /* (377) stream_options ::= */ - -3, /* (378) stream_options ::= stream_options TRIGGER AT_ONCE */ - -3, /* (379) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - -4, /* (380) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - -3, /* (381) stream_options ::= stream_options WATERMARK duration_literal */ - -4, /* (382) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - -3, /* (383) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - -3, /* (384) stream_options ::= stream_options DELETE_MARK duration_literal */ - -4, /* (385) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - 0, /* (386) subtable_opt ::= */ - -4, /* (387) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - 0, /* (388) ignore_opt ::= */ - -2, /* (389) ignore_opt ::= IGNORE UNTREATED */ - -3, /* (390) cmd ::= KILL CONNECTION NK_INTEGER */ - -3, /* (391) cmd ::= KILL QUERY NK_STRING */ - -3, /* (392) cmd ::= KILL TRANSACTION NK_INTEGER */ - -3, /* (393) cmd ::= KILL COMPACT NK_INTEGER */ - -2, /* (394) cmd ::= BALANCE VGROUP */ - -4, /* (395) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - -4, /* (396) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - -4, /* (397) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - -3, /* (398) cmd ::= SPLIT VGROUP NK_INTEGER */ - 0, /* (399) on_vgroup_id ::= */ - -2, /* (400) on_vgroup_id ::= ON NK_INTEGER */ - -2, /* (401) dnode_list ::= DNODE NK_INTEGER */ - -3, /* (402) dnode_list ::= dnode_list DNODE NK_INTEGER */ - -4, /* (403) cmd ::= DELETE FROM full_table_name where_clause_opt */ - -1, /* (404) cmd ::= query_or_subquery */ - -1, /* (405) cmd ::= insert_query */ - -7, /* (406) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - -4, /* (407) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - -1, /* (408) literal ::= NK_INTEGER */ - -1, /* (409) literal ::= NK_FLOAT */ - -1, /* (410) literal ::= NK_STRING */ - -1, /* (411) literal ::= NK_BOOL */ - -2, /* (412) literal ::= TIMESTAMP NK_STRING */ - -1, /* (413) literal ::= duration_literal */ - -1, /* (414) literal ::= NULL */ - -1, /* (415) literal ::= NK_QUESTION */ - -1, /* (416) duration_literal ::= NK_VARIABLE */ - -1, /* (417) signed ::= NK_INTEGER */ - -2, /* (418) signed ::= NK_PLUS NK_INTEGER */ - -2, /* (419) signed ::= NK_MINUS NK_INTEGER */ - -1, /* (420) signed ::= NK_FLOAT */ - -2, /* (421) signed ::= NK_PLUS NK_FLOAT */ - -2, /* (422) signed ::= NK_MINUS NK_FLOAT */ - -1, /* (423) signed_literal ::= signed */ - -1, /* (424) signed_literal ::= NK_STRING */ - -1, /* (425) signed_literal ::= NK_BOOL */ - -2, /* (426) signed_literal ::= TIMESTAMP NK_STRING */ - -1, /* (427) signed_literal ::= duration_literal */ - -1, /* (428) signed_literal ::= NULL */ - -1, /* (429) signed_literal ::= literal_func */ - -1, /* (430) signed_literal ::= NK_QUESTION */ - -1, /* (431) literal_list ::= signed_literal */ - -3, /* (432) literal_list ::= literal_list NK_COMMA signed_literal */ - -1, /* (433) db_name ::= NK_ID */ - -1, /* (434) table_name ::= NK_ID */ - -1, /* (435) column_name ::= NK_ID */ - -1, /* (436) function_name ::= NK_ID */ - -1, /* (437) view_name ::= NK_ID */ - -1, /* (438) table_alias ::= NK_ID */ - -1, /* (439) column_alias ::= NK_ID */ - -1, /* (440) column_alias ::= NK_ALIAS */ - -1, /* (441) user_name ::= NK_ID */ - -1, /* (442) topic_name ::= NK_ID */ - -1, /* (443) stream_name ::= NK_ID */ - -1, /* (444) cgroup_name ::= NK_ID */ - -1, /* (445) index_name ::= NK_ID */ - -1, /* (446) expr_or_subquery ::= expression */ - -1, /* (447) expression ::= literal */ - -1, /* (448) expression ::= pseudo_column */ - -1, /* (449) expression ::= column_reference */ - -1, /* (450) expression ::= function_expression */ - -1, /* (451) expression ::= case_when_expression */ - -3, /* (452) expression ::= NK_LP expression NK_RP */ - -2, /* (453) expression ::= NK_PLUS expr_or_subquery */ - -2, /* (454) expression ::= NK_MINUS expr_or_subquery */ - -3, /* (455) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - -3, /* (456) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - -3, /* (457) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - -3, /* (458) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - -3, /* (459) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - -3, /* (460) expression ::= column_reference NK_ARROW NK_STRING */ - -3, /* (461) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - -3, /* (462) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - -1, /* (463) expression_list ::= expr_or_subquery */ - -3, /* (464) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - -1, /* (465) column_reference ::= column_name */ - -3, /* (466) column_reference ::= table_name NK_DOT column_name */ - -1, /* (467) column_reference ::= NK_ALIAS */ - -3, /* (468) column_reference ::= table_name NK_DOT NK_ALIAS */ - -1, /* (469) pseudo_column ::= ROWTS */ - -1, /* (470) pseudo_column ::= TBNAME */ - -3, /* (471) pseudo_column ::= table_name NK_DOT TBNAME */ - -1, /* (472) pseudo_column ::= QSTART */ - -1, /* (473) pseudo_column ::= QEND */ - -1, /* (474) pseudo_column ::= QDURATION */ - -1, /* (475) pseudo_column ::= WSTART */ - -1, /* (476) pseudo_column ::= WEND */ - -1, /* (477) pseudo_column ::= WDURATION */ - -1, /* (478) pseudo_column ::= IROWTS */ - -1, /* (479) pseudo_column ::= ISFILLED */ - -1, /* (480) pseudo_column ::= QTAGS */ - -4, /* (481) function_expression ::= function_name NK_LP expression_list NK_RP */ - -4, /* (482) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - -6, /* (483) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - -1, /* (484) function_expression ::= literal_func */ - -3, /* (485) literal_func ::= noarg_func NK_LP NK_RP */ - -1, /* (486) literal_func ::= NOW */ - -1, /* (487) noarg_func ::= NOW */ - -1, /* (488) noarg_func ::= TODAY */ - -1, /* (489) noarg_func ::= TIMEZONE */ - -1, /* (490) noarg_func ::= DATABASE */ - -1, /* (491) noarg_func ::= CLIENT_VERSION */ - -1, /* (492) noarg_func ::= SERVER_VERSION */ - -1, /* (493) noarg_func ::= SERVER_STATUS */ - -1, /* (494) noarg_func ::= CURRENT_USER */ - -1, /* (495) noarg_func ::= USER */ - -1, /* (496) star_func ::= COUNT */ - -1, /* (497) star_func ::= FIRST */ - -1, /* (498) star_func ::= LAST */ - -1, /* (499) star_func ::= LAST_ROW */ - -1, /* (500) star_func_para_list ::= NK_STAR */ - -1, /* (501) star_func_para_list ::= other_para_list */ - -1, /* (502) other_para_list ::= star_func_para */ - -3, /* (503) other_para_list ::= other_para_list NK_COMMA star_func_para */ - -1, /* (504) star_func_para ::= expr_or_subquery */ - -3, /* (505) star_func_para ::= table_name NK_DOT NK_STAR */ - -4, /* (506) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - -5, /* (507) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - -1, /* (508) when_then_list ::= when_then_expr */ - -2, /* (509) when_then_list ::= when_then_list when_then_expr */ - -4, /* (510) when_then_expr ::= WHEN common_expression THEN common_expression */ - 0, /* (511) case_when_else_opt ::= */ - -2, /* (512) case_when_else_opt ::= ELSE common_expression */ - -3, /* (513) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - -5, /* (514) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - -6, /* (515) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - -3, /* (516) predicate ::= expr_or_subquery IS NULL */ - -4, /* (517) predicate ::= expr_or_subquery IS NOT NULL */ - -3, /* (518) predicate ::= expr_or_subquery in_op in_predicate_value */ - -1, /* (519) compare_op ::= NK_LT */ - -1, /* (520) compare_op ::= NK_GT */ - -1, /* (521) compare_op ::= NK_LE */ - -1, /* (522) compare_op ::= NK_GE */ - -1, /* (523) compare_op ::= NK_NE */ - -1, /* (524) compare_op ::= NK_EQ */ - -1, /* (525) compare_op ::= LIKE */ - -2, /* (526) compare_op ::= NOT LIKE */ - -1, /* (527) compare_op ::= MATCH */ - -1, /* (528) compare_op ::= NMATCH */ - -1, /* (529) compare_op ::= CONTAINS */ - -1, /* (530) in_op ::= IN */ - -2, /* (531) in_op ::= NOT IN */ - -3, /* (532) in_predicate_value ::= NK_LP literal_list NK_RP */ - -1, /* (533) boolean_value_expression ::= boolean_primary */ - -2, /* (534) boolean_value_expression ::= NOT boolean_primary */ - -3, /* (535) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - -3, /* (536) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - -1, /* (537) boolean_primary ::= predicate */ - -3, /* (538) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - -1, /* (539) common_expression ::= expr_or_subquery */ - -1, /* (540) common_expression ::= boolean_value_expression */ - 0, /* (541) from_clause_opt ::= */ - -2, /* (542) from_clause_opt ::= FROM table_reference_list */ - -1, /* (543) table_reference_list ::= table_reference */ - -3, /* (544) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - -1, /* (545) table_reference ::= table_primary */ - -1, /* (546) table_reference ::= joined_table */ - -2, /* (547) table_primary ::= table_name alias_opt */ - -4, /* (548) table_primary ::= db_name NK_DOT table_name alias_opt */ - -2, /* (549) table_primary ::= subquery alias_opt */ - -1, /* (550) table_primary ::= parenthesized_joined_table */ - 0, /* (551) alias_opt ::= */ - -1, /* (552) alias_opt ::= table_alias */ - -2, /* (553) alias_opt ::= AS table_alias */ - -3, /* (554) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - -3, /* (555) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - -6, /* (556) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - 0, /* (557) join_type ::= */ - -1, /* (558) join_type ::= INNER */ - -14, /* (559) 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 */ - 0, /* (560) hint_list ::= */ - -1, /* (561) hint_list ::= NK_HINT */ - 0, /* (562) tag_mode_opt ::= */ - -1, /* (563) tag_mode_opt ::= TAGS */ - 0, /* (564) set_quantifier_opt ::= */ - -1, /* (565) set_quantifier_opt ::= DISTINCT */ - -1, /* (566) set_quantifier_opt ::= ALL */ - -1, /* (567) select_list ::= select_item */ - -3, /* (568) select_list ::= select_list NK_COMMA select_item */ - -1, /* (569) select_item ::= NK_STAR */ - -1, /* (570) select_item ::= common_expression */ - -2, /* (571) select_item ::= common_expression column_alias */ - -3, /* (572) select_item ::= common_expression AS column_alias */ - -3, /* (573) select_item ::= table_name NK_DOT NK_STAR */ - 0, /* (574) where_clause_opt ::= */ - -2, /* (575) where_clause_opt ::= WHERE search_condition */ - 0, /* (576) partition_by_clause_opt ::= */ - -3, /* (577) partition_by_clause_opt ::= PARTITION BY partition_list */ - -1, /* (578) partition_list ::= partition_item */ - -3, /* (579) partition_list ::= partition_list NK_COMMA partition_item */ - -1, /* (580) partition_item ::= expr_or_subquery */ - -2, /* (581) partition_item ::= expr_or_subquery column_alias */ - -3, /* (582) partition_item ::= expr_or_subquery AS column_alias */ - 0, /* (583) twindow_clause_opt ::= */ - -6, /* (584) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - -4, /* (585) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - -6, /* (586) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - -8, /* (587) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - -7, /* (588) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - 0, /* (589) sliding_opt ::= */ - -4, /* (590) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - -1, /* (591) interval_sliding_duration_literal ::= NK_VARIABLE */ - -1, /* (592) interval_sliding_duration_literal ::= NK_STRING */ - -1, /* (593) interval_sliding_duration_literal ::= NK_INTEGER */ - 0, /* (594) fill_opt ::= */ - -4, /* (595) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - -6, /* (596) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - -6, /* (597) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - -1, /* (598) fill_mode ::= NONE */ - -1, /* (599) fill_mode ::= PREV */ - -1, /* (600) fill_mode ::= NULL */ - -1, /* (601) fill_mode ::= NULL_F */ - -1, /* (602) fill_mode ::= LINEAR */ - -1, /* (603) fill_mode ::= NEXT */ - 0, /* (604) group_by_clause_opt ::= */ - -3, /* (605) group_by_clause_opt ::= GROUP BY group_by_list */ - -1, /* (606) group_by_list ::= expr_or_subquery */ - -3, /* (607) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 0, /* (608) having_clause_opt ::= */ - -2, /* (609) having_clause_opt ::= HAVING search_condition */ - 0, /* (610) range_opt ::= */ - -6, /* (611) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - -4, /* (612) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 0, /* (613) every_opt ::= */ - -4, /* (614) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - -4, /* (615) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - -1, /* (616) query_simple ::= query_specification */ - -1, /* (617) query_simple ::= union_query_expression */ - -4, /* (618) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - -3, /* (619) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - -1, /* (620) query_simple_or_subquery ::= query_simple */ - -1, /* (621) query_simple_or_subquery ::= subquery */ - -1, /* (622) query_or_subquery ::= query_expression */ - -1, /* (623) query_or_subquery ::= subquery */ - 0, /* (624) order_by_clause_opt ::= */ - -3, /* (625) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 0, /* (626) slimit_clause_opt ::= */ - -2, /* (627) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - -4, /* (628) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - -4, /* (629) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 0, /* (630) limit_clause_opt ::= */ - -2, /* (631) limit_clause_opt ::= LIMIT NK_INTEGER */ - -4, /* (632) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - -4, /* (633) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - -3, /* (634) subquery ::= NK_LP query_expression NK_RP */ - -3, /* (635) subquery ::= NK_LP subquery NK_RP */ - -1, /* (636) search_condition ::= common_expression */ - -1, /* (637) sort_specification_list ::= sort_specification */ - -3, /* (638) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - -3, /* (639) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 0, /* (640) ordering_specification_opt ::= */ - -1, /* (641) ordering_specification_opt ::= ASC */ - -1, /* (642) ordering_specification_opt ::= DESC */ - 0, /* (643) null_ordering_opt ::= */ - -2, /* (644) null_ordering_opt ::= NULLS FIRST */ - -2, /* (645) null_ordering_opt ::= NULLS LAST */ + -3, /* (264) cmd ::= SHOW CLUSTER MACHINES */ + -4, /* (265) cmd ::= SHOW CREATE DATABASE db_name */ + -4, /* (266) cmd ::= SHOW CREATE TABLE full_table_name */ + -4, /* (267) cmd ::= SHOW CREATE STABLE full_table_name */ + -2, /* (268) cmd ::= SHOW QUERIES */ + -2, /* (269) cmd ::= SHOW SCORES */ + -2, /* (270) cmd ::= SHOW TOPICS */ + -2, /* (271) cmd ::= SHOW VARIABLES */ + -3, /* (272) cmd ::= SHOW CLUSTER VARIABLES */ + -3, /* (273) cmd ::= SHOW LOCAL VARIABLES */ + -5, /* (274) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + -2, /* (275) cmd ::= SHOW BNODES */ + -2, /* (276) cmd ::= SHOW SNODES */ + -2, /* (277) cmd ::= SHOW CLUSTER */ + -2, /* (278) cmd ::= SHOW TRANSACTIONS */ + -4, /* (279) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + -2, /* (280) cmd ::= SHOW CONSUMERS */ + -2, /* (281) cmd ::= SHOW SUBSCRIPTIONS */ + -5, /* (282) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + -6, /* (283) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + -7, /* (284) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + -8, /* (285) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + -5, /* (286) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + -2, /* (287) cmd ::= SHOW VNODES */ + -3, /* (288) cmd ::= SHOW db_name_cond_opt ALIVE */ + -3, /* (289) cmd ::= SHOW CLUSTER ALIVE */ + -3, /* (290) cmd ::= SHOW db_name_cond_opt VIEWS */ + -4, /* (291) cmd ::= SHOW CREATE VIEW full_table_name */ + -2, /* (292) cmd ::= SHOW COMPACTS */ + -3, /* (293) cmd ::= SHOW COMPACT NK_INTEGER */ + 0, /* (294) table_kind_db_name_cond_opt ::= */ + -1, /* (295) table_kind_db_name_cond_opt ::= table_kind */ + -2, /* (296) table_kind_db_name_cond_opt ::= db_name NK_DOT */ + -3, /* (297) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + -1, /* (298) table_kind ::= NORMAL */ + -1, /* (299) table_kind ::= CHILD */ + 0, /* (300) db_name_cond_opt ::= */ + -2, /* (301) db_name_cond_opt ::= db_name NK_DOT */ + 0, /* (302) like_pattern_opt ::= */ + -2, /* (303) like_pattern_opt ::= LIKE NK_STRING */ + -1, /* (304) table_name_cond ::= table_name */ + 0, /* (305) from_db_opt ::= */ + -2, /* (306) from_db_opt ::= FROM db_name */ + 0, /* (307) tag_list_opt ::= */ + -1, /* (308) tag_list_opt ::= tag_item */ + -3, /* (309) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + -1, /* (310) tag_item ::= TBNAME */ + -1, /* (311) tag_item ::= QTAGS */ + -1, /* (312) tag_item ::= column_name */ + -2, /* (313) tag_item ::= column_name column_alias */ + -3, /* (314) tag_item ::= column_name AS column_alias */ + 0, /* (315) db_kind_opt ::= */ + -1, /* (316) db_kind_opt ::= USER */ + -1, /* (317) db_kind_opt ::= SYSTEM */ + -8, /* (318) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + -9, /* (319) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + -4, /* (320) cmd ::= DROP INDEX exists_opt full_index_name */ + -1, /* (321) full_index_name ::= index_name */ + -3, /* (322) full_index_name ::= db_name NK_DOT index_name */ + -10, /* (323) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + -12, /* (324) 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 */ + -1, /* (325) func_list ::= func */ + -3, /* (326) func_list ::= func_list NK_COMMA func */ + -4, /* (327) func ::= sma_func_name NK_LP expression_list NK_RP */ + -1, /* (328) sma_func_name ::= function_name */ + -1, /* (329) sma_func_name ::= COUNT */ + -1, /* (330) sma_func_name ::= FIRST */ + -1, /* (331) sma_func_name ::= LAST */ + -1, /* (332) sma_func_name ::= LAST_ROW */ + 0, /* (333) sma_stream_opt ::= */ + -3, /* (334) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + -3, /* (335) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + -3, /* (336) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + -1, /* (337) with_meta ::= AS */ + -3, /* (338) with_meta ::= WITH META AS */ + -3, /* (339) with_meta ::= ONLY META AS */ + -6, /* (340) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + -7, /* (341) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + -8, /* (342) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + -4, /* (343) cmd ::= DROP TOPIC exists_opt topic_name */ + -7, /* (344) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + -2, /* (345) cmd ::= DESC full_table_name */ + -2, /* (346) cmd ::= DESCRIBE full_table_name */ + -3, /* (347) cmd ::= RESET QUERY CACHE */ + -4, /* (348) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + -4, /* (349) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + 0, /* (350) analyze_opt ::= */ + -1, /* (351) analyze_opt ::= ANALYZE */ + 0, /* (352) explain_options ::= */ + -3, /* (353) explain_options ::= explain_options VERBOSE NK_BOOL */ + -3, /* (354) explain_options ::= explain_options RATIO NK_FLOAT */ + -12, /* (355) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ + -4, /* (356) cmd ::= DROP FUNCTION exists_opt function_name */ + 0, /* (357) agg_func_opt ::= */ + -1, /* (358) agg_func_opt ::= AGGREGATE */ + 0, /* (359) bufsize_opt ::= */ + -2, /* (360) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 0, /* (361) language_opt ::= */ + -2, /* (362) language_opt ::= LANGUAGE NK_STRING */ + 0, /* (363) or_replace_opt ::= */ + -2, /* (364) or_replace_opt ::= OR REPLACE */ + -6, /* (365) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + -4, /* (366) cmd ::= DROP VIEW exists_opt full_view_name */ + -1, /* (367) full_view_name ::= view_name */ + -3, /* (368) full_view_name ::= db_name NK_DOT view_name */ + -12, /* (369) 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 */ + -4, /* (370) cmd ::= DROP STREAM exists_opt stream_name */ + -4, /* (371) cmd ::= PAUSE STREAM exists_opt stream_name */ + -5, /* (372) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + 0, /* (373) col_list_opt ::= */ + -3, /* (374) col_list_opt ::= NK_LP col_name_list NK_RP */ + 0, /* (375) tag_def_or_ref_opt ::= */ + -1, /* (376) tag_def_or_ref_opt ::= tags_def */ + -4, /* (377) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ + 0, /* (378) stream_options ::= */ + -3, /* (379) stream_options ::= stream_options TRIGGER AT_ONCE */ + -3, /* (380) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + -4, /* (381) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + -3, /* (382) stream_options ::= stream_options WATERMARK duration_literal */ + -4, /* (383) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + -3, /* (384) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + -3, /* (385) stream_options ::= stream_options DELETE_MARK duration_literal */ + -4, /* (386) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + 0, /* (387) subtable_opt ::= */ + -4, /* (388) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + 0, /* (389) ignore_opt ::= */ + -2, /* (390) ignore_opt ::= IGNORE UNTREATED */ + -3, /* (391) cmd ::= KILL CONNECTION NK_INTEGER */ + -3, /* (392) cmd ::= KILL QUERY NK_STRING */ + -3, /* (393) cmd ::= KILL TRANSACTION NK_INTEGER */ + -3, /* (394) cmd ::= KILL COMPACT NK_INTEGER */ + -2, /* (395) cmd ::= BALANCE VGROUP */ + -4, /* (396) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + -4, /* (397) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + -4, /* (398) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + -3, /* (399) cmd ::= SPLIT VGROUP NK_INTEGER */ + 0, /* (400) on_vgroup_id ::= */ + -2, /* (401) on_vgroup_id ::= ON NK_INTEGER */ + -2, /* (402) dnode_list ::= DNODE NK_INTEGER */ + -3, /* (403) dnode_list ::= dnode_list DNODE NK_INTEGER */ + -4, /* (404) cmd ::= DELETE FROM full_table_name where_clause_opt */ + -1, /* (405) cmd ::= query_or_subquery */ + -1, /* (406) cmd ::= insert_query */ + -7, /* (407) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + -4, /* (408) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + -1, /* (409) literal ::= NK_INTEGER */ + -1, /* (410) literal ::= NK_FLOAT */ + -1, /* (411) literal ::= NK_STRING */ + -1, /* (412) literal ::= NK_BOOL */ + -2, /* (413) literal ::= TIMESTAMP NK_STRING */ + -1, /* (414) literal ::= duration_literal */ + -1, /* (415) literal ::= NULL */ + -1, /* (416) literal ::= NK_QUESTION */ + -1, /* (417) duration_literal ::= NK_VARIABLE */ + -1, /* (418) signed ::= NK_INTEGER */ + -2, /* (419) signed ::= NK_PLUS NK_INTEGER */ + -2, /* (420) signed ::= NK_MINUS NK_INTEGER */ + -1, /* (421) signed ::= NK_FLOAT */ + -2, /* (422) signed ::= NK_PLUS NK_FLOAT */ + -2, /* (423) signed ::= NK_MINUS NK_FLOAT */ + -1, /* (424) signed_literal ::= signed */ + -1, /* (425) signed_literal ::= NK_STRING */ + -1, /* (426) signed_literal ::= NK_BOOL */ + -2, /* (427) signed_literal ::= TIMESTAMP NK_STRING */ + -1, /* (428) signed_literal ::= duration_literal */ + -1, /* (429) signed_literal ::= NULL */ + -1, /* (430) signed_literal ::= literal_func */ + -1, /* (431) signed_literal ::= NK_QUESTION */ + -1, /* (432) literal_list ::= signed_literal */ + -3, /* (433) literal_list ::= literal_list NK_COMMA signed_literal */ + -1, /* (434) db_name ::= NK_ID */ + -1, /* (435) table_name ::= NK_ID */ + -1, /* (436) column_name ::= NK_ID */ + -1, /* (437) function_name ::= NK_ID */ + -1, /* (438) view_name ::= NK_ID */ + -1, /* (439) table_alias ::= NK_ID */ + -1, /* (440) column_alias ::= NK_ID */ + -1, /* (441) column_alias ::= NK_ALIAS */ + -1, /* (442) user_name ::= NK_ID */ + -1, /* (443) topic_name ::= NK_ID */ + -1, /* (444) stream_name ::= NK_ID */ + -1, /* (445) cgroup_name ::= NK_ID */ + -1, /* (446) index_name ::= NK_ID */ + -1, /* (447) expr_or_subquery ::= expression */ + -1, /* (448) expression ::= literal */ + -1, /* (449) expression ::= pseudo_column */ + -1, /* (450) expression ::= column_reference */ + -1, /* (451) expression ::= function_expression */ + -1, /* (452) expression ::= case_when_expression */ + -3, /* (453) expression ::= NK_LP expression NK_RP */ + -2, /* (454) expression ::= NK_PLUS expr_or_subquery */ + -2, /* (455) expression ::= NK_MINUS expr_or_subquery */ + -3, /* (456) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + -3, /* (457) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + -3, /* (458) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + -3, /* (459) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + -3, /* (460) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + -3, /* (461) expression ::= column_reference NK_ARROW NK_STRING */ + -3, /* (462) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + -3, /* (463) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + -1, /* (464) expression_list ::= expr_or_subquery */ + -3, /* (465) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + -1, /* (466) column_reference ::= column_name */ + -3, /* (467) column_reference ::= table_name NK_DOT column_name */ + -1, /* (468) column_reference ::= NK_ALIAS */ + -3, /* (469) column_reference ::= table_name NK_DOT NK_ALIAS */ + -1, /* (470) pseudo_column ::= ROWTS */ + -1, /* (471) pseudo_column ::= TBNAME */ + -3, /* (472) pseudo_column ::= table_name NK_DOT TBNAME */ + -1, /* (473) pseudo_column ::= QSTART */ + -1, /* (474) pseudo_column ::= QEND */ + -1, /* (475) pseudo_column ::= QDURATION */ + -1, /* (476) pseudo_column ::= WSTART */ + -1, /* (477) pseudo_column ::= WEND */ + -1, /* (478) pseudo_column ::= WDURATION */ + -1, /* (479) pseudo_column ::= IROWTS */ + -1, /* (480) pseudo_column ::= ISFILLED */ + -1, /* (481) pseudo_column ::= QTAGS */ + -4, /* (482) function_expression ::= function_name NK_LP expression_list NK_RP */ + -4, /* (483) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + -6, /* (484) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + -1, /* (485) function_expression ::= literal_func */ + -3, /* (486) literal_func ::= noarg_func NK_LP NK_RP */ + -1, /* (487) literal_func ::= NOW */ + -1, /* (488) noarg_func ::= NOW */ + -1, /* (489) noarg_func ::= TODAY */ + -1, /* (490) noarg_func ::= TIMEZONE */ + -1, /* (491) noarg_func ::= DATABASE */ + -1, /* (492) noarg_func ::= CLIENT_VERSION */ + -1, /* (493) noarg_func ::= SERVER_VERSION */ + -1, /* (494) noarg_func ::= SERVER_STATUS */ + -1, /* (495) noarg_func ::= CURRENT_USER */ + -1, /* (496) noarg_func ::= USER */ + -1, /* (497) star_func ::= COUNT */ + -1, /* (498) star_func ::= FIRST */ + -1, /* (499) star_func ::= LAST */ + -1, /* (500) star_func ::= LAST_ROW */ + -1, /* (501) star_func_para_list ::= NK_STAR */ + -1, /* (502) star_func_para_list ::= other_para_list */ + -1, /* (503) other_para_list ::= star_func_para */ + -3, /* (504) other_para_list ::= other_para_list NK_COMMA star_func_para */ + -1, /* (505) star_func_para ::= expr_or_subquery */ + -3, /* (506) star_func_para ::= table_name NK_DOT NK_STAR */ + -4, /* (507) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + -5, /* (508) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + -1, /* (509) when_then_list ::= when_then_expr */ + -2, /* (510) when_then_list ::= when_then_list when_then_expr */ + -4, /* (511) when_then_expr ::= WHEN common_expression THEN common_expression */ + 0, /* (512) case_when_else_opt ::= */ + -2, /* (513) case_when_else_opt ::= ELSE common_expression */ + -3, /* (514) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + -5, /* (515) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + -6, /* (516) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + -3, /* (517) predicate ::= expr_or_subquery IS NULL */ + -4, /* (518) predicate ::= expr_or_subquery IS NOT NULL */ + -3, /* (519) predicate ::= expr_or_subquery in_op in_predicate_value */ + -1, /* (520) compare_op ::= NK_LT */ + -1, /* (521) compare_op ::= NK_GT */ + -1, /* (522) compare_op ::= NK_LE */ + -1, /* (523) compare_op ::= NK_GE */ + -1, /* (524) compare_op ::= NK_NE */ + -1, /* (525) compare_op ::= NK_EQ */ + -1, /* (526) compare_op ::= LIKE */ + -2, /* (527) compare_op ::= NOT LIKE */ + -1, /* (528) compare_op ::= MATCH */ + -1, /* (529) compare_op ::= NMATCH */ + -1, /* (530) compare_op ::= CONTAINS */ + -1, /* (531) in_op ::= IN */ + -2, /* (532) in_op ::= NOT IN */ + -3, /* (533) in_predicate_value ::= NK_LP literal_list NK_RP */ + -1, /* (534) boolean_value_expression ::= boolean_primary */ + -2, /* (535) boolean_value_expression ::= NOT boolean_primary */ + -3, /* (536) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + -3, /* (537) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + -1, /* (538) boolean_primary ::= predicate */ + -3, /* (539) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + -1, /* (540) common_expression ::= expr_or_subquery */ + -1, /* (541) common_expression ::= boolean_value_expression */ + 0, /* (542) from_clause_opt ::= */ + -2, /* (543) from_clause_opt ::= FROM table_reference_list */ + -1, /* (544) table_reference_list ::= table_reference */ + -3, /* (545) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + -1, /* (546) table_reference ::= table_primary */ + -1, /* (547) table_reference ::= joined_table */ + -2, /* (548) table_primary ::= table_name alias_opt */ + -4, /* (549) table_primary ::= db_name NK_DOT table_name alias_opt */ + -2, /* (550) table_primary ::= subquery alias_opt */ + -1, /* (551) table_primary ::= parenthesized_joined_table */ + 0, /* (552) alias_opt ::= */ + -1, /* (553) alias_opt ::= table_alias */ + -2, /* (554) alias_opt ::= AS table_alias */ + -3, /* (555) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + -3, /* (556) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + -6, /* (557) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + 0, /* (558) join_type ::= */ + -1, /* (559) join_type ::= INNER */ + -14, /* (560) 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 */ + 0, /* (561) hint_list ::= */ + -1, /* (562) hint_list ::= NK_HINT */ + 0, /* (563) tag_mode_opt ::= */ + -1, /* (564) tag_mode_opt ::= TAGS */ + 0, /* (565) set_quantifier_opt ::= */ + -1, /* (566) set_quantifier_opt ::= DISTINCT */ + -1, /* (567) set_quantifier_opt ::= ALL */ + -1, /* (568) select_list ::= select_item */ + -3, /* (569) select_list ::= select_list NK_COMMA select_item */ + -1, /* (570) select_item ::= NK_STAR */ + -1, /* (571) select_item ::= common_expression */ + -2, /* (572) select_item ::= common_expression column_alias */ + -3, /* (573) select_item ::= common_expression AS column_alias */ + -3, /* (574) select_item ::= table_name NK_DOT NK_STAR */ + 0, /* (575) where_clause_opt ::= */ + -2, /* (576) where_clause_opt ::= WHERE search_condition */ + 0, /* (577) partition_by_clause_opt ::= */ + -3, /* (578) partition_by_clause_opt ::= PARTITION BY partition_list */ + -1, /* (579) partition_list ::= partition_item */ + -3, /* (580) partition_list ::= partition_list NK_COMMA partition_item */ + -1, /* (581) partition_item ::= expr_or_subquery */ + -2, /* (582) partition_item ::= expr_or_subquery column_alias */ + -3, /* (583) partition_item ::= expr_or_subquery AS column_alias */ + 0, /* (584) twindow_clause_opt ::= */ + -6, /* (585) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + -4, /* (586) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + -6, /* (587) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + -8, /* (588) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + -7, /* (589) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + 0, /* (590) sliding_opt ::= */ + -4, /* (591) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + -1, /* (592) interval_sliding_duration_literal ::= NK_VARIABLE */ + -1, /* (593) interval_sliding_duration_literal ::= NK_STRING */ + -1, /* (594) interval_sliding_duration_literal ::= NK_INTEGER */ + 0, /* (595) fill_opt ::= */ + -4, /* (596) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + -6, /* (597) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + -6, /* (598) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + -1, /* (599) fill_mode ::= NONE */ + -1, /* (600) fill_mode ::= PREV */ + -1, /* (601) fill_mode ::= NULL */ + -1, /* (602) fill_mode ::= NULL_F */ + -1, /* (603) fill_mode ::= LINEAR */ + -1, /* (604) fill_mode ::= NEXT */ + 0, /* (605) group_by_clause_opt ::= */ + -3, /* (606) group_by_clause_opt ::= GROUP BY group_by_list */ + -1, /* (607) group_by_list ::= expr_or_subquery */ + -3, /* (608) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 0, /* (609) having_clause_opt ::= */ + -2, /* (610) having_clause_opt ::= HAVING search_condition */ + 0, /* (611) range_opt ::= */ + -6, /* (612) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + -4, /* (613) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 0, /* (614) every_opt ::= */ + -4, /* (615) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + -4, /* (616) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + -1, /* (617) query_simple ::= query_specification */ + -1, /* (618) query_simple ::= union_query_expression */ + -4, /* (619) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + -3, /* (620) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + -1, /* (621) query_simple_or_subquery ::= query_simple */ + -1, /* (622) query_simple_or_subquery ::= subquery */ + -1, /* (623) query_or_subquery ::= query_expression */ + -1, /* (624) query_or_subquery ::= subquery */ + 0, /* (625) order_by_clause_opt ::= */ + -3, /* (626) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 0, /* (627) slimit_clause_opt ::= */ + -2, /* (628) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + -4, /* (629) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + -4, /* (630) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 0, /* (631) limit_clause_opt ::= */ + -2, /* (632) limit_clause_opt ::= LIMIT NK_INTEGER */ + -4, /* (633) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + -4, /* (634) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + -3, /* (635) subquery ::= NK_LP query_expression NK_RP */ + -3, /* (636) subquery ::= NK_LP subquery NK_RP */ + -1, /* (637) search_condition ::= common_expression */ + -1, /* (638) sort_specification_list ::= sort_specification */ + -3, /* (639) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + -3, /* (640) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 0, /* (641) ordering_specification_opt ::= */ + -1, /* (642) ordering_specification_opt ::= ASC */ + -1, /* (643) ordering_specification_opt ::= DESC */ + 0, /* (644) null_ordering_opt ::= */ + -2, /* (645) null_ordering_opt ::= NULLS FIRST */ + -2, /* (646) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -4750,11 +4745,11 @@ static YYACTIONTYPE yy_reduce( YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,350,&yymsp[0].minor); + yy_destructor(yypParser,351,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,351,&yymsp[0].minor); + yy_destructor(yypParser,352,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -4768,20 +4763,20 @@ static YYACTIONTYPE yy_reduce( case 9: /* account_options ::= account_options USERS literal */ yytestcase(yyruleno==9); case 10: /* account_options ::= account_options CONNS literal */ yytestcase(yyruleno==10); case 11: /* account_options ::= account_options STATE literal */ yytestcase(yyruleno==11); -{ yy_destructor(yypParser,350,&yymsp[-2].minor); +{ yy_destructor(yypParser,351,&yymsp[-2].minor); { } - yy_destructor(yypParser,352,&yymsp[0].minor); + yy_destructor(yypParser,353,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,353,&yymsp[0].minor); +{ yy_destructor(yypParser,354,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,351,&yymsp[-1].minor); +{ yy_destructor(yypParser,352,&yymsp[-1].minor); { } - yy_destructor(yypParser,353,&yymsp[0].minor); + yy_destructor(yypParser,354,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -4795,154 +4790,154 @@ static YYACTIONTYPE yy_reduce( case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); { } - yy_destructor(yypParser,352,&yymsp[0].minor); + yy_destructor(yypParser,353,&yymsp[0].minor); break; case 24: /* ip_range_list ::= NK_STRING */ -{ yylhsminor.yy364 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy502 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy502 = yylhsminor.yy502; break; case 25: /* ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ -{ yylhsminor.yy364 = addNodeToList(pCxt, yymsp[-2].minor.yy364, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-2].minor.yy502, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy502 = yylhsminor.yy502; break; case 26: /* white_list ::= HOST ip_range_list */ -{ yymsp[-1].minor.yy364 = yymsp[0].minor.yy364; } +{ yymsp[-1].minor.yy502 = yymsp[0].minor.yy502; } break; case 27: /* white_list_opt ::= */ case 188: /* specific_cols_opt ::= */ yytestcase(yyruleno==188); case 219: /* tags_def_opt ::= */ yytestcase(yyruleno==219); - case 306: /* tag_list_opt ::= */ yytestcase(yyruleno==306); - case 372: /* col_list_opt ::= */ yytestcase(yyruleno==372); - case 374: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==374); - case 576: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==576); - case 604: /* group_by_clause_opt ::= */ yytestcase(yyruleno==604); - case 624: /* order_by_clause_opt ::= */ yytestcase(yyruleno==624); -{ yymsp[1].minor.yy364 = NULL; } + case 307: /* tag_list_opt ::= */ yytestcase(yyruleno==307); + case 373: /* col_list_opt ::= */ yytestcase(yyruleno==373); + case 375: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==375); + case 577: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==577); + case 605: /* group_by_clause_opt ::= */ yytestcase(yyruleno==605); + case 625: /* order_by_clause_opt ::= */ yytestcase(yyruleno==625); +{ yymsp[1].minor.yy502 = NULL; } break; case 28: /* white_list_opt ::= white_list */ case 220: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==220); - case 375: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==375); - case 501: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==501); -{ yylhsminor.yy364 = yymsp[0].minor.yy364; } - yymsp[0].minor.yy364 = yylhsminor.yy364; + case 376: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==376); + case 502: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==502); +{ yylhsminor.yy502 = yymsp[0].minor.yy502; } + yymsp[0].minor.yy502 = yylhsminor.yy502; break; case 29: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ { - pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-4].minor.yy929, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy143); - pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy364); + pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-4].minor.yy561, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy1013); + pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy502); } break; case 30: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy929, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy561, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 31: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy929, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy561, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } break; case 32: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy929, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy561, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } break; case 33: /* cmd ::= ALTER USER user_name ADD white_list */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy929, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy364); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy561, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy502); } break; case 34: /* cmd ::= ALTER USER user_name DROP white_list */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy929, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy364); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy561, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy502); } break; case 35: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy929); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy561); } break; case 36: /* sysinfo_opt ::= */ -{ yymsp[1].minor.yy143 = 1; } +{ yymsp[1].minor.yy1013 = 1; } break; case 37: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ -{ yymsp[-1].minor.yy143 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy1013 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } break; case 38: /* cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy429, &yymsp[-3].minor.yy777, &yymsp[0].minor.yy929, yymsp[-2].minor.yy992); } +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy277, &yymsp[-3].minor.yy483, &yymsp[0].minor.yy561, yymsp[-2].minor.yy490); } break; case 39: /* cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy429, &yymsp[-3].minor.yy777, &yymsp[0].minor.yy929, yymsp[-2].minor.yy992); } +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy277, &yymsp[-3].minor.yy483, &yymsp[0].minor.yy561, yymsp[-2].minor.yy490); } break; case 40: /* privileges ::= ALL */ -{ yymsp[0].minor.yy429 = PRIVILEGE_TYPE_ALL; } +{ yymsp[0].minor.yy277 = PRIVILEGE_TYPE_ALL; } break; case 41: /* privileges ::= priv_type_list */ case 43: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==43); -{ yylhsminor.yy429 = yymsp[0].minor.yy429; } - yymsp[0].minor.yy429 = yylhsminor.yy429; +{ yylhsminor.yy277 = yymsp[0].minor.yy277; } + yymsp[0].minor.yy277 = yylhsminor.yy277; break; case 42: /* privileges ::= SUBSCRIBE */ -{ yymsp[0].minor.yy429 = PRIVILEGE_TYPE_SUBSCRIBE; } +{ yymsp[0].minor.yy277 = PRIVILEGE_TYPE_SUBSCRIBE; } break; case 44: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy429 = yymsp[-2].minor.yy429 | yymsp[0].minor.yy429; } - yymsp[-2].minor.yy429 = yylhsminor.yy429; +{ yylhsminor.yy277 = yymsp[-2].minor.yy277 | yymsp[0].minor.yy277; } + yymsp[-2].minor.yy277 = yylhsminor.yy277; break; case 45: /* priv_type ::= READ */ -{ yymsp[0].minor.yy429 = PRIVILEGE_TYPE_READ; } +{ yymsp[0].minor.yy277 = PRIVILEGE_TYPE_READ; } break; case 46: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy429 = PRIVILEGE_TYPE_WRITE; } +{ yymsp[0].minor.yy277 = PRIVILEGE_TYPE_WRITE; } break; case 47: /* priv_type ::= ALTER */ -{ yymsp[0].minor.yy429 = PRIVILEGE_TYPE_ALTER; } +{ yymsp[0].minor.yy277 = PRIVILEGE_TYPE_ALTER; } break; case 48: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy777.first = yymsp[-2].minor.yy0; yylhsminor.yy777.second = yymsp[0].minor.yy0; } - yymsp[-2].minor.yy777 = yylhsminor.yy777; +{ yylhsminor.yy483.first = yymsp[-2].minor.yy0; yylhsminor.yy483.second = yymsp[0].minor.yy0; } + yymsp[-2].minor.yy483 = yylhsminor.yy483; break; case 49: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy777.first = yymsp[-2].minor.yy929; yylhsminor.yy777.second = yymsp[0].minor.yy0; } - yymsp[-2].minor.yy777 = yylhsminor.yy777; +{ yylhsminor.yy483.first = yymsp[-2].minor.yy561; yylhsminor.yy483.second = yymsp[0].minor.yy0; } + yymsp[-2].minor.yy483 = yylhsminor.yy483; break; case 50: /* priv_level ::= db_name NK_DOT table_name */ -{ yylhsminor.yy777.first = yymsp[-2].minor.yy929; yylhsminor.yy777.second = yymsp[0].minor.yy929; } - yymsp[-2].minor.yy777 = yylhsminor.yy777; +{ yylhsminor.yy483.first = yymsp[-2].minor.yy561; yylhsminor.yy483.second = yymsp[0].minor.yy561; } + yymsp[-2].minor.yy483 = yylhsminor.yy483; break; case 51: /* priv_level ::= topic_name */ -{ yylhsminor.yy777.first = yymsp[0].minor.yy929; yylhsminor.yy777.second = nil_token; } - yymsp[0].minor.yy777 = yylhsminor.yy777; +{ yylhsminor.yy483.first = yymsp[0].minor.yy561; yylhsminor.yy483.second = nil_token; } + yymsp[0].minor.yy483 = yylhsminor.yy483; break; case 52: /* with_opt ::= */ case 157: /* start_opt ::= */ yytestcase(yyruleno==157); case 161: /* end_opt ::= */ yytestcase(yyruleno==161); - case 301: /* like_pattern_opt ::= */ yytestcase(yyruleno==301); - case 386: /* subtable_opt ::= */ yytestcase(yyruleno==386); - case 511: /* case_when_else_opt ::= */ yytestcase(yyruleno==511); - case 541: /* from_clause_opt ::= */ yytestcase(yyruleno==541); - case 574: /* where_clause_opt ::= */ yytestcase(yyruleno==574); - case 583: /* twindow_clause_opt ::= */ yytestcase(yyruleno==583); - case 589: /* sliding_opt ::= */ yytestcase(yyruleno==589); - case 594: /* fill_opt ::= */ yytestcase(yyruleno==594); - case 608: /* having_clause_opt ::= */ yytestcase(yyruleno==608); - case 610: /* range_opt ::= */ yytestcase(yyruleno==610); - case 613: /* every_opt ::= */ yytestcase(yyruleno==613); - case 626: /* slimit_clause_opt ::= */ yytestcase(yyruleno==626); - case 630: /* limit_clause_opt ::= */ yytestcase(yyruleno==630); -{ yymsp[1].minor.yy992 = NULL; } + case 302: /* like_pattern_opt ::= */ yytestcase(yyruleno==302); + case 387: /* subtable_opt ::= */ yytestcase(yyruleno==387); + case 512: /* case_when_else_opt ::= */ yytestcase(yyruleno==512); + case 542: /* from_clause_opt ::= */ yytestcase(yyruleno==542); + case 575: /* where_clause_opt ::= */ yytestcase(yyruleno==575); + case 584: /* twindow_clause_opt ::= */ yytestcase(yyruleno==584); + case 590: /* sliding_opt ::= */ yytestcase(yyruleno==590); + case 595: /* fill_opt ::= */ yytestcase(yyruleno==595); + case 609: /* having_clause_opt ::= */ yytestcase(yyruleno==609); + case 611: /* range_opt ::= */ yytestcase(yyruleno==611); + case 614: /* every_opt ::= */ yytestcase(yyruleno==614); + case 627: /* slimit_clause_opt ::= */ yytestcase(yyruleno==627); + case 631: /* limit_clause_opt ::= */ yytestcase(yyruleno==631); +{ yymsp[1].minor.yy490 = NULL; } break; case 53: /* with_opt ::= WITH search_condition */ - case 542: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==542); - case 575: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==575); - case 609: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==609); -{ yymsp[-1].minor.yy992 = yymsp[0].minor.yy992; } + case 543: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==543); + case 576: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==576); + case 610: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==610); +{ yymsp[-1].minor.yy490 = yymsp[0].minor.yy490; } break; case 54: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy929, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy561, NULL); } break; case 55: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy0); } break; case 56: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy437, false); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy845, false); } break; case 57: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy929, yymsp[0].minor.yy437, false); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy561, yymsp[0].minor.yy845, false); } break; case 58: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy437); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy845); } break; case 59: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy929, false, yymsp[0].minor.yy437); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy561, false, yymsp[0].minor.yy845); } break; case 60: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -4962,57 +4957,57 @@ static YYACTIONTYPE yy_reduce( case 65: /* dnode_endpoint ::= NK_STRING */ case 66: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==66); case 67: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==67); - case 328: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==328); - case 329: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==329); - case 330: /* sma_func_name ::= LAST */ yytestcase(yyruleno==330); - case 331: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==331); - case 433: /* db_name ::= NK_ID */ yytestcase(yyruleno==433); - case 434: /* table_name ::= NK_ID */ yytestcase(yyruleno==434); - case 435: /* column_name ::= NK_ID */ yytestcase(yyruleno==435); - case 436: /* function_name ::= NK_ID */ yytestcase(yyruleno==436); - case 437: /* view_name ::= NK_ID */ yytestcase(yyruleno==437); - case 438: /* table_alias ::= NK_ID */ yytestcase(yyruleno==438); - case 439: /* column_alias ::= NK_ID */ yytestcase(yyruleno==439); - case 440: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==440); - case 441: /* user_name ::= NK_ID */ yytestcase(yyruleno==441); - case 442: /* topic_name ::= NK_ID */ yytestcase(yyruleno==442); - case 443: /* stream_name ::= NK_ID */ yytestcase(yyruleno==443); - case 444: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==444); - case 445: /* index_name ::= NK_ID */ yytestcase(yyruleno==445); - case 487: /* noarg_func ::= NOW */ yytestcase(yyruleno==487); - case 488: /* noarg_func ::= TODAY */ yytestcase(yyruleno==488); - case 489: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==489); - case 490: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==490); - case 491: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==491); - case 492: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==492); - case 493: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==493); - case 494: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==494); - case 495: /* noarg_func ::= USER */ yytestcase(yyruleno==495); - case 496: /* star_func ::= COUNT */ yytestcase(yyruleno==496); - case 497: /* star_func ::= FIRST */ yytestcase(yyruleno==497); - case 498: /* star_func ::= LAST */ yytestcase(yyruleno==498); - case 499: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==499); -{ yylhsminor.yy929 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy929 = yylhsminor.yy929; + case 329: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==329); + case 330: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==330); + case 331: /* sma_func_name ::= LAST */ yytestcase(yyruleno==331); + case 332: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==332); + case 434: /* db_name ::= NK_ID */ yytestcase(yyruleno==434); + case 435: /* table_name ::= NK_ID */ yytestcase(yyruleno==435); + case 436: /* column_name ::= NK_ID */ yytestcase(yyruleno==436); + case 437: /* function_name ::= NK_ID */ yytestcase(yyruleno==437); + case 438: /* view_name ::= NK_ID */ yytestcase(yyruleno==438); + case 439: /* table_alias ::= NK_ID */ yytestcase(yyruleno==439); + case 440: /* column_alias ::= NK_ID */ yytestcase(yyruleno==440); + case 441: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==441); + case 442: /* user_name ::= NK_ID */ yytestcase(yyruleno==442); + case 443: /* topic_name ::= NK_ID */ yytestcase(yyruleno==443); + case 444: /* stream_name ::= NK_ID */ yytestcase(yyruleno==444); + case 445: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==445); + case 446: /* index_name ::= NK_ID */ yytestcase(yyruleno==446); + case 488: /* noarg_func ::= NOW */ yytestcase(yyruleno==488); + case 489: /* noarg_func ::= TODAY */ yytestcase(yyruleno==489); + case 490: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==490); + case 491: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==491); + case 492: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==492); + case 493: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==493); + case 494: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==494); + case 495: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==495); + case 496: /* noarg_func ::= USER */ yytestcase(yyruleno==496); + case 497: /* star_func ::= COUNT */ yytestcase(yyruleno==497); + case 498: /* star_func ::= FIRST */ yytestcase(yyruleno==498); + case 499: /* star_func ::= LAST */ yytestcase(yyruleno==499); + case 500: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==500); +{ yylhsminor.yy561 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy561 = yylhsminor.yy561; break; case 68: /* force_opt ::= */ case 94: /* not_exists_opt ::= */ yytestcase(yyruleno==94); case 96: /* exists_opt ::= */ yytestcase(yyruleno==96); - case 349: /* analyze_opt ::= */ yytestcase(yyruleno==349); - case 356: /* agg_func_opt ::= */ yytestcase(yyruleno==356); - case 362: /* or_replace_opt ::= */ yytestcase(yyruleno==362); - case 388: /* ignore_opt ::= */ yytestcase(yyruleno==388); - case 562: /* tag_mode_opt ::= */ yytestcase(yyruleno==562); - case 564: /* set_quantifier_opt ::= */ yytestcase(yyruleno==564); -{ yymsp[1].minor.yy437 = false; } + case 350: /* analyze_opt ::= */ yytestcase(yyruleno==350); + case 357: /* agg_func_opt ::= */ yytestcase(yyruleno==357); + case 363: /* or_replace_opt ::= */ yytestcase(yyruleno==363); + case 389: /* ignore_opt ::= */ yytestcase(yyruleno==389); + case 563: /* tag_mode_opt ::= */ yytestcase(yyruleno==563); + case 565: /* set_quantifier_opt ::= */ yytestcase(yyruleno==565); +{ yymsp[1].minor.yy845 = false; } break; case 69: /* force_opt ::= FORCE */ case 70: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==70); - case 350: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==350); - case 357: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==357); - case 563: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==563); - case 565: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==565); -{ yymsp[0].minor.yy437 = true; } + case 351: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==351); + case 358: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==358); + case 564: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==564); + case 566: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==566); +{ yymsp[0].minor.yy845 = true; } break; case 71: /* cmd ::= ALTER CLUSTER NK_STRING */ { pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -5060,241 +5055,241 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_VNODE_STMT, &yymsp[0].minor.yy0); } break; case 86: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy437, &yymsp[-1].minor.yy929, yymsp[0].minor.yy992); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy845, &yymsp[-1].minor.yy561, yymsp[0].minor.yy490); } break; case 87: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy437, &yymsp[0].minor.yy929); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy845, &yymsp[0].minor.yy561); } break; case 88: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy929); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy561); } break; case 89: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy929, yymsp[0].minor.yy992); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy561, yymsp[0].minor.yy490); } break; case 90: /* cmd ::= FLUSH DATABASE db_name */ -{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy929); } +{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy561); } break; case 91: /* cmd ::= TRIM DATABASE db_name speed_opt */ -{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy929, yymsp[0].minor.yy40); } +{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy561, yymsp[0].minor.yy774); } break; case 92: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ -{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy929, yymsp[-1].minor.yy992, yymsp[0].minor.yy992); } +{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy561, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); } break; case 93: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy437 = true; } +{ yymsp[-2].minor.yy845 = true; } break; case 95: /* exists_opt ::= IF EXISTS */ - case 363: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==363); - case 389: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==389); -{ yymsp[-1].minor.yy437 = true; } + case 364: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==364); + case 390: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==390); +{ yymsp[-1].minor.yy845 = true; } break; case 97: /* db_options ::= */ -{ yymsp[1].minor.yy992 = createDefaultDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy490 = createDefaultDatabaseOptions(pCxt); } break; case 98: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 99: /* db_options ::= db_options CACHEMODEL NK_STRING */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 100: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 101: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 102: /* db_options ::= db_options DURATION NK_INTEGER */ case 103: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==103); -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 104: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 105: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 106: /* db_options ::= db_options KEEP integer_list */ case 107: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==107); -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_KEEP, yymsp[0].minor.yy364); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_KEEP, yymsp[0].minor.yy502); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 108: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 109: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 110: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 111: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 112: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 113: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 114: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 115: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_RETENTIONS, yymsp[0].minor.yy364); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_RETENTIONS, yymsp[0].minor.yy502); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 116: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 117: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 118: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 119: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 120: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-3].minor.yy992, DB_OPTION_WAL_RETENTION_PERIOD, &t); + yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-3].minor.yy490, DB_OPTION_WAL_RETENTION_PERIOD, &t); } - yymsp[-3].minor.yy992 = yylhsminor.yy992; + yymsp[-3].minor.yy490 = yylhsminor.yy490; break; case 121: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 122: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-3].minor.yy992, DB_OPTION_WAL_RETENTION_SIZE, &t); + yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-3].minor.yy490, DB_OPTION_WAL_RETENTION_SIZE, &t); } - yymsp[-3].minor.yy992 = yylhsminor.yy992; + yymsp[-3].minor.yy490 = yylhsminor.yy490; break; case 123: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 124: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 125: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 126: /* db_options ::= db_options TABLE_PREFIX signed */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy992); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy490); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 127: /* db_options ::= db_options TABLE_SUFFIX signed */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy992); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy490); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 128: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ -{ yylhsminor.yy992 = setDatabaseOption(pCxt, yymsp[-2].minor.yy992, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 129: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy992 = createAlterDatabaseOptions(pCxt); yylhsminor.yy992 = setAlterDatabaseOption(pCxt, yylhsminor.yy992, &yymsp[0].minor.yy665); } - yymsp[0].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createAlterDatabaseOptions(pCxt); yylhsminor.yy490 = setAlterDatabaseOption(pCxt, yylhsminor.yy490, &yymsp[0].minor.yy529); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; case 130: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy992 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy992, &yymsp[0].minor.yy665); } - yymsp[-1].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy490, &yymsp[0].minor.yy529); } + yymsp[-1].minor.yy490 = yylhsminor.yy490; break; case 131: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy665.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy529.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; } break; case 132: /* alter_db_option ::= CACHEMODEL NK_STRING */ -{ yymsp[-1].minor.yy665.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy529.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; } break; case 133: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -{ yymsp[-1].minor.yy665.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy529.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; } break; case 134: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy665.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy529.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; } break; case 135: /* alter_db_option ::= KEEP integer_list */ case 136: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==136); -{ yymsp[-1].minor.yy665.type = DB_OPTION_KEEP; yymsp[-1].minor.yy665.pList = yymsp[0].minor.yy364; } +{ yymsp[-1].minor.yy529.type = DB_OPTION_KEEP; yymsp[-1].minor.yy529.pList = yymsp[0].minor.yy502; } break; case 137: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy665.type = DB_OPTION_PAGES; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy529.type = DB_OPTION_PAGES; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; } break; case 138: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy665.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy529.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; } break; case 139: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -{ yymsp[-1].minor.yy665.type = DB_OPTION_WAL; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy529.type = DB_OPTION_WAL; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; } break; case 140: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -{ yymsp[-1].minor.yy665.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy529.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; } break; case 141: /* alter_db_option ::= MINROWS NK_INTEGER */ -{ yymsp[-1].minor.yy665.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy529.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; } break; case 142: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy665.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy529.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; } break; case 143: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yymsp[-2].minor.yy665.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy665.val = t; + yymsp[-2].minor.yy529.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy529.val = t; } break; case 144: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ -{ yymsp[-1].minor.yy665.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy529.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; } break; case 145: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yymsp[-2].minor.yy665.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy665.val = t; + yymsp[-2].minor.yy529.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy529.val = t; } break; case 146: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ -{ yymsp[-1].minor.yy665.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy529.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; } break; case 147: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy364 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy502 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy502 = yylhsminor.yy502; break; case 148: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 402: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==402); -{ yylhsminor.yy364 = addNodeToList(pCxt, yymsp[-2].minor.yy364, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + case 403: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==403); +{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-2].minor.yy502, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy502 = yylhsminor.yy502; break; case 149: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy364 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy502 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy502 = yylhsminor.yy502; break; case 150: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy364 = addNodeToList(pCxt, yymsp[-2].minor.yy364, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-2].minor.yy502, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy502 = yylhsminor.yy502; break; case 151: /* retention_list ::= retention */ case 182: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==182); @@ -5302,290 +5297,290 @@ static YYACTIONTYPE yy_reduce( case 192: /* column_def_list ::= column_def */ yytestcase(yyruleno==192); case 236: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==236); case 241: /* col_name_list ::= col_name */ yytestcase(yyruleno==241); - case 307: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==307); - case 324: /* func_list ::= func */ yytestcase(yyruleno==324); - case 431: /* literal_list ::= signed_literal */ yytestcase(yyruleno==431); - case 502: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==502); - case 508: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==508); - case 567: /* select_list ::= select_item */ yytestcase(yyruleno==567); - case 578: /* partition_list ::= partition_item */ yytestcase(yyruleno==578); - case 637: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==637); -{ yylhsminor.yy364 = createNodeList(pCxt, yymsp[0].minor.yy992); } - yymsp[0].minor.yy364 = yylhsminor.yy364; + case 308: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==308); + case 325: /* func_list ::= func */ yytestcase(yyruleno==325); + case 432: /* literal_list ::= signed_literal */ yytestcase(yyruleno==432); + case 503: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==503); + case 509: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==509); + case 568: /* select_list ::= select_item */ yytestcase(yyruleno==568); + case 579: /* partition_list ::= partition_item */ yytestcase(yyruleno==579); + case 638: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==638); +{ yylhsminor.yy502 = createNodeList(pCxt, yymsp[0].minor.yy490); } + yymsp[0].minor.yy502 = yylhsminor.yy502; break; case 152: /* retention_list ::= retention_list NK_COMMA retention */ case 186: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==186); case 193: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==193); case 237: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==237); case 242: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==242); - case 308: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==308); - case 325: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==325); - case 432: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==432); - case 503: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==503); - case 568: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==568); - case 579: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==579); - case 638: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==638); -{ yylhsminor.yy364 = addNodeToList(pCxt, yymsp[-2].minor.yy364, yymsp[0].minor.yy992); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + case 309: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==309); + case 326: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==326); + case 433: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==433); + case 504: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==504); + case 569: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==569); + case 580: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==580); + case 639: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==639); +{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-2].minor.yy502, yymsp[0].minor.yy490); } + yymsp[-2].minor.yy502 = yylhsminor.yy502; break; case 153: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ case 154: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==154); -{ yylhsminor.yy992 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 155: /* speed_opt ::= */ - case 358: /* bufsize_opt ::= */ yytestcase(yyruleno==358); -{ yymsp[1].minor.yy40 = 0; } + case 359: /* bufsize_opt ::= */ yytestcase(yyruleno==359); +{ yymsp[1].minor.yy774 = 0; } break; case 156: /* speed_opt ::= BWLIMIT NK_INTEGER */ - case 359: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==359); -{ yymsp[-1].minor.yy40 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } + case 360: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==360); +{ yymsp[-1].minor.yy774 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; case 158: /* start_opt ::= START WITH NK_INTEGER */ case 162: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==162); -{ yymsp[-2].minor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-2].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 159: /* start_opt ::= START WITH NK_STRING */ case 163: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==163); -{ yymsp[-2].minor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +{ yymsp[-2].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; case 160: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ case 164: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==164); -{ yymsp[-3].minor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +{ yymsp[-3].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } 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); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy437, yymsp[-5].minor.yy992, yymsp[-3].minor.yy364, yymsp[-1].minor.yy364, yymsp[0].minor.yy992); } +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy845, yymsp[-5].minor.yy490, yymsp[-3].minor.yy502, yymsp[-1].minor.yy502, yymsp[0].minor.yy490); } break; case 166: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy364); } +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy502); } break; case 168: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy364); } +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy502); } break; case 169: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy437, yymsp[0].minor.yy992); } +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy845, yymsp[0].minor.yy490); } break; case 170: /* cmd ::= ALTER TABLE alter_table_clause */ - case 404: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==404); - case 405: /* cmd ::= insert_query */ yytestcase(yyruleno==405); -{ pCxt->pRootNode = yymsp[0].minor.yy992; } + case 405: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==405); + case 406: /* cmd ::= insert_query */ yytestcase(yyruleno==406); +{ pCxt->pRootNode = yymsp[0].minor.yy490; } break; case 171: /* cmd ::= ALTER STABLE alter_table_clause */ -{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy992); } +{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy490); } break; case 172: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy992 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy992, yymsp[0].minor.yy992); } - yymsp[-1].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); } + yymsp[-1].minor.yy490 = yylhsminor.yy490; break; case 173: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy992 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy992, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy929, yymsp[0].minor.yy184); } - yymsp[-4].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy490, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy561, yymsp[0].minor.yy826); } + yymsp[-4].minor.yy490 = yylhsminor.yy490; break; case 174: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy992 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy992, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy929); } - yymsp[-3].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy490, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy561); } + yymsp[-3].minor.yy490 = yylhsminor.yy490; break; case 175: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy992 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy992, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy929, yymsp[0].minor.yy184); } - yymsp[-4].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy490, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy561, yymsp[0].minor.yy826); } + yymsp[-4].minor.yy490 = yylhsminor.yy490; break; case 176: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy992 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy992, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy929, &yymsp[0].minor.yy929); } - yymsp[-4].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy490, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy561, &yymsp[0].minor.yy561); } + yymsp[-4].minor.yy490 = yylhsminor.yy490; break; case 177: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy992 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy992, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy929, yymsp[0].minor.yy184); } - yymsp[-4].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy490, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy561, yymsp[0].minor.yy826); } + yymsp[-4].minor.yy490 = yylhsminor.yy490; break; case 178: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy992 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy992, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy929); } - yymsp[-3].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy490, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy561); } + yymsp[-3].minor.yy490 = yylhsminor.yy490; break; case 179: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy992 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy992, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy929, yymsp[0].minor.yy184); } - yymsp[-4].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy490, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy561, yymsp[0].minor.yy826); } + yymsp[-4].minor.yy490 = yylhsminor.yy490; break; case 180: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy992 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy992, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy929, &yymsp[0].minor.yy929); } - yymsp[-4].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy490, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy561, &yymsp[0].minor.yy561); } + yymsp[-4].minor.yy490 = yylhsminor.yy490; break; case 181: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -{ yylhsminor.yy992 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy992, &yymsp[-2].minor.yy929, yymsp[0].minor.yy992); } - yymsp[-5].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy490, &yymsp[-2].minor.yy561, yymsp[0].minor.yy490); } + yymsp[-5].minor.yy490 = yylhsminor.yy490; break; case 183: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 509: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==509); -{ yylhsminor.yy364 = addNodeToList(pCxt, yymsp[-1].minor.yy364, yymsp[0].minor.yy992); } - yymsp[-1].minor.yy364 = yylhsminor.yy364; + case 510: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==510); +{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-1].minor.yy502, yymsp[0].minor.yy490); } + yymsp[-1].minor.yy502 = yylhsminor.yy502; break; case 184: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ -{ yylhsminor.yy992 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy437, yymsp[-8].minor.yy992, yymsp[-6].minor.yy992, yymsp[-5].minor.yy364, yymsp[-2].minor.yy364, yymsp[0].minor.yy992); } - yymsp[-9].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy845, yymsp[-8].minor.yy490, yymsp[-6].minor.yy490, yymsp[-5].minor.yy502, yymsp[-2].minor.yy502, yymsp[0].minor.yy490); } + yymsp[-9].minor.yy490 = yylhsminor.yy490; break; case 187: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy992 = createDropTableClause(pCxt, yymsp[-1].minor.yy437, yymsp[0].minor.yy992); } - yymsp[-1].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createDropTableClause(pCxt, yymsp[-1].minor.yy845, yymsp[0].minor.yy490); } + yymsp[-1].minor.yy490 = yylhsminor.yy490; break; case 189: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ - case 373: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==373); -{ yymsp[-2].minor.yy364 = yymsp[-1].minor.yy364; } + case 374: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==374); +{ yymsp[-2].minor.yy502 = yymsp[-1].minor.yy502; } break; case 190: /* full_table_name ::= table_name */ -{ yylhsminor.yy992 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy929, NULL); } - yymsp[0].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy561, NULL); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; case 191: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy992 = createRealTableNode(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy929, NULL); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createRealTableNode(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy561, NULL); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 194: /* column_def ::= column_name type_name */ -{ yylhsminor.yy992 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy929, yymsp[0].minor.yy184, NULL); } - yymsp[-1].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy561, yymsp[0].minor.yy826, NULL); } + yymsp[-1].minor.yy490 = yylhsminor.yy490; break; case 195: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_BOOL); } +{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 196: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_TINYINT); } +{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 197: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 198: /* type_name ::= INT */ case 199: /* type_name ::= INTEGER */ yytestcase(yyruleno==199); -{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_INT); } +{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_INT); } break; case 200: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_BIGINT); } +{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 201: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_FLOAT); } +{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 202: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 203: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy184 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy826 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 204: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 205: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy184 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy826 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 206: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy184 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +{ yymsp[-1].minor.yy826 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 207: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy184 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +{ yymsp[-1].minor.yy826 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 208: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy184 = createDataType(TSDB_DATA_TYPE_UINT); } +{ yymsp[-1].minor.yy826 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 209: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy184 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +{ yymsp[-1].minor.yy826 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 210: /* type_name ::= JSON */ -{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_JSON); } +{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 211: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy184 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy826 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 212: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 213: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_BLOB); } +{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 214: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy184 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy826 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 215: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy184 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy826 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } break; case 216: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy184 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 217: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy184 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-3].minor.yy826 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 218: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy184 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-5].minor.yy826 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 221: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ - case 376: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==376); -{ yymsp[-3].minor.yy364 = yymsp[-1].minor.yy364; } + case 377: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==377); +{ yymsp[-3].minor.yy502 = yymsp[-1].minor.yy502; } break; case 222: /* table_options ::= */ -{ yymsp[1].minor.yy992 = createDefaultTableOptions(pCxt); } +{ yymsp[1].minor.yy490 = createDefaultTableOptions(pCxt); } break; case 223: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy992 = setTableOption(pCxt, yymsp[-2].minor.yy992, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-2].minor.yy490, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 224: /* table_options ::= table_options MAX_DELAY duration_list */ -{ yylhsminor.yy992 = setTableOption(pCxt, yymsp[-2].minor.yy992, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy364); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-2].minor.yy490, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy502); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 225: /* table_options ::= table_options WATERMARK duration_list */ -{ yylhsminor.yy992 = setTableOption(pCxt, yymsp[-2].minor.yy992, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy364); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-2].minor.yy490, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy502); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 226: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -{ yylhsminor.yy992 = setTableOption(pCxt, yymsp[-4].minor.yy992, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy364); } - yymsp[-4].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-4].minor.yy490, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy502); } + yymsp[-4].minor.yy490 = yylhsminor.yy490; break; case 227: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy992 = setTableOption(pCxt, yymsp[-2].minor.yy992, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-2].minor.yy490, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 228: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy992 = setTableOption(pCxt, yymsp[-4].minor.yy992, TABLE_OPTION_SMA, yymsp[-1].minor.yy364); } - yymsp[-4].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-4].minor.yy490, TABLE_OPTION_SMA, yymsp[-1].minor.yy502); } + yymsp[-4].minor.yy490 = yylhsminor.yy490; break; case 229: /* table_options ::= table_options DELETE_MARK duration_list */ -{ yylhsminor.yy992 = setTableOption(pCxt, yymsp[-2].minor.yy992, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy364); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-2].minor.yy490, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy502); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 230: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy992 = createAlterTableOptions(pCxt); yylhsminor.yy992 = setTableOption(pCxt, yylhsminor.yy992, yymsp[0].minor.yy665.type, &yymsp[0].minor.yy665.val); } - yymsp[0].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createAlterTableOptions(pCxt); yylhsminor.yy490 = setTableOption(pCxt, yylhsminor.yy490, yymsp[0].minor.yy529.type, &yymsp[0].minor.yy529.val); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; case 231: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy992 = setTableOption(pCxt, yymsp[-1].minor.yy992, yymsp[0].minor.yy665.type, &yymsp[0].minor.yy665.val); } - yymsp[-1].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-1].minor.yy490, yymsp[0].minor.yy529.type, &yymsp[0].minor.yy529.val); } + yymsp[-1].minor.yy490 = yylhsminor.yy490; break; case 232: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy665.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy529.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; } break; case 233: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy665.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy665.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy529.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; } break; case 234: /* duration_list ::= duration_literal */ - case 463: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==463); -{ yylhsminor.yy364 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy992)); } - yymsp[0].minor.yy364 = yylhsminor.yy364; + case 464: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==464); +{ yylhsminor.yy502 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); } + yymsp[0].minor.yy502 = yylhsminor.yy502; break; case 235: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 464: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==464); -{ yylhsminor.yy364 = addNodeToList(pCxt, yymsp[-2].minor.yy364, releaseRawExprNode(pCxt, yymsp[0].minor.yy992)); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + case 465: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==465); +{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-2].minor.yy502, releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); } + yymsp[-2].minor.yy502 = yylhsminor.yy502; break; case 238: /* rollup_func_name ::= function_name */ -{ yylhsminor.yy992 = createFunctionNode(pCxt, &yymsp[0].minor.yy929, NULL); } - yymsp[0].minor.yy992 = yylhsminor.yy992; +{ yylhsminor.yy490 = createFunctionNode(pCxt, &yymsp[0].minor.yy561, NULL); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; case 239: /* rollup_func_name ::= FIRST */ case 240: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==240); - case 310: /* tag_item ::= QTAGS */ yytestcase(yyruleno==310); -{ yylhsminor.yy992 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 311: /* tag_item ::= QTAGS */ yytestcase(yyruleno==311); +{ yylhsminor.yy490 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; case 243: /* col_name ::= column_name */ - case 311: /* tag_item ::= column_name */ yytestcase(yyruleno==311); -{ yylhsminor.yy992 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy929); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 312: /* tag_item ::= column_name */ yytestcase(yyruleno==312); +{ yylhsminor.yy490 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy561); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; case 244: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } @@ -5599,19 +5594,19 @@ static YYACTIONTYPE yy_reduce( case 247: /* cmd ::= SHOW db_kind_opt DATABASES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); - setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy430); + setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy579); } break; case 248: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ { - pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy277, yymsp[0].minor.yy992, OP_TYPE_LIKE); + pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy961, yymsp[0].minor.yy490, OP_TYPE_LIKE); } break; case 249: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy992, yymsp[0].minor.yy992, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy490, yymsp[0].minor.yy490, OP_TYPE_LIKE); } break; case 250: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy992, NULL, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy490, NULL, OP_TYPE_LIKE); } break; case 251: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } @@ -5623,10 +5618,10 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; case 254: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy992, yymsp[-1].minor.yy992, OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy490, yymsp[-1].minor.yy490, OP_TYPE_EQUAL); } break; case 255: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy929), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy929), OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy561), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy561), OP_TYPE_EQUAL); } break; case 256: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } @@ -5650,927 +5645,930 @@ static YYACTIONTYPE yy_reduce( case 263: /* cmd ::= SHOW GRANTS LOG */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOG_STMT); } break; - case 264: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy929); } + case 264: /* cmd ::= SHOW CLUSTER MACHINES */ +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT); } break; - case 265: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy992); } + case 265: /* cmd ::= SHOW CREATE DATABASE db_name */ +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy561); } break; - case 266: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy992); } + case 266: /* cmd ::= SHOW CREATE TABLE full_table_name */ +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy490); } break; - case 267: /* cmd ::= SHOW QUERIES */ + case 267: /* cmd ::= SHOW CREATE STABLE full_table_name */ +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy490); } + break; + case 268: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } break; - case 268: /* cmd ::= SHOW SCORES */ + case 269: /* cmd ::= SHOW SCORES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } break; - case 269: /* cmd ::= SHOW TOPICS */ + case 270: /* cmd ::= SHOW TOPICS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } break; - case 270: /* cmd ::= SHOW VARIABLES */ - case 271: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==271); + case 271: /* cmd ::= SHOW VARIABLES */ + case 272: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==272); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } break; - case 272: /* cmd ::= SHOW LOCAL VARIABLES */ + case 273: /* cmd ::= SHOW LOCAL VARIABLES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } break; - case 273: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy992); } + case 274: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ +{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy490); } break; - case 274: /* cmd ::= SHOW BNODES */ + case 275: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } break; - case 275: /* cmd ::= SHOW SNODES */ + case 276: /* cmd ::= SHOW SNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } break; - case 276: /* cmd ::= SHOW CLUSTER */ + case 277: /* cmd ::= SHOW CLUSTER */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } break; - case 277: /* cmd ::= SHOW TRANSACTIONS */ + case 278: /* cmd ::= SHOW TRANSACTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; - case 278: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy992); } + case 279: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ +{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy490); } break; - case 279: /* cmd ::= SHOW CONSUMERS */ + case 280: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } break; - case 280: /* cmd ::= SHOW SUBSCRIPTIONS */ + case 281: /* cmd ::= SHOW SUBSCRIPTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } break; - case 281: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy992, yymsp[-1].minor.yy992, OP_TYPE_EQUAL); } + case 282: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy490, yymsp[-1].minor.yy490, OP_TYPE_EQUAL); } break; - case 282: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy929), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy929), OP_TYPE_EQUAL); } + case 283: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy561), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy561), OP_TYPE_EQUAL); } break; - case 283: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy992, yymsp[0].minor.yy992, yymsp[-3].minor.yy364); } + case 284: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy490, yymsp[0].minor.yy490, yymsp[-3].minor.yy502); } break; - case 284: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy929), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy929), yymsp[-4].minor.yy364); } + case 285: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy561), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy561), yymsp[-4].minor.yy502); } break; - case 285: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + case 286: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } break; - case 286: /* cmd ::= SHOW VNODES */ + case 287: /* cmd ::= SHOW VNODES */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, NULL); } break; - case 287: /* cmd ::= SHOW db_name_cond_opt ALIVE */ -{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy992, QUERY_NODE_SHOW_DB_ALIVE_STMT); } + case 288: /* cmd ::= SHOW db_name_cond_opt ALIVE */ +{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy490, QUERY_NODE_SHOW_DB_ALIVE_STMT); } break; - case 288: /* cmd ::= SHOW CLUSTER ALIVE */ + case 289: /* cmd ::= SHOW CLUSTER ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } break; - case 289: /* cmd ::= SHOW db_name_cond_opt VIEWS */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-1].minor.yy992, NULL, OP_TYPE_LIKE); } + case 290: /* cmd ::= SHOW db_name_cond_opt VIEWS */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-1].minor.yy490, NULL, OP_TYPE_LIKE); } break; - case 290: /* cmd ::= SHOW CREATE VIEW full_table_name */ -{ pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy992); } + case 291: /* cmd ::= SHOW CREATE VIEW full_table_name */ +{ pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy490); } break; - case 291: /* cmd ::= SHOW COMPACTS */ + case 292: /* cmd ::= SHOW COMPACTS */ { pCxt->pRootNode = createShowCompactsStmt(pCxt, QUERY_NODE_SHOW_COMPACTS_STMT); } break; - case 292: /* cmd ::= SHOW COMPACT NK_INTEGER */ + case 293: /* cmd ::= SHOW COMPACT NK_INTEGER */ { pCxt->pRootNode = createShowCompactDetailsStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 293: /* table_kind_db_name_cond_opt ::= */ -{ yymsp[1].minor.yy277.kind = SHOW_KIND_ALL; yymsp[1].minor.yy277.dbName = nil_token; } + case 294: /* table_kind_db_name_cond_opt ::= */ +{ yymsp[1].minor.yy961.kind = SHOW_KIND_ALL; yymsp[1].minor.yy961.dbName = nil_token; } break; - case 294: /* table_kind_db_name_cond_opt ::= table_kind */ -{ yylhsminor.yy277.kind = yymsp[0].minor.yy430; yylhsminor.yy277.dbName = nil_token; } - yymsp[0].minor.yy277 = yylhsminor.yy277; + case 295: /* table_kind_db_name_cond_opt ::= table_kind */ +{ yylhsminor.yy961.kind = yymsp[0].minor.yy579; yylhsminor.yy961.dbName = nil_token; } + yymsp[0].minor.yy961 = yylhsminor.yy961; break; - case 295: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy277.kind = SHOW_KIND_ALL; yylhsminor.yy277.dbName = yymsp[-1].minor.yy929; } - yymsp[-1].minor.yy277 = yylhsminor.yy277; + case 296: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ +{ yylhsminor.yy961.kind = SHOW_KIND_ALL; yylhsminor.yy961.dbName = yymsp[-1].minor.yy561; } + yymsp[-1].minor.yy961 = yylhsminor.yy961; break; - case 296: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ -{ yylhsminor.yy277.kind = yymsp[-2].minor.yy430; yylhsminor.yy277.dbName = yymsp[-1].minor.yy929; } - yymsp[-2].minor.yy277 = yylhsminor.yy277; + case 297: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ +{ yylhsminor.yy961.kind = yymsp[-2].minor.yy579; yylhsminor.yy961.dbName = yymsp[-1].minor.yy561; } + yymsp[-2].minor.yy961 = yylhsminor.yy961; break; - case 297: /* table_kind ::= NORMAL */ -{ yymsp[0].minor.yy430 = SHOW_KIND_TABLES_NORMAL; } + case 298: /* table_kind ::= NORMAL */ +{ yymsp[0].minor.yy579 = SHOW_KIND_TABLES_NORMAL; } break; - case 298: /* table_kind ::= CHILD */ -{ yymsp[0].minor.yy430 = SHOW_KIND_TABLES_CHILD; } + case 299: /* table_kind ::= CHILD */ +{ yymsp[0].minor.yy579 = SHOW_KIND_TABLES_CHILD; } break; - case 299: /* db_name_cond_opt ::= */ - case 304: /* from_db_opt ::= */ yytestcase(yyruleno==304); -{ yymsp[1].minor.yy992 = createDefaultDatabaseCondValue(pCxt); } + case 300: /* db_name_cond_opt ::= */ + case 305: /* from_db_opt ::= */ yytestcase(yyruleno==305); +{ yymsp[1].minor.yy490 = createDefaultDatabaseCondValue(pCxt); } break; - case 300: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy992 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy929); } - yymsp[-1].minor.yy992 = yylhsminor.yy992; + case 301: /* db_name_cond_opt ::= db_name NK_DOT */ +{ yylhsminor.yy490 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy561); } + yymsp[-1].minor.yy490 = yylhsminor.yy490; break; - case 302: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + case 303: /* like_pattern_opt ::= LIKE NK_STRING */ +{ yymsp[-1].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; - case 303: /* table_name_cond ::= table_name */ -{ yylhsminor.yy992 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy929); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 304: /* table_name_cond ::= table_name */ +{ yylhsminor.yy490 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy561); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 305: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy992 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy929); } + case 306: /* from_db_opt ::= FROM db_name */ +{ yymsp[-1].minor.yy490 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy561); } break; - case 309: /* tag_item ::= TBNAME */ -{ yylhsminor.yy992 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 310: /* tag_item ::= TBNAME */ +{ yylhsminor.yy490 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 312: /* tag_item ::= column_name column_alias */ -{ yylhsminor.yy992 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy929), &yymsp[0].minor.yy929); } - yymsp[-1].minor.yy992 = yylhsminor.yy992; + case 313: /* tag_item ::= column_name column_alias */ +{ yylhsminor.yy490 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy561), &yymsp[0].minor.yy561); } + yymsp[-1].minor.yy490 = yylhsminor.yy490; break; - case 313: /* tag_item ::= column_name AS column_alias */ -{ yylhsminor.yy992 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy929), &yymsp[0].minor.yy929); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 314: /* tag_item ::= column_name AS column_alias */ +{ yylhsminor.yy490 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy561), &yymsp[0].minor.yy561); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 314: /* db_kind_opt ::= */ -{ yymsp[1].minor.yy430 = SHOW_KIND_ALL; } + case 315: /* db_kind_opt ::= */ +{ yymsp[1].minor.yy579 = SHOW_KIND_ALL; } break; - case 315: /* db_kind_opt ::= USER */ -{ yymsp[0].minor.yy430 = SHOW_KIND_DATABASES_USER; } + case 316: /* db_kind_opt ::= USER */ +{ yymsp[0].minor.yy579 = SHOW_KIND_DATABASES_USER; } break; - case 316: /* db_kind_opt ::= SYSTEM */ -{ yymsp[0].minor.yy430 = SHOW_KIND_DATABASES_SYSTEM; } + case 317: /* db_kind_opt ::= SYSTEM */ +{ yymsp[0].minor.yy579 = SHOW_KIND_DATABASES_SYSTEM; } break; - case 317: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy437, yymsp[-3].minor.yy992, yymsp[-1].minor.yy992, NULL, yymsp[0].minor.yy992); } + case 318: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy845, yymsp[-3].minor.yy490, yymsp[-1].minor.yy490, NULL, yymsp[0].minor.yy490); } break; - case 318: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy437, yymsp[-5].minor.yy992, yymsp[-3].minor.yy992, yymsp[-1].minor.yy364, NULL); } + case 319: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy845, yymsp[-5].minor.yy490, yymsp[-3].minor.yy490, yymsp[-1].minor.yy502, NULL); } break; - case 319: /* cmd ::= DROP INDEX exists_opt full_index_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy437, yymsp[0].minor.yy992); } + case 320: /* cmd ::= DROP INDEX exists_opt full_index_name */ +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy845, yymsp[0].minor.yy490); } break; - case 320: /* full_index_name ::= index_name */ -{ yylhsminor.yy992 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy929); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 321: /* full_index_name ::= index_name */ +{ yylhsminor.yy490 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy561); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 321: /* full_index_name ::= db_name NK_DOT index_name */ -{ yylhsminor.yy992 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy929); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 322: /* full_index_name ::= db_name NK_DOT index_name */ +{ yylhsminor.yy490 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy561); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 322: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-9].minor.yy992 = createIndexOption(pCxt, yymsp[-7].minor.yy364, releaseRawExprNode(pCxt, yymsp[-3].minor.yy992), NULL, yymsp[-1].minor.yy992, yymsp[0].minor.yy992); } + case 323: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ +{ yymsp[-9].minor.yy490 = createIndexOption(pCxt, yymsp[-7].minor.yy502, releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), NULL, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); } break; - case 323: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-11].minor.yy992 = createIndexOption(pCxt, yymsp[-9].minor.yy364, releaseRawExprNode(pCxt, yymsp[-5].minor.yy992), releaseRawExprNode(pCxt, yymsp[-3].minor.yy992), yymsp[-1].minor.yy992, yymsp[0].minor.yy992); } + case 324: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ +{ yymsp[-11].minor.yy490 = createIndexOption(pCxt, yymsp[-9].minor.yy502, releaseRawExprNode(pCxt, yymsp[-5].minor.yy490), releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), yymsp[-1].minor.yy490, yymsp[0].minor.yy490); } break; - case 326: /* func ::= sma_func_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy992 = createFunctionNode(pCxt, &yymsp[-3].minor.yy929, yymsp[-1].minor.yy364); } - yymsp[-3].minor.yy992 = yylhsminor.yy992; + case 327: /* func ::= sma_func_name NK_LP expression_list NK_RP */ +{ yylhsminor.yy490 = createFunctionNode(pCxt, &yymsp[-3].minor.yy561, yymsp[-1].minor.yy502); } + yymsp[-3].minor.yy490 = yylhsminor.yy490; break; - case 327: /* sma_func_name ::= function_name */ - case 552: /* alias_opt ::= table_alias */ yytestcase(yyruleno==552); -{ yylhsminor.yy929 = yymsp[0].minor.yy929; } - yymsp[0].minor.yy929 = yylhsminor.yy929; + case 328: /* sma_func_name ::= function_name */ + case 553: /* alias_opt ::= table_alias */ yytestcase(yyruleno==553); +{ yylhsminor.yy561 = yymsp[0].minor.yy561; } + yymsp[0].minor.yy561 = yylhsminor.yy561; break; - case 332: /* sma_stream_opt ::= */ - case 377: /* stream_options ::= */ yytestcase(yyruleno==377); -{ yymsp[1].minor.yy992 = createStreamOptions(pCxt); } + case 333: /* sma_stream_opt ::= */ + case 378: /* stream_options ::= */ yytestcase(yyruleno==378); +{ yymsp[1].minor.yy490 = createStreamOptions(pCxt); } break; - case 333: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy992)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy992); yylhsminor.yy992 = yymsp[-2].minor.yy992; } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 334: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy490)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy490); yylhsminor.yy490 = yymsp[-2].minor.yy490; } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 334: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy992)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy992); yylhsminor.yy992 = yymsp[-2].minor.yy992; } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 335: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy490)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy490); yylhsminor.yy490 = yymsp[-2].minor.yy490; } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 335: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy992)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy992); yylhsminor.yy992 = yymsp[-2].minor.yy992; } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 336: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy490)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy490); yylhsminor.yy490 = yymsp[-2].minor.yy490; } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 336: /* with_meta ::= AS */ -{ yymsp[0].minor.yy40 = 0; } + case 337: /* with_meta ::= AS */ +{ yymsp[0].minor.yy774 = 0; } break; - case 337: /* with_meta ::= WITH META AS */ -{ yymsp[-2].minor.yy40 = 1; } + case 338: /* with_meta ::= WITH META AS */ +{ yymsp[-2].minor.yy774 = 1; } break; - case 338: /* with_meta ::= ONLY META AS */ -{ yymsp[-2].minor.yy40 = 2; } + case 339: /* with_meta ::= ONLY META AS */ +{ yymsp[-2].minor.yy774 = 2; } break; - case 339: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy437, &yymsp[-2].minor.yy929, yymsp[0].minor.yy992); } + case 340: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ +{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy845, &yymsp[-2].minor.yy561, yymsp[0].minor.yy490); } break; - case 340: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy437, &yymsp[-3].minor.yy929, &yymsp[0].minor.yy929, yymsp[-2].minor.yy40); } + case 341: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy845, &yymsp[-3].minor.yy561, &yymsp[0].minor.yy561, yymsp[-2].minor.yy774); } break; - case 341: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy437, &yymsp[-4].minor.yy929, yymsp[-1].minor.yy992, yymsp[-3].minor.yy40, yymsp[0].minor.yy992); } + case 342: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy845, &yymsp[-4].minor.yy561, yymsp[-1].minor.yy490, yymsp[-3].minor.yy774, yymsp[0].minor.yy490); } break; - case 342: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy437, &yymsp[0].minor.yy929); } + case 343: /* cmd ::= DROP TOPIC exists_opt topic_name */ +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy845, &yymsp[0].minor.yy561); } break; - case 343: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy437, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy929); } + case 344: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy845, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy561); } break; - case 344: /* cmd ::= DESC full_table_name */ - case 345: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==345); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy992); } + case 345: /* cmd ::= DESC full_table_name */ + case 346: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==346); +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy490); } break; - case 346: /* cmd ::= RESET QUERY CACHE */ + case 347: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 347: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - case 348: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==348); -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy437, yymsp[-1].minor.yy992, yymsp[0].minor.yy992); } + case 348: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + case 349: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==349); +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy845, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); } break; - case 351: /* explain_options ::= */ -{ yymsp[1].minor.yy992 = createDefaultExplainOptions(pCxt); } + case 352: /* explain_options ::= */ +{ yymsp[1].minor.yy490 = createDefaultExplainOptions(pCxt); } break; - case 352: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy992 = setExplainVerbose(pCxt, yymsp[-2].minor.yy992, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 353: /* explain_options ::= explain_options VERBOSE NK_BOOL */ +{ yylhsminor.yy490 = setExplainVerbose(pCxt, yymsp[-2].minor.yy490, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 353: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy992 = setExplainRatio(pCxt, yymsp[-2].minor.yy992, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 354: /* explain_options ::= explain_options RATIO NK_FLOAT */ +{ yylhsminor.yy490 = setExplainRatio(pCxt, yymsp[-2].minor.yy490, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 354: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ -{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy437, yymsp[-9].minor.yy437, &yymsp[-6].minor.yy929, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy184, yymsp[-1].minor.yy40, &yymsp[0].minor.yy929, yymsp[-10].minor.yy437); } + case 355: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy845, yymsp[-9].minor.yy845, &yymsp[-6].minor.yy561, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy826, yymsp[-1].minor.yy774, &yymsp[0].minor.yy561, yymsp[-10].minor.yy845); } break; - case 355: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy437, &yymsp[0].minor.yy929); } + case 356: /* cmd ::= DROP FUNCTION exists_opt function_name */ +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy845, &yymsp[0].minor.yy561); } break; - case 360: /* language_opt ::= */ - case 399: /* on_vgroup_id ::= */ yytestcase(yyruleno==399); -{ yymsp[1].minor.yy929 = nil_token; } + case 361: /* language_opt ::= */ + case 400: /* on_vgroup_id ::= */ yytestcase(yyruleno==400); +{ yymsp[1].minor.yy561 = nil_token; } break; - case 361: /* language_opt ::= LANGUAGE NK_STRING */ - case 400: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==400); -{ yymsp[-1].minor.yy929 = yymsp[0].minor.yy0; } + case 362: /* language_opt ::= LANGUAGE NK_STRING */ + case 401: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==401); +{ yymsp[-1].minor.yy561 = yymsp[0].minor.yy0; } break; - case 364: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy437, yymsp[-2].minor.yy992, &yymsp[-1].minor.yy0, yymsp[0].minor.yy992); } + case 365: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ +{ pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy845, yymsp[-2].minor.yy490, &yymsp[-1].minor.yy0, yymsp[0].minor.yy490); } break; - case 365: /* cmd ::= DROP VIEW exists_opt full_view_name */ -{ pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy437, yymsp[0].minor.yy992); } + case 366: /* cmd ::= DROP VIEW exists_opt full_view_name */ +{ pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy845, yymsp[0].minor.yy490); } break; - case 366: /* full_view_name ::= view_name */ -{ yylhsminor.yy992 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy929); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 367: /* full_view_name ::= view_name */ +{ yylhsminor.yy490 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy561); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 367: /* full_view_name ::= db_name NK_DOT view_name */ -{ yylhsminor.yy992 = createViewNode(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy929); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 368: /* full_view_name ::= db_name NK_DOT view_name */ +{ yylhsminor.yy490 = createViewNode(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy561); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 368: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy437, &yymsp[-8].minor.yy929, yymsp[-5].minor.yy992, yymsp[-7].minor.yy992, yymsp[-3].minor.yy364, yymsp[-2].minor.yy992, yymsp[0].minor.yy992, yymsp[-4].minor.yy364); } + case 369: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy845, &yymsp[-8].minor.yy561, yymsp[-5].minor.yy490, yymsp[-7].minor.yy490, yymsp[-3].minor.yy502, yymsp[-2].minor.yy490, yymsp[0].minor.yy490, yymsp[-4].minor.yy502); } break; - case 369: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy437, &yymsp[0].minor.yy929); } + case 370: /* cmd ::= DROP STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy845, &yymsp[0].minor.yy561); } break; - case 370: /* cmd ::= PAUSE STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy437, &yymsp[0].minor.yy929); } + case 371: /* cmd ::= PAUSE STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy845, &yymsp[0].minor.yy561); } break; - case 371: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ -{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy437, yymsp[-1].minor.yy437, &yymsp[0].minor.yy929); } + case 372: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ +{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy845, yymsp[-1].minor.yy845, &yymsp[0].minor.yy561); } break; - case 378: /* stream_options ::= stream_options TRIGGER AT_ONCE */ - case 379: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==379); -{ yylhsminor.yy992 = setStreamOptions(pCxt, yymsp[-2].minor.yy992, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 379: /* stream_options ::= stream_options TRIGGER AT_ONCE */ + case 380: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==380); +{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-2].minor.yy490, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 380: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -{ yylhsminor.yy992 = setStreamOptions(pCxt, yymsp[-3].minor.yy992, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy992)); } - yymsp[-3].minor.yy992 = yylhsminor.yy992; + case 381: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ +{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-3].minor.yy490, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); } + yymsp[-3].minor.yy490 = yylhsminor.yy490; break; - case 381: /* stream_options ::= stream_options WATERMARK duration_literal */ -{ yylhsminor.yy992 = setStreamOptions(pCxt, yymsp[-2].minor.yy992, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy992)); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 382: /* stream_options ::= stream_options WATERMARK duration_literal */ +{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-2].minor.yy490, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 382: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -{ yylhsminor.yy992 = setStreamOptions(pCxt, yymsp[-3].minor.yy992, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-3].minor.yy992 = yylhsminor.yy992; + case 383: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ +{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-3].minor.yy490, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-3].minor.yy490 = yylhsminor.yy490; break; - case 383: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -{ yylhsminor.yy992 = setStreamOptions(pCxt, yymsp[-2].minor.yy992, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 384: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ +{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-2].minor.yy490, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 384: /* stream_options ::= stream_options DELETE_MARK duration_literal */ -{ yylhsminor.yy992 = setStreamOptions(pCxt, yymsp[-2].minor.yy992, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy992)); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 385: /* stream_options ::= stream_options DELETE_MARK duration_literal */ +{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-2].minor.yy490, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 385: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ -{ yylhsminor.yy992 = setStreamOptions(pCxt, yymsp[-3].minor.yy992, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-3].minor.yy992 = yylhsminor.yy992; + case 386: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ +{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-3].minor.yy490, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-3].minor.yy490 = yylhsminor.yy490; break; - case 387: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 590: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==590); - case 614: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==614); -{ yymsp[-3].minor.yy992 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy992); } + case 388: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 591: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==591); + case 615: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==615); +{ yymsp[-3].minor.yy490 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy490); } break; - case 390: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 391: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 391: /* cmd ::= KILL QUERY NK_STRING */ + case 392: /* cmd ::= KILL QUERY NK_STRING */ { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 392: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 393: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 393: /* cmd ::= KILL COMPACT NK_INTEGER */ + case 394: /* cmd ::= KILL COMPACT NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_COMPACT_STMT, &yymsp[0].minor.yy0); } break; - case 394: /* cmd ::= BALANCE VGROUP */ + case 395: /* cmd ::= BALANCE VGROUP */ { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } break; - case 395: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ -{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy929); } + case 396: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ +{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy561); } break; - case 396: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 397: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 397: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy364); } + case 398: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy502); } break; - case 398: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 399: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 401: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy364 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + case 402: /* dnode_list ::= DNODE NK_INTEGER */ +{ yymsp[-1].minor.yy502 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 403: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy992, yymsp[0].minor.yy992); } + case 404: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ +{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); } break; - case 406: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -{ yymsp[-6].minor.yy992 = createInsertStmt(pCxt, yymsp[-4].minor.yy992, yymsp[-2].minor.yy364, yymsp[0].minor.yy992); } + case 407: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ +{ yymsp[-6].minor.yy490 = createInsertStmt(pCxt, yymsp[-4].minor.yy490, yymsp[-2].minor.yy502, yymsp[0].minor.yy490); } break; - case 407: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ -{ yymsp[-3].minor.yy992 = createInsertStmt(pCxt, yymsp[-1].minor.yy992, NULL, yymsp[0].minor.yy992); } + case 408: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ +{ yymsp[-3].minor.yy490 = createInsertStmt(pCxt, yymsp[-1].minor.yy490, NULL, yymsp[0].minor.yy490); } break; - case 408: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 409: /* literal ::= NK_INTEGER */ +{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 409: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 410: /* literal ::= NK_FLOAT */ +{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 410: /* literal ::= NK_STRING */ -{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 411: /* literal ::= NK_STRING */ +{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 411: /* literal ::= NK_BOOL */ -{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 412: /* literal ::= NK_BOOL */ +{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 412: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy992 = yylhsminor.yy992; + case 413: /* literal ::= TIMESTAMP NK_STRING */ +{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy490 = yylhsminor.yy490; break; - case 413: /* literal ::= duration_literal */ - case 423: /* signed_literal ::= signed */ yytestcase(yyruleno==423); - case 446: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==446); - case 447: /* expression ::= literal */ yytestcase(yyruleno==447); - case 449: /* expression ::= column_reference */ yytestcase(yyruleno==449); - case 450: /* expression ::= function_expression */ yytestcase(yyruleno==450); - case 451: /* expression ::= case_when_expression */ yytestcase(yyruleno==451); - case 484: /* function_expression ::= literal_func */ yytestcase(yyruleno==484); - case 533: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==533); - case 537: /* boolean_primary ::= predicate */ yytestcase(yyruleno==537); - case 539: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==539); - case 540: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==540); - case 543: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==543); - case 545: /* table_reference ::= table_primary */ yytestcase(yyruleno==545); - case 546: /* table_reference ::= joined_table */ yytestcase(yyruleno==546); - case 550: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==550); - case 616: /* query_simple ::= query_specification */ yytestcase(yyruleno==616); - case 617: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==617); - case 620: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==620); - case 622: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==622); -{ yylhsminor.yy992 = yymsp[0].minor.yy992; } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 414: /* literal ::= duration_literal */ + case 424: /* signed_literal ::= signed */ yytestcase(yyruleno==424); + case 447: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==447); + case 448: /* expression ::= literal */ yytestcase(yyruleno==448); + case 450: /* expression ::= column_reference */ yytestcase(yyruleno==450); + case 451: /* expression ::= function_expression */ yytestcase(yyruleno==451); + case 452: /* expression ::= case_when_expression */ yytestcase(yyruleno==452); + case 485: /* function_expression ::= literal_func */ yytestcase(yyruleno==485); + case 534: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==534); + case 538: /* boolean_primary ::= predicate */ yytestcase(yyruleno==538); + case 540: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==540); + case 541: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==541); + case 544: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==544); + case 546: /* table_reference ::= table_primary */ yytestcase(yyruleno==546); + case 547: /* table_reference ::= joined_table */ yytestcase(yyruleno==547); + case 551: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==551); + case 617: /* query_simple ::= query_specification */ yytestcase(yyruleno==617); + case 618: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==618); + case 621: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==621); + case 623: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==623); +{ yylhsminor.yy490 = yymsp[0].minor.yy490; } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 414: /* literal ::= NULL */ -{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 415: /* literal ::= NULL */ +{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 415: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 416: /* literal ::= NK_QUESTION */ +{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 416: /* duration_literal ::= NK_VARIABLE */ - case 591: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==591); - case 592: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==592); - case 593: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==593); -{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 417: /* duration_literal ::= NK_VARIABLE */ + case 592: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==592); + case 593: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==593); + case 594: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==594); +{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 417: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 418: /* signed ::= NK_INTEGER */ +{ yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 418: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + case 419: /* signed ::= NK_PLUS NK_INTEGER */ +{ yymsp[-1].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; - case 419: /* signed ::= NK_MINUS NK_INTEGER */ + case 420: /* 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.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy992 = yylhsminor.yy992; + yymsp[-1].minor.yy490 = yylhsminor.yy490; break; - case 420: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 421: /* signed ::= NK_FLOAT */ +{ yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 421: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + case 422: /* signed ::= NK_PLUS NK_FLOAT */ +{ yymsp[-1].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 422: /* signed ::= NK_MINUS NK_FLOAT */ + case 423: /* 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.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy992 = yylhsminor.yy992; + yymsp[-1].minor.yy490 = yylhsminor.yy490; break; - case 424: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 425: /* signed_literal ::= NK_STRING */ +{ yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 425: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 426: /* signed_literal ::= NK_BOOL */ +{ yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 426: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + case 427: /* signed_literal ::= TIMESTAMP NK_STRING */ +{ yymsp[-1].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 427: /* signed_literal ::= duration_literal */ - case 429: /* signed_literal ::= literal_func */ yytestcase(yyruleno==429); - case 504: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==504); - case 570: /* select_item ::= common_expression */ yytestcase(yyruleno==570); - case 580: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==580); - case 621: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==621); - case 623: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==623); - case 636: /* search_condition ::= common_expression */ yytestcase(yyruleno==636); -{ yylhsminor.yy992 = releaseRawExprNode(pCxt, yymsp[0].minor.yy992); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 428: /* signed_literal ::= duration_literal */ + case 430: /* signed_literal ::= literal_func */ yytestcase(yyruleno==430); + case 505: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==505); + case 571: /* select_item ::= common_expression */ yytestcase(yyruleno==571); + case 581: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==581); + case 622: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==622); + case 624: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==624); + case 637: /* search_condition ::= common_expression */ yytestcase(yyruleno==637); +{ yylhsminor.yy490 = releaseRawExprNode(pCxt, yymsp[0].minor.yy490); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 428: /* signed_literal ::= NULL */ -{ yylhsminor.yy992 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 429: /* signed_literal ::= NULL */ +{ yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 430: /* signed_literal ::= NK_QUESTION */ -{ yylhsminor.yy992 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 431: /* signed_literal ::= NK_QUESTION */ +{ yylhsminor.yy490 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 448: /* expression ::= pseudo_column */ -{ yylhsminor.yy992 = yymsp[0].minor.yy992; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy992, true); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 449: /* expression ::= pseudo_column */ +{ yylhsminor.yy490 = yymsp[0].minor.yy490; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy490, true); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 452: /* expression ::= NK_LP expression NK_RP */ - case 538: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==538); - case 635: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==635); -{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy992)); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 453: /* expression ::= NK_LP expression NK_RP */ + case 539: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==539); + case 636: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==636); +{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy490)); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 453: /* expression ::= NK_PLUS expr_or_subquery */ + case 454: /* expression ::= NK_PLUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); - yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy992)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490); + yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); } - yymsp[-1].minor.yy992 = yylhsminor.yy992; + yymsp[-1].minor.yy490 = yylhsminor.yy490; break; - case 454: /* expression ::= NK_MINUS expr_or_subquery */ + case 455: /* expression ::= NK_MINUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); - yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy992), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490); + yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy490), NULL)); } - yymsp[-1].minor.yy992 = yylhsminor.yy992; + yymsp[-1].minor.yy490 = yylhsminor.yy490; break; - case 455: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + case 456: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); - yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490); + yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490))); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 456: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + case 457: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); - yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490); + yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490))); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 457: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + case 458: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); - yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490); + yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490))); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 458: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + case 459: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); - yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490); + yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490))); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 459: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ + case 460: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); - yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490); + yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490))); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 460: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 461: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); - yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490); + yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 461: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + case 462: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); - yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490); + yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490))); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 462: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + case 463: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); - yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490); + yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490))); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 465: /* column_reference ::= column_name */ -{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy929, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy929)); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 466: /* column_reference ::= column_name */ +{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy561, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy561)); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 466: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy929, createColumnNode(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy929)); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 467: /* column_reference ::= table_name NK_DOT column_name */ +{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy561, createColumnNode(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy561)); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 467: /* column_reference ::= NK_ALIAS */ -{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 468: /* column_reference ::= NK_ALIAS */ +{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 468: /* column_reference ::= table_name NK_DOT NK_ALIAS */ -{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 469: /* column_reference ::= table_name NK_DOT NK_ALIAS */ +{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 469: /* pseudo_column ::= ROWTS */ - case 470: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==470); - case 472: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==472); - case 473: /* pseudo_column ::= QEND */ yytestcase(yyruleno==473); - case 474: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==474); - case 475: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==475); - case 476: /* pseudo_column ::= WEND */ yytestcase(yyruleno==476); - case 477: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==477); - case 478: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==478); - case 479: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==479); - case 480: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==480); - case 486: /* literal_func ::= NOW */ yytestcase(yyruleno==486); -{ yylhsminor.yy992 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 470: /* pseudo_column ::= ROWTS */ + case 471: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==471); + case 473: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==473); + case 474: /* pseudo_column ::= QEND */ yytestcase(yyruleno==474); + case 475: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==475); + case 476: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==476); + case 477: /* pseudo_column ::= WEND */ yytestcase(yyruleno==477); + case 478: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==478); + case 479: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==479); + case 480: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==480); + case 481: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==481); + case 487: /* literal_func ::= NOW */ yytestcase(yyruleno==487); +{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 471: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy929)))); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 472: /* pseudo_column ::= table_name NK_DOT TBNAME */ +{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy561)))); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 481: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 482: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==482); -{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy929, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy929, yymsp[-1].minor.yy364)); } - yymsp[-3].minor.yy992 = yylhsminor.yy992; + case 482: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 483: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==483); +{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy561, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy561, yymsp[-1].minor.yy502)); } + yymsp[-3].minor.yy490 = yylhsminor.yy490; break; - case 483: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ -{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy992), yymsp[-1].minor.yy184)); } - yymsp[-5].minor.yy992 = yylhsminor.yy992; + case 484: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ +{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), yymsp[-1].minor.yy826)); } + yymsp[-5].minor.yy490 = yylhsminor.yy490; break; - case 485: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy929, NULL)); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 486: /* literal_func ::= noarg_func NK_LP NK_RP */ +{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy561, NULL)); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 500: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy364 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy364 = yylhsminor.yy364; + case 501: /* star_func_para_list ::= NK_STAR */ +{ yylhsminor.yy502 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy502 = yylhsminor.yy502; break; - case 505: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 573: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==573); -{ yylhsminor.yy992 = createColumnNode(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 506: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 574: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==574); +{ yylhsminor.yy490 = createColumnNode(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 506: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ -{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy364, yymsp[-1].minor.yy992)); } - yymsp[-3].minor.yy992 = yylhsminor.yy992; + case 507: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ +{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy502, yymsp[-1].minor.yy490)); } + yymsp[-3].minor.yy490 = yylhsminor.yy490; break; - case 507: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ -{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy992), yymsp[-2].minor.yy364, yymsp[-1].minor.yy992)); } - yymsp[-4].minor.yy992 = yylhsminor.yy992; + case 508: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ +{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), yymsp[-2].minor.yy502, yymsp[-1].minor.yy490)); } + yymsp[-4].minor.yy490 = yylhsminor.yy490; break; - case 510: /* when_then_expr ::= WHEN common_expression THEN common_expression */ -{ yymsp[-3].minor.yy992 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992)); } + case 511: /* when_then_expr ::= WHEN common_expression THEN common_expression */ +{ yymsp[-3].minor.yy490 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); } break; - case 512: /* case_when_else_opt ::= ELSE common_expression */ -{ yymsp[-1].minor.yy992 = releaseRawExprNode(pCxt, yymsp[0].minor.yy992); } + case 513: /* case_when_else_opt ::= ELSE common_expression */ +{ yymsp[-1].minor.yy490 = releaseRawExprNode(pCxt, yymsp[0].minor.yy490); } break; - case 513: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 518: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==518); + case 514: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 519: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==519); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); - yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy20, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490); + yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy30, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490))); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 514: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 515: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy992); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); - yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy992), releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy490); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490); + yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy490), releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490))); } - yymsp[-4].minor.yy992 = yylhsminor.yy992; + yymsp[-4].minor.yy490 = yylhsminor.yy490; break; - case 515: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 516: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy992); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); - yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy992), releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy490); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490); + yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy490), releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490))); } - yymsp[-5].minor.yy992 = yylhsminor.yy992; + yymsp[-5].minor.yy490 = yylhsminor.yy490; break; - case 516: /* predicate ::= expr_or_subquery IS NULL */ + case 517: /* predicate ::= expr_or_subquery IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); - yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490); + yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), NULL)); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 517: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 518: /* predicate ::= expr_or_subquery IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy992); - yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy992), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy490); + yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), NULL)); } - yymsp[-3].minor.yy992 = yylhsminor.yy992; + yymsp[-3].minor.yy490 = yylhsminor.yy490; break; - case 519: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy20 = OP_TYPE_LOWER_THAN; } + case 520: /* compare_op ::= NK_LT */ +{ yymsp[0].minor.yy30 = OP_TYPE_LOWER_THAN; } break; - case 520: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy20 = OP_TYPE_GREATER_THAN; } + case 521: /* compare_op ::= NK_GT */ +{ yymsp[0].minor.yy30 = OP_TYPE_GREATER_THAN; } break; - case 521: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy20 = OP_TYPE_LOWER_EQUAL; } + case 522: /* compare_op ::= NK_LE */ +{ yymsp[0].minor.yy30 = OP_TYPE_LOWER_EQUAL; } break; - case 522: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy20 = OP_TYPE_GREATER_EQUAL; } + case 523: /* compare_op ::= NK_GE */ +{ yymsp[0].minor.yy30 = OP_TYPE_GREATER_EQUAL; } break; - case 523: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy20 = OP_TYPE_NOT_EQUAL; } + case 524: /* compare_op ::= NK_NE */ +{ yymsp[0].minor.yy30 = OP_TYPE_NOT_EQUAL; } break; - case 524: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy20 = OP_TYPE_EQUAL; } + case 525: /* compare_op ::= NK_EQ */ +{ yymsp[0].minor.yy30 = OP_TYPE_EQUAL; } break; - case 525: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy20 = OP_TYPE_LIKE; } + case 526: /* compare_op ::= LIKE */ +{ yymsp[0].minor.yy30 = OP_TYPE_LIKE; } break; - case 526: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy20 = OP_TYPE_NOT_LIKE; } + case 527: /* compare_op ::= NOT LIKE */ +{ yymsp[-1].minor.yy30 = OP_TYPE_NOT_LIKE; } break; - case 527: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy20 = OP_TYPE_MATCH; } + case 528: /* compare_op ::= MATCH */ +{ yymsp[0].minor.yy30 = OP_TYPE_MATCH; } break; - case 528: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy20 = OP_TYPE_NMATCH; } + case 529: /* compare_op ::= NMATCH */ +{ yymsp[0].minor.yy30 = OP_TYPE_NMATCH; } break; - case 529: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy20 = OP_TYPE_JSON_CONTAINS; } + case 530: /* compare_op ::= CONTAINS */ +{ yymsp[0].minor.yy30 = OP_TYPE_JSON_CONTAINS; } break; - case 530: /* in_op ::= IN */ -{ yymsp[0].minor.yy20 = OP_TYPE_IN; } + case 531: /* in_op ::= IN */ +{ yymsp[0].minor.yy30 = OP_TYPE_IN; } break; - case 531: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy20 = OP_TYPE_NOT_IN; } + case 532: /* in_op ::= NOT IN */ +{ yymsp[-1].minor.yy30 = OP_TYPE_NOT_IN; } break; - case 532: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy364)); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 533: /* in_predicate_value ::= NK_LP literal_list NK_RP */ +{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy502)); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 534: /* boolean_value_expression ::= NOT boolean_primary */ + case 535: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); - yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy992), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490); + yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy490), NULL)); } - yymsp[-1].minor.yy992 = yylhsminor.yy992; + yymsp[-1].minor.yy490 = yylhsminor.yy490; break; - case 535: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 536: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); - yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490); + yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490))); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 536: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 537: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy992); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy992); - yylhsminor.yy992 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490); + yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490))); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 544: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy992 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy992, yymsp[0].minor.yy992, NULL); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 545: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +{ yylhsminor.yy490 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy490, yymsp[0].minor.yy490, NULL); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 547: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy992 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy929, &yymsp[0].minor.yy929); } - yymsp[-1].minor.yy992 = yylhsminor.yy992; + case 548: /* table_primary ::= table_name alias_opt */ +{ yylhsminor.yy490 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy561, &yymsp[0].minor.yy561); } + yymsp[-1].minor.yy490 = yylhsminor.yy490; break; - case 548: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy992 = createRealTableNode(pCxt, &yymsp[-3].minor.yy929, &yymsp[-1].minor.yy929, &yymsp[0].minor.yy929); } - yymsp[-3].minor.yy992 = yylhsminor.yy992; + case 549: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +{ yylhsminor.yy490 = createRealTableNode(pCxt, &yymsp[-3].minor.yy561, &yymsp[-1].minor.yy561, &yymsp[0].minor.yy561); } + yymsp[-3].minor.yy490 = yylhsminor.yy490; break; - case 549: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy992 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy992), &yymsp[0].minor.yy929); } - yymsp[-1].minor.yy992 = yylhsminor.yy992; + case 550: /* table_primary ::= subquery alias_opt */ +{ yylhsminor.yy490 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy490), &yymsp[0].minor.yy561); } + yymsp[-1].minor.yy490 = yylhsminor.yy490; break; - case 551: /* alias_opt ::= */ -{ yymsp[1].minor.yy929 = nil_token; } + case 552: /* alias_opt ::= */ +{ yymsp[1].minor.yy561 = nil_token; } break; - case 553: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy929 = yymsp[0].minor.yy929; } + case 554: /* alias_opt ::= AS table_alias */ +{ yymsp[-1].minor.yy561 = yymsp[0].minor.yy561; } break; - case 554: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 555: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==555); -{ yymsp[-2].minor.yy992 = yymsp[-1].minor.yy992; } + case 555: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 556: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==556); +{ yymsp[-2].minor.yy490 = yymsp[-1].minor.yy490; } break; - case 556: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy992 = createJoinTableNode(pCxt, yymsp[-4].minor.yy732, yymsp[-5].minor.yy992, yymsp[-2].minor.yy992, yymsp[0].minor.yy992); } - yymsp[-5].minor.yy992 = yylhsminor.yy992; + case 557: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ +{ yylhsminor.yy490 = createJoinTableNode(pCxt, yymsp[-4].minor.yy246, yymsp[-5].minor.yy490, yymsp[-2].minor.yy490, yymsp[0].minor.yy490); } + yymsp[-5].minor.yy490 = yylhsminor.yy490; break; - case 557: /* join_type ::= */ -{ yymsp[1].minor.yy732 = JOIN_TYPE_INNER; } + case 558: /* join_type ::= */ +{ yymsp[1].minor.yy246 = JOIN_TYPE_INNER; } break; - case 558: /* join_type ::= INNER */ -{ yymsp[0].minor.yy732 = JOIN_TYPE_INNER; } + case 559: /* join_type ::= INNER */ +{ yymsp[0].minor.yy246 = JOIN_TYPE_INNER; } break; - case 559: /* 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 */ + case 560: /* 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.yy992 = createSelectStmt(pCxt, yymsp[-11].minor.yy437, yymsp[-9].minor.yy364, yymsp[-8].minor.yy992, yymsp[-12].minor.yy364); - yymsp[-13].minor.yy992 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy992, yymsp[-10].minor.yy437); - yymsp[-13].minor.yy992 = addWhereClause(pCxt, yymsp[-13].minor.yy992, yymsp[-7].minor.yy992); - yymsp[-13].minor.yy992 = addPartitionByClause(pCxt, yymsp[-13].minor.yy992, yymsp[-6].minor.yy364); - yymsp[-13].minor.yy992 = addWindowClauseClause(pCxt, yymsp[-13].minor.yy992, yymsp[-2].minor.yy992); - yymsp[-13].minor.yy992 = addGroupByClause(pCxt, yymsp[-13].minor.yy992, yymsp[-1].minor.yy364); - yymsp[-13].minor.yy992 = addHavingClause(pCxt, yymsp[-13].minor.yy992, yymsp[0].minor.yy992); - yymsp[-13].minor.yy992 = addRangeClause(pCxt, yymsp[-13].minor.yy992, yymsp[-5].minor.yy992); - yymsp[-13].minor.yy992 = addEveryClause(pCxt, yymsp[-13].minor.yy992, yymsp[-4].minor.yy992); - yymsp[-13].minor.yy992 = addFillClause(pCxt, yymsp[-13].minor.yy992, yymsp[-3].minor.yy992); + yymsp[-13].minor.yy490 = createSelectStmt(pCxt, yymsp[-11].minor.yy845, yymsp[-9].minor.yy502, yymsp[-8].minor.yy490, yymsp[-12].minor.yy502); + yymsp[-13].minor.yy490 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy490, yymsp[-10].minor.yy845); + yymsp[-13].minor.yy490 = addWhereClause(pCxt, yymsp[-13].minor.yy490, yymsp[-7].minor.yy490); + yymsp[-13].minor.yy490 = addPartitionByClause(pCxt, yymsp[-13].minor.yy490, yymsp[-6].minor.yy502); + yymsp[-13].minor.yy490 = addWindowClauseClause(pCxt, yymsp[-13].minor.yy490, yymsp[-2].minor.yy490); + yymsp[-13].minor.yy490 = addGroupByClause(pCxt, yymsp[-13].minor.yy490, yymsp[-1].minor.yy502); + yymsp[-13].minor.yy490 = addHavingClause(pCxt, yymsp[-13].minor.yy490, yymsp[0].minor.yy490); + yymsp[-13].minor.yy490 = addRangeClause(pCxt, yymsp[-13].minor.yy490, yymsp[-5].minor.yy490); + yymsp[-13].minor.yy490 = addEveryClause(pCxt, yymsp[-13].minor.yy490, yymsp[-4].minor.yy490); + yymsp[-13].minor.yy490 = addFillClause(pCxt, yymsp[-13].minor.yy490, yymsp[-3].minor.yy490); } break; - case 560: /* hint_list ::= */ -{ yymsp[1].minor.yy364 = createHintNodeList(pCxt, NULL); } + case 561: /* hint_list ::= */ +{ yymsp[1].minor.yy502 = createHintNodeList(pCxt, NULL); } break; - case 561: /* hint_list ::= NK_HINT */ -{ yylhsminor.yy364 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy364 = yylhsminor.yy364; + case 562: /* hint_list ::= NK_HINT */ +{ yylhsminor.yy502 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy502 = yylhsminor.yy502; break; - case 566: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy437 = false; } + case 567: /* set_quantifier_opt ::= ALL */ +{ yymsp[0].minor.yy845 = false; } break; - case 569: /* select_item ::= NK_STAR */ -{ yylhsminor.yy992 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy992 = yylhsminor.yy992; + case 570: /* select_item ::= NK_STAR */ +{ yylhsminor.yy490 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy490 = yylhsminor.yy490; break; - case 571: /* select_item ::= common_expression column_alias */ - case 581: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==581); -{ yylhsminor.yy992 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy992), &yymsp[0].minor.yy929); } - yymsp[-1].minor.yy992 = yylhsminor.yy992; + case 572: /* select_item ::= common_expression column_alias */ + case 582: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==582); +{ yylhsminor.yy490 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy490), &yymsp[0].minor.yy561); } + yymsp[-1].minor.yy490 = yylhsminor.yy490; break; - case 572: /* select_item ::= common_expression AS column_alias */ - case 582: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==582); -{ yylhsminor.yy992 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), &yymsp[0].minor.yy929); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 573: /* select_item ::= common_expression AS column_alias */ + case 583: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==583); +{ yylhsminor.yy490 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), &yymsp[0].minor.yy561); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 577: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 605: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==605); - case 625: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==625); -{ yymsp[-2].minor.yy364 = yymsp[0].minor.yy364; } + case 578: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 606: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==606); + case 626: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==626); +{ yymsp[-2].minor.yy502 = yymsp[0].minor.yy502; } break; - case 584: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ -{ yymsp[-5].minor.yy992 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy992), releaseRawExprNode(pCxt, yymsp[-1].minor.yy992)); } + case 585: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ +{ yymsp[-5].minor.yy490 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), releaseRawExprNode(pCxt, yymsp[-1].minor.yy490)); } break; - case 585: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy992 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy992)); } + case 586: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ +{ yymsp[-3].minor.yy490 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy490)); } break; - case 586: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy992 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy992), NULL, yymsp[-1].minor.yy992, yymsp[0].minor.yy992); } + case 587: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-5].minor.yy490 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), NULL, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); } break; - case 587: /* 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.yy992 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy992), releaseRawExprNode(pCxt, yymsp[-3].minor.yy992), yymsp[-1].minor.yy992, yymsp[0].minor.yy992); } + case 588: /* 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.yy490 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy490), releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), yymsp[-1].minor.yy490, yymsp[0].minor.yy490); } break; - case 588: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ -{ yymsp[-6].minor.yy992 = createEventWindowNode(pCxt, yymsp[-3].minor.yy992, yymsp[0].minor.yy992); } + case 589: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ +{ yymsp[-6].minor.yy490 = createEventWindowNode(pCxt, yymsp[-3].minor.yy490, yymsp[0].minor.yy490); } break; - case 595: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy992 = createFillNode(pCxt, yymsp[-1].minor.yy114, NULL); } + case 596: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy490 = createFillNode(pCxt, yymsp[-1].minor.yy718, NULL); } break; - case 596: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ -{ yymsp[-5].minor.yy992 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy364)); } + case 597: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ +{ yymsp[-5].minor.yy490 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy502)); } break; - case 597: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ -{ yymsp[-5].minor.yy992 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy364)); } + case 598: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ +{ yymsp[-5].minor.yy490 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy502)); } break; - case 598: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy114 = FILL_MODE_NONE; } + case 599: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy718 = FILL_MODE_NONE; } break; - case 599: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy114 = FILL_MODE_PREV; } + case 600: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy718 = FILL_MODE_PREV; } break; - case 600: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy114 = FILL_MODE_NULL; } + case 601: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy718 = FILL_MODE_NULL; } break; - case 601: /* fill_mode ::= NULL_F */ -{ yymsp[0].minor.yy114 = FILL_MODE_NULL_F; } + case 602: /* fill_mode ::= NULL_F */ +{ yymsp[0].minor.yy718 = FILL_MODE_NULL_F; } break; - case 602: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy114 = FILL_MODE_LINEAR; } + case 603: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy718 = FILL_MODE_LINEAR; } break; - case 603: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy114 = FILL_MODE_NEXT; } + case 604: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy718 = FILL_MODE_NEXT; } break; - case 606: /* group_by_list ::= expr_or_subquery */ -{ yylhsminor.yy364 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); } - yymsp[0].minor.yy364 = yylhsminor.yy364; + case 607: /* group_by_list ::= expr_or_subquery */ +{ yylhsminor.yy502 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy490))); } + yymsp[0].minor.yy502 = yylhsminor.yy502; break; - case 607: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ -{ yylhsminor.yy364 = addNodeToList(pCxt, yymsp[-2].minor.yy364, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy992))); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + case 608: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ +{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-2].minor.yy502, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy490))); } + yymsp[-2].minor.yy502 = yylhsminor.yy502; break; - case 611: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ -{ yymsp[-5].minor.yy992 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy992), releaseRawExprNode(pCxt, yymsp[-1].minor.yy992)); } + case 612: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ +{ yymsp[-5].minor.yy490 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), releaseRawExprNode(pCxt, yymsp[-1].minor.yy490)); } break; - case 612: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy992 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy992)); } + case 613: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ +{ yymsp[-3].minor.yy490 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy490)); } break; - case 615: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 616: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy992 = addOrderByClause(pCxt, yymsp[-3].minor.yy992, yymsp[-2].minor.yy364); - yylhsminor.yy992 = addSlimitClause(pCxt, yylhsminor.yy992, yymsp[-1].minor.yy992); - yylhsminor.yy992 = addLimitClause(pCxt, yylhsminor.yy992, yymsp[0].minor.yy992); + yylhsminor.yy490 = addOrderByClause(pCxt, yymsp[-3].minor.yy490, yymsp[-2].minor.yy502); + yylhsminor.yy490 = addSlimitClause(pCxt, yylhsminor.yy490, yymsp[-1].minor.yy490); + yylhsminor.yy490 = addLimitClause(pCxt, yylhsminor.yy490, yymsp[0].minor.yy490); } - yymsp[-3].minor.yy992 = yylhsminor.yy992; + yymsp[-3].minor.yy490 = yylhsminor.yy490; break; - case 618: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ -{ yylhsminor.yy992 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy992, yymsp[0].minor.yy992); } - yymsp[-3].minor.yy992 = yylhsminor.yy992; + case 619: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ +{ yylhsminor.yy490 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy490, yymsp[0].minor.yy490); } + yymsp[-3].minor.yy490 = yylhsminor.yy490; break; - case 619: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ -{ yylhsminor.yy992 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy992, yymsp[0].minor.yy992); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 620: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ +{ yylhsminor.yy490 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy490, yymsp[0].minor.yy490); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 627: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 631: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==631); -{ yymsp[-1].minor.yy992 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 628: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 632: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==632); +{ yymsp[-1].minor.yy490 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 628: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 632: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==632); -{ yymsp[-3].minor.yy992 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 629: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 633: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==633); +{ yymsp[-3].minor.yy490 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 629: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 633: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==633); -{ yymsp[-3].minor.yy992 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 630: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 634: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==634); +{ yymsp[-3].minor.yy490 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 634: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy992 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy992); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 635: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy490); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 639: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy992 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy992), yymsp[-1].minor.yy938, yymsp[0].minor.yy517); } - yymsp[-2].minor.yy992 = yylhsminor.yy992; + case 640: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy490 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), yymsp[-1].minor.yy876, yymsp[0].minor.yy361); } + yymsp[-2].minor.yy490 = yylhsminor.yy490; break; - case 640: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy938 = ORDER_ASC; } + case 641: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy876 = ORDER_ASC; } break; - case 641: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy938 = ORDER_ASC; } + case 642: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy876 = ORDER_ASC; } break; - case 642: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy938 = ORDER_DESC; } + case 643: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy876 = ORDER_DESC; } break; - case 643: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy517 = NULL_ORDER_DEFAULT; } + case 644: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy361 = NULL_ORDER_DEFAULT; } break; - case 644: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy517 = NULL_ORDER_FIRST; } + case 645: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy361 = NULL_ORDER_FIRST; } break; - case 645: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy517 = NULL_ORDER_LAST; } + case 646: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy361 = NULL_ORDER_LAST; } break; default: break; From 99c493dc5cf15d95a2051ac87bad0a222d47e75f Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 18 Jan 2024 19:40:41 +0800 Subject: [PATCH 22/93] feat: support uniq grant --- source/dnode/mnode/impl/inc/mndDef.h | 39 ++++++++++++++-------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 9635e00ac83..4a9b2d602db 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -770,31 +770,33 @@ typedef struct { // SGrantObj typedef enum { - GRANT_STATE_UNGRANTED = 0, - GRANT_STATE_GRANTED = 1, - GRANT_STATE_EXPIRED = 2, - GRANT_STATE_REVOKED = 3, + GRANT_STATE_UNKNOWN = 0, + GRANT_STATE_UNGRANTED = 1, + GRANT_STATE_GRANTED = 2, + GRANT_STATE_EXPIRED = 3, + GRANT_STATE_REVOKED = 4, } EGrantState; typedef enum { - GRANT_STATE_REASON_ALTER = 0, // alter activeCode 'revoked' or 'xxx' - GRANT_STATE_REASON_MISMATCH = 1, // dnode machine mismatch - GRANT_STATE_REASON_EXPIRE = 2, // expire + GRANT_STATE_REASON_UNKNOWN = 0, + GRANT_STATE_REASON_ALTER = 1, // alter activeCode 'revoked' or 'xxx' + GRANT_STATE_REASON_MISMATCH = 2, // dnode machine mismatch + GRANT_STATE_REASON_EXPIRE = 3, // expire } EGrantStateReason; #define GRANT_STATE_NUM 30 #define GRANT_ACTIVE_NUM 10 -#define GRANT_ACTIVE_LEN 30 +#define GRANT_ACTIVE_HEAD_LEN 30 typedef struct { union { int64_t u0; struct { - int64_t ts : 36; - int64_t reserve : 4; - int64_t lastState : 8; - int64_t state : 8; + int64_t ts : 40; + int64_t lastState : 4; + int64_t state : 4; int64_t reason : 8; + int64_t reserve : 8; }; }; } SGrantState; @@ -803,24 +805,23 @@ typedef struct { union { int64_t u0; struct { - int64_t ts : 36; - int64_t reserve : 28; + int64_t ts : 40; + int64_t reserve : 24; }; }; - char active[GRANT_ACTIVE_LEN + 1]; + char active[GRANT_ACTIVE_HEAD_LEN + 1]; } SGrantActive; typedef struct { union { int64_t u0; struct { - int64_t ts : 36; - int64_t reserve : 4; + int64_t ts : 40; int64_t id : 24; }; }; - uint16_t port; - char fqdn[TSDB_FQDN_LEN]; + // uint16_t port; + // char fqdn[TSDB_FQDN_LEN]; char machine[TSDB_MACHINE_ID_LEN + 1]; } SGrantMachine; From 5d6703c3ef4f9d0b73ea8e35f9ef2bf60cf069a9 Mon Sep 17 00:00:00 2001 From: kailixu Date: Fri, 19 Jan 2024 14:59:02 +0800 Subject: [PATCH 23/93] feat: support uniq grant --- include/common/tgrant.h | 1 - include/util/tdef.h | 2 +- source/dnode/mnode/impl/inc/mndDef.h | 8 +-- source/dnode/mnode/impl/inc/mndGrant.h | 15 ++---- source/dnode/mnode/impl/src/mndCluster.c | 64 ++++++++++++++++++++++++ 5 files changed, 74 insertions(+), 16 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index 4ed7d7bd784..f9bf27ab138 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -62,7 +62,6 @@ typedef struct { } SGrantedInfo; int32_t grantCheck(EGrantType grant); -int32_t grantAlterActiveCode(const char* active, char** newActive); char* grantGetMachineId(); #ifndef GRANTS_CFG diff --git a/include/util/tdef.h b/include/util/tdef.h index 8bddc15e9c2..1543b3716ac 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -286,7 +286,7 @@ typedef enum ELogicConditionType { #define TSDB_DNODE_CONFIG_LEN 128 #define TSDB_DNODE_VALUE_LEN 256 -#define TSDB_CLUSTER_VALUE_LEN 1024 +#define TSDB_CLUSTER_VALUE_LEN 1000 #define TSDB_ACTIVE_KEY_LEN 109 #define TSDB_CONN_ACTIVE_KEY_LEN 255 diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 4a9b2d602db..45c21e06ac7 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -827,11 +827,13 @@ typedef struct { typedef struct { int32_t id; + int8_t nStates; + int8_t nActives; int64_t createTime; int64_t updateTime; - SGrantState state[GRANT_STATE_NUM]; - SGrantActive active[GRANT_ACTIVE_NUM]; - char* pActive; + SGrantState stats[GRANT_STATE_NUM]; + SGrantActive actives[GRANT_ACTIVE_NUM]; + char* active; SArray* pMachines; // SGrantMachines SRWLatch lock; } SGrantObj; diff --git a/source/dnode/mnode/impl/inc/mndGrant.h b/source/dnode/mnode/impl/inc/mndGrant.h index aea680ad5f7..ae9612d4738 100644 --- a/source/dnode/mnode/impl/inc/mndGrant.h +++ b/source/dnode/mnode/impl/inc/mndGrant.h @@ -30,24 +30,17 @@ void grantRestore(EGrantType grant, uint64_t value); #ifdef TD_ENTERPRISE - - SGrantObj *mndAcquireGrant(SMnode * pMnode, int32_t id); - void mndReleaseGrant(SMnode * pMnode, SGrantObj * pGrant); - SSdbRaw *mndGrantActionEncode(SGrantObj * pGrant); SSdbRow *mndGrantActionDecode(SSdbRaw * pRaw); int32_t mndGrantActionInsert(SSdb * pSdb, SGrantObj * pGrant); int32_t mndGrantActionDelete(SSdb * pSdb, SGrantObj * pGrant); int32_t mndGrantActionUpdate(SSdb * pSdb, SGrantObj * pOldGrant, SGrantObj * pNewGrant); - int32_t mndProcessUpdMachineReqImpl(void *pMachine, SRpcMsg *pReq); - int32_t mndProcessUpdStateReqImpl(void *pState, SRpcMsg *pReq); - int32_t mndProcessUpdActiveReqImpl(void *pActive, SRpcMsg *pReq); - int32_t mndRetrieveGrantImpl(SRpcMsg * pReq, SShowObj * pShow, SSDataBlock * pBlock, int32_t rows); - - int32_t mndProcessConfigClusterReq(SRpcMsg * pReq); - int32_t mndProcessConfigClusterRsp(SRpcMsg * pReq); + int32_t grantAlterActiveCode(const char *active, char **newActive); + int32_t mndProcessConfigGrantReq(SRpcMsg * pReq, SMCfgClusterReq * pCfg); + int32_t mndProcessUpdMachineReq(SRpcMsg * pReq, SArray *pMachines); + int32_t mndProcessUpdStateReq(SRpcMsg * pReq, SGrantState *pState); #endif #ifdef __cplusplus diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c index a583b0e7bb0..f63442802b6 100644 --- a/source/dnode/mnode/impl/src/mndCluster.c +++ b/source/dnode/mnode/impl/src/mndCluster.c @@ -16,6 +16,7 @@ #define _DEFAULT_SOURCE #include "audit.h" #include "mndCluster.h" +#include "mndGrant.h" #include "mndPrivilege.h" #include "mndShow.h" #include "mndTrans.h" @@ -33,6 +34,8 @@ static int32_t mndCreateDefaultCluster(SMnode *pMnode); static int32_t mndRetrieveClusters(SRpcMsg *pMsg, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows); static void mndCancelGetNextCluster(SMnode *pMnode, void *pIter); static int32_t mndProcessUptimeTimer(SRpcMsg *pReq); +static int32_t mndProcessConfigClusterReq(SRpcMsg *pReq); +static int32_t mndProcessConfigClusterRsp(SRpcMsg *pReq); int32_t mndInitCluster(SMnode *pMnode) { SSdbTable table = { @@ -47,6 +50,8 @@ int32_t mndInitCluster(SMnode *pMnode) { }; mndSetMsgHandle(pMnode, TDMT_MND_UPTIME_TIMER, mndProcessUptimeTimer); + mndSetMsgHandle(pMnode, TDMT_MND_CONFIG_CLUSTER, mndProcessConfigClusterReq); + mndSetMsgHandle(pMnode, TDMT_MND_CONFIG_CLUSTER_RSP, mndProcessConfigClusterRsp); mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_CLUSTER, mndRetrieveClusters); mndAddShowFreeIterHandle(pMnode, TSDB_MGMT_TABLE_CLUSTER, mndCancelGetNextCluster); @@ -402,4 +407,63 @@ static int32_t mndProcessUptimeTimer(SRpcMsg *pReq) { mndTransDrop(pTrans); return 0; +} + +int32_t mndProcessConfigClusterReq(SRpcMsg *pReq) { + int32_t code = 0; + SMnode *pMnode = pReq->info.node; + SMCfgClusterReq cfgReq = {0}; + if (tDeserializeSMCfgClusterReq(pReq->pCont, pReq->contLen, &cfgReq) != 0) { + terrno = TSDB_CODE_INVALID_MSG; + return -1; + } + + mInfo("cluster: start to config, option:%s, value:%s", cfgReq.config, cfgReq.value); + if (mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_CONFIG_CLUSTER) != 0) { + code = terrno != 0 ? terrno : TSDB_CODE_MND_NO_RIGHTS; + goto _exit; + } + + SClusterObj clusterObj = {0}; + void *pIter = NULL; + SClusterObj *pCluster = mndAcquireCluster(pMnode, &pIter); + if (!pCluster || pCluster->id <= 0) { + code = TSDB_CODE_APP_IS_STARTING; + if (pCluster) mndReleaseCluster(pMnode, pCluster, pIter); + goto _exit; + } + memcpy(&clusterObj, pCluster, sizeof(SClusterObj)); + mndReleaseCluster(pMnode, pCluster, pIter); + + if (strncmp(cfgReq.config, GRANT_ACTIVE_CODE, TSDB_DNODE_CONFIG_LEN) == 0) { +#ifdef TD_ENTERPRISE + if (0 != (code = mndProcessConfigGrantReq(pReq, &cfgReq))) { + goto _exit; + } +#else + code = TSDB_CODE_OPS_NOT_SUPPORT; + goto _exit; +#endif + } else { + code = TSDB_CODE_OPS_NOT_SUPPORT; + goto _exit; + } + + { // audit + auditRecord(pReq, pMnode->clusterId, "alterCluster", "", "", cfgReq.sql, cfgReq.sqlLen); + } +_exit: + tFreeSMCfgClusterReq(&cfgReq); + if (code != 0) { + terrno = code; + mError("cluster: failed to config:%s %s since %s", cfgReq.config, cfgReq.value, terrstr()); + } else { + mInfo("cluster: success to config:%s %s", cfgReq.config, cfgReq.value); + } + return code; +} + +int32_t mndProcessConfigClusterRsp(SRpcMsg *pRsp) { + mInfo("config rsp from cluster"); + return 0; } \ No newline at end of file From b7ea583f3aa845fad0ebc74303bd5476bbbd9cfa Mon Sep 17 00:00:00 2001 From: kailixu Date: Fri, 19 Jan 2024 17:01:19 +0800 Subject: [PATCH 24/93] feat: support uniq grant --- include/util/taoserror.h | 1 + source/dnode/mnode/impl/inc/mndDef.h | 2 +- source/dnode/mnode/impl/inc/mndGrant.h | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/util/taoserror.h b/include/util/taoserror.h index f1f51c812d4..827567904a8 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -566,6 +566,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_GRANT_PAR_IVLD_DIST TAOS_DEF_ERROR_CODE(0, 0x0815) #define TSDB_CODE_GRANT_UNLICENSED_CLUSTER TAOS_DEF_ERROR_CODE(0, 0x0816) #define TSDB_CODE_GRANT_LACK_OF_BASIC TAOS_DEF_ERROR_CODE(0, 0x0817) +#define TSDB_CODE_GRANT_OBJ_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0818) // sync // #define TSDB_CODE_SYN_INVALID_CONFIG TAOS_DEF_ERROR_CODE(0, 0x0900) // 2.x diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 45c21e06ac7..aef636b6bcc 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -831,7 +831,7 @@ typedef struct { int8_t nActives; int64_t createTime; int64_t updateTime; - SGrantState stats[GRANT_STATE_NUM]; + SGrantState states[GRANT_STATE_NUM]; SGrantActive actives[GRANT_ACTIVE_NUM]; char* active; SArray* pMachines; // SGrantMachines diff --git a/source/dnode/mnode/impl/inc/mndGrant.h b/source/dnode/mnode/impl/inc/mndGrant.h index ae9612d4738..704dbf7fa1e 100644 --- a/source/dnode/mnode/impl/inc/mndGrant.h +++ b/source/dnode/mnode/impl/inc/mndGrant.h @@ -41,6 +41,8 @@ int32_t mndProcessConfigGrantReq(SRpcMsg * pReq, SMCfgClusterReq * pCfg); int32_t mndProcessUpdMachineReq(SRpcMsg * pReq, SArray *pMachines); int32_t mndProcessUpdStateReq(SRpcMsg * pReq, SGrantState *pState); + + int32_t mndGrantGetLastState(SMnode * pMnode, SGrantState * pState); #endif #ifdef __cplusplus From dbd3c5318214550257733ea0a1dd883cdf0260a3 Mon Sep 17 00:00:00 2001 From: kailixu Date: Mon, 22 Jan 2024 13:20:15 +0800 Subject: [PATCH 25/93] feat: support uniq grant --- include/common/tgrant.h | 55 +++++++++++------------- include/util/taoserror.h | 1 + source/common/src/systable.c | 5 --- source/dnode/mnode/impl/inc/mndCluster.h | 2 - source/dnode/mnode/impl/inc/mndDef.h | 5 +-- source/dnode/mnode/impl/inc/mndGrant.h | 10 +++-- source/dnode/mnode/impl/src/mndCluster.c | 47 ++------------------ source/dnode/mnode/impl/src/mndDnode.c | 3 ++ source/util/src/terror.c | 1 + 9 files changed, 42 insertions(+), 87 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index f9bf27ab138..3e4809c662b 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -57,42 +57,39 @@ typedef enum { TSDB_GRANT_BACKUP_RESTORE_EXPIRE, } EGrantType; -typedef struct { - int64_t grantedTime; -} SGrantedInfo; int32_t grantCheck(EGrantType grant); char* grantGetMachineId(); #ifndef GRANTS_CFG #ifdef TD_ENTERPRISE -#define GRANTS_SCHEMA \ - static const SSysDbTableSchema grantsSchema[] = { \ - {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "streams", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "topics", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "cpu_cores", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "multi_tier_storage_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "streams_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "topics_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "audit_log_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "csv_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "backup_restore_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "data_ins", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "opc_ua", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "pi", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "kafka", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "influxdb", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "mqtt", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "avevahistorian", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "opentsdb", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "tdengine2.6", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "tdengine3.0", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ +#define GRANTS_SCHEMA \ + static const SSysDbTableSchema grantsSchema[] = { \ + {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "streams", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "subscriptions", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "cpu_cores", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "multi_tier_storage_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "streams_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "subscriptions_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "audit_log_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "csv_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "backup_restore_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ } +// {.name = "opc_ua", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + // {.name = "pi", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + // {.name = "kafka", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + // {.name = "influxdb", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + // {.name = "mqtt", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + // {.name = "avevahistorian", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + // {.name = "opentsdb", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + // {.name = "tdengine2.6", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + // {.name = "tdengine3.0", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + // } #else #define GRANTS_SCHEMA \ static const SSysDbTableSchema grantsSchema[] = { \ diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 47dc8c11b17..7cb5e869999 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -413,6 +413,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_MNODE_ONLY_TWO_MNODE TAOS_DEF_ERROR_CODE(0, 0x0414) // internal #define TSDB_CODE_MNODE_NO_NEED_RESTORE TAOS_DEF_ERROR_CODE(0, 0x0415) // internal #define TSDB_CODE_DNODE_ONLY_USE_WHEN_OFFLINE TAOS_DEF_ERROR_CODE(0, 0x0416) +#define TSDB_CODE_DNODE_NO_MACHINE_CODE TAOS_DEF_ERROR_CODE(0, 0x0417) // mnode-sma #define TSDB_CODE_MND_SMA_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0480) diff --git a/source/common/src/systable.c b/source/common/src/systable.c index fbcb59524e5..fd5a86f583f 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -48,7 +48,6 @@ static const SSysDbTableSchema mnodesSchema[] = { {.name = "status", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "create_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, {.name = "role_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, - // {.name = "machine_id", .bytes = TSDB_MACHINE_ID_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, }; static const SSysDbTableSchema modulesSchema[] = { @@ -76,10 +75,6 @@ static const SSysDbTableSchema clusterSchema[] = { {.name = "create_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, {.name = "version", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "expire_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, -#ifdef TD_ENTERPRISE - {.name = "granted_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, - {.name = "active_code", .bytes = TSDB_UNIQ_ACTIVE_KEY_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, -#endif }; static const SSysDbTableSchema userDBSchema[] = { diff --git a/source/dnode/mnode/impl/inc/mndCluster.h b/source/dnode/mnode/impl/inc/mndCluster.h index 66c00bae11a..e33ffdb372d 100644 --- a/source/dnode/mnode/impl/inc/mndCluster.h +++ b/source/dnode/mnode/impl/inc/mndCluster.h @@ -28,8 +28,6 @@ int32_t mndGetClusterName(SMnode *pMnode, char *clusterName, int32_t len); int64_t mndGetClusterId(SMnode *pMnode); int64_t mndGetClusterCreateTime(SMnode *pMnode); int64_t mndGetClusterUpTime(SMnode *pMnode); -int32_t mndGetClusterGrantedInfo(SMnode *pMnode, SGrantedInfo *pInfo); -int32_t mndGetClusterActive(SMnode *pMnode, char* active); #ifdef __cplusplus } diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index aef636b6bcc..67a49b26b30 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -197,7 +197,6 @@ typedef struct { int64_t createdTime; int64_t updateTime; int32_t upTime; - int64_t grantedTime; char active[TSDB_UNIQ_ACTIVE_KEY_LEN]; } SClusterObj; @@ -770,7 +769,7 @@ typedef struct { // SGrantObj typedef enum { - GRANT_STATE_UNKNOWN = 0, + GRANT_STATE_INIT = 0, GRANT_STATE_UNGRANTED = 1, GRANT_STATE_GRANTED = 2, GRANT_STATE_EXPIRED = 3, @@ -778,7 +777,7 @@ typedef enum { } EGrantState; typedef enum { - GRANT_STATE_REASON_UNKNOWN = 0, + GRANT_STATE_REASON_INIT = 0, GRANT_STATE_REASON_ALTER = 1, // alter activeCode 'revoked' or 'xxx' GRANT_STATE_REASON_MISMATCH = 2, // dnode machine mismatch GRANT_STATE_REASON_EXPIRE = 3, // expire diff --git a/source/dnode/mnode/impl/inc/mndGrant.h b/source/dnode/mnode/impl/inc/mndGrant.h index 704dbf7fa1e..7c6a42bd827 100644 --- a/source/dnode/mnode/impl/inc/mndGrant.h +++ b/source/dnode/mnode/impl/inc/mndGrant.h @@ -38,11 +38,13 @@ int32_t grantAlterActiveCode(const char *active, char **newActive); - int32_t mndProcessConfigGrantReq(SRpcMsg * pReq, SMCfgClusterReq * pCfg); - int32_t mndProcessUpdMachineReq(SRpcMsg * pReq, SArray *pMachines); - int32_t mndProcessUpdStateReq(SRpcMsg * pReq, SGrantState *pState); + int32_t mndProcessConfigGrantReq(SMnode * pMnode, SRpcMsg * pReq, SMCfgClusterReq * pCfg); + int32_t mndProcessUpdMachineReq(SMnode * pMnode, SRpcMsg * pReq, SArray * pMachines); + int32_t mndProcessUpdStateReq(SMnode * pMnode, SRpcMsg * pReq, SGrantState * pState); - int32_t mndGrantGetLastState(SMnode * pMnode, SGrantState * pState); + int32_t mndGrantGetLastState(SMnode * pMnode, SGrantState * pState); + SGrantObj *mndAcquireGrant(SMnode * pMnode, void **ppIter); + void mndReleaseGrant(SMnode * pMnode, SGrantObj * pGrant, void *pIter); #endif #ifdef __cplusplus diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c index f63442802b6..1a55a161bf1 100644 --- a/source/dnode/mnode/impl/src/mndCluster.c +++ b/source/dnode/mnode/impl/src/mndCluster.c @@ -21,7 +21,7 @@ #include "mndShow.h" #include "mndTrans.h" -#define CLUSTER_VER_NUMBE 2 +#define CLUSTER_VER_NUMBE 1 #define CLUSTER_RESERVE_SIZE 60 int64_t tsExpireTime = 0; @@ -107,30 +107,6 @@ int64_t mndGetClusterId(SMnode *pMnode) { return clusterId; } -int32_t mndGetClusterGrantedInfo(SMnode *pMnode, SGrantedInfo *pInfo) { - void *pIter = NULL; - SClusterObj *pCluster = mndAcquireCluster(pMnode, &pIter); - if (pCluster != NULL) { - pInfo->grantedTime = pCluster->grantedTime; - mndReleaseCluster(pMnode, pCluster, pIter); - return 0; - } - - return -1; -} - -int32_t mndGetClusterActive(SMnode *pMnode, char *active) { - void *pIter = NULL; - SClusterObj *pCluster = mndAcquireCluster(pMnode, &pIter); - if (pCluster) { - if (active) strncpy(active, pCluster->active, TSDB_UNIQ_ACTIVE_KEY_LEN); - mndReleaseCluster(pMnode, pCluster, pIter); - return 0; - } - - return -1; -} - int64_t mndGetClusterCreateTime(SMnode *pMnode) { int64_t createTime = 0; void *pIter = NULL; @@ -177,8 +153,6 @@ static SSdbRaw *mndClusterActionEncode(SClusterObj *pCluster) { SDB_SET_INT64(pRaw, dataPos, pCluster->updateTime, _OVER) SDB_SET_BINARY(pRaw, dataPos, pCluster->name, TSDB_CLUSTER_ID_LEN, _OVER) SDB_SET_INT32(pRaw, dataPos, pCluster->upTime, _OVER) - SDB_SET_INT64(pRaw, dataPos, pCluster->grantedTime, _OVER) - SDB_SET_BINARY(pRaw, dataPos, pCluster->active, TSDB_UNIQ_ACTIVE_KEY_LEN, _OVER) SDB_SET_RESERVE(pRaw, dataPos, CLUSTER_RESERVE_SIZE, _OVER) SDB_SET_DATALEN(pRaw, dataPos, _OVER); @@ -203,7 +177,7 @@ static SSdbRow *mndClusterActionDecode(SSdbRaw *pRaw) { int8_t sver = 0; if (sdbGetRawSoftVer(pRaw, &sver) != 0) goto _OVER; - if (sver < 0 || sver > CLUSTER_VER_NUMBE) { + if (sver != CLUSTER_VER_NUMBE) { terrno = TSDB_CODE_SDB_INVALID_DATA_VER; goto _OVER; } @@ -220,11 +194,6 @@ static SSdbRow *mndClusterActionDecode(SSdbRaw *pRaw) { SDB_GET_INT64(pRaw, dataPos, &pCluster->updateTime, _OVER) SDB_GET_BINARY(pRaw, dataPos, pCluster->name, TSDB_CLUSTER_ID_LEN, _OVER) SDB_GET_INT32(pRaw, dataPos, &pCluster->upTime, _OVER) - - if (sver > 1) { - SDB_GET_INT64(pRaw, dataPos, &pCluster->grantedTime, _OVER) - SDB_GET_BINARY(pRaw, dataPos, pCluster->active, TSDB_UNIQ_ACTIVE_KEY_LEN, _OVER) - } SDB_GET_RESERVE(pRaw, dataPos, CLUSTER_RESERVE_SIZE, _OVER) terrno = 0; @@ -348,16 +317,6 @@ static int32_t mndRetrieveClusters(SRpcMsg *pMsg, SShowObj *pShow, SSDataBlock * colDataSetVal(pColInfo, numOfRows, (const char *)&tsExpireTime, false); } -#ifdef TD_ENTERPRISE - pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); - colDataSetVal(pColInfo, numOfRows, (const char *)&pCluster->grantedTime, false); - - char active[TSDB_UNIQ_ACTIVE_KEY_LEN + VARSTR_HEADER_SIZE] = {0}; - STR_WITH_MAXSIZE_TO_VARSTR(active, pCluster->active, pShow->pMeta->pSchemas[cols].bytes); - pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); - colDataSetVal(pColInfo, numOfRows, (const char *)&active, false); -#endif - sdbRelease(pSdb, pCluster); numOfRows++; } @@ -437,7 +396,7 @@ int32_t mndProcessConfigClusterReq(SRpcMsg *pReq) { if (strncmp(cfgReq.config, GRANT_ACTIVE_CODE, TSDB_DNODE_CONFIG_LEN) == 0) { #ifdef TD_ENTERPRISE - if (0 != (code = mndProcessConfigGrantReq(pReq, &cfgReq))) { + if (0 != (code = mndProcessConfigGrantReq(pMnode, pReq, &cfgReq))) { goto _exit; } #else diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index 8817bb906a4..b15017ff376 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -149,6 +149,9 @@ static int32_t mndCreateDefaultDnode(SMnode *pMnode) { if (machineId) { memcpy(dnodeObj.machineId, machineId, TSDB_MACHINE_ID_LEN); taosMemoryFreeClear(machineId); + } else { + terrno = TSDB_CODE_DNODE_NO_MACHINE_CODE; + goto _OVER; } pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, NULL, "create-dnode"); diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 23673b1effc..139990c86c3 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -345,6 +345,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MNODE_ALREADY_IS_VOTER, "Mnode already is a le TAOS_DEFINE_ERROR(TSDB_CODE_MNODE_ONLY_TWO_MNODE, "Only two mnodes exist") TAOS_DEFINE_ERROR(TSDB_CODE_MNODE_NO_NEED_RESTORE, "No need to restore on this dnode") TAOS_DEFINE_ERROR(TSDB_CODE_DNODE_ONLY_USE_WHEN_OFFLINE, "Please use this command when the dnode is offline") +TAOS_DEFINE_ERROR(TSDB_CODE_DNODE_NO_MACHINE_CODE, "Dnode can not get machine code") // vnode TAOS_DEFINE_ERROR(TSDB_CODE_VND_INVALID_VGROUP_ID, "Vnode is closed or removed") From 486e3b7479142830cde62693fefc3a182113fdc6 Mon Sep 17 00:00:00 2001 From: kailixu Date: Mon, 22 Jan 2024 18:18:01 +0800 Subject: [PATCH 26/93] feat: support uniq grant --- source/dnode/mnode/impl/inc/mndGrant.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dnode/mnode/impl/inc/mndGrant.h b/source/dnode/mnode/impl/inc/mndGrant.h index 7c6a42bd827..9b898103811 100644 --- a/source/dnode/mnode/impl/inc/mndGrant.h +++ b/source/dnode/mnode/impl/inc/mndGrant.h @@ -36,7 +36,7 @@ int32_t mndGrantActionDelete(SSdb * pSdb, SGrantObj * pGrant); int32_t mndGrantActionUpdate(SSdb * pSdb, SGrantObj * pOldGrant, SGrantObj * pNewGrant); - int32_t grantAlterActiveCode(const char *active, char **newActive); + int32_t grantAlterActiveCode(SMnode *pMnode, const char *oldActive, const char *newActive, char **mergeActive); int32_t mndProcessConfigGrantReq(SMnode * pMnode, SRpcMsg * pReq, SMCfgClusterReq * pCfg); int32_t mndProcessUpdMachineReq(SMnode * pMnode, SRpcMsg * pReq, SArray * pMachines); From 416c87b5b7bbbf2b5b553aa5b578b11fd711cfa8 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Tue, 23 Jan 2024 18:48:19 +0800 Subject: [PATCH 27/93] fix:[TD-28446] modify trans confilct in subscribe --- source/dnode/mnode/impl/src/mndConsumer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 4db000287c9..f2363a588f7 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -525,7 +525,7 @@ int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) { } // check topic existence - pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pMsg, "subscribe"); + pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_TOPIC_INSIDE, pMsg, "subscribe"); if (pTrans == NULL) { goto _over; } From c97274c5eb4c53b827d2c67260ad6da4c6cbc744 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 24 Jan 2024 14:25:36 +0800 Subject: [PATCH 28/93] feat: support uniq grant --- include/util/taoserror.h | 2 +- source/common/src/systable.c | 7 ++++--- source/libs/qworker/src/qworker.c | 4 ++-- source/util/src/terror.c | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 7cb5e869999..e784c93e378 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -530,7 +530,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_QRY_TASK_DROPPED TAOS_DEF_ERROR_CODE(0, 0x0725) #define TSDB_CODE_QRY_TASK_CANCELLING TAOS_DEF_ERROR_CODE(0, 0x0726) #define TSDB_CODE_QRY_TASK_DROPPING TAOS_DEF_ERROR_CODE(0, 0x0727) -#define TSDB_CODE_QRY_DUPLICATTED_OPERATION TAOS_DEF_ERROR_CODE(0, 0x0728) +#define TSDB_CODE_QRY_DUPLICATED_OPERATION TAOS_DEF_ERROR_CODE(0, 0x0728) #define TSDB_CODE_QRY_TASK_MSG_ERROR TAOS_DEF_ERROR_CODE(0, 0x0729) #define TSDB_CODE_QRY_JOB_FREED TAOS_DEF_ERROR_CODE(0, 0x072A) #define TSDB_CODE_QRY_TASK_STATUS_ERROR TAOS_DEF_ERROR_CODE(0, 0x072B) diff --git a/source/common/src/systable.c b/source/common/src/systable.c index fd5a86f583f..652f15e374c 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -349,19 +349,20 @@ static const SSysDbTableSchema userCompactsDetailSchema[] = { }; static const SSysDbTableSchema useGrantsFullSchema[] = { - {.name = "grant_name", .bytes = 32 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_INT, .sysInfo = true}, + {.name = "grant_name", .bytes = 32 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "display_name", .bytes = 256 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, + {.name = "expire", .bytes = 32 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "limit", .bytes = 512 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, }; static const SSysDbTableSchema useGrantsLogSchema[] = { - {.name = "state", .bytes = 1536 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_INT, .sysInfo = true}, + {.name = "state", .bytes = 1536 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "active", .bytes = 512 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "machine", .bytes = 6016 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, }; static const SSysDbTableSchema useMachinesSchema[] = { - {.name = "id", .type = TSDB_DATA_TYPE_BIGINT, .sysInfo = false}, + {.name = "id", .bytes = TSDB_CLUSTER_ID_LEN + 1 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false}, {.name = "machine", .bytes = 6016 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false}, }; diff --git a/source/libs/qworker/src/qworker.c b/source/libs/qworker/src/qworker.c index 7376aa3a9cf..5246eab1152 100644 --- a/source/libs/qworker/src/qworker.c +++ b/source/libs/qworker/src/qworker.c @@ -543,7 +543,7 @@ int32_t qwHandlePrePhaseEvents(QW_FPARAMS_DEF, int8_t phase, SQWPhaseInput *inpu if (QW_EVENT_RECEIVED(ctx, QW_EVENT_FETCH)) { QW_TASK_WLOG("last fetch still not processed, phase:%s", qwPhaseStr(phase)); - QW_ERR_JRET(TSDB_CODE_QRY_DUPLICATTED_OPERATION); + QW_ERR_JRET(TSDB_CODE_QRY_DUPLICATED_OPERATION); } if (ctx->rspCode) { @@ -972,7 +972,7 @@ int32_t qwProcessDrop(QW_FPARAMS_DEF, SQWMsg *qwMsg) { if (QW_EVENT_RECEIVED(ctx, QW_EVENT_DROP)) { QW_TASK_WLOG_E("task already dropping"); - QW_ERR_JRET(TSDB_CODE_QRY_DUPLICATTED_OPERATION); + QW_ERR_JRET(TSDB_CODE_QRY_DUPLICATED_OPERATION); } if (QW_QUERY_RUNNING(ctx)) { diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 139990c86c3..a91048ed96c 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -417,7 +417,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_QRY_TASK_CANCELLED, "Task cancelled") TAOS_DEFINE_ERROR(TSDB_CODE_QRY_TASK_DROPPED, "Task dropped") TAOS_DEFINE_ERROR(TSDB_CODE_QRY_TASK_CANCELLING, "Task cancelling") TAOS_DEFINE_ERROR(TSDB_CODE_QRY_TASK_DROPPING, "Task dropping") -TAOS_DEFINE_ERROR(TSDB_CODE_QRY_DUPLICATTED_OPERATION, "Duplicatted operation") +TAOS_DEFINE_ERROR(TSDB_CODE_QRY_DUPLICATED_OPERATION, "Duplicated operation") TAOS_DEFINE_ERROR(TSDB_CODE_QRY_TASK_MSG_ERROR, "Task message error") TAOS_DEFINE_ERROR(TSDB_CODE_QRY_JOB_FREED, "Job already freed") TAOS_DEFINE_ERROR(TSDB_CODE_QRY_TASK_STATUS_ERROR, "Task status error") From 4d345b819a3dd223f522e121eb4c90c6b6ea0373 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 24 Jan 2024 19:08:19 +0800 Subject: [PATCH 29/93] feat: support uniq grant --- include/common/tgrant.h | 3 +- include/common/tmsg.h | 2 + include/common/tmsgdef.h | 2 +- source/common/src/tmsg.c | 4 ++ source/dnode/mgmt/mgmt_dnode/inc/dmInt.h | 1 - source/dnode/mgmt/mgmt_dnode/src/dmHandle.c | 34 ++------- source/dnode/mgmt/mgmt_dnode/src/dmWorker.c | 3 - source/dnode/mgmt/mgmt_mnode/src/mmHandle.c | 2 - source/dnode/mnode/impl/inc/mndDef.h | 1 + source/dnode/mnode/impl/inc/mndInt.h | 1 - source/dnode/mnode/impl/src/mndDnode.c | 77 ++------------------- source/dnode/mnode/impl/src/mndGrant.c | 2 +- source/dnode/mnode/impl/src/mndMain.c | 22 +----- 13 files changed, 23 insertions(+), 131 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index 3e4809c662b..3d5fbb1287e 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -57,9 +57,8 @@ typedef enum { TSDB_GRANT_BACKUP_RESTORE_EXPIRE, } EGrantType; - int32_t grantCheck(EGrantType grant); -char* grantGetMachineId(); +char* tGetMachineId(); #ifndef GRANTS_CFG #ifdef TD_ENTERPRISE diff --git a/include/common/tmsg.h b/include/common/tmsg.h index be7ffdd1059..d2ed7aca693 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1564,9 +1564,11 @@ typedef struct { int64_t updateTime; float numOfCores; int32_t numOfSupportVnodes; + int32_t numOfDiskCfg; int64_t memTotal; int64_t memAvail; char dnodeEp[TSDB_EP_LEN]; + char machineId[TSDB_MACHINE_ID_LEN + 1]; SMnodeLoad mload; SQnodeLoad qload; SClusterCfg clusterCfg; diff --git a/include/common/tmsgdef.h b/include/common/tmsgdef.h index 7503fca8c2f..288fb5cead8 100644 --- a/include/common/tmsgdef.h +++ b/include/common/tmsgdef.h @@ -164,7 +164,7 @@ TD_DEF_MSG_TYPE(TDMT_MND_BATCH_META, "batch-meta", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_TABLE_CFG, "table-cfg", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_TMQ_CREATE_TOPIC, "create-topic", SMCreateTopicReq, SMCreateTopicRsp) - TD_DEF_MSG_TYPE(TDMT_MND_GET_MACHINE, "get-machine", NULL, NULL) + TD_DEF_MSG_TYPE(TDMT_MND_UNUSED1, "unused", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_TMQ_DROP_TOPIC, "drop-topic", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_TMQ_SUBSCRIBE, "subscribe", SCMSubscribeReq, SCMSubscribeRsp) TD_DEF_MSG_TYPE(TDMT_MND_TMQ_ASK_EP, "ask-ep", SMqAskEpReq, SMqAskEpRsp) diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 54a57a0a666..a829f65bb2c 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -1163,9 +1163,11 @@ int32_t tSerializeSStatusReq(void *buf, int32_t bufLen, SStatusReq *pReq) { if (tEncodeI64(&encoder, pReq->updateTime) < 0) return -1; if (tEncodeFloat(&encoder, pReq->numOfCores) < 0) return -1; if (tEncodeI32(&encoder, pReq->numOfSupportVnodes) < 0) return -1; + if (tEncodeI32v(&encoder, pReq->numOfDiskCfg) < 0) return -1; if (tEncodeI64(&encoder, pReq->memTotal) < 0) return -1; if (tEncodeI64(&encoder, pReq->memAvail) < 0) return -1; if (tEncodeCStr(&encoder, pReq->dnodeEp) < 0) return -1; + if (tEncodeCStr(&encoder, pReq->machineId) < 0) return -1; // cluster cfg if (tEncodeI32(&encoder, pReq->clusterCfg.statusInterval) < 0) return -1; @@ -1253,9 +1255,11 @@ int32_t tDeserializeSStatusReq(void *buf, int32_t bufLen, SStatusReq *pReq) { if (tDecodeI64(&decoder, &pReq->updateTime) < 0) return -1; if (tDecodeFloat(&decoder, &pReq->numOfCores) < 0) return -1; if (tDecodeI32(&decoder, &pReq->numOfSupportVnodes) < 0) return -1; + if (tDecodeI32v(&decoder, &pReq->numOfDiskCfg) < 0) return -1; if (tDecodeI64(&decoder, &pReq->memTotal) < 0) return -1; if (tDecodeI64(&decoder, &pReq->memAvail) < 0) return -1; if (tDecodeCStrTo(&decoder, pReq->dnodeEp) < 0) return -1; + if (tDecodeCStrTo(&decoder, pReq->machineId) < 0) return -1; // cluster cfg if (tDecodeI32(&decoder, &pReq->clusterCfg.statusInterval) < 0) return -1; diff --git a/source/dnode/mgmt/mgmt_dnode/inc/dmInt.h b/source/dnode/mgmt/mgmt_dnode/inc/dmInt.h index 8e682f22c0d..80502e26627 100644 --- a/source/dnode/mgmt/mgmt_dnode/inc/dmInt.h +++ b/source/dnode/mgmt/mgmt_dnode/inc/dmInt.h @@ -56,7 +56,6 @@ int32_t dmProcessServerRunStatus(SDnodeMgmt *pMgmt, SRpcMsg *pMsg); int32_t dmProcessRetrieve(SDnodeMgmt *pMgmt, SRpcMsg *pMsg); int32_t dmProcessGrantReq(void *pInfo, SRpcMsg *pMsg); int32_t dmProcessGrantNotify(void *pInfo, SRpcMsg *pMsg); -int32_t dmProcessGetMachine(SDnodeMgmt *pMgmt, SRpcMsg *pMsg); // dmWorker.c int32_t dmPutNodeMsgToMgmtQueue(SDnodeMgmt *pMgmt, SRpcMsg *pMsg); diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c index 2caf2dee1e0..2ec9c51cc1e 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c @@ -114,9 +114,15 @@ void dmSendStatusReq(SDnodeMgmt *pMgmt) { req.updateTime = pMgmt->pData->updateTime; req.numOfCores = tsNumOfCores; req.numOfSupportVnodes = tsNumOfSupportVnodes; + req.numOfDiskCfg = tsDiskCfgNum; req.memTotal = tsTotalMemoryKB * 1024; req.memAvail = req.memTotal - tsRpcQueueMemoryAllowed - 16 * 1024 * 1024; tstrncpy(req.dnodeEp, tsLocalEp, TSDB_EP_LEN); + char *machine = tGetMachineId(); + if (machine) { + tstrncpy(req.machineId, machine, TSDB_MACHINE_ID_LEN + 1); + taosMemoryFreeClear(machine); + } req.clusterCfg.statusInterval = tsStatusInterval; req.clusterCfg.checkTime = 0; @@ -414,33 +420,6 @@ int32_t dmProcessRetrieve(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) { return TSDB_CODE_SUCCESS; } -int32_t dmProcessGetMachine(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) { - int32_t size = TSDB_MACHINE_ID_LEN; - terrno = 0; - void *pRsp = rpcMallocCont(size); - if (pRsp == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - dError("failed to retrieve data since %s", terrstr()); - return -1; - } - char *machineId = grantGetMachineId(); - if (machineId) { - memcpy(pRsp, machineId, TSDB_MACHINE_ID_LEN); - taosMemoryFreeClear(machineId); - } else { - terrno = TSDB_CODE_INVALID_DATA_FMT; - rpcFreeCont(pRsp); - pRsp = NULL; - size = 0; - } - - pMsg->code = terrno; - pMsg->info.rsp = pRsp; - pMsg->info.rspLen = size; - - return TSDB_CODE_SUCCESS; -} - SArray *dmGetMsgHandles() { int32_t code = -1; SArray *pArray = taosArrayInit(16, sizeof(SMgmtHandle)); @@ -463,7 +442,6 @@ SArray *dmGetMsgHandles() { if (dmSetMgmtHandle(pArray, TDMT_MND_GRANT, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_GRANT_NOTIFY, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_AUTH_RSP, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER; - if (dmSetMgmtHandle(pArray, TDMT_MND_GET_MACHINE, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER; code = 0; diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c b/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c index 831d1bc10c9..7ca19d77257 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c @@ -348,9 +348,6 @@ static void dmProcessMgmtQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) { case TDMT_MND_GRANT_NOTIFY: code = dmProcessGrantNotify(NULL, pMsg); break; - case TDMT_MND_GET_MACHINE: - code = dmProcessGetMachine(pMgmt, pMsg); - break; default: terrno = TSDB_CODE_MSG_NOT_PROCESSED; dGError("msg:%p, not processed in mgmt queue", pMsg); diff --git a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c index eb5de7971b8..c40ef3685c8 100644 --- a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c +++ b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c @@ -163,8 +163,6 @@ SArray *mmGetMsgHandles() { if (dmSetMgmtHandle(pArray, TDMT_MND_DROP_STREAM, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_PAUSE_STREAM, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_RESUME_STREAM, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; - if (dmSetMgmtHandle(pArray, TDMT_MND_GRANT_RSP, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; - if (dmSetMgmtHandle(pArray, TDMT_MND_GET_MACHINE_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_RETRIEVE_IP_WHITE, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_GET_USER_WHITELIST, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 67a49b26b30..11500374803 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -210,6 +210,7 @@ typedef struct { int32_t numOfVnodes; int32_t numOfOtherNodes; int32_t numOfSupportVnodes; + int32_t numOfDiskCfg; float numOfCores; int64_t memTotal; int64_t memAvail; diff --git a/source/dnode/mnode/impl/inc/mndInt.h b/source/dnode/mnode/impl/inc/mndInt.h index 3c05c9e258f..a6c4fbd762b 100644 --- a/source/dnode/mnode/impl/inc/mndInt.h +++ b/source/dnode/mnode/impl/inc/mndInt.h @@ -107,7 +107,6 @@ typedef struct { typedef struct SMnode { int32_t selfDnodeId; - int32_t refMgmt; int64_t clusterId; TdThread thread; TdThreadRwlock lock; diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index b15017ff376..2da8b7bc2ee 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -58,13 +58,6 @@ enum { DND_DROP, }; -typedef struct { - SMnodeRefInfo refInfo; - int64_t refId; - tsem_t sem; - char machineId[TSDB_MACHINE_ID_LEN + 1]; -} SMachineInfo; - static int32_t mndCreateDefaultDnode(SMnode *pMnode); static SSdbRaw *mndDnodeActionEncode(SDnodeObj *pDnode); static SSdbRow *mndDnodeActionDecode(SSdbRaw *pRaw); @@ -78,7 +71,6 @@ static int32_t mndProcessCreateDnodeReq(SRpcMsg *pReq); static int32_t mndProcessDropDnodeReq(SRpcMsg *pReq); static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq); static int32_t mndProcessConfigDnodeRsp(SRpcMsg *pRsp); -static int32_t mndProcessGetMachineRsp(SRpcMsg *pRsp); static int32_t mndProcessStatusReq(SRpcMsg *pReq); static int32_t mndProcessNotifyReq(SRpcMsg *pReq); static int32_t mndProcessRestoreDnodeReq(SRpcMsg *pReq); @@ -112,7 +104,6 @@ int32_t mndInitDnode(SMnode *pMnode) { mndSetMsgHandle(pMnode, TDMT_MND_DROP_DNODE, mndProcessDropDnodeReq); mndSetMsgHandle(pMnode, TDMT_MND_CONFIG_DNODE, mndProcessConfigDnodeReq); mndSetMsgHandle(pMnode, TDMT_DND_CONFIG_DNODE_RSP, mndProcessConfigDnodeRsp); - mndSetMsgHandle(pMnode, TDMT_MND_GET_MACHINE_RSP, mndProcessGetMachineRsp); mndSetMsgHandle(pMnode, TDMT_MND_STATUS, mndProcessStatusReq); mndSetMsgHandle(pMnode, TDMT_MND_NOTIFY, mndProcessNotifyReq); mndSetMsgHandle(pMnode, TDMT_MND_DNODE_LIST, mndProcessDnodeListReq); @@ -145,7 +136,7 @@ static int32_t mndCreateDefaultDnode(SMnode *pMnode) { tstrncpy(dnodeObj.fqdn, tsLocalFqdn, TSDB_FQDN_LEN); dnodeObj.fqdn[TSDB_FQDN_LEN - 1] = 0; snprintf(dnodeObj.ep, TSDB_EP_LEN - 1, "%s:%u", tsLocalFqdn, tsServerPort); - char *machineId = grantGetMachineId(); + char *machineId = tGetMachineId(); if (machineId) { memcpy(dnodeObj.machineId, machineId, TSDB_MACHINE_ID_LEN); taosMemoryFreeClear(machineId); @@ -677,8 +668,12 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) { pDnode->rebootTime = statusReq.rebootTime; pDnode->numOfCores = statusReq.numOfCores; pDnode->numOfSupportVnodes = statusReq.numOfSupportVnodes; + pDnode->numOfDiskCfg = statusReq.numOfDiskCfg; pDnode->memAvail = statusReq.memAvail; pDnode->memTotal = statusReq.memTotal; + if (pDnode->machineId[0] == 0 && statusReq.machineId[0] != 0) { + tstrncpy(pDnode->machineId, statusReq.machineId, TSDB_MACHINE_ID_LEN + 1); + } SStatusRsp statusRsp = {0}; statusRsp.statusSeq++; @@ -748,25 +743,10 @@ _OVER: return code; } -static int32_t mndSendGetMachineToDnode(SMnode *pMnode, SDnodeObj *pObj, SMachineInfo *pInfo) { - SRpcMsg rpcMsg = {.pCont = NULL, .contLen = 0, .msgType = TDMT_MND_GET_MACHINE, .info.ahandle = (void*)pInfo->refId}; - SEpSet epSet = {.numOfEps = 1}; - strncpy(epSet.eps[0].fqdn, pObj->fqdn, TSDB_FQDN_LEN); - epSet.eps[0].port = pObj->port; - return tmsgSendReq(&epSet, &rpcMsg); -} - -static void mndDestroyMachineInfo(void *pInfo) { - if (pInfo) { - tsem_destroy(&((SMachineInfo *)pInfo)->sem); - } -} - static int32_t mndCreateDnode(SMnode *pMnode, SRpcMsg *pReq, SCreateDnodeReq *pCreate) { int32_t code = -1; SSdbRaw *pRaw = NULL; STrans *pTrans = NULL; - SMachineInfo *pInfo = NULL; SDnodeObj dnodeObj = {0}; dnodeObj.id = sdbGetMaxId(pMnode->pSdb, SDB_DNODE); @@ -775,29 +755,6 @@ static int32_t mndCreateDnode(SMnode *pMnode, SRpcMsg *pReq, SCreateDnodeReq *pC dnodeObj.port = pCreate->port; tstrncpy(dnodeObj.fqdn, pCreate->fqdn, TSDB_FQDN_LEN); snprintf(dnodeObj.ep, TSDB_EP_LEN - 1, "%s:%u", pCreate->fqdn, pCreate->port); - #if 0 - if (!(pInfo = taosMemoryCalloc(1, sizeof(*pInfo)))) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - goto _OVER; - } - pInfo->refInfo.freeFp = mndDestroyMachineInfo; - tsem_init(&pInfo->sem, 0, 0); - if((pInfo->refId = taosAddRef(pMnode->refMgmt, pInfo)) < 0) { - goto _OVER; - } - if ((terrno = mndSendGetMachineToDnode(pMnode, &dnodeObj, pInfo)) != 0) { - goto _OVER; - } - if (tsem_timewait(&pInfo->sem, 1000) < 0) { - terrno = TSDB_CODE_DNODE_OFFLINE; - goto _OVER; - } - if (strlen(pInfo->machineId) == TSDB_MACHINE_ID_LEN) { - memcpy(dnodeObj.machineId, pInfo->machineId, TSDB_MACHINE_ID_LEN); - } else { - mWarn("Invalid machineId:%s to create dnode:%s", pInfo->machineId, dnodeObj.fqdn); - } - #endif pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_GLOBAL, pReq, "create-dnode"); if (pTrans == NULL) goto _OVER; mInfo("trans:%d, used to create dnode:%s", pTrans->id, dnodeObj.ep); @@ -815,9 +772,6 @@ static int32_t mndCreateDnode(SMnode *pMnode, SRpcMsg *pReq, SCreateDnodeReq *pC _OVER: mndTransDrop(pTrans); sdbFreeRaw(pRaw); - if (pInfo) { - taosRemoveRef(pMnode->refMgmt, pInfo->refId); - } return code; } @@ -1318,27 +1272,6 @@ static int32_t mndProcessConfigDnodeRsp(SRpcMsg *pRsp) { return 0; } -static int32_t mndProcessGetMachineRsp(SRpcMsg *pRsp) { - if (pRsp->code != 0 || pRsp->contLen != TSDB_MACHINE_ID_LEN || pRsp->pCont == NULL) { - mError("failed to get machine since %s", tstrerror(pRsp->code ? pRsp->code : TSDB_CODE_INVALID_MSG)); - return -1; - } - - SMnode *pMnode = pRsp->info.node; - int64_t refId = (int64_t)pRsp->info.ahandle; - - if (pMnode) { - SMachineInfo *pInfo = taosAcquireRef(pMnode->refMgmt, refId); - if (pInfo) { - memcpy(pInfo->machineId, pRsp->pCont, TSDB_MACHINE_ID_LEN); - tsem_post(&pInfo->sem); - taosReleaseRef(pMnode->refMgmt, refId); - } - } - - return 0; -} - static int32_t mndRetrieveConfigs(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { SMnode *pMnode = pReq->info.node; int32_t totalRows = 0; diff --git a/source/dnode/mnode/impl/src/mndGrant.c b/source/dnode/mnode/impl/src/mndGrant.c index 75314f67727..c0597c445b1 100644 --- a/source/dnode/mnode/impl/src/mndGrant.c +++ b/source/dnode/mnode/impl/src/mndGrant.c @@ -75,7 +75,7 @@ void grantParseParameter() { mError("can't parsed parameter k"); } void grantReset(SMnode *pMnode, EGrantType grant, uint64_t value) {} void grantAdd(EGrantType grant, uint64_t value) {} void grantRestore(EGrantType grant, uint64_t value) {} -char *grantGetMachineId(){return NULL}; +char *tGetMachineId(){return NULL}; int32_t dmProcessGrantReq(void *pInfo, SRpcMsg *pMsg) { return TSDB_CODE_SUCCESS; } int32_t dmProcessGrantNotify(void *pInfo, SRpcMsg *pMsg) { return TSDB_CODE_SUCCESS; } diff --git a/source/dnode/mnode/impl/src/mndMain.c b/source/dnode/mnode/impl/src/mndMain.c index 84bf0261538..aaa59aed93b 100644 --- a/source/dnode/mnode/impl/src/mndMain.c +++ b/source/dnode/mnode/impl/src/mndMain.c @@ -193,7 +193,7 @@ static void mndPullupGrant(SMnode *pMnode) { if (pReq != NULL) { SRpcMsg rpcMsg = { .msgType = TDMT_MND_GRANT_HB_TIMER, .pCont = pReq, .contLen = contLen, .info.ahandle = (void *)0x9527}; - tmsgPutToQueue(&pMnode->msgCb, READ_QUEUE, &rpcMsg); + tmsgPutToQueue(&pMnode->msgCb, WRITE_QUEUE, &rpcMsg); } } @@ -596,14 +596,6 @@ static void mndSetOptions(SMnode *pMnode, const SMnodeOpt *pOption) { memcpy(pMnode->syncMgmt.nodeRoles, pOption->nodeRoles, sizeof(pOption->nodeRoles)); } -static void mndDestroyRefInfo(void *pInfo) { - SMnodeRefInfo *pRefInfo = pInfo; - if (pRefInfo && pRefInfo->freeFp) { - (*pRefInfo->freeFp)(pInfo); - } - taosMemoryFree(pInfo); -} - SMnode *mndOpen(const char *path, const SMnodeOpt *pOption) { mInfo("start to open mnode in %s", path); @@ -628,16 +620,7 @@ SMnode *mndOpen(const char *path, const SMnodeOpt *pOption) { return NULL; } - int32_t code = 0; - if ((pMnode->refMgmt = taosOpenRef(200, mndDestroyRefInfo)) < 0) { - code = terrno; - mError("failed to open mnode since %s", terrstr()); - mndClose(pMnode); - terrno = code; - return NULL; - } - - code = mndCreateDir(pMnode, path); + int32_t code = mndCreateDir(pMnode, path); if (code != 0) { code = terrno; mError("failed to open mnode since %s", terrstr()); @@ -680,7 +663,6 @@ void mndClose(SMnode *pMnode) { if (pMnode != NULL) { mInfo("start to close mnode"); mndCleanupSteps(pMnode, -1); - taosCloseRef(pMnode->refMgmt); taosMemoryFreeClear(pMnode->path); taosMemoryFreeClear(pMnode); mInfo("mnode is closed"); From 2798ff824cf4e56eb9ef86377e36a19d5a70e169 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Thu, 25 Jan 2024 16:07:09 +0800 Subject: [PATCH 30/93] feat:[TD-28247]add grant for subscribe and stream --- include/common/tgrant.h | 1 + include/common/tmsg.h | 24 ++- source/client/src/clientTmq.c | 33 +++- source/common/src/tmsg.c | 83 ++++++---- source/dnode/mnode/impl/inc/mndPrivilege.h | 1 - source/dnode/mnode/impl/src/mndConsumer.c | 59 +++++++- source/dnode/mnode/impl/src/mndPrivilege.c | 3 - source/dnode/mnode/impl/src/mndStream.c | 67 +++++++-- source/dnode/mnode/impl/src/mndUser.c | 2 + .../0-others/subscribe_stream_privilege.py | 142 ++++++++++++++++++ 10 files changed, 351 insertions(+), 64 deletions(-) create mode 100644 tests/system-test/0-others/subscribe_stream_privilege.py diff --git a/include/common/tgrant.h b/include/common/tgrant.h index f06fca80141..cfb1401698f 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -48,6 +48,7 @@ typedef enum { TSDB_GRANT_CPU_CORES, TSDB_GRANT_STABLE, TSDB_GRANT_TABLE, + TSDB_GRANT_SUBSCRIBE, } EGrantType; int32_t grantCheck(EGrantType grant); diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 2ee48a18e00..05e2738f7c1 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -3360,6 +3360,7 @@ typedef struct { char name[TSDB_STREAM_FNAME_LEN]; int8_t igNotExists; int8_t igUntreated; + int8_t suspend; } SMResumeStreamReq; int32_t tSerializeSMResumeStreamReq(void* buf, int32_t bufLen, const SMResumeStreamReq* pReq); @@ -3754,7 +3755,12 @@ typedef struct { } SMqHbReq; typedef struct { - int8_t reserved; + char topic[TSDB_TOPIC_FNAME_LEN]; + int8_t noPrivilege; +} STopicPrivilege; + +typedef struct { + SArray* topicPrivileges; // SArray } SMqHbRsp; typedef struct { @@ -3773,18 +3779,6 @@ typedef struct { SVCreateTbReq cTbReq; } SVSubmitBlk; -typedef struct { - int32_t flags; - int32_t nBlocks; - union { - SArray* pArray; - SVSubmitBlk* pBlocks; - }; -} SVSubmitReq; - -int32_t tEncodeSVSubmitReq(SEncoder* pCoder, const SVSubmitReq* pReq); -int32_t tDecodeSVSubmitReq(SDecoder* pCoder, SVSubmitReq* pReq); - typedef struct { SMsgHead header; uint64_t sId; @@ -3893,6 +3887,10 @@ int32_t tSerializeSMqHbReq(void* buf, int32_t bufLen, SMqHbReq* pReq); int32_t tDeserializeSMqHbReq(void* buf, int32_t bufLen, SMqHbReq* pReq); int32_t tDeatroySMqHbReq(SMqHbReq* pReq); +int32_t tSerializeSMqHbRsp(void* buf, int32_t bufLen, SMqHbRsp* pRsp); +int32_t tDeserializeSMqHbRsp(void* buf, int32_t bufLen, SMqHbRsp* pRsp); +int32_t tDeatroySMqHbRsp(SMqHbRsp* pRsp); + int32_t tSerializeSMqSeekReq(void* buf, int32_t bufLen, SMqSeekReq* pReq); int32_t tDeserializeSMqSeekReq(void* buf, int32_t bufLen, SMqSeekReq* pReq); diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 69681b9ae01..79611b7eee6 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -155,6 +155,7 @@ typedef struct { char db[TSDB_DB_FNAME_LEN]; SArray* vgs; // SArray SSchemaWrapper schema; + int8_t noPrivilege; } SMqClientTopic; typedef struct { @@ -739,6 +740,29 @@ void tmqAssignDelayedCommitTask(void* param, void* tmrId) { int32_t tmqHbCb(void* param, SDataBuf* pMsg, int32_t code) { if (pMsg) { + SMqHbRsp rsp = {0}; + tDeserializeSMqHbRsp(pMsg->pData, pMsg->len, &rsp); + + int64_t refId = *(int64_t*)param; + tmq_t* tmq = taosAcquireRef(tmqMgmt.rsetId, refId); + if (tmq != NULL) { + taosWLockLatch(&tmq->lock); + for(int32_t i = 0; i < taosArrayGetSize(rsp.topicPrivileges); i++){ + STopicPrivilege* privilege = taosArrayGet(rsp.topicPrivileges, i); + if(privilege->noPrivilege == 1){ + int32_t topicNumCur = taosArrayGetSize(tmq->clientTopics); + for (int32_t j = 0; j < topicNumCur; j++) { + SMqClientTopic* pTopicCur = taosArrayGet(tmq->clientTopics, j); + if(strcmp(pTopicCur->topicName, privilege->topic) == 0){ + tscInfo("consumer:0x%" PRIx64 ", has no privilege, topic:%s", tmq->consumerId, privilege->topic); + pTopicCur->noPrivilege = 1; + } + } + } + } + taosWUnLockLatch(&tmq->lock); + } + taosMemoryFree(pMsg->pData); taosMemoryFree(pMsg->pEpSet); } @@ -809,7 +833,9 @@ void tmqSendHbReq(void* param, void* tmrId) { sendInfo->requestId = generateRequestId(); sendInfo->requestObjRefId = 0; - sendInfo->param = NULL; + sendInfo->paramFreeFp = taosMemoryFree; + sendInfo->param = taosMemoryMalloc(sizeof(int64_t)); + *(int64_t *)sendInfo->param = refId; sendInfo->fp = tmqHbCb; sendInfo->msgType = TDMT_MND_TMQ_HB; @@ -1705,7 +1731,10 @@ static int32_t tmqPollImpl(tmq_t* tmq, int64_t timeout) { for (int i = 0; i < numOfTopics; i++) { SMqClientTopic* pTopic = taosArrayGet(tmq->clientTopics, i); int32_t numOfVg = taosArrayGetSize(pTopic->vgs); - + if(pTopic->noPrivilege){ + tscDebug("consumer:0x%" PRIx64 " has no privilegr for topic:%s", tmq->consumerId, pTopic->topicName); + continue; + } for (int j = 0; j < numOfVg; j++) { SMqClientVg* pVg = taosArrayGet(pTopic->vgs, j); if (taosGetTimestampMs() - pVg->emptyBlockReceiveTs < EMPTY_BLOCK_POLL_IDLE_DURATION) { // less than 10ms diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index c9e2908e8a7..a3958845381 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -6139,6 +6139,55 @@ int32_t tDeserializeSMqAskEpReq(void *buf, int32_t bufLen, SMqAskEpReq *pReq) { return 0; } +int32_t tDeatroySMqHbRsp(SMqHbRsp *pRsp) { + taosArrayDestroy(pRsp->topicPrivileges); + return 0; +} + +int32_t tSerializeSMqHbRsp(void *buf, int32_t bufLen, SMqHbRsp *pRsp) { + SEncoder encoder = {0}; + tEncoderInit(&encoder, buf, bufLen); + if (tStartEncode(&encoder) < 0) return -1; + + int32_t sz = taosArrayGetSize(pRsp->topicPrivileges); + if (tEncodeI32(&encoder, sz) < 0) return -1; + for (int32_t i = 0; i < sz; ++i) { + STopicPrivilege *privilege = (STopicPrivilege *)taosArrayGet(pRsp->topicPrivileges, i); + if (tEncodeCStr(&encoder, privilege->topic) < 0) return -1; + if (tEncodeI8(&encoder, privilege->noPrivilege) < 0) return -1; + } + + tEndEncode(&encoder); + + int32_t tlen = encoder.pos; + tEncoderClear(&encoder); + + return tlen; +} + +int32_t tDeserializeSMqHbRsp(void *buf, int32_t bufLen, SMqHbRsp *pRsp) { + SDecoder decoder = {0}; + tDecoderInit(&decoder, (char *)buf, bufLen); + + if (tStartDecode(&decoder) < 0) return -1; + + int32_t sz = 0; + if (tDecodeI32(&decoder, &sz) < 0) return -1; + if (sz > 0) { + pRsp->topicPrivileges = taosArrayInit(sz, sizeof(STopicPrivilege)); + if (NULL == pRsp->topicPrivileges) return -1; + for (int32_t i = 0; i < sz; ++i) { + STopicPrivilege *data = taosArrayReserve(pRsp->topicPrivileges, 1); + if (tDecodeCStrTo(&decoder, data->topic) < 0) return -1; + if (tDecodeI8(&decoder, &data->noPrivilege) < 0) return -1; + } + } + tEndDecode(&decoder); + + tDecoderClear(&decoder); + return 0; +} + int32_t tDeatroySMqHbReq(SMqHbReq *pReq) { for (int i = 0; i < taosArrayGetSize(pReq->topics); i++) { TopicOffsetRows *vgs = taosArrayGet(pReq->topics, i); @@ -6194,7 +6243,7 @@ int32_t tDeserializeSMqHbReq(void *buf, int32_t bufLen, SMqHbReq *pReq) { if (NULL == pReq->topics) return -1; for (int32_t i = 0; i < sz; ++i) { TopicOffsetRows *data = taosArrayReserve(pReq->topics, 1); - tDecodeCStrTo(&decoder, data->topicName); + if (tDecodeCStrTo(&decoder, data->topicName) < 0) return -1; int32_t szVgs = 0; if (tDecodeI32(&decoder, &szVgs) < 0) return -1; if (szVgs > 0) { @@ -7753,36 +7802,6 @@ static int32_t tDecodeSVSubmitBlk(SDecoder *pCoder, SVSubmitBlk *pBlock, int32_t return 0; } -int32_t tEncodeSVSubmitReq(SEncoder *pCoder, const SVSubmitReq *pReq) { - int32_t nBlocks = taosArrayGetSize(pReq->pArray); - - if (tStartEncode(pCoder) < 0) return -1; - - if (tEncodeI32v(pCoder, pReq->flags) < 0) return -1; - if (tEncodeI32v(pCoder, nBlocks) < 0) return -1; - for (int32_t iBlock = 0; iBlock < nBlocks; iBlock++) { - if (tEncodeSVSubmitBlk(pCoder, (SVSubmitBlk *)taosArrayGet(pReq->pArray, iBlock), pReq->flags) < 0) return -1; - } - - tEndEncode(pCoder); - return 0; -} - -int32_t tDecodeSVSubmitReq(SDecoder *pCoder, SVSubmitReq *pReq) { - if (tStartDecode(pCoder) < 0) return -1; - - if (tDecodeI32v(pCoder, &pReq->flags) < 0) return -1; - if (tDecodeI32v(pCoder, &pReq->nBlocks) < 0) return -1; - pReq->pBlocks = tDecoderMalloc(pCoder, sizeof(SVSubmitBlk) * pReq->nBlocks); - if (pReq->pBlocks == NULL) return -1; - for (int32_t iBlock = 0; iBlock < pReq->nBlocks; iBlock++) { - if (tDecodeSVSubmitBlk(pCoder, pReq->pBlocks + iBlock, pReq->flags) < 0) return -1; - } - - tEndDecode(pCoder); - return 0; -} - static int32_t tEncodeSSubmitBlkRsp(SEncoder *pEncoder, const SSubmitBlkRsp *pBlock) { if (tStartEncode(pEncoder) < 0) return -1; @@ -8914,6 +8933,7 @@ int32_t tSerializeSMResumeStreamReq(void *buf, int32_t bufLen, const SMResumeStr if (tEncodeCStr(&encoder, pReq->name) < 0) return -1; if (tEncodeI8(&encoder, pReq->igNotExists) < 0) return -1; if (tEncodeI8(&encoder, pReq->igUntreated) < 0) return -1; + if (tEncodeI8(&encoder, pReq->suspend) < 0) return -1; tEndEncode(&encoder); int32_t tlen = encoder.pos; @@ -8928,6 +8948,7 @@ int32_t tDeserializeSMResumeStreamReq(void *buf, int32_t bufLen, SMResumeStreamR if (tDecodeCStrTo(&decoder, pReq->name) < 0) return -1; if (tDecodeI8(&decoder, &pReq->igNotExists) < 0) return -1; if (tDecodeI8(&decoder, &pReq->igUntreated) < 0) return -1; + if (tDecodeI8(&decoder, &pReq->suspend) < 0) return -1; tEndDecode(&decoder); tDecoderClear(&decoder); diff --git a/source/dnode/mnode/impl/inc/mndPrivilege.h b/source/dnode/mnode/impl/inc/mndPrivilege.h index 4a8fb207150..6f74ea3b366 100644 --- a/source/dnode/mnode/impl/inc/mndPrivilege.h +++ b/source/dnode/mnode/impl/inc/mndPrivilege.h @@ -30,7 +30,6 @@ int32_t mndCheckDbPrivilege(SMnode *pMnode, const char *user, EOperType operType int32_t mndCheckDbPrivilegeByName(SMnode *pMnode, const char *user, EOperType operType, const char *dbname); int32_t mndCheckViewPrivilege(SMnode *pMnode, const char *user, EOperType operType, const char *pViewFName); int32_t mndCheckTopicPrivilege(SMnode *pMnode, const char *user, EOperType operType, SMqTopicObj *pTopic); -int32_t mndCheckTopicPrivilegeByName(SMnode *pMnode, const char *user, EOperType operType, const char *topicName); int32_t mndCheckShowPrivilege(SMnode *pMnode, const char *user, EShowType showType, const char *dbname); int32_t mndCheckAlterUserPrivilege(SUserObj *pOperUser, SUserObj *pUser, SAlterUserReq *pAlter); int32_t mndSetUserAuthRsp(SMnode *pMnode, SUserObj *pUser, SGetUserAuthRsp *pRsp); diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 4db000287c9..14e3df2af93 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -102,7 +102,8 @@ static int32_t validateTopics(STrans *pTrans, const SArray *pTopicList, SMnode * } if (mndCheckTopicPrivilege(pMnode, pUser, MND_OPER_SUBSCRIBE, pTopic) != 0) { - code = -1; + code = TSDB_CODE_MND_NO_RIGHTS; + terrno = TSDB_CODE_MND_NO_RIGHTS; goto FAILED; } @@ -220,22 +221,52 @@ FAIL: return -1; } +static int32_t checkPrivilege(SMnode *pMnode, SMqConsumerObj *pConsumer, SMqHbRsp *rsp, char* user){ + rsp->topicPrivileges = taosArrayInit(taosArrayGetSize(pConsumer->currentTopics), sizeof(STopicPrivilege)); + if(rsp->topicPrivileges == NULL){ + terrno = TSDB_CODE_OUT_OF_MEMORY; + return terrno; + } + for(int32_t i = 0; i < taosArrayGetSize(pConsumer->currentTopics); i++){ + char *topic = taosArrayGetP(pConsumer->currentTopics, i); + SMqTopicObj* pTopic = mndAcquireTopic(pMnode, topic); + if (pTopic == NULL) { // terrno has been set by callee function + continue; + } + STopicPrivilege *data = taosArrayReserve(rsp->topicPrivileges, 1); + if (mndCheckTopicPrivilege(pMnode, user, MND_OPER_SUBSCRIBE, pTopic) != 0 || grantCheck(TSDB_GRANT_SUBSCRIBE) < 0) { + data->noPrivilege = 1; + } else{ + data->noPrivilege = 0; + } + mndReleaseTopic(pMnode, pTopic); + } + return 0; +} + static int32_t mndProcessMqHbReq(SRpcMsg *pMsg) { int32_t code = 0; SMnode *pMnode = pMsg->info.node; SMqHbReq req = {0}; + SMqHbRsp rsp = {0}; + SMqConsumerObj *pConsumer = NULL; - if ((code = tDeserializeSMqHbReq(pMsg->pCont, pMsg->contLen, &req)) < 0) { + if (tDeserializeSMqHbReq(pMsg->pCont, pMsg->contLen, &req) < 0) { terrno = TSDB_CODE_OUT_OF_MEMORY; + code = TSDB_CODE_OUT_OF_MEMORY; goto end; } int64_t consumerId = req.consumerId; - SMqConsumerObj *pConsumer = mndAcquireConsumer(pMnode, consumerId); + pConsumer = mndAcquireConsumer(pMnode, consumerId); if (pConsumer == NULL) { mError("consumer:0x%" PRIx64 " not exist", consumerId); terrno = TSDB_CODE_MND_CONSUMER_NOT_EXIST; - code = -1; + code = TSDB_CODE_MND_CONSUMER_NOT_EXIST; + goto end; + } + code = checkPrivilege(pMnode, pConsumer, &rsp, pMsg->info.conn.user); + if(code != 0){ goto end; } @@ -280,9 +311,22 @@ static int32_t mndProcessMqHbReq(SRpcMsg *pMsg) { mndReleaseSubscribe(pMnode, pSub); } - mndReleaseConsumer(pMnode, pConsumer); + // encode rsp + int32_t tlen = tSerializeSMqHbRsp(NULL, 0, &rsp); + void *buf = rpcMallocCont(tlen); + if (buf == NULL) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + code = TSDB_CODE_OUT_OF_MEMORY; + goto end; + } + + tSerializeSMqHbRsp(&buf, tlen, &rsp); + pMsg->info.rsp = buf; + pMsg->info.rspLen = tlen; end: + tDeatroySMqHbRsp(&rsp); + mndReleaseConsumer(pMnode, pConsumer); tDeatroySMqHbReq(&req); return code; } @@ -500,6 +544,11 @@ int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) { SMnode *pMnode = pMsg->info.node; char *msgStr = pMsg->pCont; + if(grantCheck(TSDB_GRANT_SUBSCRIBE) < 0){ + terrno = TSDB_CODE_GRANT_EXPIRED; + return -1; + } + SCMSubscribeReq subscribe = {0}; tDeserializeSCMSubscribeReq(msgStr, &subscribe); diff --git a/source/dnode/mnode/impl/src/mndPrivilege.c b/source/dnode/mnode/impl/src/mndPrivilege.c index d4c0a6b36b5..13a80cb1a6f 100644 --- a/source/dnode/mnode/impl/src/mndPrivilege.c +++ b/source/dnode/mnode/impl/src/mndPrivilege.c @@ -30,9 +30,6 @@ int32_t mndCheckDbPrivilegeByName(SMnode *pMnode, const char *user, EOperType op } int32_t mndCheckTopicPrivilege(SMnode *pMnode, const char *user, EOperType operType, SMqTopicObj *pTopic) { return 0; } -int32_t mndCheckTopicPrivilegeByName(SMnode *pMnode, const char *user, EOperType operType, const char *topicName) { - return 0; -} int32_t mndSetUserWhiteListRsp(SMnode *pMnode, SUserObj *pUser, SGetUserWhiteListRsp *pWhiteListRsp) { diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index 441305f2820..bf92a51ed8e 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -808,6 +808,11 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) { int32_t sqlLen = 0; terrno = TSDB_CODE_SUCCESS; + if(grantCheck(TSDB_GRANT_STREAMS) < 0){ + terrno = TSDB_CODE_GRANT_STREAM_LIMITED; + return -1; + } + SCMCreateStreamReq createStreamReq = {0}; if (tDeserializeSCMCreateStreamReq(pReq->pCont, pReq->contLen, &createStreamReq) != 0) { terrno = TSDB_CODE_INVALID_MSG; @@ -2034,17 +2039,22 @@ static int32_t mndProcessResumeStreamReq(SRpcMsg *pReq) { SMnode *pMnode = pReq->info.node; SStreamObj *pStream = NULL; - SMResumeStreamReq pauseReq = {0}; - if (tDeserializeSMResumeStreamReq(pReq->pCont, pReq->contLen, &pauseReq) < 0) { + if(grantCheck(TSDB_GRANT_STREAMS) < 0){ + terrno = TSDB_CODE_GRANT_EXPIRED; + return -1; + } + + SMResumeStreamReq resumeReq = {0}; + if (tDeserializeSMResumeStreamReq(pReq->pCont, pReq->contLen, &resumeReq) < 0) { terrno = TSDB_CODE_INVALID_MSG; return -1; } - pStream = mndAcquireStream(pMnode, pauseReq.name); + pStream = mndAcquireStream(pMnode, resumeReq.name); if (pStream == NULL) { - if (pauseReq.igNotExists) { - mInfo("stream:%s, not exist, if exist is set", pauseReq.name); + if (resumeReq.igNotExists) { + mInfo("stream:%s, not exist, if exist is set", resumeReq.name); sdbRelease(pMnode->pSdb, pStream); return 0; } else { @@ -2072,12 +2082,12 @@ static int32_t mndProcessResumeStreamReq(SRpcMsg *pReq) { STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pReq, MND_STREAM_RESUME_NAME); if (pTrans == NULL) { - mError("stream:%s, failed to resume stream since %s", pauseReq.name, terrstr()); + mError("stream:%s, failed to resume stream since %s", resumeReq.name, terrstr()); sdbRelease(pMnode->pSdb, pStream); return -1; } - mInfo("trans:%d used to resume stream:%s", pTrans->id, pauseReq.name); + mInfo("trans:%d used to resume stream:%s", pTrans->id, resumeReq.name); mndTransSetDbName(pTrans, pStream->sourceDb, pStream->targetSTbName); if (mndTransCheckConflict(pMnode, pTrans) != 0) { @@ -2089,8 +2099,8 @@ static int32_t mndProcessResumeStreamReq(SRpcMsg *pReq) { int32_t code = mndStreamRegisterTrans(pTrans, MND_STREAM_RESUME_NAME, pStream->uid); // resume all tasks - if (mndResumeAllStreamTasks(pTrans, pMnode, pStream, pauseReq.igUntreated) < 0) { - mError("stream:%s, failed to drop task since %s", pauseReq.name, terrstr()); + if (mndResumeAllStreamTasks(pTrans, pMnode, pStream, resumeReq.igUntreated) < 0) { + mError("stream:%s, failed to drop task since %s", resumeReq.name, terrstr()); sdbRelease(pMnode->pSdb, pStream); mndTransDrop(pTrans); return -1; @@ -3030,6 +3040,39 @@ static void updateStageInfo(STaskStatusEntry *pTaskEntry, int64_t stage) { } } +int32_t suspendAllStreams(SMnode *pMnode, SRpcHandleInfo* info){ + SSdb *pSdb = pMnode->pSdb; + SStreamObj *pStream = NULL; + void* pIter = NULL; + while(1) { + pIter = sdbFetch(pSdb, SDB_STREAM, pIter, (void **)&pStream); + if (pIter == NULL) break; + + if(pStream->status != STREAM_STATUS__PAUSE){ + SMPauseStreamReq *reqPause = rpcMallocCont(sizeof(SMPauseStreamReq)); + if (reqPause == NULL) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + sdbRelease(pSdb, pStream); + return -1; + } + strcpy(reqPause->name, pStream->name); + reqPause->igNotExists = 1; + + SRpcMsg rpcMsg = { + .msgType = TDMT_MND_PAUSE_STREAM, + .pCont = reqPause, + .contLen = sizeof(SMPauseStreamReq), + .info = *info, + }; + + tmsgPutToQueue(&pMnode->msgCb, WRITE_QUEUE, &rpcMsg); + } + + sdbRelease(pSdb, pStream); + } + return 0; +} + int32_t mndProcessStreamHb(SRpcMsg *pReq) { SMnode *pMnode = pReq->info.node; SStreamHbMsg req = {0}; @@ -3039,6 +3082,12 @@ int32_t mndProcessStreamHb(SRpcMsg *pReq) { int64_t streamId = 0; int32_t transId = 0; + if(grantCheck(TSDB_GRANT_STREAMS) < 0){ + if(suspendAllStreams(pMnode, &pReq->info) < 0){ + return -1; + } + } + SDecoder decoder = {0}; tDecoderInit(&decoder, pReq->pCont, pReq->contLen); diff --git a/source/dnode/mnode/impl/src/mndUser.c b/source/dnode/mnode/impl/src/mndUser.c index 0e3b5445082..5e5a3626a4c 100644 --- a/source/dnode/mnode/impl/src/mndUser.c +++ b/source/dnode/mnode/impl/src/mndUser.c @@ -1925,6 +1925,7 @@ static int32_t mndProcessAlterUserPrivilegesReq(SAlterUserReq *pAlterReq, SMnode return -1; } taosHashPut(pNewUser->topics, pTopic->name, len, pTopic->name, TSDB_TOPIC_FNAME_LEN); + mndReleaseTopic(pMnode, pTopic); } if (ALTER_USER_DEL_SUBSCRIBE_TOPIC_PRIV(pAlterReq->alterType, pAlterReq->privileges)) { @@ -1935,6 +1936,7 @@ static int32_t mndProcessAlterUserPrivilegesReq(SAlterUserReq *pAlterReq, SMnode return -1; } taosHashRemove(pNewUser->topics, pAlterReq->objname, len); + mndReleaseTopic(pMnode, pTopic); } return TSDB_CODE_SUCCESS; diff --git a/tests/system-test/0-others/subscribe_stream_privilege.py b/tests/system-test/0-others/subscribe_stream_privilege.py new file mode 100644 index 00000000000..881060ee3c2 --- /dev/null +++ b/tests/system-test/0-others/subscribe_stream_privilege.py @@ -0,0 +1,142 @@ +################################################################### +# Copyright (c) 2016 by TAOS Technologies, Inc. +# All rights reserved. +# +# This file is proprietary and confidential to TAOS Technologies. +# No part of this file may be reproduced, stored, transmitted, +# disclosed or used in any form or by any means other than as +# expressly provided by the written permission from Jianhui Tao +# +################################################################### + +# -*- coding: utf-8 -*- +import time + +import taos +from taos.tmq import * +from util.cases import * +from util.common import * +from util.log import * +from util.sql import * +from util.sqlset import * + + +class TDTestCase: + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor()) + self.setsql = TDSetSql() + self.stbname = 'stb' + self.user_name = 'test' + self.binary_length = 20 # the length of binary for column_dict + self.nchar_length = 20 # the length of nchar for column_dict + self.dbnames = ['db1'] + self.column_dict = { + 'ts': 'timestamp', + 'col1': 'float', + 'col2': 'int', + 'col3': 'float', + } + + self.tag_dict = { + 't1': 'int', + 't2': f'binary({self.binary_length})' + } + + self.tag_list = [ + f'1, "Beijing"', + f'2, "Shanghai"', + f'3, "Guangzhou"', + f'4, "Shenzhen"' + ] + + self.values_list = [ + f'now, 9.1, 200, 0.3' + ] + + self.tbnum = 4 + self.topic_name = 'topic1' + + + def prepare_data(self): + for db in self.dbnames: + tdSql.execute(f"create database {db}") + tdSql.execute(f"use {db}") + tdSql.execute(self.setsql.set_create_stable_sql(self.stbname, self.column_dict, self.tag_dict)) + for i in range(self.tbnum): + tdSql.execute(f'create table {self.stbname}_{i} using {self.stbname} tags({self.tag_list[i]})') + for j in self.values_list: + tdSql.execute(f'insert into {self.stbname}_{i} values({j})') + + def consumeTest(self): + consumer_dict = { + "group.id": "g1", + "td.connect.user": self.user_name, + "td.connect.pass": "test", + "auto.offset.reset": "earliest" + } + consumer = Consumer(consumer_dict) + + tdLog.debug("test subscribe topic created by other user") + exceptOccured = False + try: + consumer.subscribe([self.topic_name]) + except TmqError: + exceptOccured = True + + if not exceptOccured: + tdLog.exit(f"has no privilege, should except") + + tdLog.debug("test subscribe topic privilege granted by other user") + tdSql.execute(f'grant subscribe on {self.topic_name} to {self.user_name}') + + exceptOccured = False + try: + consumer.subscribe([self.topic_name]) + except TmqError: + exceptOccured = True + + if exceptOccured: + tdLog.exit(f"has privilege, should not except") + + cnt = 0 + try: + while True: + res = consumer.poll(1) + cnt += 1 + if cnt == 1: + if not res: + tdLog.exit(f"grant privilege, should get res") + elif cnt == 2: + if res: + time.sleep(1000) + tdLog.exit(f"revoke privilege, should get NULL") + + else: + break + + tdLog.debug("test subscribe topic privilege revoked by other user") + tdSql.execute(f'revoke subscribe on {self.topic_name} from {self.user_name}') + time.sleep(5) + + finally: + consumer.close() + time.sleep(1000) + + def create_user(self): + tdSql.execute(f'create topic {self.topic_name} as database {self.dbnames[0]}') + tdSql.execute(f'create user {self.user_name} pass "test"') + + def run(self): + self.prepare_data() + self.create_user() + self.consumeTest() + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) \ No newline at end of file From 474514ab6682e8a6b276b983cf21836c641b616e Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Thu, 25 Jan 2024 17:29:55 +0800 Subject: [PATCH 31/93] fix:test case error --- source/dnode/mnode/impl/src/mndConsumer.c | 3 ++- .../0-others/subscribe_stream_privilege.py | 11 +++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 14e3df2af93..2c8a1931211 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -234,6 +234,7 @@ static int32_t checkPrivilege(SMnode *pMnode, SMqConsumerObj *pConsumer, SMqHbR continue; } STopicPrivilege *data = taosArrayReserve(rsp->topicPrivileges, 1); + strcpy(data->topic, topic); if (mndCheckTopicPrivilege(pMnode, user, MND_OPER_SUBSCRIBE, pTopic) != 0 || grantCheck(TSDB_GRANT_SUBSCRIBE) < 0) { data->noPrivilege = 1; } else{ @@ -320,7 +321,7 @@ static int32_t mndProcessMqHbReq(SRpcMsg *pMsg) { goto end; } - tSerializeSMqHbRsp(&buf, tlen, &rsp); + tSerializeSMqHbRsp(buf, tlen, &rsp); pMsg->info.rsp = buf; pMsg->info.rspLen = tlen; diff --git a/tests/system-test/0-others/subscribe_stream_privilege.py b/tests/system-test/0-others/subscribe_stream_privilege.py index 881060ee3c2..5f40450af4a 100644 --- a/tests/system-test/0-others/subscribe_stream_privilege.py +++ b/tests/system-test/0-others/subscribe_stream_privilege.py @@ -22,6 +22,8 @@ from util.sqlset import * class TDTestCase: + clientCfgDict = {'debugFlag': 135} + updatecfgDict = {'debugFlag': 135, 'clientCfg':clientCfgDict} def init(self, conn, logSql, replicaVar=1): self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) @@ -61,7 +63,7 @@ class TDTestCase: def prepare_data(self): for db in self.dbnames: - tdSql.execute(f"create database {db}") + tdSql.execute(f"create database {db} vgroups 1") tdSql.execute(f"use {db}") tdSql.execute(self.setsql.set_create_stable_sql(self.stbname, self.column_dict, self.tag_dict)) for i in range(self.tbnum): @@ -110,11 +112,9 @@ class TDTestCase: tdLog.exit(f"grant privilege, should get res") elif cnt == 2: if res: - time.sleep(1000) tdLog.exit(f"revoke privilege, should get NULL") - - else: - break + else: + break tdLog.debug("test subscribe topic privilege revoked by other user") tdSql.execute(f'revoke subscribe on {self.topic_name} from {self.user_name}') @@ -122,7 +122,6 @@ class TDTestCase: finally: consumer.close() - time.sleep(1000) def create_user(self): tdSql.execute(f'create topic {self.topic_name} as database {self.dbnames[0]}') From bd2bef2428ea0f1b462261ce6fde0cae558210de Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Fri, 26 Jan 2024 15:05:31 +0800 Subject: [PATCH 32/93] fix:add test case --- source/client/src/clientTmq.c | 2 +- source/common/src/tgrant.c | 10 ++++- source/dnode/mnode/impl/src/mndConsumer.c | 2 +- source/dnode/mnode/impl/src/mndStream.c | 6 ++- source/libs/parser/src/parTranslater.c | 8 ++-- .../0-others/subscribe_stream_privilege.py | 45 +++++++++++++++++-- 6 files changed, 61 insertions(+), 12 deletions(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 79611b7eee6..8b424a7bf7a 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -762,7 +762,7 @@ int32_t tmqHbCb(void* param, SDataBuf* pMsg, int32_t code) { } taosWUnLockLatch(&tmq->lock); } - + tDeatroySMqHbRsp(&rsp); taosMemoryFree(pMsg->pData); taosMemoryFree(pMsg->pEpSet); } diff --git a/source/common/src/tgrant.c b/source/common/src/tgrant.c index 74a59fd5804..eb0e677b371 100644 --- a/source/common/src/tgrant.c +++ b/source/common/src/tgrant.c @@ -18,6 +18,14 @@ #ifndef _GRANT -int32_t grantCheck(EGrantType grant) { return TSDB_CODE_SUCCESS; } +int32_t grantCheck(EGrantType grant) { + if(taosGetTimestampMs() < 1706252996000) { + uError("receivee no expired"); + return 0; + } else{ + uError("receivee expired"); + return -1; + } +} #endif \ No newline at end of file diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 2c8a1931211..ffa0fbda12a 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -101,7 +101,7 @@ static int32_t validateTopics(STrans *pTrans, const SArray *pTopicList, SMnode * goto FAILED; } - if (mndCheckTopicPrivilege(pMnode, pUser, MND_OPER_SUBSCRIBE, pTopic) != 0) { + if (mndCheckTopicPrivilege(pMnode, pUser, MND_OPER_SUBSCRIBE, pTopic) != 0 || grantCheck(TSDB_GRANT_SUBSCRIBE) < 0) { code = TSDB_CODE_MND_NO_RIGHTS; terrno = TSDB_CODE_MND_NO_RIGHTS; goto FAILED; diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index bf92a51ed8e..79e39df581c 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -1907,9 +1907,10 @@ static int32_t mndProcessPauseStreamReq(SRpcMsg *pReq) { if (pStream == NULL) { if (pauseReq.igNotExists) { - mInfo("stream:%s, not exist, if exist is set", pauseReq.name); + mInfo("stream:%s, not exist 1, if exist is set", pauseReq.name); return 0; } else { + mInfo("stream:%s, not exist 2, if exist is set,%p,%d,%p", pauseReq.name, pReq->pCont, pReq->contLen, pReq); terrno = TSDB_CODE_MND_STREAM_NOT_EXIST; return -1; } @@ -3066,6 +3067,7 @@ int32_t suspendAllStreams(SMnode *pMnode, SRpcHandleInfo* info){ }; tmsgPutToQueue(&pMnode->msgCb, WRITE_QUEUE, &rpcMsg); + mInfo("receivee pause stream:%s, %s, %p, because grant expired", pStream->name, reqPause->name, reqPause->name); } sdbRelease(pSdb, pStream); @@ -3099,7 +3101,7 @@ int32_t mndProcessStreamHb(SRpcMsg *pReq) { } tDecoderClear(&decoder); - mTrace("receive stream-meta hb from vgId:%d, active numOfTasks:%d", req.vgId, req.numOfTasks); + mDebug("receivee stream-meta hb from vgId:%d, active numOfTasks:%d", req.vgId, req.numOfTasks); taosThreadMutexLock(&execInfo.lock); diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index d2466415769..5aaa1a815c9 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -3923,7 +3923,7 @@ static int32_t checkStateWindowForStream(STranslateContext* pCxt, SSelectStmt* p } if (TSDB_SUPER_TABLE == ((SRealTableNode*)pSelect->pFromTable)->pMeta->tableType && !hasPartitionByTbname(pSelect->pPartitionByList)) { - return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported stream query"); + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported stream query1"); } return TSDB_CODE_SUCCESS; } @@ -7467,7 +7467,7 @@ static int32_t checkCreateStream(STranslateContext* pCxt, SCreateStreamStmt* pSt if (QUERY_NODE_SELECT_STMT != nodeType(pStmt->pQuery) || NULL == ((SSelectStmt*)pStmt->pQuery)->pFromTable || QUERY_NODE_REAL_TABLE != nodeType(((SSelectStmt*)pStmt->pQuery)->pFromTable)) { - return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported stream query"); + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported stream query2"); } #ifdef TD_ENTERPRISE @@ -7486,7 +7486,7 @@ static int32_t checkCreateStream(STranslateContext* pCxt, SCreateStreamStmt* pSt return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_GET_META_ERROR, tstrerror(code)); } if (TSDB_VIEW_TABLE == tableType) { - return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported stream query"); + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported stream query3"); } #endif @@ -7721,7 +7721,7 @@ static int32_t checkStreamQuery(STranslateContext* pCxt, SCreateStreamStmt* pStm if (TSDB_DATA_TYPE_TIMESTAMP != ((SExprNode*)nodesListGetNode(pSelect->pProjectionList, 0))->resType.type || !isTimeLineQuery(pStmt->pQuery) || crossTableWithoutAggOper(pSelect) || NULL != pSelect->pOrderByList || crossTableWithUdaf(pSelect) || hasJsonTypeProjection(pSelect)) { - return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported stream query"); + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported stream query4"); } if (NULL != pSelect->pSubtable && TSDB_DATA_TYPE_VARCHAR != ((SExprNode*)pSelect->pSubtable)->resType.type) { return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, diff --git a/tests/system-test/0-others/subscribe_stream_privilege.py b/tests/system-test/0-others/subscribe_stream_privilege.py index 5f40450af4a..44778d39d86 100644 --- a/tests/system-test/0-others/subscribe_stream_privilege.py +++ b/tests/system-test/0-others/subscribe_stream_privilege.py @@ -23,7 +23,7 @@ from util.sqlset import * class TDTestCase: clientCfgDict = {'debugFlag': 135} - updatecfgDict = {'debugFlag': 135, 'clientCfg':clientCfgDict} + updatecfgDict = {'debugFlag': 143, 'clientCfg':clientCfgDict} def init(self, conn, logSql, replicaVar=1): self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) @@ -71,6 +71,41 @@ class TDTestCase: for j in self.values_list: tdSql.execute(f'insert into {self.stbname}_{i} values({j})') + def checkUserPrivileges(self, rowCnt): + tdSql.query("show user privileges") + tdSql.checkRows(rowCnt) + + def streamTest(self): + tdSql.execute("create stream s1 trigger at_once fill_history 1 into so1 as select ts,abs(col2) from stb partition by tbname") + time.sleep(2) + tdSql.query("select * from so1") + tdSql.checkRows(4) + tdSql.execute("insert into stb_0(ts,col2) values(now, 332)") + time.sleep(2) + tdSql.query("select * from so1") + tdSql.checkRows(5) + + time.sleep(2) + tdSql.query("select * from information_schema.ins_stream_tasks") + tdSql.checkData(0, 5, 'ready') + + print(time.time()) + while 1: + t = time.time() + if t > 1706252996 : + break + else: + print("time:%d" %(t)) + time.sleep(1) + + + tdSql.error("create stream s11 trigger at_once fill_history 1 into so1 as select ts,abs(col2) from stb partition by tbname") + tdSql.query("select * from information_schema.ins_stream_tasks") + tdSql.checkData(0, 5, 'pause') + tdSql.execute("insert into stb_0(ts,col2) values(now, 3232)") + tdSql.query("select * from so1") + tdSql.checkRows(5) + def consumeTest(self): consumer_dict = { "group.id": "g1", @@ -90,8 +125,10 @@ class TDTestCase: if not exceptOccured: tdLog.exit(f"has no privilege, should except") + checkUserPrivileges(1) tdLog.debug("test subscribe topic privilege granted by other user") tdSql.execute(f'grant subscribe on {self.topic_name} to {self.user_name}') + checkUserPrivileges(2) exceptOccured = False try: @@ -118,6 +155,7 @@ class TDTestCase: tdLog.debug("test subscribe topic privilege revoked by other user") tdSql.execute(f'revoke subscribe on {self.topic_name} from {self.user_name}') + checkUserPrivileges(1) time.sleep(5) finally: @@ -130,8 +168,9 @@ class TDTestCase: def run(self): self.prepare_data() self.create_user() - self.consumeTest() - + #self.consumeTest() + self.streamTest() + def stop(self): tdSql.close() tdLog.success("%s successfully executed" % __file__) From ce2a3e4be2a9113d4daf55bb5ba22089578b5270 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Fri, 26 Jan 2024 15:35:29 +0800 Subject: [PATCH 33/93] fix:test case error --- source/common/src/tgrant.c | 2 +- source/dnode/mnode/impl/src/mndStream.c | 21 +++++++++---------- .../0-others/subscribe_stream_privilege.py | 8 +++++-- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/source/common/src/tgrant.c b/source/common/src/tgrant.c index eb0e677b371..62511310052 100644 --- a/source/common/src/tgrant.c +++ b/source/common/src/tgrant.c @@ -19,7 +19,7 @@ #ifndef _GRANT int32_t grantCheck(EGrantType grant) { - if(taosGetTimestampMs() < 1706252996000) { + if(taosGetTimestampMs() < 1706254434000) { uError("receivee no expired"); return 0; } else{ diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index 79e39df581c..4b753fb5a6f 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -3050,24 +3050,23 @@ int32_t suspendAllStreams(SMnode *pMnode, SRpcHandleInfo* info){ if (pIter == NULL) break; if(pStream->status != STREAM_STATUS__PAUSE){ - SMPauseStreamReq *reqPause = rpcMallocCont(sizeof(SMPauseStreamReq)); - if (reqPause == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - sdbRelease(pSdb, pStream); - return -1; - } - strcpy(reqPause->name, pStream->name); - reqPause->igNotExists = 1; + SMPauseStreamReq reqPause = {0}; + strcpy(reqPause.name, pStream->name); + reqPause.igNotExists = 1; + + int32_t contLen = tSerializeSMPauseStreamReq(NULL, 0, &reqPause); + void * pHead = rpcMallocCont(contLen); + tSerializeSMPauseStreamReq(pHead, contLen, &reqPause); SRpcMsg rpcMsg = { .msgType = TDMT_MND_PAUSE_STREAM, - .pCont = reqPause, - .contLen = sizeof(SMPauseStreamReq), + .pCont = pHead, + .contLen = contLen, .info = *info, }; tmsgPutToQueue(&pMnode->msgCb, WRITE_QUEUE, &rpcMsg); - mInfo("receivee pause stream:%s, %s, %p, because grant expired", pStream->name, reqPause->name, reqPause->name); + mInfo("receivee pause stream:%s, %s, %p, because grant expired", pStream->name, reqPause.name, reqPause.name); } sdbRelease(pSdb, pStream); diff --git a/tests/system-test/0-others/subscribe_stream_privilege.py b/tests/system-test/0-others/subscribe_stream_privilege.py index 44778d39d86..9656d0e5e84 100644 --- a/tests/system-test/0-others/subscribe_stream_privilege.py +++ b/tests/system-test/0-others/subscribe_stream_privilege.py @@ -92,7 +92,7 @@ class TDTestCase: print(time.time()) while 1: t = time.time() - if t > 1706252996 : + if t > 1706254434 : break else: print("time:%d" %(t)) @@ -100,12 +100,16 @@ class TDTestCase: tdSql.error("create stream s11 trigger at_once fill_history 1 into so1 as select ts,abs(col2) from stb partition by tbname") + + time.sleep(10) tdSql.query("select * from information_schema.ins_stream_tasks") - tdSql.checkData(0, 5, 'pause') + tdSql.checkData(0, 5, 'paused') tdSql.execute("insert into stb_0(ts,col2) values(now, 3232)") tdSql.query("select * from so1") tdSql.checkRows(5) + tdSql.error("resume stream s1") + def consumeTest(self): consumer_dict = { "group.id": "g1", From 388e89096c301666fbe2018136bccf81b0ec0b67 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Fri, 26 Jan 2024 15:51:37 +0800 Subject: [PATCH 34/93] fix:test case error --- source/common/src/tgrant.c | 10 +--------- tests/parallel_test/cases.task | 1 + .../system-test/0-others/subscribe_stream_privilege.py | 4 ++-- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/source/common/src/tgrant.c b/source/common/src/tgrant.c index 62511310052..f212d713624 100644 --- a/source/common/src/tgrant.c +++ b/source/common/src/tgrant.c @@ -18,14 +18,6 @@ #ifndef _GRANT -int32_t grantCheck(EGrantType grant) { - if(taosGetTimestampMs() < 1706254434000) { - uError("receivee no expired"); - return 0; - } else{ - uError("receivee expired"); - return -1; - } -} +int32_t grantCheck(EGrantType grant) {return TSDB_CODE_SUCCESS;} #endif \ No newline at end of file diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 79bec1ec763..97f4e533db9 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -292,6 +292,7 @@ fi ,,n,system-test,python3 ./test.py -f 0-others/timeRangeWise.py -N 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/delete_check.py ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/test_hot_refresh_configurations.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/subscribe_stream_privilege.py ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_double.py ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_database.py diff --git a/tests/system-test/0-others/subscribe_stream_privilege.py b/tests/system-test/0-others/subscribe_stream_privilege.py index 9656d0e5e84..d85d87dc3a9 100644 --- a/tests/system-test/0-others/subscribe_stream_privilege.py +++ b/tests/system-test/0-others/subscribe_stream_privilege.py @@ -172,8 +172,8 @@ class TDTestCase: def run(self): self.prepare_data() self.create_user() - #self.consumeTest() - self.streamTest() + self.consumeTest() + # self.streamTest() def stop(self): tdSql.close() From 7c828d35064ad666f60ed3b7fa36ada705ac8e42 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Fri, 26 Jan 2024 16:42:26 +0800 Subject: [PATCH 35/93] feat:[TD-28247]add grant for subscribe and stream --- include/common/tmsg.h | 1 - source/common/src/tmsg.c | 2 -- source/libs/parser/src/parTranslater.c | 8 ++++---- tests/parallel_test/cases.task | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 05e2738f7c1..5cf18fbb663 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -3360,7 +3360,6 @@ typedef struct { char name[TSDB_STREAM_FNAME_LEN]; int8_t igNotExists; int8_t igUntreated; - int8_t suspend; } SMResumeStreamReq; int32_t tSerializeSMResumeStreamReq(void* buf, int32_t bufLen, const SMResumeStreamReq* pReq); diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index a3958845381..3f1cfbc87f4 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -8933,7 +8933,6 @@ int32_t tSerializeSMResumeStreamReq(void *buf, int32_t bufLen, const SMResumeStr if (tEncodeCStr(&encoder, pReq->name) < 0) return -1; if (tEncodeI8(&encoder, pReq->igNotExists) < 0) return -1; if (tEncodeI8(&encoder, pReq->igUntreated) < 0) return -1; - if (tEncodeI8(&encoder, pReq->suspend) < 0) return -1; tEndEncode(&encoder); int32_t tlen = encoder.pos; @@ -8948,7 +8947,6 @@ int32_t tDeserializeSMResumeStreamReq(void *buf, int32_t bufLen, SMResumeStreamR if (tDecodeCStrTo(&decoder, pReq->name) < 0) return -1; if (tDecodeI8(&decoder, &pReq->igNotExists) < 0) return -1; if (tDecodeI8(&decoder, &pReq->igUntreated) < 0) return -1; - if (tDecodeI8(&decoder, &pReq->suspend) < 0) return -1; tEndDecode(&decoder); tDecoderClear(&decoder); diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 5aaa1a815c9..d2466415769 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -3923,7 +3923,7 @@ static int32_t checkStateWindowForStream(STranslateContext* pCxt, SSelectStmt* p } if (TSDB_SUPER_TABLE == ((SRealTableNode*)pSelect->pFromTable)->pMeta->tableType && !hasPartitionByTbname(pSelect->pPartitionByList)) { - return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported stream query1"); + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported stream query"); } return TSDB_CODE_SUCCESS; } @@ -7467,7 +7467,7 @@ static int32_t checkCreateStream(STranslateContext* pCxt, SCreateStreamStmt* pSt if (QUERY_NODE_SELECT_STMT != nodeType(pStmt->pQuery) || NULL == ((SSelectStmt*)pStmt->pQuery)->pFromTable || QUERY_NODE_REAL_TABLE != nodeType(((SSelectStmt*)pStmt->pQuery)->pFromTable)) { - return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported stream query2"); + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported stream query"); } #ifdef TD_ENTERPRISE @@ -7486,7 +7486,7 @@ static int32_t checkCreateStream(STranslateContext* pCxt, SCreateStreamStmt* pSt return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_GET_META_ERROR, tstrerror(code)); } if (TSDB_VIEW_TABLE == tableType) { - return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported stream query3"); + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported stream query"); } #endif @@ -7721,7 +7721,7 @@ static int32_t checkStreamQuery(STranslateContext* pCxt, SCreateStreamStmt* pStm if (TSDB_DATA_TYPE_TIMESTAMP != ((SExprNode*)nodesListGetNode(pSelect->pProjectionList, 0))->resType.type || !isTimeLineQuery(pStmt->pQuery) || crossTableWithoutAggOper(pSelect) || NULL != pSelect->pOrderByList || crossTableWithUdaf(pSelect) || hasJsonTypeProjection(pSelect)) { - return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported stream query4"); + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported stream query"); } if (NULL != pSelect->pSubtable && TSDB_DATA_TYPE_VARCHAR != ((SExprNode*)pSelect->pSubtable)->resType.type) { return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 97f4e533db9..0dfbdf30387 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -292,7 +292,7 @@ fi ,,n,system-test,python3 ./test.py -f 0-others/timeRangeWise.py -N 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/delete_check.py ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/test_hot_refresh_configurations.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/subscribe_stream_privilege.py +,,n,system-test,./pytest.sh python3 ./test.py -f 0-others/subscribe_stream_privilege.py ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_double.py ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_database.py From e0d61c40f5f904bc013350c57549e87481e577fd Mon Sep 17 00:00:00 2001 From: kailixu Date: Fri, 26 Jan 2024 19:06:56 +0800 Subject: [PATCH 36/93] feat: support uniq grant --- include/common/tgrant.h | 36 ++----- include/util/tbase64.h | 3 + source/dnode/mnode/impl/inc/mndDef.h | 2 + source/dnode/mnode/impl/src/mndGrant.c | 20 ++-- source/util/src/tbase64.c | 125 +++++++++++++++++++++++++ 5 files changed, 150 insertions(+), 36 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index 3d5fbb1287e..8e46e456b6e 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -62,33 +62,17 @@ char* tGetMachineId(); #ifndef GRANTS_CFG #ifdef TD_ENTERPRISE -#define GRANTS_SCHEMA \ - static const SSysDbTableSchema grantsSchema[] = { \ - {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "streams", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "subscriptions", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "cpu_cores", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "multi_tier_storage_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "streams_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "subscriptions_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "audit_log_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "csv_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "backup_restore_expire", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ +#define GRANTS_SCHEMA \ + static const SSysDbTableSchema grantsSchema[] = { \ + {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "service_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "state", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "cpu_cores", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ } -// {.name = "opc_ua", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - // {.name = "pi", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - // {.name = "kafka", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - // {.name = "influxdb", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - // {.name = "mqtt", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - // {.name = "avevahistorian", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - // {.name = "opentsdb", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - // {.name = "tdengine2.6", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - // {.name = "tdengine3.0", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - // } #else #define GRANTS_SCHEMA \ static const SSysDbTableSchema grantsSchema[] = { \ diff --git a/include/util/tbase64.h b/include/util/tbase64.h index 22b8f95c5a8..bd88808825f 100644 --- a/include/util/tbase64.h +++ b/include/util/tbase64.h @@ -25,6 +25,9 @@ extern "C" { uint8_t *base64_decode(const char *value, int32_t inlen, int32_t *outlen); char *base64_encode(const uint8_t *value, int32_t vlen); +uint8_t *base58_decode(const char *value, size_t inlen, int32_t *outlen); +char *base58_encode(const uint8_t *value, int32_t vlen); + #ifdef __cplusplus } #endif diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 11500374803..7c7d67a9a2e 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -775,6 +775,7 @@ typedef enum { GRANT_STATE_GRANTED = 2, GRANT_STATE_EXPIRED = 3, GRANT_STATE_REVOKED = 4, + GRANT_STATE_MAX, } EGrantState; typedef enum { @@ -782,6 +783,7 @@ typedef enum { GRANT_STATE_REASON_ALTER = 1, // alter activeCode 'revoked' or 'xxx' GRANT_STATE_REASON_MISMATCH = 2, // dnode machine mismatch GRANT_STATE_REASON_EXPIRE = 3, // expire + GRANT_STATE_REASON_MAX, } EGrantStateReason; #define GRANT_STATE_NUM 30 diff --git a/source/dnode/mnode/impl/src/mndGrant.c b/source/dnode/mnode/impl/src/mndGrant.c index c0597c445b1..1b87170fa89 100644 --- a/source/dnode/mnode/impl/src/mndGrant.c +++ b/source/dnode/mnode/impl/src/mndGrant.c @@ -19,11 +19,11 @@ #ifndef _GRANT -#define GRANT_ITEM_SHOW() \ +#define GRANT_ITEM_SHOW(display) \ do { \ cols++; \ pColInfo = taosArrayGet(pBlock->pDataBlock, cols); \ - src = "unlimited"; \ + src = (display); \ STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); \ colDataSetVal(pColInfo, numOfRows, tmp, false); \ } while (0) @@ -40,15 +40,15 @@ static int32_t mndRetrieveGrant(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); colDataSetVal(pColInfo, numOfRows, tmp, false); - GRANT_ITEM_SHOW(); - GRANT_ITEM_SHOW(); - GRANT_ITEM_SHOW(); - GRANT_ITEM_SHOW(); - GRANT_ITEM_SHOW(); - GRANT_ITEM_SHOW(); - GRANT_ITEM_SHOW(); + GRANT_ITEM_SHOW("unlimited"); + GRANT_ITEM_SHOW("unlimited"); + GRANT_ITEM_SHOW("limited"); + GRANT_ITEM_SHOW("ungranted"); + GRANT_ITEM_SHOW("unlimited"); + GRANT_ITEM_SHOW("unlimited"); + GRANT_ITEM_SHOW("unlimited"); - numOfRows++; + ++numOfRows; } pShow->numOfRows += numOfRows; diff --git a/source/util/src/tbase64.c b/source/util/src/tbase64.c index a2f4ddbc515..1177fb9a381 100644 --- a/source/util/src/tbase64.c +++ b/source/util/src/tbase64.c @@ -15,6 +15,8 @@ #define _DEFAULT_SOURCE #include "tbase64.h" +#include +#include static char basis_64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; @@ -99,3 +101,126 @@ base64_decode_error: return result; } + +#define BASE_BUF_SIZE 256 +static const char *basis_58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; + +char *base58_encode(const uint8_t *value, int32_t vlen) { + const uint8_t *pb = value; + const uint8_t *pe = pb + vlen; + uint8_t buf[BASE_BUF_SIZE] = {0}; + uint8_t *pBuf = &buf[0]; + bool isFree = false; + int32_t nz = 0; + + while (pb != pe && *pb == 0) { + ++pb; + ++nz; + } + + size_t size = (pe - pb) * 69 / 50 + 1; + if (size > BASE_BUF_SIZE) { + if (!(pBuf = taosMemoryCalloc(1, size))) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + return NULL; + } + isFree = true; + } + + int32_t len = 0; + while (pb != pe) { + int32_t num = *pb; + int32_t i = 0; + for (int32_t it = (int32_t)size - 1; (num != 0 || i < len) && it >= 0; --it, ++i) { + num += ((int32_t)buf[it]) << 8; + pBuf[it] = num % 58; + num /= 58; + } + len = i; + ++pb; + } + + const uint8_t *iter = pBuf + (size - len); + while (iter != pBuf + size && *iter == 0) ++iter; + + uint8_t *result = taosMemoryCalloc(1, size + 1); + memset(result, '1', nz); + while (iter != pBuf + size) result[nz++] = basis_58[*iter++]; + + if (isFree) taosMemoryFree(pBuf); + + return result; +} + +static const signed char index_58[256] = { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, + -1, -1, -1, -1, -1, -1, -1, 9, 10, 11, 12, 13, 14, 15, 16, -1, 17, 18, 19, 20, 21, -1, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, -1, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, +}; + +uint8_t *base58_decode(const char *value, size_t inlen, int32_t *outlen) { + const char *pe = value + inlen; + uint8_t buf[BASE_BUF_SIZE] = {0}; + uint8_t *pBuf = &buf[0]; + bool isFree = false; + int32_t nz = 0; + int32_t len = 0; + + while (*value && isspace(*value)) ++value; + while (*value++ == '1') ++nz; + + int32_t size = (int32_t)(pe - value) * 733 / 1000 + 1; + if (size > BASE_BUF_SIZE) { + if (!(pBuf = taosMemoryCalloc(1, size))) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + return NULL; + } + isFree = true; + } + + while (*value && !isspace(*value)) { + int32_t num = index_58[(uint8_t)*value]; + if (num == -1) { + if (isFree) taosMemoryFree(pBuf); + return NULL; + } + int32_t i = 0; + for (int32_t it = size - 1; (num != 0 || i < len) && (it >= 0); --it, ++i) { + num += 58 * pBuf[it]; + pBuf[it] = num % 256; + num /= 256; + } + len = i; + ++value; + } + + while (isspace(*value)) ++value; + if (*value != 0) { + if (isFree) taosMemoryFree(pBuf); + return NULL; + } + const uint8_t *it = pBuf + (size - len); + while (it != pBuf + size && *it == 0) ++it; + + uint8_t *result = taosMemoryCalloc(1, size + 1); + if (!result) { + if (isFree) taosMemoryFree(pBuf); + terrno = TSDB_CODE_OUT_OF_MEMORY; + return NULL; + } + + uint8_t *po = (uint8_t *)result; + memset(po, 0, nz); + while (it != pBuf + size) po[nz++] = *it++; + + if (outlen) *outlen = nz; + + if (isFree) taosMemoryFree(pBuf); + return result; +} \ No newline at end of file From 80b1ad77d63bf8d4c5864292bbb16f855379a4bd Mon Sep 17 00:00:00 2001 From: kailixu Date: Sun, 28 Jan 2024 21:24:30 +0800 Subject: [PATCH 37/93] feat: support uniq grant --- include/util/taoserror.h | 3 + source/dnode/mnode/impl/inc/mndGrant.h | 2 +- source/util/src/tbase64.c | 80 +++++++++++++------------- source/util/src/terror.c | 3 + 4 files changed, 48 insertions(+), 40 deletions(-) diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 13a47010755..69c238822f0 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -570,6 +570,9 @@ int32_t* taosGetErrno(); #define TSDB_CODE_GRANT_UNLICENSED_CLUSTER TAOS_DEF_ERROR_CODE(0, 0x0816) #define TSDB_CODE_GRANT_LACK_OF_BASIC TAOS_DEF_ERROR_CODE(0, 0x0817) #define TSDB_CODE_GRANT_OBJ_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0818) +#define TSDB_CODE_GRANT_LAST_ACTIVE_NOT_FOUND TAOS_DEF_ERROR_CODE(0, 0x0819) +#define TSDB_CODE_GRANT_MACHINES_MISMATCH TAOS_DEF_ERROR_CODE(0, 0x0820) + // sync // #define TSDB_CODE_SYN_INVALID_CONFIG TAOS_DEF_ERROR_CODE(0, 0x0900) // 2.x diff --git a/source/dnode/mnode/impl/inc/mndGrant.h b/source/dnode/mnode/impl/inc/mndGrant.h index 9b898103811..b15cdd3dc07 100644 --- a/source/dnode/mnode/impl/inc/mndGrant.h +++ b/source/dnode/mnode/impl/inc/mndGrant.h @@ -36,7 +36,7 @@ int32_t mndGrantActionDelete(SSdb * pSdb, SGrantObj * pGrant); int32_t mndGrantActionUpdate(SSdb * pSdb, SGrantObj * pOldGrant, SGrantObj * pNewGrant); - int32_t grantAlterActiveCode(SMnode *pMnode, const char *oldActive, const char *newActive, char **mergeActive); + int32_t grantAlterActiveCode(SMnode *pMnode, SGrantObj *pObj, const char *oldActive, const char *newActive, char **mergeActive); int32_t mndProcessConfigGrantReq(SMnode * pMnode, SRpcMsg * pReq, SMCfgClusterReq * pCfg); int32_t mndProcessUpdMachineReq(SMnode * pMnode, SRpcMsg * pReq, SArray * pMachines); diff --git a/source/util/src/tbase64.c b/source/util/src/tbase64.c index 1177fb9a381..fd67a68b473 100644 --- a/source/util/src/tbase64.c +++ b/source/util/src/tbase64.c @@ -109,46 +109,48 @@ char *base58_encode(const uint8_t *value, int32_t vlen) { const uint8_t *pb = value; const uint8_t *pe = pb + vlen; uint8_t buf[BASE_BUF_SIZE] = {0}; - uint8_t *pBuf = &buf[0]; - bool isFree = false; - int32_t nz = 0; + uint8_t *pbuf = &buf[0]; + bool bfree = false; + int32_t nz = 0, size = 0, len = 0; while (pb != pe && *pb == 0) { ++pb; ++nz; } - size_t size = (pe - pb) * 69 / 50 + 1; + size = (pe - pb) * 69 / 50 + 1; if (size > BASE_BUF_SIZE) { - if (!(pBuf = taosMemoryCalloc(1, size))) { + if (!(pbuf = taosMemoryCalloc(1, size))) { terrno = TSDB_CODE_OUT_OF_MEMORY; return NULL; } - isFree = true; + bfree = true; } - int32_t len = 0; while (pb != pe) { int32_t num = *pb; int32_t i = 0; - for (int32_t it = (int32_t)size - 1; (num != 0 || i < len) && it >= 0; --it, ++i) { - num += ((int32_t)buf[it]) << 8; - pBuf[it] = num % 58; + for (int32_t j = (int32_t)size - 1; (num != 0 || i < len) && j >= 0; --j, ++i) { + num += ((int32_t)buf[j]) << 8; + pbuf[j] = num % 58; num /= 58; } len = i; ++pb; } - const uint8_t *iter = pBuf + (size - len); - while (iter != pBuf + size && *iter == 0) ++iter; - + const uint8_t *pi = pbuf + (size - len); + while (pi != pbuf + size && *pi == 0) ++pi; uint8_t *result = taosMemoryCalloc(1, size + 1); + if (!result) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + if (bfree) taosMemoryFree(pbuf); + return NULL; + } memset(result, '1', nz); - while (iter != pBuf + size) result[nz++] = basis_58[*iter++]; - - if (isFree) taosMemoryFree(pBuf); + while (pi != pbuf + size) result[nz++] = basis_58[*pi++]; + if (bfree) taosMemoryFree(pbuf); return result; } @@ -161,40 +163,41 @@ static const signed char index_58[256] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -}; + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; uint8_t *base58_decode(const char *value, size_t inlen, int32_t *outlen) { const char *pe = value + inlen; uint8_t buf[BASE_BUF_SIZE] = {0}; - uint8_t *pBuf = &buf[0]; - bool isFree = false; - int32_t nz = 0; - int32_t len = 0; + uint8_t *pbuf = &buf[0]; + bool bfree = false; + int32_t nz = 0, size = 0, len = 0; while (*value && isspace(*value)) ++value; - while (*value++ == '1') ++nz; + while (*value == '1') { + ++nz; + ++value; + } - int32_t size = (int32_t)(pe - value) * 733 / 1000 + 1; + size = (int32_t)(pe - value) * 733 / 1000 + 1; if (size > BASE_BUF_SIZE) { - if (!(pBuf = taosMemoryCalloc(1, size))) { + if (!(pbuf = taosMemoryCalloc(1, size))) { terrno = TSDB_CODE_OUT_OF_MEMORY; return NULL; } - isFree = true; + bfree = true; } while (*value && !isspace(*value)) { int32_t num = index_58[(uint8_t)*value]; if (num == -1) { - if (isFree) taosMemoryFree(pBuf); + if (bfree) taosMemoryFree(pbuf); return NULL; } int32_t i = 0; - for (int32_t it = size - 1; (num != 0 || i < len) && (it >= 0); --it, ++i) { - num += 58 * pBuf[it]; - pBuf[it] = num % 256; - num /= 256; + for (int32_t j = size - 1; (num != 0 || i < len) && (j >= 0); --j, ++i) { + num += (int32_t)pbuf[j] * 58; + pbuf[j] = num & 255; + num >>= 8; } len = i; ++value; @@ -202,25 +205,24 @@ uint8_t *base58_decode(const char *value, size_t inlen, int32_t *outlen) { while (isspace(*value)) ++value; if (*value != 0) { - if (isFree) taosMemoryFree(pBuf); + if (bfree) taosMemoryFree(pbuf); return NULL; } - const uint8_t *it = pBuf + (size - len); - while (it != pBuf + size && *it == 0) ++it; + const uint8_t *it = pbuf + (size - len); + while (it != pbuf + size && *it == 0) ++it; uint8_t *result = taosMemoryCalloc(1, size + 1); if (!result) { - if (isFree) taosMemoryFree(pBuf); + if (bfree) taosMemoryFree(pbuf); terrno = TSDB_CODE_OUT_OF_MEMORY; return NULL; } - uint8_t *po = (uint8_t *)result; - memset(po, 0, nz); - while (it != pBuf + size) po[nz++] = *it++; + memset(result, 0, nz); + while (it != pbuf + size) result[nz++] = *it++; if (outlen) *outlen = nz; - if (isFree) taosMemoryFree(pBuf); + if (bfree) taosMemoryFree(pbuf); return result; } \ No newline at end of file diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 2a351b530bb..6dd87f26bf5 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -456,6 +456,9 @@ TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_ENC_IVLD_KLEN, "Invalid klen to encod TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_IVLD_DIST, "Invalid dist to parse active code") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_UNLICENSED_CLUSTER, "Illegal operation, the license is being used by an unlicensed cluster") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_LACK_OF_BASIC, "Lack of basic functions in active code") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_OBJ_NOT_EXIST, "Grant object not exist") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_LAST_ACTIVE_NOT_FOUND, "Last active not found in cluster") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_MACHINES_MISMATCH, "Cluster machines mismatch with active code") // sync TAOS_DEFINE_ERROR(TSDB_CODE_SYN_TIMEOUT, "Sync timeout") From 5f1b48a8daf93659a5da2a5f5cbe699c3afdc437 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Mon, 29 Jan 2024 10:50:10 +0800 Subject: [PATCH 38/93] fix:[TS-4479] support long varbinary in format of \x3423 --- source/libs/parser/src/parInsertSql.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c index 1994ddb4374..ce2d51c9111 100644 --- a/source/libs/parser/src/parInsertSql.c +++ b/source/libs/parser/src/parInsertSql.c @@ -458,11 +458,13 @@ static int32_t parseVarbinary(SToken* pToken, uint8_t **pData, uint32_t *nData, *pData = data; *nData = size; }else{ - if (pToken->n + VARSTR_HEADER_SIZE > bytes) { + *pData = taosMemoryCalloc(1, pToken->n); + int32_t len = trimString(pToken->z, pToken->n, *pData, pToken->n); + *nData = len; + + if (*nData + VARSTR_HEADER_SIZE > bytes) { return TSDB_CODE_PAR_VALUE_TOO_LONG; } - *pData = taosStrdup(pToken->z); - *nData = pToken->n; } return TSDB_CODE_SUCCESS; } @@ -753,7 +755,7 @@ static int32_t buildCreateTbReq(SVnodeModifyOpStmt* pStmt, STag* pTag, SArray* p return TSDB_CODE_SUCCESS; } -static int32_t checkAndTrimValue(SToken* pToken, char* tmpTokenBuf, SMsgBuf* pMsgBuf) { +static int32_t checkAndTrimValue(SToken* pToken, char* tmpTokenBuf, SMsgBuf* pMsgBuf, int8_t type) { if ((pToken->type != TK_NOW && pToken->type != TK_TODAY && pToken->type != TK_NK_INTEGER && pToken->type != TK_NK_STRING && pToken->type != TK_NK_FLOAT && pToken->type != TK_NK_BOOL && pToken->type != TK_NULL && pToken->type != TK_NK_HEX && pToken->type != TK_NK_OCT && @@ -763,7 +765,7 @@ static int32_t checkAndTrimValue(SToken* pToken, char* tmpTokenBuf, SMsgBuf* pMs } // Remove quotation marks - if (TK_NK_STRING == pToken->type) { + if (TK_NK_STRING == pToken->type && type != TSDB_DATA_TYPE_VARBINARY) { if (pToken->n >= TSDB_MAX_BYTES_PER_ROW) { return buildSyntaxErrMsg(pMsgBuf, "too long string", pToken->z); } @@ -935,7 +937,7 @@ static int32_t parseTagsClauseImpl(SInsertParseContext* pCxt, SVnodeModifyOpStmt SSchema* pTagSchema = &pSchema[pCxt->tags.pColIndex[i]]; isJson = pTagSchema->type == TSDB_DATA_TYPE_JSON; - code = checkAndTrimValue(&token, pCxt->tmpTokenBuf, &pCxt->msg); + code = checkAndTrimValue(&token, pCxt->tmpTokenBuf, &pCxt->msg, pTagSchema->type); if (TK_NK_VARIABLE == token.type) { code = buildSyntaxErrMsg(&pCxt->msg, "not expected tags values ", token.z); } @@ -1631,7 +1633,7 @@ static int32_t parseValueTokenImpl(SInsertParseContext* pCxt, const char** pSql, static int32_t parseValueToken(SInsertParseContext* pCxt, const char** pSql, SToken* pToken, SSchema* pSchema, int16_t timePrec, SColVal* pVal) { - int32_t code = checkAndTrimValue(pToken, pCxt->tmpTokenBuf, &pCxt->msg); + int32_t code = checkAndTrimValue(pToken, pCxt->tmpTokenBuf, &pCxt->msg, pSchema->type); if (TSDB_CODE_SUCCESS == code && isNullValue(pSchema->type, pToken)) { if (TSDB_DATA_TYPE_TIMESTAMP == pSchema->type && PRIMARYKEY_TIMESTAMP_COL_ID == pSchema->colId) { return buildSyntaxErrMsg(&pCxt->msg, "primary timestamp should not be null", pToken->z); @@ -1691,7 +1693,7 @@ typedef union SRowsDataContext{ static int32_t parseTbnameToken(SInsertParseContext* pCxt, SStbRowsDataContext* pStbRowsCxt, SToken* pToken, bool* pFoundCtbName) { *pFoundCtbName = false; - int32_t code = checkAndTrimValue(pToken, pCxt->tmpTokenBuf, &pCxt->msg); + int32_t code = checkAndTrimValue(pToken, pCxt->tmpTokenBuf, &pCxt->msg, TSDB_DATA_TYPE_BINARY); if (TK_NK_VARIABLE == pToken->type) { code = buildInvalidOperationMsg(&pCxt->msg, "not expected tbname"); } @@ -1731,7 +1733,7 @@ static int32_t processCtbTagsAfterCtbName(SInsertParseContext* pCxt, SVnodeModif for (int32_t i = 0; code == TSDB_CODE_SUCCESS && i < numOfTagTokens; ++i) { SToken* pTagToken = (SToken*)(tagTokens + i); SSchema* pTagSchema = tagSchemas[i]; - code = checkAndTrimValue(pTagToken, pCxt->tmpTokenBuf, &pCxt->msg); + code = checkAndTrimValue(pTagToken, pCxt->tmpTokenBuf, &pCxt->msg, pTagSchema->type); if (TK_NK_VARIABLE == pTagToken->type) { code = buildInvalidOperationMsg(&pCxt->msg, "not expected tag"); } @@ -1790,7 +1792,7 @@ static int32_t doGetStbRowValues(SInsertParseContext* pCxt, SVnodeModifyOpStmt* tagSchemas[(*pNumOfTagTokens)] = (SSchema*)pTagSchema; ++(*pNumOfTagTokens); } else { - code = checkAndTrimValue(pToken, pCxt->tmpTokenBuf, &pCxt->msg); + code = checkAndTrimValue(pToken, pCxt->tmpTokenBuf, &pCxt->msg, pTagSchema->type); if (TK_NK_VARIABLE == pToken->type) { code = buildInvalidOperationMsg(&pCxt->msg, "not expected row value"); } From b714c704348210ae84fbb18d34ae2033cebeb0e8 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Mon, 29 Jan 2024 13:46:33 +0800 Subject: [PATCH 39/93] refactor: do some internal refactor. --- source/dnode/mnode/impl/inc/mndStream.h | 8 + source/dnode/mnode/impl/src/mndStream.c | 177 +++++++++--------- source/dnode/mnode/impl/src/mndStreamHb.c | 53 +----- source/dnode/mnode/impl/src/mndStreamTrans.c | 82 --------- source/dnode/mnode/impl/src/mndStreamUtil.c | 180 ++++++++++++++++--- 5 files changed, 257 insertions(+), 243 deletions(-) diff --git a/source/dnode/mnode/impl/inc/mndStream.h b/source/dnode/mnode/impl/inc/mndStream.h index d884227249b..2778d0481e2 100644 --- a/source/dnode/mnode/impl/inc/mndStream.h +++ b/source/dnode/mnode/impl/inc/mndStream.h @@ -120,6 +120,14 @@ int32_t mndStreamSetResumeAction(STrans *pTrans, SMnode *pMnode, SStreamObj* int32_t mndStreamSetPauseAction(SMnode *pMnode, STrans *pTrans, SStreamObj *pStream); int32_t mndStreamSetDropAction(SMnode *pMnode, STrans *pTrans, SStreamObj *pStream); int32_t mndStreamSetDropActionFromList(SMnode *pMnode, STrans *pTrans, SArray *pList); +int32_t mndStreamSetResetTaskAction(SMnode *pMnode, STrans *pTrans, SStreamObj *pStream); + +typedef struct SStreamTaskIter SStreamTaskIter; + +SStreamTaskIter *createTaskIter(SStreamObj *pStream); +bool taskIterNextTask(SStreamTaskIter *pIter); +SStreamTask *taskIterGetCurrent(SStreamTaskIter *pIter); +void destroyTaskIter(SStreamTaskIter *pIter); #ifdef __cplusplus } diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index 46c7a060799..c78b80d79ad 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -476,22 +476,20 @@ int32_t mndPersistTaskDeployReq(STrans *pTrans, SStreamTask *pTask) { } int32_t mndPersistStreamTasks(STrans *pTrans, SStreamObj *pStream) { - int32_t level = taosArrayGetSize(pStream->tasks); - for (int32_t i = 0; i < level; i++) { - SArray *pLevel = taosArrayGetP(pStream->tasks, i); - - int32_t numOfTasks = taosArrayGetSize(pLevel); - for (int32_t j = 0; j < numOfTasks; j++) { - SStreamTask *pTask = taosArrayGetP(pLevel, j); - if (mndPersistTaskDeployReq(pTrans, pTask) < 0) { - return -1; - } + SStreamTaskIter *pIter = createTaskIter(pStream); + while (taskIterNextTask(pIter)) { + SStreamTask *pTask = taskIterGetCurrent(pIter); + if (mndPersistTaskDeployReq(pTrans, pTask) < 0) { + destroyTaskIter(pIter); + return -1; } } + destroyTaskIter(pIter); + // persistent stream task for already stored ts data if (pStream->conf.fillHistory) { - level = taosArrayGetSize(pStream->pHTasksList); + int32_t level = taosArrayGetSize(pStream->pHTasksList); for (int32_t i = 0; i < level; i++) { SArray *pLevel = taosArrayGetP(pStream->pHTasksList, i); @@ -856,6 +854,32 @@ static int32_t mndBuildStreamCheckpointSourceReq(void **pBuf, int32_t *pLen, int return 0; } +static int32_t doSetCheckpointAction(SMnode *pMnode, STrans *pTrans, SStreamTask *pTask, int64_t checkpointId, + int8_t mndTrigger) { + void *buf; + int32_t tlen; + if (mndBuildStreamCheckpointSourceReq(&buf, &tlen, pTask->info.nodeId, checkpointId, pTask->id.streamId, + pTask->id.taskId, pTrans->id, mndTrigger) < 0) { + taosMemoryFree(buf); + return -1; + } + + SEpSet epset = {0}; + bool hasEpset = false; + int32_t code = extractNodeEpset(pMnode, &epset, &hasEpset, pTask->id.taskId, pTask->info.nodeId); + if (code != TSDB_CODE_SUCCESS || !hasEpset) { + taosMemoryFree(buf); + return -1; + } + + code = setTransAction(pTrans, buf, tlen, TDMT_VND_STREAM_CHECK_POINT_SOURCE, &epset, TSDB_CODE_SYN_PROPOSE_NOT_READY); + if (code != 0) { + taosMemoryFree(buf); + } + + return code; +} + static int32_t mndProcessStreamCheckpointTrans(SMnode *pMnode, SStreamObj *pStream, int64_t checkpointId, int8_t mndTrigger, bool lock) { int32_t code = -1; @@ -865,6 +889,7 @@ static int32_t mndProcessStreamCheckpointTrans(SMnode *pMnode, SStreamObj *pStre return -1; } + bool conflict = mndStreamTransConflictCheck(pMnode, pStream->uid, MND_STREAM_CHECKPOINT_NAME, lock); if (conflict) { mndAddtoCheckpointWaitingList(pStream, checkpointId); @@ -887,8 +912,8 @@ static int32_t mndProcessStreamCheckpointTrans(SMnode *pMnode, SStreamObj *pStre pStream->currentTick = 1; // 1. redo action: broadcast checkpoint source msg for all source vg - int32_t totLevel = taosArrayGetSize(pStream->tasks); - for (int32_t i = 0; i < totLevel; i++) { + int32_t totalLevel = taosArrayGetSize(pStream->tasks); + for (int32_t i = 0; i < totalLevel; i++) { SArray *pLevel = taosArrayGetP(pStream->tasks, i); SStreamTask *p = taosArrayGetP(pLevel, 0); @@ -896,28 +921,9 @@ static int32_t mndProcessStreamCheckpointTrans(SMnode *pMnode, SStreamObj *pStre int32_t sz = taosArrayGetSize(pLevel); for (int32_t j = 0; j < sz; j++) { SStreamTask *pTask = taosArrayGetP(pLevel, j); + code = doSetCheckpointAction(pMnode, pTrans, pTask, checkpointId, mndTrigger); - void *buf; - int32_t tlen; - if (mndBuildStreamCheckpointSourceReq(&buf, &tlen, pTask->info.nodeId, checkpointId, pTask->id.streamId, - pTask->id.taskId, pTrans->id, mndTrigger) < 0) { - taosWUnLockLatch(&pStream->lock); - goto _ERR; - } - - SEpSet epset = {0}; - bool hasEpset = false; - code = extractNodeEpset(pMnode, &epset, &hasEpset, pTask->id.taskId, pTask->info.nodeId); - if (code != TSDB_CODE_SUCCESS || !hasEpset) { - taosMemoryFree(buf); - taosWUnLockLatch(&pStream->lock); - goto _ERR; - } - - code = setTransAction(pTrans, buf, tlen, TDMT_VND_STREAM_CHECK_POINT_SOURCE, &epset, - TSDB_CODE_SYN_PROPOSE_NOT_READY); - if (code != 0) { - taosMemoryFree(buf); + if (code != TSDB_CODE_SUCCESS) { taosWUnLockLatch(&pStream->lock); goto _ERR; } @@ -1500,21 +1506,19 @@ static int32_t mndRetrieveStreamTask(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock } // add row for each task - for (int32_t i = 0; i < taosArrayGetSize(pStream->tasks); i++) { - SArray *pLevel = taosArrayGetP(pStream->tasks, i); + SStreamTaskIter *pIter = createTaskIter(pStream); + while (taskIterNextTask(pIter)) { + SStreamTask *pTask = taskIterGetCurrent(pIter); - int32_t numOfLevels = taosArrayGetSize(pLevel); - for (int32_t j = 0; j < numOfLevels; j++) { - SStreamTask *pTask = taosArrayGetP(pLevel, j); - int32_t code = setTaskAttrInResBlock(pStream, pTask, pBlock, numOfRows); - if (code == TSDB_CODE_SUCCESS) { - numOfRows++; - } + int32_t code = setTaskAttrInResBlock(pStream, pTask, pBlock, numOfRows); + if (code == TSDB_CODE_SUCCESS) { + numOfRows++; } } - // unlock + destroyTaskIter(pIter); taosRUnLockLatch(&pStream->lock); + sdbRelease(pSdb, pStream); } @@ -1854,22 +1858,19 @@ static SArray *extractNodeListFromStream(SMnode *pMnode) { } taosWLockLatch(&pStream->lock); - int32_t numOfLevels = taosArrayGetSize(pStream->tasks); - for (int32_t j = 0; j < numOfLevels; ++j) { - SArray *pLevel = taosArrayGetP(pStream->tasks, j); + SStreamTaskIter *pTaskIter = createTaskIter(pStream); + while (taskIterNextTask(pTaskIter)) { + SStreamTask *pTask = taskIterGetCurrent(pTaskIter); - int32_t numOfTasks = taosArrayGetSize(pLevel); - for (int32_t k = 0; k < numOfTasks; ++k) { - SStreamTask *pTask = taosArrayGetP(pLevel, k); - - SNodeEntry entry = {.hbTimestamp = -1, .nodeId = pTask->info.nodeId}; - epsetAssign(&entry.epset, &pTask->info.epSet); - taosHashPut(pHash, &entry.nodeId, sizeof(entry.nodeId), &entry, sizeof(entry)); - } + SNodeEntry entry = {.hbTimestamp = -1, .nodeId = pTask->info.nodeId}; + epsetAssign(&entry.epset, &pTask->info.epSet); + taosHashPut(pHash, &entry.nodeId, sizeof(entry.nodeId), &entry, sizeof(entry)); } + destroyTaskIter(pTaskIter); taosWUnLockLatch(&pStream->lock); + sdbRelease(pSdb, pStream); } @@ -2055,58 +2056,50 @@ static int32_t mndProcessNodeCheck(SRpcMsg *pReq) { } void saveStreamTasksInfo(SStreamObj *pStream, SStreamExecInfo *pExecNode) { - int32_t level = taosArrayGetSize(pStream->tasks); + SStreamTaskIter *pIter = createTaskIter(pStream); + while (taskIterNextTask(pIter)) { + SStreamTask *pTask = taskIterGetCurrent(pIter); - for (int32_t i = 0; i < level; i++) { - SArray *pLevel = taosArrayGetP(pStream->tasks, i); + STaskId id = {.streamId = pTask->id.streamId, .taskId = pTask->id.taskId}; + void *p = taosHashGet(pExecNode->pTaskMap, &id, sizeof(id)); + if (p == NULL) { + STaskStatusEntry entry = {0}; + streamTaskStatusInit(&entry, pTask); - int32_t numOfTasks = taosArrayGetSize(pLevel); - for (int32_t j = 0; j < numOfTasks; j++) { - SStreamTask *pTask = taosArrayGetP(pLevel, j); - - STaskId id = {.streamId = pTask->id.streamId, .taskId = pTask->id.taskId}; - void *p = taosHashGet(pExecNode->pTaskMap, &id, sizeof(id)); - if (p == NULL) { - STaskStatusEntry entry = {0}; - streamTaskStatusInit(&entry, pTask); - - taosHashPut(pExecNode->pTaskMap, &id, sizeof(id), &entry, sizeof(entry)); - taosArrayPush(pExecNode->pTaskList, &id); - mInfo("s-task:0x%x add into task buffer, total:%d", (int32_t)entry.id.taskId, - (int32_t)taosArrayGetSize(pExecNode->pTaskList)); - } + taosHashPut(pExecNode->pTaskMap, &id, sizeof(id), &entry, sizeof(entry)); + taosArrayPush(pExecNode->pTaskList, &id); + mInfo("s-task:0x%x add into task buffer, total:%d", (int32_t)entry.id.taskId, + (int32_t)taosArrayGetSize(pExecNode->pTaskList)); } } + + destroyTaskIter(pIter); } void removeStreamTasksInBuf(SStreamObj *pStream, SStreamExecInfo *pExecNode) { - int32_t level = taosArrayGetSize(pStream->tasks); - for (int32_t i = 0; i < level; i++) { - SArray *pLevel = taosArrayGetP(pStream->tasks, i); + SStreamTaskIter *pIter = createTaskIter(pStream); + while (taskIterNextTask(pIter)) { + SStreamTask *pTask = taskIterGetCurrent(pIter); - int32_t numOfTasks = taosArrayGetSize(pLevel); - for (int32_t j = 0; j < numOfTasks; j++) { - SStreamTask *pTask = taosArrayGetP(pLevel, j); + STaskId id = {.streamId = pTask->id.streamId, .taskId = pTask->id.taskId}; + void *p = taosHashGet(pExecNode->pTaskMap, &id, sizeof(id)); + if (p != NULL) { + taosHashRemove(pExecNode->pTaskMap, &id, sizeof(id)); - STaskId id = {.streamId = pTask->id.streamId, .taskId = pTask->id.taskId}; - void *p = taosHashGet(pExecNode->pTaskMap, &id, sizeof(id)); - if (p != NULL) { - taosHashRemove(pExecNode->pTaskMap, &id, sizeof(id)); + for (int32_t k = 0; k < taosArrayGetSize(pExecNode->pTaskList); ++k) { + STaskId *pId = taosArrayGet(pExecNode->pTaskList, k); + if (pId->taskId == id.taskId && pId->streamId == id.streamId) { + taosArrayRemove(pExecNode->pTaskList, k); - for (int32_t k = 0; k < taosArrayGetSize(pExecNode->pTaskList); ++k) { - STaskId *pId = taosArrayGet(pExecNode->pTaskList, k); - if (pId->taskId == id.taskId && pId->streamId == id.streamId) { - taosArrayRemove(pExecNode->pTaskList, k); - - int32_t num = taosArrayGetSize(pExecNode->pTaskList); - mInfo("s-task:0x%x removed from buffer, remain:%d", (int32_t)id.taskId, num); - break; - } + int32_t num = taosArrayGetSize(pExecNode->pTaskList); + mInfo("s-task:0x%x removed from buffer, remain:%d", (int32_t)id.taskId, num); + break; } } } } + destroyTaskIter(pIter); ASSERT(taosHashGetSize(pExecNode->pTaskMap) == taosArrayGetSize(pExecNode->pTaskList)); } diff --git a/source/dnode/mnode/impl/src/mndStreamHb.c b/source/dnode/mnode/impl/src/mndStreamHb.c index 5a6faadebb0..19c4f22280f 100644 --- a/source/dnode/mnode/impl/src/mndStreamHb.c +++ b/source/dnode/mnode/impl/src/mndStreamHb.c @@ -65,61 +65,24 @@ static void addIntoCheckpointList(SArray* pList, const SFailedCheckpointInfo* pI taosArrayPush(pList, pInfo); } -static int32_t createStreamResetStatusTrans(SMnode *pMnode, SStreamObj *pStream) { +int32_t createStreamResetStatusTrans(SMnode *pMnode, SStreamObj *pStream) { STrans *pTrans = doCreateTrans(pMnode, pStream, NULL, MND_STREAM_TASK_RESET_NAME, " reset from failed checkpoint"); if (pTrans == NULL) { return terrno; } /*int32_t code = */mndStreamRegisterTrans(pTrans, MND_STREAM_TASK_RESET_NAME, pStream->uid); - - taosWLockLatch(&pStream->lock); - int32_t numOfLevels = taosArrayGetSize(pStream->tasks); - - for (int32_t j = 0; j < numOfLevels; ++j) { - SArray *pLevel = taosArrayGetP(pStream->tasks, j); - - int32_t numOfTasks = taosArrayGetSize(pLevel); - for (int32_t k = 0; k < numOfTasks; ++k) { - SStreamTask *pTask = taosArrayGetP(pLevel, k); - - // todo extract method, with pause stream task - SVResetStreamTaskReq *pReq = taosMemoryCalloc(1, sizeof(SVResetStreamTaskReq)); - if (pReq == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - mError("failed to malloc in reset stream, size:%" PRIzu ", code:%s", sizeof(SVResetStreamTaskReq), - tstrerror(TSDB_CODE_OUT_OF_MEMORY)); - taosWUnLockLatch(&pStream->lock); - return terrno; - } - - pReq->head.vgId = htonl(pTask->info.nodeId); - pReq->taskId = pTask->id.taskId; - pReq->streamId = pTask->id.streamId; - - SEpSet epset = {0}; - bool hasEpset = false; - int32_t code = extractNodeEpset(pMnode, &epset, &hasEpset, pTask->id.taskId, pTask->info.nodeId); - if (code != TSDB_CODE_SUCCESS || !hasEpset) { - taosMemoryFree(pReq); - continue; - } - - code = setTransAction(pTrans, pReq, sizeof(SVResetStreamTaskReq), TDMT_VND_STREAM_TASK_RESET, &epset, 0); - if (code != 0) { - taosMemoryFree(pReq); - taosWUnLockLatch(&pStream->lock); - mndTransDrop(pTrans); - return terrno; - } - } + int32_t code = mndStreamSetResetTaskAction(pMnode, pTrans, pStream); + if (code != 0) { + sdbRelease(pMnode->pSdb, pStream); + mndTransDrop(pTrans); + return code; } - taosWUnLockLatch(&pStream->lock); - - int32_t code = mndPersistTransLog(pStream, pTrans, SDB_STATUS_READY); + code = mndPersistTransLog(pStream, pTrans, SDB_STATUS_READY); if (code != TSDB_CODE_SUCCESS) { sdbRelease(pMnode->pSdb, pStream); + mndTransDrop(pTrans); return -1; } diff --git a/source/dnode/mnode/impl/src/mndStreamTrans.c b/source/dnode/mnode/impl/src/mndStreamTrans.c index 0a7397827ee..f8497e14f79 100644 --- a/source/dnode/mnode/impl/src/mndStreamTrans.c +++ b/source/dnode/mnode/impl/src/mndStreamTrans.c @@ -301,86 +301,4 @@ void killAllCheckpointTrans(SMnode *pMnode, SVgroupChangeInfo *pChangeInfo) { mDebug("complete clear checkpoints in Dbs"); } -static void initNodeUpdateMsg(SStreamTaskNodeUpdateMsg *pMsg, const SVgroupChangeInfo *pInfo, SStreamTaskId *pId, - int32_t transId) { - pMsg->streamId = pId->streamId; - pMsg->taskId = pId->taskId; - pMsg->transId = transId; - pMsg->pNodeList = taosArrayInit(taosArrayGetSize(pInfo->pUpdateNodeList), sizeof(SNodeUpdateInfo)); - taosArrayAddAll(pMsg->pNodeList, pInfo->pUpdateNodeList); -} -static int32_t doBuildStreamTaskUpdateMsg(void **pBuf, int32_t *pLen, SVgroupChangeInfo *pInfo, int32_t nodeId, - SStreamTaskId *pId, int32_t transId) { - SStreamTaskNodeUpdateMsg req = {0}; - initNodeUpdateMsg(&req, pInfo, pId, transId); - - int32_t code = 0; - int32_t blen; - - tEncodeSize(tEncodeStreamTaskUpdateMsg, &req, blen, code); - if (code < 0) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - taosArrayDestroy(req.pNodeList); - return -1; - } - - int32_t tlen = sizeof(SMsgHead) + blen; - - void *buf = taosMemoryMalloc(tlen); - if (buf == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - taosArrayDestroy(req.pNodeList); - return -1; - } - - void *abuf = POINTER_SHIFT(buf, sizeof(SMsgHead)); - SEncoder encoder; - tEncoderInit(&encoder, abuf, tlen); - tEncodeStreamTaskUpdateMsg(&encoder, &req); - - SMsgHead *pMsgHead = (SMsgHead *)buf; - pMsgHead->contLen = htonl(tlen); - pMsgHead->vgId = htonl(nodeId); - - tEncoderClear(&encoder); - - *pBuf = buf; - *pLen = tlen; - - taosArrayDestroy(req.pNodeList); - return TSDB_CODE_SUCCESS; -} - -// todo extract method: traverse stream tasks -// build trans to update the epset -int32_t mndStreamSetUpdateEpsetAction(SStreamObj *pStream, SVgroupChangeInfo *pInfo, STrans *pTrans) { - mDebug("stream:0x%" PRIx64 " set tasks epset update action", pStream->uid); - - taosWLockLatch(&pStream->lock); - int32_t numOfLevels = taosArrayGetSize(pStream->tasks); - - for (int32_t j = 0; j < numOfLevels; ++j) { - SArray *pLevel = taosArrayGetP(pStream->tasks, j); - - int32_t numOfTasks = taosArrayGetSize(pLevel); - for (int32_t k = 0; k < numOfTasks; ++k) { - SStreamTask *pTask = taosArrayGetP(pLevel, k); - - void *pBuf = NULL; - int32_t len = 0; - streamTaskUpdateEpsetInfo(pTask, pInfo->pUpdateNodeList); - doBuildStreamTaskUpdateMsg(&pBuf, &len, pInfo, pTask->info.nodeId, &pTask->id, pTrans->id); - - int32_t code = setTransAction(pTrans, pBuf, len, TDMT_VND_STREAM_TASK_UPDATE, &pTask->info.epSet, 0); - if (code != TSDB_CODE_SUCCESS) { - taosMemoryFree(pBuf); - taosWUnLockLatch(&pStream->lock); - return -1; - } - } - } - - taosWUnLockLatch(&pStream->lock); - return 0; -} \ No newline at end of file diff --git a/source/dnode/mnode/impl/src/mndStreamUtil.c b/source/dnode/mnode/impl/src/mndStreamUtil.c index 5d6e34856b8..c28ba43f656 100644 --- a/source/dnode/mnode/impl/src/mndStreamUtil.c +++ b/source/dnode/mnode/impl/src/mndStreamUtil.c @@ -18,13 +18,13 @@ #include "tmisce.h" #include "mndVgroup.h" -typedef struct SStreamTaskIter { +struct SStreamTaskIter { SStreamObj *pStream; int32_t level; int32_t ordinalIndex; int32_t totalLevel; SStreamTask *pTask; -} SStreamTaskIter; +}; SStreamTaskIter* createTaskIter(SStreamObj* pStream) { SStreamTaskIter* pIter = taosMemoryCalloc(1, sizeof(SStreamTaskIter)); @@ -235,18 +235,16 @@ static int32_t doSetResumeAction(STrans *pTrans, SMnode *pMnode, SStreamTask *pT } SStreamTask *mndGetStreamTask(STaskId *pId, SStreamObj *pStream) { - for (int32_t i = 0; i < taosArrayGetSize(pStream->tasks); i++) { - SArray *pLevel = taosArrayGetP(pStream->tasks, i); - - int32_t numOfLevels = taosArrayGetSize(pLevel); - for (int32_t j = 0; j < numOfLevels; j++) { - SStreamTask *pTask = taosArrayGetP(pLevel, j); - if (pTask->id.taskId == pId->taskId) { - return pTask; - } + SStreamTaskIter *pIter = createTaskIter(pStream); + while (taskIterNextTask(pIter)) { + SStreamTask *pTask = taskIterGetCurrent(pIter); + if (pTask->id.taskId == pId->taskId) { + destroyTaskIter(pIter); + return pTask; } } + destroyTaskIter(pIter); return NULL; } @@ -261,21 +259,20 @@ int32_t mndGetNumOfStreamTasks(const SStreamObj *pStream) { } int32_t mndStreamSetResumeAction(STrans *pTrans, SMnode *pMnode, SStreamObj *pStream, int8_t igUntreated) { - int32_t size = taosArrayGetSize(pStream->tasks); - for (int32_t i = 0; i < size; i++) { - SArray *pTasks = taosArrayGetP(pStream->tasks, i); - int32_t sz = taosArrayGetSize(pTasks); - for (int32_t j = 0; j < sz; j++) { - SStreamTask *pTask = taosArrayGetP(pTasks, j); - if (doSetResumeAction(pTrans, pMnode, pTask, igUntreated) < 0) { - return -1; - } + SStreamTaskIter *pIter = createTaskIter(pStream); - if (atomic_load_8(&pTask->status.taskStatus) == TASK_STATUS__PAUSE) { - atomic_store_8(&pTask->status.taskStatus, pTask->status.statusBackup); - } + while (taskIterNextTask(pIter)) { + SStreamTask *pTask = taskIterGetCurrent(pIter); + if (doSetResumeAction(pTrans, pMnode, pTask, igUntreated) < 0) { + destroyTaskIter(pIter); + return -1; + } + + if (atomic_load_8(&pTask->status.taskStatus) == TASK_STATUS__PAUSE) { + atomic_store_8(&pTask->status.taskStatus, pTask->status.statusBackup); } } + destroyTaskIter(pIter); return 0; } @@ -410,4 +407,139 @@ int32_t mndStreamSetDropActionFromList(SMnode *pMnode, STrans *pTrans, SArray* p doSetDropActionFromId(pMnode, pTrans, pTask); } return 0; -} \ No newline at end of file +} + +static void initNodeUpdateMsg(SStreamTaskNodeUpdateMsg *pMsg, const SVgroupChangeInfo *pInfo, SStreamTaskId *pId, + int32_t transId) { + pMsg->streamId = pId->streamId; + pMsg->taskId = pId->taskId; + pMsg->transId = transId; + pMsg->pNodeList = taosArrayInit(taosArrayGetSize(pInfo->pUpdateNodeList), sizeof(SNodeUpdateInfo)); + taosArrayAddAll(pMsg->pNodeList, pInfo->pUpdateNodeList); +} + +static int32_t doBuildStreamTaskUpdateMsg(void **pBuf, int32_t *pLen, SVgroupChangeInfo *pInfo, int32_t nodeId, + SStreamTaskId *pId, int32_t transId) { + SStreamTaskNodeUpdateMsg req = {0}; + initNodeUpdateMsg(&req, pInfo, pId, transId); + + int32_t code = 0; + int32_t blen; + + tEncodeSize(tEncodeStreamTaskUpdateMsg, &req, blen, code); + if (code < 0) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + taosArrayDestroy(req.pNodeList); + return -1; + } + + int32_t tlen = sizeof(SMsgHead) + blen; + + void *buf = taosMemoryMalloc(tlen); + if (buf == NULL) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + taosArrayDestroy(req.pNodeList); + return -1; + } + + void *abuf = POINTER_SHIFT(buf, sizeof(SMsgHead)); + SEncoder encoder; + tEncoderInit(&encoder, abuf, tlen); + tEncodeStreamTaskUpdateMsg(&encoder, &req); + + SMsgHead *pMsgHead = (SMsgHead *)buf; + pMsgHead->contLen = htonl(tlen); + pMsgHead->vgId = htonl(nodeId); + + tEncoderClear(&encoder); + + *pBuf = buf; + *pLen = tlen; + + taosArrayDestroy(req.pNodeList); + return TSDB_CODE_SUCCESS; +} + +static int32_t doSetUpdateTaskAction(STrans *pTrans, SStreamTask *pTask, SVgroupChangeInfo *pInfo) { + void *pBuf = NULL; + int32_t len = 0; + streamTaskUpdateEpsetInfo(pTask, pInfo->pUpdateNodeList); + + doBuildStreamTaskUpdateMsg(&pBuf, &len, pInfo, pTask->info.nodeId, &pTask->id, pTrans->id); + + int32_t code = setTransAction(pTrans, pBuf, len, TDMT_VND_STREAM_TASK_UPDATE, &pTask->info.epSet, 0); + if (code != TSDB_CODE_SUCCESS) { + taosMemoryFree(pBuf); + } + + return code; +} + +// build trans to update the epset +int32_t mndStreamSetUpdateEpsetAction(SStreamObj *pStream, SVgroupChangeInfo *pInfo, STrans *pTrans) { + mDebug("stream:0x%" PRIx64 " set tasks epset update action", pStream->uid); + taosWLockLatch(&pStream->lock); + + SStreamTaskIter *pIter = createTaskIter(pStream); + while (taskIterNextTask(pIter)) { + SStreamTask *pTask = taskIterGetCurrent(pIter); + int32_t code = doSetUpdateTaskAction(pTrans, pTask, pInfo); + if (code != TSDB_CODE_SUCCESS) { + destroyTaskIter(pIter); + taosWUnLockLatch(&pStream->lock); + return -1; + } + } + + destroyTaskIter(pIter); + taosWUnLockLatch(&pStream->lock); + return 0; +} + +static int32_t doSetResetAction(SMnode *pMnode, STrans *pTrans, SStreamTask *pTask) { + SVResetStreamTaskReq *pReq = taosMemoryCalloc(1, sizeof(SVResetStreamTaskReq)); + if (pReq == NULL) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + mError("failed to malloc in reset stream, size:%" PRIzu ", code:%s", sizeof(SVResetStreamTaskReq), + tstrerror(TSDB_CODE_OUT_OF_MEMORY)); + return terrno; + } + + pReq->head.vgId = htonl(pTask->info.nodeId); + pReq->taskId = pTask->id.taskId; + pReq->streamId = pTask->id.streamId; + + SEpSet epset = {0}; + bool hasEpset = false; + int32_t code = extractNodeEpset(pMnode, &epset, &hasEpset, pTask->id.taskId, pTask->info.nodeId); + if (code != TSDB_CODE_SUCCESS || !hasEpset) { + taosMemoryFree(pReq); + return code; + } + + code = setTransAction(pTrans, pReq, sizeof(SVResetStreamTaskReq), TDMT_VND_STREAM_TASK_RESET, &epset, 0); + if (code != TSDB_CODE_SUCCESS) { + taosMemoryFree(pReq); + } + + return code; +} + +int32_t mndStreamSetResetTaskAction(SMnode *pMnode, STrans *pTrans, SStreamObj *pStream) { + taosWLockLatch(&pStream->lock); + + SStreamTaskIter *pIter = createTaskIter(pStream); + while (taskIterNextTask(pIter)) { + SStreamTask *pTask = taskIterGetCurrent(pIter); + int32_t code = doSetResetAction(pMnode, pTrans, pTask); + if (code != TSDB_CODE_SUCCESS) { + destroyTaskIter(pIter); + taosWUnLockLatch(&pStream->lock); + return -1; + } + } + + destroyTaskIter(pIter); + taosWUnLockLatch(&pStream->lock); + return 0; +} From 35f154da375a11997a737177f1a7ad9ee44da3a1 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Mon, 29 Jan 2024 13:55:46 +0800 Subject: [PATCH 40/93] fix:[TS-4479] support long varbinary in format like \x3423 --- source/libs/parser/src/parInsertSql.c | 6 +-- utils/test/c/varbinary_test.c | 55 ++++++++++++++++++++++++++- 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c index ce2d51c9111..512dfdaef27 100644 --- a/source/libs/parser/src/parInsertSql.c +++ b/source/libs/parser/src/parInsertSql.c @@ -440,14 +440,14 @@ static int32_t parseVarbinary(SToken* pToken, uint8_t **pData, uint32_t *nData, return TSDB_CODE_PAR_INVALID_VARBINARY; } - if(isHex(pToken->z, pToken->n)){ - if(!isValidateHex(pToken->z, pToken->n)){ + if(isHex(pToken->z + 1, pToken->n - 2)){ + if(!isValidateHex(pToken->z + 1, pToken->n - 2)){ return TSDB_CODE_PAR_INVALID_VARBINARY; } void* data = NULL; uint32_t size = 0; - if(taosHex2Ascii(pToken->z, pToken->n, &data, &size) < 0){ + if(taosHex2Ascii(pToken->z + 1, pToken->n - 2, &data, &size) < 0){ return TSDB_CODE_OUT_OF_MEMORY; } diff --git a/utils/test/c/varbinary_test.c b/utils/test/c/varbinary_test.c index 522a820fe85..47bacf629b9 100644 --- a/utils/test/c/varbinary_test.c +++ b/utils/test/c/varbinary_test.c @@ -85,7 +85,6 @@ void varbinary_sql_test() { // test insert pRes = taos_query(taos, "insert into tb2 using stb tags (2, 'tb2_bin1', 093) values (now + 2s, 'nchar1', 892, 0.3)"); - printf("error:%s", taos_errstr(pRes)); ASSERT(taos_errno(pRes) != 0); pRes = taos_query(taos, "insert into tb3 using stb tags (3, 'tb3_bin1', 0x7f829) values (now + 3s, 'nchar1', 0x7f829, 0.3)"); @@ -322,6 +321,60 @@ void varbinary_sql_test() { printf("%s result %s\n", __FUNCTION__, taos_errstr(pRes)); taos_free_result(pRes); + // test insert string value '\x' + pRes = taos_query(taos, "insert into tb5 using stb tags (5, 'tb5_bin1', '\\\\xg') values (now + 4s, 'nchar1', '\\\\xg', 0.3)"); + taos_free_result(pRes); + + pRes = taos_query(taos, "select c2,t3 from stb where t3 = '\\x5C7867'"); + while ((row = taos_fetch_row(pRes)) != NULL) { + int32_t* length = taos_fetch_lengths(pRes); + void* data = NULL; + uint32_t size = 0; + if(taosAscii2Hex(row[0], length[0], &data, &size) < 0){ + ASSERT(0); + } + + ASSERT(memcmp(data, "\\x5C7867", size) == 0); + taosMemoryFree(data); + + if(taosAscii2Hex(row[1], length[1], &data, &size) < 0){ + ASSERT(0); + } + + ASSERT(memcmp(data, "\\x5C7867", size) == 0); + taosMemoryFree(data); + } + taos_free_result(pRes); + + // test insert + char tmp [65517*2+3] = {0}; + tmp[0] = '\\'; + tmp[1] = 'x'; + memset(tmp + 2, 48, 65517*2); + + char sql[65517*2+3 + 256] = {0}; + + pRes = taos_query(taos, "create stable stb1 (ts timestamp, c2 varbinary(65517)) tags (t1 int, t2 binary(8), t3 varbinary(8))"); + taos_free_result(pRes); + + sprintf(sql, "insert into tb6 using stb1 tags (6, 'tb6_bin1', '\\\\xg') values (now + 4s, '%s')", tmp); + pRes = taos_query(taos, sql); + taos_free_result(pRes); + + pRes = taos_query(taos, "select c2 from tb6"); + while ((row = taos_fetch_row(pRes)) != NULL) { + int32_t* length = taos_fetch_lengths(pRes); + void* data = NULL; + uint32_t size = 0; + if(taosAscii2Hex(row[0], length[0], &data, &size) < 0){ + ASSERT(0); + } + + ASSERT(memcmp(data, tmp, size) == 0); + taosMemoryFree(data); + } + taos_free_result(pRes); + taos_close(taos); } From 6e43d74677e81d935cbe3f3e75519893b2397310 Mon Sep 17 00:00:00 2001 From: Ping Xiao Date: Mon, 29 Jan 2024 13:58:58 +0800 Subject: [PATCH 41/93] update coverage data --- README-CN.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README-CN.md b/README-CN.md index 4931c0177e8..06ac087859c 100644 --- a/README-CN.md +++ b/README-CN.md @@ -12,7 +12,7 @@ [![Build Status](https://travis-ci.org/taosdata/TDengine.svg?branch=master)](https://travis-ci.org/taosdata/TDengine) [![Build status](https://ci.appveyor.com/api/projects/status/kf3pwh2or5afsgl9/branch/master?svg=true)](https://ci.appveyor.com/project/sangshuduo/tdengine-2n8ge/branch/master) -[![Coverage Status](https://coveralls.io/repos/github/taosdata/TDengine/badge.svg?branch=develop)](https://coveralls.io/github/taosdata/TDengine?branch=develop) +[![Coverage Status](https://coveralls.io/repos/github/taosdata/TDengine/badge.svg?branch=3.0)](https://coveralls.io/github/taosdata/TDengine?branch=3.0) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4201/badge)](https://bestpractices.coreinfrastructure.org/projects/4201) 简体中文 | [English](README.md) | [TDengine 云服务](https://cloud.taosdata.com/?utm_medium=cn&utm_source=github) | 很多职位正在热招中,请看[这里](https://www.taosdata.com/cn/careers/) diff --git a/README.md b/README.md index 31d3a8bf676..e390b5e7649 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ [![Build Status](https://cloud.drone.io/api/badges/taosdata/TDengine/status.svg?ref=refs/heads/master)](https://cloud.drone.io/taosdata/TDengine) [![Build status](https://ci.appveyor.com/api/projects/status/kf3pwh2or5afsgl9/branch/master?svg=true)](https://ci.appveyor.com/project/sangshuduo/tdengine-2n8ge/branch/master) -[![Coverage Status](https://coveralls.io/repos/github/taosdata/TDengine/badge.svg?branch=develop)](https://coveralls.io/github/taosdata/TDengine?branch=develop) +[![Coverage Status](https://coveralls.io/repos/github/taosdata/TDengine/badge.svg?branch=3.0)](https://coveralls.io/github/taosdata/TDengine?branch=3.0) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4201/badge)](https://bestpractices.coreinfrastructure.org/projects/4201)
[![Twitter Follow](https://img.shields.io/twitter/follow/tdenginedb?label=TDengine&style=social)](https://twitter.com/tdenginedb) From b9927cce1408760372f61b7168816318efaffaf3 Mon Sep 17 00:00:00 2001 From: factosea <285808407@qq.com> Date: Mon, 29 Jan 2024 16:04:08 +0800 Subject: [PATCH 42/93] fix: count error on tag which is null --- source/common/src/tdatablock.c | 1 + source/libs/executor/src/scanoperator.c | 4 ++-- source/libs/function/src/builtinsimpl.c | 6 ++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/source/common/src/tdatablock.c b/source/common/src/tdatablock.c index 53822598990..87390684320 100644 --- a/source/common/src/tdatablock.c +++ b/source/common/src/tdatablock.c @@ -224,6 +224,7 @@ static int32_t doCopyNItems(struct SColumnInfoData* pColumnInfoData, int32_t cur int32_t colDataSetNItems(SColumnInfoData* pColumnInfoData, uint32_t currentRow, const char* pData, uint32_t numOfRows, bool trimValue) { + if (currentRow >= numOfRows) return TSDB_CODE_SUCCESS; int32_t len = pColumnInfoData->info.bytes; if (IS_VAR_DATA_TYPE(pColumnInfoData->info.type)) { len = varDataTLen(pData); diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 9243f385d09..1b69bcce945 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -684,7 +684,7 @@ void markGroupProcessed(STableScanInfo* pInfo, uint64_t groupId) { static SSDataBlock* getOneRowResultBlock(SExecTaskInfo* pTaskInfo, STableScanBase* pBase, SSDataBlock* pBlock, const STableKeyInfo* tbInfo) { blockDataEmpty(pBlock); - pBlock->info.rows = 1; + pBlock->info.rows = 0; pBlock->info.id.uid = tbInfo->uid; pBlock->info.id.groupId = tbInfo->groupId; @@ -696,7 +696,7 @@ static SSDataBlock* getOneRowResultBlock(SExecTaskInfo* pTaskInfo, STableScanBas } // set tag/tbname - doSetTagColumnData(pBase, pBlock, pTaskInfo, pBlock->info.rows); + doSetTagColumnData(pBase, pBlock, pTaskInfo, 1); return pBlock; } diff --git a/source/libs/function/src/builtinsimpl.c b/source/libs/function/src/builtinsimpl.c index 000f634fe5d..fc1fe293328 100644 --- a/source/libs/function/src/builtinsimpl.c +++ b/source/libs/function/src/builtinsimpl.c @@ -2338,6 +2338,8 @@ int32_t lastFunction(SqlFunctionCtx* pCtx) { return TSDB_CODE_SUCCESS; } + if(pInput->totalRows == 0) return TSDB_CODE_SUCCESS; + SColumnDataAgg* pColAgg = (pInput->colDataSMAIsSet) ? pInput->pColumnDataAgg[0] : NULL; TSKEY startKey = getRowPTs(pInput->pPTS, 0); @@ -2647,7 +2649,7 @@ int32_t lastRowFunction(SqlFunctionCtx* pCtx) { int32_t bytes = pInputCol->info.bytes; pInfo->bytes = bytes; - if (IS_NULL_TYPE(type)) { + if (IS_NULL_TYPE(type) || 0 == pInput->totalRows) { return TSDB_CODE_SUCCESS; } @@ -6022,7 +6024,7 @@ int32_t groupKeyFunction(SqlFunctionCtx* pCtx) { goto _group_key_over; } - if (colDataIsNull_s(pInputCol, startIndex)) { + if (pInputCol->pData == NULL || colDataIsNull_s(pInputCol, startIndex)) { pInfo->isNull = true; pInfo->hasResult = true; goto _group_key_over; From 3730e43f0e688676f2bcbe8131ff2c5fbfe33030 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Mon, 29 Jan 2024 17:24:58 +0800 Subject: [PATCH 43/93] refactor: disable some logs. --- source/libs/stream/src/streamMeta.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index db71b568151..8ad20f357cd 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -1312,12 +1312,12 @@ void streamMetaResetStartInfo(STaskStartInfo* pStartInfo) { } void streamMetaRLock(SStreamMeta* pMeta) { - stTrace("vgId:%d meta-rlock", pMeta->vgId); +// stTrace("vgId:%d meta-rlock", pMeta->vgId); taosThreadRwlockRdlock(&pMeta->lock); } void streamMetaRUnLock(SStreamMeta* pMeta) { - stTrace("vgId:%d meta-runlock", pMeta->vgId); +// stTrace("vgId:%d meta-runlock", pMeta->vgId); int32_t code = taosThreadRwlockUnlock(&pMeta->lock); if (code != TSDB_CODE_SUCCESS) { stError("vgId:%d meta-runlock failed, code:%d", pMeta->vgId, code); @@ -1327,13 +1327,13 @@ void streamMetaRUnLock(SStreamMeta* pMeta) { } void streamMetaWLock(SStreamMeta* pMeta) { - stTrace("vgId:%d meta-wlock", pMeta->vgId); +// stTrace("vgId:%d meta-wlock", pMeta->vgId); taosThreadRwlockWrlock(&pMeta->lock); - stTrace("vgId:%d meta-wlock completed", pMeta->vgId); +// stTrace("vgId:%d meta-wlock completed", pMeta->vgId); } void streamMetaWUnLock(SStreamMeta* pMeta) { - stTrace("vgId:%d meta-wunlock", pMeta->vgId); +// stTrace("vgId:%d meta-wunlock", pMeta->vgId); taosThreadRwlockUnlock(&pMeta->lock); } From b929bceabd8d9d1883999364b7af04286c381d8a Mon Sep 17 00:00:00 2001 From: kailixu Date: Mon, 29 Jan 2024 18:43:24 +0800 Subject: [PATCH 44/93] feat: support uniq grant --- include/util/taoserror.h | 1 + source/util/src/terror.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 69c238822f0..600c47d2ccd 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -572,6 +572,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_GRANT_OBJ_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0818) #define TSDB_CODE_GRANT_LAST_ACTIVE_NOT_FOUND TAOS_DEF_ERROR_CODE(0, 0x0819) #define TSDB_CODE_GRANT_MACHINES_MISMATCH TAOS_DEF_ERROR_CODE(0, 0x0820) +#define TSDB_CODE_GRANT_OPT_EXPIRE_TOO_LARGE TAOS_DEF_ERROR_CODE(0, 0x0821) // sync diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 6dd87f26bf5..e98cc797acc 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -459,6 +459,8 @@ TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_LACK_OF_BASIC, "Lack of basic functio TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_OBJ_NOT_EXIST, "Grant object not exist") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_LAST_ACTIVE_NOT_FOUND, "Last active not found in cluster") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_MACHINES_MISMATCH, "Cluster machines mismatch with active code") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_OPT_EXPIRE_TOO_LARGE, "Expire time of optional grant item too large") + // sync TAOS_DEFINE_ERROR(TSDB_CODE_SYN_TIMEOUT, "Sync timeout") From 2231b3844d423aa27ffc07eba955b9248a15e98d Mon Sep 17 00:00:00 2001 From: wangjiaming0909 <604227650@qq.com> Date: Tue, 30 Jan 2024 08:41:42 +0800 Subject: [PATCH 45/93] doc: add supported version for to_char/timestamp funcs --- docs/en/12-taos-sql/10-function.md | 4 ++++ docs/zh/12-taos-sql/10-function.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/en/12-taos-sql/10-function.md b/docs/en/12-taos-sql/10-function.md index fbdae3445b4..b4f1cf65dae 100644 --- a/docs/en/12-taos-sql/10-function.md +++ b/docs/en/12-taos-sql/10-function.md @@ -491,6 +491,8 @@ TO_CHAR(ts, format_str_literal) **Description**: Convert a ts column to string as the format specified +**Version**: Since ver-3.2.2.0 + **Return value type**: VARCHAR **Applicable column types**: TIMESTAMP @@ -550,6 +552,8 @@ TO_TIMESTAMP(ts_str_literal, format_str_literal) **Description**: Convert a formated timestamp string to a timestamp +**Version**: Since ver-3.2.2.0 + **Return value type**: TIMESTAMP **Applicable column types**: VARCHAR diff --git a/docs/zh/12-taos-sql/10-function.md b/docs/zh/12-taos-sql/10-function.md index 66322d55f13..0482022d95e 100644 --- a/docs/zh/12-taos-sql/10-function.md +++ b/docs/zh/12-taos-sql/10-function.md @@ -491,6 +491,8 @@ TO_CHAR(ts, format_str_literal) **功能说明**: 将timestamp类型按照指定格式转换为字符串 +**版本**: ver-3.2.2.0 + **返回结果数据类型**: VARCHAR **应用字段**: TIMESTAMP @@ -550,6 +552,8 @@ TO_TIMESTAMP(ts_str_literal, format_str_literal) **功能说明**: 将字符串按照指定格式转化为时间戳. +**版本**: ver-3.2.2.0 + **返回结果数据类型**: TIMESTAMP **应用字段**: VARCHAR From 11c9c7d93634341bba5d8c002ec79a696371d97e Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 30 Jan 2024 09:17:02 +0800 Subject: [PATCH 46/93] refactor: do some internal refactor. --- source/dnode/mnode/impl/inc/mndStream.h | 80 ++++++++++---------- source/dnode/mnode/impl/src/mndStream.c | 42 +++++----- source/dnode/mnode/impl/src/mndStreamTrans.c | 16 ++-- source/dnode/mnode/impl/src/mndStreamUtil.c | 68 ++++++++--------- 4 files changed, 101 insertions(+), 105 deletions(-) diff --git a/source/dnode/mnode/impl/inc/mndStream.h b/source/dnode/mnode/impl/inc/mndStream.h index 2778d0481e2..372612274f2 100644 --- a/source/dnode/mnode/impl/inc/mndStream.h +++ b/source/dnode/mnode/impl/inc/mndStream.h @@ -26,9 +26,17 @@ extern "C" { #define MND_STREAM_RESERVE_SIZE 64 #define MND_STREAM_VER_NUMBER 4 +#define MND_STREAM_CREATE_NAME "stream-create" +#define MND_STREAM_CHECKPOINT_NAME "stream-checkpoint" +#define MND_STREAM_PAUSE_NAME "stream-pause" +#define MND_STREAM_RESUME_NAME "stream-resume" +#define MND_STREAM_DROP_NAME "stream-drop" +#define MND_STREAM_TASK_RESET_NAME "stream-task-reset" +#define MND_STREAM_TASK_UPDATE_NAME "stream-task-update" + typedef struct SStreamTransInfo { int64_t startTime; - int64_t streamUid; + int64_t streamId; const char *name; int32_t transId; } SStreamTransInfo; @@ -41,7 +49,7 @@ typedef struct SVgroupChangeInfo { // time to generated the checkpoint, if now() - checkpointTs >= tsCheckpointInterval, this checkpoint will be discard // to avoid too many checkpoints for a taskk in the waiting list typedef struct SCheckpointCandEntry { - char * pName; + char *pName; int64_t streamId; int64_t checkpointTs; int64_t checkpointId; @@ -62,6 +70,9 @@ typedef struct SStreamExecInfo { SHashObj *pTransferStateStreams; } SStreamExecInfo; +extern SStreamExecInfo execInfo; +typedef struct SStreamTaskIter SStreamTaskIter; + typedef struct SNodeEntry { int32_t nodeId; bool stageUpdated; // the stage has been updated due to the leader/follower change or node reboot. @@ -69,15 +80,11 @@ typedef struct SNodeEntry { int64_t hbTimestamp; // second } SNodeEntry; -#define MND_STREAM_CREATE_NAME "stream-create" -#define MND_STREAM_CHECKPOINT_NAME "stream-checkpoint" -#define MND_STREAM_PAUSE_NAME "stream-pause" -#define MND_STREAM_RESUME_NAME "stream-resume" -#define MND_STREAM_DROP_NAME "stream-drop" -#define MND_STREAM_TASK_RESET_NAME "stream-task-reset" -#define MND_STREAM_TASK_UPDATE_NAME "stream-task-update" - -extern SStreamExecInfo execInfo; +typedef struct SOrphanTask { + int64_t streamId; + int32_t taskId; + int32_t nodeId; +} SOrphanTask; int32_t mndInitStream(SMnode *pMnode); void mndCleanupStream(SMnode *pMnode); @@ -85,49 +92,38 @@ SStreamObj *mndAcquireStream(SMnode *pMnode, char *streamName); void mndReleaseStream(SMnode *pMnode, SStreamObj *pStream); int32_t mndDropStreamByDb(SMnode *pMnode, STrans *pTrans, SDbObj *pDb); int32_t mndPersistStream(STrans *pTrans, SStreamObj *pStream); +int32_t mndStreamRegisterTrans(STrans *pTrans, const char *pTransName, int64_t streamId); +int32_t mndAddtoCheckpointWaitingList(SStreamObj *pStream, int64_t checkpointId); +bool mndStreamTransConflictCheck(SMnode *pMnode, int64_t streamId, const char *pTransName, bool lock); +int32_t mndStreamGetRelTrans(SMnode *pMnode, int64_t streamId); -int32_t mndStreamRegisterTrans(STrans* pTrans, const char* pTransName, int64_t streamUid); -int32_t mndAddtoCheckpointWaitingList(SStreamObj *pStream, int64_t checkpointId); -bool mndStreamTransConflictCheck(SMnode *pMnode, int64_t streamUid, const char *pTransName, bool lock); -int32_t mndStreamGetRelTrans(SMnode *pMnode, int64_t streamUid); - -typedef struct SOrphanTask { - int64_t streamId; - int32_t taskId; - int32_t nodeId; -} SOrphanTask; - -// for sma -// TODO refactor -int32_t mndGetNumOfStreams(SMnode *pMnode, char *dbName, int32_t *pNumOfStreams); -int32_t mndGetNumOfStreamTasks(const SStreamObj *pStream); -SArray *mndTakeVgroupSnapshot(SMnode *pMnode, bool *allReady); -void mndKillTransImpl(SMnode *pMnode, int32_t transId, const char *pDbName); -int32_t setTransAction(STrans *pTrans, void *pCont, int32_t contLen, int32_t msgType, const SEpSet *pEpset, - int32_t retryCode); -STrans *doCreateTrans(SMnode *pMnode, SStreamObj *pStream, SRpcMsg *pReq, const char *name, const char *pMsg); -int32_t mndPersistTransLog(SStreamObj *pStream, STrans *pTrans, int32_t status); -SSdbRaw *mndStreamActionEncode(SStreamObj *pStream); -void killAllCheckpointTrans(SMnode *pMnode, SVgroupChangeInfo *pChangeInfo); -int32_t mndStreamSetUpdateEpsetAction(SStreamObj *pStream, SVgroupChangeInfo *pInfo, STrans *pTrans); +int32_t mndGetNumOfStreams(SMnode *pMnode, char *dbName, int32_t *pNumOfStreams); +int32_t mndGetNumOfStreamTasks(const SStreamObj *pStream); +SArray *mndTakeVgroupSnapshot(SMnode *pMnode, bool *allReady); +void mndKillTransImpl(SMnode *pMnode, int32_t transId, const char *pDbName); +int32_t setTransAction(STrans *pTrans, void *pCont, int32_t contLen, int32_t msgType, const SEpSet *pEpset, + int32_t retryCode); +STrans *doCreateTrans(SMnode *pMnode, SStreamObj *pStream, SRpcMsg *pReq, const char *name, const char *pMsg); +int32_t mndPersistTransLog(SStreamObj *pStream, STrans *pTrans, int32_t status); +SSdbRaw *mndStreamActionEncode(SStreamObj *pStream); +void killAllCheckpointTrans(SMnode *pMnode, SVgroupChangeInfo *pChangeInfo); +int32_t mndStreamSetUpdateEpsetAction(SStreamObj *pStream, SVgroupChangeInfo *pInfo, STrans *pTrans); SStreamObj *mndGetStreamObj(SMnode *pMnode, int64_t streamId); int32_t extractNodeEpset(SMnode *pMnode, SEpSet *pEpSet, bool *hasEpset, int32_t taskId, int32_t nodeId); int32_t mndProcessStreamHb(SRpcMsg *pReq); void saveStreamTasksInfo(SStreamObj *pStream, SStreamExecInfo *pExecNode); int32_t initStreamNodeList(SMnode *pMnode); -int32_t mndStreamSetResumeAction(STrans *pTrans, SMnode *pMnode, SStreamObj* pStream, int8_t igUntreated); +int32_t mndStreamSetResumeAction(STrans *pTrans, SMnode *pMnode, SStreamObj *pStream, int8_t igUntreated); int32_t mndStreamSetPauseAction(SMnode *pMnode, STrans *pTrans, SStreamObj *pStream); int32_t mndStreamSetDropAction(SMnode *pMnode, STrans *pTrans, SStreamObj *pStream); int32_t mndStreamSetDropActionFromList(SMnode *pMnode, STrans *pTrans, SArray *pList); int32_t mndStreamSetResetTaskAction(SMnode *pMnode, STrans *pTrans, SStreamObj *pStream); -typedef struct SStreamTaskIter SStreamTaskIter; - -SStreamTaskIter *createTaskIter(SStreamObj *pStream); -bool taskIterNextTask(SStreamTaskIter *pIter); -SStreamTask *taskIterGetCurrent(SStreamTaskIter *pIter); -void destroyTaskIter(SStreamTaskIter *pIter); +SStreamTaskIter *createStreamTaskIter(SStreamObj *pStream); +void destroyStreamTaskIter(SStreamTaskIter *pIter); +bool streamTaskIterNextTask(SStreamTaskIter *pIter); +SStreamTask *streamTaskIterGetCurrent(SStreamTaskIter *pIter); #ifdef __cplusplus } diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index c78b80d79ad..48281fc0108 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -476,16 +476,16 @@ int32_t mndPersistTaskDeployReq(STrans *pTrans, SStreamTask *pTask) { } int32_t mndPersistStreamTasks(STrans *pTrans, SStreamObj *pStream) { - SStreamTaskIter *pIter = createTaskIter(pStream); - while (taskIterNextTask(pIter)) { - SStreamTask *pTask = taskIterGetCurrent(pIter); + SStreamTaskIter *pIter = createStreamTaskIter(pStream); + while (streamTaskIterNextTask(pIter)) { + SStreamTask *pTask = streamTaskIterGetCurrent(pIter); if (mndPersistTaskDeployReq(pTrans, pTask) < 0) { - destroyTaskIter(pIter); + destroyStreamTaskIter(pIter); return -1; } } - destroyTaskIter(pIter); + destroyStreamTaskIter(pIter); // persistent stream task for already stored ts data if (pStream->conf.fillHistory) { @@ -1506,9 +1506,9 @@ static int32_t mndRetrieveStreamTask(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock } // add row for each task - SStreamTaskIter *pIter = createTaskIter(pStream); - while (taskIterNextTask(pIter)) { - SStreamTask *pTask = taskIterGetCurrent(pIter); + SStreamTaskIter *pIter = createStreamTaskIter(pStream); + while (streamTaskIterNextTask(pIter)) { + SStreamTask *pTask = streamTaskIterGetCurrent(pIter); int32_t code = setTaskAttrInResBlock(pStream, pTask, pBlock, numOfRows); if (code == TSDB_CODE_SUCCESS) { @@ -1516,7 +1516,7 @@ static int32_t mndRetrieveStreamTask(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock } } - destroyTaskIter(pIter); + destroyStreamTaskIter(pIter); taosRUnLockLatch(&pStream->lock); sdbRelease(pSdb, pStream); @@ -1859,16 +1859,16 @@ static SArray *extractNodeListFromStream(SMnode *pMnode) { taosWLockLatch(&pStream->lock); - SStreamTaskIter *pTaskIter = createTaskIter(pStream); - while (taskIterNextTask(pTaskIter)) { - SStreamTask *pTask = taskIterGetCurrent(pTaskIter); + SStreamTaskIter *pTaskIter = createStreamTaskIter(pStream); + while (streamTaskIterNextTask(pTaskIter)) { + SStreamTask *pTask = streamTaskIterGetCurrent(pTaskIter); SNodeEntry entry = {.hbTimestamp = -1, .nodeId = pTask->info.nodeId}; epsetAssign(&entry.epset, &pTask->info.epSet); taosHashPut(pHash, &entry.nodeId, sizeof(entry.nodeId), &entry, sizeof(entry)); } - destroyTaskIter(pTaskIter); + destroyStreamTaskIter(pTaskIter); taosWUnLockLatch(&pStream->lock); sdbRelease(pSdb, pStream); @@ -2056,9 +2056,9 @@ static int32_t mndProcessNodeCheck(SRpcMsg *pReq) { } void saveStreamTasksInfo(SStreamObj *pStream, SStreamExecInfo *pExecNode) { - SStreamTaskIter *pIter = createTaskIter(pStream); - while (taskIterNextTask(pIter)) { - SStreamTask *pTask = taskIterGetCurrent(pIter); + SStreamTaskIter *pIter = createStreamTaskIter(pStream); + while (streamTaskIterNextTask(pIter)) { + SStreamTask *pTask = streamTaskIterGetCurrent(pIter); STaskId id = {.streamId = pTask->id.streamId, .taskId = pTask->id.taskId}; void *p = taosHashGet(pExecNode->pTaskMap, &id, sizeof(id)); @@ -2073,13 +2073,13 @@ void saveStreamTasksInfo(SStreamObj *pStream, SStreamExecInfo *pExecNode) { } } - destroyTaskIter(pIter); + destroyStreamTaskIter(pIter); } void removeStreamTasksInBuf(SStreamObj *pStream, SStreamExecInfo *pExecNode) { - SStreamTaskIter *pIter = createTaskIter(pStream); - while (taskIterNextTask(pIter)) { - SStreamTask *pTask = taskIterGetCurrent(pIter); + SStreamTaskIter *pIter = createStreamTaskIter(pStream); + while (streamTaskIterNextTask(pIter)) { + SStreamTask *pTask = streamTaskIterGetCurrent(pIter); STaskId id = {.streamId = pTask->id.streamId, .taskId = pTask->id.taskId}; void *p = taosHashGet(pExecNode->pTaskMap, &id, sizeof(id)); @@ -2099,7 +2099,7 @@ void removeStreamTasksInBuf(SStreamObj *pStream, SStreamExecInfo *pExecNode) { } } - destroyTaskIter(pIter); + destroyStreamTaskIter(pIter); ASSERT(taosHashGetSize(pExecNode->pTaskMap) == taosArrayGetSize(pExecNode->pTaskList)); } diff --git a/source/dnode/mnode/impl/src/mndStreamTrans.c b/source/dnode/mnode/impl/src/mndStreamTrans.c index f8497e14f79..5bfd3933b50 100644 --- a/source/dnode/mnode/impl/src/mndStreamTrans.c +++ b/source/dnode/mnode/impl/src/mndStreamTrans.c @@ -23,10 +23,10 @@ typedef struct SKeyInfo { static int32_t clearFinishedTrans(SMnode* pMnode); -int32_t mndStreamRegisterTrans(STrans* pTrans, const char* pTransName, int64_t streamUid) { +int32_t mndStreamRegisterTrans(STrans* pTrans, const char* pTransName, int64_t streamId) { SStreamTransInfo info = { - .transId = pTrans->id, .startTime = taosGetTimestampMs(), .name = pTransName, .streamUid = streamUid}; - taosHashPut(execInfo.transMgmt.pDBTrans, &streamUid, sizeof(streamUid), &info, sizeof(SStreamTransInfo)); + .transId = pTrans->id, .startTime = taosGetTimestampMs(), .name = pTransName, .streamId = streamId}; + taosHashPut(execInfo.transMgmt.pDBTrans, &streamId, sizeof(streamId), &info, sizeof(SStreamTransInfo)); return 0; } @@ -65,7 +65,7 @@ int32_t clearFinishedTrans(SMnode* pMnode) { return 0; } -bool mndStreamTransConflictCheck(SMnode* pMnode, int64_t streamUid, const char* pTransName, bool lock) { +bool mndStreamTransConflictCheck(SMnode* pMnode, int64_t streamId, const char* pTransName, bool lock) { if (lock) { taosThreadMutexLock(&execInfo.lock); } @@ -80,7 +80,7 @@ bool mndStreamTransConflictCheck(SMnode* pMnode, int64_t streamUid, const char* clearFinishedTrans(pMnode); - SStreamTransInfo *pEntry = taosHashGet(execInfo.transMgmt.pDBTrans, &streamUid, sizeof(streamUid)); + SStreamTransInfo *pEntry = taosHashGet(execInfo.transMgmt.pDBTrans, &streamId, sizeof(streamId)); if (pEntry != NULL) { SStreamTransInfo tInfo = *pEntry; @@ -90,7 +90,7 @@ bool mndStreamTransConflictCheck(SMnode* pMnode, int64_t streamUid, const char* if (strcmp(tInfo.name, MND_STREAM_CHECKPOINT_NAME) == 0) { if ((strcmp(pTransName, MND_STREAM_DROP_NAME) != 0) && (strcmp(pTransName, MND_STREAM_TASK_RESET_NAME) != 0)) { - mWarn("conflict with other transId:%d streamUid:0x%" PRIx64 ", trans:%s", tInfo.transId, tInfo.streamUid, + mWarn("conflict with other transId:%d streamUid:0x%" PRIx64 ", trans:%s", tInfo.transId, tInfo.streamId, tInfo.name); terrno = TSDB_CODE_MND_TRANS_CONFLICT; return true; @@ -99,13 +99,13 @@ bool mndStreamTransConflictCheck(SMnode* pMnode, int64_t streamUid, const char* } } else if ((strcmp(tInfo.name, MND_STREAM_CREATE_NAME) == 0) || (strcmp(tInfo.name, MND_STREAM_DROP_NAME) == 0) || (strcmp(tInfo.name, MND_STREAM_TASK_RESET_NAME) == 0)) { - mWarn("conflict with other transId:%d streamUid:0x%" PRIx64 ", trans:%s", tInfo.transId, tInfo.streamUid, + mWarn("conflict with other transId:%d streamUid:0x%" PRIx64 ", trans:%s", tInfo.transId, tInfo.streamId, tInfo.name); terrno = TSDB_CODE_MND_TRANS_CONFLICT; return true; } } else { - mDebug("stream:0x%"PRIx64" no conflict trans existed, continue create trans", streamUid); + mDebug("stream:0x%"PRIx64" no conflict trans existed, continue create trans", streamId); } if (lock) { diff --git a/source/dnode/mnode/impl/src/mndStreamUtil.c b/source/dnode/mnode/impl/src/mndStreamUtil.c index c28ba43f656..235c604b27f 100644 --- a/source/dnode/mnode/impl/src/mndStreamUtil.c +++ b/source/dnode/mnode/impl/src/mndStreamUtil.c @@ -26,7 +26,7 @@ struct SStreamTaskIter { SStreamTask *pTask; }; -SStreamTaskIter* createTaskIter(SStreamObj* pStream) { +SStreamTaskIter* createStreamTaskIter(SStreamObj* pStream) { SStreamTaskIter* pIter = taosMemoryCalloc(1, sizeof(SStreamTaskIter)); if (pIter == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; @@ -42,7 +42,7 @@ SStreamTaskIter* createTaskIter(SStreamObj* pStream) { return pIter; } -bool taskIterNextTask(SStreamTaskIter* pIter) { +bool streamTaskIterNextTask(SStreamTaskIter* pIter) { if (pIter->level >= pIter->totalLevel) { pIter->pTask = NULL; return false; @@ -70,11 +70,11 @@ bool taskIterNextTask(SStreamTaskIter* pIter) { return false; } -SStreamTask* taskIterGetCurrent(SStreamTaskIter* pIter) { +SStreamTask* streamTaskIterGetCurrent(SStreamTaskIter* pIter) { return pIter->pTask; } -void destroyTaskIter(SStreamTaskIter* pIter) { +void destroyStreamTaskIter(SStreamTaskIter* pIter) { taosMemoryFree(pIter); } @@ -235,16 +235,16 @@ static int32_t doSetResumeAction(STrans *pTrans, SMnode *pMnode, SStreamTask *pT } SStreamTask *mndGetStreamTask(STaskId *pId, SStreamObj *pStream) { - SStreamTaskIter *pIter = createTaskIter(pStream); - while (taskIterNextTask(pIter)) { - SStreamTask *pTask = taskIterGetCurrent(pIter); + SStreamTaskIter *pIter = createStreamTaskIter(pStream); + while (streamTaskIterNextTask(pIter)) { + SStreamTask *pTask = streamTaskIterGetCurrent(pIter); if (pTask->id.taskId == pId->taskId) { - destroyTaskIter(pIter); + destroyStreamTaskIter(pIter); return pTask; } } - destroyTaskIter(pIter); + destroyStreamTaskIter(pIter); return NULL; } @@ -259,12 +259,12 @@ int32_t mndGetNumOfStreamTasks(const SStreamObj *pStream) { } int32_t mndStreamSetResumeAction(STrans *pTrans, SMnode *pMnode, SStreamObj *pStream, int8_t igUntreated) { - SStreamTaskIter *pIter = createTaskIter(pStream); + SStreamTaskIter *pIter = createStreamTaskIter(pStream); - while (taskIterNextTask(pIter)) { - SStreamTask *pTask = taskIterGetCurrent(pIter); + while (streamTaskIterNextTask(pIter)) { + SStreamTask *pTask = streamTaskIterGetCurrent(pIter); if (doSetResumeAction(pTrans, pMnode, pTask, igUntreated) < 0) { - destroyTaskIter(pIter); + destroyStreamTaskIter(pIter); return -1; } @@ -272,7 +272,7 @@ int32_t mndStreamSetResumeAction(STrans *pTrans, SMnode *pMnode, SStreamObj *pSt atomic_store_8(&pTask->status.taskStatus, pTask->status.statusBackup); } } - destroyTaskIter(pIter); + destroyStreamTaskIter(pIter); return 0; } @@ -308,12 +308,12 @@ static int32_t doSetPauseAction(SMnode *pMnode, STrans *pTrans, SStreamTask *pTa } int32_t mndStreamSetPauseAction(SMnode *pMnode, STrans *pTrans, SStreamObj *pStream) { - SStreamTaskIter *pIter = createTaskIter(pStream); + SStreamTaskIter *pIter = createStreamTaskIter(pStream); - while (taskIterNextTask(pIter)) { - SStreamTask *pTask = taskIterGetCurrent(pIter); + while (streamTaskIterNextTask(pIter)) { + SStreamTask *pTask = streamTaskIterGetCurrent(pIter); if (doSetPauseAction(pMnode, pTrans, pTask) < 0) { - destroyTaskIter(pIter); + destroyStreamTaskIter(pIter); return -1; } @@ -323,7 +323,7 @@ int32_t mndStreamSetPauseAction(SMnode *pMnode, STrans *pTrans, SStreamObj *pStr } } - destroyTaskIter(pIter); + destroyStreamTaskIter(pIter); return 0; } @@ -357,16 +357,16 @@ static int32_t doSetDropAction(SMnode *pMnode, STrans *pTrans, SStreamTask *pTas } int32_t mndStreamSetDropAction(SMnode *pMnode, STrans *pTrans, SStreamObj *pStream) { - SStreamTaskIter *pIter = createTaskIter(pStream); + SStreamTaskIter *pIter = createStreamTaskIter(pStream); - while(taskIterNextTask(pIter)) { - SStreamTask *pTask = taskIterGetCurrent(pIter); + while(streamTaskIterNextTask(pIter)) { + SStreamTask *pTask = streamTaskIterGetCurrent(pIter); if (doSetDropAction(pMnode, pTrans, pTask) < 0) { - destroyTaskIter(pIter); + destroyStreamTaskIter(pIter); return -1; } } - destroyTaskIter(pIter); + destroyStreamTaskIter(pIter); return 0; } @@ -480,18 +480,18 @@ int32_t mndStreamSetUpdateEpsetAction(SStreamObj *pStream, SVgroupChangeInfo *pI mDebug("stream:0x%" PRIx64 " set tasks epset update action", pStream->uid); taosWLockLatch(&pStream->lock); - SStreamTaskIter *pIter = createTaskIter(pStream); - while (taskIterNextTask(pIter)) { - SStreamTask *pTask = taskIterGetCurrent(pIter); + SStreamTaskIter *pIter = createStreamTaskIter(pStream); + while (streamTaskIterNextTask(pIter)) { + SStreamTask *pTask = streamTaskIterGetCurrent(pIter); int32_t code = doSetUpdateTaskAction(pTrans, pTask, pInfo); if (code != TSDB_CODE_SUCCESS) { - destroyTaskIter(pIter); + destroyStreamTaskIter(pIter); taosWUnLockLatch(&pStream->lock); return -1; } } - destroyTaskIter(pIter); + destroyStreamTaskIter(pIter); taosWUnLockLatch(&pStream->lock); return 0; } @@ -528,18 +528,18 @@ static int32_t doSetResetAction(SMnode *pMnode, STrans *pTrans, SStreamTask *pTa int32_t mndStreamSetResetTaskAction(SMnode *pMnode, STrans *pTrans, SStreamObj *pStream) { taosWLockLatch(&pStream->lock); - SStreamTaskIter *pIter = createTaskIter(pStream); - while (taskIterNextTask(pIter)) { - SStreamTask *pTask = taskIterGetCurrent(pIter); + SStreamTaskIter *pIter = createStreamTaskIter(pStream); + while (streamTaskIterNextTask(pIter)) { + SStreamTask *pTask = streamTaskIterGetCurrent(pIter); int32_t code = doSetResetAction(pMnode, pTrans, pTask); if (code != TSDB_CODE_SUCCESS) { - destroyTaskIter(pIter); + destroyStreamTaskIter(pIter); taosWUnLockLatch(&pStream->lock); return -1; } } - destroyTaskIter(pIter); + destroyStreamTaskIter(pIter); taosWUnLockLatch(&pStream->lock); return 0; } From d66d5335bb791860bcec0e69dd6a55c51673937d Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Tue, 30 Jan 2024 09:38:14 +0800 Subject: [PATCH 47/93] fix:python error --- tests/system-test/0-others/subscribe_stream_privilege.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/system-test/0-others/subscribe_stream_privilege.py b/tests/system-test/0-others/subscribe_stream_privilege.py index d85d87dc3a9..b477af9f574 100644 --- a/tests/system-test/0-others/subscribe_stream_privilege.py +++ b/tests/system-test/0-others/subscribe_stream_privilege.py @@ -129,10 +129,10 @@ class TDTestCase: if not exceptOccured: tdLog.exit(f"has no privilege, should except") - checkUserPrivileges(1) + self.checkUserPrivileges(1) tdLog.debug("test subscribe topic privilege granted by other user") tdSql.execute(f'grant subscribe on {self.topic_name} to {self.user_name}') - checkUserPrivileges(2) + self.checkUserPrivileges(2) exceptOccured = False try: @@ -159,7 +159,7 @@ class TDTestCase: tdLog.debug("test subscribe topic privilege revoked by other user") tdSql.execute(f'revoke subscribe on {self.topic_name} from {self.user_name}') - checkUserPrivileges(1) + self.checkUserPrivileges(1) time.sleep(5) finally: From 49700404593568ede97c1b11bbe899bd327a3dcc Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 30 Jan 2024 15:22:49 +0800 Subject: [PATCH 48/93] refactor: do some internal refactor. --- include/libs/stream/tstream.h | 9 +++++---- source/dnode/vnode/src/tq/tq.c | 4 ++-- source/libs/executor/src/executor.c | 2 +- source/libs/stream/src/streamExec.c | 10 ++++++++-- source/libs/stream/src/streamMeta.c | 2 +- source/libs/stream/src/streamStart.c | 2 -- source/libs/stream/src/streamState.c | 1 - 7 files changed, 17 insertions(+), 13 deletions(-) diff --git a/include/libs/stream/tstream.h b/include/libs/stream/tstream.h index 9b3ce36bdd6..747ba34c971 100644 --- a/include/libs/stream/tstream.h +++ b/include/libs/stream/tstream.h @@ -324,12 +324,13 @@ typedef struct SStreamStatus { int8_t taskStatus; int8_t downstreamReady; // downstream tasks are all ready now, if this flag is set int8_t schedStatus; - int32_t schedIdleTime; // idle time before invoke again - int64_t lastExecTs; // last exec time stamp int8_t statusBackup; - bool appendTranstateBlock; // has append the transfer state data block already - int32_t timerActive; // timer is active + int32_t schedIdleTime; // idle time before invoke again + int32_t timerActive; // timer is active + int64_t lastExecTs; // last exec time stamp int32_t inScanHistorySentinel; + bool appendTranstateBlock; // has append the transfer state data block already + bool supplementaryWalscan; // complete the supplementary wal scan or not } SStreamStatus; typedef struct SDataRange { diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index a689932754d..1ade1c8c414 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -835,8 +835,8 @@ int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask, int64_t nextProcessVer) { SCheckpointInfo* pChkInfo = &pTask->chkInfo; // checkpoint ver is the kept version, handled data should be the next version. - if (pTask->chkInfo.checkpointId != 0) { - pTask->chkInfo.nextProcessVer = pTask->chkInfo.checkpointVer + 1; + if (pChkInfo->checkpointId != 0) { + pChkInfo->nextProcessVer = pChkInfo->checkpointVer + 1; tqInfo("s-task:%s restore from the checkpointId:%" PRId64 " ver:%" PRId64 " currentVer:%" PRId64, pTask->id.idStr, pChkInfo->checkpointId, pChkInfo->checkpointVer, pChkInfo->nextProcessVer); } diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c index e1a8e8ea01d..9645fc1b7a7 100644 --- a/source/libs/executor/src/executor.c +++ b/source/libs/executor/src/executor.c @@ -1080,7 +1080,7 @@ bool qStreamScanhistoryFinished(qTaskInfo_t tinfo) { int32_t qStreamInfoResetTimewindowFilter(qTaskInfo_t tinfo) { SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo; - STimeWindow* pWindow = &pTaskInfo->streamInfo.fillHistoryWindow; + STimeWindow* pWindow = &pTaskInfo->streamInfo.fillHistoryWindow; qDebug("%s remove timeWindow filter:%" PRId64 "-%" PRId64 ", set new window:%" PRId64 "-%" PRId64, GET_TASKID(pTaskInfo), pWindow->skey, pWindow->ekey, INT64_MIN, INT64_MAX); diff --git a/source/libs/stream/src/streamExec.c b/source/libs/stream/src/streamExec.c index 27748c84a0a..0c56679c14b 100644 --- a/source/libs/stream/src/streamExec.c +++ b/source/libs/stream/src/streamExec.c @@ -390,6 +390,8 @@ int32_t streamDoTransferStateToStreamTask(SStreamTask* pTask) { pTimeWindow->skey = INT64_MIN; qStreamInfoResetTimewindowFilter(pStreamTask->exec.pExecutor); + stDebug("s-task:%s after exceed the threshold:%" PRId64 " and then update the window filter", + pStreamTask->id.idStr, pStreamTask->dataRange.range.maxVer); } else { stDebug("s-task:%s no need to update/reset filter time window for non-source tasks", pStreamTask->id.idStr); } @@ -398,9 +400,11 @@ int32_t streamDoTransferStateToStreamTask(SStreamTask* pTask) { streamTaskReleaseState(pTask); streamTaskReloadState(pStreamTask); + // 3. scan wal file from the beginning till the end version of fill-history task. + streamTaskSupplementaryScan(pStreamTask); + // 3. send msg to mnode to launch a checkpoint to keep the state for current stream - streamTaskSendCheckpointReq(pStreamTask); -// streamTaskResume(pStreamTask); +// streamTaskSendCheckpointReq(pStreamTask); // 4. assign the status to the value that will be kept in disk pStreamTask->status.taskStatus = streamTaskGetStatus(pStreamTask)->state; @@ -777,6 +781,8 @@ int32_t streamResumeTask(SStreamTask* pTask) { while (1) { /*int32_t code = */ doStreamExecTask(pTask); + + // check if continue taosThreadMutexLock(&pTask->lock); int32_t numOfItems = streamQueueGetNumOfItems(pTask->inputq.queue); diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index 8ad20f357cd..5e53a921b9f 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -1322,7 +1322,7 @@ void streamMetaRUnLock(SStreamMeta* pMeta) { if (code != TSDB_CODE_SUCCESS) { stError("vgId:%d meta-runlock failed, code:%d", pMeta->vgId, code); } else { - stDebug("vgId:%d meta-runlock completed", pMeta->vgId); +// stTrace("vgId:%d meta-runlock completed", pMeta->vgId); } } diff --git a/source/libs/stream/src/streamStart.c b/source/libs/stream/src/streamStart.c index 20fdcff7d90..2f5bca8ed9b 100644 --- a/source/libs/stream/src/streamStart.c +++ b/source/libs/stream/src/streamStart.c @@ -385,7 +385,6 @@ int32_t streamTaskOnScanhistoryTaskReady(SStreamTask* pTask) { void doProcessDownstreamReadyRsp(SStreamTask* pTask) { EStreamTaskEvent event = (pTask->info.fillHistory == 0) ? TASK_EVENT_INIT : TASK_EVENT_INIT_SCANHIST; - streamTaskOnHandleEventSuccess(pTask->status.pSM, event); int64_t initTs = pTask->execInfo.init; @@ -989,4 +988,3 @@ void streamTaskSetRangeStreamCalc(SStreamTask* pTask) { streamSetParamForStreamScannerStep2(pTask, &verRange, &win); } } - diff --git a/source/libs/stream/src/streamState.c b/source/libs/stream/src/streamState.c index 19b73599813..84b0a777f28 100644 --- a/source/libs/stream/src/streamState.c +++ b/source/libs/stream/src/streamState.c @@ -670,7 +670,6 @@ void streamStateFreeCur(SStreamStateCur* pCur) { if (!pCur) { return; } - qDebug("streamStateFreeCur"); streamStateResetCur(pCur); taosMemoryFree(pCur); } From 1d110953c9bc091f2181b9def8b7f6018161c68f Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 30 Jan 2024 15:23:54 +0800 Subject: [PATCH 49/93] refactor: do some internal refactor. --- source/libs/stream/src/streamExec.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/libs/stream/src/streamExec.c b/source/libs/stream/src/streamExec.c index 0c56679c14b..b0170d5083b 100644 --- a/source/libs/stream/src/streamExec.c +++ b/source/libs/stream/src/streamExec.c @@ -400,11 +400,8 @@ int32_t streamDoTransferStateToStreamTask(SStreamTask* pTask) { streamTaskReleaseState(pTask); streamTaskReloadState(pStreamTask); - // 3. scan wal file from the beginning till the end version of fill-history task. - streamTaskSupplementaryScan(pStreamTask); - // 3. send msg to mnode to launch a checkpoint to keep the state for current stream -// streamTaskSendCheckpointReq(pStreamTask); + streamTaskSendCheckpointReq(pStreamTask); // 4. assign the status to the value that will be kept in disk pStreamTask->status.taskStatus = streamTaskGetStatus(pStreamTask)->state; From efbc7e14024aa09f5ffd5d52f079596393d3cb23 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 30 Jan 2024 15:35:01 +0800 Subject: [PATCH 50/93] fix(stream): fix memory leak. --- source/dnode/mnode/impl/src/mndStreamHb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/dnode/mnode/impl/src/mndStreamHb.c b/source/dnode/mnode/impl/src/mndStreamHb.c index 19c4f22280f..ff0d8b82fcd 100644 --- a/source/dnode/mnode/impl/src/mndStreamHb.c +++ b/source/dnode/mnode/impl/src/mndStreamHb.c @@ -183,6 +183,7 @@ static int32_t mndDropOrphanTasks(SMnode* pMnode, SArray* pList) { return -1; } + mndTransDrop(pTrans); return 0; } From 5d731dc9a4d039acf72baeaa1833be4742945e3d Mon Sep 17 00:00:00 2001 From: factosea <285808407@qq.com> Date: Tue, 30 Jan 2024 17:34:06 +0800 Subject: [PATCH 51/93] fix: use blank data flag --- include/common/tcommon.h | 1 + include/libs/function/function.h | 1 + source/common/src/tdatablock.c | 1 - source/libs/executor/src/executorInt.c | 2 ++ source/libs/executor/src/scanoperator.c | 3 ++- source/libs/function/src/builtinsimpl.c | 7 ++++--- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/include/common/tcommon.h b/include/common/tcommon.h index 24e5d186b94..d4537ddc89c 100644 --- a/include/common/tcommon.h +++ b/include/common/tcommon.h @@ -206,6 +206,7 @@ typedef struct SDataBlockInfo { int16_t hasVarCol; int16_t dataLoad; // denote if the data is loaded or not uint8_t scanFlag; + bool blankFill; // TODO: optimize and remove following int64_t version; // used for stream, and need serialization diff --git a/include/libs/function/function.h b/include/libs/function/function.h index 88632010945..0fa84c99c62 100644 --- a/include/libs/function/function.h +++ b/include/libs/function/function.h @@ -114,6 +114,7 @@ typedef struct SInputColumnInfoData { int32_t totalRows; // total rows in current columnar data int32_t startRowIndex; // handle started row index int64_t numOfRows; // the number of rows needs to be handled + bool blankFill; // fill blank data to block for empty table int32_t numOfInputCols; // PTS is not included bool colDataSMAIsSet; // if agg is set or not SColumnInfoData *pPTS; // primary timestamp column diff --git a/source/common/src/tdatablock.c b/source/common/src/tdatablock.c index 87390684320..53822598990 100644 --- a/source/common/src/tdatablock.c +++ b/source/common/src/tdatablock.c @@ -224,7 +224,6 @@ static int32_t doCopyNItems(struct SColumnInfoData* pColumnInfoData, int32_t cur int32_t colDataSetNItems(SColumnInfoData* pColumnInfoData, uint32_t currentRow, const char* pData, uint32_t numOfRows, bool trimValue) { - if (currentRow >= numOfRows) return TSDB_CODE_SUCCESS; int32_t len = pColumnInfoData->info.bytes; if (IS_VAR_DATA_TYPE(pColumnInfoData->info.type)) { len = varDataTLen(pData); diff --git a/source/libs/executor/src/executorInt.c b/source/libs/executor/src/executorInt.c index ff4d3d0d27e..76dc622cfd0 100644 --- a/source/libs/executor/src/executorInt.c +++ b/source/libs/executor/src/executorInt.c @@ -311,6 +311,7 @@ static int32_t doSetInputDataBlock(SExprSupp* pExprSup, SSDataBlock* pBlock, int pInput->totalRows = pBlock->info.rows; pInput->numOfRows = pBlock->info.rows; pInput->startRowIndex = 0; + pInput->blankFill = pBlock->info.blankFill; // NOTE: the last parameter is the primary timestamp column // todo: refactor this @@ -325,6 +326,7 @@ static int32_t doSetInputDataBlock(SExprSupp* pExprSup, SSDataBlock* pBlock, int pInput->totalRows = pBlock->info.rows; pInput->numOfRows = pBlock->info.rows; pInput->startRowIndex = 0; + pInput->blankFill = pBlock->info.blankFill; code = doCreateConstantValColumnInfo(pInput, pFuncParam, j, pBlock->info.rows); if (code != TSDB_CODE_SUCCESS) { diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 1b69bcce945..1299638935c 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -684,9 +684,10 @@ void markGroupProcessed(STableScanInfo* pInfo, uint64_t groupId) { static SSDataBlock* getOneRowResultBlock(SExecTaskInfo* pTaskInfo, STableScanBase* pBase, SSDataBlock* pBlock, const STableKeyInfo* tbInfo) { blockDataEmpty(pBlock); - pBlock->info.rows = 0; + pBlock->info.rows = 1; pBlock->info.id.uid = tbInfo->uid; pBlock->info.id.groupId = tbInfo->groupId; + pBlock->info.blankFill = true; // only one row: set all col data to null & hasNull int32_t col_num = blockDataGetNumOfCols(pBlock); diff --git a/source/libs/function/src/builtinsimpl.c b/source/libs/function/src/builtinsimpl.c index fc1fe293328..5ab6d5e0754 100644 --- a/source/libs/function/src/builtinsimpl.c +++ b/source/libs/function/src/builtinsimpl.c @@ -499,6 +499,9 @@ static int64_t getNumOfElems(SqlFunctionCtx* pCtx) { */ SInputColumnInfoData* pInput = &pCtx->input; SColumnInfoData* pInputCol = pInput->pData[0]; + if(1 == pInput->numOfRows && pInput->blankFill) { + return 0; + } if (pInput->colDataSMAIsSet && pInput->totalRows == pInput->numOfRows) { numOfElem = pInput->numOfRows - pInput->pColumnDataAgg[0]->numOfNull; } else { @@ -2338,8 +2341,6 @@ int32_t lastFunction(SqlFunctionCtx* pCtx) { return TSDB_CODE_SUCCESS; } - if(pInput->totalRows == 0) return TSDB_CODE_SUCCESS; - SColumnDataAgg* pColAgg = (pInput->colDataSMAIsSet) ? pInput->pColumnDataAgg[0] : NULL; TSKEY startKey = getRowPTs(pInput->pPTS, 0); @@ -2649,7 +2650,7 @@ int32_t lastRowFunction(SqlFunctionCtx* pCtx) { int32_t bytes = pInputCol->info.bytes; pInfo->bytes = bytes; - if (IS_NULL_TYPE(type) || 0 == pInput->totalRows) { + if (IS_NULL_TYPE(type)) { return TSDB_CODE_SUCCESS; } From 917a6eb5a7861e97ae4ce5d2ed8b71781a0c9a38 Mon Sep 17 00:00:00 2001 From: dmchen Date: Tue, 30 Jan 2024 09:47:20 +0000 Subject: [PATCH 52/93] fix/TD-28503 --- source/dnode/mnode/impl/src/mndCompact.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/dnode/mnode/impl/src/mndCompact.c b/source/dnode/mnode/impl/src/mndCompact.c index 101022a44f9..4e71684372c 100644 --- a/source/dnode/mnode/impl/src/mndCompact.c +++ b/source/dnode/mnode/impl/src/mndCompact.c @@ -599,7 +599,8 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { pDetail->compactId, pDetail->vgId, pDetail->dnodeId, pDetail->numberFileset, pDetail->finished, pDetail->newNumberFileset, pDetail->newFinished); - if(pDetail->numberFileset < pDetail->newNumberFileset || pDetail->finished < pDetail->newFinished) + //these 2 number will jump back after dnode restart, so < is not used here + if(pDetail->numberFileset != pDetail->newNumberFileset || pDetail->finished != pDetail->newFinished) needSave = true; } From 9c0d2e603a9e649c0a6699202d8990c844f75078 Mon Sep 17 00:00:00 2001 From: factosea <285808407@qq.com> Date: Tue, 30 Jan 2024 20:24:59 +0800 Subject: [PATCH 53/93] reset blankFill --- source/libs/executor/src/scanoperator.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 1299638935c..bbe12c345e2 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -663,6 +663,8 @@ static void initNextGroupScan(STableScanInfo* pInfo, STableKeyInfo** pKeyInfo, i pInfo->tableEndIndex = (pInfo->tableStartIndex + (*size) - 1); + pInfo->pResBlock->info.blankFill = false; + if (!pInfo->needCountEmptyTable) { pInfo->countState = TABLE_COUNT_STATE_END; } else { From 5fd10d4049fda5ada7bd9cf6c3aad0ba57deab45 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 31 Jan 2024 00:40:47 +0800 Subject: [PATCH 54/93] feat: support uniq grant --- include/util/taoserror.h | 2 +- source/dnode/mnode/impl/inc/mndDef.h | 2 +- source/dnode/mnode/impl/inc/mndGrant.h | 6 +++--- source/dnode/mnode/impl/src/mndDnode.c | 4 +--- source/util/src/terror.c | 6 +++--- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 600c47d2ccd..022333a5aae 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -573,7 +573,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_GRANT_LAST_ACTIVE_NOT_FOUND TAOS_DEF_ERROR_CODE(0, 0x0819) #define TSDB_CODE_GRANT_MACHINES_MISMATCH TAOS_DEF_ERROR_CODE(0, 0x0820) #define TSDB_CODE_GRANT_OPT_EXPIRE_TOO_LARGE TAOS_DEF_ERROR_CODE(0, 0x0821) - +#define TSDB_CODE_GRANT_DUPLICATED_ACTIVE TAOS_DEF_ERROR_CODE(0, 0x0822) // sync // #define TSDB_CODE_SYN_INVALID_CONFIG TAOS_DEF_ERROR_CODE(0, 0x0900) // 2.x diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 7c7d67a9a2e..6aa068b0798 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -836,7 +836,7 @@ typedef struct { SGrantState states[GRANT_STATE_NUM]; SGrantActive actives[GRANT_ACTIVE_NUM]; char* active; - SArray* pMachines; // SGrantMachines + SArray* pMachines; // SGrantMachine SRWLatch lock; } SGrantObj; diff --git a/source/dnode/mnode/impl/inc/mndGrant.h b/source/dnode/mnode/impl/inc/mndGrant.h index b15cdd3dc07..9ee97f69c33 100644 --- a/source/dnode/mnode/impl/inc/mndGrant.h +++ b/source/dnode/mnode/impl/inc/mndGrant.h @@ -36,11 +36,11 @@ int32_t mndGrantActionDelete(SSdb * pSdb, SGrantObj * pGrant); int32_t mndGrantActionUpdate(SSdb * pSdb, SGrantObj * pOldGrant, SGrantObj * pNewGrant); - int32_t grantAlterActiveCode(SMnode *pMnode, SGrantObj *pObj, const char *oldActive, const char *newActive, char **mergeActive); + int32_t grantAlterActiveCode(SMnode * pMnode, SGrantObj * pObj, const char *oldActive, const char *newActive, + char **mergeActive); int32_t mndProcessConfigGrantReq(SMnode * pMnode, SRpcMsg * pReq, SMCfgClusterReq * pCfg); - int32_t mndProcessUpdMachineReq(SMnode * pMnode, SRpcMsg * pReq, SArray * pMachines); - int32_t mndProcessUpdStateReq(SMnode * pMnode, SRpcMsg * pReq, SGrantState * pState); + int32_t mndProcessUpdGrantLog(SMnode * pMnode, SRpcMsg * pReq, SArray * pMachines, SGrantState * pState); int32_t mndGrantGetLastState(SMnode * pMnode, SGrantState * pState); SGrantObj *mndAcquireGrant(SMnode * pMnode, void **ppIter); diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index 2da8b7bc2ee..5ee9cd1e8fd 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -30,7 +30,7 @@ #include "tunit.h" #define TSDB_DNODE_VER_NUMBER 2 -#define TSDB_DNODE_RESERVE_SIZE 40 +#define TSDB_DNODE_RESERVE_SIZE 64 static const char *offlineReason[] = { "", @@ -176,7 +176,6 @@ static SSdbRaw *mndDnodeActionEncode(SDnodeObj *pDnode) { SDB_SET_INT64(pRaw, dataPos, pDnode->updateTime, _OVER) SDB_SET_INT16(pRaw, dataPos, pDnode->port, _OVER) SDB_SET_BINARY(pRaw, dataPos, pDnode->fqdn, TSDB_FQDN_LEN, _OVER) - SDB_SET_BINARY(pRaw, dataPos, pDnode->machineId, TSDB_MACHINE_ID_LEN, _OVER) SDB_SET_RESERVE(pRaw, dataPos, TSDB_DNODE_RESERVE_SIZE, _OVER) SDB_SET_INT16(pRaw, dataPos, TSDB_ACTIVE_KEY_LEN, _OVER) SDB_SET_BINARY(pRaw, dataPos, pDnode->active, TSDB_ACTIVE_KEY_LEN, _OVER) @@ -221,7 +220,6 @@ static SSdbRow *mndDnodeActionDecode(SSdbRaw *pRaw) { SDB_GET_INT64(pRaw, dataPos, &pDnode->updateTime, _OVER) SDB_GET_INT16(pRaw, dataPos, &pDnode->port, _OVER) SDB_GET_BINARY(pRaw, dataPos, pDnode->fqdn, TSDB_FQDN_LEN, _OVER) - SDB_GET_BINARY(pRaw, dataPos, pDnode->machineId, TSDB_MACHINE_ID_LEN, _OVER) SDB_GET_RESERVE(pRaw, dataPos, TSDB_DNODE_RESERVE_SIZE, _OVER) if (sver > 1) { int16_t keyLen = 0; diff --git a/source/util/src/terror.c b/source/util/src/terror.c index e98cc797acc..436e683fb71 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -457,10 +457,10 @@ TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_IVLD_DIST, "Invalid dist to parse TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_UNLICENSED_CLUSTER, "Illegal operation, the license is being used by an unlicensed cluster") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_LACK_OF_BASIC, "Lack of basic functions in active code") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_OBJ_NOT_EXIST, "Grant object not exist") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_LAST_ACTIVE_NOT_FOUND, "Last active not found in cluster") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_LAST_ACTIVE_NOT_FOUND, "The historial active code does not match") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_MACHINES_MISMATCH, "Cluster machines mismatch with active code") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_OPT_EXPIRE_TOO_LARGE, "Expire time of optional grant item too large") - +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_OPT_EXPIRE_TOO_LARGE, "Expire time of optional grant item is too large") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_DUPLICATED_ACTIVE, "The active code can't be activated repeatedly") // sync TAOS_DEFINE_ERROR(TSDB_CODE_SYN_TIMEOUT, "Sync timeout") From 83950025e51612093c3398d1150b57d07e8600a6 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 31 Jan 2024 08:58:17 +0800 Subject: [PATCH 55/93] fix(stream): limit the available threads for stream processing. --- source/common/src/tglobal.c | 2 +- source/util/src/tworker.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index a7d80fe5dbc..3b965553af0 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -58,7 +58,7 @@ int32_t tsNumOfMnodeQueryThreads = 4; int32_t tsNumOfMnodeFetchThreads = 1; int32_t tsNumOfMnodeReadThreads = 1; int32_t tsNumOfVnodeQueryThreads = 4; -float tsRatioOfVnodeStreamThreads = 1.0; +float tsRatioOfVnodeStreamThreads = 0.5; int32_t tsNumOfVnodeFetchThreads = 4; int32_t tsNumOfVnodeRsmaThreads = 2; int32_t tsNumOfQnodeQueryThreads = 4; diff --git a/source/util/src/tworker.c b/source/util/src/tworker.c index 57dc60e539b..28f7fd47835 100644 --- a/source/util/src/tworker.c +++ b/source/util/src/tworker.c @@ -221,7 +221,7 @@ STaosQueue *tAutoQWorkerAllocQueue(SAutoQWorkerPool *pool, void *ahandle, FItem int32_t queueNum = taosGetQueueNumber(pool->qset); int32_t curWorkerNum = taosArrayGetSize(pool->workers); int32_t dstWorkerNum = ceilf(queueNum * pool->ratio); - if (dstWorkerNum < 1) dstWorkerNum = 1; + if (dstWorkerNum < 2) dstWorkerNum = 2; // spawn a thread to process queue while (curWorkerNum < dstWorkerNum) { From 2716119c92b7b8884768aaca7c4c9f94240c8437 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 31 Jan 2024 09:00:26 +0800 Subject: [PATCH 56/93] fix(other): update the upper limit for stream threads. --- source/common/src/tglobal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 3b965553af0..53169019b6d 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -58,7 +58,7 @@ int32_t tsNumOfMnodeQueryThreads = 4; int32_t tsNumOfMnodeFetchThreads = 1; int32_t tsNumOfMnodeReadThreads = 1; int32_t tsNumOfVnodeQueryThreads = 4; -float tsRatioOfVnodeStreamThreads = 0.5; +float tsRatioOfVnodeStreamThreads = 0.5F; int32_t tsNumOfVnodeFetchThreads = 4; int32_t tsNumOfVnodeRsmaThreads = 2; int32_t tsNumOfQnodeQueryThreads = 4; @@ -622,7 +622,7 @@ static int32_t taosAddServerCfg(SConfig *pCfg) { 0) return -1; - if (cfgAddFloat(pCfg, "ratioOfVnodeStreamThreads", tsRatioOfVnodeStreamThreads, 0.01, 10, CFG_SCOPE_SERVER, + if (cfgAddFloat(pCfg, "ratioOfVnodeStreamThreads", tsRatioOfVnodeStreamThreads, 0.01, 4, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1; From 93c0890f6834921ce9ebf096004781abcc8fd0b2 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 31 Jan 2024 09:13:10 +0800 Subject: [PATCH 57/93] feat: support uniq grant --- include/common/tgrant.h | 1 - include/util/tdef.h | 1 - source/common/src/systable.c | 2 +- source/dnode/mgmt/mgmt_dnode/src/dmHandle.c | 3 +-- source/dnode/mgmt/node_mgmt/src/dmTransport.c | 3 ++- source/dnode/mnode/impl/inc/mndDef.h | 5 ----- source/dnode/mnode/impl/inc/mndInt.h | 5 ----- source/dnode/mnode/impl/src/mndDnode.c | 7 ++++--- source/dnode/mnode/impl/src/mndMnode.c | 6 ------ 9 files changed, 8 insertions(+), 25 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index a9de71ef5cf..ffa5112c244 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -30,7 +30,6 @@ extern "C" { #define GRANT_HEART_BEAT_MIN 2 #define GRANT_ACTIVE_CODE "activeCode" -#define GRANT_C_ACTIVE_CODE "cActiveCode" typedef enum { TSDB_GRANT_ALL, diff --git a/include/util/tdef.h b/include/util/tdef.h index 1543b3716ac..4698d50e67b 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -290,7 +290,6 @@ typedef enum ELogicConditionType { #define TSDB_ACTIVE_KEY_LEN 109 #define TSDB_CONN_ACTIVE_KEY_LEN 255 -#define TSDB_UNIQ_ACTIVE_KEY_LEN 249 #define TSDB_DEFAULT_PKT_SIZE 65480 // same as RPC_MAX_UDP_SIZE #define TSDB_SNAP_DATA_PAYLOAD_SIZE (1 * 1024 * 1024) diff --git a/source/common/src/systable.c b/source/common/src/systable.c index 652f15e374c..5eb570d3dec 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -352,7 +352,7 @@ static const SSysDbTableSchema useGrantsFullSchema[] = { {.name = "grant_name", .bytes = 32 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "display_name", .bytes = 256 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "expire", .bytes = 32 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, - {.name = "limit", .bytes = 512 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, + {.name = "limits", .bytes = 512 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, }; static const SSysDbTableSchema useGrantsLogSchema[] = { diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c index 2ec9c51cc1e..cc4508f3c92 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c @@ -435,8 +435,7 @@ SArray *dmGetMsgHandles() { if (dmSetMgmtHandle(pArray, TDMT_DND_CONFIG_DNODE, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_DND_SERVER_STATUS, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_DND_SYSTABLE_RETRIEVE, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER; - if (dmSetMgmtHandle(pArray, TDMT_DND_ALTER_MNODE_TYPE, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER; - + if (dmSetMgmtHandle(pArray, TDMT_DND_ALTER_MNODE_TYPE, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER; // Requests handled by MNODE if (dmSetMgmtHandle(pArray, TDMT_MND_GRANT, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER; diff --git a/source/dnode/mgmt/node_mgmt/src/dmTransport.c b/source/dnode/mgmt/node_mgmt/src/dmTransport.c index adda041c1ee..1a31f08801b 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmTransport.c +++ b/source/dnode/mgmt/node_mgmt/src/dmTransport.c @@ -290,7 +290,8 @@ static inline int32_t dmSendReq(const SEpSet *pEpSet, SRpcMsg *pMsg) { dError("failed to send rpc msg:%s since %s, handle:%p", TMSG_INFO(pMsg->msgType), terrstr(), pMsg->info.handle); return -1; } else { - return rpcSendRequest(pDnode->trans.clientRpc, pEpSet, pMsg, NULL); + rpcSendRequest(pDnode->trans.clientRpc, pEpSet, pMsg, NULL); + return 0; } } static inline int32_t dmSendSyncReq(const SEpSet *pEpSet, SRpcMsg *pMsg) { diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 8360be1659a..ec0483b0d45 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -187,17 +187,12 @@ typedef struct { TdThreadMutex mutex; } STrans; -typedef struct { - char id[TSDB_MACHINE_ID_LEN + 1]; -} SMachineId; - typedef struct { int64_t id; char name[TSDB_CLUSTER_ID_LEN]; int64_t createdTime; int64_t updateTime; int32_t upTime; - char active[TSDB_UNIQ_ACTIVE_KEY_LEN]; } SClusterObj; typedef struct { diff --git a/source/dnode/mnode/impl/inc/mndInt.h b/source/dnode/mnode/impl/inc/mndInt.h index a6c4fbd762b..72f9ec17358 100644 --- a/source/dnode/mnode/impl/inc/mndInt.h +++ b/source/dnode/mnode/impl/inc/mndInt.h @@ -25,7 +25,6 @@ #include "tglobal.h" #include "tgrant.h" #include "tqueue.h" -#include "tref.h" #include "ttime.h" #include "version.h" #include "wal.h" @@ -134,10 +133,6 @@ typedef struct SMnode { int64_t ipWhiteVer; } SMnode; -typedef struct { - RefFp freeFp; -} SMnodeRefInfo; - void mndSetMsgHandle(SMnode *pMnode, tmsg_t msgType, MndMsgFp fp); int64_t mndGenerateUid(const char *name, int32_t len); diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index 5ee9cd1e8fd..43cc9ca9955 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -742,9 +742,9 @@ _OVER: } static int32_t mndCreateDnode(SMnode *pMnode, SRpcMsg *pReq, SCreateDnodeReq *pCreate) { - int32_t code = -1; - SSdbRaw *pRaw = NULL; - STrans *pTrans = NULL; + int32_t code = -1; + SSdbRaw *pRaw = NULL; + STrans *pTrans = NULL; SDnodeObj dnodeObj = {0}; dnodeObj.id = sdbGetMaxId(pMnode->pSdb, SDB_DNODE); @@ -753,6 +753,7 @@ static int32_t mndCreateDnode(SMnode *pMnode, SRpcMsg *pReq, SCreateDnodeReq *pC dnodeObj.port = pCreate->port; tstrncpy(dnodeObj.fqdn, pCreate->fqdn, TSDB_FQDN_LEN); snprintf(dnodeObj.ep, TSDB_EP_LEN - 1, "%s:%u", pCreate->fqdn, pCreate->port); + pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_GLOBAL, pReq, "create-dnode"); if (pTrans == NULL) goto _OVER; mInfo("trans:%d, used to create dnode:%s", pTrans->id, dnodeObj.ep); diff --git a/source/dnode/mnode/impl/src/mndMnode.c b/source/dnode/mnode/impl/src/mndMnode.c index 9c92e545c0d..af6ae8c5a02 100644 --- a/source/dnode/mnode/impl/src/mndMnode.c +++ b/source/dnode/mnode/impl/src/mndMnode.c @@ -872,12 +872,6 @@ static int32_t mndRetrieveMnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); colDataSetVal(pColInfo, numOfRows, (const char *)&roleTimeMs, false); - // char machineId[25] = "JGQ8Y+huRyiz4lHnR9gHngYx"; - // char machieIdVar[26] = {0}; - // STR_WITH_MAXSIZE_TO_VARSTR(machieIdVar, (const char*)&machineId, pShow->pMeta->pSchemas[cols].bytes); - // pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); - // colDataSetVal(pColInfo, numOfRows, (const char *)&machineId, false); - numOfRows++; sdbRelease(pSdb, pObj); } From a11410378ff065540878f0c33f0ec28fb9c1f0f1 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 31 Jan 2024 09:47:10 +0800 Subject: [PATCH 58/93] feat: support uniq grant --- source/dnode/mnode/impl/inc/mndDef.h | 4 ++-- source/dnode/mnode/impl/inc/mndGrant.h | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index ec0483b0d45..c5ac124eb5b 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -756,7 +756,7 @@ typedef struct { SArray* compactDetail; } SCompactObj; -// SGrantObj +// SGrantLogObj typedef enum { GRANT_STATE_INIT = 0, GRANT_STATE_UNGRANTED = 1, @@ -826,7 +826,7 @@ typedef struct { char* active; SArray* pMachines; // SGrantMachine SRWLatch lock; -} SGrantObj; +} SGrantLogObj; #ifdef __cplusplus } diff --git a/source/dnode/mnode/impl/inc/mndGrant.h b/source/dnode/mnode/impl/inc/mndGrant.h index 9ee97f69c33..a85d1f744cc 100644 --- a/source/dnode/mnode/impl/inc/mndGrant.h +++ b/source/dnode/mnode/impl/inc/mndGrant.h @@ -30,21 +30,21 @@ void grantRestore(EGrantType grant, uint64_t value); #ifdef TD_ENTERPRISE - SSdbRaw *mndGrantActionEncode(SGrantObj * pGrant); + SSdbRaw *mndGrantActionEncode(SGrantLogObj * pGrant); SSdbRow *mndGrantActionDecode(SSdbRaw * pRaw); - int32_t mndGrantActionInsert(SSdb * pSdb, SGrantObj * pGrant); - int32_t mndGrantActionDelete(SSdb * pSdb, SGrantObj * pGrant); - int32_t mndGrantActionUpdate(SSdb * pSdb, SGrantObj * pOldGrant, SGrantObj * pNewGrant); + int32_t mndGrantActionInsert(SSdb * pSdb, SGrantLogObj * pGrant); + int32_t mndGrantActionDelete(SSdb * pSdb, SGrantLogObj * pGrant); + int32_t mndGrantActionUpdate(SSdb * pSdb, SGrantLogObj * pOldGrant, SGrantLogObj * pNewGrant); - int32_t grantAlterActiveCode(SMnode * pMnode, SGrantObj * pObj, const char *oldActive, const char *newActive, + int32_t grantAlterActiveCode(SMnode * pMnode, SGrantLogObj * pObj, const char *oldActive, const char *newActive, char **mergeActive); int32_t mndProcessConfigGrantReq(SMnode * pMnode, SRpcMsg * pReq, SMCfgClusterReq * pCfg); int32_t mndProcessUpdGrantLog(SMnode * pMnode, SRpcMsg * pReq, SArray * pMachines, SGrantState * pState); - int32_t mndGrantGetLastState(SMnode * pMnode, SGrantState * pState); - SGrantObj *mndAcquireGrant(SMnode * pMnode, void **ppIter); - void mndReleaseGrant(SMnode * pMnode, SGrantObj * pGrant, void *pIter); + int32_t mndGrantGetLastState(SMnode * pMnode, SGrantState * pState); + SGrantLogObj *mndAcquireGrant(SMnode * pMnode, void **ppIter); + void mndReleaseGrant(SMnode * pMnode, SGrantLogObj * pGrant, void *pIter); #endif #ifdef __cplusplus From 18ece50f86f75f49288692bac791f42e0f5280fe Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 31 Jan 2024 10:02:44 +0800 Subject: [PATCH 59/93] feat: support uniq grant --- source/dnode/mnode/impl/inc/mndDef.h | 1 + source/dnode/mnode/impl/src/mndGrant.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index c5ac124eb5b..fb768ebd724 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -821,6 +821,7 @@ typedef struct { int8_t nActives; int64_t createTime; int64_t updateTime; + int64_t upgradeTime; SGrantState states[GRANT_STATE_NUM]; SGrantActive actives[GRANT_ACTIVE_NUM]; char* active; diff --git a/source/dnode/mnode/impl/src/mndGrant.c b/source/dnode/mnode/impl/src/mndGrant.c index 1b87170fa89..07a3618b8c7 100644 --- a/source/dnode/mnode/impl/src/mndGrant.c +++ b/source/dnode/mnode/impl/src/mndGrant.c @@ -75,7 +75,7 @@ void grantParseParameter() { mError("can't parsed parameter k"); } void grantReset(SMnode *pMnode, EGrantType grant, uint64_t value) {} void grantAdd(EGrantType grant, uint64_t value) {} void grantRestore(EGrantType grant, uint64_t value) {} -char *tGetMachineId(){return NULL}; +char *tGetMachineId() { return NULL; }; int32_t dmProcessGrantReq(void *pInfo, SRpcMsg *pMsg) { return TSDB_CODE_SUCCESS; } int32_t dmProcessGrantNotify(void *pInfo, SRpcMsg *pMsg) { return TSDB_CODE_SUCCESS; } From f50867831bc777584acfa011b23a1e54266e9041 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 31 Jan 2024 10:43:31 +0800 Subject: [PATCH 60/93] feat: support uniq grant --- include/common/tgrant.h | 3 +++ source/dnode/mnode/impl/inc/mndGrant.h | 4 +++- source/dnode/mnode/impl/src/mndGrant.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index ffa5112c244..314f295dcde 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -58,6 +58,9 @@ typedef enum { int32_t grantCheck(EGrantType grant); char* tGetMachineId(); +#ifndef TD_UNIQ_GRANT +int32_t grantAlterActiveCode(int32_t did, const char* old, const char* newer, char* out, int8_t type); +#endif #ifndef GRANTS_CFG #ifdef TD_ENTERPRISE diff --git a/source/dnode/mnode/impl/inc/mndGrant.h b/source/dnode/mnode/impl/inc/mndGrant.h index a85d1f744cc..82b3260860e 100644 --- a/source/dnode/mnode/impl/inc/mndGrant.h +++ b/source/dnode/mnode/impl/inc/mndGrant.h @@ -23,7 +23,7 @@ #include "mndInt.h" int32_t mndInitGrant(SMnode * pMnode); - void mndCleanupGrant(SMnode * pMnode); + void mndCleanupGrant(); void grantParseParameter(); void grantReset(SMnode * pMnode, EGrantType grant, uint64_t value); void grantAdd(EGrantType grant, uint64_t value); @@ -36,8 +36,10 @@ int32_t mndGrantActionDelete(SSdb * pSdb, SGrantLogObj * pGrant); int32_t mndGrantActionUpdate(SSdb * pSdb, SGrantLogObj * pOldGrant, SGrantLogObj * pNewGrant); +#ifdef TD_UNIQ_GRANT int32_t grantAlterActiveCode(SMnode * pMnode, SGrantLogObj * pObj, const char *oldActive, const char *newActive, char **mergeActive); +#endif int32_t mndProcessConfigGrantReq(SMnode * pMnode, SRpcMsg * pReq, SMCfgClusterReq * pCfg); int32_t mndProcessUpdGrantLog(SMnode * pMnode, SRpcMsg * pReq, SArray * pMachines, SGrantState * pState); diff --git a/source/dnode/mnode/impl/src/mndGrant.c b/source/dnode/mnode/impl/src/mndGrant.c index 07a3618b8c7..5e6ab09c9b6 100644 --- a/source/dnode/mnode/impl/src/mndGrant.c +++ b/source/dnode/mnode/impl/src/mndGrant.c @@ -70,7 +70,7 @@ int32_t mndInitGrant(SMnode *pMnode) { return 0; } -void mndCleanupGrant(SMnode *pMnode) {} +void mndCleanupGrant() {} void grantParseParameter() { mError("can't parsed parameter k"); } void grantReset(SMnode *pMnode, EGrantType grant, uint64_t value) {} void grantAdd(EGrantType grant, uint64_t value) {} From 5cf8687fd7cc7f68ee5554d34d1693b9d50e46b7 Mon Sep 17 00:00:00 2001 From: dmchen Date: Wed, 31 Jan 2024 04:23:28 +0000 Subject: [PATCH 61/93] fix/TD-28519 --- source/dnode/mnode/impl/src/mndTrans.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c index 9075f0145c7..1adc4ed4bf3 100644 --- a/source/dnode/mnode/impl/src/mndTrans.c +++ b/source/dnode/mnode/impl/src/mndTrans.c @@ -599,6 +599,8 @@ STrans *mndTransCreate(SMnode *pMnode, ETrnPolicy policy, ETrnConflct conflict, pTrans->originRpcType = pReq->msgType; } + mInfo("trans:%d, create transaction:%s, origin:%s", pTrans->id, pTrans->opername, opername); + mTrace("trans:%d, local object is created, data:%p", pTrans->id, pTrans); return pTrans; } @@ -845,6 +847,8 @@ int32_t mndTransCheckConflict(SMnode *pMnode, STrans *pTrans) { } int32_t mndTransPrepare(SMnode *pMnode, STrans *pTrans) { + if(pTrans == NULL) return -1; + if (mndTransCheckConflict(pMnode, pTrans) != 0) { return -1; } From ac5fa32867c3427f33564c0066fb030827ae8bb7 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 31 Jan 2024 12:36:58 +0800 Subject: [PATCH 62/93] feat: support uniq grant --- source/dnode/mnode/impl/src/mndDnode.c | 2 ++ source/dnode/mnode/impl/src/mndGrant.c | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index 43cc9ca9955..f4a712e85fe 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -141,8 +141,10 @@ static int32_t mndCreateDefaultDnode(SMnode *pMnode) { memcpy(dnodeObj.machineId, machineId, TSDB_MACHINE_ID_LEN); taosMemoryFreeClear(machineId); } else { +#ifdef TD_UNIQ_GRANT terrno = TSDB_CODE_DNODE_NO_MACHINE_CODE; goto _OVER; +#endif } pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, NULL, "create-dnode"); diff --git a/source/dnode/mnode/impl/src/mndGrant.c b/source/dnode/mnode/impl/src/mndGrant.c index 5e6ab09c9b6..48ef9d1d9b0 100644 --- a/source/dnode/mnode/impl/src/mndGrant.c +++ b/source/dnode/mnode/impl/src/mndGrant.c @@ -75,10 +75,17 @@ void grantParseParameter() { mError("can't parsed parameter k"); } void grantReset(SMnode *pMnode, EGrantType grant, uint64_t value) {} void grantAdd(EGrantType grant, uint64_t value) {} void grantRestore(EGrantType grant, uint64_t value) {} -char *tGetMachineId() { return NULL; }; +// char *tGetMachineId() { return NULL; }; int32_t dmProcessGrantReq(void *pInfo, SRpcMsg *pMsg) { return TSDB_CODE_SUCCESS; } int32_t dmProcessGrantNotify(void *pInfo, SRpcMsg *pMsg) { return TSDB_CODE_SUCCESS; } #endif void mndGenerateMachineCode() { grantParseParameter(); } + +#ifndef TD_UNIQ_GRANT +#ifdef TD_ENTERPRISE +int32_t mndProcessConfigGrantReq(SMnode *pMnode, SRpcMsg *pReq, SMCfgClusterReq *pCfg) { return 0; } +#endif +char *tGetMachineId() { return NULL; }; +#endif From 4ffc4017bd385b266751cf1e9bdac4de95b1bbe4 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 31 Jan 2024 13:02:17 +0800 Subject: [PATCH 63/93] feat: support uniq grant --- include/common/tgrant.h | 46 ++++++++++++++++++++------ source/dnode/mnode/impl/src/mndGrant.c | 2 +- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index 314f295dcde..3517f1cf64a 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -64,6 +64,7 @@ int32_t grantAlterActiveCode(int32_t did, const char* old, const char* newer, ch #ifndef GRANTS_CFG #ifdef TD_ENTERPRISE +#ifdef TD_UNIQ_GRANT #define GRANTS_SCHEMA \ static const SSysDbTableSchema grantsSchema[] = { \ {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ @@ -76,16 +77,41 @@ int32_t grantAlterActiveCode(int32_t did, const char* old, const char* newer, ch {.name = "cpu_cores", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ } #else -#define GRANTS_SCHEMA \ - static const SSysDbTableSchema grantsSchema[] = { \ - {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "streams", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "topics", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "cpu_cores", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ +#define GRANTS_SCHEMA \ + static const SSysDbTableSchema grantsSchema[] = { \ + {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "storage", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "databases", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "users", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "accounts", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "connections", .bytes = 11 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "streams", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "cpu_cores", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "speed", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "querytime", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "opc_da", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "opc_ua", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "pi", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "kafka", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "influxdb", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "mqtt", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + } +#endif +#else +#define GRANTS_SCHEMA \ + static const SSysDbTableSchema grantsSchema[] = { \ + {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "service_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "state", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "cpu_cores", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ } #endif #define GRANT_CFG_ADD diff --git a/source/dnode/mnode/impl/src/mndGrant.c b/source/dnode/mnode/impl/src/mndGrant.c index 48ef9d1d9b0..c16251316ce 100644 --- a/source/dnode/mnode/impl/src/mndGrant.c +++ b/source/dnode/mnode/impl/src/mndGrant.c @@ -40,9 +40,9 @@ static int32_t mndRetrieveGrant(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); colDataSetVal(pColInfo, numOfRows, tmp, false); - GRANT_ITEM_SHOW("unlimited"); GRANT_ITEM_SHOW("unlimited"); GRANT_ITEM_SHOW("limited"); + GRANT_ITEM_SHOW("false"); GRANT_ITEM_SHOW("ungranted"); GRANT_ITEM_SHOW("unlimited"); GRANT_ITEM_SHOW("unlimited"); From e945586ad9e060251e273ce8946ef3cf461e0c05 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 31 Jan 2024 13:44:00 +0800 Subject: [PATCH 64/93] feat: support uniq grant --- include/common/ttokendef.h | 2 +- source/libs/parser/inc/sql.y | 2 +- source/libs/parser/src/parTokenizer.c | 2 +- source/libs/parser/src/sql.c | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 52d4cf10a47..5f0538ce17d 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -176,7 +176,7 @@ #define TK_LICENCES 157 #define TK_GRANTS 158 #define TK_FULL 159 -#define TK_LOG 160 +#define TK_LOGS 160 #define TK_MACHINES 161 #define TK_QUERIES 162 #define TK_SCORES 163 diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 875fe05b11d..4256b34c39c 100755 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -488,7 +488,7 @@ cmd ::= SHOW CONNECTIONS. cmd ::= SHOW LICENCES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } cmd ::= SHOW GRANTS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } cmd ::= SHOW GRANTS FULL. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); } -cmd ::= SHOW GRANTS LOG. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOG_STMT); } +cmd ::= SHOW GRANTS LOGS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOG_STMT); } cmd ::= SHOW CLUSTER MACHINES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT); } cmd ::= SHOW CREATE DATABASE db_name(A). { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &A); } cmd ::= SHOW CREATE TABLE full_table_name(A). { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, A); } diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 7f486dfc7ba..0777835def6 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -110,7 +110,7 @@ static SKeyword keywordTable[] = { {"GRANT", TK_GRANT}, {"GRANTS", TK_GRANTS}, {"FULL", TK_FULL}, - {"LOG", TK_LOG}, + {"LOGS", TK_LOGS}, {"MACHINES", TK_MACHINES}, {"GROUP", TK_GROUP}, {"HAVING", TK_HAVING}, diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 0b0dc657b11..340e064b5fd 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -1272,7 +1272,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* LICENCES => nothing */ 0, /* GRANTS => nothing */ 0, /* FULL => nothing */ - 0, /* LOG => nothing */ + 0, /* LOGS => nothing */ 0, /* MACHINES => nothing */ 0, /* QUERIES => nothing */ 0, /* SCORES => nothing */ @@ -1709,7 +1709,7 @@ static const char *const yyTokenName[] = { /* 157 */ "LICENCES", /* 158 */ "GRANTS", /* 159 */ "FULL", - /* 160 */ "LOG", + /* 160 */ "LOGS", /* 161 */ "MACHINES", /* 162 */ "QUERIES", /* 163 */ "SCORES", @@ -2330,7 +2330,7 @@ static const char *const yyRuleName[] = { /* 260 */ "cmd ::= SHOW LICENCES", /* 261 */ "cmd ::= SHOW GRANTS", /* 262 */ "cmd ::= SHOW GRANTS FULL", - /* 263 */ "cmd ::= SHOW GRANTS LOG", + /* 263 */ "cmd ::= SHOW GRANTS LOGS", /* 264 */ "cmd ::= SHOW CLUSTER MACHINES", /* 265 */ "cmd ::= SHOW CREATE DATABASE db_name", /* 266 */ "cmd ::= SHOW CREATE TABLE full_table_name", @@ -3618,7 +3618,7 @@ static const YYCODETYPE yyRuleInfoLhs[] = { 350, /* (260) cmd ::= SHOW LICENCES */ 350, /* (261) cmd ::= SHOW GRANTS */ 350, /* (262) cmd ::= SHOW GRANTS FULL */ - 350, /* (263) cmd ::= SHOW GRANTS LOG */ + 350, /* (263) cmd ::= SHOW GRANTS LOGS */ 350, /* (264) cmd ::= SHOW CLUSTER MACHINES */ 350, /* (265) cmd ::= SHOW CREATE DATABASE db_name */ 350, /* (266) cmd ::= SHOW CREATE TABLE full_table_name */ @@ -4270,7 +4270,7 @@ static const signed char yyRuleInfoNRhs[] = { -2, /* (260) cmd ::= SHOW LICENCES */ -2, /* (261) cmd ::= SHOW GRANTS */ -3, /* (262) cmd ::= SHOW GRANTS FULL */ - -3, /* (263) cmd ::= SHOW GRANTS LOG */ + -3, /* (263) cmd ::= SHOW GRANTS LOGS */ -3, /* (264) cmd ::= SHOW CLUSTER MACHINES */ -4, /* (265) cmd ::= SHOW CREATE DATABASE db_name */ -4, /* (266) cmd ::= SHOW CREATE TABLE full_table_name */ @@ -5642,7 +5642,7 @@ static YYACTIONTYPE yy_reduce( case 262: /* cmd ::= SHOW GRANTS FULL */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); } break; - case 263: /* cmd ::= SHOW GRANTS LOG */ + case 263: /* cmd ::= SHOW GRANTS LOGS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOG_STMT); } break; case 264: /* cmd ::= SHOW CLUSTER MACHINES */ From a860e9039dc9751d9f39b92b77c08f8c0e7b52bd Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 31 Jan 2024 13:52:03 +0800 Subject: [PATCH 65/93] feat: support uniq grant --- include/common/systable.h | 2 +- include/common/tmsg.h | 4 ++-- source/common/src/systable.c | 4 ++-- source/dnode/mnode/impl/src/mndGrant.c | 4 ++-- source/dnode/mnode/impl/src/mndShow.c | 4 ++-- source/libs/nodes/src/nodesCodeFuncs.c | 16 ++++++++-------- source/libs/nodes/src/nodesUtilFuncs.c | 4 ++-- source/libs/parser/inc/sql.y | 2 +- source/libs/parser/src/parAstParser.c | 8 ++++---- source/libs/parser/src/parAuthenticator.c | 2 +- source/libs/parser/src/parTranslater.c | 6 +++--- source/libs/parser/src/sql.c | 2 +- 12 files changed, 29 insertions(+), 29 deletions(-) diff --git a/include/common/systable.h b/include/common/systable.h index 9a07090c930..37593144d8e 100644 --- a/include/common/systable.h +++ b/include/common/systable.h @@ -53,7 +53,7 @@ extern "C" { #define TSDB_INS_TABLE_COMPACTS "ins_compacts" #define TSDB_INS_TABLE_COMPACT_DETAILS "ins_compact_details" #define TSDB_INS_TABLE_GRANTS_FULL "ins_grants_full" -#define TSDB_INS_TABLE_GRANTS_LOG "ins_grants_log" +#define TSDB_INS_TABLE_GRANTS_LOGS "ins_grants_logs" #define TSDB_INS_TABLE_MACHINES "ins_machines" #define TSDB_PERFORMANCE_SCHEMA_DB "performance_schema" diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 920d0892b86..04502eb64a5 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -148,7 +148,7 @@ typedef enum _mgmt_table { TSDB_MGMT_TABLE_COMPACT, TSDB_MGMT_TABLE_COMPACT_DETAIL, TSDB_MGMT_TABLE_GRANTS_FULL, - TSDB_MGMT_TABLE_GRANTS_LOG, + TSDB_MGMT_TABLE_GRANTS_LOGS, TSDB_MGMT_TABLE_MACHINES, TSDB_MGMT_TABLE_MAX, } EShowType; @@ -364,7 +364,7 @@ typedef enum ENodeType { QUERY_NODE_SHOW_COMPACTS_STMT, QUERY_NODE_SHOW_COMPACT_DETAILS_STMT, QUERY_NODE_SHOW_GRANTS_FULL_STMT, - QUERY_NODE_SHOW_GRANTS_LOG_STMT, + QUERY_NODE_SHOW_GRANTS_LOGS_STMT, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT, // logic plan node diff --git a/source/common/src/systable.c b/source/common/src/systable.c index 5eb570d3dec..3f15e65d93a 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -355,7 +355,7 @@ static const SSysDbTableSchema useGrantsFullSchema[] = { {.name = "limits", .bytes = 512 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, }; -static const SSysDbTableSchema useGrantsLogSchema[] = { +static const SSysDbTableSchema useGrantsLogsSchema[] = { {.name = "state", .bytes = 1536 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "active", .bytes = 512 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "machine", .bytes = 6016 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, @@ -396,7 +396,7 @@ static const SSysTableMeta infosMeta[] = { {TSDB_INS_TABLE_COMPACTS, userCompactsSchema, tListLen(userCompactsSchema), false}, {TSDB_INS_TABLE_COMPACT_DETAILS, userCompactsDetailSchema, tListLen(userCompactsDetailSchema), false}, {TSDB_INS_TABLE_GRANTS_FULL, useGrantsFullSchema, tListLen(useGrantsFullSchema), false}, - {TSDB_INS_TABLE_GRANTS_LOG, useGrantsLogSchema, tListLen(useGrantsLogSchema), false}, + {TSDB_INS_TABLE_GRANTS_LOGS, useGrantsLogsSchema, tListLen(useGrantsLogsSchema), false}, {TSDB_INS_TABLE_MACHINES, useMachinesSchema, tListLen(useMachinesSchema), false}, }; diff --git a/source/dnode/mnode/impl/src/mndGrant.c b/source/dnode/mnode/impl/src/mndGrant.c index c16251316ce..47227bfc8a4 100644 --- a/source/dnode/mnode/impl/src/mndGrant.c +++ b/source/dnode/mnode/impl/src/mndGrant.c @@ -56,7 +56,7 @@ static int32_t mndRetrieveGrant(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl } static int32_t mndRetrieveGrantFull(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { return 0; } -static int32_t mndRetrieveGrantLog(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { return 0; } +static int32_t mndRetrieveGrantLogs(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { return 0; } static int32_t mndRetrieveMachines(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { return 0; } static int32_t mndProcessGrantHB(SRpcMsg *pReq) { return TSDB_CODE_SUCCESS; } @@ -64,7 +64,7 @@ static int32_t mndProcessGrantHB(SRpcMsg *pReq) { return TSDB_CODE_SUCCESS; } int32_t mndInitGrant(SMnode *pMnode) { mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_GRANTS, mndRetrieveGrant); mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_GRANTS_FULL, mndRetrieveGrantFull); - mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_GRANTS_LOG, mndRetrieveGrantLog); + mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_GRANTS_LOGS, mndRetrieveGrantLogs); mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_MACHINES, mndRetrieveMachines); mndSetMsgHandle(pMnode, TDMT_MND_GRANT_HB_TIMER, mndProcessGrantHB); return 0; diff --git a/source/dnode/mnode/impl/src/mndShow.c b/source/dnode/mnode/impl/src/mndShow.c index 687b5d0299b..f887d05d37d 100644 --- a/source/dnode/mnode/impl/src/mndShow.c +++ b/source/dnode/mnode/impl/src/mndShow.c @@ -125,8 +125,8 @@ static int32_t convertToRetrieveType(char *name, int32_t len) { type = TSDB_MGMT_TABLE_COMPACT_DETAIL; } else if (strncasecmp(name, TSDB_INS_TABLE_GRANTS_FULL, len) == 0) { type = TSDB_MGMT_TABLE_GRANTS_FULL; - } else if (strncasecmp(name, TSDB_INS_TABLE_GRANTS_LOG, len) == 0) { - type = TSDB_MGMT_TABLE_GRANTS_LOG; + } else if (strncasecmp(name, TSDB_INS_TABLE_GRANTS_LOGS, len) == 0) { + type = TSDB_MGMT_TABLE_GRANTS_LOGS; } else if (strncasecmp(name, TSDB_INS_TABLE_MACHINES, len) == 0) { type = TSDB_MGMT_TABLE_MACHINES; } else { diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index e2dc7c6d28c..cae6ffa5fa9 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -267,8 +267,8 @@ const char* nodesNodeName(ENodeType type) { return "ShowCompactDetailsStmt"; case QUERY_NODE_SHOW_GRANTS_FULL_STMT: return "ShowGrantsFullStmt"; - case QUERY_NODE_SHOW_GRANTS_LOG_STMT: - return "ShowGrantsLogStmt"; + case QUERY_NODE_SHOW_GRANTS_LOGS_STMT: + return "ShowGrantsLogsStmt"; case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: return "ShowClusterMachinesStmt"; case QUERY_NODE_DELETE_STMT: @@ -6596,11 +6596,11 @@ static int32_t showGrantsFullStmtToJson(const void* pObj, SJson* pJson) { return static int32_t jsonToShowGrantsFullStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } -static int32_t showGrantsLogStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } +static int32_t showGrantsLogsStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } static int32_t showClusterMachinesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } -static int32_t jsonToShowGrantsLogStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } +static int32_t jsonToShowGrantsLogsStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } static int32_t jsonToShowClusterMachinesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } @@ -7093,8 +7093,8 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return showVariablesStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_GRANTS_FULL_STMT: return showGrantsFullStmtToJson(pObj, pJson); - case QUERY_NODE_SHOW_GRANTS_LOG_STMT: - return showGrantsLogStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_GRANTS_LOGS_STMT: + return showGrantsLogsStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: return showClusterMachinesStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT: @@ -7424,8 +7424,8 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToShowVariablesStmt(pJson, pObj); case QUERY_NODE_SHOW_GRANTS_FULL_STMT: return jsonToShowGrantsFullStmt(pJson, pObj); - case QUERY_NODE_SHOW_GRANTS_LOG_STMT: - return jsonToShowGrantsLogStmt(pJson, pObj); + case QUERY_NODE_SHOW_GRANTS_LOGS_STMT: + return jsonToShowGrantsLogsStmt(pJson, pObj); case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: return jsonToShowClusterMachinesStmt(pJson, pObj); case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT: diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 696971d47db..38aca636b9e 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -442,7 +442,7 @@ SNode* nodesMakeNode(ENodeType type) { case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT: case QUERY_NODE_SHOW_VIEWS_STMT: case QUERY_NODE_SHOW_GRANTS_FULL_STMT: - case QUERY_NODE_SHOW_GRANTS_LOG_STMT: + case QUERY_NODE_SHOW_GRANTS_LOGS_STMT: case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: return makeNode(type, sizeof(SShowStmt)); case QUERY_NODE_SHOW_TABLE_TAGS_STMT: @@ -1084,7 +1084,7 @@ void nodesDestroyNode(SNode* pNode) { case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT: case QUERY_NODE_SHOW_VIEWS_STMT: case QUERY_NODE_SHOW_GRANTS_FULL_STMT: - case QUERY_NODE_SHOW_GRANTS_LOG_STMT: + case QUERY_NODE_SHOW_GRANTS_LOGS_STMT: case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: { SShowStmt* pStmt = (SShowStmt*)pNode; nodesDestroyNode(pStmt->pDbName); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 4256b34c39c..d2d120fa93e 100755 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -488,7 +488,7 @@ cmd ::= SHOW CONNECTIONS. cmd ::= SHOW LICENCES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } cmd ::= SHOW GRANTS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } cmd ::= SHOW GRANTS FULL. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); } -cmd ::= SHOW GRANTS LOGS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOG_STMT); } +cmd ::= SHOW GRANTS LOGS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOGS_STMT); } cmd ::= SHOW CLUSTER MACHINES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT); } cmd ::= SHOW CREATE DATABASE db_name(A). { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &A); } cmd ::= SHOW CREATE TABLE full_table_name(A). { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, A); } diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c index 4910ba35498..9b34672418c 100644 --- a/source/libs/parser/src/parAstParser.c +++ b/source/libs/parser/src/parAstParser.c @@ -624,8 +624,8 @@ static int32_t collectMetaKeyFromShowGrantsFull(SCollectMetaKeyCxt* pCxt, SShowS pCxt->pMetaCache); } -static int32_t collectMetaKeyFromShowGrantsLog(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { - return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_GRANTS_LOG, +static int32_t collectMetaKeyFromShowGrantsLogs(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_GRANTS_LOGS, pCxt->pMetaCache); } @@ -856,8 +856,8 @@ static int32_t collectMetaKeyFromQuery(SCollectMetaKeyCxt* pCxt, SNode* pStmt) { return collectMetaKeyFromShowCompactDetails(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_GRANTS_FULL_STMT: return collectMetaKeyFromShowGrantsFull(pCxt, (SShowStmt*)pStmt); - case QUERY_NODE_SHOW_GRANTS_LOG_STMT: - return collectMetaKeyFromShowGrantsLog(pCxt, (SShowStmt*)pStmt); + case QUERY_NODE_SHOW_GRANTS_LOGS_STMT: + return collectMetaKeyFromShowGrantsLogs(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: return collectMetaKeyFromShowClusterMachines(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_CREATE_DATABASE_STMT: diff --git a/source/libs/parser/src/parAuthenticator.c b/source/libs/parser/src/parAuthenticator.c index dcb452311b6..c2cd4786db4 100644 --- a/source/libs/parser/src/parAuthenticator.c +++ b/source/libs/parser/src/parAuthenticator.c @@ -350,7 +350,7 @@ static int32_t authQuery(SAuthCxt* pCxt, SNode* pStmt) { case QUERY_NODE_SHOW_VNODES_STMT: case QUERY_NODE_SHOW_SCORES_STMT: case QUERY_NODE_SHOW_GRANTS_FULL_STMT: - case QUERY_NODE_SHOW_GRANTS_LOG_STMT: + case QUERY_NODE_SHOW_GRANTS_LOGS_STMT: case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: return !pCxt->pParseCxt->enableSysInfo ? TSDB_CODE_PAR_PERMISSION_DENIED : TSDB_CODE_SUCCESS; case QUERY_NODE_SHOW_TABLES_STMT: diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index d858287ada8..6e94826def0 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -275,9 +275,9 @@ static const SSysTableShowAdapter sysTableShowAdapter[] = { .numOfShowCols = 1, .pShowCols = {"*"} }, - { .showType = QUERY_NODE_SHOW_GRANTS_LOG_STMT, + { .showType = QUERY_NODE_SHOW_GRANTS_LOGS_STMT, .pDbName = TSDB_INFORMATION_SCHEMA_DB, - .pTableName = TSDB_INS_TABLE_GRANTS_LOG, + .pTableName = TSDB_INS_TABLE_GRANTS_LOGS, .numOfShowCols = 1, .pShowCols = {"*"} }, @@ -10710,7 +10710,7 @@ static int32_t rewriteQuery(STranslateContext* pCxt, SQuery* pQuery) { case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT: case QUERY_NODE_SHOW_VIEWS_STMT: case QUERY_NODE_SHOW_GRANTS_FULL_STMT: - case QUERY_NODE_SHOW_GRANTS_LOG_STMT: + case QUERY_NODE_SHOW_GRANTS_LOGS_STMT: case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: code = rewriteShow(pCxt, pQuery); break; diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 340e064b5fd..25862bb0795 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -5643,7 +5643,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); } break; case 263: /* cmd ::= SHOW GRANTS LOGS */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOG_STMT); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOGS_STMT); } break; case 264: /* cmd ::= SHOW CLUSTER MACHINES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT); } From 277116f811045231ab8af24f1116fbb7a371608c Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 31 Jan 2024 14:06:48 +0800 Subject: [PATCH 66/93] feat: support uniq grant --- source/common/src/systable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/common/src/systable.c b/source/common/src/systable.c index 3f15e65d93a..77083d04254 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -358,7 +358,7 @@ static const SSysDbTableSchema useGrantsFullSchema[] = { static const SSysDbTableSchema useGrantsLogsSchema[] = { {.name = "state", .bytes = 1536 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "active", .bytes = 512 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, - {.name = "machine", .bytes = 6016 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, + {.name = "machine", .bytes = 9088 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, }; static const SSysDbTableSchema useMachinesSchema[] = { From 89bcc8f0582c03fe5fea69717cc8880bbef2a75c Mon Sep 17 00:00:00 2001 From: Yihao Deng Date: Wed, 31 Jan 2024 07:10:01 +0000 Subject: [PATCH 67/93] add queue perf msg --- source/libs/transport/src/transSvr.c | 4 ++-- source/util/src/tqueue.c | 6 ++++-- source/util/src/tworker.c | 25 ++++++++++++++++++++++++- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/source/libs/transport/src/transSvr.c b/source/libs/transport/src/transSvr.c index 362d38b5057..b324ca5f916 100644 --- a/source/libs/transport/src/transSvr.c +++ b/source/libs/transport/src/transSvr.c @@ -159,7 +159,7 @@ static void uvStartSendResp(SSvrMsg* msg); static void uvNotifyLinkBrokenToApp(SSvrConn* conn); -static FORCE_INLINE void destroySmsg(SSvrMsg* smsg); +static FORCE_INLINE void destroySmsg(SSvrMsg* smsg); static FORCE_INLINE SSvrConn* createConn(void* hThrd); static FORCE_INLINE void destroyConn(SSvrConn* conn, bool clear /*clear handle or not*/); static FORCE_INLINE void destroyConnRegArg(SSvrConn* conn); @@ -1382,7 +1382,7 @@ void uvHandleUpdate(SSvrMsg* msg, SWorkThrd* thrd) { tFreeSUpdateIpWhiteReq(req); taosMemoryFree(req); } else { - tInfo("ip-white-list disable on trans"); + tDebug("ip-white-list disable on trans"); thrd->enableIpWhiteList = 0; } taosMemoryFree(msg); diff --git a/source/util/src/tqueue.c b/source/util/src/tqueue.c index 1dfdd637b6d..2cc13be6bae 100644 --- a/source/util/src/tqueue.c +++ b/source/util/src/tqueue.c @@ -159,6 +159,7 @@ void taosFreeQitem(void *pItem) { int32_t taosWriteQitem(STaosQueue *queue, void *pItem) { int32_t code = 0; STaosQnode *pNode = (STaosQnode *)(((char *)pItem) - sizeof(STaosQnode)); + pNode->timestamp = taosGetTimestampUs(); pNode->next = NULL; taosThreadMutexLock(&queue->mutex); @@ -464,6 +465,7 @@ int32_t taosReadAllQitemsFromQset(STaosQset *qset, STaosQall *qall, SQueueInfo * qinfo->ahandle = queue->ahandle; qinfo->fp = queue->itemsFp; qinfo->queue = queue; + qinfo->timestamp = queue->head->timestamp; queue->head = NULL; queue->tail = NULL; @@ -489,8 +491,8 @@ int32_t taosReadAllQitemsFromQset(STaosQset *qset, STaosQall *qall, SQueueInfo * int32_t taosQallItemSize(STaosQall *qall) { return qall->numOfItems; } int64_t taosQallMemSize(STaosQall *qall) { return qall->memOfItems; } -int64_t taosQallUnAccessedItemSize(STaosQall *qall) {return qall->unAccessedNumOfItems;} -int64_t taosQallUnAccessedMemSize(STaosQall *qall) {return qall->unAccessMemOfItems;} +int64_t taosQallUnAccessedItemSize(STaosQall *qall) { return qall->unAccessedNumOfItems; } +int64_t taosQallUnAccessedMemSize(STaosQall *qall) { return qall->unAccessMemOfItems; } void taosResetQitems(STaosQall *qall) { qall->current = qall->start; } int32_t taosGetQueueNumber(STaosQset *qset) { return qset->numOfQueues; } diff --git a/source/util/src/tworker.c b/source/util/src/tworker.c index 28f7fd47835..c4b3271c65b 100644 --- a/source/util/src/tworker.c +++ b/source/util/src/tworker.c @@ -15,10 +15,12 @@ #define _DEFAULT_SOURCE #include "tworker.h" -#include "tgeosctx.h" #include "taoserror.h" +#include "tgeosctx.h" #include "tlog.h" +#define QUEUE_THRESHOLD 1000 * 1000 + typedef void *(*ThreadFp)(void *param); int32_t tQWorkerInit(SQWorkerPool *pool) { @@ -84,6 +86,13 @@ static void *tQWorkerThreadFp(SQueueWorker *worker) { break; } + if (qinfo.timestamp != 0) { + int64_t cost = taosGetTimestampUs() - qinfo.timestamp; + if (cost > QUEUE_THRESHOLD) { + uWarn("worker:%s,message has been queued for too long, cost: %" PRId64 "s", pool->name, cost); + } + } + if (qinfo.fp != NULL) { qinfo.workerId = worker->id; qinfo.threadNum = pool->num; @@ -198,6 +207,13 @@ static void *tAutoQWorkerThreadFp(SQueueWorker *worker) { break; } + if (qinfo.timestamp != 0) { + int64_t cost = taosGetTimestampUs() - qinfo.timestamp; + if (cost > QUEUE_THRESHOLD) { + uWarn("worker:%s,message has been queued for too long, cost: %" PRId64 "s", pool->name, cost); + } + } + if (qinfo.fp != NULL) { qinfo.workerId = worker->id; qinfo.threadNum = taosArrayGetSize(pool->workers); @@ -338,6 +354,13 @@ static void *tWWorkerThreadFp(SWWorker *worker) { break; } + if (qinfo.timestamp != 0) { + int64_t cost = taosGetTimestampUs() - qinfo.timestamp; + if (cost > QUEUE_THRESHOLD) { + uWarn("worker:%s,message has been queued for too long, cost: %" PRId64 "s", pool->name, cost); + } + } + if (qinfo.fp != NULL) { qinfo.workerId = worker->id; qinfo.threadNum = pool->num; From 69448e4801f936d177d19a04e64ee1f0f3481f9d Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 31 Jan 2024 15:48:13 +0800 Subject: [PATCH 68/93] chore: adjust test case --- .../develop-test/2-query/table_count_scan.py | 16 ++++++------ tests/script/tsim/query/sys_tbname.sim | 2 +- tests/script/tsim/query/tableCount.sim | 6 ++--- .../0-others/information_schema.py | 25 +++++++------------ 4 files changed, 21 insertions(+), 28 deletions(-) diff --git a/tests/develop-test/2-query/table_count_scan.py b/tests/develop-test/2-query/table_count_scan.py index 40d2e2a8875..09b34a97d09 100644 --- a/tests/develop-test/2-query/table_count_scan.py +++ b/tests/develop-test/2-query/table_count_scan.py @@ -65,7 +65,7 @@ class TDTestCase: tdSql.query('select count(*),db_name, stable_name from information_schema.ins_tables group by db_name, stable_name;') tdSql.checkRows(3) - tdSql.checkData(0, 0, 26) + tdSql.checkData(0, 0, 29) tdSql.checkData(0, 1, 'information_schema') tdSql.checkData(0, 2, None) tdSql.checkData(1, 0, 3) @@ -77,7 +77,7 @@ class TDTestCase: tdSql.query('select count(1) v,db_name, stable_name from information_schema.ins_tables group by db_name, stable_name order by v desc;') tdSql.checkRows(3) - tdSql.checkData(0, 0, 26) + tdSql.checkData(0, 0, 29) tdSql.checkData(0, 1, 'information_schema') tdSql.checkData(0, 2, None) tdSql.checkData(1, 0, 5) @@ -93,7 +93,7 @@ class TDTestCase: tdSql.checkData(1, 1, 'performance_schema') tdSql.checkData(0, 0, 3) tdSql.checkData(0, 1, 'tbl_count') - tdSql.checkData(2, 0, 26) + tdSql.checkData(2, 0, 29) tdSql.checkData(2, 1, 'information_schema') tdSql.query("select count(*) from information_schema.ins_tables where db_name='tbl_count'") @@ -106,7 +106,7 @@ class TDTestCase: tdSql.query('select count(*) from information_schema.ins_tables') tdSql.checkRows(1) - tdSql.checkData(0, 0, 34) + tdSql.checkData(0, 0, 37) tdSql.execute('create table stba (ts timestamp, c1 bool, c2 tinyint, c3 smallint, c4 int, c5 bigint, c6 float, c7 double, c8 binary(10), c9 nchar(10), c10 tinyint unsigned, c11 smallint unsigned, c12 int unsigned, c13 bigint unsigned) TAGS(t1 int, t2 binary(10), t3 double);') @@ -189,7 +189,7 @@ class TDTestCase: tdSql.checkData(2, 0, 5) tdSql.checkData(2, 1, 'performance_schema') tdSql.checkData(2, 2, None) - tdSql.checkData(3, 0, 26) + tdSql.checkData(3, 0, 29) tdSql.checkData(3, 1, 'information_schema') tdSql.checkData(3, 2, None) @@ -204,7 +204,7 @@ class TDTestCase: tdSql.checkData(2, 0, 5) tdSql.checkData(2, 1, 'performance_schema') tdSql.checkData(2, 2, None) - tdSql.checkData(3, 0, 26) + tdSql.checkData(3, 0, 29) tdSql.checkData(3, 1, 'information_schema') tdSql.checkData(3, 2, None) @@ -215,7 +215,7 @@ class TDTestCase: tdSql.checkData(0, 1, 'tbl_count') tdSql.checkData(1, 0, 5) tdSql.checkData(1, 1, 'performance_schema') - tdSql.checkData(2, 0, 26) + tdSql.checkData(2, 0, 29) tdSql.checkData(2, 1, 'information_schema') tdSql.query("select count(*) from information_schema.ins_tables where db_name='tbl_count'") @@ -228,7 +228,7 @@ class TDTestCase: tdSql.query('select count(*) from information_schema.ins_tables') tdSql.checkRows(1) - tdSql.checkData(0, 0, 35) + tdSql.checkData(0, 0, 38) tdSql.execute('drop database tbl_count') diff --git a/tests/script/tsim/query/sys_tbname.sim b/tests/script/tsim/query/sys_tbname.sim index 8bf0fb47001..9069ad949c4 100644 --- a/tests/script/tsim/query/sys_tbname.sim +++ b/tests/script/tsim/query/sys_tbname.sim @@ -58,7 +58,7 @@ endi sql select tbname from information_schema.ins_tables; print $rows $data00 -if $rows != 35 then +if $rows != 38 then return -1 endi if $data00 != @ins_tables@ then diff --git a/tests/script/tsim/query/tableCount.sim b/tests/script/tsim/query/tableCount.sim index 315a39e56df..573e1341334 100644 --- a/tests/script/tsim/query/tableCount.sim +++ b/tests/script/tsim/query/tableCount.sim @@ -53,7 +53,7 @@ sql select stable_name,count(table_name) from information_schema.ins_tables grou if $rows != 3 then return -1 endi -if $data01 != 32 then +if $data01 != 35 then return -1 endi if $data11 != 10 then @@ -72,7 +72,7 @@ endi if $data11 != 5 then return -1 endi -if $data21 != 26 then +if $data21 != 29 then return -1 endi if $data31 != 5 then @@ -97,7 +97,7 @@ endi if $data42 != 3 then return -1 endi -if $data52 != 26 then +if $data52 != 29 then return -1 endi if $data62 != 5 then diff --git a/tests/system-test/0-others/information_schema.py b/tests/system-test/0-others/information_schema.py index 20305bf4c1c..79d010cd7db 100644 --- a/tests/system-test/0-others/information_schema.py +++ b/tests/system-test/0-others/information_schema.py @@ -58,7 +58,7 @@ class TDTestCase: self.ins_list = ['ins_dnodes','ins_mnodes','ins_qnodes','ins_snodes','ins_cluster','ins_databases','ins_functions',\ 'ins_indexes','ins_stables','ins_tables','ins_tags','ins_columns','ins_users','ins_grants','ins_vgroups','ins_configs','ins_dnode_variables',\ 'ins_topics','ins_subscriptions','ins_streams','ins_stream_tasks','ins_vnodes','ins_user_privileges','ins_views', - 'ins_compacts', 'ins_compact_details'] + 'ins_compacts', 'ins_compact_details', 'ins_grants_full','ins_grants_logs', 'ins_machines'] self.perf_list = ['perf_connections','perf_queries','perf_consumers','perf_trans','perf_apps'] def insert_data(self,column_dict,tbname,row_num): insert_sql = self.setsql.set_insertsql(column_dict,tbname,self.binary_str,self.nchar_str) @@ -218,7 +218,7 @@ class TDTestCase: tdSql.checkEqual(20470,len(tdSql.queryResult)) tdSql.query("select * from information_schema.ins_columns where db_name ='information_schema'") - tdSql.checkEqual(219, len(tdSql.queryResult)) + tdSql.checkEqual(True, len(tdSql.queryResult) in range(215, 230)) tdSql.query("select * from information_schema.ins_columns where db_name ='performance_schema'") tdSql.checkEqual(54, len(tdSql.queryResult)) @@ -229,8 +229,7 @@ class TDTestCase: tdSql.query(f'select * from information_schema.ins_dnodes') result = tdSql.queryResult tdSql.checkEqual(result[0][0],1) - tdSql.checkEqual(result[0][8],"") - tdSql.checkEqual(result[0][9],"") + tdSql.checkEqual(True, len(result[0][8]) in (0,24)) self.str107 = 'Hc7VCc+' for t in range (10): self.str107 += 'tP+2soIXpP' @@ -247,11 +246,9 @@ class TDTestCase: tdSql.error('alter dnode 1 "activeCode" "' + self.str109 + '"') tdSql.error('alter all dnodes "activeCode" "' + self.str510 + '"') tdSql.query(f'select * from information_schema.ins_dnodes') - tdSql.checkEqual(tdSql.queryResult[0][8],"") - tdSql.execute('alter dnode 1 "activeCode" ""') - tdSql.query(f'select active_code,c_active_code from information_schema.ins_dnodes') - tdSql.checkEqual(tdSql.queryResult[0][0],"") - tdSql.checkEqual(tdSql.queryResult[0][1],'') + tdSql.checkEqual(True, len(result[0][8]) in (0,24)) + tdSql.error('alter dnode 1 "activeCode" ""') + tdSql.error(f'select active_code,c_active_code from information_schema.ins_dnodes') tdSql.error('alter dnode 1 "cActiveCode" "a"') tdSql.error('alter dnode 1 "cActiveCode" "' + self.str107 + '"') tdSql.error('alter dnode 1 "cActiveCode" "' + self.str256 + '"') @@ -260,15 +257,11 @@ class TDTestCase: tdSql.error('alter all dnodes "cActiveCode" "' + self.str257 + '"') tdSql.error('alter all dnodes "cActiveCode" "' + self.str254 + '"') tdSql.error('alter dnode 1 "cActiveCode" "' + self.str510 + '"') - tdSql.query(f'select active_code,c_active_code from information_schema.ins_dnodes') - tdSql.checkEqual(tdSql.queryResult[0][0],"") - tdSql.checkEqual(tdSql.queryResult[0][1],"") + tdSql.error(f'select active_code,c_active_code from information_schema.ins_dnodes') tdSql.error('alter dnode 1 "cActiveCode" "' + self.str109 + '"') tdSql.query(f'show dnodes') - tdSql.checkEqual(tdSql.queryResult[0][9],"") - tdSql.execute('alter all dnodes "cActiveCode" ""') - tdSql.query(f'select c_active_code from information_schema.ins_dnodes') - tdSql.checkEqual(tdSql.queryResult[0][0],'') + tdSql.error(f'select c_active_code from information_schema.ins_dnodes') + tdSql.error('alter all dnodes "cActiveCode" ""') def run(self): self.prepare_data() From 9458b86b4162737c06c0eea9ed6aedca22523ec0 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 31 Jan 2024 16:09:06 +0800 Subject: [PATCH 69/93] feat: support uniq grant --- include/common/tgrant.h | 18 +++++++++--------- source/common/src/tglobal.c | 6 +++--- source/dnode/mgmt/mgmt_dnode/src/dmHandle.c | 2 +- source/libs/command/src/command.c | 2 +- source/util/src/tconfig.c | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index 3517f1cf64a..51303933be7 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -62,7 +62,7 @@ char* tGetMachineId(); int32_t grantAlterActiveCode(int32_t did, const char* old, const char* newer, char* out, int8_t type); #endif -#ifndef GRANTS_CFG +// #ifndef GRANTS_CFG #ifdef TD_ENTERPRISE #ifdef TD_UNIQ_GRANT #define GRANTS_SCHEMA \ @@ -114,14 +114,14 @@ int32_t grantAlterActiveCode(int32_t did, const char* old, const char* newer, ch {.name = "cpu_cores", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ } #endif -#define GRANT_CFG_ADD -#define GRANT_CFG_SET -#define GRANT_CFG_GET -#define GRANT_CFG_CHECK -#define GRANT_CFG_SKIP -#define GRANT_CFG_DECLARE -#define GRANT_CFG_EXTERN -#endif +// #define GRANT_CFG_ADD +// #define GRANT_CFG_SET +// #define GRANT_CFG_GET +// #define GRANT_CFG_CHECK +// #define GRANT_CFG_SKIP +// #define GRANT_CFG_DECLARE +// #define GRANT_CFG_EXTERN +// #endif #ifdef __cplusplus } diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index a7d80fe5dbc..23133824eb3 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -27,7 +27,7 @@ #include "cus_name.h" #endif -GRANT_CFG_DECLARE; +// GRANT_CFG_DECLARE; SConfig *tsCfg = NULL; @@ -804,7 +804,7 @@ static int32_t taosAddServerCfg(SConfig *pCfg) { if (cfgAddBool(pCfg, "experimental", tsExperimental, CFG_SCOPE_BOTH, CFG_DYN_BOTH) != 0) return -1; - GRANT_CFG_ADD; + // GRANT_CFG_ADD; return 0; } @@ -1229,7 +1229,7 @@ static int32_t taosSetServerCfg(SConfig *pCfg) { tsExperimental = cfgGetItem(pCfg, "experimental")->bval; - GRANT_CFG_GET; + // GRANT_CFG_GET; return 0; } diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c index cc4508f3c92..a3a29f6f77f 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c @@ -325,7 +325,7 @@ int32_t dmAppendVariablesToBlock(SSDataBlock *pBlock, int32_t dnodeId) { for (int32_t i = 0, c = 0; i < numOfCfg; ++i, c = 0) { SConfigItem *pItem = taosArrayGet(tsCfg->array, i); - GRANT_CFG_SKIP; + // GRANT_CFG_SKIP; SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, c++); colDataSetVal(pColInfo, i, (const char *)&dnodeId, false); diff --git a/source/libs/command/src/command.c b/source/libs/command/src/command.c index 6bae0e1022d..c45a8931d27 100644 --- a/source/libs/command/src/command.c +++ b/source/libs/command/src/command.c @@ -886,7 +886,7 @@ int32_t setLocalVariablesResultIntoDataBlock(SSDataBlock* pBlock) { for (int32_t i = 0, c = 0; i < numOfCfg; ++i, c = 0) { SConfigItem* pItem = taosArrayGet(tsCfg->array, i); - GRANT_CFG_SKIP; + // GRANT_CFG_SKIP; char name[TSDB_CONFIG_OPTION_LEN + VARSTR_HEADER_SIZE] = {0}; STR_WITH_MAXSIZE_TO_VARSTR(name, pItem->name, TSDB_CONFIG_OPTION_LEN + VARSTR_HEADER_SIZE); diff --git a/source/util/src/tconfig.c b/source/util/src/tconfig.c index d656f0c14ed..ad3c766510c 100644 --- a/source/util/src/tconfig.c +++ b/source/util/src/tconfig.c @@ -336,7 +336,7 @@ static int32_t cfgUpdateDebugFlagItem(SConfig *pCfg, const char *name, bool rese } int32_t cfgSetItem(SConfig *pCfg, const char *name, const char *value, ECfgSrcType stype) { - GRANT_CFG_SET; + // GRANT_CFG_SET; SConfigItem *pItem = cfgGetItem(pCfg, name); if (pItem == NULL) { terrno = TSDB_CODE_CFG_NOT_FOUND; From be38b589704af2dbe0a0cc59003640b78316806e Mon Sep 17 00:00:00 2001 From: factosea <285808407@qq.com> Date: Wed, 31 Jan 2024 16:15:30 +0800 Subject: [PATCH 70/93] fix: don't wait when tsort close --- source/libs/executor/src/tsort.c | 1 - 1 file changed, 1 deletion(-) diff --git a/source/libs/executor/src/tsort.c b/source/libs/executor/src/tsort.c index db9266cb8f0..3559e57ebc3 100644 --- a/source/libs/executor/src/tsort.c +++ b/source/libs/executor/src/tsort.c @@ -1334,7 +1334,6 @@ static bool tsortOpenForBufMergeSort(SSortHandle* pHandle) { int32_t tsortClose(SSortHandle* pHandle) { atomic_val_compare_exchange_8(&pHandle->closed, 0, 1); - taosMsleep(10); return TSDB_CODE_SUCCESS; } From 74561a66c32bfdf399b09b6df33ae90da1ae08dd Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 31 Jan 2024 17:10:31 +0800 Subject: [PATCH 71/93] fix:set log level to 135 for some cases --- tests/parallel_test/cases.task | 1 + tests/system-test/7-tmq/tmqDropConsumer.py | 3 ++- tests/system-test/7-tmq/tmqParamsTest.py | 4 +++- tests/system-test/7-tmq/tmqVnodeTransform.py | 6 +++--- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 9bc28271573..91a0ac46e56 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -230,6 +230,7 @@ fi ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqSubscribeStb-r3.py -N 5 ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq3mnodeSwitch.py -N 6 -M 3 -i True ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq3mnodeSwitch.py -N 6 -M 3 -n 3 -i True +,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform.py -N 2 -n 1 ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-stb.py -N 2 -n 1 ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-stb.py -N 6 -n 3 #,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-db.py -N 6 -n 3 diff --git a/tests/system-test/7-tmq/tmqDropConsumer.py b/tests/system-test/7-tmq/tmqDropConsumer.py index 5208d140695..953e9314f1b 100644 --- a/tests/system-test/7-tmq/tmqDropConsumer.py +++ b/tests/system-test/7-tmq/tmqDropConsumer.py @@ -12,7 +12,8 @@ sys.path.append("./7-tmq") from tmqCommon import * class TDTestCase: - # updatecfgDict = {'debugFlag': 135} + clientCfgDict = {'debugFlag': 135} + updatecfgDict = {'debugFlag': 135, 'clientCfg':clientCfgDict} def __init__(self): self.vgroups = 2 diff --git a/tests/system-test/7-tmq/tmqParamsTest.py b/tests/system-test/7-tmq/tmqParamsTest.py index 0e9e8f989f9..9286b69278a 100644 --- a/tests/system-test/7-tmq/tmqParamsTest.py +++ b/tests/system-test/7-tmq/tmqParamsTest.py @@ -11,7 +11,9 @@ sys.path.append("./7-tmq") from tmqCommon import * class TDTestCase: - updatecfgDict = {'debugFlag': 135} + clientCfgDict = {'debugFlag': 135} + updatecfgDict = {'debugFlag': 135, 'clientCfg':clientCfgDict} + def init(self, conn, logSql, replicaVar=1): self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") diff --git a/tests/system-test/7-tmq/tmqVnodeTransform.py b/tests/system-test/7-tmq/tmqVnodeTransform.py index 811b72c35fa..c2b002ead68 100644 --- a/tests/system-test/7-tmq/tmqVnodeTransform.py +++ b/tests/system-test/7-tmq/tmqVnodeTransform.py @@ -186,7 +186,7 @@ class TDTestCase: tmqCom.getStartCommitNotifyFromTmqsim() #restart dnode & remove wal - # self.restartAndRemoveWal() + self.restartAndRemoveWal() # redistribute vgroup self.redistributeVgroups(); @@ -235,7 +235,7 @@ class TDTestCase: tdSql.execute(sqlString) tdSql.query("flush database %s"%(paraDict['dbName'])) #restart dnode & remove wal - # self.restartAndRemoveWal() + self.restartAndRemoveWal() # redistribute vgroup self.redistributeVgroups(); @@ -313,7 +313,7 @@ class TDTestCase: time.sleep(5) #restart dnode & remove wal - # self.restartAndRemoveWal() + self.restartAndRemoveWal() # redistribute vgroup self.redistributeVgroups() From 82fd28d1d408bc191233f70bc15e45764b7ecea8 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 31 Jan 2024 17:20:50 +0800 Subject: [PATCH 72/93] feat: support uniq grant --- include/util/tbase58.h | 32 +++++++++ include/util/tbase64.h | 3 - source/util/src/tbase58.c | 144 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 176 insertions(+), 3 deletions(-) create mode 100644 include/util/tbase58.h create mode 100644 source/util/src/tbase58.c diff --git a/include/util/tbase58.h b/include/util/tbase58.h new file mode 100644 index 00000000000..e1b03f8a8f9 --- /dev/null +++ b/include/util/tbase58.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#ifndef _TD_UTIL_BASE58_H_ +#define _TD_UTIL_BASE58_H_ + +#include "os.h" + +#ifdef __cplusplus +extern "C" { +#endif + +uint8_t *base58_decode(const char *value, size_t inlen, int32_t *outlen); +char *base58_encode(const uint8_t *value, int32_t vlen); + +#ifdef __cplusplus +} +#endif + +#endif /*_TD_UTIL_BASE58_H_*/ \ No newline at end of file diff --git a/include/util/tbase64.h b/include/util/tbase64.h index bd88808825f..22b8f95c5a8 100644 --- a/include/util/tbase64.h +++ b/include/util/tbase64.h @@ -25,9 +25,6 @@ extern "C" { uint8_t *base64_decode(const char *value, int32_t inlen, int32_t *outlen); char *base64_encode(const uint8_t *value, int32_t vlen); -uint8_t *base58_decode(const char *value, size_t inlen, int32_t *outlen); -char *base58_encode(const uint8_t *value, int32_t vlen); - #ifdef __cplusplus } #endif diff --git a/source/util/src/tbase58.c b/source/util/src/tbase58.c new file mode 100644 index 00000000000..fa3ecadd146 --- /dev/null +++ b/source/util/src/tbase58.c @@ -0,0 +1,144 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#define _DEFAULT_SOURCE +#include "tbase58.h" +#include +#include + +#define BASE_BUF_SIZE 256 +static const char *basis_58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; + +char *base58_encode(const uint8_t *value, int32_t vlen) { + const uint8_t *pb = value; + const uint8_t *pe = pb + vlen; + uint8_t buf[BASE_BUF_SIZE] = {0}; + uint8_t *pbuf = &buf[0]; + bool bfree = false; + int32_t nz = 0, size = 0, len = 0; + + while (pb != pe && *pb == 0) { + ++pb; + ++nz; + } + + size = (pe - pb) * 69 / 50 + 1; + if (size > BASE_BUF_SIZE) { + if (!(pbuf = taosMemoryCalloc(1, size))) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + return NULL; + } + bfree = true; + } + + while (pb != pe) { + int32_t num = *pb; + int32_t i = 0; + for (int32_t j = (int32_t)size - 1; (num != 0 || i < len) && j >= 0; --j, ++i) { + num += ((int32_t)buf[j]) << 8; + pbuf[j] = num % 58; + num /= 58; + } + len = i; + ++pb; + } + + const uint8_t *pi = pbuf + (size - len); + while (pi != pbuf + size && *pi == 0) ++pi; + uint8_t *result = taosMemoryCalloc(1, size + 1); + if (!result) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + if (bfree) taosMemoryFree(pbuf); + return NULL; + } + memset(result, '1', nz); + while (pi != pbuf + size) result[nz++] = basis_58[*pi++]; + + if (bfree) taosMemoryFree(pbuf); + return result; +} + +static const signed char index_58[256] = { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, + -1, -1, -1, -1, -1, -1, -1, 9, 10, 11, 12, 13, 14, 15, 16, -1, 17, 18, 19, 20, 21, -1, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, -1, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; + +uint8_t *base58_decode(const char *value, size_t inlen, int32_t *outlen) { + const char *pe = value + inlen; + uint8_t buf[BASE_BUF_SIZE] = {0}; + uint8_t *pbuf = &buf[0]; + bool bfree = false; + int32_t nz = 0, size = 0, len = 0; + + while (*value && isspace(*value)) ++value; + while (*value == '1') { + ++nz; + ++value; + } + + size = (int32_t)(pe - value) * 733 / 1000 + 1; + if (size > BASE_BUF_SIZE) { + if (!(pbuf = taosMemoryCalloc(1, size))) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + return NULL; + } + bfree = true; + } + + while (*value && !isspace(*value)) { + int32_t num = index_58[(uint8_t)*value]; + if (num == -1) { + if (bfree) taosMemoryFree(pbuf); + return NULL; + } + int32_t i = 0; + for (int32_t j = size - 1; (num != 0 || i < len) && (j >= 0); --j, ++i) { + num += (int32_t)pbuf[j] * 58; + pbuf[j] = num & 255; + num >>= 8; + } + len = i; + ++value; + } + + while (isspace(*value)) ++value; + if (*value != 0) { + if (bfree) taosMemoryFree(pbuf); + return NULL; + } + const uint8_t *it = pbuf + (size - len); + while (it != pbuf + size && *it == 0) ++it; + + uint8_t *result = taosMemoryCalloc(1, size + 1); + if (!result) { + if (bfree) taosMemoryFree(pbuf); + terrno = TSDB_CODE_OUT_OF_MEMORY; + return NULL; + } + + memset(result, 0, nz); + while (it != pbuf + size) result[nz++] = *it++; + + if (outlen) *outlen = nz; + + if (bfree) taosMemoryFree(pbuf); + return result; +} \ No newline at end of file From 1e9c963e024f604e8edc80d930c629d67c56c350 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 31 Jan 2024 17:22:57 +0800 Subject: [PATCH 73/93] feat: support uniq grant --- source/dnode/mnode/impl/inc/mndDef.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index fb768ebd724..bedd72759dc 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -810,8 +810,6 @@ typedef struct { int64_t id : 24; }; }; - // uint16_t port; - // char fqdn[TSDB_FQDN_LEN]; char machine[TSDB_MACHINE_ID_LEN + 1]; } SGrantMachine; From 51a582998ef2f4a46b725e8b3662b5364e9963ae Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 31 Jan 2024 17:26:59 +0800 Subject: [PATCH 74/93] feat: support uniq grant --- source/util/src/tbase64.c | 125 -------------------------------------- 1 file changed, 125 deletions(-) diff --git a/source/util/src/tbase64.c b/source/util/src/tbase64.c index fd67a68b473..f6f12fef978 100644 --- a/source/util/src/tbase64.c +++ b/source/util/src/tbase64.c @@ -101,128 +101,3 @@ base64_decode_error: return result; } - -#define BASE_BUF_SIZE 256 -static const char *basis_58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; - -char *base58_encode(const uint8_t *value, int32_t vlen) { - const uint8_t *pb = value; - const uint8_t *pe = pb + vlen; - uint8_t buf[BASE_BUF_SIZE] = {0}; - uint8_t *pbuf = &buf[0]; - bool bfree = false; - int32_t nz = 0, size = 0, len = 0; - - while (pb != pe && *pb == 0) { - ++pb; - ++nz; - } - - size = (pe - pb) * 69 / 50 + 1; - if (size > BASE_BUF_SIZE) { - if (!(pbuf = taosMemoryCalloc(1, size))) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - return NULL; - } - bfree = true; - } - - while (pb != pe) { - int32_t num = *pb; - int32_t i = 0; - for (int32_t j = (int32_t)size - 1; (num != 0 || i < len) && j >= 0; --j, ++i) { - num += ((int32_t)buf[j]) << 8; - pbuf[j] = num % 58; - num /= 58; - } - len = i; - ++pb; - } - - const uint8_t *pi = pbuf + (size - len); - while (pi != pbuf + size && *pi == 0) ++pi; - uint8_t *result = taosMemoryCalloc(1, size + 1); - if (!result) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - if (bfree) taosMemoryFree(pbuf); - return NULL; - } - memset(result, '1', nz); - while (pi != pbuf + size) result[nz++] = basis_58[*pi++]; - - if (bfree) taosMemoryFree(pbuf); - return result; -} - -static const signed char index_58[256] = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, - -1, -1, -1, -1, -1, -1, -1, 9, 10, 11, 12, 13, 14, 15, 16, -1, 17, 18, 19, 20, 21, -1, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, -1, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; - -uint8_t *base58_decode(const char *value, size_t inlen, int32_t *outlen) { - const char *pe = value + inlen; - uint8_t buf[BASE_BUF_SIZE] = {0}; - uint8_t *pbuf = &buf[0]; - bool bfree = false; - int32_t nz = 0, size = 0, len = 0; - - while (*value && isspace(*value)) ++value; - while (*value == '1') { - ++nz; - ++value; - } - - size = (int32_t)(pe - value) * 733 / 1000 + 1; - if (size > BASE_BUF_SIZE) { - if (!(pbuf = taosMemoryCalloc(1, size))) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - return NULL; - } - bfree = true; - } - - while (*value && !isspace(*value)) { - int32_t num = index_58[(uint8_t)*value]; - if (num == -1) { - if (bfree) taosMemoryFree(pbuf); - return NULL; - } - int32_t i = 0; - for (int32_t j = size - 1; (num != 0 || i < len) && (j >= 0); --j, ++i) { - num += (int32_t)pbuf[j] * 58; - pbuf[j] = num & 255; - num >>= 8; - } - len = i; - ++value; - } - - while (isspace(*value)) ++value; - if (*value != 0) { - if (bfree) taosMemoryFree(pbuf); - return NULL; - } - const uint8_t *it = pbuf + (size - len); - while (it != pbuf + size && *it == 0) ++it; - - uint8_t *result = taosMemoryCalloc(1, size + 1); - if (!result) { - if (bfree) taosMemoryFree(pbuf); - terrno = TSDB_CODE_OUT_OF_MEMORY; - return NULL; - } - - memset(result, 0, nz); - while (it != pbuf + size) result[nz++] = *it++; - - if (outlen) *outlen = nz; - - if (bfree) taosMemoryFree(pbuf); - return result; -} \ No newline at end of file From 318d23c3003218faaa2c2312d567216120650c8b Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 31 Jan 2024 17:27:07 +0800 Subject: [PATCH 75/93] docs:add description for \x --- docs/en/12-taos-sql/18-escape.md | 4 ++-- docs/zh/12-taos-sql/18-escape.md | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/en/12-taos-sql/18-escape.md b/docs/en/12-taos-sql/18-escape.md index a44b21db438..6279b3e8093 100644 --- a/docs/en/12-taos-sql/18-escape.md +++ b/docs/en/12-taos-sql/18-escape.md @@ -22,5 +22,5 @@ description: This document describes the usage of escape characters in TDengine. - Identifier without ``: Error will be returned because identifier must be constituted of digits, ASCII characters or underscore and can't be started with digits - Identifier quoted with ``: Original content is kept, no escaping 2. If there are escape characters in values - - The escape characters will be escaped as the above table. If the escape character doesn't match any supported one, the escape character "\" will be ignored. - - "%" and "\_" are used as wildcards in `like`. `\%` and `\_` should be used to represent literal "%" and "\_" in `like`,. If `\%` and `\_` are used out of `like` context, the evaluation result is "`\%`"and "`\_`", instead of "%" and "\_". + - The escape characters will be escaped as the above table. If the escape character doesn't match any supported one, the escape character \ will be ignored(\x remaining). + - "%" and "\_" are used as wildcards in `like`. `\%` and `\_` should be used to represent literal "%" and "\_" in `like`. If `\%` and `\_` are used out of `like` context, the evaluation result is "`\%`"and "`\_`", instead of "%" and "\_". diff --git a/docs/zh/12-taos-sql/18-escape.md b/docs/zh/12-taos-sql/18-escape.md index 5e0d292d396..eb04acec08a 100644 --- a/docs/zh/12-taos-sql/18-escape.md +++ b/docs/zh/12-taos-sql/18-escape.md @@ -17,7 +17,6 @@ description: TDengine 中使用转义字符的详细规则 | `\%` | % 规则见下 | | `\_` | \_ 规则见下 | -::: ## 转义字符使用规则 @@ -25,5 +24,5 @@ description: TDengine 中使用转义字符的详细规则 1. 普通标识符: 直接提示错误的标识符,因为标识符规定必须是数字、字母和下划线,并且不能以数字开头。 2. 反引号``标识符: 保持原样,不转义 2. 数据里有转义字符 - 1. 遇到上面定义的转义字符会转义(%和\_见下面说明),如果没有匹配的转义字符会忽略掉转义符\。 - 2. 对于%和\_,因为在 like 里这两个字符是通配符,所以在模式匹配 like 里用`\%`%和`\_`表示字符里本身的%和\_,如果在 like 模式匹配上下文之外使用`\%`或`\_`,则它们的计算结果为字符串`\%`和`\_`,而不是%和\_。 + 1. 遇到上面定义的转义字符会转义(%和\_见下面说明),如果没有匹配的转义字符会忽略掉转义符\(\x保持原样)。 + 2. 对于%和\_,因为在 like 里这两个字符是通配符,所以在模式匹配 like 里用`\%`和`\_`表示字符里本身的%和\_,如果在 like 模式匹配上下文之外使用`\%`或`\_`,则它们的计算结果为字符串`\%`和`\_`,而不是%和\_。 From 0ac01ae1b693d9cd5c36e9a96664fbab4434ea47 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 31 Jan 2024 17:37:59 +0800 Subject: [PATCH 76/93] docs:add description for \x --- docs/en/12-taos-sql/18-escape.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/en/12-taos-sql/18-escape.md b/docs/en/12-taos-sql/18-escape.md index 6279b3e8093..2d067b2ad90 100644 --- a/docs/en/12-taos-sql/18-escape.md +++ b/docs/en/12-taos-sql/18-escape.md @@ -7,14 +7,14 @@ description: This document describes the usage of escape characters in TDengine. | Escape Character | **Actual Meaning** | | :--------------: | ------------------------ | -| `\'` | Single quote ' | -| `\"` | Double quote " | -| \n | Line Break | -| \r | Carriage Return | -| \t | tab | -| `\\` | Back Slash \ | -| `\%` | % see below for details | -| `\_` | \_ see below for details | +| `\'` | Single quote `'` | +| `\"` | Double quote `"` | +| `\n` | Line Break | +| `\r` | Carriage Return | +| `\t` | tab | +| `\\` | Back Slash `\ ` | +| `\%` | `%` see below for details | +| `\_` | `_` see below for details | ## Restrictions @@ -22,5 +22,5 @@ description: This document describes the usage of escape characters in TDengine. - Identifier without ``: Error will be returned because identifier must be constituted of digits, ASCII characters or underscore and can't be started with digits - Identifier quoted with ``: Original content is kept, no escaping 2. If there are escape characters in values - - The escape characters will be escaped as the above table. If the escape character doesn't match any supported one, the escape character \ will be ignored(\x remaining). - - "%" and "\_" are used as wildcards in `like`. `\%` and `\_` should be used to represent literal "%" and "\_" in `like`. If `\%` and `\_` are used out of `like` context, the evaluation result is "`\%`"and "`\_`", instead of "%" and "\_". + - The escape characters will be escaped as the above table. If the escape character doesn't match any supported one, the escape character `\ ` will be ignored(`\x` remaining). + - `%` and `_` are used as wildcards in `like`. `\%` and `\_` should be used to represent literal `%` and `_` in `like`. If `\%` and `\_` are used out of `like` context, the evaluation result is `\%` and `\_`, instead of `%` and `_`. From a0b3214eed05f8ec9757a2a949df654fbdfe8061 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 31 Jan 2024 17:41:10 +0800 Subject: [PATCH 77/93] docs:add description for \x --- docs/zh/12-taos-sql/18-escape.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/zh/12-taos-sql/18-escape.md b/docs/zh/12-taos-sql/18-escape.md index eb04acec08a..81e4179042b 100644 --- a/docs/zh/12-taos-sql/18-escape.md +++ b/docs/zh/12-taos-sql/18-escape.md @@ -8,14 +8,14 @@ description: TDengine 中使用转义字符的详细规则 | 字符序列 | **代表的字符** | | :------: | -------------- | -| `\'` | 单引号' | -| `\"` | 双引号" | -| \n | 换行符 | -| \r | 回车符 | -| \t | tab 符 | -| `\\` | 斜杠\ | -| `\%` | % 规则见下 | -| `\_` | \_ 规则见下 | +| `\'` | 单引号`'` | +| `\"` | 双引号`"` | +| `\n` | 换行符 | +| `\r` | 回车符 | +| `\t` | tab 符 | +| `\\` | 斜杠 `\ ` | +| `\%` | `%` 规则见下 | +| `\_` | `_` 规则见下 | ## 转义字符使用规则 @@ -24,5 +24,5 @@ description: TDengine 中使用转义字符的详细规则 1. 普通标识符: 直接提示错误的标识符,因为标识符规定必须是数字、字母和下划线,并且不能以数字开头。 2. 反引号``标识符: 保持原样,不转义 2. 数据里有转义字符 - 1. 遇到上面定义的转义字符会转义(%和\_见下面说明),如果没有匹配的转义字符会忽略掉转义符\(\x保持原样)。 - 2. 对于%和\_,因为在 like 里这两个字符是通配符,所以在模式匹配 like 里用`\%`和`\_`表示字符里本身的%和\_,如果在 like 模式匹配上下文之外使用`\%`或`\_`,则它们的计算结果为字符串`\%`和`\_`,而不是%和\_。 + 1. 遇到上面定义的转义字符会转义(`%`和`_`见下面说明),如果没有匹配的转义字符会忽略掉转义符`\ `(`\x`保持原样)。 + 2. 对于`%`和`_`,因为在`like`里这两个字符是通配符,所以在模式匹配`like`里用`\%`和`\_`表示字符里本身的`%`和`_`,如果在`like`模式匹配上下文之外使用`\%`或`\_`,则它们的计算结果为字符串`\%`和`\_`,而不是`%`和`_`。 From e5b47eeeb983839fbfd632f5ce6e80b486593f20 Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 1 Feb 2024 07:32:43 +0800 Subject: [PATCH 78/93] feat: support uniq grant --- include/common/tgrant.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index 51303933be7..dbca2ac90c2 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -48,12 +48,10 @@ typedef enum { TSDB_GRANT_STABLE, TSDB_GRANT_TABLE, TSDB_GRANT_SUBSCRIPTION, - TSDB_GRANT_STREAM_EXPIRE, - TSDB_GRANT_SUBSCRIPTION_EXPIRE, - TSDB_GRANT_AUDIT_EXPIRE, - TSDB_GRANT_CSV_EXPIRE, - TSDB_GRANT_MULTI_TIER_EXPIRE, - TSDB_GRANT_BACKUP_RESTORE_EXPIRE, + TSDB_GRANT_AUDIT, + TSDB_GRANT_CSV, + TSDB_GRANT_MULTI_TIER, + TSDB_GRANT_BACKUP_RESTORE, } EGrantType; int32_t grantCheck(EGrantType grant); From 0707a22b4efc48b7f18528441c745936f68f683a Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 1 Feb 2024 07:36:11 +0800 Subject: [PATCH 79/93] feat: support uniq grant --- include/util/taoserror.h | 3 +++ source/util/src/terror.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 62236290d5e..94fe80b901a 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -574,6 +574,9 @@ int32_t* taosGetErrno(); #define TSDB_CODE_GRANT_MACHINES_MISMATCH TAOS_DEF_ERROR_CODE(0, 0x0820) #define TSDB_CODE_GRANT_OPT_EXPIRE_TOO_LARGE TAOS_DEF_ERROR_CODE(0, 0x0821) #define TSDB_CODE_GRANT_DUPLICATED_ACTIVE TAOS_DEF_ERROR_CODE(0, 0x0822) +#define TSDB_CODE_GRANT_VIEW_LIMITED TAOS_DEF_ERROR_CODE(0, 0x0823) +#define TSDB_CODE_GRANT_CSV_LIMITED TAOS_DEF_ERROR_CODE(0, 0x0824) +#define TSDB_CODE_GRANT_AUDIT_LIMITED TAOS_DEF_ERROR_CODE(0, 0x0825) // sync // #define TSDB_CODE_SYN_INVALID_CONFIG TAOS_DEF_ERROR_CODE(0, 0x0900) // 2.x diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 946f7faf6c7..9fcca86744b 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -461,6 +461,9 @@ TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_LAST_ACTIVE_NOT_FOUND, "The historial active TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_MACHINES_MISMATCH, "Cluster machines mismatch with active code") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_OPT_EXPIRE_TOO_LARGE, "Expire time of optional grant item is too large") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_DUPLICATED_ACTIVE, "The active code can't be activated repeatedly") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_VIEW_LIMITED, "Number of view has reached the licensed upper limit") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_CSV_LIMITED, "Csv has reached the licensed upper limit") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_AUDIT_LIMITED, "Audit has reached the licensed upper limit") // sync TAOS_DEFINE_ERROR(TSDB_CODE_SYN_TIMEOUT, "Sync timeout") From 57714dff65720c8533acbb8fa3f683f20bbf79ec Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Wed, 31 Jan 2024 18:28:51 +0800 Subject: [PATCH 80/93] fix: reset sync timer although failed to enqueue since Out of Memory in rpc queue --- source/libs/sync/src/syncMain.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index edaf59f9db0..c0808a95cc1 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -2141,7 +2141,7 @@ static void syncNodeEqPingTimer(void* param, void* tmrId) { if (code != 0) { sError("failed to build ping msg"); rpcFreeCont(rpcMsg.pCont); - return; + goto _out; } // sTrace("enqueue ping msg"); @@ -2149,9 +2149,10 @@ static void syncNodeEqPingTimer(void* param, void* tmrId) { if (code != 0) { sError("failed to sync enqueue ping msg since %s", terrstr()); rpcFreeCont(rpcMsg.pCont); - return; + goto _out; } + _out: taosTmrReset(syncNodeEqPingTimer, pNode->pingTimerMS, pNode, syncEnv()->pTimerManager, &pNode->pPingTimer); } } @@ -2211,7 +2212,7 @@ static void syncNodeEqHeartbeatTimer(void* param, void* tmrId) { if (code != 0) { sError("failed to build heartbeat msg"); - return; + goto _out; } sTrace("vgId:%d, enqueue heartbeat timer", pNode->vgId); @@ -2219,9 +2220,10 @@ static void syncNodeEqHeartbeatTimer(void* param, void* tmrId) { if (code != 0) { sError("failed to enqueue heartbeat msg since %s", terrstr()); rpcFreeCont(rpcMsg.pCont); - return; + goto _out; } + _out: taosTmrReset(syncNodeEqHeartbeatTimer, pNode->heartbeatTimerMS, pNode, syncEnv()->pTimerManager, &pNode->pHeartbeatTimer); From cb2ea4a721c4e1d30cb7b0800ff24c32d2719166 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 1 Feb 2024 11:37:57 +0800 Subject: [PATCH 81/93] fix(stream): take ver snapshot for all vgroups before launching stream with fill-history option opened. --- include/common/tmsg.h | 6 + include/dnode/vnode/tqCommon.h | 2 +- include/libs/function/functionMgt.h | 1 + include/libs/parser/parser.h | 2 +- include/libs/scalar/scalar.h | 4 +- include/libs/stream/tstream.h | 2 +- source/client/src/clientImpl.c | 55 +++++++-- source/client/test/clientTests.cpp | 5 +- source/common/src/tmsg.c | 34 +++++- source/dnode/mnode/impl/inc/mndScheduler.h | 2 +- source/dnode/mnode/impl/src/mndScheduler.c | 118 ++++++++++++------- source/dnode/mnode/impl/src/mndSma.c | 2 +- source/dnode/mnode/impl/src/mndStream.c | 44 +++---- source/dnode/vnode/src/tq/tq.c | 20 ++-- source/dnode/vnode/src/tqCommon/tqCommon.c | 9 +- source/dnode/vnode/src/tsdb/tsdbRead2.c | 2 + source/libs/executor/inc/executorInt.h | 5 +- source/libs/executor/src/cachescanoperator.c | 4 +- source/libs/executor/src/groupoperator.c | 15 --- source/libs/executor/src/scanoperator.c | 84 +++++++++---- source/libs/function/src/builtins.c | 34 +++--- source/libs/nodes/src/nodesUtilFuncs.c | 4 +- source/libs/parser/inc/parInt.h | 4 +- source/libs/parser/src/parTranslater.c | 95 +++++++++++++-- source/libs/parser/src/parser.c | 13 +- source/libs/scalar/src/sclfunc.c | 30 +---- source/libs/stream/inc/streamInt.h | 2 +- source/libs/stream/src/streamExec.c | 9 +- source/libs/stream/src/streamMeta.c | 5 - source/libs/stream/src/streamStart.c | 27 +---- source/libs/stream/src/streamTask.c | 90 ++++++++------ source/libs/stream/src/streamTaskSm.c | 2 +- 32 files changed, 454 insertions(+), 277 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 69677e6bc1e..1158a461616 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -2408,6 +2408,11 @@ typedef struct SColLocation { int8_t type; } SColLocation; +typedef struct SVgroupVer { + int32_t vgId; + int64_t ver; +} SVgroupVer; + typedef struct { char name[TSDB_STREAM_FNAME_LEN]; char sourceDB[TSDB_DB_FNAME_LEN]; @@ -2431,6 +2436,7 @@ typedef struct { int64_t deleteMark; int8_t igUpdate; int64_t lastTs; + SArray* pVgroupVerList; } SCMCreateStreamReq; typedef struct { diff --git a/include/dnode/vnode/tqCommon.h b/include/dnode/vnode/tqCommon.h index dc145819ca8..fc9b88340f9 100644 --- a/include/dnode/vnode/tqCommon.h +++ b/include/dnode/vnode/tqCommon.h @@ -18,7 +18,7 @@ // message process int32_t tqStreamTaskStartAsync(SStreamMeta* pMeta, SMsgCb* cb, bool restart); -int32_t tqStreamOneTaskStartAsync(SStreamMeta* pMeta, SMsgCb* cb, int64_t streamId, int32_t taskId); +int32_t tqStreamStartOneTaskAsync(SStreamMeta* pMeta, SMsgCb* cb, int64_t streamId, int32_t taskId); int32_t tqStreamTaskProcessUpdateReq(SStreamMeta* pMeta, SMsgCb* cb, SRpcMsg* pMsg, bool restored); int32_t tqStreamTaskProcessDispatchReq(SStreamMeta* pMeta, SRpcMsg* pMsg); int32_t tqStreamTaskProcessDispatchRsp(SStreamMeta* pMeta, SRpcMsg* pMsg); diff --git a/include/libs/function/functionMgt.h b/include/libs/function/functionMgt.h index a0b5d938e35..3c5f23af6b2 100644 --- a/include/libs/function/functionMgt.h +++ b/include/libs/function/functionMgt.h @@ -126,6 +126,7 @@ typedef enum EFunctionType { FUNCTION_TYPE_TAGS, FUNCTION_TYPE_TBUID, FUNCTION_TYPE_VGID, + FUNCTION_TYPE_VGVER, // internal function FUNCTION_TYPE_SELECT_VALUE = 3750, diff --git a/include/libs/parser/parser.h b/include/libs/parser/parser.h index bb206b5a028..6a41f4607bc 100644 --- a/include/libs/parser/parser.h +++ b/include/libs/parser/parser.h @@ -106,7 +106,7 @@ int32_t qAnalyseSqlSemantic(SParseContext* pCxt, const struct SCatalogReq* pCata const struct SMetaData* pMetaData, SQuery* pQuery); int32_t qContinueParseSql(SParseContext* pCxt, struct SCatalogReq* pCatalogReq, const struct SMetaData* pMetaData, SQuery* pQuery); -int32_t qContinueParsePostQuery(SParseContext* pCxt, SQuery* pQuery, void** pResRow); +int32_t qContinueParsePostQuery(SParseContext* pCxt, SQuery* pQuery, SSDataBlock* pBlock); void qDestroyParseContext(SParseContext* pCxt); diff --git a/include/libs/scalar/scalar.h b/include/libs/scalar/scalar.h index 789ba554e2a..5e946357db2 100644 --- a/include/libs/scalar/scalar.h +++ b/include/libs/scalar/scalar.h @@ -96,9 +96,7 @@ int32_t winDurFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOu int32_t qStartTsFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t qEndTsFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); -int32_t qTbnameFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); -int32_t qTbUidFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); -int32_t qVgIdFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t qPseudoTagFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); /* Aggregation functions */ int32_t countScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); diff --git a/include/libs/stream/tstream.h b/include/libs/stream/tstream.h index 747ba34c971..9738be839d3 100644 --- a/include/libs/stream/tstream.h +++ b/include/libs/stream/tstream.h @@ -531,7 +531,7 @@ typedef struct SStreamMeta { int32_t tEncodeStreamEpInfo(SEncoder* pEncoder, const SStreamChildEpInfo* pInfo); int32_t tDecodeStreamEpInfo(SDecoder* pDecoder, SStreamChildEpInfo* pInfo); -SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, bool fillHistory, int64_t triggerParam, +SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, SEpSet* pEpset, bool fillHistory, int64_t triggerParam, SArray* pTaskList, bool hasFillhistory); int32_t tEncodeStreamTask(SEncoder* pEncoder, const SStreamTask* pTask); int32_t tDecodeStreamTask(SDecoder* pDecoder, SStreamTask* pTask); diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 9800d233e90..71f6a466b9f 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -880,19 +880,21 @@ static bool incompletaFileParsing(SNode* pStmt) { return QUERY_NODE_VNODE_MODIFY_STMT != nodeType(pStmt) ? false : ((SVnodeModifyOpStmt*)pStmt)->fileProcessing; } -void continuePostSubQuery(SRequestObj* pRequest, TAOS_ROW row) { +void continuePostSubQuery(SRequestObj* pRequest, SSDataBlock* pBlock) { SSqlCallbackWrapper* pWrapper = pRequest->pWrapper; - int32_t code = nodesAcquireAllocator(pWrapper->pParseCtx->allocatorId); + + int32_t code = nodesAcquireAllocator(pWrapper->pParseCtx->allocatorId); if (TSDB_CODE_SUCCESS == code) { int64_t analyseStart = taosGetTimestampUs(); - code = qContinueParsePostQuery(pWrapper->pParseCtx, pRequest->pQuery, (void**)row); + code = qContinueParsePostQuery(pWrapper->pParseCtx, pRequest->pQuery, pBlock); pRequest->metric.analyseCostUs += taosGetTimestampUs() - analyseStart; } + if (TSDB_CODE_SUCCESS == code) { code = qContinuePlanPostQuery(pRequest->pPostPlan); } - nodesReleaseAllocator(pWrapper->pParseCtx->allocatorId); + nodesReleaseAllocator(pWrapper->pParseCtx->allocatorId); handleQueryAnslyseRes(pWrapper, NULL, code); } @@ -916,6 +918,43 @@ void returnToUser(SRequestObj* pRequest) { } } +static SSDataBlock* createResultBlock(TAOS_RES* pRes, int32_t numOfRows) { + int64_t lastTs = 0; + + TAOS_FIELD* pResFields = taos_fetch_fields(pRes); + int32_t numOfFields = taos_num_fields(pRes); + + SSDataBlock* pBlock = createDataBlock(); + + for(int32_t i = 0; i < numOfFields; ++i) { + SColumnInfoData colInfoData = createColumnInfoData(pResFields[i].type, pResFields[i].bytes, i + 1); + blockDataAppendColInfo(pBlock, &colInfoData); + } + + blockDataEnsureCapacity(pBlock, numOfRows); + + for (int32_t i = 0; i < numOfRows; ++i) { + TAOS_ROW pRow = taos_fetch_row(pRes); + int64_t ts = *(int64_t*)pRow[0]; + if (lastTs < ts) { + lastTs = ts; + } + + for(int32_t j = 0; j < numOfFields; ++j) { + SColumnInfoData* pColInfoData = taosArrayGet(pBlock->pDataBlock, j); + colDataSetVal(pColInfoData, i, pRow[j], false); + } + + tscDebug("lastKey:%" PRId64 " vgId:%d, vgVer:%" PRId64, ts, *(int32_t*)pRow[1], *(int64_t*)pRow[2]); + } + + pBlock->info.window.ekey = lastTs; + pBlock->info.rows = numOfRows; + + tscDebug("lastKey:%"PRId64" numOfRows:%d from all vgroups", lastTs, numOfRows); + return pBlock; +} + void postSubQueryFetchCb(void* param, TAOS_RES* res, int32_t rowNum) { SRequestObj* pRequest = (SRequestObj*)res; if (pRequest->code) { @@ -923,14 +962,10 @@ void postSubQueryFetchCb(void* param, TAOS_RES* res, int32_t rowNum) { return; } - TAOS_ROW row = NULL; - if (rowNum > 0) { - row = taos_fetch_row(res); // for single row only now - } - + SSDataBlock* pBlock = createResultBlock(res, rowNum); SRequestObj* pNextReq = acquireRequest(pRequest->relation.nextRefId); if (pNextReq) { - continuePostSubQuery(pNextReq, row); + continuePostSubQuery(pNextReq, pBlock); releaseRequest(pRequest->relation.nextRefId); } else { tscError("0x%" PRIx64 ", next req ref 0x%" PRIx64 " is not there, reqId:0x%" PRIx64, pRequest->self, diff --git a/source/client/test/clientTests.cpp b/source/client/test/clientTests.cpp index e6519a436e3..c1adc49d487 100644 --- a/source/client/test/clientTests.cpp +++ b/source/client/test/clientTests.cpp @@ -829,7 +829,10 @@ TEST(clientCase, projection_query_tables) { TAOS_RES* pRes = taos_query(pConn, "use abc1"); taos_free_result(pRes); - pRes = taos_query(pConn, "create stable st2 (ts timestamp, k int, f varchar(4096)) tags(a int)"); +// TAOS_RES* pRes = taos_query(pConn, "select tbname, last(ts) from abc1.stable_1 group by tbname"); +// taos_free_result(pRes); + + pRes = taos_query(pConn, "create stream stream_1 trigger at_once fill_history 1 ignore expired 0 into str_res1 as select _wstart as ts, count(*) from stable_1 interval(10s);"); if (taos_errno(pRes) != 0) { printf("failed to create table tu, reason:%s\n", taos_errstr(pRes)); } diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 3f1cfbc87f4..2ab4c9ed8db 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -7217,6 +7217,7 @@ int32_t tSerializeSCMCreateStreamReq(void *buf, int32_t bufLen, const SCMCreateS if (tEncodeI8(&encoder, pReq->createStb) < 0) return -1; if (tEncodeU64(&encoder, pReq->targetStbUid) < 0) return -1; + if (tEncodeI32(&encoder, taosArrayGetSize(pReq->fillNullCols)) < 0) return -1; for (int32_t i = 0; i < taosArrayGetSize(pReq->fillNullCols); ++i) { SColLocation *pCol = taosArrayGet(pReq->fillNullCols, i); @@ -7224,10 +7225,19 @@ int32_t tSerializeSCMCreateStreamReq(void *buf, int32_t bufLen, const SCMCreateS if (tEncodeI16(&encoder, pCol->colId) < 0) return -1; if (tEncodeI8(&encoder, pCol->type) < 0) return -1; } + if (tEncodeI64(&encoder, pReq->deleteMark) < 0) return -1; if (tEncodeI8(&encoder, pReq->igUpdate) < 0) return -1; if (tEncodeI64(&encoder, pReq->lastTs) < 0) return -1; + if (tEncodeI32(&encoder, taosArrayGetSize(pReq->pVgroupVerList)) < 0) return -1; + + for(int32_t i = 0; i < taosArrayGetSize(pReq->pVgroupVerList); ++i) { + SVgroupVer* p = taosArrayGet(pReq->pVgroupVerList, i); + if (tEncodeI32(&encoder, p->vgId) < 0) return -1; + if (tEncodeI64(&encoder, p->ver) < 0) return -1; + } + tEndEncode(&encoder); int32_t tlen = encoder.pos; @@ -7238,6 +7248,8 @@ int32_t tSerializeSCMCreateStreamReq(void *buf, int32_t bufLen, const SCMCreateS int32_t tDeserializeSCMCreateStreamReq(void *buf, int32_t bufLen, SCMCreateStreamReq *pReq) { int32_t sqlLen = 0; int32_t astLen = 0; + int32_t numOfFillNullCols = 0; + int32_t numOfVgVer = 0; SDecoder decoder = {0}; tDecoderInit(&decoder, buf, bufLen); @@ -7289,7 +7301,6 @@ int32_t tDeserializeSCMCreateStreamReq(void *buf, int32_t bufLen, SCMCreateStrea } if (tDecodeI8(&decoder, &pReq->createStb) < 0) return -1; if (tDecodeU64(&decoder, &pReq->targetStbUid) < 0) return -1; - int32_t numOfFillNullCols = 0; if (tDecodeI32(&decoder, &numOfFillNullCols) < 0) return -1; if (numOfFillNullCols > 0) { pReq->fillNullCols = taosArrayInit(numOfFillNullCols, sizeof(SColLocation)); @@ -7314,9 +7325,28 @@ int32_t tDeserializeSCMCreateStreamReq(void *buf, int32_t bufLen, SCMCreateStrea if (tDecodeI8(&decoder, &pReq->igUpdate) < 0) return -1; if (tDecodeI64(&decoder, &pReq->lastTs) < 0) return -1; - tEndDecode(&decoder); + if (tDecodeI32(&decoder, &numOfVgVer) < 0) return -1; + if (numOfVgVer > 0) { + pReq->pVgroupVerList = taosArrayInit(numOfVgVer, sizeof(SVgroupVer)); + if (pReq->pVgroupVerList == NULL) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + return -1; + } + for (int32_t i = 0; i < numOfVgVer; ++i) { + SVgroupVer v = {0}; + if (tDecodeI32(&decoder, &v.vgId) < 0) return -1; + if (tDecodeI64(&decoder, &v.ver) < 0) return -1; + if (taosArrayPush(pReq->pVgroupVerList, &v) == NULL) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + return -1; + } + } + } + + tEndDecode(&decoder); tDecoderClear(&decoder); + return 0; } diff --git a/source/dnode/mnode/impl/inc/mndScheduler.h b/source/dnode/mnode/impl/inc/mndScheduler.h index cba52c6b45a..3c51f34fee2 100644 --- a/source/dnode/mnode/impl/inc/mndScheduler.h +++ b/source/dnode/mnode/impl/inc/mndScheduler.h @@ -27,7 +27,7 @@ int32_t mndSchedInitSubEp(SMnode* pMnode, const SMqTopicObj* pTopic, SMqSubscrib int32_t mndConvertRsmaTask(char** pDst, int32_t* pDstLen, const char* ast, int64_t uid, int8_t triggerType, int64_t watermark, int64_t deleteMark); -int32_t mndScheduleStream(SMnode* pMnode, SStreamObj* pStream, int64_t nextWindowSkey); +int32_t mndScheduleStream(SMnode* pMnode, SStreamObj* pStream, int64_t skey, SArray* pVerList); #ifdef __cplusplus } diff --git a/source/dnode/mnode/impl/src/mndScheduler.c b/source/dnode/mnode/impl/src/mndScheduler.c index 39121cecd9a..1d8b2cf5d32 100644 --- a/source/dnode/mnode/impl/src/mndScheduler.c +++ b/source/dnode/mnode/impl/src/mndScheduler.c @@ -234,36 +234,72 @@ int32_t doAddShuffleSinkTask(SMnode* pMnode, SArray* pTaskList, SStreamObj* pStr int32_t doAddSinkTask(SStreamObj* pStream, SArray* pTaskList, SMnode* pMnode, int32_t vgId, SVgObj* pVgroup, SEpSet* pEpset, bool isFillhistory) { - int64_t uid = (isFillhistory)? pStream->hTaskUid:pStream->uid; - SStreamTask* pTask = tNewStreamTask(uid, TASK_LEVEL__SINK, isFillhistory, 0, pTaskList, pStream->conf.fillHistory); + int64_t uid = (isFillhistory) ? pStream->hTaskUid : pStream->uid; + SStreamTask* pTask = + tNewStreamTask(uid, TASK_LEVEL__SINK, pEpset, isFillhistory, 0, pTaskList, pStream->conf.fillHistory); if (pTask == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; return -1; } - epsetAssign(&(pTask)->info.mnodeEpset, pEpset); - pTask->info.nodeId = vgId; pTask->info.epSet = mndGetVgroupEpset(pMnode, pVgroup); mndSetSinkTaskInfo(pStream, pTask); return 0; } +static int64_t getVgroupLastVer(const SArray* pList, int32_t vgId) { + for(int32_t i = 0; i < taosArrayGetSize(pList); ++i) { + SVgroupVer* pVer = taosArrayGet(pList, i); + if (pVer->vgId == vgId) { + return pVer->ver; + } + } + + mError("failed to find the vgId:%d for extract last version", vgId); + return -1; +} + +static void streamTaskSetDataRange(SStreamTask* pTask, int64_t skey, SArray* pVerList, int32_t vgId) { + int64_t latestVer = getVgroupLastVer(pVerList, vgId); + if (latestVer < 0) { + latestVer = 0; + } + + // set the correct ts, which is the last key of queried table. + SDataRange* pRange = &pTask->dataRange; + STimeWindow* pWindow = &pRange->window; + + if (pTask->info.fillHistory) { + pWindow->skey = INT64_MIN; + pWindow->ekey = skey - 1; + + pRange->range.minVer = 0; + pRange->range.maxVer = latestVer; + mDebug("add fill-history source task 0x%x timeWindow:%" PRId64 "-%" PRId64 " verRange:%" PRId64 "-%" PRId64, + pTask->id.taskId, pWindow->skey, pWindow->ekey, pRange->range.minVer, pRange->range.maxVer); + } else { + pWindow->skey = skey; + pWindow->ekey = INT64_MAX; + + pRange->range.minVer = latestVer + 1; + pRange->range.maxVer = INT64_MAX; + + mDebug("add source task 0x%x timeWindow:%" PRId64 "-%" PRId64 " verRange:%" PRId64 "-%" PRId64, + pTask->id.taskId, pWindow->skey, pWindow->ekey, pRange->range.minVer, pRange->range.maxVer); + } +} + static int32_t addSourceTask(SMnode* pMnode, SVgObj* pVgroup, SArray* pTaskList, SArray* pSinkTaskList, - SStreamObj* pStream, SSubplan* plan, uint64_t uid, SEpSet* pEpset, bool fillHistory, - bool hasExtraSink, int64_t nextWindowSkey, bool hasFillHistory) { - SStreamTask* pTask = - tNewStreamTask(uid, TASK_LEVEL__SOURCE, fillHistory, pStream->conf.triggerParam, pTaskList, hasFillHistory); + SStreamObj* pStream, SSubplan* plan, uint64_t uid, SEpSet* pEpset, int64_t skey, + SArray* pVerList, bool fillHistory, bool hasExtraSink, bool hasFillHistory) { + int64_t t = pStream->conf.triggerParam; + SStreamTask* pTask = tNewStreamTask(uid, TASK_LEVEL__SOURCE, pEpset, fillHistory, t, pTaskList, hasFillHistory); if (pTask == NULL) { return terrno; } - epsetAssign(&pTask->info.mnodeEpset, pEpset); - STimeWindow* pWindow = &pTask->dataRange.window; - - pWindow->skey = INT64_MIN; - pWindow->ekey = nextWindowSkey - 1; - mDebug("add source task 0x%x window:%" PRId64 " - %" PRId64, pTask->id.taskId, pWindow->skey, pWindow->ekey); + streamTaskSetDataRange(pTask, skey, pVerList, pVgroup->vgId); // sink or dispatch if (hasExtraSink) { @@ -308,7 +344,7 @@ static void setHTasksId(SArray* pTaskList, const SArray* pHTaskList) { } static int32_t addSourceTasksForOneLevelStream(SMnode* pMnode, const SQueryPlan* pPlan, SStreamObj* pStream, - SEpSet* pEpset, bool hasExtraSink, int64_t nextWindowSkey) { + SEpSet* pEpset, bool hasExtraSink, int64_t skey, SArray* pVerList) { // create exec stream task, since only one level, the exec task is also the source task SArray* pTaskList = addNewTaskList(pStream->tasks); SSdb* pSdb = pMnode->pSdb; @@ -345,8 +381,8 @@ static int32_t addSourceTasksForOneLevelStream(SMnode* pMnode, const SQueryPlan* // new stream task SArray** pSinkTaskList = taosArrayGet(pStream->tasks, SINK_NODE_LEVEL); - int32_t code = addSourceTask(pMnode, pVgroup, pTaskList, *pSinkTaskList, pStream, plan, pStream->uid, pEpset, - false, hasExtraSink, nextWindowSkey, pStream->conf.fillHistory); + int32_t code = addSourceTask(pMnode, pVgroup, pTaskList, *pSinkTaskList, pStream, plan, pStream->uid, pEpset, skey, + pVerList, false, hasExtraSink, pStream->conf.fillHistory); if (code != TSDB_CODE_SUCCESS) { sdbRelease(pSdb, pVgroup); return -1; @@ -354,8 +390,8 @@ static int32_t addSourceTasksForOneLevelStream(SMnode* pMnode, const SQueryPlan* if (pStream->conf.fillHistory) { SArray** pHSinkTaskList = taosArrayGet(pStream->pHTasksList, SINK_NODE_LEVEL); - code = addSourceTask(pMnode, pVgroup, pHTaskList, *pHSinkTaskList, pStream, plan, pStream->hTaskUid, - pEpset, true, hasExtraSink, nextWindowSkey, true); + code = addSourceTask(pMnode, pVgroup, pHTaskList, *pHSinkTaskList, pStream, plan, pStream->hTaskUid, pEpset, skey, + pVerList, true, hasExtraSink, true); } sdbRelease(pSdb, pVgroup); @@ -371,24 +407,17 @@ static int32_t addSourceTasksForOneLevelStream(SMnode* pMnode, const SQueryPlan* return TSDB_CODE_SUCCESS; } -static int32_t doAddSourceTask(SArray* pTaskList, bool isFillhistory, int64_t uid, SStreamTask* pDownstreamTask, - SMnode* pMnode, SSubplan* pPlan, SVgObj* pVgroup, SEpSet* pEpset, - int64_t nextWindowSkey, bool hasFillHistory) { - SStreamTask* pTask = tNewStreamTask(uid, TASK_LEVEL__SOURCE, isFillhistory, 0, pTaskList, hasFillHistory); +static int32_t addSourceTaskForMultiLevelStream(SArray* pTaskList, bool isFillhistory, int64_t uid, + SStreamTask* pDownstreamTask, SMnode* pMnode, SSubplan* pPlan, + SVgObj* pVgroup, SEpSet* pEpset, int64_t skey, SArray* pVerList, + bool hasFillHistory) { + SStreamTask* pTask = tNewStreamTask(uid, TASK_LEVEL__SOURCE, pEpset, isFillhistory, 0, pTaskList, hasFillHistory); if (pTask == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; return -1; } - epsetAssign(&(pTask)->info.mnodeEpset, pEpset); - - // set the correct ts, which is the last key of queried table. - STimeWindow* pWindow = &pTask->dataRange.window; - pWindow->skey = INT64_MIN; - pWindow->ekey = nextWindowSkey - 1; - - mDebug("s-task:0x%x level:%d set time window:%" PRId64 " - %" PRId64, pTask->id.taskId, pTask->info.taskLevel, - pWindow->skey, pWindow->ekey); + streamTaskSetDataRange(pTask, skey, pVerList, pVgroup->vgId); // all the source tasks dispatch result to a single agg node. streamTaskSetFixedDownstreamInfo(pTask, pDownstreamTask); @@ -401,14 +430,12 @@ static int32_t doAddSourceTask(SArray* pTaskList, bool isFillhistory, int64_t ui static int32_t doAddAggTask(uint64_t uid, SArray* pTaskList, SArray* pSinkNodeList, SMnode* pMnode, SStreamObj* pStream, SEpSet* pEpset, bool fillHistory, SStreamTask** pAggTask, bool hasFillhistory) { - *pAggTask = tNewStreamTask(uid, TASK_LEVEL__AGG, fillHistory, pStream->conf.triggerParam, pTaskList, hasFillhistory); + *pAggTask = tNewStreamTask(uid, TASK_LEVEL__AGG, pEpset, fillHistory, pStream->conf.triggerParam, pTaskList, hasFillhistory); if (*pAggTask == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; return -1; } - epsetAssign(&(*pAggTask)->info.mnodeEpset, pEpset); - // dispatch if (mndAddDispatcherForInternalTask(pMnode, pStream, pSinkNodeList, *pAggTask) < 0) { return -1; @@ -492,7 +519,7 @@ static int32_t addAggTask(SStreamObj* pStream, SMnode* pMnode, SQueryPlan* pPlan static int32_t addSourceTasksForMultiLevelStream(SMnode* pMnode, SQueryPlan* pPlan, SStreamObj* pStream, SStreamTask* pDownstreamTask, SStreamTask* pHDownstreamTask, - SEpSet* pEpset, int64_t nextWindowSkey) { + SEpSet* pEpset, int64_t skey, SArray* pVerList) { SArray* pSourceTaskList = addNewTaskList(pStream->tasks); SArray* pHSourceTaskList = NULL; @@ -521,8 +548,8 @@ static int32_t addSourceTasksForMultiLevelStream(SMnode* pMnode, SQueryPlan* pPl continue; } - int32_t code = doAddSourceTask(pSourceTaskList, false, pStream->uid, pDownstreamTask, pMnode, plan, pVgroup, pEpset, - nextWindowSkey, pStream->conf.fillHistory); + int32_t code = addSourceTaskForMultiLevelStream(pSourceTaskList, false, pStream->uid, pDownstreamTask, pMnode, plan, pVgroup, pEpset, + skey, pVerList, pStream->conf.fillHistory); if (code != TSDB_CODE_SUCCESS) { sdbRelease(pSdb, pVgroup); terrno = code; @@ -530,8 +557,8 @@ static int32_t addSourceTasksForMultiLevelStream(SMnode* pMnode, SQueryPlan* pPl } if (pStream->conf.fillHistory) { - code = doAddSourceTask(pHSourceTaskList, true, pStream->hTaskUid, pHDownstreamTask, pMnode, plan, pVgroup, pEpset, - nextWindowSkey, pStream->conf.fillHistory); + code = addSourceTaskForMultiLevelStream(pHSourceTaskList, true, pStream->hTaskUid, pHDownstreamTask, pMnode, plan, pVgroup, pEpset, + skey, pVerList, pStream->conf.fillHistory); if (code != TSDB_CODE_SUCCESS) { sdbRelease(pSdb, pVgroup); return code; @@ -580,7 +607,8 @@ static void setSinkTaskUpstreamInfo(SArray* pTasksList, const SStreamTask* pUpst } } -static int32_t doScheduleStream(SStreamObj* pStream, SMnode* pMnode, SQueryPlan* pPlan, int64_t nextWindowSkey, SEpSet* pEpset) { +static int32_t doScheduleStream(SStreamObj* pStream, SMnode* pMnode, SQueryPlan* pPlan, SEpSet* pEpset, int64_t skey, + SArray* pVerList) { SSdb* pSdb = pMnode->pSdb; int32_t numOfPlanLevel = LIST_LENGTH(pPlan->pSubplans); @@ -637,15 +665,15 @@ static int32_t doScheduleStream(SStreamObj* pStream, SMnode* pMnode, SQueryPlan* } // source level - return addSourceTasksForMultiLevelStream(pMnode, pPlan, pStream, pAggTask, pHAggTask, pEpset, nextWindowSkey); + return addSourceTasksForMultiLevelStream(pMnode, pPlan, pStream, pAggTask, pHAggTask, pEpset, skey, pVerList); } else if (numOfPlanLevel == 1) { - return addSourceTasksForOneLevelStream(pMnode, pPlan, pStream, pEpset, hasExtraSink, nextWindowSkey); + return addSourceTasksForOneLevelStream(pMnode, pPlan, pStream, pEpset, hasExtraSink, skey, pVerList); } return 0; } -int32_t mndScheduleStream(SMnode* pMnode, SStreamObj* pStream, int64_t nextWindowSkey) { +int32_t mndScheduleStream(SMnode* pMnode, SStreamObj* pStream, int64_t skey, SArray* pVgVerList) { SQueryPlan* pPlan = qStringToQueryPlan(pStream->physicalPlan); if (pPlan == NULL) { terrno = TSDB_CODE_QRY_INVALID_INPUT; @@ -655,7 +683,7 @@ int32_t mndScheduleStream(SMnode* pMnode, SStreamObj* pStream, int64_t nextWindo SEpSet mnodeEpset = {0}; mndGetMnodeEpSet(pMnode, &mnodeEpset); - int32_t code = doScheduleStream(pStream, pMnode, pPlan, nextWindowSkey, &mnodeEpset); + int32_t code = doScheduleStream(pStream, pMnode, pPlan, &mnodeEpset, skey, pVgVerList); qDestroyQueryPlan(pPlan); return code; diff --git a/source/dnode/mnode/impl/src/mndSma.c b/source/dnode/mnode/impl/src/mndSma.c index e6027a0332d..cfd7ecf054c 100644 --- a/source/dnode/mnode/impl/src/mndSma.c +++ b/source/dnode/mnode/impl/src/mndSma.c @@ -638,7 +638,7 @@ static int32_t mndCreateSma(SMnode *pMnode, SRpcMsg *pReq, SMCreateSmaReq *pCrea if (mndSetCreateSmaVgroupCommitLogs(pMnode, pTrans, &streamObj.fixedSinkVg) != 0) goto _OVER; if (mndSetUpdateSmaStbCommitLogs(pMnode, pTrans, pStb) != 0) goto _OVER; if (mndSetCreateSmaVgroupRedoActions(pMnode, pTrans, pDb, &streamObj.fixedSinkVg, &smaObj) != 0) goto _OVER; - if (mndScheduleStream(pMnode, &streamObj, 1685959190000) != 0) goto _OVER; + if (mndScheduleStream(pMnode, &streamObj, 1685959190000, NULL) != 0) goto _OVER; if (mndPersistStream(pTrans, &streamObj) != 0) goto _OVER; if (mndTransPrepare(pMnode, pTrans) != 0) goto _OVER; diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index 0de951596f1..6640e5dca35 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -649,8 +649,8 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) { return -1; } - SCMCreateStreamReq createStreamReq = {0}; - if (tDeserializeSCMCreateStreamReq(pReq->pCont, pReq->contLen, &createStreamReq) != 0) { + SCMCreateStreamReq createReq = {0}; + if (tDeserializeSCMCreateStreamReq(pReq->pCont, pReq->contLen, &createReq) != 0) { terrno = TSDB_CODE_INVALID_MSG; goto _OVER; } @@ -659,17 +659,17 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) { terrno = TSDB_CODE_MND_INVALID_PLATFORM; goto _OVER; #endif - mInfo("stream:%s, start to create, sql:%s", createStreamReq.name, createStreamReq.sql); + mInfo("stream:%s, start to create, sql:%s", createReq.name, createReq.sql); - if (mndCheckCreateStreamReq(&createStreamReq) != 0) { - mError("stream:%s, failed to create since %s", createStreamReq.name, terrstr()); + if (mndCheckCreateStreamReq(&createReq) != 0) { + mError("stream:%s, failed to create since %s", createReq.name, terrstr()); goto _OVER; } - pStream = mndAcquireStream(pMnode, createStreamReq.name); + pStream = mndAcquireStream(pMnode, createReq.name); if (pStream != NULL) { - if (createStreamReq.igExists) { - mInfo("stream:%s, already exist, ignore exist is set", createStreamReq.name); + if (createReq.igExists) { + mInfo("stream:%s, already exist, ignore exist is set", createReq.name); goto _OVER; } else { terrno = TSDB_CODE_MND_STREAM_ALREADY_EXIST; @@ -679,16 +679,16 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) { goto _OVER; } - if (createStreamReq.sql != NULL) { - sqlLen = strlen(createStreamReq.sql); + if (createReq.sql != NULL) { + sqlLen = strlen(createReq.sql); sql = taosMemoryMalloc(sqlLen + 1); memset(sql, 0, sqlLen + 1); - memcpy(sql, createStreamReq.sql, sqlLen); + memcpy(sql, createReq.sql, sqlLen); } // build stream obj from request - if (mndBuildStreamObjFromCreateReq(pMnode, &streamObj, &createStreamReq) < 0) { - mError("stream:%s, failed to create since %s", createStreamReq.name, terrstr()); + if (mndBuildStreamObjFromCreateReq(pMnode, &streamObj, &createReq) < 0) { + mError("stream:%s, failed to create since %s", createReq.name, terrstr()); goto _OVER; } @@ -702,23 +702,23 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) { } // create stb for stream - if (createStreamReq.createStb == STREAM_CREATE_STABLE_TRUE && + if (createReq.createStb == STREAM_CREATE_STABLE_TRUE && mndCreateStbForStream(pMnode, pTrans, &streamObj, pReq->info.conn.user) < 0) { - mError("trans:%d, failed to create stb for stream %s since %s", pTrans->id, createStreamReq.name, terrstr()); + mError("trans:%d, failed to create stb for stream %s since %s", pTrans->id, createReq.name, terrstr()); mndTransDrop(pTrans); goto _OVER; } // schedule stream task for stream obj - if (mndScheduleStream(pMnode, &streamObj, createStreamReq.lastTs) < 0) { - mError("stream:%s, failed to schedule since %s", createStreamReq.name, terrstr()); + if (mndScheduleStream(pMnode, &streamObj, createReq.lastTs, createReq.pVgroupVerList) < 0) { + mError("stream:%s, failed to schedule since %s", createReq.name, terrstr()); mndTransDrop(pTrans); goto _OVER; } // add stream to trans if (mndPersistStream(pTrans, &streamObj) < 0) { - mError("stream:%s, failed to schedule since %s", createStreamReq.name, terrstr()); + mError("stream:%s, failed to schedule since %s", createReq.name, terrstr()); mndTransDrop(pTrans); goto _OVER; } @@ -749,10 +749,10 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) { taosThreadMutexUnlock(&execInfo.lock); SName dbname = {0}; - tNameFromString(&dbname, createStreamReq.sourceDB, T_NAME_ACCT | T_NAME_DB | T_NAME_TABLE); + tNameFromString(&dbname, createReq.sourceDB, T_NAME_ACCT | T_NAME_DB | T_NAME_TABLE); SName name = {0}; - tNameFromString(&name, createStreamReq.name, T_NAME_ACCT | T_NAME_DB | T_NAME_TABLE); + tNameFromString(&name, createReq.name, T_NAME_ACCT | T_NAME_DB | T_NAME_TABLE); // reuse this function for stream if (sql != NULL && sqlLen > 0) { @@ -765,11 +765,11 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) { _OVER: if (terrno != TSDB_CODE_SUCCESS && terrno != TSDB_CODE_ACTION_IN_PROGRESS) { - mError("stream:%s, failed to create since %s", createStreamReq.name, terrstr()); + mError("stream:%s, failed to create since %s", createReq.name, terrstr()); } mndReleaseStream(pMnode, pStream); - tFreeSCMCreateStreamReq(&createStreamReq); + tFreeSCMCreateStreamReq(&createReq); tFreeStreamObj(&streamObj); if (sql != NULL) { taosMemoryFreeClear(sql); diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 1ade1c8c414..8689c30a557 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -738,10 +738,9 @@ int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask, int64_t nextProcessVer) { if (pTask->pState == NULL) { tqError("s-task:%s (vgId:%d) failed to open state for task", pTask->id.idStr, vgId); return -1; - } else { - tqDebug("s-task:%s state:%p", pTask->id.idStr, pTask->pState); } + tqDebug("s-task:%s state:%p", pTask->id.idStr, pTask->pState); if (pTask->info.fillHistory) { restoreStreamTaskId(pTask, &taskId); } @@ -846,17 +845,19 @@ int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask, int64_t nextProcessVer) { if (pTask->info.fillHistory) { tqInfo("vgId:%d expand stream task, s-task:%s, checkpointId:%" PRId64 " checkpointVer:%" PRId64 " nextProcessVer:%" PRId64 - " child id:%d, level:%d, status:%s fill-history:%d, related stream task:0x%x trigger:%" PRId64 " ms", + " child id:%d, level:%d, status:%s fill-history:%d, related stream task:0x%x trigger:%" PRId64 + " ms, inputVer:%" PRId64, vgId, pTask->id.idStr, pChkInfo->checkpointId, pChkInfo->checkpointVer, pChkInfo->nextProcessVer, pTask->info.selfChildId, pTask->info.taskLevel, p, pTask->info.fillHistory, - (int32_t)pTask->streamTaskId.taskId, pTask->info.triggerParam); + (int32_t)pTask->streamTaskId.taskId, pTask->info.triggerParam, nextProcessVer); } else { tqInfo("vgId:%d expand stream task, s-task:%s, checkpointId:%" PRId64 " checkpointVer:%" PRId64 " nextProcessVer:%" PRId64 - " child id:%d, level:%d, status:%s fill-history:%d, related fill-task:0x%x trigger:%" PRId64 " ms", + " child id:%d, level:%d, status:%s fill-history:%d, related fill-task:0x%x trigger:%" PRId64 + " ms, inputVer:%" PRId64, vgId, pTask->id.idStr, pChkInfo->checkpointId, pChkInfo->checkpointVer, pChkInfo->nextProcessVer, pTask->info.selfChildId, pTask->info.taskLevel, p, pTask->info.fillHistory, - (int32_t)pTask->hTaskInfo.id.taskId, pTask->info.triggerParam); + (int32_t)pTask->hTaskInfo.id.taskId, pTask->info.triggerParam, nextProcessVer); } return 0; @@ -876,12 +877,11 @@ int32_t tqProcessTaskDeployReq(STQ* pTq, int64_t sversion, char* msg, int32_t ms } static void doStartFillhistoryStep2(SStreamTask* pTask, SStreamTask* pStreamTask, STQ* pTq) { - const char* id = pTask->id.idStr; - int64_t nextProcessedVer = pStreamTask->hTaskInfo.haltVer; - - // if it's an source task, extract the last version in wal. + const char* id = pTask->id.idStr; + int64_t nextProcessedVer = pStreamTask->hTaskInfo.haltVer; SVersionRange* pRange = &pTask->dataRange.range; + // if it's an source task, extract the last version in wal. bool done = streamHistoryTaskSetVerRangeStep2(pTask, nextProcessedVer); pTask->execInfo.step2Start = taosGetTimestampMs(); diff --git a/source/dnode/vnode/src/tqCommon/tqCommon.c b/source/dnode/vnode/src/tqCommon/tqCommon.c index 21bc09eba0b..c4973b7c1ef 100644 --- a/source/dnode/vnode/src/tqCommon/tqCommon.c +++ b/source/dnode/vnode/src/tqCommon/tqCommon.c @@ -49,7 +49,7 @@ int32_t tqStreamTaskStartAsync(SStreamMeta* pMeta, SMsgCb* cb, bool restart) { return 0; } -int32_t tqStreamOneTaskStartAsync(SStreamMeta* pMeta, SMsgCb* cb, int64_t streamId, int32_t taskId) { +int32_t tqStreamStartOneTaskAsync(SStreamMeta* pMeta, SMsgCb* cb, int64_t streamId, int32_t taskId) { int32_t vgId = pMeta->vgId; int32_t numOfTasks = taosArrayGetSize(pMeta->pTaskList); @@ -547,7 +547,7 @@ int32_t tqStreamTaskProcessDeployReq(SStreamMeta* pMeta, SMsgCb* cb, int64_t sve streamMetaWUnLock(pMeta); if (code < 0) { - tqError("failed to add s-task:0x%x into vgId:%d meta, total:%d, code:%s", vgId, taskId, numOfTasks, + tqError("failed to add s-task:0x%x into vgId:%d meta, existed:%d, code:%s", vgId, taskId, numOfTasks, tstrerror(code)); tFreeStreamTask(pTask); return code; @@ -562,9 +562,10 @@ int32_t tqStreamTaskProcessDeployReq(SStreamMeta* pMeta, SMsgCb* cb, int64_t sve if (restored) { SStreamTask* p = streamMetaAcquireTask(pMeta, streamId, taskId); - if (p != NULL && (p->info.fillHistory == 0)) { - tqStreamOneTaskStartAsync(pMeta, cb, streamId, taskId); + if ((p != NULL) && (p->info.fillHistory == 0)) { + tqStreamStartOneTaskAsync(pMeta, cb, streamId, taskId); } + if (p != NULL) { streamMetaReleaseTask(pMeta, p); } diff --git a/source/dnode/vnode/src/tsdb/tsdbRead2.c b/source/dnode/vnode/src/tsdb/tsdbRead2.c index 609f38cead0..9d158668d26 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead2.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead2.c @@ -2294,6 +2294,7 @@ void updateComposedBlockInfo(STsdbReader* pReader, double el, STableBlockScanInf pResBlock->info.id.uid = (pBlockScanInfo != NULL) ? pBlockScanInfo->uid : 0; pResBlock->info.dataLoad = 1; + pResBlock->info.version = pReader->info.verRange.maxVer; blockDataUpdateTsWindow(pResBlock, pReader->suppInfo.slotId[0]); setComposedBlockFlag(pReader, true); @@ -2799,6 +2800,7 @@ static int32_t doBuildDataBlock(STsdbReader* pReader) { pInfo->rows = pBlockInfo->numRow; pInfo->id.uid = pScanInfo->uid; pInfo->dataLoad = 0; + pInfo->version = pReader->info.verRange.maxVer; pInfo->window = (STimeWindow){.skey = pBlockInfo->firstKey, .ekey = pBlockInfo->lastKey}; setComposedBlockFlag(pReader, false); setBlockAllDumped(&pStatus->fBlockDumpInfo, pBlockInfo->lastKey, pReader->info.order); diff --git a/source/libs/executor/inc/executorInt.h b/source/libs/executor/inc/executorInt.h index 64c14456b60..fa178b6488d 100644 --- a/source/libs/executor/inc/executorInt.h +++ b/source/libs/executor/inc/executorInt.h @@ -279,7 +279,6 @@ typedef struct STableScanInfo { int8_t assignBlockUid; uint8_t countState; // empty table count state bool hasGroupByTag; - bool countOnly; bool filesetDelimited; bool needCountEmptyTable; } STableScanInfo; @@ -757,10 +756,12 @@ extern void doDestroyExchangeOperatorInfo(void* param); int32_t doFilter(SSDataBlock* pBlock, SFilterInfo* pFilterInfo, SColMatchInfo* pColMatchInfo); int32_t addTagPseudoColumnData(SReadHandle* pHandle, const SExprInfo* pExpr, int32_t numOfExpr, SSDataBlock* pBlock, - int32_t rows, const char* idStr, STableMetaCacheInfo* pCache); + int32_t rows, SExecTaskInfo* pTask, STableMetaCacheInfo* pCache); void appendOneRowToDataBlock(SSDataBlock* pBlock, STupleHandle* pTupleHandle); void setTbNameColData(const SSDataBlock* pBlock, SColumnInfoData* pColInfoData, int32_t functionId, const char* name); +void setVgIdColData(const SSDataBlock* pBlock, SColumnInfoData* pColInfoData, int32_t functionId, int32_t vgId); +void setVgVerColData(const SSDataBlock* pBlock, SColumnInfoData* pColInfoData, int32_t functionId, int64_t vgVer); void setResultRowInitCtx(SResultRow* pResult, SqlFunctionCtx* pCtx, int32_t numOfOutput, int32_t* rowEntryInfoOffset); void clearResultRowInitFlag(SqlFunctionCtx* pCtx, int32_t numOfOutput); diff --git a/source/libs/executor/src/cachescanoperator.c b/source/libs/executor/src/cachescanoperator.c index 63fcfba7c15..e4fa9f75806 100644 --- a/source/libs/executor/src/cachescanoperator.c +++ b/source/libs/executor/src/cachescanoperator.c @@ -250,7 +250,7 @@ SSDataBlock* doScanCache(SOperatorInfo* pOperator) { SExprSupp* pSup = &pInfo->pseudoExprSup; int32_t code = addTagPseudoColumnData(&pInfo->readHandle, pSup->pExprInfo, pSup->numOfExprs, pRes, - pRes->info.rows, GET_TASKID(pTaskInfo), NULL); + pRes->info.rows, pTaskInfo, NULL); if (code != TSDB_CODE_SUCCESS) { pTaskInfo->code = code; return NULL; @@ -313,7 +313,7 @@ SSDataBlock* doScanCache(SOperatorInfo* pOperator) { if (taosArrayGetSize(pInfo->pUidList) > 0) { pInfo->pRes->info.id.uid = *(tb_uid_t*)taosArrayGet(pInfo->pUidList, 0); code = addTagPseudoColumnData(&pInfo->readHandle, pSup->pExprInfo, pSup->numOfExprs, pInfo->pRes, - pInfo->pRes->info.rows, GET_TASKID(pTaskInfo), NULL); + pInfo->pRes->info.rows, pTaskInfo, NULL); if (code != TSDB_CODE_SUCCESS) { pTaskInfo->code = code; return NULL; diff --git a/source/libs/executor/src/groupoperator.c b/source/libs/executor/src/groupoperator.c index 1e9771edd62..87b8cd366cc 100644 --- a/source/libs/executor/src/groupoperator.c +++ b/source/libs/executor/src/groupoperator.c @@ -287,7 +287,6 @@ static void doHashGroupbyAgg(SOperatorInfo* pOperator, SSDataBlock* pBlock) { terrno = TSDB_CODE_SUCCESS; int32_t num = 0; - uint64_t groupId = 0; for (int32_t j = 0; j < pBlock->info.rows; ++j) { // Compare with the previous row of this column, and do not set the output buffer again if they are identical. if (!pInfo->isInit) { @@ -478,20 +477,6 @@ static SSDataBlock* hashGroupbyAggregate(SOperatorInfo* pOperator) { pOperator->status = OP_RES_TO_RETURN; -#if 0 - if(pOperator->fpSet.encodeResultRow){ - char *result = NULL; - int32_t length = 0; - pOperator->fpSet.encodeResultRow(pOperator, &result, &length); - SAggSupporter* pSup = &pInfo->aggSup; - taosHashClear(pSup->pResultRowHashTable); - pInfo->binfo.resultRowInfo.size = 0; - pOperator->fpSet.decodeResultRow(pOperator, result); - if(result){ - taosMemoryFree(result); - } - } -#endif // initGroupedResultInfo(&pInfo->groupResInfo, pInfo->aggSup.pResultRowHashTable, 0); if (pGroupResInfo->pRows != NULL) { taosArrayDestroy(pGroupResInfo->pRows); diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index ec1d6b9f757..8e54fc684b4 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -21,7 +21,6 @@ #include "querynodes.h" #include "systable.h" #include "tname.h" -#include "ttime.h" #include "tdatablock.h" #include "tmsg.h" @@ -252,7 +251,7 @@ static void doSetTagColumnData(STableScanBase* pTableScanInfo, SSDataBlock* pBlo SExprSupp* pSup = &pTableScanInfo->pseudoSup; int32_t code = addTagPseudoColumnData(&pTableScanInfo->readHandle, pSup->pExprInfo, pSup->numOfExprs, pBlock, rows, - GET_TASKID(pTaskInfo), &pTableScanInfo->metaCache); + pTaskInfo, &pTableScanInfo->metaCache); // ignore the table not exists error, since this table may have been dropped during the scan procedure. if (code != TSDB_CODE_SUCCESS && code != TSDB_CODE_PAR_TABLE_NOT_EXIST) { T_LONG_JMP(pTaskInfo->env, code); @@ -295,8 +294,8 @@ bool applyLimitOffset(SLimitInfo* pLimitInfo, SSDataBlock* pBlock, SExecTaskInfo static int32_t loadDataBlock(SOperatorInfo* pOperator, STableScanBase* pTableScanInfo, SSDataBlock* pBlock, uint32_t* status) { - SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; - SStorageAPI* pAPI = &pTaskInfo->storageAPI; + SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; + SStorageAPI* pAPI = &pTaskInfo->storageAPI; SFileBlockLoadRecorder* pCost = &pTableScanInfo->readRecorder; @@ -482,24 +481,25 @@ static void doSetNullValue(SSDataBlock* pBlock, const SExprInfo* pExpr, int32_t } int32_t addTagPseudoColumnData(SReadHandle* pHandle, const SExprInfo* pExpr, int32_t numOfExpr, SSDataBlock* pBlock, - int32_t rows, const char* idStr, STableMetaCacheInfo* pCache) { + int32_t rows, SExecTaskInfo* pTask, STableMetaCacheInfo* pCache) { + int32_t code = 0; + bool freeReader = false; + LRUHandle* h = NULL; + STableCachedVal val = {0}; + SMetaReader mr = {0}; + const char* idStr = pTask->id.str; + // currently only the tbname pseudo column if (numOfExpr <= 0) { return TSDB_CODE_SUCCESS; } - int32_t code = 0; - bool freeReader = false; + // todo: opt if only require the vgId and the vgVer; // backup the rows int32_t backupRows = pBlock->info.rows; pBlock->info.rows = rows; - STableCachedVal val = {0}; - - SMetaReader mr = {0}; - LRUHandle* h = NULL; - // todo refactor: extract method // the handling of the null data should be packed in the extracted method @@ -586,7 +586,14 @@ int32_t addTagPseudoColumnData(SReadHandle* pHandle, const SExprInfo* pExpr, int // this is to handle the tbname if (fmIsScanPseudoColumnFunc(functionId)) { - setTbNameColData(pBlock, pColInfoData, functionId, val.pName); + int32_t fType = pExpr1->pExpr->_function.functionType; + if (fType == FUNCTION_TYPE_TBNAME) { + setTbNameColData(pBlock, pColInfoData, functionId, val.pName); + } else if (fType == FUNCTION_TYPE_VGID) { + setVgIdColData(pBlock, pColInfoData, functionId, pTask->id.vgId); + } else if (fType == FUNCTION_TYPE_VGVER) { + setVgVerColData(pBlock, pColInfoData, functionId, pBlock->info.version); + } } else { // these are tags STagVal tagVal = {0}; tagVal.cid = pExpr1->base.pParam[0].pCol->colId; @@ -655,6 +662,47 @@ void setTbNameColData(const SSDataBlock* pBlock, SColumnInfoData* pColInfoData, colDataDestroy(&infoData); } +void setVgIdColData(const SSDataBlock* pBlock, SColumnInfoData* pColInfoData, int32_t functionId, int32_t vgId) { + struct SScalarFuncExecFuncs fpSet = {0}; + fmGetScalarFuncExecFuncs(functionId, &fpSet); + + SColumnInfoData infoData = createColumnInfoData(pColInfoData->info.type, pColInfoData->info.bytes, 1); + + colInfoDataEnsureCapacity(&infoData, 1, false); + colDataSetVal(&infoData, 0, (const char*)&vgId, false); + + SScalarParam srcParam = {.numOfRows = pBlock->info.rows, .columnData = &infoData}; + SScalarParam param = {.columnData = pColInfoData}; + + if (fpSet.process != NULL) { + fpSet.process(&srcParam, 1, ¶m); + } else { + qError("failed to get the corresponding callback function, functionId:%d", functionId); + } + + colDataDestroy(&infoData); +} + +void setVgVerColData(const SSDataBlock* pBlock, SColumnInfoData* pColInfoData, int32_t functionId, int64_t vgVer) { + struct SScalarFuncExecFuncs fpSet = {0}; + fmGetScalarFuncExecFuncs(functionId, &fpSet); + + SColumnInfoData infoData = createColumnInfoData(pColInfoData->info.type, pColInfoData->info.bytes, 1); + + colInfoDataEnsureCapacity(&infoData, 1, false); + colDataSetVal(&infoData, 0, (const char*)&vgVer, false); + + SScalarParam srcParam = {.numOfRows = pBlock->info.rows, .columnData = &infoData}; + SScalarParam param = {.columnData = pColInfoData}; + + if (fpSet.process != NULL) { + fpSet.process(&srcParam, 1, ¶m); + } else { + qError("failed to get the corresponding callback function, functionId:%d", functionId); + } + + colDataDestroy(&infoData); +} static void initNextGroupScan(STableScanInfo* pInfo, STableKeyInfo** pKeyInfo, int32_t* size) { tableListGetGroupList(pInfo->base.pTableListInfo, pInfo->currentGroupId, pKeyInfo, size); @@ -963,13 +1011,11 @@ static SSDataBlock* groupSeqTableScan(SOperatorInfo* pOperator) { STableKeyInfo* pList = NULL; if (pInfo->currentGroupId == -1) { - int32_t numOfTables = tableListGetSize(pInfo->base.pTableListInfo); if ((++pInfo->currentGroupId) >= tableListGetOutputGroups(pInfo->base.pTableListInfo)) { setOperatorCompleted(pOperator); return NULL; } - initNextGroupScan(pInfo, &pList, &num); ASSERT(pInfo->base.dataReader == NULL); @@ -1172,10 +1218,6 @@ SOperatorInfo* createTableScanOperatorInfo(STableScanPhysiNode* pTableScanNode, goto _error; } - if (scanDebug) { - pInfo->countOnly = true; - } - pInfo->filesetDelimited = pTableScanNode->filesetDelimited; taosLRUCacheSetStrictCapacity(pInfo->base.metaCache.pTableMetaEntryCache, false); @@ -1901,7 +1943,7 @@ static int32_t setBlockIntoRes(SStreamScanInfo* pInfo, const SSDataBlock* pBlock // currently only the tbname pseudo column if (pInfo->numOfPseudoExpr > 0) { int32_t code = addTagPseudoColumnData(&pInfo->readHandle, pInfo->pPseudoExpr, pInfo->numOfPseudoExpr, pInfo->pRes, - pBlockInfo->rows, id, &pTableScanInfo->base.metaCache); + pBlockInfo->rows, pTaskInfo, &pTableScanInfo->base.metaCache); // ignore the table not exists error, since this table may have been dropped during the scan procedure. if (code != TSDB_CODE_SUCCESS && code != TSDB_CODE_PAR_TABLE_NOT_EXIST) { blockDataFreeRes((SSDataBlock*)pBlock); @@ -2134,7 +2176,7 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) { pTSInfo->base.cond.endVersion = pStreamInfo->fillHistoryVer.maxVer; pTSInfo->base.cond.twindows = pStreamInfo->fillHistoryWindow; - qDebug("stream recover step1, verRange:%" PRId64 "-%" PRId64 " window:%"PRId64"-%"PRId64", %s", pTSInfo->base.cond.startVersion, + qDebug("stream scan step1, verRange:%" PRId64 "-%" PRId64 " window:%"PRId64"-%"PRId64", %s", pTSInfo->base.cond.startVersion, pTSInfo->base.cond.endVersion, pTSInfo->base.cond.twindows.skey, pTSInfo->base.cond.twindows.ekey, id); pStreamInfo->recoverStep = STREAM_RECOVER_STEP__SCAN1; pStreamInfo->recoverScanFinished = false; diff --git a/source/libs/function/src/builtins.c b/source/libs/function/src/builtins.c index 4d00b6bb772..ac26f6fe268 100644 --- a/source/libs/function/src/builtins.c +++ b/source/libs/function/src/builtins.c @@ -707,18 +707,20 @@ static int32_t translateTbnameColumn(SFunctionNode* pFunc, char* pErrBuf, int32_ static int32_t translateTbUidColumn(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { // pseudo column do not need to check parameters - pFunc->node.resType = - (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_BIGINT].bytes, .type = TSDB_DATA_TYPE_BIGINT}; + pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_BIGINT].bytes, .type = TSDB_DATA_TYPE_BIGINT}; return TSDB_CODE_SUCCESS; } static int32_t translateVgIdColumn(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { // pseudo column do not need to check parameters - pFunc->node.resType = - (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_INT].bytes, .type = TSDB_DATA_TYPE_INT}; + pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_INT].bytes, .type = TSDB_DATA_TYPE_INT}; return TSDB_CODE_SUCCESS; } +static int32_t translateVgVerColumn(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_BIGINT].bytes, .type = TSDB_DATA_TYPE_BIGINT}; + return TSDB_CODE_SUCCESS; +} static int32_t translateTopBot(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { int32_t numOfParams = LIST_LENGTH(pFunc->pParameterList); @@ -3453,7 +3455,7 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .translateFunc = translateTbnameColumn, .getEnvFunc = NULL, .initFunc = NULL, - .sprocessFunc = qTbnameFunction, + .sprocessFunc = qPseudoTagFunction, .finalizeFunc = NULL }, { @@ -3740,11 +3742,7 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .translateFunc = translateTbUidColumn, .getEnvFunc = NULL, .initFunc = NULL, -#ifdef BUILD_NO_CALL - .sprocessFunc = qTbUidFunction, -#else - .sprocessFunc = NULL, -#endif + .sprocessFunc = qPseudoTagFunction, .finalizeFunc = NULL }, { @@ -3754,11 +3752,7 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .translateFunc = translateVgIdColumn, .getEnvFunc = NULL, .initFunc = NULL, -#ifdef BUILD_NO_CALL - .sprocessFunc = qVgIdFunction, -#else - .sprocessFunc = NULL, -#endif + .sprocessFunc = qPseudoTagFunction, .finalizeFunc = NULL }, { @@ -3781,6 +3775,16 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .sprocessFunc = toCharFunction, .finalizeFunc = NULL }, + { + .name = "_vgver", + .type = FUNCTION_TYPE_VGVER, + .classification = FUNC_MGT_PSEUDO_COLUMN_FUNC | FUNC_MGT_SCAN_PC_FUNC | FUNC_MGT_KEEP_ORDER_FUNC, + .translateFunc = translateVgVerColumn, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = qPseudoTagFunction, + .finalizeFunc = NULL + } }; // clang-format on diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 8496feb4d67..598a8dfd610 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -31,7 +31,7 @@ typedef struct SNodeMemChunk { struct SNodeMemChunk* pNext; } SNodeMemChunk; -typedef struct SNodeAllocator { +struct SNodeAllocator { int64_t self; int64_t queryId; int32_t chunkSize; @@ -39,7 +39,7 @@ typedef struct SNodeAllocator { SNodeMemChunk* pCurrChunk; SNodeMemChunk* pChunks; TdThreadMutex mutex; -} SNodeAllocator; +}; static threadlocal SNodeAllocator* g_pNodeAllocator; static int32_t g_allocatorReqRefPool = -1; diff --git a/source/libs/parser/inc/parInt.h b/source/libs/parser/inc/parInt.h index a4a78124742..f1c549e154f 100644 --- a/source/libs/parser/inc/parInt.h +++ b/source/libs/parser/inc/parInt.h @@ -35,8 +35,8 @@ int32_t authenticate(SParseContext* pParseCxt, SQuery* pQuery, SParseMetaCache* int32_t translate(SParseContext* pParseCxt, SQuery* pQuery, SParseMetaCache* pMetaCache); int32_t extractResultSchema(const SNode* pRoot, int32_t* numOfCols, SSchema** pSchema); int32_t calculateConstant(SParseContext* pParseCxt, SQuery* pQuery); -int32_t translatePostCreateStream(SParseContext* pParseCxt, SQuery* pQuery, void** pResRow); -int32_t translatePostCreateSmaIndex(SParseContext* pParseCxt, SQuery* pQuery, void** pResRow); +int32_t translatePostCreateStream(SParseContext* pParseCxt, SQuery* pQuery, SSDataBlock* pBlock); +int32_t translatePostCreateSmaIndex(SParseContext* pParseCxt, SQuery* pQuery, SSDataBlock* pBlock); int32_t buildQueryAfterParse(SQuery** pQuery, SNode* pRootNode, int16_t placeholderNo, SArray** pPlaceholderValues); int32_t translateTable(STranslateContext* pCxt, SNode** pTable); int32_t getMetaDataFromHash(const char* pKey, int32_t len, SHashObj* pHash, void** pOutput); diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index d2466415769..922ad30f391 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -14,6 +14,7 @@ */ #include "parTranslater.h" +#include "tdatablock.h" #include "parInt.h" #include "catalog.h" @@ -6957,7 +6958,7 @@ int32_t createIntervalFromCreateSmaIndexStmt(SCreateIndexStmt* pStmt, SInterval* return TSDB_CODE_SUCCESS; } -int32_t translatePostCreateSmaIndex(SParseContext* pParseCxt, SQuery* pQuery, void** pResRow) { +int32_t translatePostCreateSmaIndex(SParseContext* pParseCxt, SQuery* pQuery, SSDataBlock* pBlock) { int32_t code = TSDB_CODE_SUCCESS; SCreateIndexStmt* pStmt = (SCreateIndexStmt*)pQuery->pRoot; int64_t lastTs = 0; @@ -6967,11 +6968,13 @@ int32_t translatePostCreateSmaIndex(SParseContext* pParseCxt, SQuery* pQuery, vo if (TSDB_CODE_SUCCESS == code) { code = createIntervalFromCreateSmaIndexStmt(pStmt, &interval); } + if (TSDB_CODE_SUCCESS == code) { - if (pResRow && pResRow[0]) { - lastTs = *(int64_t*)pResRow[0]; + if (pBlock != NULL && pBlock->info.rows >= 1) { + SColumnInfoData* pColInfo = taosArrayGet(pBlock->pDataBlock, 0); + lastTs = *(int64_t*)colDataGetData(pColInfo, 0); } else if (interval.interval > 0) { - lastTs = convertTimePrecision(taosGetTimestampMs(), TSDB_TIME_PRECISION_MILLI, interval.precision); + lastTs = taosGetTimestamp(interval.precision); } else { lastTs = taosGetTimestampMs(); } @@ -8110,18 +8113,63 @@ static int32_t createLastTsSelectStmt(char* pDb, char* pTable, STableMeta* pMeta nodesDestroyList(pParamterList); return TSDB_CODE_OUT_OF_MEMORY; } + code = nodesListStrictAppend(pProjectionList, pFunc); if (code) { nodesDestroyList(pProjectionList); return code; } + SFunctionNode* pFunc1 = createFunction("_vgid", NULL); + if (NULL == pFunc1) { + nodesDestroyList(pParamterList); + return TSDB_CODE_OUT_OF_MEMORY; + } + + snprintf(pFunc1->node.aliasName, sizeof(pFunc1->node.aliasName), "%s.%p", pFunc1->functionName, pFunc1); + code = nodesListStrictAppend(pProjectionList, (SNode*) pFunc1); + if (code) { + nodesDestroyList(pProjectionList); + return code; + } + + SFunctionNode* pFunc2 = createFunction("_vgver", NULL); + if (NULL == pFunc2) { + nodesDestroyList(pParamterList); + return TSDB_CODE_OUT_OF_MEMORY; + } + + snprintf(pFunc2->node.aliasName, sizeof(pFunc2->node.aliasName), "%s.%p", pFunc2->functionName, pFunc2); + code = nodesListStrictAppend(pProjectionList, (SNode*) pFunc2); + if (code) { + nodesDestroyList(pProjectionList); + return code; + } + code = createSimpleSelectStmtFromProjList(pDb, pTable, pProjectionList, (SSelectStmt**)pQuery); if (code) { nodesDestroyList(pProjectionList); return code; } + // todo add the group by statement + SSelectStmt** pSelect1 = (SSelectStmt**)pQuery; + (*pSelect1)->pGroupByList = nodesMakeList(); + + SGroupingSetNode* pNode1 = (SGroupingSetNode*)nodesMakeNode(QUERY_NODE_GROUPING_SET); + pNode1->groupingSetType = GP_TYPE_NORMAL; + pNode1->pParameterList = nodesMakeList(); + nodesListAppend(pNode1->pParameterList, (SNode*)pFunc1); + + nodesListAppend((*pSelect1)->pGroupByList, (SNode*)pNode1); + + SGroupingSetNode* pNode2 = (SGroupingSetNode*)nodesMakeNode(QUERY_NODE_GROUPING_SET); + pNode2->groupingSetType = GP_TYPE_NORMAL; + pNode2->pParameterList = nodesMakeList(); + nodesListAppend(pNode2->pParameterList, (SNode*)pFunc2); + + nodesListAppend((*pSelect1)->pGroupByList, (SNode*)pNode2); + return code; } @@ -8269,7 +8317,32 @@ static int32_t buildIntervalForCreateStream(SCreateStreamStmt* pStmt, SInterval* return code; } -int32_t translatePostCreateStream(SParseContext* pParseCxt, SQuery* pQuery, void** pResRow) { +// ts, vgroup_id, vgroup_version +static int32_t createStreamReqVersionInfo(SSDataBlock* pBlock, SArray** pArray, int64_t* lastTs, SInterval* pInterval) { + *pArray = taosArrayInit(pBlock->info.rows, sizeof(SVgroupVer)); + if (*pArray == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } + + if (pBlock->info.rows > 0) { + *lastTs = pBlock->info.window.ekey; + SColumnInfoData* pCol1 = taosArrayGet(pBlock->pDataBlock, 1); + SColumnInfoData* pCol2 = taosArrayGet(pBlock->pDataBlock, 2); + + for (int32_t i = 0; i < pBlock->info.rows; ++i) { + SVgroupVer v = {.vgId = *(int32_t*)colDataGetData(pCol1, i), .ver = *(int64_t*)colDataGetData(pCol2, i)}; + parserDebug("-------------%ld, vgId:%d, vgVer:%ld\n", *lastTs, v.vgId, v.ver); + taosArrayPush(*pArray, &v); + } + } else { + int32_t precision = (pInterval->interval > 0)? pInterval->precision:TSDB_TIME_PRECISION_MILLI; + *lastTs = taosGetTimestamp(precision); + } + + return TSDB_CODE_SUCCESS; +} + +int32_t translatePostCreateStream(SParseContext* pParseCxt, SQuery* pQuery, SSDataBlock* pBlock) { SCreateStreamStmt* pStmt = (SCreateStreamStmt*)pQuery->pRoot; STranslateContext cxt = {0}; SInterval interval = {0}; @@ -8279,15 +8352,11 @@ int32_t translatePostCreateStream(SParseContext* pParseCxt, SQuery* pQuery, void if (TSDB_CODE_SUCCESS == code) { code = buildIntervalForCreateStream(pStmt, &interval); } + if (TSDB_CODE_SUCCESS == code) { - if (pResRow && pResRow[0]) { - lastTs = *(int64_t*)pResRow[0]; - } else if (interval.interval > 0) { - lastTs = convertTimePrecision(taosGetTimestampMs(), TSDB_TIME_PRECISION_MILLI, interval.precision); - } else { - lastTs = taosGetTimestampMs(); - } + code = createStreamReqVersionInfo(pBlock, &pStmt->pReq->pVgroupVerList, &lastTs, &interval); } + if (TSDB_CODE_SUCCESS == code) { if (interval.interval > 0) { pStmt->pReq->lastTs = taosTimeAdd(taosTimeTruncate(lastTs, &interval), interval.interval, interval.intervalUnit, interval.precision); @@ -8296,9 +8365,11 @@ int32_t translatePostCreateStream(SParseContext* pParseCxt, SQuery* pQuery, void } code = buildCmdMsg(&cxt, TDMT_MND_CREATE_STREAM, (FSerializeFunc)tSerializeSCMCreateStreamReq, pStmt->pReq); } + if (TSDB_CODE_SUCCESS == code) { code = setQuery(&cxt, pQuery); } + setRefreshMeta(&cxt, pQuery); destroyTranslateContext(&cxt); diff --git a/source/libs/parser/src/parser.c b/source/libs/parser/src/parser.c index 1fa4c624a7d..92e25f3ee6a 100644 --- a/source/libs/parser/src/parser.c +++ b/source/libs/parser/src/parser.c @@ -233,14 +233,17 @@ int32_t qContinueParseSql(SParseContext* pCxt, struct SCatalogReq* pCatalogReq, return parseInsertSql(pCxt, &pQuery, pCatalogReq, pMetaData); } -int32_t qContinueParsePostQuery(SParseContext* pCxt, SQuery* pQuery, void** pResRow) { +int32_t qContinueParsePostQuery(SParseContext* pCxt, SQuery* pQuery, SSDataBlock* pBlock) { int32_t code = TSDB_CODE_SUCCESS; switch (nodeType(pQuery->pRoot)) { - case QUERY_NODE_CREATE_STREAM_STMT: - code = translatePostCreateStream(pCxt, pQuery, pResRow); + case QUERY_NODE_CREATE_STREAM_STMT: { + code = translatePostCreateStream(pCxt, pQuery, pBlock); break; - case QUERY_NODE_CREATE_INDEX_STMT: - code = translatePostCreateSmaIndex(pCxt, pQuery, pResRow); + } + case QUERY_NODE_CREATE_INDEX_STMT: { + code = translatePostCreateSmaIndex(pCxt, pQuery, pBlock); + break; + } default: break; } diff --git a/source/libs/scalar/src/sclfunc.c b/source/libs/scalar/src/sclfunc.c index 26552f25b48..62fda148cda 100644 --- a/source/libs/scalar/src/sclfunc.c +++ b/source/libs/scalar/src/sclfunc.c @@ -1815,9 +1815,8 @@ int32_t winEndTsFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *p return TSDB_CODE_SUCCESS; } -int32_t qTbnameFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { - char* p = colDataGetVarData(pInput->columnData, 0); - +int32_t qPseudoTagFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + char *p = colDataGetData(pInput->columnData, 0); int32_t code = colDataSetNItems(pOutput->columnData, pOutput->numOfRows, p, pInput->numOfRows, true); if (code) { return code; @@ -1826,31 +1825,6 @@ int32_t qTbnameFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pO pOutput->numOfRows += pInput->numOfRows; return TSDB_CODE_SUCCESS; } -#ifdef BUILD_NO_CALL -int32_t qTbUidFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { - char* p = colDataGetNumData(pInput->columnData, 0); - - int32_t code = colDataSetNItems(pOutput->columnData, pOutput->numOfRows, p, pInput->numOfRows, true); - if (code) { - return code; - } - - pOutput->numOfRows += pInput->numOfRows; - return TSDB_CODE_SUCCESS; -} - -int32_t qVgIdFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { - char* p = colDataGetNumData(pInput->columnData, 0); - - int32_t code = colDataSetNItems(pOutput->columnData, pOutput->numOfRows, p, pInput->numOfRows, true); - if (code) { - return code; - } - - pOutput->numOfRows += pInput->numOfRows; - return TSDB_CODE_SUCCESS; -} -#endif /** Aggregation functions **/ int32_t countScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { diff --git a/source/libs/stream/inc/streamInt.h b/source/libs/stream/inc/streamInt.h index 0534f2c30cd..fd9c8b61d1a 100644 --- a/source/libs/stream/inc/streamInt.h +++ b/source/libs/stream/inc/streamInt.h @@ -123,7 +123,7 @@ int32_t streamTaskInitTokenBucket(STokenBucket* pBucket, int32_t numCap, int32_t STaskId streamTaskGetTaskId(const SStreamTask* pTask); void streamTaskInitForLaunchHTask(SHistoryTaskInfo* pInfo); void streamTaskSetRetryInfoForLaunch(SHistoryTaskInfo* pInfo); -int32_t streamTaskFillHistoryFinished(SStreamTask* pTask); +int32_t streamTaskResetTimewindowFilter(SStreamTask* pTask); void streamClearChkptReadyMsg(SStreamTask* pTask); int32_t streamTaskGetDataFromInputQ(SStreamTask* pTask, SStreamQueueItem** pInput, int32_t* numOfBlocks, diff --git a/source/libs/stream/src/streamExec.c b/source/libs/stream/src/streamExec.c index b0170d5083b..7fb8095acd0 100644 --- a/source/libs/stream/src/streamExec.c +++ b/source/libs/stream/src/streamExec.c @@ -388,10 +388,7 @@ int32_t streamDoTransferStateToStreamTask(SStreamTask* pTask) { pStreamTask->id.idStr, TASK_LEVEL__SOURCE, pTimeWindow->skey, pTimeWindow->ekey, INT64_MIN, pTimeWindow->ekey, p, pStreamTask->status.schedStatus); - pTimeWindow->skey = INT64_MIN; - qStreamInfoResetTimewindowFilter(pStreamTask->exec.pExecutor); - stDebug("s-task:%s after exceed the threshold:%" PRId64 " and then update the window filter", - pStreamTask->id.idStr, pStreamTask->dataRange.range.maxVer); + streamTaskResetTimewindowFilter(pStreamTask); } else { stDebug("s-task:%s no need to update/reset filter time window for non-source tasks", pStreamTask->id.idStr); } @@ -420,10 +417,6 @@ int32_t streamTransferStateToStreamTask(SStreamTask* pTask) { ASSERT(pTask->status.appendTranstateBlock == 1); int32_t level = pTask->info.taskLevel; - if (level == TASK_LEVEL__SOURCE) { - streamTaskFillHistoryFinished(pTask); - } - if (level == TASK_LEVEL__AGG || level == TASK_LEVEL__SOURCE) { // do transfer task operator states. code = streamDoTransferStateToStreamTask(pTask); } else { // no state transfer for sink tasks, and drop fill-history task, followed by opening inputQ of sink task. diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index 5e53a921b9f..db74ce98978 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -590,11 +590,6 @@ int32_t streamMetaRegisterTask(SStreamMeta* pMeta, int64_t ver, SStreamTask* pTa return 0; } - if (pTask->info.fillHistory == 1) { - stDebug("s-task:0x%x initial nextProcessVer is set to 1 for fill-history task", pTask->id.taskId); - ver = 1; - } - if (pMeta->expandFunc(pMeta->ahandle, pTask, ver) < 0) { tFreeStreamTask(pTask); return -1; diff --git a/source/libs/stream/src/streamStart.c b/source/libs/stream/src/streamStart.c index 2f5bca8ed9b..ee98bc801bd 100644 --- a/source/libs/stream/src/streamStart.c +++ b/source/libs/stream/src/streamStart.c @@ -595,8 +595,6 @@ static void checkFillhistoryTaskStatus(SStreamTask* pTask, SStreamTask* pHTask) SDataRange* pRange = &pHTask->dataRange; // the query version range should be limited to the already processed data - pRange->range.minVer = 0; - pRange->range.maxVer = pTask->chkInfo.nextProcessVer - 1; pHTask->execInfo.init = taosGetTimestampMs(); if (pTask->info.taskLevel == TASK_LEVEL__SOURCE) { @@ -843,7 +841,7 @@ int32_t streamLaunchFillHistoryTask(SStreamTask* pTask) { } } -int32_t streamTaskFillHistoryFinished(SStreamTask* pTask) { +int32_t streamTaskResetTimewindowFilter(SStreamTask* pTask) { void* exec = pTask->exec.pExecutor; return qStreamInfoResetTimewindowFilter(exec); } @@ -854,8 +852,6 @@ bool streamHistoryTaskSetVerRangeStep2(SStreamTask* pTask, int64_t nextProcessVe int64_t walScanStartVer = pRange->maxVer + 1; if (walScanStartVer > nextProcessVer - 1) { - // no input data yet. no need to execute the secondary scan while stream task halt - streamTaskFillHistoryFinished(pTask); stDebug( "s-task:%s no need to perform secondary scan-history data(step 2), since no data ingest during step1 scan, " "related stream task currentVer:%" PRId64, @@ -965,25 +961,12 @@ void streamTaskSetRangeStreamCalc(SStreamTask* pTask) { return; } - int64_t ekey = 0; - if (pRange->window.ekey < INT64_MAX) { - ekey = pRange->window.ekey + 1; - } else { - ekey = pRange->window.ekey; - } - - int64_t ver = pRange->range.minVer; - - pRange->window.skey = ekey; - pRange->window.ekey = INT64_MAX; - pRange->range.minVer = 0; - pRange->range.maxVer = ver; - - stDebug("s-task:%s level:%d related fill-history task exists, set stream task timeWindow:%" PRId64 " - %" PRId64 + stDebug("s-task:%s level:%d related fill-history task exists, stream task timeWindow:%" PRId64 " - %" PRId64 ", verRang:%" PRId64 " - %" PRId64, - pTask->id.idStr, pTask->info.taskLevel, pRange->window.skey, pRange->window.ekey, ver, INT64_MAX); + pTask->id.idStr, pTask->info.taskLevel, pRange->window.skey, pRange->window.ekey, pRange->range.minVer, + pRange->range.maxVer); - SVersionRange verRange = {.minVer = ver, .maxVer = INT64_MAX}; + SVersionRange verRange = pRange->range; STimeWindow win = pRange->window; streamSetParamForStreamScannerStep2(pTask, &verRange, &win); } diff --git a/source/libs/stream/src/streamTask.c b/source/libs/stream/src/streamTask.c index 3018894132e..fef733c9f3e 100644 --- a/source/libs/stream/src/streamTask.c +++ b/source/libs/stream/src/streamTask.c @@ -79,7 +79,7 @@ static SStreamChildEpInfo* createStreamTaskEpInfo(const SStreamTask* pTask) { return pEpInfo; } -SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, bool fillHistory, int64_t triggerParam, +SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, SEpSet* pEpset, bool fillHistory, int64_t triggerParam, SArray* pTaskList, bool hasFillhistory) { SStreamTask* pTask = (SStreamTask*)taosMemoryCalloc(1, sizeof(SStreamTask)); if (pTask == NULL) { @@ -92,6 +92,7 @@ SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, bool fillHistory pTask->ver = SSTREAM_TASK_VER; pTask->id.taskId = tGenIdPI32(); pTask->id.streamId = streamId; + pTask->info.taskLevel = taskLevel; pTask->info.fillHistory = fillHistory; pTask->info.triggerParam = triggerParam; @@ -115,6 +116,8 @@ SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, bool fillHistory ASSERT(hasFillhistory); } + epsetAssign(&(pTask->info.mnodeEpset), pEpset); + addToTaskset(pTaskList, pTask); return pTask; } @@ -458,16 +461,18 @@ void tFreeStreamTask(SStreamTask* pTask) { int32_t streamTaskInit(SStreamTask* pTask, SStreamMeta* pMeta, SMsgCb* pMsgCb, int64_t ver) { pTask->id.idStr = createStreamTaskIdStr(pTask->id.streamId, pTask->id.taskId); pTask->refCnt = 1; - pTask->status.schedStatus = TASK_SCHED_STATUS__INACTIVE; - pTask->status.timerActive = 0; + + pTask->inputq.status = TASK_INPUT_STATUS__NORMAL; + pTask->outputq.status = TASK_OUTPUT_STATUS__NORMAL; pTask->inputq.queue = streamQueueOpen(512 << 10); pTask->outputq.queue = streamQueueOpen(512 << 10); - if (pTask->inputq.queue == NULL || pTask->outputq.queue == NULL) { stError("s-task:%s failed to prepare the input/output queue, initialize task failed", pTask->id.idStr); return TSDB_CODE_OUT_OF_MEMORY; } + pTask->status.schedStatus = TASK_SCHED_STATUS__INACTIVE; + pTask->status.timerActive = 0; pTask->status.pSM = streamCreateStateMachine(pTask); if (pTask->status.pSM == NULL) { stError("s-task:%s failed create state-machine for stream task, initialization failed, code:%s", pTask->id.idStr, @@ -476,29 +481,34 @@ int32_t streamTaskInit(SStreamTask* pTask, SStreamMeta* pMeta, SMsgCb* pMsgCb, i } pTask->execInfo.created = taosGetTimestampMs(); - pTask->inputq.status = TASK_INPUT_STATUS__NORMAL; - pTask->outputq.status = TASK_OUTPUT_STATUS__NORMAL; - pTask->pMeta = pMeta; + SCheckpointInfo* pChkInfo = &pTask->chkInfo; + SDataRange* pRange = &pTask->dataRange; - pTask->chkInfo.checkpointVer = ver - 1; // only update when generating checkpoint - pTask->chkInfo.processedVer = ver - 1; // already processed version + // only set the version info for stream tasks without fill-history task + if (pTask->info.taskLevel == TASK_LEVEL__SOURCE) { + if ((pTask->info.fillHistory == 0) && (!HAS_RELATED_FILLHISTORY_TASK(pTask))) { + pChkInfo->checkpointVer = ver - 1; // only update when generating checkpoint + pChkInfo->processedVer = ver - 1; // already processed version + pChkInfo->nextProcessVer = ver; // next processed version - pTask->chkInfo.nextProcessVer = ver; // next processed version - pTask->dataRange.range.maxVer = ver; - pTask->dataRange.range.minVer = ver; - pTask->pMsgCb = pMsgCb; - pTask->msgInfo.pRetryList = taosArrayInit(4, sizeof(int32_t)); - - pTask->outputInfo.pTokenBucket = taosMemoryCalloc(1, sizeof(STokenBucket)); - if (pTask->outputInfo.pTokenBucket == NULL) { - stError("s-task:%s failed to prepare the tokenBucket, code:%s", pTask->id.idStr, - tstrerror(TSDB_CODE_OUT_OF_MEMORY)); - return TSDB_CODE_OUT_OF_MEMORY; + pRange->range.maxVer = ver; + pRange->range.minVer = ver; + } else { + if (pTask->info.fillHistory == 1) { + pChkInfo->checkpointVer = pRange->range.maxVer; + pChkInfo->processedVer = pRange->range.maxVer; + pChkInfo->nextProcessVer = pRange->range.maxVer + 1; + } else { + pChkInfo->checkpointVer = pRange->range.minVer - 1; + pChkInfo->processedVer = pRange->range.minVer - 1; + pChkInfo->nextProcessVer = pRange->range.minVer; + } + } } - // 2MiB per second for sink task - // 50 times sink operator per second - streamTaskInitTokenBucket(pTask->outputInfo.pTokenBucket, 35, 35, tsSinkDataRate, pTask->id.idStr); + pTask->pMeta = pMeta; + pTask->pMsgCb = pMsgCb; + pTask->msgInfo.pRetryList = taosArrayInit(4, sizeof(int32_t)); TdThreadMutexAttr attr = {0}; int code = taosThreadMutexAttrInit(&attr); @@ -514,10 +524,22 @@ int32_t streamTaskInit(SStreamTask* pTask, SStreamMeta* pMeta, SMsgCb* pMsgCb, i } taosThreadMutexInit(&pTask->lock, &attr); + taosThreadMutexAttrDestroy(&attr); streamTaskOpenAllUpstreamInput(pTask); - pTask->outputInfo.pDownstreamUpdateList = taosArrayInit(4, sizeof(SDownstreamTaskEpset)); - if (pTask->outputInfo.pDownstreamUpdateList == NULL) { + STaskOutputInfo* pOutputInfo = &pTask->outputInfo; + pOutputInfo->pTokenBucket = taosMemoryCalloc(1, sizeof(STokenBucket)); + if (pOutputInfo->pTokenBucket == NULL) { + stError("s-task:%s failed to prepare the tokenBucket, code:%s", pTask->id.idStr, + tstrerror(TSDB_CODE_OUT_OF_MEMORY)); + return TSDB_CODE_OUT_OF_MEMORY; + } + + // 2MiB per second for sink task + // 50 times sink operator per second + streamTaskInitTokenBucket(pOutputInfo->pTokenBucket, 35, 35, tsSinkDataRate, pTask->id.idStr); + pOutputInfo->pDownstreamUpdateList = taosArrayInit(4, sizeof(SDownstreamTaskEpset)); + if (pOutputInfo->pDownstreamUpdateList == NULL) { return TSDB_CODE_OUT_OF_MEMORY; } @@ -527,16 +549,16 @@ int32_t streamTaskInit(SStreamTask* pTask, SStreamMeta* pMeta, SMsgCb* pMsgCb, i int32_t streamTaskGetNumOfDownstream(const SStreamTask* pTask) { if (pTask->info.taskLevel == TASK_LEVEL__SINK) { return 0; + } + + int32_t type = pTask->outputInfo.type; + if (type == TASK_OUTPUT__TABLE) { + return 0; + } else if (type == TASK_OUTPUT__FIXED_DISPATCH) { + return 1; } else { - int32_t type = pTask->outputInfo.type; - if (type == TASK_OUTPUT__TABLE) { - return 0; - } else if (type == TASK_OUTPUT__FIXED_DISPATCH) { - return 1; - } else { - SArray* vgInfo = pTask->outputInfo.shuffleDispatcher.dbInfo.pVgroupInfos; - return taosArrayGetSize(vgInfo); - } + SArray* vgInfo = pTask->outputInfo.shuffleDispatcher.dbInfo.pVgroupInfos; + return taosArrayGetSize(vgInfo); } } diff --git a/source/libs/stream/src/streamTaskSm.c b/source/libs/stream/src/streamTaskSm.c index 1671d78ed22..83e71c42bc1 100644 --- a/source/libs/stream/src/streamTaskSm.c +++ b/source/libs/stream/src/streamTaskSm.c @@ -105,7 +105,7 @@ int32_t streamTaskKeepCurrentVerInWal(SStreamTask* pTask) { if (pTask->info.taskLevel == TASK_LEVEL__SOURCE) { pTask->hTaskInfo.haltVer = walReaderGetCurrentVer(pTask->exec.pWalReader); if (pTask->hTaskInfo.haltVer == -1) { - pTask->hTaskInfo.haltVer = pTask->dataRange.range.maxVer + 1; + pTask->hTaskInfo.haltVer = pTask->dataRange.range.minVer; } } From 4088e1cbff10ee153805b5a96307b7f27129aae8 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 1 Feb 2024 12:05:07 +0800 Subject: [PATCH 82/93] fix(stream): fix memory leak. --- source/common/src/tmsg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 2ab4c9ed8db..cdbc2658daf 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -7418,10 +7418,11 @@ void tFreeSCMCreateStreamReq(SCMCreateStreamReq *pReq) { if (NULL == pReq) { return; } - taosArrayDestroy(pReq->pTags); taosMemoryFreeClear(pReq->sql); taosMemoryFreeClear(pReq->ast); + taosArrayDestroy(pReq->pTags); taosArrayDestroy(pReq->fillNullCols); + taosArrayDestroy(pReq->pVgroupVerList); } int32_t tEncodeSRSmaParam(SEncoder *pCoder, const SRSmaParam *pRSmaParam) { From ac2d8f4ca85ccb2350d1ad347ae38414c675025e Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 1 Feb 2024 13:04:26 +0800 Subject: [PATCH 83/93] fix(stream): fix memory leak. --- source/client/src/clientImpl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 71f6a466b9f..c1e1da617de 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -971,6 +971,8 @@ void postSubQueryFetchCb(void* param, TAOS_RES* res, int32_t rowNum) { tscError("0x%" PRIx64 ", next req ref 0x%" PRIx64 " is not there, reqId:0x%" PRIx64, pRequest->self, pRequest->relation.nextRefId, pRequest->requestId); } + + blockDataDestroy(pBlock); } void handlePostSubQuery(SSqlCallbackWrapper* pWrapper) { From 88f246b988496e0b06c8af9514698e940ce06720 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 1 Feb 2024 15:08:06 +0800 Subject: [PATCH 84/93] fix(stream): fix syntax error on windows, and add null ptr check for pTrans obj. --- source/dnode/mnode/impl/src/mndStream.c | 5 +++++ source/libs/parser/src/parTranslater.c | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index 6640e5dca35..18cecddbdb5 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -1843,6 +1843,11 @@ static int32_t mndProcessVgroupChange(SMnode *pMnode, SVgroupChangeInfo *pChange } } + // no need to build the trans to handle the vgroup upddate + if (pTrans == NULL) { + return 0; + } + if (mndTransPrepare(pMnode, pTrans) != 0) { mError("trans:%d, failed to prepare update stream trans since %s", pTrans->id, terrstr()); sdbRelease(pMnode->pSdb, pStream); diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 922ad30f391..e221d2158cb 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -8330,8 +8330,7 @@ static int32_t createStreamReqVersionInfo(SSDataBlock* pBlock, SArray** pArray, SColumnInfoData* pCol2 = taosArrayGet(pBlock->pDataBlock, 2); for (int32_t i = 0; i < pBlock->info.rows; ++i) { - SVgroupVer v = {.vgId = *(int32_t*)colDataGetData(pCol1, i), .ver = *(int64_t*)colDataGetData(pCol2, i)}; - parserDebug("-------------%ld, vgId:%d, vgVer:%ld\n", *lastTs, v.vgId, v.ver); + SVgroupVer v = {.vgId = *(int32_t*)colDataGetData(pCol1, i), .ver = *(int64_t*)colDataGetData(pCol2, i)}; taosArrayPush(*pArray, &v); } } else { From d369289ea2cc64a4eaae856e912f908bc72d721f Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Thu, 1 Feb 2024 16:34:05 +0800 Subject: [PATCH 85/93] fix:[TD-28514] memory leak --- source/client/src/clientTmq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 8b424a7bf7a..c29dcda781d 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -761,6 +761,7 @@ int32_t tmqHbCb(void* param, SDataBuf* pMsg, int32_t code) { } } taosWUnLockLatch(&tmq->lock); + taosReleaseRef(tmqMgmt.rsetId, refId); } tDeatroySMqHbRsp(&rsp); taosMemoryFree(pMsg->pData); From 87e543c8240655c9f14882c963316ffc27730dfd Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 1 Feb 2024 17:14:36 +0800 Subject: [PATCH 86/93] fix(stream): pass down the transId of checkpoint, to make sure the downstream task can report the error transId successfully. --- source/libs/stream/src/streamCheckpoint.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/libs/stream/src/streamCheckpoint.c b/source/libs/stream/src/streamCheckpoint.c index 50a010d7797..f45904f0365 100644 --- a/source/libs/stream/src/streamCheckpoint.c +++ b/source/libs/stream/src/streamCheckpoint.c @@ -116,7 +116,6 @@ static int32_t streamAlignCheckpoint(SStreamTask* pTask) { return atomic_sub_fetch_32(&pTask->chkInfo.downstreamAlignNum, 1); } -// todo handle down the transId of checkpoint to sink/agg tasks. static int32_t appendCheckpointIntoInputQ(SStreamTask* pTask, int32_t checkpointType) { SStreamDataBlock* pChkpoint = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM, sizeof(SSDataBlock)); if (pChkpoint == NULL) { @@ -133,6 +132,7 @@ static int32_t appendCheckpointIntoInputQ(SStreamTask* pTask, int32_t checkpoint pBlock->info.type = STREAM_CHECKPOINT; pBlock->info.version = pTask->chkInfo.checkpointingId; + pBlock->info.window.ekey = pBlock->info.window.skey = pTask->chkInfo.transId; // NOTE: set the transId pBlock->info.rows = 1; pBlock->info.childId = pTask->info.selfChildId; @@ -185,17 +185,20 @@ static int32_t continueDispatchCheckpointBlock(SStreamDataBlock* pBlock, SStream int32_t streamProcessCheckpointBlock(SStreamTask* pTask, SStreamDataBlock* pBlock) { SSDataBlock* pDataBlock = taosArrayGet(pBlock->blocks, 0); int64_t checkpointId = pDataBlock->info.version; + int32_t transId = pDataBlock->info.window.skey; const char* id = pTask->id.idStr; int32_t code = TSDB_CODE_SUCCESS; int32_t vgId = pTask->pMeta->vgId; stDebug("s-task:%s vgId:%d start to handle the checkpoint block, checkpointId:%" PRId64 " ver:%" PRId64 - ", current checkpointingId:%" PRId64, - id, vgId, pTask->chkInfo.checkpointId, pTask->chkInfo.checkpointVer, checkpointId); + ", transId:%d current checkpointingId:%" PRId64, + id, vgId, pTask->chkInfo.checkpointId, pTask->chkInfo.checkpointVer, transId, checkpointId); // set task status if (streamTaskGetStatus(pTask)->state != TASK_STATUS__CK) { pTask->chkInfo.checkpointingId = checkpointId; + pTask->chkInfo.transId = transId; + code = streamTaskHandleEvent(pTask->status.pSM, TASK_EVENT_GEN_CHECKPOINT); if (code != TSDB_CODE_SUCCESS) { stError("s-task:%s handle checkpoint-trigger block failed, code:%s", id, tstrerror(code)); From 58b675a5d7379233cd27981cf1d877485d61938a Mon Sep 17 00:00:00 2001 From: Yihao Deng Date: Thu, 1 Feb 2024 10:15:56 +0000 Subject: [PATCH 87/93] change error code --- source/libs/transport/src/transCli.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 15b35030d3e..b6942655a9a 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -2515,7 +2515,7 @@ int transReleaseCliHandle(void* handle) { SCliThrd* pThrd = transGetWorkThrdFromHandle(NULL, (int64_t)handle); if (pThrd == NULL) { - return -1; + return TSDB_CODE_RPC_BROKEN_LINK; } STransMsg tmsg = {.info.handle = handle, .info.ahandle = (void*)0x9527}; @@ -2535,7 +2535,7 @@ int transReleaseCliHandle(void* handle) { if (0 != transAsyncSend(pThrd->asyncPool, &cmsg->q)) { destroyCmsg(cmsg); - return -1; + return TSDB_CODE_RPC_BROKEN_LINK; } return 0; } @@ -2544,7 +2544,7 @@ int transSendRequest(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STran STrans* pTransInst = (STrans*)transAcquireExHandle(transGetInstMgt(), (int64_t)shandle); if (pTransInst == NULL) { transFreeMsg(pReq->pCont); - return -1; + return TSDB_CODE_RPC_BROKEN_LINK; } SCliThrd* pThrd = transGetWorkThrd(pTransInst, (int64_t)pReq->info.handle); @@ -2577,7 +2577,7 @@ int transSendRequest(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STran if (0 != transAsyncSend(pThrd->asyncPool, &(cliMsg->q))) { destroyCmsg(cliMsg); transReleaseExHandle(transGetInstMgt(), (int64_t)shandle); - return -1; + return TSDB_CODE_RPC_BROKEN_LINK; } transReleaseExHandle(transGetInstMgt(), (int64_t)shandle); return 0; @@ -2589,7 +2589,7 @@ int transSendRecv(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STransMs if (pTransInst == NULL) { transFreeMsg(pReq->pCont); taosMemoryFree(pTransRsp); - return -1; + return TSDB_CODE_RPC_BROKEN_LINK; } SCliThrd* pThrd = transGetWorkThrd(pTransInst, (int64_t)pReq->info.handle); @@ -2627,6 +2627,7 @@ int transSendRecv(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STransMs int ret = transAsyncSend(pThrd->asyncPool, &cliMsg->q); if (ret != 0) { destroyCmsg(cliMsg); + ret = TSDB_CODE_RPC_BROKEN_LINK; goto _RETURN; } tsem_wait(sem); @@ -2661,7 +2662,7 @@ int transSendRecvWithTimeout(void* shandle, SEpSet* pEpSet, STransMsg* pReq, STr if (pTransInst == NULL) { transFreeMsg(pReq->pCont); taosMemoryFree(pTransMsg); - return -1; + return TSDB_CODE_RPC_BROKEN_LINK; } SCliThrd* pThrd = transGetWorkThrd(pTransInst, (int64_t)pReq->info.handle); @@ -2698,6 +2699,7 @@ int transSendRecvWithTimeout(void* shandle, SEpSet* pEpSet, STransMsg* pReq, STr int ret = transAsyncSend(pThrd->asyncPool, &cliMsg->q); if (ret != 0) { destroyCmsg(cliMsg); + ret = TSDB_CODE_RPC_BROKEN_LINK; goto _RETURN; } @@ -2726,7 +2728,7 @@ _RETURN: int transSetDefaultAddr(void* shandle, const char* ip, const char* fqdn) { STrans* pTransInst = (STrans*)transAcquireExHandle(transGetInstMgt(), (int64_t)shandle); if (pTransInst == NULL) { - return -1; + return TSDB_CODE_RPC_BROKEN_LINK; } SCvtAddr cvtAddr = {0}; @@ -2750,7 +2752,6 @@ int transSetDefaultAddr(void* shandle, const char* ip, const char* fqdn) { if (transAsyncSend(thrd->asyncPool, &(cliMsg->q)) != 0) { destroyCmsg(cliMsg); transReleaseExHandle(transGetInstMgt(), (int64_t)shandle); - return -1; } } transReleaseExHandle(transGetInstMgt(), (int64_t)shandle); From f78b62e224a475030ceb0976b770ff13fe85f351 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Thu, 1 Feb 2024 19:06:38 +0800 Subject: [PATCH 88/93] case: open checkStreamCorrect on s3_basic.py --- tests/army/enterprise/s3/s3_basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/army/enterprise/s3/s3_basic.py b/tests/army/enterprise/s3/s3_basic.py index a1a945a3043..976ad857476 100644 --- a/tests/army/enterprise/s3/s3_basic.py +++ b/tests/army/enterprise/s3/s3_basic.py @@ -128,7 +128,7 @@ class TDTestCase(TBase): self.checkInsertCorrect() # check stream correct and drop stream - # self.checkStreamCorrect() + self.checkStreamCorrect() # drop stream self.dropStream(self.sname) From 963bb20ce3fc0bdbe192124e59a177a68d2af3d9 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Thu, 1 Feb 2024 19:11:50 +0800 Subject: [PATCH 89/93] coverage: metaIdx.c comment no use funciton --- source/dnode/vnode/src/meta/metaIdx.c | 2 ++ source/dnode/vnode/src/meta/metaOpen.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/source/dnode/vnode/src/meta/metaIdx.c b/source/dnode/vnode/src/meta/metaIdx.c index efa06d2d1fe..dc62ab2b9f5 100644 --- a/source/dnode/vnode/src/meta/metaIdx.c +++ b/source/dnode/vnode/src/meta/metaIdx.c @@ -62,6 +62,7 @@ int metaOpenIdx(SMeta *pMeta) { return 0; } +#ifdef BUILD_NO_CALL void metaCloseIdx(SMeta *pMeta) { /* TODO */ #if 0 if (pMeta->pIdx) { @@ -114,3 +115,4 @@ int metaRemoveTableFromIdx(SMeta *pMeta, tb_uid_t uid) { // TODO return 0; } +#endif \ No newline at end of file diff --git a/source/dnode/vnode/src/meta/metaOpen.c b/source/dnode/vnode/src/meta/metaOpen.c index 8cab17c417f..c09253dd6a2 100644 --- a/source/dnode/vnode/src/meta/metaOpen.c +++ b/source/dnode/vnode/src/meta/metaOpen.c @@ -273,7 +273,9 @@ static void metaCleanup(SMeta **ppMeta) { if (pMeta) { if (pMeta->pEnv) metaAbort(pMeta); if (pMeta->pCache) metaCacheClose(pMeta); +#ifdef BUILD_NO_CALL if (pMeta->pIdx) metaCloseIdx(pMeta); +#endif if (pMeta->pStreamDb) tdbTbClose(pMeta->pStreamDb); if (pMeta->pNcolIdx) tdbTbClose(pMeta->pNcolIdx); if (pMeta->pBtimeIdx) tdbTbClose(pMeta->pBtimeIdx); From 67425fce1e0fb3c937cfc0e953a83ee291eeffc0 Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 1 Feb 2024 22:57:56 +0800 Subject: [PATCH 90/93] feat: support uniq grant --- source/dnode/mnode/impl/src/mndGrant.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndGrant.c b/source/dnode/mnode/impl/src/mndGrant.c index 47227bfc8a4..0b85f8fd5a0 100644 --- a/source/dnode/mnode/impl/src/mndGrant.c +++ b/source/dnode/mnode/impl/src/mndGrant.c @@ -75,17 +75,15 @@ void grantParseParameter() { mError("can't parsed parameter k"); } void grantReset(SMnode *pMnode, EGrantType grant, uint64_t value) {} void grantAdd(EGrantType grant, uint64_t value) {} void grantRestore(EGrantType grant, uint64_t value) {} -// char *tGetMachineId() { return NULL; }; +char *tGetMachineId() { return NULL; }; int32_t dmProcessGrantReq(void *pInfo, SRpcMsg *pMsg) { return TSDB_CODE_SUCCESS; } int32_t dmProcessGrantNotify(void *pInfo, SRpcMsg *pMsg) { return TSDB_CODE_SUCCESS; } - -#endif - -void mndGenerateMachineCode() { grantParseParameter(); } - +int32_t mndProcessConfigGrantReq(SMnode *pMnode, SRpcMsg *pReq, SMCfgClusterReq *pCfg) { return 0; } +#else #ifndef TD_UNIQ_GRANT -#ifdef TD_ENTERPRISE +char *tGetMachineId() { return NULL; }; int32_t mndProcessConfigGrantReq(SMnode *pMnode, SRpcMsg *pReq, SMCfgClusterReq *pCfg) { return 0; } #endif -char *tGetMachineId() { return NULL; }; #endif + +void mndGenerateMachineCode() { grantParseParameter(); } \ No newline at end of file From ad16d1ed388558f4271ccb6d0bafe70fad78e61f Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Fri, 2 Feb 2024 09:14:20 +0800 Subject: [PATCH 91/93] fix: comment checkStreamCorrect again --- tests/army/enterprise/s3/s3_basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/army/enterprise/s3/s3_basic.py b/tests/army/enterprise/s3/s3_basic.py index 976ad857476..e7bc188ca52 100644 --- a/tests/army/enterprise/s3/s3_basic.py +++ b/tests/army/enterprise/s3/s3_basic.py @@ -128,7 +128,7 @@ class TDTestCase(TBase): self.checkInsertCorrect() # check stream correct and drop stream - self.checkStreamCorrect() + #self.checkStreamCorrect() # drop stream self.dropStream(self.sname) From 5d80d9d41cc0dc9230825a5859295c0e9b1698da Mon Sep 17 00:00:00 2001 From: Yihao Deng Date: Fri, 2 Feb 2024 01:45:36 +0000 Subject: [PATCH 92/93] change error code --- source/util/src/tworker.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/util/src/tworker.c b/source/util/src/tworker.c index c4b3271c65b..3e591c7d7f3 100644 --- a/source/util/src/tworker.c +++ b/source/util/src/tworker.c @@ -89,7 +89,7 @@ static void *tQWorkerThreadFp(SQueueWorker *worker) { if (qinfo.timestamp != 0) { int64_t cost = taosGetTimestampUs() - qinfo.timestamp; if (cost > QUEUE_THRESHOLD) { - uWarn("worker:%s,message has been queued for too long, cost: %" PRId64 "s", pool->name, cost); + uWarn("worker:%s,message has been queued for too long, cost: %" PRId64 "s", pool->name, cost / QUEUE_THRESHOLD); } } @@ -210,7 +210,7 @@ static void *tAutoQWorkerThreadFp(SQueueWorker *worker) { if (qinfo.timestamp != 0) { int64_t cost = taosGetTimestampUs() - qinfo.timestamp; if (cost > QUEUE_THRESHOLD) { - uWarn("worker:%s,message has been queued for too long, cost: %" PRId64 "s", pool->name, cost); + uWarn("worker:%s,message has been queued for too long, cost: %" PRId64 "s", pool->name, cost / QUEUE_THRESHOLD); } } @@ -357,7 +357,7 @@ static void *tWWorkerThreadFp(SWWorker *worker) { if (qinfo.timestamp != 0) { int64_t cost = taosGetTimestampUs() - qinfo.timestamp; if (cost > QUEUE_THRESHOLD) { - uWarn("worker:%s,message has been queued for too long, cost: %" PRId64 "s", pool->name, cost); + uWarn("worker:%s,message has been queued for too long, cost: %" PRId64 "s", pool->name, cost / QUEUE_THRESHOLD); } } From 948845ea3516b8ca2b5839d031d53e26b9c2bbb0 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Fri, 2 Feb 2024 10:38:09 +0800 Subject: [PATCH 93/93] fix: join order by not work issue --- source/libs/planner/src/planOptimizer.c | 58 +++++++++-------- tests/script/tsim/query/join_order.sim | 85 +++++++++++++++++++++++++ 2 files changed, 115 insertions(+), 28 deletions(-) diff --git a/source/libs/planner/src/planOptimizer.c b/source/libs/planner/src/planOptimizer.c index af9ec93f658..cda16146124 100644 --- a/source/libs/planner/src/planOptimizer.c +++ b/source/libs/planner/src/planOptimizer.c @@ -1455,28 +1455,25 @@ static int32_t sortForJoinOptimizeImpl(SOptimizeContext* pCxt, SLogicSubplan* pL SLogicNode* pLeft = (SLogicNode*)nodesListGetNode(pJoin->node.pChildren, 0); SLogicNode* pRight = (SLogicNode*)nodesListGetNode(pJoin->node.pChildren, 1); SScanLogicNode* pScan = NULL; + SLogicNode* pChild = NULL; + SNode** pChildPos = NULL; + EOrder targetOrder = 0; + SSHashObj* pTables = NULL; if (QUERY_NODE_LOGIC_PLAN_SCAN == nodeType(pLeft) && ((SScanLogicNode*)pLeft)->node.outputTsOrder != SCAN_ORDER_BOTH) { pScan = (SScanLogicNode*)pLeft; + pChild = pRight; + pChildPos = &pJoin->node.pChildren->pTail->pNode; + targetOrder = pScan->node.outputTsOrder; } else if (QUERY_NODE_LOGIC_PLAN_SCAN == nodeType(pRight) && ((SScanLogicNode*)pRight)->node.outputTsOrder != SCAN_ORDER_BOTH) { pScan = (SScanLogicNode*)pRight; - } - - if (NULL != pScan) { - switch (pScan->node.outputTsOrder) { - case SCAN_ORDER_ASC: - pScan->scanSeq[0] = 0; - pScan->scanSeq[1] = 1; - pScan->node.outputTsOrder = ORDER_DESC; - goto _return; - case SCAN_ORDER_DESC: - pScan->scanSeq[0] = 1; - pScan->scanSeq[1] = 0; - pScan->node.outputTsOrder = ORDER_ASC; - goto _return; - default: - break; - } + pChild = pLeft; + pChildPos = &pJoin->node.pChildren->pHead->pNode; + targetOrder = pScan->node.outputTsOrder; + } else { + pChild = pRight; + pChildPos = &pJoin->node.pChildren->pTail->pNode; + targetOrder = pLeft->outputTsOrder; } if (QUERY_NODE_OPERATOR != nodeType(pJoin->pPrimKeyEqCond)) { @@ -1490,16 +1487,15 @@ static int32_t sortForJoinOptimizeImpl(SOptimizeContext* pCxt, SLogicSubplan* pL } SNode* pOrderByNode = NULL; - SSHashObj* pLeftTables = NULL; - collectTableAliasFromNodes(nodesListGetNode(pJoin->node.pChildren, 0), &pLeftTables); - - if (NULL != tSimpleHashGet(pLeftTables, ((SColumnNode*)pOp->pLeft)->tableAlias, strlen(((SColumnNode*)pOp->pLeft)->tableAlias))) { + + collectTableAliasFromNodes((SNode*)pChild, &pTables); + if (NULL != tSimpleHashGet(pTables, ((SColumnNode*)pOp->pLeft)->tableAlias, strlen(((SColumnNode*)pOp->pLeft)->tableAlias))) { pOrderByNode = pOp->pLeft; - } else if (NULL != tSimpleHashGet(pLeftTables, ((SColumnNode*)pOp->pRight)->tableAlias, strlen(((SColumnNode*)pOp->pRight)->tableAlias))) { + } else if (NULL != tSimpleHashGet(pTables, ((SColumnNode*)pOp->pRight)->tableAlias, strlen(((SColumnNode*)pOp->pRight)->tableAlias))) { pOrderByNode = pOp->pRight; } - tSimpleHashCleanup(pLeftTables); + tSimpleHashCleanup(pTables); if (NULL == pOrderByNode) { return TSDB_CODE_PLAN_INTERNAL_ERROR; @@ -1510,7 +1506,13 @@ static int32_t sortForJoinOptimizeImpl(SOptimizeContext* pCxt, SLogicSubplan* pL return TSDB_CODE_OUT_OF_MEMORY; } - pSort->node.outputTsOrder = (ORDER_ASC == pLeft->outputTsOrder) ? ORDER_DESC : ORDER_ASC; + pSort->node.outputTsOrder = targetOrder; + pSort->node.pTargets = nodesCloneList(pChild->pTargets); + if (NULL == pSort->node.pTargets) { + nodesDestroyNode((SNode *)pSort); + return TSDB_CODE_OUT_OF_MEMORY; + } + pSort->groupSort = false; SOrderByExprNode* pOrder = (SOrderByExprNode*)nodesMakeNode(QUERY_NODE_ORDER_BY_EXPR); if (NULL == pOrder) { @@ -1519,7 +1521,7 @@ static int32_t sortForJoinOptimizeImpl(SOptimizeContext* pCxt, SLogicSubplan* pL } nodesListMakeAppend(&pSort->pSortKeys, (SNode*)pOrder); - pOrder->order = (ORDER_ASC == pLeft->outputTsOrder) ? ORDER_DESC : ORDER_ASC; + pOrder->order = targetOrder; pOrder->pExpr = nodesCloneNode(pOrderByNode); pOrder->nullOrder = (ORDER_ASC == pOrder->order) ? NULL_ORDER_FIRST : NULL_ORDER_LAST; if (!pOrder->pExpr) { @@ -1527,9 +1529,9 @@ static int32_t sortForJoinOptimizeImpl(SOptimizeContext* pCxt, SLogicSubplan* pL return TSDB_CODE_OUT_OF_MEMORY; } - pLeft->pParent = (SLogicNode*)pSort; - nodesListMakeAppend(&pSort->node.pChildren, (SNode*)pLeft); - pJoin->node.pChildren->pHead->pNode = (SNode*)pSort; + pChild->pParent = (SLogicNode*)pSort; + nodesListMakeAppend(&pSort->node.pChildren, (SNode*)pChild); + *pChildPos = (SNode*)pSort; pSort->node.pParent = (SLogicNode*)pJoin;; _return: diff --git a/tests/script/tsim/query/join_order.sim b/tests/script/tsim/query/join_order.sim index bd772ff407e..534ab5d6315 100644 --- a/tests/script/tsim/query/join_order.sim +++ b/tests/script/tsim/query/join_order.sim @@ -47,5 +47,90 @@ sql select a.*,b.* from (select * from tba1 order by ts desc) a, (select * from if $rows != 4 then return -1 endi +sql select a.*,b.* from (select * from tba1 order by ts desc) a, (select * from tba1 order by ts) b where a.ts=b.ts order by a.ts; +if $rows != 4 then + return -1 +endi +if $data00 != @23-11-17 16:29:00.000@ then + return -1 +endi +sql select a.*,b.* from (select * from tba1 order by ts desc) a, (select * from tba1 order by ts) b where a.ts=b.ts order by a.ts desc; +if $rows != 4 then + return -1 +endi +if $data00 != @23-11-17 16:29:04.000@ then + return -1 +endi +sql select a.*,b.* from (select * from tba1 order by ts) a, (select * from tba1 order by ts) b where a.ts=b.ts order by a.ts; +if $rows != 4 then + return -1 +endi +if $data00 != @23-11-17 16:29:00.000@ then + return -1 +endi +sql select a.*,b.* from (select * from tba1 order by ts) a, (select * from tba1 order by ts) b where a.ts=b.ts order by a.ts desc; +if $rows != 4 then + return -1 +endi +if $data00 != @23-11-17 16:29:04.000@ then + return -1 +endi +sql select a.*,b.* from (select * from tba1 order by ts limit 2) a, (select * from tba1 order by ts desc limit 2) b where a.ts=b.ts order by a.ts desc; +if $rows != 0 then + return -1 +endi +sql select a.*,b.* from (select * from tba1 order by ts limit 3) a, (select * from tba1 order by ts desc limit 3) b where a.ts=b.ts order by a.ts desc; +if $rows != 2 then + return -1 +endi +if $data00 != @23-11-17 16:29:03.000@ then + return -1 +endi + +sql select a.*,b.* from (select * from tba1 order by ts limit 3) a, (select * from tba1 order by ts desc limit 3) b where a.ts=b.ts order by a.ts; +if $rows != 2 then + return -1 +endi +if $data00 != @23-11-17 16:29:02.000@ then + return -1 +endi + +sql select a.*,b.* from tba1 a, (select * from tba1 order by ts desc limit 3) b where a.ts=b.ts order by a.ts; +if $rows != 3 then + return -1 +endi +if $data00 != @23-11-17 16:29:02.000@ then + return -1 +endi +sql select a.*,b.* from tba1 a, (select * from tba1 order by ts limit 3) b where a.ts=b.ts order by a.ts desc limit 2; +if $rows != 2 then + return -1 +endi +if $data00 != @23-11-17 16:29:03.000@ then + return -1 +endi + +sql select a.*,b.* from (select * from tba1 order by ts limit 3) a, tba1 b where a.ts=b.ts order by a.ts desc; +if $rows != 3 then + return -1 +endi +if $data00 != @23-11-17 16:29:03.000@ then + return -1 +endi +sql select a.*,b.* from (select * from tba1 order by ts desc limit 3) a, tba1 b where a.ts=b.ts order by a.ts desc; +if $rows != 3 then + return -1 +endi +if $data00 != @23-11-17 16:29:04.000@ then + return -1 +endi + +sql select a.*,b.* from (select * from tba1 order by ts desc limit 3) a, tba1 b where a.ts=b.ts order by a.ts; +if $rows != 3 then + return -1 +endi +if $data00 != @23-11-17 16:29:02.000@ then + return -1 +endi system sh/exec.sh -n dnode1 -s stop -x SIGINT